Skip to content

Commit

Permalink
Various matches
Browse files Browse the repository at this point in the history
  • Loading branch information
escape209 committed Aug 20, 2024
1 parent c028f1b commit c874c47
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 deletions.
6 changes: 1 addition & 5 deletions src/SB/Core/gc/iFMV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ void iFMVfree(void* mem)
RwFree(mem);
}

#ifdef NON_MATCHING
// For some reason, the check for frame_num is always optimized to true.
U32 iFMVPlay(char* filename, U32 buttons, F32 time, bool skippable, bool lockController)
{
if (filename == NULL)
Expand All @@ -29,16 +27,14 @@ U32 iFMVPlay(char* filename, U32 buttons, F32 time, bool skippable, bool lockCon
else
{
frame_num = 0;
while (frame_num >= 0)
while ((S32)frame_num >= 0)
{
PlayFMV(filename, buttons, time);
}
return 0;
}
}

#endif

static void Setup_surface_array()
{
Bink_surface_type[0] = BINKSURFACE32;
Expand Down
13 changes: 8 additions & 5 deletions src/SB/Core/x/xSFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@ void xSFXEnvironmentalStreamSceneExit(void)
memset(&s_managedEnvSFX, 0, 4);
}

#ifdef NON_MATCHING
S32 xSFXWillSendDone(xSFX* param_1)
{
if (param_1->linkCount != 0)
S32 iLink = param_1->linkCount;

if ((U32)iLink != 0)
{
for (int i = 0; i < param_1->linkCount; i++)
xLinkAsset* pLink = param_1->link;

for (; iLink > 0; iLink--)
{
if ((&param_1->link[i])->srcEvent == 0xbf)
if (pLink->srcEvent == 0xbf)
{
return 1;
}
pLink++;
}
}

return 0;
}
#endif

void xSFXInit(void* t, void* asset)

Expand Down
3 changes: 0 additions & 3 deletions src/SB/Core/x/xScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ void ProjectTriangle(xVec3* param_1, xVec3* param_2, float* param_3, float* para
return;
}

#ifdef NON_MATCHING
// Float memes
void ProjectBox(xVec3* param_1, xBox* param_2, float* param_3, float* param_4)
{
F32 fVar7 = lbl_803CCF78 * (param_1->x * ((param_2->upper).x + (param_2->lower).x) +
Expand All @@ -299,7 +297,6 @@ void ProjectBox(xVec3* param_1, xBox* param_2, float* param_3, float* param_4)
*param_3 = fVar7 - fVar1;
*param_4 = fVar7 + fVar1;
}
#endif

static RpCollisionTriangle* nearestFloorCB(RpIntersection*, RpCollisionTriangle* collTriangle,
F32, void* data);
Expand Down
15 changes: 6 additions & 9 deletions src/SB/Game/zGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,13 @@ S32 zGameIsPaused()
return 0;
}

#ifdef NON_MATCHING
S32 zGameLoopContinue()
iTime t1;

static S32 zGameLoopContinue()
{
if (gGameMode == eGameMode_Game)
{
if (((gGameState == 1) || (gGameState == 3)) || (gGameState == 4))
{
return 1;
}
return gGameState == 1 || gGameState == 3 || gGameState == 4;
}
else
{
Expand All @@ -179,12 +177,11 @@ S32 zGameLoopContinue()
gGameWhereAmI = eGameWhere_SaveLoop;
zSaveLoad_SaveLoop();
sTimeLast = iTimeGet();
t1 = iTimeGet();
}
return 1;
}
return 0;
return 1;
}
#endif

S32 zGameOkToPause()
{
Expand Down
11 changes: 5 additions & 6 deletions src/SB/Game/zNPCTypeBoss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,24 +181,23 @@ void ZNPC_Destroy_Boss(xFactoryInst* inst)
delete inst;
}

#ifdef NON_MATCHING
xAnimTable* ZNPC_AnimTable_BossSBobbyArm()
{
// non-matching: surprisingly the floats in this function are fine
// r4 and r5 is swapped for some reason during the ourAnims assignment
xAnimTable* table;

S32 ourAnims[2] = { 1, 0 };

table = xAnimTableNew("zNPCBBobbyArm", NULL, 0);
// Nearly identical, save for a redundant r5 load being skipped.
table = xAnimTableNew("zNPCBBobbyArm", NULL, ourAnims[0]);


xAnimTableNewState(table, g_strz_bossanim[1], 0x10, 0, _920_2, NULL, NULL, _921_2, NULL, NULL,
xAnimDefaultBeforeEnter, NULL, NULL);

NPCC_BuildStandardAnimTran(table, (char**)g_strz_bossanim, ourAnims, 1, _922_0);
NPCC_BuildStandardAnimTran(table, (char**)g_strz_bossanim, &ourAnims[0], 1, _922_0);

return table;
}
#endif

void BOSS_InitEffects();

Expand Down

0 comments on commit c874c47

Please sign in to comment.