Start on board/main.c

This commit is contained in:
gamemasterplc 2024-01-01 22:34:17 -06:00
parent eea75a7068
commit 8c951b693c
16 changed files with 679 additions and 48 deletions

View file

@ -12,9 +12,9 @@ typedef void (*VoidFunc)(void);
extern const VoidFunc _ctors[];
extern const VoidFunc _dtors[];
extern void BoardCommonInit(VoidFunc init, VoidFunc destroy);
extern void BoardCommonInit(VoidFunc create, VoidFunc destroy);
extern void BoardInit(void);
extern void BoardCreate(void);
extern void BoardDestroy(void);
#ifdef __cplusplus

View file

@ -14,10 +14,10 @@ typedef struct player_config {
typedef struct system_state {
/* 0x00 */ struct {
u8 story : 1;
u8 party : 1;
u8 team : 1;
};
/* 0x01 */ s8 diff_story;
/* 0x01 */ u8 diff_story;
/* 0x02 */ struct {
u16 bonus_star : 1;
u16 explain_mg : 1;
@ -26,8 +26,8 @@ typedef struct system_state {
u16 mess_speed : 2;
u16 save_mode : 2;
};
/* 0x04 */ s8 turn;
/* 0x05 */ s8 max_turn;
/* 0x04 */ u8 turn;
/* 0x05 */ u8 max_turn;
/* 0x06 */ u8 star_flag;
/* 0x07 */ u8 star_total;
/* 0x08 */ struct {
@ -37,13 +37,14 @@ typedef struct system_state {
/* 0x09 */ s8 last5_effect;
/* 0x0A */ s8 player_curr;
/* 0x0B */ char unk0B[3];
/* 0x0E */ s16 hidden_block_pos;
/* 0x0E */ s16 block_pos;
/* 0x10 */ u8 ATTRIBUTE_ALIGN(4) board_data[32];
/* 0x30 */ u8 mess_delay;
/* 0x31 */ struct {
u8 field31_bit0 : 4;
u8 field31_bit4 : 4;
};
/* 0x32 */ char unk_32[0x2];
/* 0x32 */ s8 unk_32;
/* 0x34 */ u16 mg_next;
/* 0x36 */ s16 mg_next_extra;
/* 0x38 */ s16 unk_38;
@ -53,10 +54,11 @@ typedef struct system_state {
typedef struct player_state {
/* 0x00 */ struct {
u8 diff : 2;
u8 com : 1;
u8 character : 4;
u8 auto_size : 2;
u16 diff : 2;
u16 com : 1;
u16 character : 4;
u16 auto_size : 2;
u16 field00_bit9 : 1;
};
/* 0x02 */ struct {
u8 team : 1;
@ -67,14 +69,14 @@ typedef struct player_state {
/* 0x04 */ s8 port;
/* 0x05 */ s8 items[3];
/* 0x08 */ struct {
u8 color : 2;
u8 moving : 1;
u8 field08_bit3 : 1;
u8 show_next : 1;
u8 size : 2;
u8 field08_bit7 : 2;
u8 rank : 2;
u8 bowser_suit : 1;
u16 color : 2;
u16 moving : 1;
u16 field08_bit3 : 1;
u16 show_next : 1;
u16 size : 2;
u16 field08_bit7 : 2;
u16 rank : 2;
u16 bowser_suit : 1;
};
/* 0x0A */ s8 roll;
/* 0x0C */ s16 space_curr;

View file

@ -203,7 +203,7 @@ f32 PSVECDistance(const Vec* a, const Vec* b);
#endif
// TODO
#if defined( MTX_USE_PS) && 0
#if defined( MTX_USE_PS)
#define VECAdd PSVECAdd
#define VECSubtract PSVECSubtract
#define VECScale PSVECScale

View file

@ -45,7 +45,7 @@ void fn_8004D6F4(s16 arg);
s32 rand8(void);
void BoardCameraTargetSetModel(s16 model);
void BoardCameraTargetModelSet(s16 model);
void BoardCameraStartMotion2(s16, Vec*, s32, f32, f32, s32);
void BoardCameraMotionWait(void);
void BoardSpacePosGet(s32, s32, Vec*);
@ -65,7 +65,6 @@ f32 BoardModelRotYGet(s32);
void BoardModelLayerSet(s16, s32);
void BoardTutorialHostSet(s16);
s32 BoardModelIDGet(s16);
void BoardCommonInit(void*, void*);
void BoardModelScaleSetV(s32, Vec*);
void BoardLightHookSet(void*, void*);
s16 BoardModelCreate(s32, void*, s32);

View file

@ -85,6 +85,8 @@ void omDLLNumEnd(s16 ovl, s16 arg2);
void omSysPauseEnable(BOOL flag);
void omSystemKeyCheckSetup(Process *objman_process);
extern omObjData *omDBGSysKeyObj;
extern Process *omwatchproc;
extern OverlayID omnextovl;