Remove certain common headers

common.h fully removed. common_structs.h incorporated into new game/gamework_data.h header along with parts of variables.h (Other parts were moved to more appropriate headers). functions.h split into unsplit.h and board_unsplit.h
This commit is contained in:
gamemasterplc 2024-01-06 15:28:47 -06:00
parent 6cc662ed1a
commit 2a1c4b808d
42 changed files with 77 additions and 120 deletions

View file

@ -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;

View file

@ -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);

View file

@ -1,9 +0,0 @@
#ifndef _COMMON_H_
#define _COMMON_H_
#include "types.h"
#include "common_structs.h"
#include "functions.h"
#include "variables.h"
#endif

View file

@ -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"

View file

@ -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

View file

@ -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;

View file

@ -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);
void fn_800814CC(s32);
#endif

View file

@ -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)();

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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;

View file

@ -1,7 +1,7 @@
#ifndef _GAME_MSM_H
#define _GAME_MSM_H
#include "common.h"
#include "dolphin.h"
typedef struct {
s32 unk00;

View file

@ -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);

30
include/unsplit.h Normal file
View file

@ -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

View file

@ -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