Change GW Inlines

This commit is contained in:
gamemasterplc 2024-01-19 17:01:15 -06:00
parent 00d61c68d0
commit 39a8ebf124
5 changed files with 17 additions and 22 deletions

View file

@ -545,7 +545,7 @@ XFB_putcProgressive = .text:0x80030514; // type:function size:0x1F0
XFB_putcInterlace = .text:0x80030704; // type:function size:0x1B4 XFB_putcInterlace = .text:0x80030704; // type:function size:0x1B4
GWInit = .text:0x800308B8; // type:function size:0x14C GWInit = .text:0x800308B8; // type:function size:0x14C
GWGameStatReset = .text:0x80030A04; // type:function size:0x318 GWGameStatReset = .text:0x80030A04; // type:function size:0x318
GWMessSpeedGet = .text:0x80030D1C; // type:function size:0x4C GWMessDelayGet = .text:0x80030D1C; // type:function size:0x4C
GWMGRecordSet = .text:0x80030D68; // type:function size:0x54 GWMGRecordSet = .text:0x80030D68; // type:function size:0x54
GWMGRecordGet = .text:0x80030DBC; // type:function size:0x18 GWMGRecordGet = .text:0x80030DBC; // type:function size:0x18
GWCharColorGet = .text:0x80030DD4; // type:function size:0x140 GWCharColorGet = .text:0x80030DD4; // type:function size:0x140

View file

@ -152,4 +152,14 @@ static inline s32 GWLanguageGet(void)
return GWGameStat.language; return GWGameStat.language;
} }
static inline s32 GWMGTypeGet()
{
return GWSystem.mg_type;
}
static inline s32 GWMessSpeedGet()
{
return GWSystem.mess_speed;
}
#endif #endif

View file

@ -93,17 +93,6 @@ static s32 ExecTurnStart(void);
static void CreateBoard(void); static void CreateBoard(void);
static void DestroyBoard(void); static void DestroyBoard(void);
static inline int GWMGTypeGet()
{
return GWSystem.mg_type;
}
static inline int GWMessSpeedGet()
{
return GWSystem.mess_speed;
}
#define BOARD_FABS(value) ((value < 0) ? -(value) : (value)) #define BOARD_FABS(value) ((value < 0) ? -(value) : (value))
void BoardCommonInit(BoardFunc create, BoardFunc destroy) void BoardCommonInit(BoardFunc create, BoardFunc destroy)

View file

@ -182,7 +182,6 @@ void BoardWinPause(void) {
void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) { void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) {
s32 i; s32 i;
s32 speed;
winPosIdx = pos; winPosIdx = pos;
@ -213,13 +212,11 @@ void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) {
if (GWSystem.mess_speed == 3) { if (GWSystem.mess_speed == 3) {
GWSystem.mess_speed = 1; GWSystem.mess_speed = 1;
} }
speed = GWSystem.mess_speed; BoardWinSpeedSet(GWMessSpeedGet());
BoardWinSpeedSet(speed);
BoardWinPlayerSet(GWSystem.player_curr); BoardWinPlayerSet(GWSystem.player_curr);
} }
void BoardWinCreate(s32 pos, u32 mess, s32 portrait) { void BoardWinCreate(s32 pos, u32 mess, s32 portrait) {
s32 speed;
s32 i; s32 i;
winPosIdx = pos; winPosIdx = pos;
@ -250,8 +247,7 @@ void BoardWinCreate(s32 pos, u32 mess, s32 portrait) {
if (GWSystem.mess_speed == 3) { if (GWSystem.mess_speed == 3) {
GWSystem.mess_speed = 1; GWSystem.mess_speed = 1;
} }
speed = GWSystem.mess_speed; BoardWinSpeedSet(GWMessSpeedGet());
BoardWinSpeedSet(speed);
BoardWinPlayerSet(GWSystem.player_curr); BoardWinPlayerSet(GWSystem.player_curr);
autoPickF = 0; autoPickF = 0;
} }
@ -381,7 +377,7 @@ void BoardWinPlayerSet(s32 player) {
void BoardWinStartComKeySet(void) { void BoardWinStartComKeySet(void) {
s32 comkey[4]; s32 comkey[4];
s32 speed; s32 delay;
s32 waitnum; s32 waitnum;
s32 i; s32 i;
@ -410,12 +406,12 @@ void BoardWinStartComKeySet(void) {
} }
} }
} }
speed = GWMessSpeedGet(); delay = GWMessDelayGet();
waitnum = HuWinKeyWaitNumGet(winMess); waitnum = HuWinKeyWaitNumGet(winMess);
if (waitnum != 0) { if (waitnum != 0) {
HuWinComKeyReset(); HuWinComKeyReset();
for (i = 0; i < waitnum; i++) { for (i = 0; i < waitnum; i++) {
HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], speed); HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], delay);
} }
} }
} }

View file

@ -134,7 +134,7 @@ void GWGameStatReset(void)
ResetBoardSettings(); ResetBoardSettings();
} }
s32 GWMessSpeedGet(void) s32 GWMessDelayGet(void)
{ {
if(GWSystem.mess_delay > 48) { if(GWSystem.mess_delay > 48) {
GWSystem.mess_speed = 1; GWSystem.mess_speed = 1;