mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-25 17:07:52 -05:00
Implement/match Ambulance::ActivateSceneActions (#1023)
This commit is contained in:
parent
2a88d06ff9
commit
475d21f8c8
3 changed files with 47 additions and 5 deletions
|
@ -97,7 +97,7 @@ class Ambulance : public IslePathActor {
|
|||
|
||||
void CreateState();
|
||||
void FUN_10036e60();
|
||||
void FUN_10037060();
|
||||
void ActivateSceneActions();
|
||||
void StopActions();
|
||||
void FUN_10037250();
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "decomp.h"
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
|
@ -289,10 +290,51 @@ MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10037060
|
||||
void Ambulance::FUN_10037060()
|
||||
// FUNCTION: LEGO1 0x10037060
|
||||
void Ambulance::ActivateSceneActions()
|
||||
{
|
||||
// TODO
|
||||
PlayMusic(JukeboxScript::c_Hospital_Music);
|
||||
|
||||
if (m_state->m_unk0x08 == 1) {
|
||||
m_state->m_unk0x08 = 0;
|
||||
PlayAction(IsleScript::c_ham033cl_PlayWav);
|
||||
}
|
||||
else if (m_unk0x16c != 0 && m_unk0x16e != 0) {
|
||||
IsleScript::Script objectId;
|
||||
|
||||
switch (rand() % 2) {
|
||||
case 0:
|
||||
objectId = IsleScript::c_ham076cl_PlayWav;
|
||||
break;
|
||||
case 1:
|
||||
objectId = IsleScript::c_ham088cl_PlayWav;
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||
}
|
||||
|
||||
PlayAction(objectId);
|
||||
}
|
||||
else {
|
||||
IsleScript::Script objectId;
|
||||
|
||||
switch (rand() % 2) {
|
||||
case 0:
|
||||
objectId = IsleScript::c_ham075cl_PlayWav;
|
||||
break;
|
||||
case 1:
|
||||
objectId = IsleScript::c_ham113cl_PlayWav;
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||
}
|
||||
|
||||
PlayAction(objectId);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10037160
|
||||
|
|
|
@ -1026,7 +1026,7 @@ MxLong Isle::HandleTransitionEnd()
|
|||
FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_ambulance->FUN_10037060();
|
||||
m_ambulance->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_towtrack:
|
||||
|
|
Loading…
Reference in a new issue