Fix declaration order issue

This commit is contained in:
jonschz 2024-11-13 23:13:28 +01:00
parent ac043faeea
commit 545437416a
4 changed files with 20 additions and 19 deletions

View File

@ -61,8 +61,6 @@ class JetskiRace : public LegoRace {
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
void FUN_10013670();
};
// SYNTHETIC: LEGO1 0x1000f530

View File

@ -75,6 +75,8 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
virtual void FUN_10012ff0(float p_param);
virtual MxU32 HandleSkeletonKicks(float p_param1);
static void FUN_10013670();
// SYNTHETIC: LEGO1 0x10014240
// LegoRaceCar::`scalar deleting destructor'

View File

@ -9,6 +9,7 @@
#include "legohideanimpresenter.h"
#include "legomain.h"
#include "legopathstruct.h"
#include "legoracers.h"
#include "legoracespecial.h"
#include "legoutils.h"
#include "misc.h"
@ -34,12 +35,6 @@ extern const char* g_racing;
// Defined in legopathactor.cpp
extern const char* g_strHIT_WALL_SOUND;
// GLOBAL: LEGO1 0x100f0bac
static undefined4 g_unk0x100f0bac = 0;
// GLOBAL: LEGO1 0x100f0bb0
static undefined4 g_unk0x100f0bb0 = 0;
DECOMP_SIZE_ASSERT(JetskiRace, 0x144)
// FUNCTION: LEGO1 0x100162c0
@ -68,7 +63,7 @@ MxResult JetskiRace::Create(MxDSAction& p_dsAction)
m_unk0x130.SetTop(317);
m_unk0x130.SetRight(543);
m_unk0x130.SetBottom(333);
FUN_10013670();
LegoRaceCar::FUN_10013670();
InvokeAction(
Extra::e_start,
m_atomId,
@ -81,16 +76,6 @@ MxResult JetskiRace::Create(MxDSAction& p_dsAction)
return result;
}
// FUNCTION: LEGO1 0x10013670
void JetskiRace::FUN_10013670()
{
g_unk0x100f0bac = (rand() & 0xc) >> 2;
// Inlining the `rand()` causes this function to mismatch
MxU32 uVar1 = rand();
g_unk0x100f0bb0 = uVar1 % 0xc >> 2;
}
// FUNCTION: LEGO1 0x100163b0
// FUNCTION: BETA10 0x100c7f10
void JetskiRace::ReadyWorld()

View File

@ -21,6 +21,12 @@ DECOMP_SIZE_ASSERT(EdgeReference, 0x08)
DECOMP_SIZE_ASSERT(SkeletonKickPhase, 0x10)
DECOMP_SIZE_ASSERT(LegoRaceCar, 0x200)
// GLOBAL: LEGO1 0x100f0bac
static undefined4 g_unk0x100f0bac = 0;
// GLOBAL: LEGO1 0x100f0bb0
static undefined4 g_unk0x100f0bb0 = 0;
// GLOBAL: LEGO1 0x100f0a20
// GLOBAL: BETA10 0x101f5e34
EdgeReference LegoRaceCar::g_skBMap[] = {
@ -501,6 +507,16 @@ MxResult LegoRaceCar::VTable0x9c()
return result;
}
// FUNCTION: LEGO1 0x10013670
void LegoRaceCar::FUN_10013670()
{
g_unk0x100f0bac = (rand() & 0xc) >> 2;
// Inlining the `rand()` causes this function to mismatch
MxU32 uVar1 = rand();
g_unk0x100f0bb0 = uVar1 % 0xc >> 2;
}
// FUNCTION: LEGO1 0x10014500
// FUNCTION: BETA10 0x100cd5e0
MxU32 LegoRaceCar::VTable0x6c(