diff --git a/spec b/spec index f7ef96aef6..786d15b628 100644 --- a/spec +++ b/spec @@ -179,11 +179,11 @@ beginseg include "build/src/libultra/gu/coss.o" include "build/src/libultra/os/settime.o" include "build/src/libultra/voice/voicestopread.o" - include "build/src/libultra/gu/visetevent.o" + include "build/src/libultra/io/visetevent.o" include "build/src/libultra/io/pfsisplug.o" include "build/src/libultra/voice/voicegetstatus.o" include "build/src/libultra/io/cartrominit.o" - include "build/src/libultra/gu/guS2DInitBg.o" + include "build/src/libultra/gu/us2dex.o" include "build/data/boot/vimodefpallan1.data.o" include "build/src/libultra/io/pfsselectbank.o" include "build/src/libultra/io/contsetch.o" diff --git a/src/libultra/gu/ortho.c b/src/libultra/gu/ortho.c index 592f2995de..01c09c4669 100644 --- a/src/libultra/gu/ortho.c +++ b/src/libultra/gu/ortho.c @@ -3,6 +3,7 @@ void guOrthoF(float m[4][4], float l, float r, float b, float t, float n, float f, float scale) { int i; int j; + guMtxIdentF(m); m[0][0] = 2 / (r - l); m[1][1] = 2 / (t - b); @@ -20,6 +21,7 @@ void guOrthoF(float m[4][4], float l, float r, float b, float t, float n, float void guOrtho(Mtx* m, float l, float r, float b, float t, float n, float f, float scale) { float mf[4][4]; + guOrthoF(mf, l, r, b, t, n, f, scale); guMtxF2L(mf, m); } diff --git a/src/libultra/gu/perspective.c b/src/libultra/gu/perspective.c index d3dab2ef40..d112bc7b34 100644 --- a/src/libultra/gu/perspective.c +++ b/src/libultra/gu/perspective.c @@ -36,6 +36,7 @@ void guPerspectiveF(float mf[4][4], u16* perspNorm, float fovy, float aspect, fl void guPerspective(Mtx* m, u16* perspNorm, float fovy, float aspect, float near, float far, float scale) { float mf[4][4]; + guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale); guMtxF2L(mf, m); } diff --git a/src/libultra/gu/rotate.c b/src/libultra/gu/rotate.c index 46dd605d49..2410863e21 100644 --- a/src/libultra/gu/rotate.c +++ b/src/libultra/gu/rotate.c @@ -1,7 +1,7 @@ #include "global.h" void guRotateF(float m[4][4], float a, float x, float y, float z) { - static float D_80097F90 = M_PI / 180.0f; + static float dtor = M_PI / 180.0f; float sine; float cosine; float ab; @@ -14,7 +14,7 @@ void guRotateF(float m[4][4], float a, float x, float y, float z) { guNormalize(&x, &y, &z); - a = a * D_80097F90; + a *= dtor; sine = sinf(a); cosine = cosf(a); diff --git a/src/libultra/gu/guS2DInitBg.c b/src/libultra/gu/us2dex.c similarity index 100% rename from src/libultra/gu/guS2DInitBg.c rename to src/libultra/gu/us2dex.c diff --git a/src/libultra/gu/visetevent.c b/src/libultra/io/visetevent.c similarity index 100% rename from src/libultra/gu/visetevent.c rename to src/libultra/io/visetevent.c diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index 5ac774bc9e..c968eff0e6 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -192,7 +192,7 @@ 0x80092440 : "pfsisplug", 0x80092730 : "voicegetstatus", 0x80092920 : "cartrominit", - 0x80092A80 : "guS2DInitBg", + 0x80092A80 : "us2dex", 0x80092C00 : "pfsselectbank", 0x80092C80 : "contsetch", 0x80092CE0 : "setfpccsr", diff --git a/tools/sizes/boot_functions.csv b/tools/sizes/boot_functions.csv index f2aec1cb46..bd346dedf6 100644 --- a/tools/sizes/boot_functions.csv +++ b/tools/sizes/boot_functions.csv @@ -419,7 +419,7 @@ asm/non_matchings/boot/pfsisplug/__osPfsRequestData.s,__osPfsRequestData,0x80092 asm/non_matchings/boot/pfsisplug/__osPfsGetInitData.s,__osPfsGetInitData,0x80092680,0x2C asm/non_matchings/boot/voicegetstatus/__osVoiceGetStatus.s,__osVoiceGetStatus,0x80092730,0x7C asm/non_matchings/boot/cartrominit/osCartRomInit.s,osCartRomInit,0x80092920,0x58 -asm/non_matchings/boot/guS2DInitBg/guS2DInitBg.s,guS2DInitBg,0x80092A80,0x60 +asm/non_matchings/boot/us2dex/guS2DInitBg.s,guS2DInitBg,0x80092A80,0x60 asm/non_matchings/boot/pfsselectbank/__osPfsSelectBank.s,__osPfsSelectBank,0x80092C00,0x20 asm/non_matchings/boot/contsetch/osContSetCh.s,osContSetCh,0x80092C80,0x18 asm/non_matchings/boot/setfpccsr/__osSetFpcCsr.s,__osSetFpcCsr,0x80092CE0,0x4