Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Oct 15, 2024
1 parent eec5671 commit f70ed7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions decompile/General/LOAD/LOAD_A40_Hub_Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ void DECOMP_LOAD_Hub_Main(int bigfilePtr)

gGT = sdata->gGT;

#if 1
// not in the OG game, but for some reason decomp
// needs it to prevent crashing on Nitro Court,
// something bugs in 4P Life Limit that makes stepFlagSet
// try to make the advHub flip, maybe from null AI data?
if((gGT->gameMode1 & ADVENTURE_ARENA) == 0) return;
#endif

int stepFlagSet = gGT->drivers[0]->stepFlagSet;
int nextLevelID = (stepFlagSet & 0x30) >> 4;
Expand Down
4 changes: 2 additions & 2 deletions decompile/General/LOAD/LOAD_A45_TenStages.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@ int DECOMP_LOAD_TenStages(struct GameTracker* gGT, int loadingStage, struct BigH
gGT->visMem1 = lev->visMem;

// if LEV is valid
if (gGT->level1 != 0)
if (lev != 0)
{
// Load Icons and IconGroups from LEV
DECOMP_DecalGlobal_Store(gGT, gGT->level1->levTexLookup);
DECOMP_DecalGlobal_Store(gGT, lev->levTexLookup);
}

DECOMP_DebugFont_Init(gGT);
Expand Down
2 changes: 1 addition & 1 deletion decompile/General/MAIN/MainInit_JitPoolsNew.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ void DECOMP_MainInit_JitPoolsNew(struct GameTracker *gGT)


int numDriver = uVar7 >> 9;
if ((gameMode & MAIN_MENU) != 0) numDriver = 4;
if (gGT->numPlyrCurrGame == 2) numDriver = 6;
if (gGT->numPlyrCurrGame > 2) numDriver = 4;
if ((gameMode & TIME_TRIAL) != 0) numDriver = 3;
if ((gameMode & MAIN_MENU) != 0) numDriver = 4;

#ifdef USE_ONLINE
numDriver = 8;
Expand Down

0 comments on commit f70ed7d

Please sign in to comment.