Skip to content

Commit 3a51b7a

Browse files
author
Niko
committed
bugfix MaskHint from LOAD optimizations
1 parent 50d4c5e commit 3a51b7a

File tree

2 files changed

+35
-29
lines changed

2 files changed

+35
-29
lines changed

decompile/General/232/232_35_AH_MaskHint_Update.c

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -152,39 +152,42 @@ void DECOMP_AH_MaskHint_Update()
152152
break;
153153
}
154154

155-
if (sdata->modelMaskHints3D != 0)
155+
// Should be pointless,
156+
// Mask will always be loaded by the end
157+
// of the first 3-second spawn (curr < spawnFrame, break)
158+
#if 0
159+
// wait for mask to finish loading
160+
if (sdata->load_inProgress != 0) break;
161+
if (sdata->modelMaskHints3D == NULL) break;
162+
#endif
163+
164+
if(
165+
((D232.maskWarppadBoolInterrupt & 1) != 0) ||
166+
((gGT->cameraDC[0].flags & 0x800) != 0)
167+
)
156168
{
157-
if(
158-
((D232.maskWarppadBoolInterrupt & 1) != 0) ||
159-
((gGT->cameraDC[0].flags & 0x800) != 0)
160-
)
161-
{
162-
DECOMP_AH_MaskHint_LerpVol(0x1000);
163-
164-
DECOMP_AH_MaskHint_SpawnParticles
165-
(0x18, &D232.emSet_maskLeave[0], 0x1000);
169+
DECOMP_AH_MaskHint_LerpVol(0x1000);
170+
171+
DECOMP_AH_MaskHint_SpawnParticles
172+
(0x18, &D232.emSet_maskLeave[0], 0x1000);
166173

167-
DECOMP_VehTalkMask_PlayXA((struct Instance*)sdata->modelMaskHints3D, D232.maskHintID);
168-
169-
if (
170-
((gGT->gameMode1 & ADVENTURE_ARENA) != 0) &&
171-
172-
// Not "Welcome to Adventure" or "You need a Boss Key"
173-
(D232.maskHintID != 0) &&
174-
(D232.maskHintID != 0x18)
175-
)
176-
{
177-
// hide UI map
178-
gGT->hudFlags |= 0x10;
179-
}
174+
DECOMP_VehTalkMask_PlayXA((struct Instance*)sdata->modelMaskHints3D, D232.maskHintID);
175+
176+
if (
177+
((gGT->gameMode1 & ADVENTURE_ARENA) != 0) &&
180178

181-
sdata->AkuAkuHintState++;
182-
break;
179+
// Not "Welcome to Adventure" or "You need a Boss Key"
180+
(D232.maskHintID != 0) &&
181+
(D232.maskHintID != 0x18)
182+
)
183+
{
184+
// hide UI map
185+
gGT->hudFlags |= 0x10;
183186
}
187+
188+
sdata->AkuAkuHintState++;
189+
break;
184190
}
185-
186-
// if sdata->modelMaskHints3D == NULL,
187-
// stay here forever stuck
188191
break;
189192

190193
case 4: {

decompile/General/Vehicle/VehTalkMask_0_ThTick.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ void DECOMP_VehTalkMask_ThTick(struct Thread* t)
99

1010
int scale = mhObj->scale;
1111

12-
if(sdata->modelMaskHints3D != 0)
12+
if(
13+
(sdata->modelMaskHints3D != 0) &&
14+
(sdata->load_inProgress == 0)
15+
)
1316
{
1417
mhInst->model = sdata->modelMaskHints3D;
1518
scale *= 2;

0 commit comments

Comments
 (0)