diff --git a/include/REL/w10Dll.h b/include/REL/w10Dll.h index 37d0b59e..967ae094 100644 --- a/include/REL/w10Dll.h +++ b/include/REL/w10Dll.h @@ -1,7 +1,10 @@ -#include "common.h" +#include "game/gamework_data.h" #include "dolphin.h" #include "REL/executor.h" #include "game/process.h" +#include "game/window.h" +#include "board_unsplit.h" +#include "unsplit.h" #define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) @@ -27,11 +30,6 @@ typedef struct w10DllUnk01 { f32 unk10; } w10DllUnk01; //sizeof ? -typedef struct m456DllUnk02 { - char unk00[0x5C]; - w10DllUnk01* unk5C; -} m456DllUnk02; //sizeof ? - typedef struct w10DllUnk03 { s16 unk0; s16 unk2; diff --git a/include/functions.h b/include/board_unsplit.h similarity index 57% rename from include/functions.h rename to include/board_unsplit.h index 8eebbadc..a8aa1322 100644 --- a/include/functions.h +++ b/include/board_unsplit.h @@ -1,49 +1,7 @@ -#ifndef _FUNCTIONS_H_ -#define _FUNCTIONS_H_ +#ifndef _UNSPLIT_BOARD_H +#define _UNSPLIT_BOARD_H #include "dolphin.h" -#include "common_structs.h" - -void Hu3DLayerHookSet(short layer, void (*func)(short layer)); -void Hu3D2Dto3D(Vec*, s32, Vec*); -void Hu3DBGColorSet(u8, u8, u8); -void Hu3DCameraCreate(s32); -void Hu3DCameraPerspectiveSet(s32, f32, f32, f32, f32); -void Hu3DCameraViewportSet(s32, f32, f32, f32, f32, f32, f32); -void HuAudFadeOut(s32 arg0); - -void Hu3DModelPosSet(s16 index, float x, float y, float z); -void Hu3DModelRotSet(s16 index, float x, float y, float z); -void Hu3DModelScaleSet(s16 index, float x, float y, float z); - -void espInit(void); -void espScaleSet(s16, f32, f32); -s16 espEntry(s32, s32, s32); -void espDispOff(s16); -void espKill(s16); -void espDispOn(s16); -void espPosSet(s16, f32, f32); - -void HuWinAllKill(void); -void HuWinKill(s16); -void HuWinPriSet(s16, s16); -void HuWinHomeClear(s16); -void HuWinMesPalSet(s16, u8, u8, u8, u8); -void HuWinMesSet(s16, u32); -void HuWinMesSpeedSet(s16, s16); -void HuWinMesMaxSizeGet(s16, f32*, ...); -s16 HuWinCreate(float x, float y, s16 w, s16 h, s16 frame); - -void HuAudFXListnerKill(void); -void HuAudDllSndGrpSet(u16 ovl); -void HuAudVoiceInit(s16 ovl); - -void MGSeqKillAll(void); - -void MGSeqPracticeStart(void); -void fn_8004D6F4(s16 arg); - -s32 rand8(void); void BoardCameraTargetModelSet(s16 model); void BoardCameraMotionStartEx(s16, Vec *, Vec *, f32, f32, s16); diff --git a/include/common.h b/include/common.h deleted file mode 100644 index 4875c13a..00000000 --- a/include/common.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _COMMON_H_ -#define _COMMON_H_ - -#include "types.h" -#include "common_structs.h" -#include "functions.h" -#include "variables.h" - -#endif \ No newline at end of file diff --git a/include/game/armem.h b/include/game/armem.h index df62b322..81b8e95c 100644 --- a/include/game/armem.h +++ b/include/game/armem.h @@ -1,7 +1,7 @@ #ifndef _GAME_ARMEM_H #define _GAME_ARMEM_H -#include "common.h" +#include "dolphin.h" #include "game/memory.h" #include "game/data.h" diff --git a/include/game/audio.h b/include/game/audio.h index feb6b44e..5c058fee 100644 --- a/include/game/audio.h +++ b/include/game/audio.h @@ -1,7 +1,7 @@ #ifndef _GAME_AUDIO_H #define _GAME_AUDIO_H -#include "common.h" +#include "dolphin.h" void HuAudInit(void); s32 HuAudStreamPlay(void); @@ -56,4 +56,6 @@ s32 HuAudCharVoicePlay(s16 arg0, s16 arg1); s32 HuAudCharVoicePlayPos(s16 arg0, s16 arg1, Vec *arg2); void HuAudCharVoicePlayEntry(s16 arg0, s16 arg1); +extern u8 fadeStat; + #endif diff --git a/include/game/board/basic_space.h b/include/game/board/basic_space.h index b89f97cb..4b9eb529 100644 --- a/include/game/board/basic_space.h +++ b/include/game/board/basic_space.h @@ -1,11 +1,8 @@ #ifndef _BOARD_BASIC_SPACE_H #define _BOARD_BASIC_SPACE_H -#include "common.h" -#include "math.h" +#include "dolphin.h" #include "game/process.h" -#include "game/audio.h" -#include "game/object.h" extern Process *boardObjMan; diff --git a/include/game/board/warp.h b/include/game/board/warp.h index 6d9d8b2e..36f70547 100644 --- a/include/game/board/warp.h +++ b/include/game/board/warp.h @@ -1,7 +1,8 @@ -#include "common.h" +#ifndef _BOARD_WARP_H +#define _BOARD_WARP_H + #include "game/process.h" #include "game/wipe.h" -#include "math.h" void fn_80080D54(s32); void fn_80080DF8(void); @@ -10,4 +11,6 @@ void fn_800810A4(s32); void fn_800811BC(s32); void fn_80081278(s32); void fn_80081428(s32); -void fn_800814CC(s32); \ No newline at end of file +void fn_800814CC(s32); + +#endif \ No newline at end of file diff --git a/include/game/board/window.h b/include/game/board/window.h index c278da62..b77cc8c0 100644 --- a/include/game/board/window.h +++ b/include/game/board/window.h @@ -1,10 +1,8 @@ #ifndef _BOARD_WINDOW_H #define _BOARD_WINDOW_H -#include "common.h" #include "game/window.h" #include "game/process.h" -#include "game/gamework.h" typedef void (*BoardWinComKeyFunc)(); diff --git a/include/game/data.h b/include/game/data.h index 36791bf4..612f11fb 100644 --- a/include/game/data.h +++ b/include/game/data.h @@ -63,5 +63,6 @@ void *HuDataReadNumHeapShortForce(s32 data_id, s32 num, HeapID heap); void HuDecodeData(void *src, void *dst, u32 size, int decode_type); +extern u32 DirDataSize; #endif \ No newline at end of file diff --git a/include/common_structs.h b/include/game/gamework_data.h similarity index 95% rename from include/common_structs.h rename to include/game/gamework_data.h index e2d63c34..ab9433fe 100644 --- a/include/common_structs.h +++ b/include/game/gamework_data.h @@ -1,7 +1,6 @@ -#ifndef _COMMON_STRUCTS_H -#define _COMMON_STRUCTS_H +#ifndef _GAMEWORK_DATA_H +#define _GAMEWORK_DATA_H -#include "types.h" #include "dolphin.h" typedef struct player_config { @@ -143,4 +142,9 @@ typedef struct game_stat { }; } GameStat; +extern PlayerConfig GWPlayerCfg[4]; +extern PlayerState GWPlayer[4]; +extern SystemState GWSystem; +extern GameStat GWGameStat; + #endif diff --git a/include/game/hsfanim.h b/include/game/hsfanim.h index d519a890..46c41f0a 100644 --- a/include/game/hsfanim.h +++ b/include/game/hsfanim.h @@ -1,7 +1,6 @@ #ifndef GAME_HSFANIM_H #define GAME_HSFANIM_H -#include "common.h" #include "game/hsfformat.h" #include "game/hsfman.h" #include "game/sprite.h" diff --git a/include/game/hsfman.h b/include/game/hsfman.h index 02f151da..aeb7e68d 100644 --- a/include/game/hsfman.h +++ b/include/game/hsfman.h @@ -1,7 +1,6 @@ #ifndef _GAME_HSFMAN_H #define _GAME_HSFMAN_H -#include "common.h" #include "math.h" #include "game/memory.h" #include "game/hsfanim.h" @@ -283,6 +282,7 @@ extern MotionData Hu3DMotion[0x100]; extern u32 totalMatCnt; extern u32 totalMatCnted; extern u32 totalPolyCnt; +extern u32 totalPolyCnted; extern u32 totalTexCacheCnt; extern u32 totalTexCacheCnted; extern u32 totalTexCnt; diff --git a/include/game/msm.h b/include/game/msm.h index 826c4f80..f1c0f006 100644 --- a/include/game/msm.h +++ b/include/game/msm.h @@ -1,7 +1,7 @@ #ifndef _GAME_MSM_H #define _GAME_MSM_H -#include "common.h" +#include "dolphin.h" typedef struct { s32 unk00; diff --git a/include/game/saveload.h b/include/game/saveload.h index 9581fbcd..10b3af30 100644 --- a/include/game/saveload.h +++ b/include/game/saveload.h @@ -1,7 +1,7 @@ #ifndef _GAME_SAVELOAD_H #define _GAME_SAVELOAD_H -#include "common.h" +#include "dolphin.h" s32 SLFileOpen(char *arg0); s32 SLFileCreate(char *arg0, u32 arg1, void *arg2); diff --git a/include/unsplit.h b/include/unsplit.h new file mode 100644 index 00000000..06e6374f --- /dev/null +++ b/include/unsplit.h @@ -0,0 +1,30 @@ +#ifndef _UNSPLIT_H +#define _UNSPLIT_H + +#include "dolphin.h" + +void Hu3D2Dto3D(Vec*, s32, Vec*); +void HuAudFadeOut(s32 arg0); + +void Hu3DModelPosSet(s16 index, float x, float y, float z); +void Hu3DModelRotSet(s16 index, float x, float y, float z); +void Hu3DModelScaleSet(s16 index, float x, float y, float z); + +void espInit(void); +void espScaleSet(s16, f32, f32); +s16 espEntry(s32, s32, s32); +void espDispOff(s16); +void espKill(s16); +void espDispOn(s16); +void espPosSet(s16, f32, f32); + +void HuAudFXListnerKill(void); +void HuAudDllSndGrpSet(u16 ovl); +void HuAudVoiceInit(s16 ovl); + +void MGSeqKillAll(void); + +void MGSeqPracticeStart(void); +void fn_8004D6F4(s16 arg); + +#endif diff --git a/include/variables.h b/include/variables.h deleted file mode 100644 index fdb9b433..00000000 --- a/include/variables.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _VARIABLES_H -#define _VARIABLES_H - -#include "dolphin.h" -#include "common_structs.h" - - -extern PlayerConfig GWPlayerCfg[4]; - - -extern u32 DirDataSize; - -extern u32 totalPolyCnted; -extern u8 fadeStat; - -extern PlayerState GWPlayer[4]; -extern SystemState GWSystem; -extern GameStat GWGameStat; - -#endif diff --git a/src/REL/_minigameDLL/_minigameDLL.c b/src/REL/_minigameDLL/_minigameDLL.c index 8b5be5a5..0100af99 100644 --- a/src/REL/_minigameDLL/_minigameDLL.c +++ b/src/REL/_minigameDLL/_minigameDLL.c @@ -1,4 +1,3 @@ -#include "common.h" #include "REL/executor.h" #include "dolphin/os.h" diff --git a/src/REL/bootDll/nintendo_data.c b/src/REL/bootDll/nintendo_data.c index 4e7ff5f1..5cb14723 100644 --- a/src/REL/bootDll/nintendo_data.c +++ b/src/REL/bootDll/nintendo_data.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/data.h" #include "logoNintendoData.inc" diff --git a/src/game/audio.c b/src/game/audio.c index 07a75580..25b3006b 100644 --- a/src/game/audio.c +++ b/src/game/audio.c @@ -3,7 +3,7 @@ #include "game/msm.h" #include "game/object.h" #include "game/wipe.h" - +#include "game/gamework_data.h" typedef struct { /* 0x00 */ s16 unk00; diff --git a/src/game/board/basic_space.c b/src/game/board/basic_space.c index 9b96f26c..6df6c406 100644 --- a/src/game/board/basic_space.c +++ b/src/game/board/basic_space.c @@ -1,7 +1,9 @@ #include "game/board/basic_space.h" #include "game/data.h" #include "game/flag.h" - +#include "game/object.h" +#include "game/gamework_data.h" +#include "board_unsplit.h" #include "math.h" typedef struct bit_copy { diff --git a/src/game/board/warp.c b/src/game/board/warp.c index 511edae7..96f4c8fe 100644 --- a/src/game/board/warp.c +++ b/src/game/board/warp.c @@ -1,4 +1,7 @@ #include "game/board/warp.h" +#include "game/gamework_data.h" +#include "board_unsplit.h" +#include "math.h" extern void omVibrate(s16, s16, s16, s16); extern void fn_800816CC(s32, s32); diff --git a/src/game/board/window.c b/src/game/board/window.c index 576ab58b..8bd41ae7 100644 --- a/src/game/board/window.c +++ b/src/game/board/window.c @@ -1,4 +1,5 @@ #include "game/board/window.h" +#include "game/gamework_data.h" extern s32 BoardPlayerIsAllCom(void); extern Process* boardMainProc; diff --git a/src/game/data.c b/src/game/data.c index 575805d9..5f55fd6f 100644 --- a/src/game/data.c +++ b/src/game/data.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/data.h" #include "game/armem.h" #include "dolphin/dvd.h" diff --git a/src/game/decode.c b/src/game/decode.c index b55eb9ef..575249b6 100644 --- a/src/game/decode.c +++ b/src/game/decode.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/data.h" #include "dolphin/os.h" diff --git a/src/game/dvd.c b/src/game/dvd.c index 31d58430..506924ae 100644 --- a/src/game/dvd.c +++ b/src/game/dvd.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/dvd.h" #include "game/data.h" diff --git a/src/game/flag.c b/src/game/flag.c index c9b8c8d4..f5168ef5 100644 --- a/src/game/flag.c +++ b/src/game/flag.c @@ -1,4 +1,5 @@ -#include "common.h" +#include "dolphin.h" +#include "game/gamework_data.h" static u8 _Sys_Flag[16]; diff --git a/src/game/frand.c b/src/game/frand.c index 3cee1af9..ca352d6d 100644 --- a/src/game/frand.c +++ b/src/game/frand.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "dolphin.h" static u32 frand_seed; diff --git a/src/game/gamework.c b/src/game/gamework.c index 5673067b..3bf28b97 100644 --- a/src/game/gamework.c +++ b/src/game/gamework.c @@ -1,6 +1,6 @@ -#include "common.h" #include "string.h" #include "game/gamework.h" +#include "game/gamework_data.h" #include "game/flag.h" GameStat GWGameStatDefault; diff --git a/src/game/init.c b/src/game/init.c index 443afebd..465a5bef 100644 --- a/src/game/init.c +++ b/src/game/init.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/init.h" #include "dolphin/os.h" #include "dolphin/gx.h" diff --git a/src/game/main.c b/src/game/main.c index 92d38265..1e0e3415 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "game/gamework_data.h" #include "game/dvd.h" #include "game/printfunc.h" #include "game/object.h" diff --git a/src/game/malloc.c b/src/game/malloc.c index 4ae860e2..4eb3be59 100644 --- a/src/game/malloc.c +++ b/src/game/malloc.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/memory.h" #include "game/init.h" #include "dolphin/os.h" diff --git a/src/game/memory.c b/src/game/memory.c index 56201187..d7c0374d 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/memory.h" #include "dolphin/os.h" diff --git a/src/game/messdata.c b/src/game/messdata.c index b09116d0..b2d2c25a 100644 --- a/src/game/messdata.c +++ b/src/game/messdata.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "dolphin.h" static void *MessData_MesDataGet(void *messdata, u32 id) { diff --git a/src/game/objmain.c b/src/game/objmain.c index afe4efb8..f253bf13 100644 --- a/src/game/objmain.c +++ b/src/game/objmain.c @@ -1,4 +1,5 @@ -#include "common.h" +#include "game/audio.h" +#include "game/hsfman.h" #include "game/printfunc.h" #include "game/object.h" #include "game/pad.h" diff --git a/src/game/ovllist.c b/src/game/ovllist.c index d20c6245..e64fdd34 100644 --- a/src/game/ovllist.c +++ b/src/game/ovllist.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/dvd.h" #include "game/object.h" diff --git a/src/game/pad.c b/src/game/pad.c index 38b3e0c1..139e879f 100644 --- a/src/game/pad.c +++ b/src/game/pad.c @@ -1,4 +1,3 @@ -#include "common.h" #include "dolphin.h" #include "game/msm.h" #include "game/pad.h" diff --git a/src/game/printfunc.c b/src/game/printfunc.c index bf8a9c4e..b1924299 100644 --- a/src/game/printfunc.c +++ b/src/game/printfunc.c @@ -1,4 +1,3 @@ -#include "common.h" #include "dolphin.h" #include "game/printfunc.h" #include "game/init.h" diff --git a/src/game/process.c b/src/game/process.c index 20d286f5..00811161 100644 --- a/src/game/process.c +++ b/src/game/process.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/process.h" #include "game/memory.h" #include "dolphin/os.h" diff --git a/src/game/saveload.c b/src/game/saveload.c index dce185aa..e12b3f39 100644 --- a/src/game/saveload.c +++ b/src/game/saveload.c @@ -4,6 +4,7 @@ #include "game/window.h" #include "game/flag.h" #include "game/card.h" +#include "game/gamework_data.h" #include "string.h" diff --git a/src/game/sprman.c b/src/game/sprman.c index dbe1da85..5728d60b 100644 --- a/src/game/sprman.c +++ b/src/game/sprman.c @@ -1,4 +1,3 @@ -#include "common.h" #include "game/sprite.h" #include "game/memory.h" #include "game/init.h" diff --git a/src/game/sprput.c b/src/game/sprput.c index 075ab771..faf8ea73 100644 --- a/src/game/sprput.c +++ b/src/game/sprput.c @@ -1,5 +1,5 @@ -#include "common.h" #include "game/sprite.h" +#include "game/hsfman.h" #include "game/init.h" #include "dolphin/mtx.h" #include "dolphin/gx.h" diff --git a/src/game/window.c b/src/game/window.c index 78a63ead..92d30fa4 100644 --- a/src/game/window.c +++ b/src/game/window.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "game/gamework_data.h" #include "game/window.h" #include "game/sprite.h"