mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-21 23:17:53 -05:00
Implement/match Pizza::HandleClick (#1119)
This commit is contained in:
parent
2b9d8f1fba
commit
b3ce98a2ec
4 changed files with 56 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include "legostate.h"
|
#include "legostate.h"
|
||||||
|
|
||||||
class Act1State;
|
class Act1State;
|
||||||
|
class PizzeriaState;
|
||||||
class SkateBoard;
|
class SkateBoard;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7408
|
// VTABLE: LEGO1 0x100d7408
|
||||||
|
@ -69,11 +70,12 @@ class PizzaMissionState : public LegoState {
|
||||||
// PizzaMissionState::`scalar deleting destructor'
|
// PizzaMissionState::`scalar deleting destructor'
|
||||||
|
|
||||||
Mission* GetState(MxU8 p_id);
|
Mission* GetState(MxU8 p_id);
|
||||||
|
MxS16 FUN_10039540();
|
||||||
|
|
||||||
undefined4 m_unk0x08; // 0x08
|
PizzeriaState* m_pizzeriaState; // 0x08
|
||||||
undefined4 m_unk0x0c; // 0x0c
|
undefined4 m_unk0x0c; // 0x0c
|
||||||
Mission m_state[5]; // 0x10
|
Mission m_state[5]; // 0x10
|
||||||
undefined4 m_unk0xb0; // 0xb0
|
undefined4 m_unk0xb0; // 0xb0
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7380
|
// VTABLE: LEGO1 0x100d7380
|
||||||
|
|
|
@ -40,6 +40,7 @@ class PizzeriaState : public LegoState {
|
||||||
// SYNTHETIC: LEGO1 0x10017ce0
|
// SYNTHETIC: LEGO1 0x10017ce0
|
||||||
// PizzeriaState::`scalar deleting destructor'
|
// PizzeriaState::`scalar deleting destructor'
|
||||||
|
|
||||||
|
MxS16 FUN_10017d50();
|
||||||
MxU32 FUN_10017d70();
|
MxU32 FUN_10017d70();
|
||||||
|
|
||||||
// TODO: Most likely getters/setters are not used according to BETA.
|
// TODO: Most likely getters/setters are not used according to BETA.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "isle.h"
|
#include "isle.h"
|
||||||
#include "isle_actions.h"
|
#include "isle_actions.h"
|
||||||
|
#include "jukebox_actions.h"
|
||||||
#include "legoanimationmanager.h"
|
#include "legoanimationmanager.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
#include "legoutils.h"
|
#include "legoutils.h"
|
||||||
|
@ -10,6 +11,8 @@
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
|
#include "mxtimer.h"
|
||||||
|
#include "pizzeria.h"
|
||||||
#include "skateboard.h"
|
#include "skateboard.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
||||||
|
@ -121,10 +124,42 @@ void Pizza::StopActions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100383f0
|
// FUNCTION: LEGO1 0x100383f0
|
||||||
MxLong Pizza::HandleClick()
|
MxLong Pizza::HandleClick()
|
||||||
{
|
{
|
||||||
// TODO
|
if (m_state->m_unk0x0c == 1) {
|
||||||
|
m_state->m_unk0x0c = 2;
|
||||||
|
m_mission->m_startTime = Timer()->GetTime();
|
||||||
|
TickleManager()->RegisterClient(this, 200);
|
||||||
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_state->m_unk0x0c == 2) {
|
||||||
|
m_act1state->m_unk0x018 = 3;
|
||||||
|
|
||||||
|
if (m_skateBoard == NULL) {
|
||||||
|
m_skateBoard = (SkateBoard*) m_world->Find(m_atomId, IsleScript::c_SkateBoard_Actor);
|
||||||
|
}
|
||||||
|
|
||||||
|
IsleScript::Script action;
|
||||||
|
|
||||||
|
switch (m_state->FUN_10039540()) {
|
||||||
|
case 0:
|
||||||
|
action = m_mission->m_actions[m_mission->m_numActions + 3];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
action = m_mission->m_actions[m_mission->m_numActions + 4];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
action = m_mission->m_actions[m_mission->m_numActions + 5];
|
||||||
|
}
|
||||||
|
|
||||||
|
FUN_10038fe0(action, TRUE);
|
||||||
|
m_state->m_unk0x0c = 3;
|
||||||
|
PlayMusic(JukeboxScript::c_PizzaMission_Music);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,3 +226,9 @@ PizzaMissionState::Mission* PizzaMissionState::GetState(MxU8 p_id)
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10039540
|
||||||
|
MxS16 PizzaMissionState::FUN_10039540()
|
||||||
|
{
|
||||||
|
return m_pizzeriaState->FUN_10017d50();
|
||||||
|
}
|
||||||
|
|
|
@ -70,6 +70,12 @@ PizzeriaState::PizzeriaState()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10017d50
|
||||||
|
MxS16 PizzeriaState::FUN_10017d50()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10017d70
|
// STUB: LEGO1 0x10017d70
|
||||||
MxU32 PizzeriaState::FUN_10017d70()
|
MxU32 PizzeriaState::FUN_10017d70()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue