2023-06-29 04:10:08 -04:00
|
|
|
#ifndef PIZZA_H
|
|
|
|
#define PIZZA_H
|
|
|
|
|
2024-10-26 12:34:43 -04:00
|
|
|
#include "actionsfwd.h"
|
2023-09-30 19:25:33 -04:00
|
|
|
#include "decomp.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
#include "isleactor.h"
|
2024-06-03 12:53:25 -04:00
|
|
|
#include "legostate.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-05-24 14:07:36 -04:00
|
|
|
class Act1State;
|
2024-10-26 13:34:16 -04:00
|
|
|
class PizzeriaState;
|
2024-05-01 07:49:47 -04:00
|
|
|
class SkateBoard;
|
|
|
|
|
2024-06-03 12:53:25 -04:00
|
|
|
// VTABLE: LEGO1 0x100d7408
|
2024-06-12 20:02:47 -04:00
|
|
|
// SIZE 0xb4
|
2024-06-03 12:53:25 -04:00
|
|
|
class PizzaMissionState : public LegoState {
|
|
|
|
public:
|
|
|
|
// SIZE 0x20
|
2024-10-26 12:34:43 -04:00
|
|
|
struct Mission {
|
2024-10-27 14:54:01 -04:00
|
|
|
// FUNCTION: LEGO1 0x10039220
|
|
|
|
// FUNCTION: BETA10 0x100ef880
|
|
|
|
Mission() {}
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef8a0
|
|
|
|
Mission(
|
|
|
|
MxU8 p_actorId,
|
|
|
|
undefined2 p_unk0x04,
|
|
|
|
MxLong* p_finishTimes,
|
|
|
|
IsleScript::Script* p_actions,
|
|
|
|
MxS16 p_numActions
|
|
|
|
)
|
|
|
|
{
|
|
|
|
m_numActions = p_numActions;
|
|
|
|
m_actorId = p_actorId;
|
|
|
|
m_unk0x04 = p_unk0x04;
|
|
|
|
m_unk0x06 = 1;
|
|
|
|
m_unk0x08 = 1;
|
|
|
|
m_finishTimes = p_finishTimes;
|
|
|
|
m_startTime = INT_MIN;
|
|
|
|
m_unk0x14 = 1;
|
2024-10-28 11:53:09 -04:00
|
|
|
m_score = LegoState::e_grey;
|
|
|
|
m_hiScore = LegoState::e_grey;
|
2024-10-27 14:54:01 -04:00
|
|
|
m_actions = p_actions;
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10039230
|
|
|
|
Mission& operator=(const Mission& p_mission)
|
|
|
|
{
|
|
|
|
m_actorId = p_mission.m_actorId;
|
|
|
|
m_unk0x04 = p_mission.m_unk0x04;
|
|
|
|
m_unk0x06 = p_mission.m_unk0x06;
|
|
|
|
m_unk0x08 = p_mission.m_unk0x08;
|
|
|
|
m_finishTimes = p_mission.m_finishTimes;
|
|
|
|
m_startTime = p_mission.m_startTime;
|
|
|
|
m_unk0x14 = p_mission.m_unk0x14;
|
|
|
|
m_score = p_mission.m_score;
|
2024-10-28 11:53:09 -04:00
|
|
|
m_hiScore = p_mission.m_hiScore;
|
2024-10-27 14:54:01 -04:00
|
|
|
m_actions = p_mission.m_actions;
|
|
|
|
m_numActions = p_mission.m_numActions;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2024-10-28 11:53:09 -04:00
|
|
|
// FUNCTION: BETA10 0x100ef610
|
|
|
|
IsleScript::Script GetRedFinishAction() { return m_actions[m_numActions + 6]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef640
|
|
|
|
IsleScript::Script GetBlueFinishAction() { return m_actions[m_numActions + 7]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef670
|
|
|
|
IsleScript::Script GetYellowFinishAction() { return m_actions[m_numActions + 8]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef6a0
|
|
|
|
MxLong GetRedFinishTime() { return m_finishTimes[0]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef6d0
|
|
|
|
MxLong GetBlueFinishTime() { return m_finishTimes[1]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef700
|
|
|
|
void UpdateScore(ScoreColor p_score)
|
|
|
|
{
|
|
|
|
m_score = p_score;
|
|
|
|
if (m_hiScore < p_score) {
|
|
|
|
m_hiScore = p_score;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-01 13:30:11 -04:00
|
|
|
// FUNCTION: BETA10 0x100ef7b0
|
|
|
|
IsleScript::Script GetUnknownFinishAction() { return m_actions[m_numActions + 2]; }
|
|
|
|
|
|
|
|
// FUNCTION: BETA10 0x100ef7e0
|
|
|
|
MxLong GetTimeoutTime() { return m_finishTimes[3]; }
|
|
|
|
|
2024-07-04 19:06:32 -04:00
|
|
|
MxResult WriteToFile(LegoFile* p_file)
|
2024-06-14 17:24:34 -04:00
|
|
|
{
|
|
|
|
Write(p_file, m_unk0x06);
|
|
|
|
Write(p_file, m_unk0x14);
|
|
|
|
Write(p_file, m_score);
|
2024-10-28 11:53:09 -04:00
|
|
|
Write(p_file, m_hiScore);
|
2024-06-14 17:24:34 -04:00
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
2024-07-04 19:06:32 -04:00
|
|
|
MxResult ReadFromFile(LegoFile* p_file)
|
2024-06-14 17:24:34 -04:00
|
|
|
{
|
|
|
|
Read(p_file, &m_unk0x06);
|
|
|
|
Read(p_file, &m_unk0x14);
|
|
|
|
Read(p_file, &m_score);
|
2024-10-28 11:53:09 -04:00
|
|
|
Read(p_file, &m_hiScore);
|
2024-06-14 17:24:34 -04:00
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
2024-10-26 12:34:43 -04:00
|
|
|
MxS16 m_numActions; // 0x00
|
2024-10-27 14:54:01 -04:00
|
|
|
MxU8 m_actorId; // 0x02
|
|
|
|
undefined2 m_unk0x04; // 0x04
|
2024-10-26 12:34:43 -04:00
|
|
|
MxS16 m_unk0x06; // 0x06
|
2024-10-27 14:54:01 -04:00
|
|
|
undefined m_unk0x08; // 0x08
|
|
|
|
MxLong* m_finishTimes; // 0x0c
|
2024-10-26 12:34:43 -04:00
|
|
|
MxLong m_startTime; // 0x10
|
|
|
|
MxS16 m_unk0x14; // 0x14
|
2024-10-28 11:53:09 -04:00
|
|
|
MxS16 m_score; // 0x16
|
|
|
|
MxS16 m_hiScore; // 0x18
|
2024-10-26 12:34:43 -04:00
|
|
|
IsleScript::Script* m_actions; // 0x1c
|
2024-06-03 12:53:25 -04:00
|
|
|
};
|
|
|
|
|
2024-06-12 20:02:47 -04:00
|
|
|
PizzaMissionState();
|
|
|
|
|
2024-06-03 12:53:25 -04:00
|
|
|
// FUNCTION: LEGO1 0x10039290
|
2024-07-04 19:06:32 -04:00
|
|
|
const char* ClassName() const override // vtable+0x0c
|
2024-06-03 12:53:25 -04:00
|
|
|
{
|
|
|
|
// STRING: LEGO1 0x100f00d4
|
|
|
|
return "PizzaMissionState";
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x100392a0
|
2024-07-04 19:06:32 -04:00
|
|
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
2024-06-03 12:53:25 -04:00
|
|
|
{
|
|
|
|
return !strcmp(p_name, PizzaMissionState::ClassName()) || LegoState::IsA(p_name);
|
|
|
|
}
|
|
|
|
|
2024-06-14 17:24:34 -04:00
|
|
|
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
|
2024-06-03 12:53:25 -04:00
|
|
|
|
2024-10-27 14:54:01 -04:00
|
|
|
// FUNCTION: BETA10 0x100ef470
|
2024-10-28 12:25:54 -04:00
|
|
|
void SetUnknown0xb0(MxU32 p_unk0xb0) { m_unk0xb0 = p_unk0xb0; }
|
2024-10-27 14:54:01 -04:00
|
|
|
|
2024-10-28 11:53:09 -04:00
|
|
|
MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; }
|
2024-06-03 12:53:25 -04:00
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10039350
|
|
|
|
// PizzaMissionState::`scalar deleting destructor'
|
|
|
|
|
2024-10-27 14:54:01 -04:00
|
|
|
Mission* GetMission(MxU8 p_actorId);
|
2024-10-26 13:34:16 -04:00
|
|
|
MxS16 FUN_10039540();
|
2024-06-03 12:53:25 -04:00
|
|
|
|
2024-10-26 13:34:16 -04:00
|
|
|
PizzeriaState* m_pizzeriaState; // 0x08
|
|
|
|
undefined4 m_unk0x0c; // 0x0c
|
2024-10-27 14:54:01 -04:00
|
|
|
Mission m_missions[5]; // 0x10
|
2024-10-28 12:25:54 -04:00
|
|
|
MxU32 m_unk0xb0; // 0xb0
|
2024-10-28 14:04:08 -04:00
|
|
|
|
|
|
|
static IsleScript::Script g_pepperActions[];
|
|
|
|
static IsleScript::Script g_mamaActions[];
|
|
|
|
static IsleScript::Script g_papaActions[];
|
|
|
|
static IsleScript::Script g_nickActions[];
|
|
|
|
static IsleScript::Script g_lauraActions[];
|
|
|
|
|
|
|
|
static MxLong g_pepperFinishTimes[];
|
|
|
|
static MxLong g_mamaFinishTimes[];
|
|
|
|
static MxLong g_papaFinishTimes[];
|
|
|
|
static MxLong g_nickFinishTimes[];
|
|
|
|
static MxLong g_lauraFinishTimes[];
|
2024-06-03 12:53:25 -04:00
|
|
|
};
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d7380
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x9c
|
2023-10-24 19:38:27 -04:00
|
|
|
class Pizza : public IsleActor {
|
2023-06-29 04:10:08 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
Pizza();
|
2024-02-01 15:42:10 -05:00
|
|
|
~Pizza() override;
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
MxResult Tickle() override; // vtable+0x08
|
2023-08-03 12:54:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10037f90
|
2024-07-04 19:06:32 -04:00
|
|
|
const char* ClassName() const override // vtable+0x0c
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-27 15:59:42 -05:00
|
|
|
// STRING: LEGO1 0x100f038c
|
2023-10-24 19:38:27 -04:00
|
|
|
return "Pizza";
|
|
|
|
}
|
2023-08-03 12:54:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10037fa0
|
2024-07-04 19:06:32 -04:00
|
|
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-13 05:48:14 -05:00
|
|
|
return !strcmp(p_name, Pizza::ClassName()) || IsleActor::IsA(p_name);
|
2023-10-24 19:38:27 -04:00
|
|
|
}
|
2023-09-30 19:25:33 -04:00
|
|
|
|
2024-10-27 14:54:01 -04:00
|
|
|
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
|
|
|
MxLong HandleClick() override; // vtable+0x68
|
|
|
|
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
|
|
|
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
|
2024-01-20 18:04:46 -05:00
|
|
|
|
2024-05-24 14:07:36 -04:00
|
|
|
void CreateState();
|
2024-10-28 12:25:54 -04:00
|
|
|
void FUN_10038220(IsleScript::Script p_objectId);
|
2024-04-28 07:23:29 -04:00
|
|
|
void FUN_100382b0();
|
2024-10-26 12:34:43 -04:00
|
|
|
void StopActions();
|
2024-10-28 12:25:54 -04:00
|
|
|
void PlayAction(MxU32 p_objectId, MxBool p_param7);
|
2024-04-28 07:23:29 -04:00
|
|
|
|
2024-10-26 12:34:43 -04:00
|
|
|
void SetSkateboard(SkateBoard* p_skateBoard) { m_skateBoard = p_skateBoard; }
|
2024-04-28 07:23:29 -04:00
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100380e0
|
|
|
|
// Pizza::`scalar deleting destructor'
|
|
|
|
|
2023-08-03 12:54:08 -04:00
|
|
|
private:
|
2024-10-26 12:34:43 -04:00
|
|
|
PizzaMissionState* m_state; // 0x7c
|
|
|
|
PizzaMissionState::Mission* m_mission; // 0x80
|
|
|
|
SkateBoard* m_skateBoard; // 0x84
|
|
|
|
Act1State* m_act1state; // 0x88
|
2024-10-28 12:25:54 -04:00
|
|
|
IsleScript::Script m_unk0x8c; // 0x8c
|
2024-10-28 11:53:09 -04:00
|
|
|
MxLong m_unk0x90; // 0x90
|
2024-11-01 13:30:11 -04:00
|
|
|
MxLong m_unk0x94; // 0x94
|
2024-10-27 14:54:01 -04:00
|
|
|
MxBool m_unk0x98; // 0x98
|
2023-06-29 04:10:08 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PIZZA_H
|