mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-21 10:48:15 -05:00
Implement/match Act1State::PlayCptClickDialogue (#1131)
This commit is contained in:
parent
e4453c4100
commit
040c97d92a
2 changed files with 53 additions and 47 deletions
|
@ -85,8 +85,8 @@ class Act1State : public LegoState {
|
|||
MxBool SetFlag() override; // vtable+0x18
|
||||
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
|
||||
|
||||
void FUN_10034660();
|
||||
void FUN_100346a0();
|
||||
void PlayCptClickDialogue();
|
||||
void StopCptClickDialogue();
|
||||
void FUN_10034b60();
|
||||
void FUN_10034d00();
|
||||
|
||||
|
@ -103,36 +103,36 @@ class Act1State : public LegoState {
|
|||
|
||||
// TODO: Most likely getters/setters are not used according to BETA.
|
||||
|
||||
Playlist m_unk0x008; // 0x008
|
||||
MxS32 m_unk0x014; // 0x014
|
||||
MxU32 m_unk0x018; // 0x018
|
||||
MxS16 m_elevFloor; // 0x01c
|
||||
MxBool m_unk0x01e; // 0x01e
|
||||
MxBool m_unk0x01f; // 0x01f
|
||||
MxBool m_planeActive; // 0x020
|
||||
undefined m_unk0x021; // 0x021
|
||||
MxBool m_unk0x022; // 0x022
|
||||
undefined m_unk0x023; // 0x023
|
||||
NamedPlane m_unk0x024; // 0x024
|
||||
NamedPlane m_unk0x070; // 0x070
|
||||
NamedPlane m_unk0x0bc; // 0x0bc
|
||||
NamedPlane m_unk0x108; // 0x108
|
||||
LegoNamedTexture* m_unk0x154; // 0x154
|
||||
LegoNamedTexture* m_unk0x158; // 0x158
|
||||
LegoNamedTexture* m_unk0x15c; // 0x15c
|
||||
Helicopter* m_helicopter; // 0x160
|
||||
NamedPlane m_unk0x164; // 0x164
|
||||
LegoNamedTexture* m_unk0x1b0; // 0x1b0
|
||||
LegoNamedTexture* m_unk0x1b4; // 0x1b4
|
||||
Jetski* m_jetski; // 0x1b8
|
||||
NamedPlane m_unk0x1bc; // 0x1bc
|
||||
LegoNamedTexture* m_unk0x208; // 0x208
|
||||
DuneBuggy* m_dunebuggy; // 0x20c
|
||||
NamedPlane m_unk0x210; // 0x210
|
||||
LegoNamedTexture* m_unk0x25c; // 0x25c
|
||||
LegoNamedTexture* m_unk0x260; // 0x260
|
||||
LegoNamedTexture* m_unk0x264; // 0x264
|
||||
RaceCar* m_racecar; // 0x268
|
||||
Playlist m_cptClickDialogue; // 0x008
|
||||
IsleScript::Script m_currentCptClickDialogue; // 0x014
|
||||
MxU32 m_unk0x018; // 0x018
|
||||
MxS16 m_elevFloor; // 0x01c
|
||||
MxBool m_unk0x01e; // 0x01e
|
||||
MxBool m_unk0x01f; // 0x01f
|
||||
MxBool m_planeActive; // 0x020
|
||||
undefined m_unk0x021; // 0x021
|
||||
MxBool m_unk0x022; // 0x022
|
||||
undefined m_unk0x023; // 0x023
|
||||
NamedPlane m_unk0x024; // 0x024
|
||||
NamedPlane m_unk0x070; // 0x070
|
||||
NamedPlane m_unk0x0bc; // 0x0bc
|
||||
NamedPlane m_unk0x108; // 0x108
|
||||
LegoNamedTexture* m_unk0x154; // 0x154
|
||||
LegoNamedTexture* m_unk0x158; // 0x158
|
||||
LegoNamedTexture* m_unk0x15c; // 0x15c
|
||||
Helicopter* m_helicopter; // 0x160
|
||||
NamedPlane m_unk0x164; // 0x164
|
||||
LegoNamedTexture* m_unk0x1b0; // 0x1b0
|
||||
LegoNamedTexture* m_unk0x1b4; // 0x1b4
|
||||
Jetski* m_jetski; // 0x1b8
|
||||
NamedPlane m_unk0x1bc; // 0x1bc
|
||||
LegoNamedTexture* m_unk0x208; // 0x208
|
||||
DuneBuggy* m_dunebuggy; // 0x20c
|
||||
NamedPlane m_unk0x210; // 0x210
|
||||
LegoNamedTexture* m_unk0x25c; // 0x25c
|
||||
LegoNamedTexture* m_unk0x260; // 0x260
|
||||
LegoNamedTexture* m_unk0x264; // 0x264
|
||||
RaceCar* m_racecar; // 0x268
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x10033a70
|
||||
|
|
|
@ -46,7 +46,7 @@ DECOMP_SIZE_ASSERT(Isle, 0x140)
|
|||
MxU32 g_isleFlags = 0x7f;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f37f0
|
||||
IsleScript::Script g_unk0x100f37f0[] =
|
||||
IsleScript::Script g_cptClickDialogue[] =
|
||||
{IsleScript::c_Avo905Ps_PlayWav, IsleScript::c_Avo906Ps_PlayWav, IsleScript::c_Avo907Ps_PlayWav};
|
||||
|
||||
// FUNCTION: LEGO1 0x10030820
|
||||
|
@ -362,14 +362,14 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
break;
|
||||
case IsleScript::c_Observe_LeftArrow_Ctl:
|
||||
m_act1state->FUN_100346a0();
|
||||
m_act1state->StopCptClickDialogue();
|
||||
m_radio.Stop();
|
||||
case IsleScript::c_SeaView_RightArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_elevopen;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
break;
|
||||
case IsleScript::c_Observe_RightArrow_Ctl:
|
||||
m_act1state->FUN_100346a0();
|
||||
m_act1state->StopCptClickDialogue();
|
||||
m_radio.Stop();
|
||||
case IsleScript::c_SeaView_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_elevdown;
|
||||
|
@ -420,7 +420,7 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
break;
|
||||
case IsleScript::c_Observe_Draw1_Ctl:
|
||||
case IsleScript::c_Observe_Draw2_Ctl:
|
||||
m_act1state->FUN_10034660();
|
||||
m_act1state->PlayCptClickDialogue();
|
||||
break;
|
||||
case IsleScript::c_ElevDown_Elevator_Ctl:
|
||||
m_destLocation = LegoGameState::e_elevride2;
|
||||
|
@ -1287,10 +1287,10 @@ Act1State::Act1State()
|
|||
m_elevFloor = Act1State::c_floor1;
|
||||
m_unk0x018 = 1;
|
||||
m_unk0x01e = FALSE;
|
||||
m_unk0x008 = Playlist((MxU32*) g_unk0x100f37f0, sizeOfArray(g_unk0x100f37f0), Playlist::e_loop);
|
||||
m_cptClickDialogue = Playlist((MxU32*) g_cptClickDialogue, sizeOfArray(g_cptClickDialogue), Playlist::e_loop);
|
||||
m_unk0x01f = FALSE;
|
||||
m_planeActive = FALSE;
|
||||
m_unk0x014 = -1;
|
||||
m_currentCptClickDialogue = IsleScript::c_noneIsle;
|
||||
m_unk0x022 = FALSE;
|
||||
m_unk0x154 = NULL;
|
||||
m_unk0x158 = NULL;
|
||||
|
@ -1386,7 +1386,7 @@ MxResult Act1State::Serialize(LegoFile* p_file)
|
|||
}
|
||||
}
|
||||
|
||||
Write(p_file, m_unk0x008.m_nextIndex);
|
||||
Write(p_file, m_cptClickDialogue.m_nextIndex);
|
||||
Write(p_file, m_unk0x022);
|
||||
}
|
||||
else if (p_file->IsReadMode()) {
|
||||
|
@ -1440,7 +1440,7 @@ MxResult Act1State::Serialize(LegoFile* p_file)
|
|||
}
|
||||
}
|
||||
|
||||
Read(p_file, &m_unk0x008.m_nextIndex);
|
||||
Read(p_file, &m_cptClickDialogue.m_nextIndex);
|
||||
Read(p_file, &m_unk0x022);
|
||||
}
|
||||
|
||||
|
@ -1448,18 +1448,24 @@ MxResult Act1State::Serialize(LegoFile* p_file)
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10034660
|
||||
void Act1State::FUN_10034660()
|
||||
// FUNCTION: LEGO1 0x10034660
|
||||
void Act1State::PlayCptClickDialogue()
|
||||
{
|
||||
// TODO
|
||||
StopCptClickDialogue();
|
||||
m_currentCptClickDialogue = (IsleScript::Script) m_cptClickDialogue.Next();
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
|
||||
if (m_currentCptClickDialogue != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_start, *g_isleScript, m_currentCptClickDialogue, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100346a0
|
||||
void Act1State::FUN_100346a0()
|
||||
void Act1State::StopCptClickDialogue()
|
||||
{
|
||||
if (m_unk0x014 != -1) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x014, NULL);
|
||||
m_unk0x014 = -1;
|
||||
if (m_currentCptClickDialogue != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_currentCptClickDialogue, NULL);
|
||||
m_currentCptClickDialogue = IsleScript::c_noneIsle;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue