Skip to content

Commit dc8227b

Browse files
author
Niko
committed
bugfix, dont corrupt 226 overlay in main menu
1 parent 7ded282 commit dc8227b

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

decompile/General/MAIN/MainInit_05_JitPoolsNew.c

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,20 @@ void DECOMP_MainInit_JitPoolsNew(struct GameTracker *gGT)
113113
#if !defined(REBUILD_PS1) && !defined(USE_RAMEX) && defined(USE_ALTMODS)
114114
sdata->mempack[0].firstFreeByte = (void*)backup;
115115

116-
// override, only if 3P4P VS
117-
if(gGT->numPlyrCurrGame > 2)
116+
if(
117+
// override, only if 3P4P VS
118+
(gGT->numPlyrCurrGame > 2) &&
119+
120+
// main menu is "4p" dont corruput 1p overlay
121+
(gGT->levelID != MAIN_MENU_LEVEL)
122+
)
118123
{
119124
void OVR_Region3();
120125
unsigned int addrSmallPool = (unsigned int)OVR_Region3;
121126
addrSmallPool -= 6500;
122127
sdata->mempack[0].firstFreeByte = (void*)addrSmallPool;
128+
129+
printf("Here %s\n", __FUNCTION__);
123130
}
124131
#endif
125132

@@ -139,9 +146,16 @@ void DECOMP_MainInit_JitPoolsNew(struct GameTracker *gGT)
139146

140147
// 2mb RAM, decomp/General, ram holes
141148
#if !defined(REBUILD_PS1) && !defined(USE_RAMEX) && defined(USE_ALTMODS)
142-
// override, only if 3P4P VS
143-
if(gGT->numPlyrCurrGame > 2)
149+
if(
150+
// override, only if 3P4P VS
151+
(gGT->numPlyrCurrGame > 2) &&
152+
153+
// main menu is "4p" dont corruput 1p overlay
154+
(gGT->levelID != MAIN_MENU_LEVEL)
155+
)
156+
{
144157
sdata->mempack[0].firstFreeByte = (void*)backup;
158+
}
145159
#endif
146160

147161

0 commit comments

Comments
 (0)