mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 17:34:05 +00:00
Add enum for actor IDs (#993)
This commit is contained in:
committed by
GitHub
parent
6e7e9a3f20
commit
6a9f68872b
@@ -31,7 +31,7 @@ MxBool g_trackLedEnabled = FALSE;
|
||||
// FUNCTION: LEGO1 0x100046a0
|
||||
GasStation::GasStation()
|
||||
{
|
||||
m_currentActorId = 0;
|
||||
m_currentActorId = LegoActor::c_none;
|
||||
m_state = NULL;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
m_trackLedBitmap = NULL;
|
||||
@@ -134,7 +134,7 @@ void GasStation::ReadyWorld()
|
||||
m_currentActorId = CurrentActor()->GetActorId();
|
||||
|
||||
switch (m_currentActorId) {
|
||||
case 1:
|
||||
case LegoActor::c_pepper:
|
||||
switch (m_state->m_unk0x18) {
|
||||
case 0:
|
||||
m_state->m_unk0x14.m_unk0x00 = 5;
|
||||
@@ -165,7 +165,7 @@ void GasStation::ReadyWorld()
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
case 2:
|
||||
case LegoActor::c_mama:
|
||||
switch (m_state->m_unk0x1a) {
|
||||
case 0:
|
||||
m_state->m_unk0x14.m_unk0x00 = 5;
|
||||
@@ -191,7 +191,7 @@ void GasStation::ReadyWorld()
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
case 3:
|
||||
case LegoActor::c_papa:
|
||||
switch (m_state->m_unk0x1c) {
|
||||
case 0:
|
||||
m_state->m_unk0x14.m_unk0x00 = 5;
|
||||
@@ -217,7 +217,7 @@ void GasStation::ReadyWorld()
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
switch (m_state->m_unk0x1e) {
|
||||
case 0:
|
||||
m_state->m_unk0x14.m_unk0x00 = 5;
|
||||
@@ -243,7 +243,7 @@ void GasStation::ReadyWorld()
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
switch (m_state->m_unk0x20) {
|
||||
case 0:
|
||||
m_state->m_unk0x14.m_unk0x00 = 5;
|
||||
|
||||
@@ -35,7 +35,7 @@ MxBool g_pizzaLedEnabled = FALSE;
|
||||
// FUNCTION: LEGO1 0x100745e0
|
||||
Hospital::Hospital()
|
||||
{
|
||||
m_currentActorId = 0;
|
||||
m_currentActorId = LegoActor::c_none;
|
||||
m_unk0x100 = 0;
|
||||
m_hospitalState = NULL;
|
||||
m_unk0x108 = 0;
|
||||
@@ -145,14 +145,14 @@ void Hospital::ReadyWorld()
|
||||
m_pizzaLedBitmap = (MxStillPresenter*) Find("MxStillPresenter", "PizzaLed_Bitmap");
|
||||
|
||||
if (CurrentActor() == NULL) {
|
||||
m_currentActorId = 5;
|
||||
m_currentActorId = LegoActor::c_laura;
|
||||
}
|
||||
else {
|
||||
m_currentActorId = CurrentActor()->GetActorId();
|
||||
}
|
||||
|
||||
switch (m_currentActorId) {
|
||||
case 1:
|
||||
case LegoActor::c_pepper:
|
||||
m_hospitalState->m_unk0x0c = m_hospitalState->m_unk0x0e;
|
||||
|
||||
if (m_hospitalState->m_unk0x0e < 5) {
|
||||
@@ -160,7 +160,7 @@ void Hospital::ReadyWorld()
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
case LegoActor::c_mama:
|
||||
m_hospitalState->m_unk0x0c = m_hospitalState->m_unk0x10;
|
||||
|
||||
if (m_hospitalState->m_unk0x10 < 5) {
|
||||
@@ -168,7 +168,7 @@ void Hospital::ReadyWorld()
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
case LegoActor::c_papa:
|
||||
m_hospitalState->m_unk0x0c = m_hospitalState->m_unk0x12;
|
||||
|
||||
if (m_hospitalState->m_unk0x12 < 5) {
|
||||
@@ -176,7 +176,7 @@ void Hospital::ReadyWorld()
|
||||
}
|
||||
|
||||
break;
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
m_hospitalState->m_unk0x0c = m_hospitalState->m_unk0x14;
|
||||
|
||||
if (m_hospitalState->m_unk0x14 < 5) {
|
||||
@@ -184,7 +184,7 @@ void Hospital::ReadyWorld()
|
||||
}
|
||||
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
m_hospitalState->m_unk0x0c = m_hospitalState->m_unk0x16;
|
||||
|
||||
if (m_hospitalState->m_unk0x16 < 5) {
|
||||
@@ -269,7 +269,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
break;
|
||||
case 11:
|
||||
switch (m_currentActorId) {
|
||||
case 1:
|
||||
case LegoActor::c_pepper:
|
||||
switch (m_hospitalState->m_unk0x0e) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -288,7 +288,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case LegoActor::c_mama:
|
||||
switch (m_hospitalState->m_unk0x10) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -307,7 +307,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case LegoActor::c_papa:
|
||||
switch (m_hospitalState->m_unk0x12) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -326,7 +326,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
switch (m_hospitalState->m_unk0x14) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -345,7 +345,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
switch (m_hospitalState->m_unk0x16) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -438,7 +438,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
}
|
||||
else {
|
||||
switch (m_currentActorId) {
|
||||
case 1:
|
||||
case LegoActor::c_pepper:
|
||||
switch (m_hospitalState->m_unk0x0e) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -457,7 +457,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case LegoActor::c_mama:
|
||||
switch (m_hospitalState->m_unk0x10) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -476,7 +476,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case LegoActor::c_papa:
|
||||
switch (m_hospitalState->m_unk0x12) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -495,7 +495,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
switch (m_hospitalState->m_unk0x14) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -514,7 +514,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
switch (m_hospitalState->m_unk0x16) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
||||
@@ -1047,7 +1047,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerEvent& p_param)
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_unk4:
|
||||
if (state->GetActorId()) {
|
||||
if (state->GetActorId() != LegoActor::c_none) {
|
||||
if (m_infocenterState->HasRegistered()) {
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_destLocation = state->GetPreviousArea();
|
||||
@@ -1336,23 +1336,23 @@ void Infocenter::UpdateFrameHot(MxBool p_display)
|
||||
MxS32 x, y;
|
||||
|
||||
switch (GameState()->GetActorId()) {
|
||||
case 1:
|
||||
case LegoActor::c_pepper:
|
||||
x = 302;
|
||||
y = 81;
|
||||
break;
|
||||
case 2:
|
||||
case LegoActor::c_mama:
|
||||
x = 204;
|
||||
y = 81;
|
||||
break;
|
||||
case 3:
|
||||
case LegoActor::c_papa:
|
||||
x = 253;
|
||||
y = 81;
|
||||
break;
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
x = 353;
|
||||
y = 81;
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
x = 399;
|
||||
y = 81;
|
||||
break;
|
||||
|
||||
@@ -114,7 +114,7 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerEvent& p_param)
|
||||
result = 1;
|
||||
break;
|
||||
case InfodoorScript::c_Door_Ctl:
|
||||
if (GameState()->GetActorId()) {
|
||||
if (GameState()->GetActorId() != LegoActor::c_none) {
|
||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (state->HasRegistered()) {
|
||||
m_destLocation = LegoGameState::e_unk4;
|
||||
|
||||
@@ -544,7 +544,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
VideoManager()->ResetPalette(FALSE);
|
||||
m_act1state->FUN_10034d00();
|
||||
|
||||
if (CurrentActor() != NULL && CurrentActor()->GetActorId() != 0) {
|
||||
if (CurrentActor() != NULL && CurrentActor()->GetActorId() != LegoActor::c_none) {
|
||||
// TODO: Match, most likely an inline function
|
||||
MxS32 targetEntityId = (CurrentActor()->GetActorId() == 1) + 250;
|
||||
|
||||
|
||||
@@ -231,11 +231,11 @@ void PoliceState::FUN_1005ea40()
|
||||
}
|
||||
|
||||
switch (CurrentActor()->GetActorId()) {
|
||||
case 4:
|
||||
case LegoActor::c_nick:
|
||||
policeScript = PoliceScript::c_nps002la_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
case 5:
|
||||
case LegoActor::c_laura:
|
||||
policeScript = PoliceScript::c_nps001ni_RunAnim;
|
||||
m_policeScript = policeScript;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user