mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Refactor: Replace magic values by enum values (#865)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
parent
dede20000f
commit
b17d76c2cc
2 changed files with 5 additions and 5 deletions
|
@ -80,7 +80,7 @@ void Radio::Stop()
|
||||||
if (m_state->IsActive()) {
|
if (m_state->IsActive()) {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
|
|
||||||
MxControlPresenter* presenter = (MxControlPresenter*) world->Find(world->GetAtom(), 18);
|
MxControlPresenter* presenter = (MxControlPresenter*) world->Find(world->GetAtom(), IsleScript::c_Radio_Ctl);
|
||||||
|
|
||||||
if (presenter) {
|
if (presenter) {
|
||||||
presenter->VTable0x6c(0);
|
presenter->VTable0x6c(0);
|
||||||
|
|
|
@ -1083,28 +1083,28 @@ void LegoGameState::Init()
|
||||||
if (m_loadedAct == e_act1) {
|
if (m_loadedAct == e_act1) {
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, 0);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, 0);
|
||||||
|
|
||||||
Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, 1);
|
Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, CopterScript::c_Helicopter_Actor);
|
||||||
if (copter) {
|
if (copter) {
|
||||||
isle->FUN_1001fc80(copter);
|
isle->FUN_1001fc80(copter);
|
||||||
isle->VTable0x6c(copter);
|
isle->VTable0x6c(copter);
|
||||||
delete copter;
|
delete copter;
|
||||||
}
|
}
|
||||||
|
|
||||||
DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, 2);
|
DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, DunecarScript::c_DuneBugy_Actor);
|
||||||
if (dunebuggy) {
|
if (dunebuggy) {
|
||||||
isle->FUN_1001fc80(dunebuggy);
|
isle->FUN_1001fc80(dunebuggy);
|
||||||
isle->VTable0x6c(dunebuggy);
|
isle->VTable0x6c(dunebuggy);
|
||||||
delete dunebuggy;
|
delete dunebuggy;
|
||||||
}
|
}
|
||||||
|
|
||||||
Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, 3);
|
Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, JetskiScript::c_Jetski_Actor);
|
||||||
if (jetski) {
|
if (jetski) {
|
||||||
isle->FUN_1001fc80(jetski);
|
isle->FUN_1001fc80(jetski);
|
||||||
isle->VTable0x6c(jetski);
|
isle->VTable0x6c(jetski);
|
||||||
delete jetski;
|
delete jetski;
|
||||||
}
|
}
|
||||||
|
|
||||||
RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, 4);
|
RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, RacecarScript::c_RaceCar_Actor);
|
||||||
if (racecar) {
|
if (racecar) {
|
||||||
isle->FUN_1001fc80(racecar);
|
isle->FUN_1001fc80(racecar);
|
||||||
isle->VTable0x6c(racecar);
|
isle->VTable0x6c(racecar);
|
||||||
|
|
Loading…
Reference in a new issue