mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Consolidate state and building entity classes (#989)
This commit is contained in:

committed by
GitHub

parent
73bb37596e
commit
133a312aee
@@ -4,6 +4,9 @@
|
||||
#include "mxnotificationmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoRace, 0x144)
|
||||
DECOMP_SIZE_ASSERT(RaceState::Entry, 0x06)
|
||||
// TODO: Must be 0x2c but current structure is incorrect
|
||||
// DECOMP_SIZE_ASSERT(RaceState, 0x2c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dab0
|
||||
undefined4 LegoRace::VTable0x78(undefined4)
|
||||
@@ -87,3 +90,30 @@ void LegoRace::Enable(MxBool p_enable)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10015f30
|
||||
RaceState::RaceState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10016140
|
||||
MxResult RaceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10016280
|
||||
RaceState::Entry* RaceState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0;; i++) {
|
||||
if (i >= 5) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,36 +0,0 @@
|
||||
#include "racestandsentity.h"
|
||||
|
||||
#include "act1state.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "islepathactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoutils.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "scripts.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(RaceStandsEntity, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x10015450
|
||||
MxLong RaceStandsEntity::VTable0x50(MxParam& p_param)
|
||||
{
|
||||
if (FUN_1003ef60()) {
|
||||
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||
state->SetUnknown18(0);
|
||||
|
||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
||||
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
#include "racestate.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(RaceStateEntry, 0x06)
|
||||
|
||||
// TODO: Must be 0x2c but current structure is incorrect
|
||||
// DECOMP_SIZE_ASSERT(RaceState, 0x2c)
|
||||
|
||||
// STUB: LEGO1 0x10015f30
|
||||
RaceState::RaceState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10016140
|
||||
MxResult RaceState::Serialize(LegoFile* p_legoFile)
|
||||
{
|
||||
// TODO
|
||||
return LegoState::Serialize(p_legoFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10016280
|
||||
RaceStateEntry* RaceState::GetState(MxU8 p_id)
|
||||
{
|
||||
for (MxS16 i = 0;; i++) {
|
||||
if (i >= 5) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m_state[i].m_id == p_id) {
|
||||
return m_state + i;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user