isle/LEGO1/lego/legoomni/include/ambulance.h

166 lines
4.5 KiB
C
Raw Normal View History

#ifndef AMBULANCE_H
#define AMBULANCE_H
#include "islepathactor.h"
#include "legostate.h"
class MxEndActionNotificationParam;
// VTABLE: LEGO1 0x100d72a0
// SIZE 0x24
class AmbulanceMissionState : public LegoState {
public:
AmbulanceMissionState();
// FUNCTION: LEGO1 0x10037600
inline const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f00e8
return "AmbulanceMissionState";
}
// FUNCTION: LEGO1 0x10037610
inline MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, AmbulanceMissionState::ClassName()) || LegoState::IsA(p_name);
}
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
inline MxS16 GetHighScore(MxU8 p_actorId)
{
switch (p_actorId) {
case LegoActor::c_pepper:
return m_peHighScore;
case LegoActor::c_mama:
return m_maHighScore;
case LegoActor::c_papa:
return m_paHighScore;
case LegoActor::c_nick:
return m_niHighScore;
case LegoActor::c_laura:
return m_laHighScore;
default:
return 0;
}
}
// FUNCTION: BETA10 0x100242d0
inline void UpdateScore(ScoreColor p_score, MxS16 p_actorId)
{
switch (p_actorId) {
case LegoActor::c_pepper:
m_peScore = p_score;
if (m_peHighScore < p_score) {
m_peHighScore = p_score;
}
break;
case LegoActor::c_mama:
m_maScore = p_score;
if (m_maHighScore < p_score) {
m_maHighScore = p_score;
}
break;
case LegoActor::c_papa:
m_paScore = p_score;
if (m_paHighScore < p_score) {
m_paHighScore = p_score;
}
break;
case LegoActor::c_nick:
m_niScore = p_score;
if (m_niHighScore < p_score) {
m_niHighScore = p_score;
}
break;
case LegoActor::c_laura:
m_laScore = p_score;
if (m_laHighScore < p_score) {
m_laHighScore = p_score;
}
break;
}
}
// SYNTHETIC: LEGO1 0x100376c0
// AmbulanceMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08
MxLong m_unk0x0c; // 0x0c
MxS16 m_peScore; // 0x10
MxS16 m_maScore; // 0x12
MxS16 m_paScore; // 0x14
MxS16 m_niScore; // 0x16
MxS16 m_laScore; // 0x18
MxS16 m_peHighScore; // 0x1a
MxS16 m_maHighScore; // 0x1c
MxS16 m_paHighScore; // 0x1e
MxS16 m_niHighScore; // 0x20
MxS16 m_laHighScore; // 0x22
};
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 0x100d71a8
// SIZE 0x184
2023-10-24 19:38:27 -04:00
class Ambulance : public IslePathActor {
public:
2023-10-24 19:38:27 -04:00
Ambulance();
~Ambulance() override;
MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Tickle() override; // vtable+0x08
Enforce vtable match (#464) * vtable enforce * Vtable progress * IslePathActor subclasses * LegoState subclasses * LegoWorld subclasses * Presenter progress * Remaining presenters * All but two that need new files * Merge into vtable branch (#3) * Implement MxDisplaySurface::VTable0x44 (#467) * Update mxdisplaysurface.cpp * add arguments to header * Fix glitched bitmaps * WIP fixes * Match * Fix * Changes * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implmement PoliceState::VTable0x1c (#468) * Implmement PoliceState::VTable0x1c * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement Lego3DView::Render (#470) * Implement Lego3DView::Render * use MxDouble * Revert "use MxDouble" This reverts commit a006b60e2066b79ded3e15e143a302d8fd707deb. * Begin work on Police class (#469) * Begin work on Police class * Use JukeBox::e_policeStation value * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement MxDisplaySurface::CreateCursorSurface (#471) * Update mxdisplaysurface.cpp * Fixes * Update legovideomanager.cpp * Match to 100% --------- Co-authored-by: Christian Semmler <mail@csemmler.com> --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com> * Police fix * Finish * motocycle lower case * Update historybook.h * Update hospitalstate.h * Update jetski.h * Update legoinputmanager.h * Update legolocomotionanimpresenter.h * Update pizza.h * Update act3shark.h * Update ambulancemissionstate.h * Update bumpbouy.h * Update doors.h --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
2024-01-20 18:04:46 -05:00
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x10035fa0
inline const char* ClassName() const override // vtable+0x0c
2023-10-24 19:38:27 -04:00
{
// STRING: LEGO1 0x100f03c4
2023-10-24 19:38:27 -04:00
return "Ambulance";
}
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x10035fb0
inline MxBool IsA(const char* p_name) const override // vtable+0x10
2023-10-24 19:38:27 -04:00
{
return !strcmp(p_name, Ambulance::ClassName()) || IslePathActor::IsA(p_name);
2023-10-24 19:38:27 -04:00
}
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
void VTable0x70(float p_time) override; // vtable+0x70
MxLong HandleClick() override; // vtable+0xcc
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc
void Exit() override; // vtable+0xe4
virtual MxLong HandleButtonDown(LegoControlManagerEvent& p_param); // vtable+0xf0
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4
Enforce vtable match (#464) * vtable enforce * Vtable progress * IslePathActor subclasses * LegoState subclasses * LegoWorld subclasses * Presenter progress * Remaining presenters * All but two that need new files * Merge into vtable branch (#3) * Implement MxDisplaySurface::VTable0x44 (#467) * Update mxdisplaysurface.cpp * add arguments to header * Fix glitched bitmaps * WIP fixes * Match * Fix * Changes * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implmement PoliceState::VTable0x1c (#468) * Implmement PoliceState::VTable0x1c * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement Lego3DView::Render (#470) * Implement Lego3DView::Render * use MxDouble * Revert "use MxDouble" This reverts commit a006b60e2066b79ded3e15e143a302d8fd707deb. * Begin work on Police class (#469) * Begin work on Police class * Use JukeBox::e_policeStation value * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement MxDisplaySurface::CreateCursorSurface (#471) * Update mxdisplaysurface.cpp * Fixes * Update legovideomanager.cpp * Match to 100% --------- Co-authored-by: Christian Semmler <mail@csemmler.com> --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com> * Police fix * Finish * motocycle lower case * Update historybook.h * Update hospitalstate.h * Update jetski.h * Update legoinputmanager.h * Update legolocomotionanimpresenter.h * Update pizza.h * Update act3shark.h * Update ambulancemissionstate.h * Update bumpbouy.h * Update doors.h --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
2024-01-20 18:04:46 -05:00
void CreateState();
void FUN_10036e60();
void ActivateSceneActions();
void StopActions();
2024-05-24 20:41:57 -04:00
void FUN_10037250();
// SYNTHETIC: LEGO1 0x10036130
// Ambulance::`scalar deleting destructor'
private:
void PlayAnimation(IsleScript::Script p_objectId);
void PlayFinalAnimation(IsleScript::Script p_objectId);
void StopAction(IsleScript::Script p_objectId);
void PlayAction(IsleScript::Script p_objectId);
void Leave();
undefined m_unk0x160[4]; // 0x160
AmbulanceMissionState* m_state; // 0x164
MxS16 m_unk0x168; // 0x168
MxS16 m_actorId; // 0x16a
MxS16 m_unk0x16c; // 0x16c
MxS16 m_unk0x16e; // 0x16e
MxS16 m_unk0x170; // 0x170
MxS16 m_unk0x172; // 0x172
IsleScript::Script m_lastAction; // 0x174
IsleScript::Script m_lastAnimation; // 0x178
MxFloat m_fuel; // 0x17c
MxFloat m_time; // 0x180
};
#endif // AMBULANCE_H