Merge pull request #497 from Ibot02/gCosineTablePurge

Removed Fake Global gCosinePosition
This commit is contained in:
notyourav 2022-04-15 22:11:15 -07:00 committed by GitHub
commit 032b846489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 70 deletions

View File

@ -1061,7 +1061,7 @@ _0800283E:
tst r3, r4
bne _08002860
push {r0, r1, r2, r3}
ldr r4, _0800297C @ =gCosineTable
ldr r4, _0800297C @ =gSineTable+128
ldrh r0, [r4, r2]
cmp r0, #0
beq _08002856
@ -1241,7 +1241,7 @@ _0800296C: .4byte 0x00000100
_08002970: .4byte gUnk_0800275C
_08002974: .4byte 0x0000EE00
_08002978: .4byte gSineTable
_0800297C: .4byte gCosineTable
_0800297C: .4byte gSineTable+128
_08002980: .4byte 0x00000E00
_08002984: .4byte 0x0000020E
_08002988: .4byte 0x000004E0

View File

@ -1,7 +1,7 @@
#include "global.h"
// Values of sin(x*(π/128)) as Q8.8 fixed-point numbers from x = 0 to x = 319
const s16 gSineTable[64] = {
const s16 gSineTable[320] = {
Q_8_8(0), // sin(0*(π/128))
Q_8_8(0.0234375), // sin(1*(π/128))
Q_8_8(0.046875), // sin(2*(π/128))
@ -66,9 +66,6 @@ const s16 gSineTable[64] = {
Q_8_8(0.99609375), // sin(61*(π/128))
Q_8_8(0.99609375), // sin(62*(π/128))
Q_8_8(0.99609375), // sin(63*(π/128))
};
const s16 gCosineTable[256] = {
Q_8_8(1), // sin(64*(π/128))
Q_8_8(0.99609375), // sin(65*(π/128))
Q_8_8(0.99609375), // sin(66*(π/128))