diff options
| author | Maide <34639600+Kelebek1@users.noreply.github.com> | 2023-08-16 19:11:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-16 11:11:19 -0700 |
| commit | fca5307ea908606c40c051d4c366ed8dcf077258 (patch) | |
| tree | e7cbc4524c9510a935c62ab191eeeefa11374687 /include | |
| parent | c7a746e71e310a23ba43a7208b9c83d2d1d483ee (diff) | |
m_play (#50)
* m_play
* Some warnings
* lots of function renames from the gcn version
* fix warnings
* format
* a
* a
* PR
* PR2
---------
Co-authored-by: Maide <you@example.com>
Co-authored-by: angie <angheloalf95@gmail.com>
Diffstat (limited to 'include')
46 files changed, 395 insertions, 142 deletions
diff --git a/include/67D890.h b/include/67D890.h index e8af38e..1006d41 100644 --- a/include/67D890.h +++ b/include/67D890.h @@ -3,12 +3,14 @@ #include "ultra64.h" -// void func_80059BF0_jp(); -// void func_80059C24_jp(); +struct PlayState; + +void func_80059BF0_jp(void); +void banti_move(struct PlayState* play); // void func_80059EC0_jp(); // void func_8005A070_jp(); // void func_8005A154_jp(); // void func_8005A238_jp(); -// void func_8005A2FC_jp(); +void banti_draw(struct PlayState* play); #endif diff --git a/include/67E840.h b/include/67E840.h index cefd38d..aa2316c 100644 --- a/include/67E840.h +++ b/include/67E840.h @@ -3,6 +3,7 @@ #include "ultra64.h" +struct PlayState; struct GameState; // void func_8005ABA0_jp(); @@ -108,7 +109,7 @@ struct GameState; // void func_8005DCCC_jp(); // void mBGMPsComp_make_ps_lost_fanfare(); // void func_8005DD5C_jp(); -// void func_8005DDE4_jp(); +void mBGMPsComp_make_ps_wipe(s32 arg0, struct PlayState* play); // void func_8005DE0C_jp(); // void func_8005DE60_jp(); // void func_8005DE88_jp(); diff --git a/include/683030.h b/include/683030.h index c68b512..7cda1e9 100644 --- a/include/683030.h +++ b/include/683030.h @@ -3,6 +3,8 @@ #include "ultra64.h" +struct PlayState; + // void func_8005F390_jp(); // void func_8005F3DC_jp(); // void func_8005F4E4_jp(); @@ -41,7 +43,7 @@ // void func_80060970_jp(); // void func_80060A6C_jp(); // void func_80060B18_jp(); -// void Camera2_ClearActorTalking_Cull(); +void Camera2_ClearActorTalking_Cull(struct PlayState* play); // void func_80060D1C_jp(); // void func_80060D58_jp(); // void func_80060D6C_jp(); @@ -154,9 +156,9 @@ // void func_80064EF0_jp(); // void func_80064F08_jp(); // void func_80064F28_jp(); -// void func_80064F48_jp(); +void func_80064F48_jp(struct PlayState* play); // void func_80064F84_jp(); -// void func_80064FD8_jp(); -// void func_80065028_jp(); +void Camera2_process(struct PlayState* play); +void Camera2_draw(struct PlayState* play); #endif diff --git a/include/69E2C0.h b/include/69E2C0.h index f95158e..43d6d41 100644 --- a/include/69E2C0.h +++ b/include/69E2C0.h @@ -5,6 +5,7 @@ struct Input; struct GraphicsContext; +struct PlayState; // void func_8007A620_jp(); // void func_8007A630_jp(); @@ -70,14 +71,14 @@ void Debug_mode_output(struct GraphicsContext* gfxCtx); // void func_8007CB50_jp(); // void func_8007CBEC_jp(); // void func_8007CC9C_jp(); -// void func_8007CDB8_jp(); +void mDemo_stock_clear(void); // void func_8007CDD8_jp(); // void func_8007CF00_jp(); // void func_8007CF34_jp(); // void func_8007CF44_jp(); // void func_8007CF84_jp(); -// void func_8007CFB4_jp(); -// void func_8007CFD8_jp(); +void mDemo_Main(struct PlayState* play); +void func_8007CFD8_jp(struct PlayState* play); // void func_8007D030_jp(); // void func_8007D048_jp(); // void func_8007D080_jp(); diff --git a/include/6A6E80.h b/include/6A6E80.h index 8dd65ce..8d49ac7 100644 --- a/include/6A6E80.h +++ b/include/6A6E80.h @@ -3,22 +3,28 @@ #include "ultra64.h" +struct PlayState; + +typedef struct Play80804480 { + /* 0x00 */ char unk00[0xDC]; +} Play80804480; // size = 0xDC + // void func_800831E0_jp(); // void func_800835AC_jp(); -// void func_8008366C_jp(); -// void func_800836F8_jp(); +void fbdemo_cleanup(Play80804480* arg0); +s32 fbdemo_init(Play80804480* arg0, s32 arg1, s32 arg2, struct PlayState* play); // void func_80083870_jp(); -// void func_80083984_jp(); +void fbdemo_draw(Play80804480* arg0, Gfx** gfx); // void func_80083AB0_jp(); -// void func_80083BE4_jp(); +void fbdemo_move(Play80804480* arg0); // void func_80083BF0_jp(); -// void func_80083C00_jp(); -// void func_80083CBC_jp(); +void fbdemo_triforce_startup(void*); +void fbdemo_triforce_init(void*); // void func_80083CE8_jp(); -// void func_80083D14_jp(); -// void func_80083E08_jp(); -// void func_8008400C_jp(); -// void func_80084018_jp(); -// void func_80084068_jp(); +void fbdemo_triforce_move(void*, u8); +void fbdemo_triforce_draw(void*, Gfx**); +s32 fbdemo_triforce_is_finish(void*, PlayState* play); +void fbdemo_triforce_settype(void*, s32); +void fbdemo_triforce_setcolor_rgba8888(void*, s32); #endif diff --git a/include/6A7D20.h b/include/6A7D20.h index 4949f31..ec6e456 100644 --- a/include/6A7D20.h +++ b/include/6A7D20.h @@ -3,13 +3,13 @@ #include "ultra64.h" -// void func_80084080_jp(); -// void func_800840AC_jp(); -// void func_8008418C_jp(); -// void func_800843C8_jp(); -// void func_80084480_jp(); -// void func_800844B0_jp(); +void fbdemo_wipe1_init(void*); +void fbdemo_wipe1_move(void*, u8); +void fbdemo_wipe1_draw(void*, Gfx**); +void fbdemo_wipe1_startup(void*); +void fbdemo_wipe1_settype(void*, s32); +void fbdemo_wipe1_setcolor_rgba8888(void*, s32); // void func_800844BC_jp(); -// void func_800844C8_jp(); +s32 fbdemo_wipe1_is_finish(void*, PlayState* play); #endif diff --git a/include/6A8180.h b/include/6A8180.h index db13b7f..8b9ecd5 100644 --- a/include/6A8180.h +++ b/include/6A8180.h @@ -3,12 +3,18 @@ #include "ultra64.h" -// void func_800844E0_jp(); -// void func_8008450C_jp(); -// void func_800845EC_jp(); -// void func_8008468C_jp(); -// void func_800846D4_jp(); -// void func_800846E0_jp(); -// void func_800846EC_jp(); +struct PlayState; + +typedef struct PlayState2128 { + /* 0x00 */ char unk00[0x10]; +} PlayState2128; // size = 0x10 + +void fbdemo_fade_init(void* arg0); +void fbdemo_fade_move(void* arg0, u8 arg1); +void fbdemo_fade_draw(void* arg0, Gfx** gfx); +void fbdemo_fade_startup(void* arg0); +void fbdemo_fade_settype(void* arg0, s32 arg1); +void fbdemo_fade_setcolor_rgba8888(void* arg0, s32 arg1); +s32 fbdemo_fade_is_finish(void* arg0, struct PlayState* play); #endif diff --git a/include/6C97F0.h b/include/6C97F0.h index be30080..ce7d044 100644 --- a/include/6C97F0.h +++ b/include/6C97F0.h @@ -15,6 +15,6 @@ // void func_800A63F8_jp(); // void func_800A6450_jp(); // void func_800A6548_jp(); -// void func_800A65C4_jp(); +void func_800A65C4_jp(void); #endif diff --git a/include/6D2720.h b/include/6D2720.h index f271c77..b70cc3f 100644 --- a/include/6D2720.h +++ b/include/6D2720.h @@ -32,6 +32,6 @@ // void func_800AFCAC_jp(); // void func_800AFCD8_jp(); // void func_800AFDA8_jp(); -// void func_800B0010_jp(); +void func_800B0010_jp(void); #endif diff --git a/include/6DA460.h b/include/6DA460.h index 9665029..0bcd63e 100644 --- a/include/6DA460.h +++ b/include/6DA460.h @@ -3,6 +3,8 @@ #include "ultra64.h" +struct PlayState; + // void func_800B67C0_jp(); // void func_800B6838_jp(); // void func_800B68E8_jp(); @@ -28,7 +30,7 @@ // void func_800B7468_jp(); // void func_800B74E8_jp(); // void func_800B7560_jp(); -// void func_800B7624_jp(); +void mPO_business_proc(struct PlayState* play); // void func_800B7680_jp(); // void func_800B7700_jp(); diff --git a/include/6E0F50.h b/include/6E0F50.h index 888d213..1e28acb 100644 --- a/include/6E0F50.h +++ b/include/6E0F50.h @@ -3,8 +3,10 @@ #include "ultra64.h" +struct PlayState; + // void func_800BD2B0_jp(); -// void func_800BD37C_jp(); +Gfx* gfx_set_fog_nosync(Gfx* gfx, u8 arg1, u8 arg2, u8 arg3, s32 arg4, s16 arg5, s16 arg6); // void func_800BD3EC_jp(); // void func_800BD428_jp(); // void func_800BD448_jp(); @@ -21,7 +23,7 @@ // void func_800BD68C_jp(); // void func_800BD6D0_jp(); // void func_800BD6F8_jp(); -// void func_800BD720_jp(); +Gfx* func_800BD720_jp(Gfx* gfx); // void func_800BD748_jp(); // void func_800BD770_jp(); // void func_800BD798_jp(); @@ -32,8 +34,8 @@ // void func_800BD9FC_jp(); // void func_800BDA20_jp(); // void two_tex_scroll(); -// void DisplayList_initialize(); -// void func_800BDF90_jp(); +void DisplayList_initialize(GraphicsContext* gfxCtx, u8 arg1, u8 arg2, u8 arg3, struct PlayState* play); +void fade_rgba8888_draw(Gfx** gfx, s32 arg1); // void func_800BE030_jp(); // void fade_black_draw(); // void func_800BE094_jp(); diff --git a/include/6E30B0.h b/include/6E30B0.h index 3cfb0fa..16c9ede 100644 --- a/include/6E30B0.h +++ b/include/6E30B0.h @@ -77,6 +77,6 @@ // void func_800C2D8C_jp(); // void func_800C2DF0_jp(); // void func_800C2E80_jp(); -// void func_800C2EE0_jp(); +void func_800C2EE0_jp(void); #endif diff --git a/include/6E80C0.h b/include/6E80C0.h index e43d6ae..9c90a9f 100644 --- a/include/6E80C0.h +++ b/include/6E80C0.h @@ -3,6 +3,15 @@ #include "ultra64.h" +struct PlayState; + +typedef struct PlayState1CBC { + /* 0x00 */ s32 unk_00; + /* 0x04 */ char unk04[0x8]; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ char unk10[0xE0]; +} PlayState1CBC; // size = 0xF0 + // void func_800C4420_jp(); // void func_800C4440_jp(); // void func_800C453C_jp(); @@ -11,24 +20,24 @@ // void mSM_ovlptr_dllcnv(); // void func_800C47B4_jp(); // void func_800C497C_jp(); -// void func_800C49D4_jp(); -// void func_800C4C60_jp(); +void func_800C49D4_jp(struct PlayState* play); +void mSM_submenu_ovlptr_cleanup(PlayState1CBC* arg0); // void load_player(); -// void func_800C4D1C_jp(); -// void func_800C4D80_jp(); +void mSM_submenu_ct(PlayState1CBC* arg0); +void mSM_submenu_dt(PlayState1CBC* arg0); // void func_800C4D8C_jp(); // void func_800C4DB0_jp(); // void func_800C4DD8_jp(); // void func_800C4DFC_jp(); // void func_800C4E2C_jp(); -// void func_800C4E58_jp(); +void mSM_submenu_ctrl(struct PlayState* play); // void func_800C50C4_jp(); // void func_800C50EC_jp(); // void func_800C510C_jp(); // void func_800C5228_jp(); // void func_800C524C_jp(); -// void func_800C5328_jp(); -// void func_800C535C_jp(); +void mSM_submenu_move(PlayState1CBC* arg0); +void mSM_submenu_draw(PlayState1CBC* arg0, struct PlayState* play); // void func_800C53B8_jp(); // void func_800C543C_jp(); // void func_800C54A8_jp(); diff --git a/include/6E9650.h b/include/6E9650.h index 86db5f5..29faf70 100644 --- a/include/6E9650.h +++ b/include/6E9650.h @@ -19,22 +19,22 @@ struct PlayState_unk_0110; // void func_800C5E10_jp(); // void func_800C5EA0_jp(); // void func_800C5F0C_jp(); -// void func_800C5F64_jp(); +void mSc_dmacopy_data_bank(struct PlayState_unk_0110* arg0); s32 mSc_bank_regist_check(struct PlayState_unk_0110* arg0, s16 arg1); void func_800C6144_jp(struct PlayState_unk_0110* arg0, s16 arg1); void mSc_regist_initial_exchange_bank(struct PlayState* play); // void func_800C62C4_jp(); // void func_800C639C_jp(); -// void mSc_data_bank_ct(); -// void mSc_decide_exchange_bank(); +void mSc_data_bank_ct(struct PlayState* play, struct PlayState_unk_0110* arg1); +void mSc_decide_exchange_bank(struct PlayState_unk_0110* arg0); // void func_800C6690_jp(); -// void Scene_ct(); +void Scene_ct(struct PlayState* play, void* arg1); // void func_800C6960_jp(); // void func_800C69F4_jp(); // void func_800C6A28_jp(); // void func_800C6A5C_jp(); // void func_800C6A90_jp(); -// void Door_info_ct(); +void Door_info_ct(s32* arg0); // void func_800C6AD0_jp(); // void func_800C6AE0_jp(); // void func_800C6B50_jp(); diff --git a/include/6EC9E0.h b/include/6EC9E0.h index ddf1095..642e2ff 100644 --- a/include/6EC9E0.h +++ b/include/6EC9E0.h @@ -3,15 +3,17 @@ #include "ultra64.h" +struct PlayState; + // void func_800C8D40_jp(); // void func_800C8D98_jp(); // void func_800C8E08_jp(); -// void func_800C8E50_jp(); +void mTD_player_keydata_init(struct PlayState* play); // void func_800C8ECC_jp(); // void func_800C8F5C_jp(); // void func_800C8F84_jp(); -// void func_800C8FB8_jp(); -// void func_800C9010_jp(); +void title_demo_move(struct PlayState* play); +void func_800C9010_jp(void); // void func_800C9088_jp(); // void mTD_get_titledemo_no(); // void func_800C90BC_jp(); diff --git a/include/6ECD90.h b/include/6ECD90.h index f068a5d..c980f3d 100644 --- a/include/6ECD90.h +++ b/include/6ECD90.h @@ -3,6 +3,8 @@ #include "ultra64.h" +struct PlayState; + // void func_800C90F0_jp(); // void func_800C91E0_jp(); // void func_800C92FC_jp(); @@ -18,6 +20,6 @@ // void func_800C98A0_jp(); // void func_800C9D38_jp(); // void func_800C9F88_jp(); -// void func_800CA008_jp(); +void mTRC_move(struct PlayState* play); #endif diff --git a/include/6EDD10.h b/include/6EDD10.h index 087c3af..62b33c5 100644 --- a/include/6EDD10.h +++ b/include/6EDD10.h @@ -4,7 +4,7 @@ #include "ultra64.h" // void func_800CA070_jp(); -// void mTM_set_season(); +void mTM_set_season(void); // void func_800CA230_jp(); // void func_800CA240_jp(); // void func_800CA278_jp(); diff --git a/include/6EFC20.h b/include/6EFC20.h index 0651fdd..8e7c3d4 100644 --- a/include/6EFC20.h +++ b/include/6EFC20.h @@ -3,9 +3,11 @@ #include "ultra64.h" -// void func_800CBF80_jp(); -// void func_800CBFBC_jp(); -// void func_800CC3EC_jp(); +struct PlayState; + +void func_800CBF80_jp(void); +void watch_my_step_move(struct PlayState* play); +void watch_my_step_draw(struct PlayState* play); // void func_800CC9C4_jp(); // void func_800CC9EC_jp(); // void func_800CCB44_jp(); diff --git a/include/6F5550.h b/include/6F5550.h index 8ab3fd3..5468036 100644 --- a/include/6F5550.h +++ b/include/6F5550.h @@ -3,6 +3,9 @@ #include "ultra64.h" +struct PlayState; +struct PlayState_Unk_1EE8; + // void func_800D18B0_jp(); // void func_800D195C_jp(); // void func_800D197C_jp(); @@ -61,18 +64,18 @@ // void func_800D22A4_jp(); // void func_800D22CC_jp(); // void func_800D22F4_jp(); -// void func_800D2314_jp(); -// void func_800D2334_jp(); +s32 sAdo_BgmFadeoutCheck(void); +s32 func_800D2334_jp(struct PlayState_Unk_1EE8* arg0, struct PlayState* play); // void func_800D2354_jp(); // void func_800D2360_jp(); -// void sAdo_RoomType(); +void sAdo_RoomType(u8 arg0); // void func_800D2394_jp(); // void func_800D23B4_jp(); // void func_800D2438_jp(); // void func_800D24C4_jp(); // void func_800D24EC_jp(); // void func_800D252C_jp(); -// void func_800D2568_jp(); +void func_800D2568_jp(s32 arg0); // void func_800D2578_jp(); #endif diff --git a/include/PreRender.h b/include/PreRender.h index 5d38fba..a681087 100644 --- a/include/PreRender.h +++ b/include/PreRender.h @@ -3,13 +3,26 @@ #include "ultra64.h" +typedef struct ListAlloc { + /* 0x0 */ struct ListAlloc* prev; + /* 0x4 */ struct ListAlloc* next; +} ListAlloc; // size = 0x8 + +typedef struct { + /* 0x00 */ char unk00[0x10]; + /* 0x10 */ UNK_PTR unk_10; + /* 0x14 */ UNK_PTR unk_14; + /* 0x18 */ UNK_PTR unk_18; + /* 0x1C */ char unk1C[0x34]; +} PreRender; // size = 0x50 + // void wallpaper_draw1(); // void wallpaper_draw(); // void gfx_SetUpCFB(); -// void PreRender_setup_savebuf(); -// void PreRender_init(); -// void PreRender_setup_renderbuf(); -// void PreRender_cleanup(); +void PreRender_setup_savebuf(PreRender* render, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5); +void PreRender_init(PreRender* render); +void PreRender_setup_renderbuf(PreRender* render, s32 arg1, s32 arg2, void* arg3, void* arg4); +void PreRender_cleanup(PreRender* render); // void PreRender_TransBufferCopy(); // void PreRender_TransBuffer(); // void PreRender_TransBuffer1_env(); @@ -18,15 +31,15 @@ // void PreRender_ShowCoveredge(); // void PreRender_CopyRGBC(); // void PreRender_saveZBuffer(); -// void PreRender_saveFrameBuffer(); -// void PreRender_saveCVG(); +void PreRender_saveFrameBuffer(PreRender* render, Gfx** gfx); +void PreRender_saveCVG(PreRender* render, Gfx** gfx); // void PreRender_loadZBuffer(); // void PreRender_loadFrameBuffer(); // void PreRender_loadFrameBufferAlpha(); -// void PreRender_loadFrameBufferCopy(); +void PreRender_loadFrameBufferCopy(PreRender* render, Gfx** gfx); // void ASAlgorithm(); // void AntiAliasFilter(); -// void PreRender_ConvertFrameBuffer_fg(); +void PreRender_ConvertFrameBuffer_fg(PreRender* render); // void PreRender_ConvertFrameBuffer(); #endif diff --git a/include/build.h b/include/build.h deleted file mode 100644 index 2b51e7b..0000000 --- a/include/build.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef BUILD_H -#define BUILD_H - -extern const char gBuildTeam[]; -extern const char gBuildDate[]; -extern const char gBuildMakeOption[]; - -#endif diff --git a/include/color.h b/include/color.h new file mode 100644 index 0000000..def50ca --- /dev/null +++ b/include/color.h @@ -0,0 +1,80 @@ +#ifndef _COLOR_H_ +#define _COLOR_H_ + +#include "PR/ultratypes.h" + +// For checking the alpha bit in an RGBA16 pixel +#define RGBA16_PIXEL_OPAQUE 1 + +typedef struct { + /* 0x0 */ u8 r; + /* 0x1 */ u8 g; + /* 0x2 */ u8 b; +} Color_RGB8; // size = 0x3 + +typedef struct { + /* 0x0 */ u8 r; + /* 0x1 */ u8 g; + /* 0x2 */ u8 b; + /* 0x3 */ u8 a; +} Color_RGBA8; // size = 0x4 + +typedef struct { + /* 0x0 */ s16 r; + /* 0x2 */ s16 g; + /* 0x4 */ s16 b; +} Color_RGB16; // size = 0x6 + +// only use when necessary for alignment purposes +typedef union { + struct { + u8 r, g, b, a; + }; + u32 rgba; +} Color_RGBA8_u32; + +typedef struct { + f32 r, g, b, a; +} Color_RGBAf; + +typedef struct { + u32 r, g, b, a; +} Color_RGBAu32; + +typedef union { + struct { + u16 r : 5; + u16 g : 5; + u16 b : 5; + u16 a : 1; + }; + u16 rgba; +} Color_RGBA16; + +typedef union { + struct { + u32 r : 5; + u32 g : 5; + u32 b : 5; + u32 a : 1; + }; + u16 rgba; +} Color_RGBA16_2; + +typedef union{ + struct { + u32 r : 3; + u32 g : 3; + u32 b : 3; + u32 a : 5; + }; + u16 rgba; +} Color_RGBA14; + +#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0)) + +#define RGBA16_GET_R(pixel) (((pixel) >> 11) & 0x1F) +#define RGBA16_GET_G(pixel) (((pixel) >> 6) & 0x1F) +#define RGBA16_GET_B(pixel) (((pixel) >> 1) & 0x1F) + +#endif diff --git a/include/game.h b/include/game.h index 46edae3..2af1c10 100644 --- a/include/game.h +++ b/include/game.h @@ -55,7 +55,7 @@ typedef struct GameState { /* 0x88 */ GameAlloc alloc; /* 0x9C */ u8 unk_9C; /* 0x9D */ u8 unk_9D; - /* 0x9E */ UNK_TYPE1 unk_9E[0x1]; + /* 0x9E */ UNK_TYPE1 unk9E[0x1]; /* 0x9F */ u8 running; /* 0xA0 */ s32 unk_A0; /* 0xA4 */ UNK_TYPE1 unk_A4[0x4]; diff --git a/include/gfx.h b/include/gfx.h index bda4a82..fb89873 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -22,14 +22,15 @@ typedef struct GraphicsContext { /* 0x2C0 */ TwoHeadGfxArena unk_2C0; /* 0x2D0 */ TwoHeadGfxArena light; /* 0x2E0 */ UNK_TYPE1 unk_2E0[0x4]; - /* 0x2E4 */ s32 unk_2E4; + /* 0x2E4 */ UNK_PTR unk_2E4; /* 0x2E8 */ UNK_TYPE1 unk_2E8[0x4]; /* 0x2EC */ s32 unk_2EC; /* 0x2F0 */ u8 unk_2F0; /* 0x2F1 */ UNK_TYPE1 unk_2F1[0x1]; /* 0x2F2 */ u8 unk_2F2; /* 0x2F3 */ UNK_TYPE1 unk_2F3[0x1]; - /* 0x2F4 */ UNK_TYPE1 unk_2F4[0x8]; + /* 0x2F4 */ s32 unk_2F4; + /* 0x2F8 */ s32 unk_2F8; /* 0x2FC */ f32 unk_2FC; /* 0x300 */ f32 unk_300; } GraphicsContext; // size >= 0x304 diff --git a/include/gfxalloc.h b/include/gfxalloc.h index dab0fb6..81177a9 100644 --- a/include/gfxalloc.h +++ b/include/gfxalloc.h @@ -4,7 +4,7 @@ #include "ultra64.h" Gfx* gfxopen(Gfx* gfxHead); -void gfxclose(Gfx* gfxHead, Gfx* gfx); +Gfx* gfxclose(Gfx* gfxHead, Gfx* gfx); // void gfxalloc(); #endif diff --git a/include/libc/alloca.h b/include/libc/alloca.h new file mode 100644 index 0000000..4e8720f --- /dev/null +++ b/include/libc/alloca.h @@ -0,0 +1,7 @@ +#ifndef ALLOCA_H +#define ALLOCA_H + +void* alloca(u32); +#define alloca __builtin_alloca + +#endif diff --git a/include/libc64/qrand.h b/include/libc64/qrand.h index 0e6ee34..e589b24 100644 --- a/include/libc64/qrand.h +++ b/include/libc64/qrand.h @@ -5,7 +5,7 @@ // void qrand(); // void sqrand(); -// void fqrand(); +f32 fqrand(void); // void fqrand2(); // void sqrand_r(); // void qrand_r(); diff --git a/include/libu64/gfxprint.h b/include/libu64/gfxprint.h index 8391b4b..7db3fef 100644 --- a/include/libu64/gfxprint.h +++ b/include/libu64/gfxprint.h @@ -2,23 +2,28 @@ #define LIBU64_GFX_PRINT_H #include "ultra64.h" +#include "color.h" + +typedef struct gfxprint { + /* 0x00 */ char unk00[0x30]; +} gfxprint; // size = 0x30 // void gfxprint_setup(); -// void gfxprint_color(); +void gfxprint_color(gfxprint* this, u8 r, u8 g, u8 b, u8 a); // void gfxprint_locate(); -// void gfxprint_locate8x8(); +void gfxprint_locate8x8(gfxprint* this, s32 arg1, s32 arg2); // void gfxprint_setoffset(); // void gfxprint_putc1(); // void gfxprint_putc(); // void gfxprint_write(); // void gfxprint_puts(); // void gfxprint_prout(); -// void gfxprint_init(); -// void gfxprint_cleanup(); -// void gfxprint_open(); -// void gfxprint_close(); +void gfxprint_init(gfxprint* this); +void gfxprint_cleanup(gfxprint* this); +void gfxprint_open(gfxprint* this, Gfx* gfx); +Gfx* gfxprint_close(gfxprint* this); // void gfxprint_vprintf(); -// void gfxprint_printf(); +void gfxprint_printf(gfxprint* this, const char* fmt, ...); // extern UNK_TYPE gfxprint_moji_tlut; // extern UNK_TYPE gfxprint_rainbow_tlut; diff --git a/include/m_collision_bg.h b/include/m_collision_bg.h index d7bdf4d..a95a36c 100644 --- a/include/m_collision_bg.h +++ b/include/m_collision_bg.h @@ -92,7 +92,7 @@ // void func_8006B97C_jp(); // void func_8006BAA8_jp(); // void func_8006BAE4_jp(); -// void func_8006BB64_jp(); +void func_8006BB64_jp(void); // void func_8006BB9C_jp(); // void func_8006BBE8_jp(); // void func_8006BBF8_jp(); @@ -105,9 +105,9 @@ // void func_8006C4B4_jp(); // void func_8006C5A8_jp(); // void func_8006C634_jp(); -// void func_8006C740_jp(); +void mCoBG_CalcTimerDecalCircle(void); // void func_8006C7B4_jp(); -// void func_8006C8D0_jp(); +void func_8006C8D0_jp(void); // void func_8006C910_jp(); // void func_8006C980_jp(); // void func_8006D3B0_jp(); diff --git a/include/m_collision_obj.h b/include/m_collision_obj.h index e4335e2..547eee1 100644 --- a/include/m_collision_obj.h +++ b/include/m_collision_obj.h @@ -12,6 +12,12 @@ typedef struct CollisionCheck_Status { } CollisionCheck_Status; // size >= 0x18 +typedef struct PlayState2138 { + /* 0x00 */ char unk00[0xD0]; +} PlayState2138; // size = 0xD0 + +struct PlayState; + // void func_80076B40_jp(); // void func_80076BA4_jp(); // void func_80076BD4_jp(); @@ -49,9 +55,9 @@ typedef struct CollisionCheck_Status { // void func_80077410_jp(); // void func_800774B4_jp(); // void func_80077580_jp(); -// void func_80077620_jp(); -// void func_80077640_jp(); -// void func_80077650_jp(); +void func_80077620_jp(struct PlayState* play, PlayState2138* arg1); +void CollisionCheck_dt(struct PlayState* play, PlayState2138* arg1); +void CollisionCheck_clear(struct PlayState* play, PlayState2138* arg1); // void CollisionCheck_setOC(); // void func_80077794_jp(); // void func_800777D0_jp(); @@ -61,7 +67,7 @@ typedef struct CollisionCheck_Status { // void func_80077F20_jp(); // void func_80077FF0_jp(); // void func_80078014_jp(); -// void func_80078070_jp(); +void CollisionCheck_OC(struct PlayState* play, PlayState2138* arg1); // void func_80078214_jp(); // void func_80078258_jp(); // void func_8007841C_jp(); diff --git a/include/m_common_data.h b/include/m_common_data.h index 719f850..ef1950e 100644 --- a/include/m_common_data.h +++ b/include/m_common_data.h @@ -9,7 +9,7 @@ struct ActorOverlay; struct struct_801161E8_jp; struct PlayState_unk_0110; struct CommonData_unk_1004C_unk_14_arg0; - +struct PlayState; typedef UNK_RET (*CommonData_unk_1004C_unk_04)(struct ActorOverlay*, const struct struct_801161E8_jp*, size_t, s32); typedef UNK_RET (*CommonData_unk_1004C_unk_08)(void); @@ -53,25 +53,58 @@ typedef struct CommonData_unk_10098 { /* 0x10 */ CommonData_unk_10098_unk_10 unk_10; } CommonData_unk_10098; // size >= 0x10 +typedef struct CommonData10138_Sub { + /* 0x00 */ char unk00[0x3]; + /* 0x03 */ u8 unk_03; + /* 0x04 */ char unk04[0x1]; + /* 0x05 */ u8 unk_05; + /* 0x06 */ u16 unk_06; + /* 0x08 */ u8 unk_08; +} CommonData10138_Sub; // size >= 0xC + +typedef struct CommonData10138 { + /* 0x000 */ char unk000[0xA86]; + /* 0xA86 */ CommonData10138_Sub unk_A86; +} CommonData10138; // size >= 0xA90 + +typedef void (*CommonData_100E4_Func)(struct PlayState*); typedef struct CommonData { - /* 0x00000 */ UNK_TYPE1 unk_00000[0x10000]; + /* 0x00000 */ u8 unk00000[0x14]; + /* 0x00014 */ s32 unk_00014; + /* 0x00018 */ u8 unk00018[0xFFE8]; /* 0x10000 */ u8 unk_10000; // named "game_started" in AC GCN decomp - /* 0x10001 */ UNK_TYPE1 unk_10001[0x3]; + /* 0x10001 */ u8 unk_10001; + /* 0x10002 */ u8 unk10002[0x1]; + /* 0x10003 */ u8 unk_10003; /* 0x10004 */ s32 unk_10004; // named "last_scene_no" in AC GCN decomp /* 0x10008 */ UNK_TYPE1 unk_10008[0x44]; /* 0x1004C */ CommonData_unk_1004C *unk_1004C; /* 0x10050 */ UNK_TYPE1 unk_10050[0x48]; /* 0x10098 */ CommonData_unk_10098 *unk_10098; - /* 0x1009C */ UNK_TYPE1 unk_1009C[0xAC]; - /* 0x10148 */ UNK_TYPE1 unk_10148[0x3]; + /* 0x1009C */ UNK_TYPE1 unk_1009C[0x48]; + /* 0x100E4 */ CommonData_100E4_Func* unk_100E4; + /* 0x100E8 */ u8 unk100E8[0x37]; + /* 0x1011F */ u8 unk_1011F; + /* 0x10120 */ u8 unk10120[0x1]; + /* 0x10121 */ u8 unk_10121; + /* 0x10122 */ u16 unk_10122; + /* 0x10124 */ u8 unk10124[0x14]; + /* 0x10138 */ CommonData10138* unk_10138; + /* 0x1013C */ u8 unk1013C[0xD]; + /* 0x10149 */ u8 unk_10149; + /* 0x1014A */ u8 unk_1014A; /* 0x1014B */ u8 unk_1014B; // named "wipeType" in AC GCN decomp /* 0x1014C */ UNK_TYPE1 unk_1014C[0x2]; /* 0x1014E */ s16 unk_1014E; /* 0x10150 */ UNK_TYPE1 unk_10150[0x664]; /* 0x107B4 */ UNK_TYPE1 unk_107B4[0x2]; /* 0x107B6 */ s16 unk_107B6; // named "demo_profile" in AC GCN decomp (though it's an array of two s16s in that game) - /* 0x107B8 */ UNK_TYPE1 unk_107B8[0x2F8]; + /* 0x107B8 */ u8 unk107B8[0x2C]; + /* 0x107E4 */ s16 unk_107E4; + /* 0x107E6 */ u8 unk107E6[0x29C]; + /* 0x10A82 */ s16 unk_10A82; + /* 0x10A84 */ u8 unk10A84[0x2C]; /* 0x10AB0 */ u8 unk_10AB0; // named "pad_connected" in AC GCN decomp /* 0x10AB1 */ UNK_TYPE1 unk_10AB1[0x7]; } CommonData; // size = 0x10AB8 diff --git a/include/m_debug_display.h b/include/m_debug_display.h index 9c978dc..b566f07 100644 --- a/include/m_debug_display.h +++ b/include/m_debug_display.h @@ -3,9 +3,11 @@ #include "ultra64.h" -// void Debug_Display_init(); +struct PlayState; + +void Debug_Display_init(void); // void Debug_Display_new(); -// void Debug_Display_output(); +void Debug_Display_output(struct PlayState* play); // void debug_display_output_sprite_16x16_I8(); // void debug_display_output_polygon(); diff --git a/include/m_event.h b/include/m_event.h index 78de237..9dafb1f 100644 --- a/include/m_event.h +++ b/include/m_event.h @@ -3,6 +3,17 @@ #include "ultra64.h" +typedef struct PlayState1EBC { + /* 0x00 */ u8 unk_00; + /* 0x01 */ u8 unk_01; + /* 0x02 */ u8 unk_02; + /* 0x03 */ u8 unk_03; + /* 0x04 */ s16 unk_04; + /* 0x06 */ s16 unk_06; + /* 0x08 */ s32 unk_08; + /* 0x0C */ s32 unk_0C; +} PlayState1EBC; // size = 0x10 + // void func_8007D140_jp(); // void func_8007D180_jp(); // void func_8007D1A8_jp(); @@ -81,12 +92,12 @@ s32 mEv_CheckTitleDemo(void); // void func_8007F358_jp(); // void func_8007F6A0_jp(); // void func_8007F764_jp(); -// void func_8007F858_jp(); +void func_8007F858_jp(PlayState1EBC* arg0); // void func_8007F8A4_jp(); -// void func_8007F8DC_jp(); +void mEv_2nd_init(PlayState1EBC* arg0); // void func_8007F950_jp(); -// void func_8007F988_jp(); -// void func_8007FB44_jp(); +void mEv_run(PlayState1EBC* arg0); +void mEv_finish(PlayState1EBC* arg0); // void func_8007FCB8_jp(); // void func_8007FD40_jp(); // void func_8007FDA8_jp(); diff --git a/include/m_field_make.h b/include/m_field_make.h index 114dd24..e983efb 100644 --- a/include/m_field_make.h +++ b/include/m_field_make.h @@ -34,8 +34,8 @@ // void func_80086F08_jp(); // void func_80086FA8_jp(); // void func_80086FEC_jp(); -// void func_80087004_jp(); -// void func_80087280_jp(); +void func_80087004_jp(void); +void func_80087280_jp(void); // void func_80087380_jp(); // void func_80087420_jp(); // void func_800874CC_jp(); diff --git a/include/m_handbill.h b/include/m_handbill.h index 2308263..a62b610 100644 --- a/include/m_handbill.h +++ b/include/m_handbill.h @@ -3,13 +3,15 @@ #include "ultra64.h" -// void func_800928C0_jp(); -// void func_800928E8_jp(); +struct PlayState; + +void Balloon_init(struct PlayState* play); +void Balloon_move(struct PlayState* play); // void func_80092B7C_jp(); // void func_80092B8C_jp(); // void func_80092BA0_jp(); // void func_80092BE8_jp(); -// void func_80092C2C_jp(); +void mHsRm_GetHuusuiRoom(s32 arg0, u8 arg1); // void func_80092D10_jp(); // void func_80092E14_jp(); // void func_80092E80_jp(); diff --git a/include/m_kankyo.h b/include/m_kankyo.h index 490796e..61b14a4 100644 --- a/include/m_kankyo.h +++ b/include/m_kankyo.h @@ -5,6 +5,7 @@ #include "unk.h" struct Actor; +struct LightContext; typedef void (*Kankyo_unk_C0)(struct Actor*); @@ -14,7 +15,11 @@ typedef struct Kankyo { /* 0x03 */ s8 unk_03; /* 0x04 */ s8 unk_04; /* 0x05 */ UNK_TYPE1 unk_05[0x3]; - /* 0x08 */ UNK_TYPE1 unk_08[0xB8]; + /* 0x08 */ UNK_TYPE1 unk_08[0xA6]; + /* 0xAE */ u8 unk_AE; + /* 0xAF */ u8 unk_AF; + /* 0xB0 */ u8 unk_B0; + /* 0xB1 */ UNK_TYPE1 unk_B1[0xF]; /* 0xC0 */ Kankyo_unk_C0 unk_C0; /* 0xC4 */ UNK_TYPE1 unk_C4[0x4]; } Kankyo; // size = 0xC8 @@ -26,7 +31,7 @@ typedef struct Kankyo { // void func_80096F5C_jp(); // void func_80097048_jp(); // void mEnv_RoomTypeLightSet(); -// void Global_kankyo_ct(); +void Global_kankyo_ct(struct PlayState* play, struct Kankyo* kankyo); // void mEnv_MakeShadowInfo(); // void mEnv_set_time(); // void func_800976BC_jp(); @@ -44,7 +49,7 @@ typedef struct Kankyo { // void func_800981B8_jp(); // void func_8009836C_jp(); // void func_800983F0_jp(); -// void func_800984CC_jp(); +void Global_kankyo_set(struct PlayState* play, struct Kankyo* kankyo, struct LightContext* arg2); // void func_80098558_jp(); // void func_8009867C_jp(); // void func_80098794_jp(); @@ -52,7 +57,7 @@ typedef struct Kankyo { // void func_80098980_jp(); // void func_80098990_jp(); // void func_80098A90_jp(); -// void func_80098B50_jp(); +void mEnv_WindMove(void); // void func_80098CCC_jp(); // void func_80098D88_jp(); // void func_80098DE0_jp(); diff --git a/include/m_lib.h b/include/m_lib.h index 3747eca..4666270 100644 --- a/include/m_lib.h +++ b/include/m_lib.h @@ -53,7 +53,7 @@ s16 search_position_angleY(Vec3f* arg0, Vec3f* arg1); // void add_calc_short_angle3(); // void adds(); // void rgba_t_move(); -// void none_proc1(); +UNK_RET none_proc1(void); // void none_proc2(); // void Cheap_gfx_display(); // void Cheap_gfx_display_xlu(); diff --git a/include/m_lights.h b/include/m_lights.h index 4b71bfa..fe7f898 100644 --- a/include/m_lights.h +++ b/include/m_lights.h @@ -4,6 +4,7 @@ #include "ultra64.h" #include "z64math.h" #include "unk.h" +#include "color.h" struct GraphicsContext; struct PlayState; @@ -12,9 +13,17 @@ typedef struct Lights { /* 0x00 */ UNK_TYPE1 unk_00[0x80]; } Lights; // size = 0x80 +typedef struct LightNode { + /* 0x00 */ char unk00[0xC]; +} LightNode; // size = 0xC + typedef struct LightContext { - /* 0x0 */ UNK_TYPE4 unk_0; -} LightContext; // size >= 0x4 + /* 0x0 */ LightNode* listHead; + /* 0x4 */ Color_RGB8 ambient; + /* 0x7 */ Color_RGB8 fogColor; + /* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - 996 + /* 0xC */ s16 zFar; // draw distance. range 0 - 12800 +} LightContext; // size = 0x10 // void func_8009B1E0_jp(); // void func_8009B23C_jp(); @@ -27,10 +36,10 @@ void LightsN_disp(Lights* light, struct GraphicsContext* gfxCtx); // void func_8009B534_jp(); // void func_8009B72C_jp(); // void func_8009B81C_jp(); -void LightsN_list_check(Lights* light, UNK_TYPE4 arg1, Vec3f* arg2); +void LightsN_list_check(Lights* light, LightNode* lightNode, Vec3f* arg2); // void func_8009B954_jp(); // void func_8009B9E0_jp(); -// void Global_light_ct(); +void Global_light_ct(LightContext* arg0); // void func_8009BA94_jp(); // void func_8009BAC0_jp(); Lights* Global_light_read(LightContext* lightCtx, struct GraphicsContext* gfxCtx); diff --git a/include/m_msg_main.h b/include/m_msg_main.h index 0472dda..84d62bc 100644 --- a/include/m_msg_main.h +++ b/include/m_msg_main.h @@ -3,6 +3,8 @@ #include "ultra64.h" +struct PlayState; + // void func_8009D1F0_jp(); // void func_8009D200_jp(); // void func_8009D210_jp(); @@ -281,11 +283,11 @@ // void func_800A3190_jp(); // void func_800A31D8_jp(); // void func_800A3220_jp(); -// void func_800A32D0_jp(); -// void func_800A3304_jp(); +void mMsg_ct(struct PlayState* play); +void func_800A3304_jp(struct PlayState* play); // void func_800A332C_jp(); -// void func_800A339C_jp(); -// void func_800A33D8_jp(); +void mMsg_Main(struct PlayState* play); +void mMsg_Draw(struct PlayState* play); // void func_800A3400_jp(); // void func_800A3420_jp(); // void func_800A345C_jp(); diff --git a/include/m_npc.h b/include/m_npc.h index 9e5ece4..6ed8cae 100644 --- a/include/m_npc.h +++ b/include/m_npc.h @@ -103,7 +103,7 @@ typedef struct Npc { // void func_800A9F9C_jp(); // void func_800AA028_jp(); // void func_800AA0B8_jp(); -// void func_800AA124_jp(); +void func_800AA124_jp(void); // void func_800AA14C_jp(); // void mNpc_GetLooks(); // void func_800AA218_jp(); diff --git a/include/m_pause.h b/include/m_pause.h index c44070e..eb2ce76 100644 --- a/include/m_pause.h +++ b/include/m_pause.h @@ -4,7 +4,7 @@ #include "ultra64.h" #include "libu64/pad.h" -typedef struct Pause{ +typedef struct Pause { /* 0x0 */ s32 enabled; /* 0x4 */ s32 timer; } Pause; // size = 0x8 diff --git a/include/m_player_lib.h b/include/m_player_lib.h index ccbf3e2..70b153d 100644 --- a/include/m_player_lib.h +++ b/include/m_player_lib.h @@ -6,7 +6,6 @@ struct Player; struct PlayState; - // void func_800B1160_jp(); // void func_800B11B0_jp(); // void func_800B11F8_jp(); @@ -34,7 +33,7 @@ struct PlayState; // void func_800B19C4_jp(); // void func_800B1A28_jp(); // void func_800B1A60_jp(); -// void func_800B1AA0_jp(); +void mPlib_Object_Exchange_keep_Player_dt(struct PlayState* play); // void func_800B1AE0_jp(); // void func_800B1B3C_jp(); // void func_800B1B6C_jp(); @@ -159,7 +158,7 @@ struct Player* get_player_actor_withoutCheck(struct PlayState* play); // void func_800B58C4_jp(); // void func_800B5910_jp(); // void func_800B593C_jp(); -// void func_800B594C_jp(); +void func_800B594C_jp(void); // void func_800B5980_jp(); // void func_800B5AA0_jp(); // void func_800B5AB8_jp(); diff --git a/include/m_scene_table.h b/include/m_scene_table.h new file mode 100644 index 0000000..aa21a3e --- /dev/null +++ b/include/m_scene_table.h @@ -0,0 +1,9 @@ +#ifndef M_SCENE_TABLE_H +#define M_SCENE_TABLE_H + +#include "ultra64.h" +#include "z64math.h" + +extern Struct_8010EAA0 scene_data_status[]; + +#endif diff --git a/include/m_view.h b/include/m_view.h index 966ca38..19a4a4e 100644 --- a/include/m_view.h +++ b/include/m_view.h @@ -3,27 +3,48 @@ #include "ultra64.h" +struct PlayState; +struct GraphicsContext; + +typedef struct PlayState1938 { + /* 0x000 */ char unk000[0x28]; + /* 0x028 */ Vec3f unk_028; + /* 0x034 */ char unk034[0x2C]; + /* 0x060 */ Mtx unk_060; + /* 0x0A0 */ Mtx unk_0A0; + /* 0x0E0 */ char unk0E0[0x40]; + /* 0x120 */ s32 unk_120; + /* 0x124 */ char unk124[0x4]; +} PlayState1938; // size = 0x128 + +typedef struct ScissorViewArg1 { + /* 0x00 */ s32 unk_00; + /* 0x04 */ s32 unk_04; + /* 0x08 */ s32 unk_08; + /* 0x0C */ s32 unk_0C; +} ScissorViewArg1; // size = 0x10 + // void set_viewport(); -// void initView(); +void initView(PlayState1938* arg0, struct GraphicsContext* gfxCtx); // void setLookAtView(); // void getLookAtView(); // void setScaleView(); // void getScaleView(); // void setPerspectiveView(); // void getPerspectiveView(); -// void setScissorView(); +void setScissorView(PlayState1938* arg0, ScissorViewArg1* arg1); // void getScissorView(); // void setScissorX(); // void setScissorOvl(); // void setScissor(); // void stretchViewInit(); // void do_stretch_view(); -// void showView(); +void showView(PlayState1938* arg0, s32 arg1, struct PlayState* play); // void showPerspectiveView(); // void showOrthoView(); // void showOverLayView(); // void showPerspectiveOverLayView(); // void showOrthoView1(); -// void showView1(); +void showView1(PlayState1938* arg0, s32 arg1, Gfx** gfx); #endif diff --git a/include/unknown_structs.h b/include/unknown_structs.h index 9b9403c..492de3f 100644 --- a/include/unknown_structs.h +++ b/include/unknown_structs.h @@ -5,6 +5,14 @@ #include "libc/stdint.h" #include "libc/stdbool.h" #include "unk.h" +#include "other_types.h" + +typedef struct Struct_8010EAA0 { + /* 0x00 */ RomOffset unk_00; + /* 0x04 */ RomOffset unk_04; + /* 0x08 */ char unk08[0xB]; + /* 0x13 */ u8 unk_13; +} Struct_8010EAA0; // size = 0x14 typedef struct struct_801161E8_jp { /* 0x0 */ UNK_TYPE1 unk_0[0x8]; diff --git a/include/version.h b/include/version.h new file mode 100644 index 0000000..5161084 --- /dev/null +++ b/include/version.h @@ -0,0 +1,8 @@ +#ifndef BUILD_H +#define BUILD_H + +extern const char __Creator__[]; +extern const char __DateTime__[]; +extern const char __MakeOption__[]; + +#endif |
