Skip to content

Commit

Permalink
Merge pull request #496 from mrshigure/m423
Browse files Browse the repository at this point in the history
US: matched m423Dll
  • Loading branch information
gamemasterplc authored Dec 30, 2024
2 parents dcaf651 + 129e419 commit 619179b
Show file tree
Hide file tree
Showing 11 changed files with 5,926 additions and 273 deletions.
390 changes: 195 additions & 195 deletions config/GMPE01_00/rels/m423Dll/symbols.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ def MatchingFor(*versions):
Rel(
"m423Dll", # GOOOOOOOAL!!
objects={
Object(NonMatching, "REL/m423Dll/main.c"),
Object(MatchingFor("GMPE01_00", "GMPE01_01"), "REL/m423Dll/main.c"),
},
),
Rel(
Expand Down
99 changes: 52 additions & 47 deletions include/game/gamework_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ typedef struct player_state {
} PlayerState; //size of 0x30

typedef struct pause_backup_config {
u8 explain_mg : 1;
u8 show_com_mg : 1;
u8 mg_list : 2;
u8 mess_speed : 2;
u8 save_mode : 2;
u8 explain_mg : 1;
u8 show_com_mg : 1;
u8 mg_list : 2;
u8 mess_speed : 2;
u8 save_mode : 2;
} PauseBackupConfig;

typedef struct game_stat {
Expand Down Expand Up @@ -152,19 +152,24 @@ extern PlayerState GWPlayer[4];
extern SystemState GWSystem;
extern GameStat GWGameStat;

static inline s32 GWPlayerCfgGroupGet(s32 player)
{
return GWPlayerCfg[player].group;
}

static inline s32 GWTeamGet(void)
{
return GWSystem.team;
}

static inline s32 GWMGTypeGet(void)
{
return GWSystem.mg_type;
return GWSystem.mg_type;
}

static inline void GWMGTypeSet(s32 type)
{
GWSystem.mg_type = type;
GWSystem.mg_type = type;
}

static inline s32 GWPartyGet(void)
Expand All @@ -190,9 +195,9 @@ static inline s32 GWRumbleGet(void)
static inline void GWRumbleSet(s32 value)
{
GWGameStat.rumble = value;
if(value == 0) {
HuPadRumbleAllStop();
}
if(value == 0) {
HuPadRumbleAllStop();
}
}

static inline s32 GWBonusStarGet(void)
Expand Down Expand Up @@ -245,39 +250,39 @@ static inline s32 GWMessSpeedGet(void)
static inline void GWMessSpeedSet(s32 value)
{
#if VERSION_NTSC
GWSystem.mess_speed = value;
switch(value) {
case 0:
GWSystem.mess_delay = 16;
break;
case 2:
GWSystem.mess_delay = 48;
break;
default:
GWSystem.mess_delay = 32;
break;
}
GWSystem.mess_speed = value;
switch(value) {
case 0:
GWSystem.mess_delay = 16;
break;

case 2:
GWSystem.mess_delay = 48;
break;

default:
GWSystem.mess_delay = 32;
break;
}
#else
GWSystem.mess_speed = value;
switch(value) {
case 0:
GWSystem.mess_delay = 32;
break;
switch(value) {
case 0:
GWSystem.mess_delay = 32;
break;

case 2:
GWSystem.mess_delay = 64;
break;
GWSystem.mess_delay = 64;
break;

case 1:
GWSystem.mess_delay = 48;
break;
default:
GWSystem.mess_delay = 120;
break;
}
case 1:
GWSystem.mess_delay = 48;
break;

default:
GWSystem.mess_delay = 120;
break;
}
#endif
}

Expand All @@ -289,7 +294,7 @@ static inline void GWSaveModeSet(s32 value)
static inline s32 GWSaveModeGet(void)
{
if (GWSystem.save_mode == 3) {
GWSaveModeSet(1);
GWSaveModeSet(1);
}
return GWSystem.save_mode;
}
Expand Down Expand Up @@ -326,29 +331,29 @@ static inline void GWLuckyValueSet(s32 value)

static inline s16 GWPlayerCoinBattleGet(s32 player)
{
return GWPlayer[player].coins_battle;
return GWPlayer[player].coins_battle;
}

static inline s16 GWPlayerCoinCollectGet(s32 player)
{
return GWPlayer[player].coin_collect;
return GWPlayer[player].coin_collect;
}

static inline void GWPlayerCoinCollectSet(s32 player, s16 value)
{
GWPlayer[player].coin_collect = value;
GWPlayer[player].coin_collect = value;
}

static inline s16 GWPlayerCoinWinGet(s32 player)
{
return GWPlayer[player].coin_win;
return GWPlayer[player].coin_win;
}

static inline void GWPlayerCoinWinSet(s32 player, s16 value)
{
if (_CheckFlag(FLAG_ID_MAKE(1, 12)) == 0) {
GWPlayer[player].coin_win = value;
}
if (_CheckFlag(FLAG_ID_MAKE(1, 12)) == 0) {
GWPlayer[player].coin_win = value;
}
}

#define GWPlayerCoinWinAdd(player, value) GWPlayerCoinWinSet((player), GWPlayerCoinWinGet((player))+(value))
Expand Down
12 changes: 6 additions & 6 deletions src/REL/m409Dll/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,19 @@ void fn_1_C164(unkStruct8* arg0) {
}
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_TEX_ST, GX_RGBA6, 0);
GXSetArray(GX_VA_POS, var_r31->unk40, 0xC);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
GXSetArray(GX_VA_POS, var_r31->unk40, 12);
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_TEX_ST, GX_RGBA8, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
GXSetArray(GX_VA_CLR0, var_r31->unk44, 4);
for (var_r26 = 0; var_r26 < var_r31->unk32; var_r26++) {
GXSetVtxDesc(var_r26 + GX_VA_TEX0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, var_r26 + GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, var_r26 + GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
GXSetArray(var_r26 + GX_VA_TEX0, var_r31->unk54[var_r26].unk4, 8);
}
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_TEX_S, GX_RGBA6, 0);
GXSetArray(GX_VA_NRM, var_r31->unk48, 0xC);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
GXSetArray(GX_VA_NRM, var_r31->unk48, 12);
GXCallDisplayList(var_r31->unk3C, var_r31->unk38);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/REL/m409Dll/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,13 +1376,13 @@ void fn_1_602C(ModelData *arg0, f32 (*arg1)[4])
}
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_TEX_ST, GX_RGBA6, 0);
GXSetArray(GX_VA_POS, temp_r30->unk1C, 0xC);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
GXSetArray(GX_VA_POS, temp_r30->unk1C, 12);
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_TEX_ST, GX_RGBA8, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
GXSetArray(GX_VA_CLR0, temp_r30->unk24, 4);
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
GXSetArray(GX_VA_TEX0, temp_r30->unk20, 8);
fn_1_40A4(arg1, sp128);
PSMTXReorder(sp128, spF8);
Expand Down
14 changes: 7 additions & 7 deletions src/REL/m415Dll/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,20 @@ void fn_1_88B8(unkSubStruct2* arg0) {
}
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_TEX_ST, GX_RGBA6, 0);
GXSetArray(GX_VA_POS, var_r31->unk40, 0xC);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
GXSetArray(GX_VA_POS, var_r31->unk40, 12);
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_TEX_ST, GX_RGBA8, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
GXSetArray(GX_VA_CLR0, var_r31->unk44, 4);

for (var_r27 = 0; var_r27 < var_r31->unk33; var_r27++) {
GXSetVtxDesc(var_r27 + GX_VA_TEX0, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, var_r27 + GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, var_r27 + GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
GXSetArray(var_r27 + GX_VA_TEX0, var_r31->unk54[var_r27].unk4, 8);
}
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGBA6, 0);
GXSetArray(GX_VA_NRM, var_r31->unk48, 0xC);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
GXSetArray(GX_VA_NRM, var_r31->unk48, 12);
GXCallDisplayList(var_r31->unk3C, var_r31->unk38);
}
}
Expand Down Expand Up @@ -1433,4 +1433,4 @@ void fn_1_C81C(s16 arg0, u8 arg1) {
var_r31 = &lbl_1_bss_36C.unk3C[arg0];
var_r31->unk4 = arg1;
}
}
}
Loading

0 comments on commit 619179b

Please sign in to comment.