This commit is contained in:
CreateSource 2024-02-24 20:10:38 -05:00
commit 63d8ae0a29
116 changed files with 21323 additions and 1302 deletions

19
include/game/board/audio.h Executable file
View file

@ -0,0 +1,19 @@
#ifndef _BOARD_AUDIO_H
#define _BOARD_AUDIO_H
#include "dolphin/types.h"
void BoardMusStartBoard(void);
void BoardMusStart(s32 arg0, s32 arg1, s8 arg2, u16 arg3);
void BoardAudSeqFadeOutFast(s32 arg0);
void BoardAudSeqFadeOut(s32 arg0, u16 arg1);
void BoardMusLoudSet(s32 arg0, s32 arg1);
void BoardMusVolPanSet(s32 arg0, s8 arg1, u16 arg2);
void BoardAudSeqPause(s32 arg0, s32 arg1, u16 arg2);
s32 BoardMusStatusGet(s32 arg0);
void BoardAudSeqClear(void);
void BoardAudSeqFadeOutAll(void);
void BoardAudFXPlay(void);
void BoardAudFXStop(void);
#endif

18
include/game/board/boo.h Executable file
View file

@ -0,0 +1,18 @@
#ifndef _BOARD_BOO_H
#define _BOARD_BOO_H
#include "dolphin.h"
#include "game/object.h"
s16 BoardBooCreate(s32 arg0, Vec *arg1);
void BoardBooKill(void);
s32 BoardBooStealTypeSet(s32 arg0);
s32 BoardBooStealMain(void);
BOOL CheckBallCoinDone(void);
void TakeBallStar(void);
void ExecTakeBallStar(omObjData *arg0);
BOOL CheckTakeBallStarDone(void);
s32 BoardBooStealValueGet(s16 *arg0, s16 *arg1);
BOOL BoardBooStealLightCheck(void);
#endif

19
include/game/board/com.h Executable file
View file

@ -0,0 +1,19 @@
#ifndef _BOARD_COM_H
#define _BOARD_COM_H
#include "dolphin.h"
void BoardComKeySetLeft(void);
void BoardComKeySetRight(void);
void BoardComKeySetUp(void);
void BoardComKeySetDown(void);
s8 BoardComPreferItemGet(s32 arg0, s8 *arg1, s8 arg2);
s8 BoardComPreferItemCheck(s32 arg0, s8 arg1, s8 arg2, s8 arg3);
s32 BoardComItemWeightGet(s32 arg0, s32 arg1);
s32 BoardComTutorialItemGet(s32 arg0);
s32 BoardComUseItemSet(s32 arg0, s32 arg1);
BOOL BoardComUseItemCheck(s32 arg0);
s32 BoardComJunctionInputGet(s32 arg0, Vec *arg1, s32 arg2, float *arg3);
s32 BoardComBestPlayerFind(void);
#endif

11
include/game/board/com_path.h Executable file
View file

@ -0,0 +1,11 @@
#ifndef _BOARD_COM_PATH_H
#define _BOARD_COM_PATH_H
#include "dolphin/types.h"
s16 BoardComPathReachCheck(s16 arg0, u32 arg1, s32 arg2);
s16 BoardComPathBestGet(s16 arg0);
s16 BoardComPathLenGet(s16 arg0, s16 arg1);
s16 BoardComPathW20BestGet(s16 arg0, u32 arg1, s16 arg2);
#endif

11
include/game/board/item.h Executable file
View file

@ -0,0 +1,11 @@
#ifndef _BOARD_ITEM_H
#define _BOARD_ITEM_H
#include "dolphin/types.h"
void BoardItemStart(s32 arg0, s32 arg1);
BOOL BoardItemDoneCheck(void);
void BoardItemPlayerRestore(s32 arg0, s32 arg1);
void BoardItemBagItemSet(s16 *arg0);
#endif

View file

@ -77,6 +77,8 @@ typedef void (*BoardCameraPosCalcFunc)(BoardCameraData *camera);
typedef void (*BoardTurnStartHook)(s32 player, s32 space);
extern BoardTurnStartHook boardTurnStartFunc;
extern void (*boardStarShowNextHook)(void);
extern void (*boardStarGiveHook)(void);
extern BoardFunc boardTurnFunc;
extern BoardLightHook boardLightResetHook;
extern BoardLightHook boardLightSetHook;
@ -87,8 +89,8 @@ s32 BoardIsKill(void);
void BoardPauseDisableSet(s32 value);
s32 BoardPauseDisableGet();
void BoardSaveInit(s32 board);
void BoardStoryConfigSet(s32 mg_type, s32 diff_story);
void BoardPartyConfigSet(s32 team, s32 bonus_star, s32 mg_type, s32 max_turn, s32 p1_handicap, s32 p2_handicap, s32 p3_handicap, s32 p4_handicap);
void BoardStoryConfigSet(s32 mg_list, s32 diff_story);
void BoardPartyConfigSet(s32 team, s32 bonus_star, s32 mg_list, s32 max_turn, s32 p1_handicap, s32 p2_handicap, s32 p3_handicap, s32 p4_handicap);
s32 BoardTurnNext(void);
void BoardNextOvlSet(OverlayID overlay);
s32 BoardStartCheck(void);

View file

@ -34,8 +34,19 @@ s32 BoardModelAmbSet(s16 model, float r, float g, float b);
s32 BoardModelExistCheck(s16 model, s32 arg1);
s32 BoardModelExistDupe(s16 model, s32 arg1);
s32 fn_8006DDE8(s16 model, float arg1);
s32 BoardModelMotionCreate(s16 model, s32 data_num);
s32 BoardModelMotionKill(s16 model, s32 motion);
s32 BoardModelMotionStartEndSet(s16 model, s16 start, s16 end);
s32 BoardModelMotionStart(s16 model, s32 slot, u32 attr);
s32 BoardModelMotionShiftSet(s16 model, s32 motion, float time, float shift_time, u32 attr);
s32 BoardModelAttrSet(s16 model, u32 attr);
s32 BoardModelMotionTimeSet(s16 model, float time);
float BoardModelMotionTimeGet(s16 model);
float BoardModelMotionMaxTimeGet(s16 model);
s32 BoardModelMotionSpeedSet(s16 model, float speed);
s32 BoardModelMotionEndCheck(s16 model);
s32 BoardModelAlphaSet(s16 model, u8 alpha);
s32 BoardModelRotYSet(s16 model, float rot);
s32 BoardModelPosSet(s16 model, float x, float y, float z);
s32 BoardModelPosSetV(s16 model, Vec *pos);
s32 BoardModelRotSet(s16 model, float x, float y, float z);

10
include/game/board/pause.h Executable file
View file

@ -0,0 +1,10 @@
#ifndef _BOARD_PAUSE_H
#define _BOARD_PAUSE_H
#include "dolphin/types.h"
void BoardPauseStart(void);
BOOL BoardPauseActiveCheck(void);
BOOL BoardPauseReqCheck(void);
#endif

View file

@ -139,6 +139,7 @@ void BoardPlayerAutoSizeSet(s32, s32);
void BoardPlayerCopyMat(s32);
void BoardBowserSuitKill(s32);
void SetRollPlayerSize(s32);
void BoardDiceDigit2DInit(s32, s32);
void BoardDiceDigit2DUpdateEnable(s32);
s32 DoSparkSpace(s32, s16*);
s32 MegaPlayerPassFunc(s32, s16);

18
include/game/board/roll.h Executable file
View file

@ -0,0 +1,18 @@
#ifndef _BOARD_ROLL_H
#define _BOARD_ROLL_H
#include "dolphin/types.h"
s32 BoardRollExec(s32 arg0);
void BoardRollKill(void);
void BoardRollUPauseSet(s32 arg0);
void BoardRollWinDispSet(s32 arg0);
s16 BoardDiceEffectCreate(void);
void BoardDicePauseAll(void);
BOOL BoardDiceDoneCheck(void);
void BoardDiceStop(s32 arg0);
void BoardDiceVisibleSet(s32 arg0, s32 arg1);
void BoardDiceValueSet(s32 arg0, s32 arg1);
void BoardRollTutorialSet(s16 *arg0);
#endif

View file

@ -53,4 +53,6 @@ s32 BoardSpaceStarCheck(s32 index);
void BoardSpaceLandExec(s32 player, s32 space);
void BoardSpaceBlockPosSet(void);
extern s16 boardSpaceStarTbl[8];
#endif

14
include/game/board/star.h Executable file
View file

@ -0,0 +1,14 @@
#ifndef _BOARD_START_H
#define _BOARD_START_H
#include "game/board/space.h"
#include "dolphin.h"
void BoardStarHostSet(s16 arg0);
s16 BoardStarHostMdlGet(void);
void BoardStarExec(s32 arg0, BoardSpace *arg1);
void BoardStarGive(s32 arg0, Vec *arg1);
void BoardStarShowNext(s32 arg0);
#endif

29
include/game/board/tutorial.h Executable file
View file

@ -0,0 +1,29 @@
#ifndef _BOARD_TUTORIAL_H
#define _BOARD_TUTORIAL_H
#include "dolphin/types.h"
void BoardTutorialInit(void);
void BoardTutorialKill(void);
void BoardTutorialHookSet(void *arg0);
void BoardTutorialHookExec(s16 arg0, s32 arg1);
void BoardTutorialPlayerInit(void);
void BoardTutorialWorkSave(void);
void BoardTutorialWorkRestore(void);
void BoardTutorialDirInputSet(s8 arg0, s8 arg1, s16 arg2);
void BoardTutorialBlockSetPos(s32 arg0, s8 arg1);
void BoardTutorialItemSet(s8 arg0);
void BoardTutorialHostSet(s16 arg0);
void BoardTutorialHostHide(s8 arg0);
extern s32 boardTutorialData[4];
extern s8 boardTutorialDirInputX;
extern s8 boardTutorialDirInputY;
extern s16 boardTutorialDirInputTime;
extern s32 boardTutorialBlockPos;
extern s8 boardTutorialBlockItem;
extern s8 boardTutorialBlockF;
extern s8 boardTutorialUseItem;
extern s8 boardTutorialF;
#endif

View file

@ -28,9 +28,12 @@ void BoardPickerBackFlagSet(s32 arg0);
BOOL BoardPickerDoneCheck(void);
s32 BoardPickerPosGet(Vec *arg0);
s32 BoardPickerChoiceGet(void);
void BoardYourTurnExec(s32 arg0);
s32 BoardItemUseExec(s32 arg0);
void BoardMakeRandomItem(void);
void BoardItemGetDestPos(s32 arg0, Vec *arg1);
void BoardItemStatusKill(s32 arg0);
extern s8 boardItemUser;
#endif

15
include/game/board/view.h Executable file
View file

@ -0,0 +1,15 @@
#ifndef _BOARD_VIEW_H
#define _BOARD_VIEW_H
#include "dolphin.h"
void BoardViewOverheadExec(s32 arg0);
void BoardViewFocusGetPos(Vec *arg0);
void BoardViewFocusSet(Vec *arg0, u16 arg1);
void BoardViewMoveStart(Vec *arg0, Vec *arg1, u16 arg2);
BOOL BoardViewMoveCheck(void);
void BoardViewMoveEnd(void);
void BoardViewWait(void);
void BoardViewMapExec(s32 arg0);
#endif

View file

@ -12,6 +12,7 @@ void BoardWinKillAll(void);
void BoardWinDestroy(void);
void BoardWinProc(void);
int BoardWinChoiceGet(void);
void BoardWinPause(void);
void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice);
void BoardWinCreate(s32 pos, u32 mess, s32 portrait);
void BoardWinInsertMesSet(u32 value, s32 index);

47
include/game/chrman.h Executable file
View file

@ -0,0 +1,47 @@
#ifndef _GAME_CHRMAN_H
#define _GAME_CHRMAN_H
#include "dolphin.h"
void CharManInit(void);
void *CharAMemPtrGet(s16 character);
void CharARAMOpen(s16 character);
void CharARAMClose(s16 character);
void CharKill(s16 arg0);
void CharKillAll(void);
s16 CharModelCreate(s16 character, s16 lod);
s16 CharModelMotionCreate(s16 character, s32 arg1);
void CharModelMotionIndexSet(s16 character, s16 arg1, s32 arg2);
void CharModelMotionKill(s16 character, u32 motion);
void CharModelMotionDataClose(s16 character);
void CharModelDataClose(s16 arg0);
void CharModelKill(s16 character);
void CharModelMotionSet(s16 character, s16 motion);
void CharModelTexAnimSet(s16 character);
char **CharModelTexNameGet(s16 arg0, s16 arg1);
char *CharModelHookNameGet(s16 arg0, s16 arg1, s16 arg2);
void CharModelMotionTimeSet(s16 character, float time);
float CharModelMotionTimeGet(s16 character);
float CharModelMotionMaxTimeGet(s16 character);
s32 CharModelMotionEndCheck(s16 character);
s16 CharModelMotionShiftIDGet(s16 character);
void CharModelMotionShiftSet(s16 character, s16 motion, float time, float shift_time, u32 attr);
float CharModelMotionShiftTimeGet(s16 character);
void CharModelMotionSpeedSet(s16 character, float speed);
void CharModelLayerSetAll(s16 arg0);
void CharModelItemHookCreate(s16 character, char *arg1);
void CharModelEffectCreate(s16 arg0, Vec *arg1);
void CharModelCoinEffectCreate(s16 arg0, Vec *arg1);
void fn_8004EC74(s16 character);
void fn_8004EDA4(s16 arg0, Vec *arg1, Vec *arg2);
void fn_8004F058(s16 character);
void fn_8004F13C(s16 arg0, Vec *arg1, Vec *arg2);
void CharModelLayerSetAll2(s16 arg0);
void CharModelVoiceEnableSet(s16 character, s16 motion, s32 flag);
void fn_8004F52C(s16 character, s32 arg1);
void CharModelEffectEnableSet(s16 character, s32 arg1);
s32 CharModelEffectNpcInit(s16 arg0, s16 arg1, s16 arg2, s16 arg3);
s32 CharModelEffectNpcInitSilent(s16 arg0, s16 arg1, s16 arg2);
void CharModelStepTypeSet(s16 character, s32 arg1);
#endif

View file

@ -3,6 +3,8 @@
#include "game/dvd.h"
#include "datadir_enum.h"
#define DATA_DECODE_NONE 0
#define DATA_DECODE_LZ 1
#define DATA_DECODE_SLIDE 2
@ -10,21 +12,10 @@
#define DATA_DECODE_FSLIDE 4
#define DATA_DECODE_RLE 5
#define MAKE_DATA_NUM(dir, file) (((dir) << 16)+(file))
#define MAKE_DIR_NUM(dir) ((dir) << 16)
#define DATA_NUM_LISTEND -1
#include "dolphin/types.h"
#define DATADIR_DEFINE(name, path) name,
typedef enum {
#include "datadir_table.h"
DATADIR_COUNT
} DataDirID;
#undef DATADIR_DEFINE
typedef struct data_read_stat {
s32 dir_id;

9
include/game/fault.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef _GAME_FAULT_H
#define _GAME_FAULT_H
#include "game/gamework_data.h"
void HuFaultInitXfbDirectDraw(GXRenderModeObj *mode);
void HuFaultSetXfbAddress(s16 index, void* value);
#endif

View file

@ -1,6 +1,8 @@
#ifndef _GAME_FLAG_H
#define _GAME_FLAG_H
#include "dolphin/types.h"
#define FLAG_ID_MAKE(group, index) (((group) << 16)|(index))
s32 _CheckFlag(u32 flag);

View file

@ -21,7 +21,7 @@ typedef struct system_state {
u16 bonus_star : 1;
u16 explain_mg : 1;
u16 show_com_mg : 1;
u16 mg_type : 2;
u16 mg_list : 2;
u16 mess_speed : 2;
u16 save_mode : 2;
};
@ -45,7 +45,7 @@ typedef struct system_state {
};
/* 0x32 */ s8 unk_32;
/* 0x34 */ u16 mg_next;
/* 0x36 */ s16 mg_next_extra;
/* 0x36 */ s16 mg_next_type;
/* 0x38 */ u16 unk_38;
/* 0x3A */ u8 flag[3][16];
/* 0x6A */ u8 unk_6A[0x72];
@ -152,14 +152,34 @@ static inline s32 GWTeamGet(void)
return GWSystem.team;
}
static inline s32 GWPartyGet(void)
{
return GWSystem.party;
}
static inline s32 GWLanguageGet(void)
{
return GWGameStat.language;
}
static inline s32 GWMGTypeGet(void)
static inline s32 GWRumbleGet(void)
{
return GWSystem.mg_type;
return GWGameStat.rumble;
}
static inline s32 GWMGExplainGet(void)
{
return GWSystem.explain_mg;
}
static inline s32 GWMGShowComGet(void)
{
return GWSystem.show_com_mg;
}
static inline s32 GWMGListGet(void)
{
return GWSystem.mg_list;
}
static inline s32 GWMessSpeedGet(void)
@ -167,6 +187,11 @@ static inline s32 GWMessSpeedGet(void)
return GWSystem.mess_speed;
}
static inline s32 GWTurnGet(void)
{
return GWSystem.turn;
}
static inline s32 GWBoardGet(void)
{
return GWSystem.board;
@ -177,4 +202,9 @@ static inline s32 GWPlayerTeamGet(s32 player)
return GWPlayer[player].team;
}
static inline s32 GWPlayerSpaceCurrGet(s32 player)
{
return GWPlayer[player].space_curr;
}
#endif

View file

@ -29,7 +29,9 @@ typedef struct {
typedef struct particle_data {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ char unk_04[0x1C];
/* 0x04 */ float unk_04;
/* 0x08 */ char unk_08[0x14];
/* 0x1C */ void *unk_1C;
/* 0x20 */ s16 unk_20;
/* 0x22 */ s16 unk_22;
/* 0x24 */ float unk_24;
@ -39,7 +41,7 @@ typedef struct particle_data {
/* 0x2E */ char unk_2E[2];
/* 0x30 */ s16 unk_30;
/* 0x32 */ char unk_32[2];
/* 0x34 */ s32 unk_34;
/* 0x34 */ u32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ u32 unk_3C;
/* 0x40 */ s32 unk_40;
@ -115,6 +117,7 @@ void Hu3DParticleZRotSet(s16 arg0, float arg1);
void Hu3DParticleColSet(s16 arg0, u8 arg1, u8 arg2, u8 arg3);
void Hu3DParticleTPLvlSet(s16 arg0, float arg1);
void Hu3DParticleBlendModeSet(s16 arg0, u8 arg1);
void Hu3DParticleHookSet(s16 arg0, void *arg1);
void Hu3DParticleAttrSet(s16 arg0, u8 arg1);
void Hu3DParticleAttrReset(s16 arg0, u8 arg1);
void Hu3DParticleAnimModeSet(s16 arg0, s16 arg1);

View file

@ -49,6 +49,8 @@ HsfObject *Hu3DObjDuplicate(HsfData *arg0, u32 arg1);
void Hu3DModelObjDrawInit(void);
void Hu3DModelObjDraw(s16 arg0, char *arg1, Mtx arg2);
extern Vec PGMaxPos;
extern Vec PGMinPos;
extern u32 totalPolyCnt;
extern u32 totalPolyCnted;
extern u32 totalMatCnt;

View file

@ -145,20 +145,16 @@ typedef struct hsf_vertex_buf {
void *data;
} HsfBuffer;
typedef struct hsf_tristrip {
u16 data[4];
} HsfTristrip;
typedef struct hsf_face {
u16 type;
u16 mat;
u16 indices[12];
s16 type;
s16 mat;
union {
struct {
s16 indices[3][4];
u32 count;
HsfTristrip *data;
s16 *data;
} strip;
u16 ext_indices[4];
s16 indices[4][4];
};
float nbt[3];
} HsfFace;
@ -290,7 +286,7 @@ typedef struct hsf_object_data {
HsfBuffer **vertexShape;
u32 clusterCnt;
HsfCluster **cluster;
u32 hook;
u32 cenvCnt;
HsfCenv *cenv;
void *file[2];
} HsfObjectData;
@ -378,7 +374,7 @@ typedef struct hsf_map_attr {
float minZ;
float maxX;
float maxZ;
s16 *data;
u16 *data;
u32 dataLen;
} HsfMapAttr;

View file

@ -135,6 +135,7 @@ void Hu3DNoSyncSet(s32);
s16 Hu3DModelCreate(void *);
s16 Hu3DModelLink(s16);
s16 Hu3DHookFuncCreate(ModelHookFunc);
void Hu3DModelKill(s16);
void Hu3DModelAllKill(void);
void Hu3DModelPosSet(s16, f32, f32, f32);
void Hu3DModelPosSetV(s16, Vec *);
@ -221,7 +222,7 @@ void Hu3DShadowSizeSet(u16);
void Hu3DShadowExec(void);
s16 Hu3DProjectionCreate(void*, f32, f32, f32);
void Hu3DProjectionKill(s16);
void Hu3DProjectionPosSet(s16, Vec, Vec, Vec);
void Hu3DProjectionPosSet(s16, Vec*, Vec*, Vec*);
void Hu3DProjectionTPLvlSet(s16, f32);
void Hu3DMipMapSet(char*, s16, s32, f32);

17
include/game/mapspace.h Executable file
View file

@ -0,0 +1,17 @@
#ifndef _GAME_MAPSPACE_H
#define _GAME_MAPSPACE_H
#include "game/hsfformat.h"
#include "game/object.h"
#include "dolphin.h"
void MapWall(float arg0, float arg1, float arg2, float arg3);
void MapWallCheck(float *arg0, float *arg1, HsfMapAttr *arg2);
float MapPos(float arg0, float arg1, float arg2, float arg3, Vec *arg4);
BOOL Hitcheck_Triangle_with_Sphere(Vec *arg0, Vec *arg1, float arg2, Vec *arg3);
BOOL Hitcheck_Quadrangle_with_Sphere(Vec *arg0, Vec *arg1, float arg2, Vec *arg3);
void AppendAddXZ(float arg0, float arg1, float arg2);
void CharRotInv(Mtx arg0, Mtx arg1, Vec *arg2, omObjData *arg3);
#endif

View file

@ -0,0 +1,21 @@
#ifndef _GAME_MINIGAME_SEQ_H
#define _GAME_MINIGAME_SEQ_H
#include "game/object.h"
void MGSeqInit(void);
void MGSeqMain(void);
s16 MGSeqCreate(s16 type, ...);
u8 MGSeqStatGet(s16 id);
void MGSeqPosSet(s16 id, float x, float y);
void MGSeqParamSet(s16 id, s16 param1, s16 param2);
void MGSeqKill(s16 id);
void MGSeqKillAll(void);
s32 MGSeqDoneCheck(void);
void MGSeqStub(void);
void MGSeqPauseInit(void);
void MGSeqPauseEnableCtrl(s32 flag);
void MGSeqPracticeInit(void);
void MGSeqPracticeExitCheck(omObjData *object);
#endif

View file

@ -35,6 +35,21 @@ typedef struct {
/* 0x0C */ float backSurDis;
} UnkMsmStruct_02; // Size (min: 0x10, max: 0x1C)
typedef struct {
/* 0x00 */ s32 unk00;
/* 0x04 */ s8 unk04;
/* 0x05 */ s8 unk05;
/* 0x06 */ u16 unk06;
} UnkMsmStruct_03; // Size unknown (min: 8, max: 0x10)
typedef struct {
/* 0x00 */ s32 unk00;
/* 0x04 */ char unk04[1];
/* 0x05 */ s8 unk05;
/* 0x06 */ u16 unk06;
/* 0x08 */ char unk08[1];
} UnkMsmStruct_04; // Size unknown (min: 9, max: 0x18)
void msmSysRegularProc(void);
void msmSysSetOutputMode(s32 arg0);
void msmSysSetAux(s32 arg0, s32 arg1);
@ -49,9 +64,10 @@ s32 msmMusGetNumPlay(s32 arg0);
s32 msmMusGetStatus(s32 arg0);
void msmMusPauseAll(s32 arg0, s32 arg1);
void msmMusPause(s32 arg0, s32 arg1, s32 arg2);
void msmMusSetParam(s16 arg0, UnkMsmStruct_04 *arg1);
void msmMusStopAll(s32 arg0, s32 arg1);
void msmMusStop(s32 arg0, s32 arg1);
s32 msmMusPlay(s32 arg0, s32 arg1);
s32 msmMusPlay(s32 arg0, UnkMsmStruct_03 *arg1);
void msmSeDelListener(void);
void msmSeUpdataListener(s32 arg0, s32 arg1);
void msmSeSetListener(Vec* arg0, Vec* arg1, float arg2, float arg3, UnkMsmStruct_02 *arg4);

View file

@ -5,6 +5,8 @@
#include "game/process.h"
#include "game/dvd.h"
#define OM_DLL_MAX 20
#define OVL_DEFINE(name, path) name,
typedef enum {
@ -51,10 +53,17 @@ typedef struct om_obj_data {
/* 0x40 */ s16 *model;
/* 0x44 */ u16 mtncnt;
/* 0x48 */ s16 *motion;
/* 0x4C */ int work[4];
/* 0x4C */ u32 work[4];
/* 0x5C */ void *data;
} omObjData;
typedef struct om_dll_data {
char *name;
OSModuleHeader *module;
void *bss;
s32 ret;
} omDllData;
void omMasterInit(int prio, FileListEntry *ovl_list, int ovl_count, OverlayID start_ovl);
void omOvlCallEx(OverlayID overlay, s16 arg2, int event, int stat);
void omOvlGotoEx(OverlayID overlay, s16 arg2, int event, int stat);
@ -83,10 +92,16 @@ OverlayID omCurrentOvlGet(void);
void omDLLDBGOut(void);
void omDLLInit(FileListEntry *ovl_list);
int omDLLStart(s16 ovl, s16 dll);
void omDLLNumEnd(s16 ovl, s16 arg2);
int omDLLStart(s16 overlay, s16 flag);
void omDLLNumEnd(s16 overlay, s16 flag);
void omDLLEnd(s16 dllno, s16 flag);
omDllData *omDLLLink(omDllData **dll_ptr, s16 overlay, s16 flag);
void omDLLUnlink(omDllData *dll_ptr, s16 flag);
s32 omDLLSearch(s16 overlay);
void omDLLInfoDump(OSModuleInfo *module);
void omDLLHeaderDump(OSModuleHeader *module);
void omSysPauseEnable(BOOL flag);
void omSysPauseEnable(u8 flag);
void omSystemKeyCheckSetup(Process *objman_process);
@ -102,7 +117,9 @@ extern int omovlstat;
extern char omUPauseFlag;
extern s16 omSysExitReq;
extern s16 omdispinfo;
extern char omSysPauseEnableFlag;
extern u8 omSysPauseEnableFlag;
extern OverlayID omprevovl;
extern omDllData *omDLLinfoTbl[OM_DLL_MAX];
#endif

43
include/game/objsub.h Normal file
View file

@ -0,0 +1,43 @@
#ifndef _GAME_OBJSUB_H
#define _GAME_OBJSUB_H
#include "dolphin.h"
#include "game/process.h"
#include "game/gamework_data.h"
typedef struct mg_info {
u16 ovl;
u8 type;
u8 flag;
u8 record_idx;
u32 name_mess;
u32 data_dir;
u32 inst_pic[3];
u32 mg_pic[3];
u32 rules_mess;
u32 control_mess[2];
u32 advice_mess;
} MgInfo;
s32 omMgIndexGet(s16 overlay);
void omGameSysInit(Process *objman);
void omVibrate(s16 player_cfg_index, s16 duration, s16 off, s16 on);
extern s16 mgTypeCurr;
extern s16 mgBattleStar[4];
extern s16 mgBattleStarMax;
extern u8 lbl_801D3E94;
extern s32 mgRecordExtra;
extern s32 mgQuitExtraF;
extern s32 mgPracticeEnableF;
extern s32 mgInstExitEnableF;
extern u8 mgBoardHostEnableF;
extern s16 mgTicTacToeGrid[3][3];
extern u8 mgIndexList[256];
extern GameStat mgGameStatBackup;
extern MgInfo mgInfoTbl[];
#endif

View file

@ -22,7 +22,7 @@ extern u8 HuPadDStkRep[4];
extern s8 HuPadErr[4];
extern u16 _PadBtn[4];
extern u16 _PadBtnDown[4];
extern u32 VCounter;
extern s32 VCounter;
void HuPadInit(void);
void HuPadRead(void);

View file

@ -2,18 +2,41 @@
#define _GAME_SAVELOAD_H
#include "dolphin.h"
#include "game/gamework_data.h"
s32 SLFileOpen(char *arg0);
s32 SLFileCreate(char *arg0, u32 arg1, void *arg2);
s32 SLFileWrite(s32 arg0, void *arg1);
s32 SLFileRead(s32 arg0, void *arg1);
#define SAVE_BUF_SIZE 16384
typedef struct save_buf_data {
u8 comment[CARD_COMMENT_SIZE];
u8 banner[CARD_BANNER_WIDTH*CARD_BANNER_HEIGHT];
u8 bannerTlut[512];
u8 icon[CARD_ICON_WIDTH*CARD_ICON_HEIGHT*4];
u8 iconTlut[512];
GameStat stat;
SystemState system;
PlayerState player[4];
SystemState systemBackup;
PlayerState playerBackup[4];
} SaveBufData;
typedef union save_buf_all {
SaveBufData data;
u8 ATTRIBUTE_ALIGN(32) buf[SAVE_BUF_SIZE];
} SaveBufAll;
extern SaveBufAll saveBuf;
s32 SLFileOpen(char *fileName);
s32 SLFileCreate(char *fileName, u32 size, void *addr);
s32 SLFileWrite(s32 length, void *addr);
s32 SLFileRead(s32 length, void *addr);
s32 SLFileClose(void);
void SLCurSlotNoSet(s16 arg0);
void SLCurBoxNoSet(s8 arg0);
void SLSaveFlagSet(s32 arg0);
void SLCurSlotNoSet(s16 slotno);
void SLCurBoxNoSet(s8 boxno);
void SLSaveFlagSet(s32 flag);
s32 SLSaveFlagGet(void);
void SLSaveDataMake(s32 arg0, OSTime *arg1);
void SLSaveDataInfoSet(OSTime *arg0);
void SLSaveDataMake(s32 erase, OSTime *time);
void SLSaveDataInfoSet(OSTime *time);
void SLCommonSet(void);
void SLSaveBoard(void);
void SLSaveBoardBackup(void);
@ -27,9 +50,9 @@ BOOL SLSerialNoCheck(void);
BOOL SLCheckSumCheck(void);
u16 SLCheckSumGet(void);
void SLCheckSumSet(void);
s32 SLStatSet(s32 arg0);
s32 SLCardMount(s16 arg0);
s32 SLFormat(s16 arg0);
s16 SLMessOut(s16 arg0);
s32 SLStatSet(s32 reportF);
s32 SLCardMount(s16 slotNo);
s32 SLFormat(s16 slotNo);
s16 SLMessOut(s16 mess);
#endif

View file

@ -14,7 +14,7 @@
#define SPRITE_ATTR_PAUSED 0x1
#define SPRITE_ATTR_LOOP 0x2
#define SPRITE_ATTR_HIDDEN 0x4
#define SPIRTE_ATTR_BILINEAR 0x8
#define SPRITE_ATTR_BILINEAR 0x8
#define SPRITE_ATTR_FUNC 0x10
#define SPRITE_ATTR_NOPAUSE 0x20
#define SPRITE_ATTR_REVERSE 0x40

View file

@ -2,6 +2,8 @@
#define _GAME_THPMAIN_H
#include "dolphin/types.h"
#include "game/process.h"
s16 HuTHPSprCreateVol(char *path, s16 loop, s16 prio, float volume);
s16 HuTHPSprCreate(char *path, s16 loop, s16 prio);
@ -15,4 +17,7 @@ s32 HuTHPFrameGet(void);
s32 HuTHPTotalFrameGet(void);
void HuTHPSetVolume(s32 left, s32 right);
extern Process *THPProc;
#endif

View file

@ -95,7 +95,7 @@ void HuWinScissorSet(s16 window, s16 x, s16 y, s16 w, s16 h);
void HuWinPriSet(s16 window, s16 prio);
void HuWinAttrSet(s16 window, u32 attr);
void HuWinAttrReset(s16 window, u32 attr);
u8 HuWinStatGet(s16 window);
s16 HuWinStatGet(s16 window);
void HuWinMesColSet(s16 window, u8 color);
void HuWinMesPalSet(s16 window, u8 index, u8 r, u8 g, u8 b);
void HuWinBGTPLvlSet(s16 window, float tp_level);