diff --git a/Makefile b/Makefile index ec50ff82..e1ed8cbf 100644 --- a/Makefile +++ b/Makefile @@ -230,9 +230,9 @@ $(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION) $(BUILD_DIR)/linker_scri # directory flags # per-file flags -build/src/main/1EB50.o: OPTFLAGS := -O1 -g0 -build/src/main/sprintf.o: OPTFLAGS := -O2 -g0 -build/src/main/math64.o: OPTFLAGS := -O2 -g0 +build/src/main/sys_audio_1EB50.o: OPTFLAGS := -O1 -g0 +build/src/main/sys_sprintf.o: OPTFLAGS := -O2 -g0 +build/src/main/sys_math64.o: OPTFLAGS := -O2 -g0 build/src/libultra/gu/sqrtf.o: OPTFLAGS := -O3 -g0 build/src/libultra/gu/ortho.o: OPTFLAGS := -O3 -g0 diff --git a/include/PR/controller.h b/include/PR/controller.h index 97889e03..da201fc2 100644 --- a/include/PR/controller.h +++ b/include/PR/controller.h @@ -128,7 +128,7 @@ typedef struct #define CONT_CMD_CHANNEL_RESET 0xFD #define CONT_CMD_RESET 0xFF -// Bytes transmitted for each joybus command +// Bytes transmitted for each sys_joybus command #define CONT_CMD_REQUEST_STATUS_TX 1 #define CONT_CMD_READ_BUTTON_TX 1 #define CONT_CMD_READ_PAK_TX 3 @@ -142,7 +142,7 @@ typedef struct #define CONT_CMD_SWRITE_VOICE_TX 3 #define CONT_CMD_RESET_TX 1 -// Bytes received for each joybus command +// Bytes received for each sys_joybus command #define CONT_CMD_REQUEST_STATUS_RX 3 #define CONT_CMD_READ_BUTTON_RX 4 #define CONT_CMD_READ_PAK_RX 33 diff --git a/include/PR/gbi.h b/include/PR/gbi.h index b418e032..caf8a2a3 100644 --- a/include/PR/gbi.h +++ b/include/PR/gbi.h @@ -1117,7 +1117,13 @@ typedef struct { */ typedef long Mtx_t[4][4]; +typedef struct { + u16 i[4][4]; + u16 f[4][4]; +} Mtx_u; + typedef union { + Mtx_u u; Mtx_t m; long long int force_structure_alignment; } Mtx; diff --git a/include/PR/ultraerror.h b/include/PR/ultraerror.h index ef470ba7..c062df4e 100644 --- a/include/PR/ultraerror.h +++ b/include/PR/ultraerror.h @@ -35,7 +35,7 @@ extern "C" { #include -#define OS_ERROR_FMT "/usr/lib/PR/error.fmt" +#define OS_ERROR_FMT "/usr/sys_lib/PR/error.fmt" #define OS_ERROR_MAGIC 0x6b617479 /* OS error codes */ diff --git a/include/functions.h b/include/functions.h index 87d5378d..852c6a35 100644 --- a/include/functions.h +++ b/include/functions.h @@ -30,6 +30,10 @@ void func_8001AE58(void); s32 func_8001AE78(void); s32 func_8001AED4(void); void func_8001AF40(s32); +void func_8001C8B8(u8); +void func_8001CA24(u8); +void func_8001CB80(u8, u8); +void func_8001CCDC(u8, Vec3f *); void func_8001D1C8(s32, s32); void func_8001D2FC(Vec3f *, u16); void func_8001D3A0(Vec3f *, u16); @@ -91,7 +95,9 @@ void func_8002E670(Object_2F4*); void func_8002E694(Object_2F4*); void func_8002E6B8(Object_2F4*); void func_8002E6DC(Object_2F4*); +void func_8002E700(Player *); void func_8002EE64(Object_2F4 *); +void func_8002F180(); void func_8002F5F4(void); void func_800319AC(Object_2F4*); void func_80035448(Object_2F4*); @@ -99,6 +105,7 @@ void func_80035448(Object_2F4*); //sf_36930 void func_80035E48(Object_70 *); void func_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); +void func_8003D9B8(); void func_8003DA0C(void); void func_8003DAF0(void); void func_8003DE68(s32, s32); @@ -115,10 +122,17 @@ void func_80042FC4(Object_408*); void func_80042FD0(Object_408 *); void func_80042FDC(Object_408*); void func_80042FE8(Object_408*); +void func_80043468(Player* ); void func_800444BC(Player *); -void func_800515C4(void); +void func_80047504(Player *); // sf_496E0 +void func_80049C0C(Player *); +void func_8004A52C(Player *); +void func_8004AAF4(Player *); +void func_8004C930(Player *); +void func_8004CCC0(Player *); +void func_8004E3D8(Player *); void func_8004F8AC(Object_2F4*); void func_8004FEC0(Object_2F4*); void func_800515C4(void); @@ -172,10 +186,11 @@ void func_8005F290(Vec3f*, Vec3f*); void func_8005F670(Vec3f*); s32 func_8005F9DC(Vec3f*); -// fox_enmy1 +// fox_enmy void func_80060714(s32 arg0); void func_8006089C(u8 arg0); void func_80060968(void); +void func_80060F30(Vec3f* arg0, u32 arg1, s32 arg2); void Object_Kill(Object*, Vec3f*); s32 func_80060FE4(Vec3f*, f32); void func_800612B8(ObjectStruct_1C*, u32); @@ -190,6 +205,7 @@ void func_80061CD0(void); void func_80061E48(Object_2F4* arg0, f32 arg1, f32 arg2, f32 arg3); void func_80061F0C(Object_2F4* arg0, ObjectInit* arg1, s32 arg2); void func_80062180(ObjectInit* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); +void func_80062568(void); void func_80062C38(f32, f32); s32 func_800631A8(Vec3f*, f32*, Vec3f*); s32 func_8006326C(Vec3f* arg0, Vec3f* arg1, s32 arg2, Object* arg3); @@ -410,6 +426,7 @@ void func_8008AD94(void); void func_8008B5B0(f32 x, f32 y); s32 func_8008B774(void); void func_8008BD00(u8*, s32, s32, u8); +void func_8008C104(u16 *, u16 *); void func_8008C390(f32, f32, f32, s32); void func_8008C5C8(f32, f32, f32, s32); void func_8008C6F4(s32, s32); @@ -462,14 +479,24 @@ s32 Play_CheckMedalStatus(u16); s32 Play_GetMaxHealth(void); void func_800A5844(void); void func_800A5D6C(void); +void func_800A5FA0(Vec3f* arg0, u32 arg1, s32 arg2); void func_800A6148(void); void func_800A69F8(s32 arg0, f32 arg1, f32 arg2, f32 arg3); void func_800A6CD0(Player *, s32, s32); s32 func_800A73E4(f32* arg0, s32* arg1, f32 posX, f32 posY, f32 posZ); s32 func_800A78C4(f32* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6); +void func_800ACDC0(Player *arg0, Object_70 *arg1, s32 arg2); +void func_800B0F50(Player *arg0); +void func_800B44C4(Player *arg0); +void func_800B5FBC(Player *arg0, s32 arg1, s32 arg2); +void func_800B63BC(Player *, s32); +void func_800B6848(Player *arg0, s32 arg1); +void func_800B6BFC(Player *arg0, s32 arg1); void func_800B6F50(f32, f32, f32, f32, f32, f32); +void func_800B7184(Player *arg0, s32); void func_800B73E0(Player *); s32 func_800A73E4(f32* arg0, s32* arg1, f32 posX, f32 posY, f32 posZ); +void func_800B852C(s32 arg0, Object_6C *arg1); void func_800B86CC(void); // fox_radio @@ -481,9 +508,11 @@ void func_800BB5D0(void); void Graphics_NMIWipe(void); // sf_versus +s32 func_800C1E9C(void); void func_800C1ED4(void); void func_800C20B0(void); void func_800C2190(void); +void func_800C26C8(void); // fox_save s32 Save_Write(void); diff --git a/include/gfx.h b/include/gfx.h index 292a4032..55d52248 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -102,7 +102,7 @@ void TextureRect_16bIA_MirY(Gfx **gfxPtr, void* texture, u32 width, u32 height, void TextureRect_16bIA_MirXY(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void TextureRect_32bRGBA(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void Graphics_FillRectangle(Gfx **gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 r, u8 g, u8 b, u8 a); -u16* func_8009F7B4(Gfx **gfxPtr, u8 width, u8 height); +u16* Graphics_SetupTextureRender(Gfx **gfxPtr, u8 width, u8 height); void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number); void Graphics_DisplaySmallNumber(s32 xPos, s32 yPos, s32 number); void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char *text); diff --git a/include/sf64object.h b/include/sf64object.h index 27325a5e..fa68bc60 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -45,7 +45,7 @@ typedef struct { }; /* 0x00 */ u8 drawType; /* 0x08 */ ObjectFunc action; // argument must have object type. - /* 0x0C */ f32* unk_0C; // some sort of script? + /* 0x0C */ f32* unk_0C; // some sort of script? hitboxes? /* 0x10 */ f32 unk_10; // z coordinate of something /* 0x14 */ s16 unk_14; // can be -1, 0, 1 /* 0x16 */ s16 unk_16; // can be 0, 1, 2 @@ -57,13 +57,19 @@ typedef struct { typedef struct { /* 0x00 */ Object obj; - /* 0x1C */ char pad1C[4]; + /* 0x1C */ s32 unk_1C; /* 0x20 */ Vec3f unk_20; - /* 0x2C */ char pad2C[0xC]; + /* 0x2C */ f32 unk_2C; + /* 0x30 */ f32 unk_30; + /* 0x34 */ f32 unk_34; /* 0x38 */ Vec3f unk_38; - /* 0x44 */ char pad44[0x14]; + /* 0x44 */ f32 unk_44; + /* 0x44 */ f32 unk_48; + /* 0x44 */ f32 unk_4C; + /* 0x44 */ f32 unk_50; + /* 0x44 */ f32 unk_54; /* 0x58 */ s32 unk_58; - /* 0x5C */ char pad5C[4]; + /* 0x5C */ s32 unk_5C; /* 0x60 */ s32 unk_60; /* 0x64 */ s32 unk_64; /* 0x68 */ s32 unk_68; diff --git a/include/structs.h b/include/structs.h index b8765d60..5ccefe3c 100644 --- a/include/structs.h +++ b/include/structs.h @@ -129,9 +129,16 @@ typedef struct { typedef struct Player { /* 0x000 */ f32 unk_000; /* 0x004 */ f32 unk_004; - /* 0x008 */ char pad8[4]; + /* 0x008 */ f32 unk_008; /* 0x00C */ f32 unk_00C; - /* 0x010 */ char pad10[0x24]; + /* 0x010 */ f32 unk_010; + /* 0x014 */ f32 unk_014; + /* 0x018 */ f32 unk_018; + /* 0x01C */ f32 unk_01C; + /* 0x020 */ char pad20[8]; + /* 0x028 */ f32 unk_028; + /* 0x02C */ f32 unk_02C; + /* 0x030 */ char pad30[4]; /* 0x034 */ f32 unk_034; /* 0x038 */ char pad38[8]; /* 0x040 */ Vec3f unk_040; @@ -153,14 +160,15 @@ typedef struct Player { /* 0x098 */ f32 unk_098; /* 0x09C */ f32 unk_09C; /* 0x0A0 */ f32 unk_0A0; - /* 0x0A4 */ char padA4[8]; + /* 0x0A4 */ f32 unk_0A4; + /* 0x0A8 */ f32 unk_0A8; /* 0x0AC */ f32 unk_0AC; /* 0x0B0 */ f32 unk_0B0; /* 0x0B4 */ f32 unk_0B4; /* 0x0B8 */ f32 unk_0B8; /* 0x0BC */ f32 unk_0BC; /* 0x0C0 */ Vec3f unk_0C0; - /* 0x0CC */ char padCC[4]; + /* 0x0CC */ f32 unk_0CC; /* 0x0D0 */ f32 unk_0D0; /* 0x0D4 */ f32 unk_0D4; /* 0x0D8 */ Vec3f unk_0D8; @@ -170,14 +178,15 @@ typedef struct Player { /* 0x0F0 */ f32 unk_0F0; /* 0x0F4 */ f32 unk_0F4; /* 0x0F8 */ f32 unk_0F8; - /* 0x0FC */ char padFC[8]; + /* 0x0FC */ f32 unk_0FC; + /* 0x100 */ f32 unk_100; /* 0x104 */ f32 unk_104; /* 0x108 */ f32 unk_108; /* 0x10C */ f32 unk_10C; /* 0x110 */ f32 unk_110; /* 0x114 */ f32 unk_114; /* 0x118 */ f32 unk_118; - /* 0x11C */ char pad11C[4]; + /* 0x11C */ f32 unk_11C; /* 0x120 */ f32 unk_120; /* 0x124 */ f32 unk_124; /* 0x128 */ char pad128[4]; @@ -188,7 +197,9 @@ typedef struct Player { /* 0x13C */ char pad13C[4]; /* 0x140 */ f32 unk_140; /* 0x144 */ f32 unk_144; - /* 0x148 */ char pad148[0xC]; + /* 0x148 */ f32 unk_148; + /* 0x14C */ f32 unk_14C; + /* 0x150 */ f32 unk_150; /* 0x154 */ f32 unk_154; /* 0x158 */ f32 unk_158; /* 0x15C */ f32 unk_15C; @@ -197,7 +208,8 @@ typedef struct Player { /* 0x168 */ f32 unk_168; /* 0x16C */ f32 unk_16C; /* 0x170 */ f32 unk_170; - /* 0x174 */ char pad174[8]; + /* 0x174 */ f32 unk_174; + /* 0x178 */ f32 unk_178; /* 0x17C */ f32 unk_17C; /* 0x180 */ f32 unk_180; /* 0x184 */ f32 unk_184; @@ -205,7 +217,7 @@ typedef struct Player { /* 0x18C */ f32 unk_18C; /* 0x190 */ f32 unk_190; /* 0x194 */ f32 unk_194; - /* 0x198 */ char pad198[4]; + /* 0x198 */ s32 unk_198; /* 0x19C */ s32 unk_19C; /* 0x1A0 */ s32 unk_1A0; /* 0x1A4 */ s32 unk_1A4; @@ -227,9 +239,11 @@ typedef struct Player { /* 0x1FC */ s32 unk_1FC; /* 0x200 */ s32 unk_200; /* 0x204 */ s32 unk_204; - /* 0x208 */ char pad208[8]; + /* 0x208 */ char pad208[4]; + /* 0x20C */ s32 unk_20C; /* 0x210 */ s32 unk_210; - /* 0x214 */ char pad214[8]; + /* 0x214 */ s32 unk_214; + /* 0x218 */ s32 unk_218; /* 0x21C */ s32 unk_21C; /* 0x220 */ s32 unk_220; /* 0x224 */ s32 unk_224; @@ -240,11 +254,12 @@ typedef struct Player { /* 0x238 */ s32 unk_238; /* 0x23C */ s32 unk_23C; /* 0x240 */ s32 unk_240; - /* 0x244 */ char pad244[4]; + /* 0x244 */ s32 unk_244; /* 0x248 */ f32 unk_248; /* 0x24C */ f32 unk_24C; /* 0x250 */ f32 unk_250; - /* 0x250 */ char pad254[8]; + /* 0x250 */ char pad254[4]; + /* 0x258 */ f32 unk_258; /* 0x25C */ f32 unk_25C; /* 0x260 */ char pad260[4]; /* 0x264 */ s32 health; @@ -259,7 +274,7 @@ typedef struct Player { /* 0x288 */ s32 unk_288; /* 0x28C */ char pad28C[0x28]; /* 0x2B4 */ s32 unk_2B4; - /* 0x2B8 */ char pad2B8[0x4]; + /* 0x2B8 */ s32 unk_2B8; /* 0x2BC */ f32 unk_2BC; /* 0x2C0 */ f32 unk_2C0; /* 0x2C4 */ s32 unk_2C4; @@ -273,10 +288,12 @@ typedef struct Player { Vec3f unk_460_arr[1]; // probably fake }; /* 0x460 */ Vec3f unk_46C; - /* 0x494 */ char pad478[4]; + /* 0x494 */ u8 unk_478; + /* 0x479 */ s8 unk_479; /* 0x47C */ Vec3f *unk_47C; /* 0x480 */ Vec3f *unk_480; - /* 0x484 */ char pad484[4]; + /* 0x484 */ s8 unk_484; + /* 0x485 */ s8 unk_485; /* 0x488 */ f32 unk_488; /* 0x48C */ s8 unk_48C; /* 0x490 */ f32 unk_490; diff --git a/include/variables.h b/include/variables.h index 27005b1e..764710d5 100644 --- a/include/variables.h +++ b/include/variables.h @@ -95,7 +95,7 @@ extern Gfx* gMasterDisp; extern Gfx* gUnkDisp2; extern Lightsn* gLight; extern FrameBuffer *gFrameBuffer; -extern u16* D_80137E74; +extern u16* gTextureRender; // some sort of struct? extern u8 D_80137E78; @@ -127,9 +127,13 @@ extern OSMesg D_80156608[4]; extern OSMesg D_80156618[1]; extern OSMesg D_8015661C[1]; +extern s32 D_800C9B4C; extern u16 D_800C9C3C[16]; extern Vec3f D_800C9F2C; // could be f32[4]? +extern s32 D_800CA220; +extern f32 D_800CA230; extern Object_2F4* D_800CA234; +extern s32 D_800CA238; extern f32 D_800CBE70[]; extern f32 D_800CBE8C[]; extern f32 D_800CBEA8[]; @@ -201,6 +205,7 @@ extern s32 D_800D173C[]; extern Gfx* D_800D178C[6]; extern s32 D_800D18F0[]; //[6][4]? extern s32 D_800D1950[]; +extern s16 D_800D1970; extern f32 D_800D19AC[]; extern f32 D_800D19E0[]; extern Gfx D_800D1A40[]; @@ -221,13 +226,21 @@ extern s32 D_800D28A4[]; extern s32 sOverlaySetups[]; extern CollisionHeader D_800D2B38[]; extern CollisionHeader2 D_800D2CA0[]; -extern u8 D_800D3180[0x1E]; // might be bigger? at least 0x21 +extern u8 D_800D2F68; +extern u8 D_800D3180[30]; +extern s32 D_800D31A0[4]; // could belong to fox_rcp or sf_A4B50 extern s32 sCurrentMsgPri; extern Save gDefaultSave; // sf_2EFE0 extern s32 D_8015F900; +extern s32 D_8015F904; extern s32 D_8015F90C; +extern f32 D_8015F914; +extern f32 D_8015F918; +extern f32 D_8015F91C; +extern u8 D_8015F920; +extern u8 D_8015F921; extern s32 D_8015F924; extern s32 D_8015F928; extern s32 D_8015F930[3]; @@ -236,8 +249,20 @@ extern s32 D_8015F940; extern f32 D_8015F944; // sf_36930 +extern s16 D_8015F908; +extern s32 D_8015F910; extern Vec3f D_8015F950; +extern f32 D_8015F960; extern u8 D_8015F964; +extern f32 D_8015F968; +extern f32 D_8015F96C; +extern f32 D_8015F970; +extern s32 D_8015F974; +extern s32 D_8015F978; +extern s32 D_8015F97C; +extern s32 D_8015F980; +extern f32 D_8015F984; +extern f32 D_80161394; // fox_43AC0 extern s32 D_801613A0; @@ -256,12 +281,11 @@ extern f32 D_801615B8[4]; // fox_edisplay extern Vec3f D_801615D0; -// fox_enmy1 +// fox_enmy extern s32 D_80161670[4]; extern s32 D_80161680; extern u8 D_80161684; -// extern u8 temp_55[]; // fox_6B3B0 extern s32 D_80161690; @@ -271,9 +295,14 @@ extern f32 D_801616BC; extern f32 D_801616C0; extern f32 D_801616C4; extern f32 D_801616C8; +extern s32 D_80161704; extern s32 D_80161708; extern s32 D_8016170C; extern s32 D_80161714; +extern f32 D_80161720; +extern f32 D_80161724; +extern f32 D_80161728; +extern s32 D_8016172C; extern s32 D_80161730; extern s32 D_80161734; extern s32 D_80161788; @@ -313,11 +342,13 @@ extern f32 D_80161A44; // sf_A4B50 extern u8 D_80161A50; extern f32 D_80161A54; +// extern s32 D_80161A5C; extern u16 D_80161A60; extern u16 D_80161A62; extern s32 D_80161A64; extern EnvSettings* sEnvSettings; +// extern s32 D_80161A70; // Color32? extern s32 D_80161A74; extern s32 D_80161A78; @@ -326,12 +357,15 @@ extern s32 D_80161A80; extern s32 D_80161A84; extern s32 D_80161A88; extern s32 D_80161A8C; -extern u8 gGoldRingCount[]; +extern u8 gGoldRingCount[4]; +extern u8 D_80161A94; extern s32 gHitCount; extern s32 D_80161A9C; -extern s16 gLifeCount[]; -extern s32 gLaserStrength[]; +extern s16 gLifeCount[4]; +extern s32 gLaserStrength[4]; +// extern s32 D_80161AB8; +// 0x44 extern Object_80 gObjects80[50]; extern Object_4C gObjects4C[40]; extern Object_2F4 gObjects2F4[60]; @@ -342,13 +376,15 @@ extern Object_70 gObjects70[16]; extern UnkEntity30 gUnkEntities30[100]; extern UnkEntity28 gUnkEntities28[65]; extern UnkEntity1C gUnkEntities1C[10]; +// 0x100 extern s32 D_80176550[2]; extern f32 D_80176558[2][100]; extern f32 D_80176878[2][100]; extern f32 D_80176B98[2][100]; -extern f32 D_801771D8[2][100]; extern f32 D_80176EB8[2][100]; +extern f32 D_801771D8[2][100]; extern s32 gOverlaySetup; +// extern f32 D_80177500[2][100]; extern s32 gOverlayStage; extern s32 D_80177824; @@ -360,112 +396,181 @@ extern s32 D_80177838; extern s32 D_8017783C; extern s32 D_80177840; extern s32 D_80177848; +extern s32 D_80177844; extern s32 D_8017784C; extern s32 D_80177850; extern s32 D_80177854; -extern s32 D_80177858[]; +extern s32 D_80177858[4]; extern s32 D_80177868; -extern s32 D_80177870[]; +// +extern s32 D_80177870[4]; extern s32 D_80177880; +// extern s32 D_80177888[4]; extern s32 D_80177898; extern s32 D_8017789C; extern s32 D_801778A0; extern s32 D_801778A4; extern s32 gCamCount; -extern u8 D_801778AB; extern s32 D_801778AC; -extern s32 D_801778B0[4]; +extern s32 D_801778B0[6]; extern s32 D_801778C8; -extern s32 D_801778D0[]; +// +extern s32 D_801778D0[6]; extern s32 D_801778E8; -extern u16 D_80177908[]; -extern s32 D_80177910[]; -extern u16 D_80177928[]; +// +extern UNK_TYPE D_801778F0[6]; +extern u16 D_80177908[4]; +extern s32 D_80177910[6]; +extern u16 D_80177928[4]; extern s8 D_80177930; -extern u16 D_80177938[]; +// +extern u16 D_80177938[4]; extern f32 D_80177940; -extern u16 D_80177948[]; +// +extern u16 D_80177948[4]; extern f32 D_80177950; -extern f32 D_80177958[]; +// +extern f32 D_80177958[4]; +extern f32 D_80177968; +extern s32 D_8017796C; +extern f32 D_80177970; +extern OSContPad *D_80177974; extern f32 D_80177978; -extern UnkStruct_D_8017797C* D_8017797C; +extern OSContPad* D_8017797C; extern f32 D_80177980; +extern u8 *D_80177984; extern f32 D_80177988; -extern s32 D_80177990[]; +// +extern s32 D_80177990[4]; extern f32 D_801779A0; -extern f32 D_801779A8[]; +// +extern f32 D_801779A8[4]; extern f32 D_801779B8; +extern u8 D_801779BC; extern f32 D_801779C0; -extern s32 D_801779C8[]; +// +extern s32 D_801779C8[4]; extern Vec3f D_801779D8; +extern f32 D_801779E4; extern Vec3f D_801779E8; +extern f32 D_801779F4; extern bool gExpertMode; +// +extern UNK_TYPE D_80177A00[4]; extern s32 D_80177A10[10]; +extern UNK_TYPE D_80177A38[4]; extern f32 D_80177A48[10]; extern s32 D_80177A70[4]; extern s32 D_80177A80; +// extern s32 D_80177A88[4]; extern s8 D_80177A98; -extern f32 D_80177AA0[]; +// +extern f32 D_80177AA0[4]; extern u8 D_80177AB0; -extern f32 D_80177AB8[]; +// +extern f32 D_80177AB8[4]; extern u8 D_80177AC8; -extern s32 D_80177AD0[]; +// +extern s32 D_80177AD0[4]; extern s32 D_80177AE0; -extern s32 D_80177AE8[]; +// +extern s32 D_80177AE8[4]; extern s32 D_80177AF8; -extern s32 D_80177B00[][4]; +// +extern s32 D_80177B00[4][4]; extern s32 D_80177B40; +extern u8 D_80177B44; extern s32 D_80177B48; -extern s32 D_80177B50[]; -extern s32 D_80177B70[]; +extern s8 D_80177B4C; +extern s32 D_80177B50[7]; +extern u8 D_80177B6C; +extern s32 D_80177B70[7]; extern u8 D_80177B8C; -extern s32 D_80177B90[]; -extern s32 D_80177BB0[]; -extern u16 D_80177C30[]; +extern s32 D_80177B90[7]; +extern s8 D_80177BAC; +extern s32 D_80177BB0[7]; +// +extern s16 D_80177BD0[4]; // up to [48] +// 0x58 +extern u16 D_80177C30[4]; +extern UNK_TYPE D_80177C38[6]; extern s32 D_80177C50; +// 0x1C +extern s32 D_80177C70; extern u8 gSoundMode; +extern s32 D_80177C78; +// extern s32 gVolumeSettings[3]; +extern s32 D_80177C8C; extern u16 D_80177C90; extern s32 D_80177C94; extern u8 gLevelType; extern s32 D_80177C9C; extern s32 D_80177CA0; extern s32 D_80177CA4; +// extern s32 D_80177CAC; extern f32 D_80177CB0; extern s32 D_80177CB4; +// extern s32 D_80177CBC; extern f32 D_80177CC0; extern s32 D_80177CC4; extern f32 D_80177CC8; +// +extern s32 D_80177CD0[6]; +extern f32 D_80177CE8; +// +extern s32 D_80177CF0[6]; extern f32 D_80177D08; +// extern s32 gRightWingHealth[4]; extern f32 D_80177D20; +// extern s32 gLeftWingHealth[4]; extern f32 D_80177D38; +// extern s32 D_80177D40[4]; extern f32 D_80177D50; +// extern s32 D_80177D58[4]; extern f32 D_80177D68; +// extern s32 D_80177D70[4]; +// 0x8 extern s32 D_80177D88[4]; +// 0x8 extern s32 gBombCount[4]; extern s32 gFrameCount; +// +extern s32 D_80177DB8[4]; extern s32 D_80177DC8; +// +extern s32 D_80177DD0[4][10]; extern s32 D_80177E70; +extern s32 D_80177E74; extern s32 D_80177E78; +extern s32 D_80177E7C; extern s32 D_80177E80; +extern s32 D_80177E84; extern Vec3f D_80177E88; +// extern Vec3f D_80177E98[10]; extern Vec3f D_80177F10; -extern f32 D_80177F24[]; -extern f32 D_8017802C[]; +// 0xC +extern f32 D_80177F24[60]; +// 0x18 +extern f32 D_8017802C[60]; +// 0x10 extern s32 D_8017812C; -extern f32 D_80178134[]; +// +extern f32 D_80178134[60]; +// 0x10 extern s32 gCurrentLevel; -extern u8 D_80178238[]; +extern u8 D_80178238[60]; +// 0x8 extern s32 D_8017827C; extern Player* gPlayer; extern s32 D_80178284; @@ -475,33 +580,47 @@ extern f32* D_80178290; extern s32 D_80178294; extern u32* D_80178298; extern s32 D_8017829C; +// extern s32 D_801782A4; -extern Object_58 *D_801782A8; +extern Object_58 *gObjects58; extern s32 D_801782AC; +// extern s32 D_801782B4; extern s32 D_801782B8; extern s32 D_801782BC; extern s32 D_801782C0; extern f32 *D_801782C4; +extern s32 D_801782C8; extern f32 *D_801782CC; extern s32 D_801782D0; extern f32* D_801782D4; extern s32 D_801782D8; extern f32 *D_801782DC; +// extern f32 *D_801782E4; extern s32 D_801782E8; extern f32 *D_801782EC; +// 0x8 extern s32 D_801782F8; extern s32 D_801782FC; extern s32 D_80178300; +// extern u16* D_80178308; +// extern ObjectInit* D_80178310; +// 0xC extern s32 gFogRed; +// extern s32 gFogGreen; +// extern s32 gFogBlue; +// extern s32 gFogAlpha; +// extern s32 D_80178340; // alpha something +// extern s32 D_80178348; // red something +// extern s32 D_80178350; // green something extern s32 D_80178354; // blue something extern s32 D_80178358; // alpha target @@ -513,28 +632,49 @@ extern f32 D_8017836C; // 2 lights second color brightness extern f32 D_80178370; extern f32 D_80178374; extern f32 D_80178378; -extern s32 D_80178380[]; // player alphas -extern s32 D_80178390[]; // player reds -extern s32 D_801783A0[]; // player greens -extern s32 D_801783B0[]; // player alphas +extern s32 D_8017837C; +extern s32 D_80178380[4]; // player alphas +extern s32 D_80178390[4]; // player reds +extern s32 D_801783A0[4]; // player greens +extern s32 D_801783B0[4]; // player alphas +extern UNK_TYPE D_801783C0[4]; extern f32 D_801783D0; // something x translate extern f32 D_801783D4; // something y translate extern s32 gFogNear; //near extern s32 gFogFar; //far +// 0x30 extern s32 D_80178410; +extern f32 D_80178414; +extern f32 D_80178418; +// extern f32 D_80178420; extern f32 D_80178424; extern f32 D_80178428; extern f32 D_8017842C; extern f32 D_80178430; +// 0xC extern f32 D_80178440; extern f32 D_80178444; extern f32 D_80178448; +// +extern f32 D_80178450[3]; +// +extern f32 D_80178460[3]; +// +extern f32 D_80178470[3]; extern f32 D_8017847C; extern s32 D_80178480; +extern s32 D_80178484; extern s32 D_80178488; +// 0x8 +extern s32 D_80178494; +extern f32 D_80178498; +extern f32 D_8017849C; +extern f32 D_801784A0; extern s32 D_801784A4; +// extern s32 D_801784AC; +// 0x8 extern f32 D_801784B8; // effective Vec3f extern f32 D_801784BC; extern f32 D_801784C0; @@ -557,9 +697,12 @@ extern f32 D_80178500; extern s32 gLight2x; // Vec3i light direction alternate extern s32 gLight2y; extern s32 gLight2z; +extern f32 D_80178510; +// 0xC extern f32 D_80178520; // effective Vec3f extern f32 D_80178524; extern f32 D_80178528; +// 0xC extern f32 D_80178538; extern f32 D_8017853C; extern s32 D_80178540; @@ -570,6 +713,7 @@ extern s32 gLight1B; extern s32 gAmbientR; // Color32 ambient color extern s32 gAmbientG; extern s32 gAmbientB; +// extern s32 gLight2R; // Color32 light color 2 extern s32 gLight2G; extern s32 gLight2B; @@ -582,6 +726,7 @@ extern u8 D_80178580[]; extern void *D_80178710; //fox_radio + extern u16** D_80178720; extern s32 D_80178724; extern s32 D_80178728; @@ -591,6 +736,9 @@ extern f32 D_80178734; extern f32 D_80178738; extern f32 D_8017873C; extern f32 D_80178740; +extern s32 D_80178744; +extern s32 D_80178748; +extern s32 D_8017874C; // sf_versus extern s32 D_80178750; @@ -602,6 +750,7 @@ extern s32 D_80178768[]; extern SaveFile gSaveFile; // gfx_data +extern u16 D_Unk_800DACB8[][32]; extern u16 D_Tex_800D99F8[]; extern u16 D_Tex_800DBA20[]; extern Gfx D_Gfx_800DBAA0[]; @@ -636,8 +785,12 @@ extern f32 gDefaultPanVolume[]; extern Gfx* D_DF4260_8019A008[]; extern f32 D_DF4260_8019A9B8[]; +// ovl_E16C50 +extern f32 D_E16C50_801C4188; + // ovl_E51970 extern Matrix D_E51970_8019EE80; +extern s32 D_E51970_801A03DC; // ovl_E6A810 extern Gfx* D_E6A810_801B7584[]; @@ -647,7 +800,10 @@ extern f32 D_E6A810_801B83A8[]; extern s8 D_E6A810_801BA1E8; // ovl_E9F1D0 +extern f32 D_E9F1D0_801A7F58; extern f32 D_E9F1D0_801A7F60; +extern f32 D_E9F1D0_801A7F68; +extern f32 D_E9F1D0_801A7F70; extern f32 D_E9F1D0_801A7F78; // ovl_EBFBE0 @@ -658,14 +814,14 @@ extern s32 D_EBFBE0_801B827C; extern s32 D_EBFBE0_801B8288; // buffers -extern u64 D_80281000[SP_DRAM_STACK_SIZE64]; -extern u8 D_80281400[0xC00]; +extern u64 gDramStack[SP_DRAM_STACK_SIZE64]; +extern u8 gOSYieldData[OS_YIELD_DATA_SIZE]; extern FrameBuffer gZBuffer; // z buffer -extern u8 D_802A7800; -extern u8 D_802D7800; -extern u16 D_80387800; -extern u16 D_8038F080[]; -extern u16 D_8038F300[]; +extern u8 gTaskOutputBuffer[0x30000]; +extern u8 gTaskOutputBufferEnd; +extern u8 gAudioDataBuffer[0xB0000]; +extern u16 gTextureRenderBuffer[0x3C40]; +extern u16 gFillBuffer[3 * SCREEN_WIDTH]; extern FrameBuffer gFrameBuffers[3]; // 8038F800 // ast_873CB0 @@ -740,8 +896,10 @@ extern Gfx D_102A8A0[]; extern Gfx D_102ED50[]; extern Gfx D_102F5E0[]; extern Gfx D_102FE80[]; +extern u16 D_102FF08[]; extern Gfx D_1032780[]; + // ast_8A68C0, ast_8AE0A0 extern Gfx D_2000000[]; extern Gfx D_2000890[]; @@ -846,6 +1004,19 @@ extern f32 D_302EE00[]; extern f32 D_302EE64[]; extern f32 D_302EE80[]; extern f32 D_302EE9C[]; +extern AnimationHeader D_30163C4; +extern AnimationHeader D_301C3A8; +extern AnimationHeader D_301CFEC; +extern AnimationHeader D_301D888; +extern AnimationHeader D_301E19C; +extern Vec3f D_302E56C[]; +extern Vec3f D_302E65C[]; +extern Vec3f D_302E74C[]; +extern Vec3f D_302E830[]; +extern Vec3f D_302E95C[]; +extern Vec3f D_302EA4C[]; +extern Vec3f D_302EB3C[]; +extern Vec3f D_302EC20[]; // ast_918430, ast_922730 extern AnimationHeader D_4000080; @@ -893,6 +1064,18 @@ extern Gfx D_500B600[]; * ast_BB11D0, ast_BC23D0, ast_BFC510, ast_C48F40, ast_DDC010 */ +extern u16 D_6005710[]; +extern u16 D_600CBD8[]; +extern u16 D_600D990[]; +extern u16 D_6010198[]; +extern u16 D_601E1E8[]; +extern u16 D_6020F60[]; +extern u16 D_60229A4[]; +extern u16 D_6028A60[]; +extern u16 D_602ACC0[]; +extern u16 D_602C2CC[]; +extern u16 D_603158C[]; +extern u16 D_603EB38[]; extern u16 D_6000000[]; extern u16 D_6000900[]; extern Gfx D_6000A80[]; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 7cc456f4..f43dfb27 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -26,10 +26,6 @@ D_800C57EC = 0x800C57EC; D_800C7380 = 0x800C7380; D_800C5FF4 = 0x800C5FF4; //type:u16 size:5000 -gZBuffer = 0x80282000; -gFrameBuffers = 0x8038F800; -gDmaTable = 0x80178A70; //size:0x5A0 -D_80178A70 = 0x80178A78; //ignore:true D_80151650 = 0x80151650; //ignore:true D_801615D0 = 0x801615D0;//size:0xC @@ -55,12 +51,6 @@ D_800CBDD4 = 0x800CBDD4; //size:0x98 D_800D55D0 = 0x800D55D0; //type:f32 -// vec97_0 = 0x80161950; //type:Vec3f size:0xC -// vec97_1 = 0x8016195C; //type:Vec3f size:0xC -// __vtx0_ = 0x80161968; //type:Vec3f size:0xC -// __vtx1_ = 0x80161974; //type:Vec3f size:0xC -// __vtx2_ = 0x80161980; //type:Vec3f size:0xC -// __vtx3_ = 0x8016198C; //type:Vec3f size:0xC __dx1 = 0x80161950; __dx2 = 0x80161954; __dy1 = 0x80161958; @@ -86,11 +76,6 @@ Save_Checksum = 0x800C2FB0; Save_Write = 0x800C3084; Save_Read = 0x800C3194; -__rspboot_start = 0x80000450;//name_end:__rspboot_end -__aspmain_start = 0x80000520;//name_end:__aspmain_end -__f3dex_start = 0x80001410; -gF3dexData = 0x800C3DD0; - sEFFA40_Overlay = 0x800CBD3C; D_800CFA54 = 0x800CFA54; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 6de3cc34..cddfe0e7 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -1,7 +1,7 @@ -// fox_enmy1 +// fox_enmy Object_Kill = 0x80060FBC; -//fox_display +//fox_std_lib Graphics_ClearPrintBuffer = 0x80099980; Graphics_Printf = 0x800999D8; Texture_Scroll = 0x80099A2C; @@ -38,7 +38,7 @@ TextureRect_32bRGBA = 0x8009F2C0; Graphics_FillRectangle = 0x8009F574; Math_Vec3fFromAngles = 0x8009F6CC; Math_RadToDeg = 0x8009F768; -func_8009F7B4 = 0x8009F7B4; +Graphics_SetupTextureRender = 0x8009F7B4; Graphics_DisplayHUDNumber = 0x8009FC0C; Graphics_DisplaySmallNumber = 0x8009FEA0; Graphics_DisplayLargeText = 0x800A0094; @@ -143,7 +143,7 @@ Message_IsPrintingChar = 0x800C2F30; gDefaultSave = 0x800D4D10; gSaveFile = 0x80178870; //size:0x200 -// fox_enmy1 +// fox_enmy Object_80_Initialize = 0x80061364; Object_4C_Initialize = 0x80061394; Object_2F4_Initialize = 0x800613C4; @@ -353,6 +353,7 @@ D_80178294 = 0x80178294; D_80178298 = 0x80178298; D_8017829C = 0x8017829C; D_801782A4 = 0x801782A4; +gObjects58 = 0x801782A8; D_801782AC = 0x801782AC; D_801782B4 = 0x801782B4; D_801782B8 = 0x801782B8; diff --git a/linker_scripts/us/symbol_addrs_nlib_funcs.txt b/linker_scripts/us/symbol_addrs_nlib_funcs.txt index ee17e4c5..d946b34f 100644 --- a/linker_scripts/us/symbol_addrs_nlib_funcs.txt +++ b/linker_scripts/us/symbol_addrs_nlib_funcs.txt @@ -1,4 +1,4 @@ -// joybus +// sys_joybus Controller_AddDeadZone = 0x80002840; Controller_Init = 0x8000291C; Controller_UpdateInput = 0x800029A8; @@ -7,7 +7,7 @@ Save_ReadData = 0x80002BE8; Save_WriteData = 0x80002C50; Controller_Rumble = 0x80002CB8; -// lib +// sys_lib Lib_vsPrintf = 0x80002E80; Lib_vTable = 0x80002EA0; Lib_SwapBuffers = 0x80002EE4; @@ -17,7 +17,7 @@ Lib_Ortho = 0x800032B4; Lib_DmaRead = 0x800033E0; Lib_FillScreen = 0x800034E8; -// lights +// sys_lights Lights_AddLight = 0x800035D0; Lights_SetOneLight = 0x8000372C; Lights_SetTwoLights = 0x800038AC; diff --git a/linker_scripts/us/symbol_addrs_nlib_vars.txt b/linker_scripts/us/symbol_addrs_nlib_vars.txt index cbaedde7..7af251ea 100644 --- a/linker_scripts/us/symbol_addrs_nlib_vars.txt +++ b/linker_scripts/us/symbol_addrs_nlib_vars.txt @@ -1,4 +1,10 @@ -// joybus +// rsp +__rspboot_start = 0x80000450;//name_end:__rspboot_end +__aspmain_start = 0x80000520;//name_end:__aspmain_end +__f3dex_start = 0x80001410; +gF3dexData = 0x800C3DD0; + +// sys_joybus gCurrentInput = 0x800DD880; // size:0x18 gChangedInput = 0x800DD898; // size:0x18 gControllerStatus = 0x800DD8B0; // size:0x4 @@ -66,7 +72,7 @@ gMasterDisp = 0x80137E64; gUnkDisp2 = 0x80137E68; gLight = 0x80137E6C; gFrameBuffer = 0x80137E70; -D_80137E74 = 0x80137E74; +gTextureRender = 0x80137E74; D_80137E78 = 0x80137E78; gFrameCounter = 0x80137E7C; gStartNMI = 0x80137E80; @@ -118,4 +124,17 @@ sFloatExceptions = 0x800C48B8; // audio +// dma table +gDmaTable = 0x80178A70; //size:0x5A0 +D_80178A70 = 0x80178A78; //ignore:true + +// buffers +gDramStack = 0x80281000; //size:0x400 +gOSYieldData = 0x80281400; //size:0xC00 +gZBuffer = 0x80282000; //size:0x25800 +gTaskOutputBuffer = 0x802A7800; //size:0x30000 name_end:gTaskOutputBufferEnd +gAudioDataBuffer = 0x802D7800; //size:0xB0000 +gTextureRenderBuffer = 0x80387800; //size:0x7880 +gFillBuffer = 0x8038F080; //size:0x780 +gFrameBuffers = 0x8038F800; //size:0x70800 diff --git a/src/main/12490.c b/src/main/12490.c deleted file mode 100644 index c20afe36..00000000 --- a/src/main/12490.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "common.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011890.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011C58.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011D10.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011D4C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011DFC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011EB8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011F4C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80011FA8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012438.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_8001266C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_8001268C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800126AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800127B0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012854.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012864.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800128B4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012964.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012AC4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012C00.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012C40.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012C6C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012CEC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012E28.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012E5C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012E88.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012ED4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80012F24.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_8001301C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800132E8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013400.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800135A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013708.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_800137DC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013820.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013A18.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013A84.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013B6C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/12490/func_80013B90.s") diff --git a/src/main/14AA0.c b/src/main/14AA0.c deleted file mode 100644 index d4c8d5cd..00000000 --- a/src/main/14AA0.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "common.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80013EA0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80013FC4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800140D0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_8001410C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_8001415C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800141C8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80014244.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80014370.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80014440.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800144E4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800145BC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800145FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_8001463C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800146C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800146D4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80014704.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80014748.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800152C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80015330.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800153C4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800153E8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80015FD4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_8001678C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_80016804.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/14AA0/func_800168BC.s") diff --git a/src/main/17650.c b/src/main/17650.c deleted file mode 100644 index 4eb4e8e4..00000000 --- a/src/main/17650.c +++ /dev/null @@ -1,206 +0,0 @@ -#include "common.h" - -void func_80016A50(void) { -} - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80016A58.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80016BC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80016CDC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80016EE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80016FF0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017360.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017494.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017550.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017588.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017600.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80017760.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800177C8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800182F4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001831C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001839C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80018410.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80018470.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800184D4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800184EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800185A0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800185F8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80018E9C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80018EE0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80018FA4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80019068.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800190E4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80019158.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800191BC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80019218.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80019290.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_80019434.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800197AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_800198C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A01C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A290.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A38C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A4B8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A500.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A55C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A6C4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A838.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A988.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001A9EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AA90.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AAE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AB50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001ACDC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AD00.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AD44.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AE58.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AE78.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AED4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AF40.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AF50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001AF9C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001B014.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001B454.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001B774.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BA40.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BB74.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BC20.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BC48.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BD0C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001BFC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001C3EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001C8B8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CA24.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CB80.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CCDC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CE28.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CEFC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CF60.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001CFA8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D034.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D0B4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D10C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D15C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D1C8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D2FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D3A0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D400.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D410.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D444.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D4AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D520.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D638.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D6DC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D780.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D8A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D8F4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001D9E0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DA90.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DBD0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DC2C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DC6C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DCB4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DCE0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DD40.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DE1C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/func_8001DECC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/17650/D_800C8DD0.s") diff --git a/src/main/1EB50.c b/src/main/1EB50.c deleted file mode 100644 index c2d7abd6..00000000 --- a/src/main/1EB50.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "global.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001DF50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E444.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E720.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E778.s") - -void func_8001E7C8(void) { - D_800C7C50 = 0; - D_800C7C54 = 0; - osCreateMesgQueue(D_800C7C58, D_80156600, 1); - osCreateMesgQueue(D_800C7C5C, D_80156608, 4); - osCreateMesgQueue(D_800C7C60, D_80156618, 1); - osCreateMesgQueue(D_800C7C64, D_8015661C, 1); -} - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E850.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E8A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E8CC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E8F0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E920.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E998.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001E9AC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001ECAC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001ED14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001ED34.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001ED8C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001EE00.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/func_8001EE3C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/1EB50/D_800C90F0.s") diff --git a/src/main/8CC0.c b/src/main/8CC0.c deleted file mode 100644 index c3703aab..00000000 --- a/src/main/8CC0.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "common.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_800080C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80008364.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80008780.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009124.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009504.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000967C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_800097A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_800098DC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009984.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009A2C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009AAC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009B64.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_80009D78.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000A128.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000A25C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000A700.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000B3F0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000B480.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000B51C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/8CC0/func_8000B98C.s") diff --git a/src/main/C870.c b/src/main/C870.c deleted file mode 100644 index c8901c8c..00000000 --- a/src/main/C870.c +++ /dev/null @@ -1,67 +0,0 @@ -#include "common.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BC70.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BD38.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BE24.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BE94.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BF14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BF6C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BF94.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BFA8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BFD8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000BFE8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C044.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C0C0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C13C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C1F8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C2B4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C990.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000C9E8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000CAF4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000CEC8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000D08C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000D104.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000D4A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DB0C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DB64.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DBE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DC34.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DC84.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DCD4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DD68.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000DFFC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000E1C4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000E208.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/C870/func_8000E290.s") diff --git a/src/main/F0A0.c b/src/main/F0A0.c deleted file mode 100644 index e9a87a85..00000000 --- a/src/main/F0A0.c +++ /dev/null @@ -1,97 +0,0 @@ -#include "global.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000E4A0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000E5A8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000E8E0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000EBB4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000EC14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000ECC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000ED28.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000EE14.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000EEE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000EF48.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F010.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F078.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F158.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F200.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F220.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F354.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F388.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F478.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F554.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F790.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F7CC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F820.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000F864.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FA28.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FB50.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FBA8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FC7C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FC8C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FCA0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FCC0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FF9C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8000FFCC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_800105EC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8001079C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010808.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010870.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_800109FC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010A80.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010AD8.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010BF0.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010C60.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010EFC.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010F8C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80010FE4.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80011120.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_8001154C.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80011710.s") - -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/F0A0/func_80011758.s") diff --git a/src/main/fox_edisplay.c b/src/main/fox_edisplay.c index cdbeab9b..a4c7358b 100644 --- a/src/main/fox_edisplay.c +++ b/src/main/fox_edisplay.c @@ -1543,7 +1543,7 @@ void func_8005FB70(s32 arg0) { if (D_80177AB0 == 5) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - for (i = 0, var_s0 = D_801782A8; i < 200; i++, var_s0++) { + for (i = 0, var_s0 = gObjects58; i < 200; i++, var_s0++) { if ((var_s0->obj.status == 2) && (var_s0->obj.id != OBJECT_147)) { if (gCurrentLevel == LEVEL_BOLSE) { spAC.x = var_s0->unk_48.x; diff --git a/src/main/fox_enmy1.c b/src/main/fox_enmy.c similarity index 99% rename from src/main/fox_enmy1.c rename to src/main/fox_enmy.c index 2074e50a..78b63048 100644 --- a/src/main/fox_enmy1.c +++ b/src/main/fox_enmy.c @@ -10,8 +10,32 @@ ObjectInit* D_800CFDA0[] = { 0x0600EAD4, NULL, 0x06011044, 0x0600FF74, 0x06006EB4, 0x06014D94, 0x0302DE3C, }; s32 D_800CFDF4[] = { - 0, 0x144, 0x144, 0x144, 0x144, 0x147, 0x147, 0x147, 0x147, 0x142, 0x142, 0x142, 0x142, - 0x14F, 0x150, 0x150, 0x150, 0x150, 0x150, 0x142, 0x147, 0x144, 0x144, 0x151, 0, 0x145, + OBJECT_0, + OBJECT_6C_SILVER_RING, + OBJECT_6C_SILVER_RING, + OBJECT_6C_SILVER_RING, + OBJECT_6C_SILVER_RING, + OBJECT_6C_BOMB, + OBJECT_6C_BOMB, + OBJECT_6C_BOMB, + OBJECT_6C_BOMB, + OBJECT_6C_LASERS, + OBJECT_6C_LASERS, + OBJECT_6C_LASERS, + OBJECT_6C_LASERS, + OBJECT_6C_1UP, + OBJECT_6C_GOLD_RING, + OBJECT_6C_GOLD_RING, + OBJECT_6C_GOLD_RING, + OBJECT_6C_GOLD_RING, + OBJECT_6C_GOLD_RING, + OBJECT_6C_LASERS, + OBJECT_6C_BOMB, + OBJECT_6C_SILVER_RING, + OBJECT_6C_SILVER_RING, + OBJECT_6C_WING_REPAIR, + OBJECT_0, + OBJECT_325, }; f32 D_800CFE5C[] = { 0.0f, 1.0f, 0.5f, 0.33f, 0.25f, 1.0f, 0.5f, 0.33f, 0.25f, 1.0f, 0.5f, 0.33f, 0.25f, @@ -775,7 +799,7 @@ s32 func_8006351C(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { s32 i; if ((D_80177880 == 1) && (gCurrentLevel != LEVEL_KATINA)) { - var_s0 = D_801782A8; + var_s0 = gObjects58; for (i = 0; i < 200; i++, var_s0++) { if (var_s0->obj.status == 2) { if ((var_s0->obj.id == OBJECT_1) || (var_s0->obj.id == OBJECT_3) || (var_s0->obj.id == OBJECT_117) || @@ -892,13 +916,13 @@ s32 func_8006351C(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { var_s0_5->unk_0D8.x = arg1->x; var_s0_5->unk_0D8.y = arg1->y; var_s0_5->unk_0D8.z = arg1->z; - return true; + return 1; } } } } } - return false; + return 0; } void func_80063CAC(Object_80* arg0) { @@ -1584,7 +1608,7 @@ void func_800656D4(Object_2F4* arg0) { } } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_enmy1/func_800656D4.s") +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_enmy/func_800656D4.s") #endif void func_800660F0(Object_2F4* arg0) { @@ -2137,7 +2161,7 @@ void func_80068020(Object_6C* arg0) { func_800671D0(arg0); if (arg0->unk_4C != 0) { arg0->unk_46 = 1; - arg0->unk_48 = 0x32; + arg0->unk_48 = 50; if (arg0->obj.id == OBJECT_6C_SILVER_RING) { gPlayer[arg0->unk_4E].heal += 0x20; func_80060F30(gPlayer[arg0->unk_4E].unk_460_arr, 0x4900200E, arg0->unk_4E); @@ -2853,7 +2877,7 @@ void func_8006A3E8(void) { } } } else if (D_801778E8 != 0) { - for (i = 0, var_v0 = D_801782A8; i < 200; i++, var_v0++) { + for (i = 0, var_v0 = gObjects58; i < 200; i++, var_v0++) { if ((var_v0->obj.status != 0) && (var_v0->obj.id == OBJECT_146)) { if (i & 1) { var_v0->obj.rot.y += 0.5f; @@ -2900,5 +2924,3 @@ void func_8006A3E8(void) { } } } - -// #pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_enmy1/D_800D63D0.s") diff --git a/src/main/fox_display.c b/src/main/fox_std_lib.c similarity index 99% rename from src/main/fox_display.c rename to src/main/fox_std_lib.c index f0357d94..d9118d7c 100644 --- a/src/main/fox_display.c +++ b/src/main/fox_std_lib.c @@ -721,14 +721,14 @@ f32 Math_RadToDeg(f32 rAngle) { return rAngle; } -u16* func_8009F7B4(Gfx** gfxPtr, u8 width, u8 height) { - u16* spB4; +u16* Graphics_SetupTextureRender(Gfx** gfxPtr, u8 width, u8 height) { + u16* texture; u16 norm; width += 0xF; width &= 0x70; - spB4 = D_80137E74; - D_80137E74 = D_80137E74 + width * height; + texture = gTextureRender; + gTextureRender = gTextureRender + width * height; gDPPipeSync((*gfxPtr)++); gDPSetCycleType((*gfxPtr)++, G_CYC_FILL); gDPSetRenderMode((*gfxPtr)++, G_RM_NOOP, G_RM_NOOP2); @@ -748,7 +748,7 @@ u16* func_8009F7B4(Gfx** gfxPtr, u8 width, u8 height) { gDPFillRectangle((*gfxPtr)++, 0, 0, width - 1, height - 1); gDPPipeSync((*gfxPtr)++); gDPSetDepthSource((*gfxPtr)++, G_ZS_PIXEL); - gDPSetColorImage((*gfxPtr)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, spB4); + gDPSetColorImage((*gfxPtr)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, texture); gDPSetColorDither((*gfxPtr)++, G_CD_DISABLE); gDPSetFillColor((*gfxPtr)++, 0); gDPSetFillColor((*gfxPtr)++, FILL_COLOR(gBgColor | 1)); @@ -761,7 +761,7 @@ u16* func_8009F7B4(Gfx** gfxPtr, u8 width, u8 height) { gSPMatrix((*gfxPtr)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); Matrix_Copy(gGfxMatrix, &gIdentityMatrix); - return spB4; + return texture; } void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number) { @@ -1214,5 +1214,5 @@ void func_800A1540(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { // } #else void func_800A1558(f32 weight, u16 size, void* src1, void* src2, void* dst); -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_display/func_800A1558.s") +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_std_lib/func_800A1558.s") #endif diff --git a/src/main/sf_2EFE0.c b/src/main/sf_2EFE0.c index a4065a8c..7e0c1ed0 100644 --- a/src/main/sf_2EFE0.c +++ b/src/main/sf_2EFE0.c @@ -1,12 +1,5 @@ #include "global.h" -extern s32 D_8015F904; -extern s32 D_80177CD0[4]; -extern s32 D_8017829C; -extern s32 D_800C9B4C; -extern s16 D_8016F5BE; -extern s16 D_8016F9F0; - void func_80187520(s32, void*); void func_8002E3E0(Object_2F4* arg0) { diff --git a/src/main/sf_A4B50.c b/src/main/sf_A4B50.c index 5a3aaea0..74e74918 100644 --- a/src/main/sf_A4B50.c +++ b/src/main/sf_A4B50.c @@ -1,6 +1,11 @@ #include "global.h" -extern f32 D_800D2F64; +extern UNK_TYPE D_800D2F50; // type unclear. unused? +extern s32 D_800D2F54; // only gets set to 0. unused? +extern f32 D_800D2F58; +extern f32 D_800D2F5C[3]; // holds float versions of gVolumeSettings. Unused? +extern u8 D_800D2F68; +extern u8 D_800D2F6C[20]; extern Vec3f D_800D2F80; extern Vec3f D_800D2F8C; extern EnvSettings* D_800D2F98[21]; @@ -9,6 +14,16 @@ extern s32 D_800D3000[4][4]; extern Vec3f D_800D3040[6]; extern Vec3f D_800D3088[4]; extern Vec3f D_800D30B8[4]; +extern Vec3f D_800D30E8; +extern f32 D_800D30F4[4]; +extern f32 D_800D3104[4]; +extern f32 D_800D3114[4]; +extern f32 D_800D3124[12]; +extern f32 D_800D3154[4]; +extern s32 D_800D3164[4]; +extern u8 D_800D317C; +extern u8 D_800D3180[30]; +extern s32 D_800D31A0[4]; s32 Play_CheckMedalStatus(u16 arg0) { if ((D_801778B0[2] > 0) && (D_801778B0[3] > 0) && (D_801778B0[1] > 0) && (gHitCount >= arg0)) { @@ -18,7 +33,7 @@ s32 Play_CheckMedalStatus(u16 arg0) { } void func_800A3FB0(void) { - D_800D2F64 = 0.0f; + D_800D2F5C[2] = 0.0f; } s32 Play_GetMaxHealth(void) { @@ -262,13 +277,13 @@ void func_800A4F7C(void) { break; } if (D_80178310[j].id == OBJECT_147) { - func_800A4F4C(&D_801782A8[i]); - D_801782A8[i].obj.status = 2; - D_801782A8[i].obj.id = D_80178310[j].id; - D_801782A8[i].obj.pos.x = D_80178310[j].xPos; - D_801782A8[i].obj.pos.z = D_80178310[j].zPos1; - D_801782A8[i].obj.pos.y = D_80178310[j].yPos; - func_800612B8(&D_801782A8[i].unk_1C, D_801782A8[i].obj.id); + func_800A4F4C(&gObjects58[i]); + gObjects58[i].obj.status = 2; + gObjects58[i].obj.id = D_80178310[j].id; + gObjects58[i].obj.pos.x = D_80178310[j].xPos; + gObjects58[i].obj.pos.z = D_80178310[j].zPos1; + gObjects58[i].obj.pos.y = D_80178310[j].yPos; + func_800612B8(&gObjects58[i].unk_1C, gObjects58[i].obj.id); i++; } } @@ -277,14 +292,14 @@ void func_800A4F7C(void) { break; } if (D_80178310[j].id != OBJECT_147) { - func_800A4F4C(&D_801782A8[i]); - D_801782A8[i].obj.status = 2; - D_801782A8[i].obj.id = D_80178310[j].id; - D_801782A8[i].obj.pos.x = D_80178310[j].xPos; - D_801782A8[i].obj.pos.z = D_80178310[j].zPos1; - D_801782A8[i].obj.pos.y = D_80178310[j].yPos; - D_801782A8[i].obj.rot.y = D_80178310[j].unk_C; - func_800612B8(&D_801782A8[i].unk_1C, D_801782A8[i].obj.id); + func_800A4F4C(&gObjects58[i]); + gObjects58[i].obj.status = 2; + gObjects58[i].obj.id = D_80178310[j].id; + gObjects58[i].obj.pos.x = D_80178310[j].xPos; + gObjects58[i].obj.pos.z = D_80178310[j].zPos1; + gObjects58[i].obj.pos.y = D_80178310[j].yPos; + gObjects58[i].obj.rot.y = D_80178310[j].unk_C; + func_800612B8(&gObjects58[i].unk_1C, gObjects58[i].obj.id); i++; } } @@ -301,7 +316,7 @@ void func_800A5338(void) { D_80178310 = SEGMENTED_TO_VIRTUAL(D_603B074); - for (j = 0, var_s0 = D_801782A8; j < 200; j++) { + for (j = 0, var_s0 = gObjects58; j < 200; j++) { if (D_80178310[j].id <= OBJECT_INVALID) { break; } @@ -353,7 +368,7 @@ void func_800A55B0(void) { D_80178310 = SEGMENTED_TO_VIRTUAL(D_6030B14); - for (j = 0, var_s0 = D_801782A8; j < 200; j++) { + for (j = 0, var_s0 = gObjects58; j < 200; j++) { if (D_80178310[j].id <= OBJECT_INVALID) { break; } diff --git a/src/main/sf_hud.c b/src/main/sf_hud.c index af746b39..ce4ac222 100644 --- a/src/main/sf_hud.c +++ b/src/main/sf_hud.c @@ -428,7 +428,7 @@ void func_8008865C(void) { s32 func_800886B8(void) { s32 var_v1 = 0; - f32 var_fv1 = D_8017797C->unk_3; // related to the vertical height of the arwing + f32 var_fv1 = D_8017797C->stick_y; // related to the vertical height of the arwing if ((var_fv1 != 0.0f) && (D_80161810[4] != 0)) { return 0; diff --git a/src/main/1FA60.c b/src/main/sys_1FA60.c similarity index 100% rename from src/main/1FA60.c rename to src/main/sys_1FA60.c diff --git a/src/main/sys_audio_12490.c b/src/main/sys_audio_12490.c new file mode 100644 index 00000000..ad034ed6 --- /dev/null +++ b/src/main/sys_audio_12490.c @@ -0,0 +1,77 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011890.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011C58.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011D10.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011D4C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011DFC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011EB8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011F4C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80011FA8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012438.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_8001266C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_8001268C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800126AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800127B0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012854.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012864.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800128B4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012964.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012AC4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012C00.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012C40.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012C6C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012CEC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012E28.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012E5C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012E88.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012ED4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80012F24.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_8001301C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800132E8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013400.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800135A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013708.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_800137DC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013820.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013A18.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013A84.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013B6C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_12490/func_80013B90.s") diff --git a/src/main/sys_audio_14AA0.c b/src/main/sys_audio_14AA0.c new file mode 100644 index 00000000..9379dddc --- /dev/null +++ b/src/main/sys_audio_14AA0.c @@ -0,0 +1,51 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80013EA0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80013FC4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800140D0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_8001410C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_8001415C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800141C8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80014244.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80014370.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80014440.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800144E4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800145BC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800145FC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_8001463C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800146C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800146D4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80014704.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80014748.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800152C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80015330.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800153C4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800153E8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80015FD4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_8001678C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_80016804.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_14AA0/func_800168BC.s") diff --git a/src/main/sys_audio_17650.c b/src/main/sys_audio_17650.c new file mode 100644 index 00000000..b3c54a28 --- /dev/null +++ b/src/main/sys_audio_17650.c @@ -0,0 +1,206 @@ +#include "common.h" + +void func_80016A50(void) { +} + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80016A58.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80016BC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80016CDC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80016EE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80016FF0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017360.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017494.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017550.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017588.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017600.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80017760.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800177C8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800182F4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001831C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001839C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80018410.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80018470.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800184D4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800184EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800185A0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800185F8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80018E9C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80018EE0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80018FA4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80019068.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800190E4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80019158.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800191BC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80019218.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80019290.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_80019434.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800197AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_800198C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A01C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A290.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A38C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A4B8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A500.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A55C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A6C4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A838.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A988.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001A9EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AA90.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AAE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AB50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001ACDC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AD00.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AD44.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AE58.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AE78.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AED4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AF40.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AF50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001AF9C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001B014.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001B454.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001B774.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BA40.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BB74.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BC20.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BC48.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BD0C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001BFC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001C3EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001C8B8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CA24.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CB80.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CCDC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CE28.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CEFC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CF60.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001CFA8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D034.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D0B4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D10C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D15C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D1C8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D2FC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D3A0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D400.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D410.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D444.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D4AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D520.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D638.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D6DC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D780.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D8A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D8F4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001D9E0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DA90.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DBD0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DC2C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DC6C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DCB4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DCE0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DD40.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DE1C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/func_8001DECC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_17650/D_800C8DD0.s") diff --git a/src/main/sys_audio_1EB50.c b/src/main/sys_audio_1EB50.c new file mode 100644 index 00000000..11b82bc6 --- /dev/null +++ b/src/main/sys_audio_1EB50.c @@ -0,0 +1,46 @@ +#include "global.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001DF50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E444.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E720.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E778.s") + +void func_8001E7C8(void) { + D_800C7C50 = 0; + D_800C7C54 = 0; + osCreateMesgQueue(D_800C7C58, D_80156600, 1); + osCreateMesgQueue(D_800C7C5C, D_80156608, 4); + osCreateMesgQueue(D_800C7C60, D_80156618, 1); + osCreateMesgQueue(D_800C7C64, D_8015661C, 1); +} + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E850.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E8A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E8CC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E8F0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E920.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E998.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001E9AC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001ECAC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001ED14.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001ED34.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001ED8C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001EE00.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/func_8001EE3C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_1EB50/D_800C90F0.s") diff --git a/src/main/sys_audio_8CC0.c b/src/main/sys_audio_8CC0.c new file mode 100644 index 00000000..e8b6c7a3 --- /dev/null +++ b/src/main/sys_audio_8CC0.c @@ -0,0 +1,41 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_800080C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80008364.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80008780.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009124.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009504.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000967C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_800097A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_800098DC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009984.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009A2C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009AAC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009B64.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_80009D78.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000A128.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000A25C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000A700.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000B3F0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000B480.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000B51C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_8CC0/func_8000B98C.s") diff --git a/src/main/sys_audio_C870.c b/src/main/sys_audio_C870.c new file mode 100644 index 00000000..de420dad --- /dev/null +++ b/src/main/sys_audio_C870.c @@ -0,0 +1,67 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BC70.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BD38.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BE24.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BE94.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BF14.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BF6C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BF94.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BFA8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BFD8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000BFE8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C044.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C0C0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C13C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C1F8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C2B4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C990.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000C9E8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000CAF4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000CEC8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000D08C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000D104.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000D4A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DB0C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DB64.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DBE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DC34.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DC84.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DCD4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DD68.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000DFFC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000E1C4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000E208.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_C870/func_8000E290.s") diff --git a/src/main/sys_audio_F0A0.c b/src/main/sys_audio_F0A0.c new file mode 100644 index 00000000..f807c5a9 --- /dev/null +++ b/src/main/sys_audio_F0A0.c @@ -0,0 +1,97 @@ +#include "global.h" + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000E4A0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000E5A8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000E8E0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000EBB4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000EC14.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000ECC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000ED28.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000EE14.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000EEE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000EF48.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F010.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F078.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F158.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F200.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F220.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F354.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F388.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F478.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F554.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F790.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F7CC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F820.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000F864.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FA28.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FB50.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FBA8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FC7C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FC8C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FCA0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FCC0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FF9C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000FFCC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_800105EC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8001079C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010808.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010870.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_800109FC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010A80.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010AD8.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010BF0.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010C60.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010EFC.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010F8C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80010FE4.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80011120.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8001154C.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80011710.s") + +#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_80011758.s") diff --git a/src/main/fault.c b/src/main/sys_fault.c similarity index 100% rename from src/main/fault.c rename to src/main/sys_fault.c diff --git a/src/main/joybus.c b/src/main/sys_joybus.c similarity index 100% rename from src/main/joybus.c rename to src/main/sys_joybus.c diff --git a/src/main/lib.c b/src/main/sys_lib.c similarity index 97% rename from src/main/lib.c rename to src/main/sys_lib.c index a07fecbc..5e89f103 100644 --- a/src/main/lib.c +++ b/src/main/sys_lib.c @@ -128,10 +128,10 @@ void Lib_FillScreen(u8 setFill) { osViBlack(1); } else { for (i = 0; i < 3 * SCREEN_WIDTH; i++) { - D_8038F080[i] = gFillScreenColor; + gFillBuffer[i] = gFillScreenColor; } osWritebackDCacheAll(); - osViSwapBuffer(&D_8038F300); + osViSwapBuffer(&gFillBuffer[SCREEN_WIDTH]); osViRepeatLine(1); } gFillScreen = true; diff --git a/src/main/lights.c b/src/main/sys_lights.c similarity index 100% rename from src/main/lights.c rename to src/main/sys_lights.c diff --git a/src/main/main.c b/src/main/sys_main.c similarity index 98% rename from src/main/main.c rename to src/main/sys_main.c index 7febe472..98add3df 100644 --- a/src/main/main.c +++ b/src/main/sys_main.c @@ -51,7 +51,7 @@ Gfx* gMasterDisp; Gfx* gUnkDisp2; Lightsn* gLight; FrameBuffer* gFrameBuffer; -u16* D_80137E74; +u16* gTextureRender; u8 D_80137E78; u32 gFrameCounter; @@ -132,7 +132,7 @@ extern Gfx* gMasterDisp; extern Gfx* gUnkDisp2; extern Lightsn* gLight; extern FrameBuffer* gFrameBuffer; -extern u16* D_80137E74; +extern u16* gTextureRender; extern u8 D_80137E78; extern u32 gFrameCounter; @@ -213,13 +213,13 @@ void Graphics_SetTask(void) { gGfxTask->task.t.ucode_size = SP_UCODE_SIZE; gGfxTask->task.t.ucode_data = (u64*) &gF3dexData; gGfxTask->task.t.ucode_data_size = SP_UCODE_DATA_SIZE; - gGfxTask->task.t.dram_stack = D_80281000; + gGfxTask->task.t.dram_stack = gDramStack; gGfxTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8; - gGfxTask->task.t.output_buff = (u64*) &D_802A7800; - gGfxTask->task.t.output_buff_size = (u64*) &D_802D7800; + gGfxTask->task.t.output_buff = (u64*) gTaskOutputBuffer; + gGfxTask->task.t.output_buff_size = (u64*) gAudioDataBuffer; gGfxTask->task.t.data_ptr = (u64*) gGfxPool->masterDL; gGfxTask->task.t.data_size = (gMasterDisp - gGfxPool->masterDL) * sizeof(Gfx); - gGfxTask->task.t.yield_data_ptr = (u64*) &D_80281400; + gGfxTask->task.t.yield_data_ptr = (u64*) &gOSYieldData; gGfxTask->task.t.yield_data_size = OS_YIELD_DATA_SIZE; osWritebackDCacheAll(); osSendMesg(&gTaskMsgQueue, gGfxTask, OS_MESG_PRI_NORMAL); @@ -237,7 +237,7 @@ void Graphics_InitializeTask(u32 frameCount) { gLight = gGfxPool->lights; gFrameBuffer = &gFrameBuffers[frameCount % 3]; - D_80137E74 = &D_80387800; + gTextureRender = &gTextureRenderBuffer[0]; gGfxMatrix = &sGfxMatrixStack[0]; gCalcMatrix = &sCalcMatrixStack[0]; diff --git a/src/main/math.c b/src/main/sys_math.c similarity index 100% rename from src/main/math.c rename to src/main/sys_math.c diff --git a/src/main/math64.c b/src/main/sys_math64.c similarity index 100% rename from src/main/math64.c rename to src/main/sys_math64.c diff --git a/src/main/matrix.c b/src/main/sys_matrix.c similarity index 56% rename from src/main/matrix.c rename to src/main/sys_matrix.c index 75d07e60..9d255a47 100644 --- a/src/main/matrix.c +++ b/src/main/sys_matrix.c @@ -1,10 +1,18 @@ #include "global.h" Mtx gIdentityMtx = { { - { 0x00010000, 0, 1, 0 }, - { 0, 0x00010000, 0, 1 }, - { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, + { + { 1, 0, 0, 0 }, + { 0, 1, 0, 0 }, + { 0, 0, 1, 0 }, + { 0, 0, 0, 1 }, + }, + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + }, } }; Matrix gIdentityMatrix = { { @@ -21,22 +29,14 @@ Matrix sCalcMatrixStack[0x20]; // Copies src Matrix into dst void Matrix_Copy(Matrix* dst, Matrix* src) { - dst->m[0][0] = src->m[0][0]; - dst->m[0][1] = src->m[0][1]; - dst->m[0][2] = src->m[0][2]; - dst->m[0][3] = src->m[0][3]; - dst->m[1][0] = src->m[1][0]; - dst->m[1][1] = src->m[1][1]; - dst->m[1][2] = src->m[1][2]; - dst->m[1][3] = src->m[1][3]; - dst->m[2][0] = src->m[2][0]; - dst->m[2][1] = src->m[2][1]; - dst->m[2][2] = src->m[2][2]; - dst->m[2][3] = src->m[2][3]; - dst->m[3][0] = src->m[3][0]; - dst->m[3][1] = src->m[3][1]; - dst->m[3][2] = src->m[3][2]; - dst->m[3][3] = src->m[3][3]; + s32 i; + + for (i = 0; i < 4; i++) { + dst->m[i][0] = src->m[i][0]; + dst->m[i][1] = src->m[i][1]; + dst->m[i][2] = src->m[i][2]; + dst->m[i][3] = src->m[i][3]; + } } // Makes a copy of the stack's current matrix and puts it on the top of the stack @@ -50,11 +50,16 @@ void Matrix_Pop(Matrix** mtxStack) { *mtxStack -= 1; } +// Copies tf into mtx (MTXMODE_NEW) or applies it to mtx (MTXMODE_APPLY) void Matrix_Mult(Matrix* mtx, Matrix* tf, u8 mode) { f32 rx; f32 ry; f32 rz; f32 rw; + s32 i0; + s32 i1; + s32 i2; + s32 i3; if (mode == 1) { rx = mtx->m[0][0]; @@ -62,69 +67,54 @@ void Matrix_Mult(Matrix* mtx, Matrix* tf, u8 mode) { rz = mtx->m[2][0]; rw = mtx->m[3][0]; - mtx->m[0][0] = (rx * tf->m[0][0]) + (ry * tf->m[0][1]) + (rz * tf->m[0][2]) + (rw * tf->m[0][3]); - mtx->m[1][0] = (rx * tf->m[1][0]) + (ry * tf->m[1][1]) + (rz * tf->m[1][2]) + (rw * tf->m[1][3]); - mtx->m[2][0] = (rx * tf->m[2][0]) + (ry * tf->m[2][1]) + (rz * tf->m[2][2]) + (rw * tf->m[2][3]); - mtx->m[3][0] = (rx * tf->m[3][0]) + (ry * tf->m[3][1]) + (rz * tf->m[3][2]) + (rw * tf->m[3][3]); + for (i0 = 0; i0 < 4; i0++) { + mtx->m[i0][0] = (rx * tf->m[i0][0]) + (ry * tf->m[i0][1]) + (rz * tf->m[i0][2]) + (rw * tf->m[i0][3]); + } rx = mtx->m[0][1]; ry = mtx->m[1][1]; rz = mtx->m[2][1]; rw = mtx->m[3][1]; - mtx->m[0][1] = (rx * tf->m[0][0]) + (ry * tf->m[0][1]) + (rz * tf->m[0][2]) + (rw * tf->m[0][3]); - mtx->m[1][1] = (rx * tf->m[1][0]) + (ry * tf->m[1][1]) + (rz * tf->m[1][2]) + (rw * tf->m[1][3]); - mtx->m[2][1] = (rx * tf->m[2][0]) + (ry * tf->m[2][1]) + (rz * tf->m[2][2]) + (rw * tf->m[2][3]); - mtx->m[3][1] = (rx * tf->m[3][0]) + (ry * tf->m[3][1]) + (rz * tf->m[3][2]) + (rw * tf->m[3][3]); + for (i1 = 0; i1 < 4; i1++) { + mtx->m[i1][1] = (rx * tf->m[i1][0]) + (ry * tf->m[i1][1]) + (rz * tf->m[i1][2]) + (rw * tf->m[i1][3]); + } rx = mtx->m[0][2]; ry = mtx->m[1][2]; rz = mtx->m[2][2]; rw = mtx->m[3][2]; - mtx->m[0][2] = (rx * tf->m[0][0]) + (ry * tf->m[0][1]) + (rz * tf->m[0][2]) + (rw * tf->m[0][3]); - mtx->m[1][2] = (rx * tf->m[1][0]) + (ry * tf->m[1][1]) + (rz * tf->m[1][2]) + (rw * tf->m[1][3]); - mtx->m[2][2] = (rx * tf->m[2][0]) + (ry * tf->m[2][1]) + (rz * tf->m[2][2]) + (rw * tf->m[2][3]); - mtx->m[3][2] = (rx * tf->m[3][0]) + (ry * tf->m[3][1]) + (rz * tf->m[3][2]) + (rw * tf->m[3][3]); + for (i2 = 0; i2 < 4; i2++) { + mtx->m[i2][2] = (rx * tf->m[i2][0]) + (ry * tf->m[i2][1]) + (rz * tf->m[i2][2]) + (rw * tf->m[i2][3]); + } rx = mtx->m[0][3]; ry = mtx->m[1][3]; rz = mtx->m[2][3]; rw = mtx->m[3][3]; - mtx->m[0][3] = (rx * tf->m[0][0]) + (ry * tf->m[0][1]) + (rz * tf->m[0][2]) + (rw * tf->m[0][3]); - mtx->m[1][3] = (rx * tf->m[1][0]) + (ry * tf->m[1][1]) + (rz * tf->m[1][2]) + (rw * tf->m[1][3]); - mtx->m[2][3] = (rx * tf->m[2][0]) + (ry * tf->m[2][1]) + (rz * tf->m[2][2]) + (rw * tf->m[2][3]); - mtx->m[3][3] = (rx * tf->m[3][0]) + (ry * tf->m[3][1]) + (rz * tf->m[3][2]) + (rw * tf->m[3][3]); + for (i3 = 0; i3 < 4; i3++) { + mtx->m[i3][3] = (rx * tf->m[i3][0]) + (ry * tf->m[i3][1]) + (rz * tf->m[i3][2]) + (rw * tf->m[i3][3]); + } } else { Matrix_Copy(mtx, tf); } } +// Creates a translation matrix in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) void Matrix_Translate(Matrix* mtx, f32 x, f32 y, f32 z, u8 mode) { f32 rx; f32 ry; + s32 i; if (mode == 1) { - rx = mtx->m[0][0]; - ry = mtx->m[1][0]; + for (i = 0; i < 4; i++) { + rx = mtx->m[0][i]; + ry = mtx->m[1][i]; - mtx->m[3][0] += (rx * x) + (ry * y) + (mtx->m[2][0] * z); - - rx = mtx->m[0][1]; - ry = mtx->m[1][1]; - - mtx->m[3][1] += (rx * x) + (ry * y) + (mtx->m[2][1] * z); - - rx = mtx->m[0][2]; - ry = mtx->m[1][2]; - - mtx->m[3][2] += (rx * x) + (ry * y) + (mtx->m[2][2] * z); - - rx = mtx->m[0][3]; - ry = mtx->m[1][3]; - - mtx->m[3][3] += (rx * x) + (ry * y) + (mtx->m[2][3] * z); + mtx->m[3][i] += (rx * x) + (ry * y) + (mtx->m[2][i] * z); + } } else { mtx->m[3][0] = x; mtx->m[3][1] = y; @@ -135,22 +125,21 @@ void Matrix_Translate(Matrix* mtx, f32 x, f32 y, f32 z, u8 mode) { } } -// Matrix_Scale -#ifdef NON_MATCHING +// Creates a scale matrix in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode) { + f32 rx; + f32 ry; + s32 i; + if (mode == 1) { - mtx->m[0][0] *= xScale; - mtx->m[1][0] *= yScale; - mtx->m[2][0] *= zScale; - mtx->m[0][1] *= xScale; - mtx->m[1][1] *= yScale; - mtx->m[2][1] *= zScale; - mtx->m[0][2] *= xScale; - mtx->m[1][2] *= yScale; - mtx->m[2][2] *= zScale; - mtx->m[0][3] *= xScale; - mtx->m[1][3] *= yScale; - mtx->m[2][3] *= zScale; + for (i = 0; i < 4; i++) { + rx = mtx->m[0][i]; + ry = mtx->m[1][i]; + + mtx->m[0][i] = rx * xScale; + mtx->m[1][i] = ry * yScale; + mtx->m[2][i] *= zScale; + } } else { mtx->m[0][0] = xScale; mtx->m[1][1] = yScale; @@ -160,40 +149,25 @@ void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode) { mtx->m[3][3] = 1.0f; } } -#else -// https://decomp.me/scratch/v4KEJ 91% -void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode); -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/matrix/Matrix_Scale.s") -#endif +// Creates rotation matrix about the X axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) void Matrix_RotateX(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; f32 ry; f32 rz; + s32 i; sn = __sinf(angle); cs = __cosf(angle); if (mode == 1) { - ry = mtx->m[1][0]; - rz = mtx->m[2][0]; - mtx->m[1][0] = (ry * cs) + (rz * sn); - mtx->m[2][0] = (rz * cs) - (ry * sn); + for (i = 0; i < 4; i++) { + ry = mtx->m[1][i]; + rz = mtx->m[2][i]; - ry = mtx->m[1][1]; - rz = mtx->m[2][1]; - mtx->m[1][1] = (ry * cs) + (rz * sn); - mtx->m[2][1] = (rz * cs) - (ry * sn); - - ry = mtx->m[1][2]; - rz = mtx->m[2][2]; - mtx->m[1][2] = (ry * cs) + (rz * sn); - mtx->m[2][2] = (rz * cs) - (ry * sn); - - ry = mtx->m[1][3]; - rz = mtx->m[2][3]; - mtx->m[1][3] = (ry * cs) + (rz * sn); - mtx->m[2][3] = (rz * cs) - (ry * sn); + mtx->m[1][i] = (ry * cs) + (rz * sn); + mtx->m[2][i] = (rz * cs) - (ry * sn); + } } else { mtx->m[1][1] = mtx->m[2][2] = cs; mtx->m[1][2] = sn; @@ -204,34 +178,24 @@ void Matrix_RotateX(Matrix* mtx, f32 angle, u8 mode) { } } +// Creates rotation matrix about the Y axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) void Matrix_RotateY(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; f32 rx; f32 rz; + s32 i; sn = __sinf(angle); cs = __cosf(angle); if (mode == 1) { - rx = mtx->m[0][0]; - rz = mtx->m[2][0]; - mtx->m[0][0] = (rx * cs) - (rz * sn); - mtx->m[2][0] = (rx * sn) + (rz * cs); + for (i = 0; i < 4; i++) { + rx = mtx->m[0][i]; + rz = mtx->m[2][i]; - rx = mtx->m[0][1]; - rz = mtx->m[2][1]; - mtx->m[0][1] = (rx * cs) - (rz * sn); - mtx->m[2][1] = (rx * sn) + (rz * cs); - - rx = mtx->m[0][2]; - rz = mtx->m[2][2]; - mtx->m[0][2] = (rx * cs) - (rz * sn); - mtx->m[2][2] = (rx * sn) + (rz * cs); - - rx = mtx->m[0][3]; - rz = mtx->m[2][3]; - mtx->m[0][3] = (rx * cs) - (rz * sn); - mtx->m[2][3] = (rx * sn) + (rz * cs); + mtx->m[0][i] = (rx * cs) - (rz * sn); + mtx->m[2][i] = (rx * sn) + (rz * cs); + } } else { mtx->m[0][0] = mtx->m[2][2] = cs; mtx->m[0][2] = -sn; @@ -242,34 +206,24 @@ void Matrix_RotateY(Matrix* mtx, f32 angle, u8 mode) { } } +// Creates rotation matrix about the Z axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) void Matrix_RotateZ(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; f32 rx; f32 ry; + s32 i; sn = __sinf(angle); cs = __cosf(angle); if (mode == 1) { - rx = mtx->m[0][0]; - ry = mtx->m[1][0]; - mtx->m[0][0] = (rx * cs) + (ry * sn); - mtx->m[1][0] = (ry * cs) - (rx * sn); + for (i = 0; i < 4; i++) { + rx = mtx->m[0][i]; + ry = mtx->m[1][i]; - rx = mtx->m[0][1]; - ry = mtx->m[1][1]; - mtx->m[0][1] = (rx * cs) + (ry * sn); - mtx->m[1][1] = (ry * cs) - (rx * sn); - - rx = mtx->m[0][2]; - ry = mtx->m[1][2]; - mtx->m[0][2] = (rx * cs) + (ry * sn); - mtx->m[1][2] = (ry * cs) - (rx * sn); - - rx = mtx->m[0][3]; - ry = mtx->m[1][3]; - mtx->m[0][3] = (rx * cs) + (ry * sn); - mtx->m[1][3] = (ry * cs) - (rx * sn); + mtx->m[0][i] = (rx * cs) + (ry * sn); + mtx->m[1][i] = (ry * cs) - (rx * sn); + } } else { mtx->m[0][0] = mtx->m[1][1] = cs; mtx->m[0][1] = sn; @@ -280,6 +234,8 @@ void Matrix_RotateZ(Matrix* mtx, f32 angle, u8 mode) { } } +// Creates rotation matrix about a given vector axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY). +// The vector specifying the axis does not need to be a unit vector. void Matrix_RotateAxis(Matrix* mtx, f32 angle, f32 axisX, f32 axisY, f32 axisZ, u8 mode) { f32 rx; f32 ry; @@ -330,6 +286,7 @@ void Matrix_RotateAxis(Matrix* mtx, f32 angle, f32 axisX, f32 axisY, f32 axisZ, cyz = (1.0f - cosA) * yz - axisX * sinA; czz = (1.0f - zz) * cosA + zz; + // loop doesn't seem to work here. rx = mtx->m[0][0]; ry = mtx->m[0][1]; rz = mtx->m[0][2]; @@ -374,96 +331,94 @@ void Matrix_RotateAxis(Matrix* mtx, f32 angle, f32 axisX, f32 axisY, f32 axisZ, // Converts the current Gfx matrix to a Mtx void Matrix_ToMtx(Mtx* dest) { - s32 temp; - u16* iPart = (u16*) &dest->m[0][0]; - u16* fpart = (u16*) &dest->m[2][0]; + s32 intVal; + u16(*iPart)[4] = dest->u.i; + u16(*fPart)[4] = dest->u.f; Matrix* src = gGfxMatrix; - temp = src->m[0][0] * 0x10000; - iPart[0] = (temp >> 0x10); - fpart[0] = temp & 0xFFFF; + intVal = src->m[0][0] * 0x10000; + iPart[0][0] = intVal >> 0x10; + fPart[0][0] = intVal % 0x10000U; - temp = src->m[0][1] * 0x10000; - iPart[1] = (temp >> 0x10); - fpart[1] = temp & 0xFFFF; + intVal = src->m[0][1] * 0x10000; + iPart[0][1] = intVal >> 0x10; + fPart[0][1] = intVal % 0x10000U; - temp = src->m[0][2] * 0x10000; - iPart[2] = (temp >> 0x10); - fpart[2] = temp & 0xFFFF; + intVal = src->m[0][2] * 0x10000; + iPart[0][2] = intVal >> 0x10; + fPart[0][2] = intVal % 0x10000U; - temp = src->m[0][3] * 0x10000; - iPart[3] = (temp >> 0x10); - fpart[3] = temp & 0xFFFF; + intVal = src->m[0][3] * 0x10000; + iPart[0][3] = intVal >> 0x10; + fPart[0][3] = intVal % 0x10000U; - temp = src->m[1][0] * 0x10000; - iPart[4] = (temp >> 0x10); - fpart[4] = temp & 0xFFFF; + intVal = src->m[1][0] * 0x10000; + iPart[1][0] = intVal >> 0x10; + fPart[1][0] = intVal % 0x10000U; - temp = src->m[1][1] * 0x10000; - iPart[5] = (temp >> 0x10); - fpart[5] = temp & 0xFFFF; + intVal = src->m[1][1] * 0x10000; + iPart[1][1] = intVal >> 0x10; + fPart[1][1] = intVal % 0x10000U; - temp = src->m[1][2] * 0x10000; - iPart[6] = (temp >> 0x10); - fpart[6] = temp & 0xFFFF; + intVal = src->m[1][2] * 0x10000; + iPart[1][2] = intVal >> 0x10; + fPart[1][2] = intVal % 0x10000U; - temp = src->m[1][3] * 0x10000; - iPart[7] = (temp >> 0x10); - fpart[7] = temp & 0xFFFF; + intVal = src->m[1][3] * 0x10000; + iPart[1][3] = intVal >> 0x10; + fPart[1][3] = intVal % 0x10000U; - temp = src->m[2][0] * 0x10000; - iPart[8] = (temp >> 0x10); - fpart[8] = temp & 0xFFFF; + intVal = src->m[2][0] * 0x10000; + iPart[2][0] = intVal >> 0x10; + fPart[2][0] = intVal % 0x10000U; - temp = src->m[2][1] * 0x10000; - iPart[9] = (temp >> 0x10); - fpart[9] = temp & 0xFFFF; + intVal = src->m[2][1] * 0x10000; + iPart[2][1] = intVal >> 0x10; + fPart[2][1] = intVal % 0x10000U; - temp = src->m[2][2] * 0x10000; - iPart[10] = (temp >> 0x10); - fpart[10] = temp & 0xFFFF; + intVal = src->m[2][2] * 0x10000; + iPart[2][2] = intVal >> 0x10; + fPart[2][2] = intVal % 0x10000U; - temp = src->m[2][3] * 0x10000; - iPart[11] = (temp >> 0x10); - fpart[11] = temp & 0xFFFF; + intVal = src->m[2][3] * 0x10000; + iPart[2][3] = intVal >> 0x10; + fPart[2][3] = intVal % 0x10000U; - temp = src->m[3][0] * 0x10000; - iPart[12] = (temp >> 0x10); - fpart[12] = temp & 0xFFFF; + intVal = src->m[3][0] * 0x10000; + iPart[3][0] = intVal >> 0x10; + fPart[3][0] = intVal % 0x10000U; - temp = src->m[3][1] * 0x10000; - iPart[13] = (temp >> 0x10); - fpart[13] = temp & 0xFFFF; + intVal = src->m[3][1] * 0x10000; + iPart[3][1] = intVal >> 0x10; + fPart[3][1] = intVal % 0x10000U; - temp = src->m[3][2] * 0x10000; - iPart[14] = (temp >> 0x10); - fpart[14] = temp & 0xFFFF; + intVal = src->m[3][2] * 0x10000; + iPart[3][2] = intVal >> 0x10; + fPart[3][2] = intVal % 0x10000U; - temp = src->m[3][3] * 0x10000; - iPart[15] = (temp >> 0x10); - fpart[15] = temp & 0xFFFF; + intVal = src->m[3][3] * 0x10000; + iPart[3][3] = intVal >> 0x10; + fPart[3][3] = intVal % 0x10000U; } +// Converts the Mtx src to a Matrix, putting the result in dest void Matrix_FromMtx(Mtx* src, Matrix* dest) { - u16* m1 = (u16*) &src->m[0][0]; - u16* m2 = (u16*) &src->m[2][0]; - - dest->xx = ((m1[0] << 0x10) | m2[0]) * (1 / 65536.0f); - dest->yx = ((m1[1] << 0x10) | m2[1]) * (1 / 65536.0f); - dest->zx = ((m1[2] << 0x10) | m2[2]) * (1 / 65536.0f); - dest->wx = ((m1[3] << 0x10) | m2[3]) * (1 / 65536.0f); - dest->xy = ((m1[4] << 0x10) | m2[4]) * (1 / 65536.0f); - dest->yy = ((m1[5] << 0x10) | m2[5]) * (1 / 65536.0f); - dest->zy = ((m1[6] << 0x10) | m2[6]) * (1 / 65536.0f); - dest->wy = ((m1[7] << 0x10) | m2[7]) * (1 / 65536.0f); - dest->xz = ((m1[8] << 0x10) | m2[8]) * (1 / 65536.0f); - dest->yz = ((m1[9] << 0x10) | m2[9]) * (1 / 65536.0f); - dest->zz = ((m1[10] << 0x10) | m2[10]) * (1 / 65536.0f); - dest->wz = ((m1[11] << 0x10) | m2[11]) * (1 / 65536.0f); - dest->xw = ((m1[12] << 0x10) | m2[12]) * (1 / 65536.0f); - dest->yw = ((m1[13] << 0x10) | m2[13]) * (1 / 65536.0f); - dest->zw = ((m1[14] << 0x10) | m2[14]) * (1 / 65536.0f); - dest->ww = ((m1[15] << 0x10) | m2[15]) * (1 / 65536.0f); + dest->m[0][0] = ((src->u.i[0][0] << 0x10) | src->u.f[0][0]) * (1.0f / 0x10000); + dest->m[0][1] = ((src->u.i[0][1] << 0x10) | src->u.f[0][1]) * (1.0f / 0x10000); + dest->m[0][2] = ((src->u.i[0][2] << 0x10) | src->u.f[0][2]) * (1.0f / 0x10000); + dest->m[0][3] = ((src->u.i[0][3] << 0x10) | src->u.f[0][3]) * (1.0f / 0x10000); + dest->m[1][0] = ((src->u.i[1][0] << 0x10) | src->u.f[1][0]) * (1.0f / 0x10000); + dest->m[1][1] = ((src->u.i[1][1] << 0x10) | src->u.f[1][1]) * (1.0f / 0x10000); + dest->m[1][2] = ((src->u.i[1][2] << 0x10) | src->u.f[1][2]) * (1.0f / 0x10000); + dest->m[1][3] = ((src->u.i[1][3] << 0x10) | src->u.f[1][3]) * (1.0f / 0x10000); + dest->m[2][0] = ((src->u.i[2][0] << 0x10) | src->u.f[2][0]) * (1.0f / 0x10000); + dest->m[2][1] = ((src->u.i[2][1] << 0x10) | src->u.f[2][1]) * (1.0f / 0x10000); + dest->m[2][2] = ((src->u.i[2][2] << 0x10) | src->u.f[2][2]) * (1.0f / 0x10000); + dest->m[2][3] = ((src->u.i[2][3] << 0x10) | src->u.f[2][3]) * (1.0f / 0x10000); + dest->m[3][0] = ((src->u.i[3][0] << 0x10) | src->u.f[3][0]) * (1.0f / 0x10000); + dest->m[3][1] = ((src->u.i[3][1] << 0x10) | src->u.f[3][1]) * (1.0f / 0x10000); + dest->m[3][2] = ((src->u.i[3][2] << 0x10) | src->u.f[3][2]) * (1.0f / 0x10000); + dest->m[3][3] = ((src->u.i[3][3] << 0x10) | src->u.f[3][3]) * (1.0f / 0x10000); } // Applies the transform matrix mtx to the vector src, putting the result in dest @@ -541,6 +496,8 @@ void Matrix_GetXYZAngles(Matrix* mtx, Vec3f* rot) { rot->z *= M_RTOD; } +// Creates a look-at matrix from Eye, At, and Up in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY). +// A look-at matrix is a rotation-translation matrix that maps y to Up, z to (At - Eye), and translates to Eye void Matrix_LookAt(Matrix* mtx, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, u8 mode) { Matrix lookAt; diff --git a/src/main/memory.c b/src/main/sys_memory.c similarity index 100% rename from src/main/memory.c rename to src/main/sys_memory.c diff --git a/src/main/save.c b/src/main/sys_save.c similarity index 100% rename from src/main/save.c rename to src/main/sys_save.c diff --git a/src/main/sprintf.c b/src/main/sys_sprintf.c similarity index 100% rename from src/main/sprintf.c rename to src/main/sys_sprintf.c diff --git a/src/main/timer.c b/src/main/sys_timer.c similarity index 100% rename from src/main/timer.c rename to src/main/sys_timer.c diff --git a/yamls/us/main.yaml b/yamls/us/main.yaml index 266bbae4..16d9a2b2 100644 --- a/yamls/us/main.yaml +++ b/yamls/us/main.yaml @@ -19,31 +19,31 @@ - [0x02010, textbin, f3dex] # Nintendo libraries - - [0x03440, c, joybus] - - [0x03A80, c, lib] - - [0x041D0, c, lights] - - [0x04650, c, main] - - [0x05A20, c, math] - - [0x06280, c, matrix] - - [0x07B20, c, memory] - - [0x07B60, c, timer] - - [0x07D30, c, save] - - [0x07FC0, c, fault] + - [0x03440, c, sys_joybus] + - [0x03A80, c, sys_lib] + - [0x041D0, c, sys_lights] + - [0x04650, c, sys_main] + - [0x05A20, c, sys_math] + - [0x06280, c, sys_matrix] + - [0x07B20, c, sys_memory] + - [0x07B60, c, sys_timer] + - [0x07D30, c, sys_save] + - [0x07FC0, c, sys_fault] # Audio block - - [0x08CC0, c, 8CC0] - - [0x0C870, c, C870] - - [0x0F0A0, c, F0A0] # audio_load - - [0x12490, c, 12490] - - [0x14AA0, c, 14AA0] - - [0x17650, c, 17650] # Sound related - - [0x1EB50, c, 1EB50] # Audio Thread + - [0x08CC0, c, sys_audio_8CC0] + - [0x0C870, c, sys_audio_C870] + - [0x0F0A0, c, sys_audio_F0A0] # audio_load + - [0x12490, c, sys_audio_12490] + - [0x14AA0, c, sys_audio_14AA0] + - [0x17650, c, sys_audio_17650] # Sound related + - [0x1EB50, c, sys_audio_1EB50] # Audio Thread - - [0x1FA60, c, 1FA60] # May be blanked out osDriveRomInit - - [0x1FA70, hasm, mio0] - - [0x1FB10, hasm, rdramcheck] - - [0x205E0, c, sprintf] - - [0x206B0, c, math64] - - [0x20A60, hasm, fp.text] + - [0x1FA60, c, sys_1FA60] # May be blanked out osDriveRomInit + - [0x1FA70, hasm, sys_mio0] + - [0x1FB10, hasm, sys_rdramcheck] + - [0x205E0, c, sys_sprintf] + - [0x206B0, c, sys_math64] + - [0x20A60, hasm, sys_fp_text] # Libultra - [0x20BC0, c, ../libultra/io/controller] @@ -179,13 +179,13 @@ - [0x59780, c, fox_load] - [0x5A0F0, c, fox_edata] - [0x5A2C0, c, fox_edisplay] - - [0x61B30, c, fox_enmy1] + - [0x61B30, c, fox_enmy] - [0x6B3B0, c, fox_6B3B0] - [0x77E40, c, sf_77E40] - [0x84F70, c, fox_84F70] - [0x85530, c, sf_hud] - [0x97F80, c, fox_97F80] - - [0x9A580, c, fox_display] + - [0x9A580, c, fox_std_lib] - [0xA24B0, c, fox_A24B0] - [0xA4290, c, fox_A4290] - [0xA48A0, c, fox_A48A0] @@ -203,12 +203,12 @@ - [0xC49D0, data, f3dex] # DATA - Nintendo Libraries - - [0xC51D0, .data, main] - - [0xC51E0, .data, math] - - [0xC5220, .data, matrix] - - [0xC52F0, .data, fault] - - [0xC54D0, data, audio] - - [0xC8880, .data, sprintf] + - [0xC51D0, .data, sys_main] + - [0xC51E0, .data, sys_math] + - [0xC5220, .data, sys_matrix] + - [0xC52F0, .data, sys_fault] + - [0xC54D0, data, sys_audio] + - [0xC8880, .data, sys_sprintf] # DATA - Libultra - [0xC88C0, data, ../libultra/io/controller] @@ -231,18 +231,18 @@ - [0xC8CB0, data, ../libultra/rmon/rmonmain] # RODATA - Nintendo Libraries - - [0xC8CC0, .rodata, math] - - [0xC8D10, .rodata, matrix] - - [0xC8D20, .rodata, save] - - [0xC8E40, .rodata, fault] - - [0xC9220, .rodata, 8CC0] - - [0xC9260, .rodata, C870] - - [0xC9280, .rodata, F0A0] - - [0xC92C0, .rodata, 12490] - - [0xC9320, .rodata, 14AA0] - - [0xC99D0, .rodata, 17650] - - [0xC9CF0, .rodata, 1EB50] - - [0xC9F10, .rodata, math64] + - [0xC8CC0, .rodata, sys_math] + - [0xC8D10, .rodata, sys_matrix] + - [0xC8D20, .rodata, sys_save] + - [0xC8E40, .rodata, sys_fault] + - [0xC9220, .rodata, sys_audio_8CC0] + - [0xC9260, .rodata, sys_audio_C870] + - [0xC9280, .rodata, sys_audio_F0A0] + - [0xC92C0, .rodata, sys_audio_12490] + - [0xC9320, .rodata, sys_audio_14AA0] + - [0xC99D0, .rodata, sys_audio_17650] + - [0xC9CF0, .rodata, sys_audio_1EB50] + - [0xC9F10, .rodata, sys_math64] # RODATA - Libultra - [0xC9F30, .rodata, ../libultra/gu/perspective] @@ -271,11 +271,11 @@ - [0xCAFB0, .data, fox_load] - [0xCCA70, .data, fox_edata] - [0xD0570, .data, fox_edisplay] - - [0xD09A0, .data, fox_enmy1] + - [0xD09A0, .data, fox_enmy] - [0xD0B80, .data, fox_6B3B0] - [0xD20E0, data, sf_77E40] - [0xD2570, data, sf_hud] - - [0xD31D0, .data, fox_display] + - [0xD31D0, .data, fox_std_lib] - [0xD3460, .data, fox_A24B0] - [0xD3520, .data, fox_A4290] - [0xD3B50, data, sf_A4B50] @@ -294,13 +294,13 @@ - [0xD69A0, .rodata, fox_52730] - [0xD6BA0, .rodata, fox_load] - [0xD6C20, .rodata, fox_edisplay] - - [0xD6FD0, .rodata, fox_enmy1] + - [0xD6FD0, .rodata, fox_enmy] - [0xD7650, .rodata, fox_6B3B0] - [0xD7E30, .rodata, sf_77E40] - [0xD82F0, .rodata, fox_84F70] - [0xD8320, .rodata, sf_hud] - [0xD8DE0, .rodata, fox_97F80] - - [0xD8DF0, .rodata, fox_display] + - [0xD8DF0, .rodata, fox_std_lib] - [0xD8E50, .rodata, fox_A24B0] - [0xD8ED0, .rodata, fox_A4290] - [0xD8EE0, .rodata, fox_A48A0] @@ -316,15 +316,15 @@ - [0xDD330, .data, note_data] # Nintendo Library bss - - { start: 0xDE480, type: .bss, vram: 0x800DD880, name: joybus } - - { start: 0xDE480, type: bss, vram: 0x800DDAA0, name: main } - - { start: 0xDE480, type: .bss, vram: 0x8013B3A0, name: math } - - { start: 0xDE480, type: .bss, vram: 0x8013B3C0, name: matrix } - - { start: 0xDE480, type: .bss, vram: 0x8013C3D0, name: memory } - - { start: 0xDE480, type: .bss, vram: 0x80144BE0, name: timer } - - { start: 0xDE480, type: .bss, vram: 0x80144F60, name: save } - - { start: 0xDE480, type: .bss, vram: 0x80145360, name: fault } - - { start: 0xDE480, type: bss, vram: 0x80145D40, name: audio } + - { start: 0xDE480, type: .bss, vram: 0x800DD880, name: sys_joybus } + - { start: 0xDE480, type: bss, vram: 0x800DDAA0, name: sys_main } + - { start: 0xDE480, type: .bss, vram: 0x8013B3A0, name: sys_math } + - { start: 0xDE480, type: .bss, vram: 0x8013B3C0, name: sys_matrix } + - { start: 0xDE480, type: .bss, vram: 0x8013C3D0, name: sys_memory } + - { start: 0xDE480, type: .bss, vram: 0x80144BE0, name: sys_timer } + - { start: 0xDE480, type: .bss, vram: 0x80144F60, name: sys_save } + - { start: 0xDE480, type: .bss, vram: 0x80145360, name: sys_fault } + - { start: 0xDE480, type: bss, vram: 0x80145D40, name: sys_audio } # Libultra bss @@ -359,11 +359,11 @@ - { start: 0xDE480, type: .bss, vram: 0x801613A0, name: fox_43AC0 } - { start: 0xDE480, type: .bss, vram: 0x801613B0, name: fox_52730 } - { start: 0xDE480, type: .bss, vram: 0x801615D0, name: fox_edisplay } - - { start: 0xDE480, type: .bss, vram: 0x80161670, name: fox_enmy1 } + - { start: 0xDE480, type: .bss, vram: 0x80161670, name: fox_enmy } - { start: 0xDE480, type: .bss, vram: 0x80161690, name: fox_6B3B0 } - { start: 0xDE480, type: bss, vram: 0x801616A0, name: sf_hud } - { start: 0xDE480, type: .bss, vram: 0x80161950, name: fox_97F80 } - - { start: 0xDE480, type: .bss, vram: 0x801619A0, name: fox_display } + - { start: 0xDE480, type: .bss, vram: 0x801619A0, name: fox_std_lib } - { start: 0xDE480, type: .bss, vram: 0x80161A10, name: fox_A24B0 } - { start: 0xDE480, type: bss, vram: 0x80161A50, name: sf_A4B50 } - { start: 0xDE480, type: .bss, vram: 0x80178580, name: fox_rcp }