mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-29 19:05:34 -05:00
Most entities with VTable0x50 function overrides (#752)
* BeachHouseEntity::VTable0x50 * GasStationEntity::VTable0x50 * RaceStandsEntity::VTable0x50 * Run clang-format * Fix use of NULL --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
87f633af54
commit
92357d77e1
8 changed files with 107 additions and 8 deletions
|
@ -20,8 +20,7 @@ class BeachHouseEntity : public BuildingEntity {
|
||||||
return !strcmp(p_name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
return !strcmp(p_name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100153b0
|
MxLong VTable0x50(MxParam& p_param) override;
|
||||||
MxLong VTable0x50(MxParam& p_param) override { return 0; }
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f970
|
// SYNTHETIC: LEGO1 0x1000f970
|
||||||
// BeachHouseEntity::`scalar deleting destructor'
|
// BeachHouseEntity::`scalar deleting destructor'
|
||||||
|
|
|
@ -20,8 +20,7 @@ class GasStationEntity : public BuildingEntity {
|
||||||
return !strcmp(p_name, GasStationEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
return !strcmp(p_name, GasStationEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100151d0
|
MxLong VTable0x50(MxParam& p_param) override;
|
||||||
MxLong VTable0x50(MxParam& p_param) override { return 0; }
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f890
|
// SYNTHETIC: LEGO1 0x1000f890
|
||||||
// GasStationEntity::`scalar deleting destructor'
|
// GasStationEntity::`scalar deleting destructor'
|
||||||
|
|
|
@ -19,8 +19,7 @@ class RaceStandsEntity : public BuildingEntity {
|
||||||
return !strcmp(p_name, RaceStandsEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
return !strcmp(p_name, RaceStandsEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10015450
|
MxLong VTable0x50(MxParam& p_param) override;
|
||||||
MxLong VTable0x50(MxParam& p_param) override { return 0; }
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f9e0
|
// SYNTHETIC: LEGO1 0x1000f9e0
|
||||||
// RaceStandsEntity::`scalar deleting destructor'
|
// RaceStandsEntity::`scalar deleting destructor'
|
||||||
|
|
|
@ -1,3 +1,39 @@
|
||||||
#include "gasstationentity.h"
|
#include "gasstationentity.h"
|
||||||
|
|
||||||
|
#include "act1state.h"
|
||||||
|
#include "isle.h"
|
||||||
|
#include "isle_actions.h"
|
||||||
|
#include "islepathactor.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "legoutils.h"
|
||||||
|
#include "legoworld.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(GasStationEntity, 0x68)
|
DECOMP_SIZE_ASSERT(GasStationEntity, 0x68)
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100151d0
|
||||||
|
MxLong GasStationEntity::VTable0x50(MxParam& p_param)
|
||||||
|
{
|
||||||
|
if (FUN_1003ef60()) {
|
||||||
|
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||||
|
|
||||||
|
if (state->GetUnknown18() != 8) {
|
||||||
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
|
CurrentActor()->VTable0xe4();
|
||||||
|
}
|
||||||
|
|
||||||
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
isle->SetDestLocation(LegoGameState::Area::e_garage);
|
||||||
|
|
||||||
|
AnimationManager()->FUN_10061010(0);
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ MxLong HospitalEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(NULL);
|
AnimationManager()->FUN_10061010(0);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,36 @@
|
||||||
#include "beachhouseentity.h"
|
#include "beachhouseentity.h"
|
||||||
|
|
||||||
|
#include "act1state.h"
|
||||||
|
#include "isle.h"
|
||||||
|
#include "isle_actions.h"
|
||||||
|
#include "islepathactor.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "legoutils.h"
|
||||||
|
#include "legoworld.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(BeachHouseEntity, 0x68)
|
DECOMP_SIZE_ASSERT(BeachHouseEntity, 0x68)
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100153b0
|
||||||
|
MxLong BeachHouseEntity::VTable0x50(MxParam& p_param)
|
||||||
|
{
|
||||||
|
if (FUN_1003ef60()) {
|
||||||
|
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||||
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
|
CurrentActor()->VTable0xe4();
|
||||||
|
}
|
||||||
|
|
||||||
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
isle->SetDestLocation(LegoGameState::Area::e_jetskibuild);
|
||||||
|
|
||||||
|
AnimationManager()->FUN_10061010(0);
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_police);
|
isle->SetDestLocation(LegoGameState::Area::e_police);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(NULL);
|
AnimationManager()->FUN_10061010(0);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,36 @@
|
||||||
#include "racestandsentity.h"
|
#include "racestandsentity.h"
|
||||||
|
|
||||||
|
#include "act1state.h"
|
||||||
|
#include "isle.h"
|
||||||
|
#include "isle_actions.h"
|
||||||
|
#include "islepathactor.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "legoutils.h"
|
||||||
|
#include "legoworld.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(RaceStandsEntity, 0x68)
|
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()) {
|
||||||
|
CurrentActor()->VTable0xe4();
|
||||||
|
}
|
||||||
|
|
||||||
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
||||||
|
|
||||||
|
AnimationManager()->FUN_10061010(0);
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue