Add PlayAction

This commit is contained in:
Christian Semmler 2024-08-03 11:10:57 -07:00
parent c0ab916955
commit 051137e8e1
2 changed files with 22 additions and 16 deletions

View File

@ -105,18 +105,18 @@ class TowTrack : public IslePathActor {
private:
void Leave();
void PlayAction(IsleScript::Script);
void PlayAction(IsleScript::Script p_objectId);
undefined4 m_unk0x160; // 0x160
TowTrackMissionState* m_state; // 0x164
MxS16 m_unk0x168; // 0x168
MxS16 m_actorId; // 0x16a
MxS16 m_unk0x16c; // 0x16c
MxS16 m_unk0x16e; // 0x16e
MxS32 m_unk0x170; // 0x170
MxS32 m_unk0x174; // 0x174
MxFloat m_fuel; // 0x178
MxFloat m_time; // 0x17c
undefined4 m_unk0x160; // 0x160
TowTrackMissionState* m_state; // 0x164
MxS16 m_unk0x168; // 0x168
MxS16 m_actorId; // 0x16a
MxS16 m_unk0x16c; // 0x16c
MxS16 m_unk0x16e; // 0x16e
IsleScript::Script m_lastAction; // 0x170
MxS32 m_unk0x174; // 0x174
MxFloat m_fuel; // 0x178
MxFloat m_time; // 0x17c
};
#endif // TOWTRACK_H

View File

@ -10,6 +10,7 @@
#include "legovariables.h"
#include "legoworld.h"
#include "misc.h"
#include "mxbackgroundaudiomanager.h"
#include "mxmisc.h"
#include "mxsoundpresenter.h"
#include "mxtimer.h"
@ -26,7 +27,7 @@ TowTrack::TowTrack()
m_actorId = -1;
m_state = NULL;
m_unk0x16c = 0;
m_unk0x170 = -1;
m_lastAction = IsleScript::c_noneIsle;
m_unk0x16e = 0;
m_unk0x174 = -1;
m_maxLinearVel = 40.0;
@ -190,7 +191,7 @@ MxLong TowTrack::HandleClick()
}
else {
SpawnPlayer(LegoGameState::e_unk28, TRUE, 0);
m_unk0x170 = -1;
m_lastAction = IsleScript::c_noneIsle;
m_unk0x174 = -1;
m_state->m_unk0x0c = Timer()->GetTime();
m_state->m_unk0x10 = FALSE;
@ -302,10 +303,15 @@ void TowTrack::FUN_1004dbe0()
// TODO
}
// STUB: LEGO1 0x1004dcf0
void TowTrack::PlayAction(IsleScript::Script)
// FUNCTION: LEGO1 0x1004dcf0
void TowTrack::PlayAction(IsleScript::Script p_objectId)
{
// TODO
if (p_objectId != -1) {
InvokeAction(Extra::e_start, *g_isleScript, p_objectId, NULL);
}
m_lastAction = p_objectId;
BackgroundAudioManager()->LowerVolume();
}
// FUNCTION: LEGO1 0x1004dd30