Implement/match Pizza::HandleClick (#1119)
Some checks are pending
Analyze / ${{ matrix.who }} annotations (CONFIG) (push) Waiting to run
Analyze / ${{ matrix.who }} annotations (ISLE) (push) Waiting to run
Analyze / ${{ matrix.who }} annotations (LEGO1) (push) Waiting to run
Build / Download original binaries (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[clang-tidy:true msys-env:mingw-w64-clang-i686 msystem:clang32 name:msys2 clang32 no-dx5-libs:true shell:msys2 {0} werror:true]) (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[clang-tidy:true msys-env:mingw-w64-i686 msystem:mingw32 name:msys2 mingw32 shell:msys2 {0} werror:true]) (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[name:MSVC setup-cmake:true setup-msvc:true setup-ninja:true shell:sh]) (push) Waiting to run
Build / MSVC 4.20 (push) Waiting to run
Build / Compare with master (push) Blocked by required conditions
Build / Upload artifacts (push) Blocked by required conditions
Naming / C++ (push) Waiting to run

This commit is contained in:
Christian Semmler 2024-10-26 10:34:16 -07:00 committed by GitHub
parent 2b9d8f1fba
commit b3ce98a2ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 56 additions and 6 deletions

View File

@ -7,6 +7,7 @@
#include "legostate.h"
class Act1State;
class PizzeriaState;
class SkateBoard;
// VTABLE: LEGO1 0x100d7408
@ -69,11 +70,12 @@ public:
// PizzaMissionState::`scalar deleting destructor'
Mission* GetState(MxU8 p_id);
MxS16 FUN_10039540();
undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c
Mission m_state[5]; // 0x10
undefined4 m_unk0xb0; // 0xb0
PizzeriaState* m_pizzeriaState; // 0x08
undefined4 m_unk0x0c; // 0x0c
Mission m_state[5]; // 0x10
undefined4 m_unk0xb0; // 0xb0
};
// VTABLE: LEGO1 0x100d7380

View File

@ -40,6 +40,7 @@ public:
// SYNTHETIC: LEGO1 0x10017ce0
// PizzeriaState::`scalar deleting destructor'
MxS16 FUN_10017d50();
MxU32 FUN_10017d70();
// TODO: Most likely getters/setters are not used according to BETA.

View File

@ -2,6 +2,7 @@
#include "isle.h"
#include "isle_actions.h"
#include "jukebox_actions.h"
#include "legoanimationmanager.h"
#include "legogamestate.h"
#include "legoutils.h"
@ -10,6 +11,8 @@
#include "mxbackgroundaudiomanager.h"
#include "mxmisc.h"
#include "mxticklemanager.h"
#include "mxtimer.h"
#include "pizzeria.h"
#include "skateboard.h"
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
@ -121,10 +124,42 @@ void Pizza::StopActions()
}
}
// STUB: LEGO1 0x100383f0
// FUNCTION: LEGO1 0x100383f0
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;
}
@ -191,3 +226,9 @@ PizzaMissionState::Mission* PizzaMissionState::GetState(MxU8 p_id)
return NULL;
}
// FUNCTION: LEGO1 0x10039540
MxS16 PizzaMissionState::FUN_10039540()
{
return m_pizzeriaState->FUN_10017d50();
}

View File

@ -70,6 +70,12 @@ PizzeriaState::PizzeriaState()
// TODO
}
// STUB: LEGO1 0x10017d50
MxS16 PizzeriaState::FUN_10017d50()
{
return 0;
}
// STUB: LEGO1 0x10017d70
MxU32 PizzeriaState::FUN_10017d70()
{