mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 07:28:00 -05:00
Implement/match Pizza::PlayAction (#1123)
* Implement/match Pizza::PlayAction * Remove unused header
This commit is contained in:
parent
2fa2ab4a96
commit
ad353b7f3e
6 changed files with 27 additions and 19 deletions
|
@ -1,7 +1,6 @@
|
||||||
#ifndef LEGOANIMATIONMANAGER_H
|
#ifndef LEGOANIMATIONMANAGER_H
|
||||||
#define LEGOANIMATIONMANAGER_H
|
#define LEGOANIMATIONMANAGER_H
|
||||||
|
|
||||||
#include "actionsfwd.h"
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "legolocations.h"
|
#include "legolocations.h"
|
||||||
#include "legostate.h"
|
#include "legostate.h"
|
||||||
|
@ -161,7 +160,7 @@ class LegoAnimationManager : public MxCore {
|
||||||
void FUN_10060570(MxBool p_unk0x1a);
|
void FUN_10060570(MxBool p_unk0x1a);
|
||||||
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
|
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
|
||||||
MxResult FUN_10060dc0(
|
MxResult FUN_10060dc0(
|
||||||
IsleScript::Script p_objectId,
|
MxU32 p_objectId,
|
||||||
MxMatrix* p_matrix,
|
MxMatrix* p_matrix,
|
||||||
MxBool p_param3,
|
MxBool p_param3,
|
||||||
MxBool p_param4,
|
MxBool p_param4,
|
||||||
|
|
|
@ -132,7 +132,7 @@ class PizzaMissionState : public LegoState {
|
||||||
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
|
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x100ef470
|
// FUNCTION: BETA10 0x100ef470
|
||||||
void SetUnknown0xb0(undefined4 p_unk0xb0) { m_unk0xb0 = p_unk0xb0; }
|
void SetUnknown0xb0(MxU32 p_unk0xb0) { m_unk0xb0 = p_unk0xb0; }
|
||||||
|
|
||||||
MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; }
|
MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; }
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ class PizzaMissionState : public LegoState {
|
||||||
PizzeriaState* m_pizzeriaState; // 0x08
|
PizzeriaState* m_pizzeriaState; // 0x08
|
||||||
undefined4 m_unk0x0c; // 0x0c
|
undefined4 m_unk0x0c; // 0x0c
|
||||||
Mission m_missions[5]; // 0x10
|
Mission m_missions[5]; // 0x10
|
||||||
undefined4 m_unk0xb0; // 0xb0
|
MxU32 m_unk0xb0; // 0xb0
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7380
|
// VTABLE: LEGO1 0x100d7380
|
||||||
|
@ -176,10 +176,10 @@ class Pizza : public IsleActor {
|
||||||
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
|
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
|
||||||
|
|
||||||
void CreateState();
|
void CreateState();
|
||||||
void FUN_10038220(MxU32 p_objectId);
|
void FUN_10038220(IsleScript::Script p_objectId);
|
||||||
void FUN_100382b0();
|
void FUN_100382b0();
|
||||||
void StopActions();
|
void StopActions();
|
||||||
void PlayAction(MxU32 p_objectId, MxBool);
|
void PlayAction(MxU32 p_objectId, MxBool p_param7);
|
||||||
|
|
||||||
void SetSkateboard(SkateBoard* p_skateBoard) { m_skateBoard = p_skateBoard; }
|
void SetSkateboard(SkateBoard* p_skateBoard) { m_skateBoard = p_skateBoard; }
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ class Pizza : public IsleActor {
|
||||||
PizzaMissionState::Mission* m_mission; // 0x80
|
PizzaMissionState::Mission* m_mission; // 0x80
|
||||||
SkateBoard* m_skateBoard; // 0x84
|
SkateBoard* m_skateBoard; // 0x84
|
||||||
Act1State* m_act1state; // 0x88
|
Act1State* m_act1state; // 0x88
|
||||||
undefined4 m_unk0x8c; // 0x8c
|
IsleScript::Script m_unk0x8c; // 0x8c
|
||||||
MxLong m_unk0x90; // 0x90
|
MxLong m_unk0x90; // 0x90
|
||||||
undefined4 m_unk0x94; // 0x94
|
undefined4 m_unk0x94; // 0x94
|
||||||
MxBool m_unk0x98; // 0x98
|
MxBool m_unk0x98; // 0x98
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "mxtimer.h"
|
#include "mxtimer.h"
|
||||||
#include "pizzeria.h"
|
#include "pizzeria.h"
|
||||||
#include "skateboard.h"
|
#include "skateboard.h"
|
||||||
|
#include "sndanim_actions.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
||||||
DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb4)
|
DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb4)
|
||||||
|
@ -130,7 +131,7 @@ Pizza::Pizza()
|
||||||
m_mission = NULL;
|
m_mission = NULL;
|
||||||
m_skateBoard = NULL;
|
m_skateBoard = NULL;
|
||||||
m_act1state = NULL;
|
m_act1state = NULL;
|
||||||
m_unk0x8c = -1;
|
m_unk0x8c = IsleScript::c_noneIsle;
|
||||||
m_unk0x98 = FALSE;
|
m_unk0x98 = FALSE;
|
||||||
m_unk0x90 = INT_MIN;
|
m_unk0x90 = INT_MIN;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +172,7 @@ void Pizza::CreateState()
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10038220
|
// FUNCTION: LEGO1 0x10038220
|
||||||
// FUNCTION: BETA10 0x100edb81
|
// FUNCTION: BETA10 0x100edb81
|
||||||
void Pizza::FUN_10038220(MxU32 p_objectId)
|
void Pizza::FUN_10038220(IsleScript::Script p_objectId)
|
||||||
{
|
{
|
||||||
AnimationManager()->FUN_10064740(NULL);
|
AnimationManager()->FUN_10064740(NULL);
|
||||||
m_mission = m_state->GetMission(GameState()->GetActorId());
|
m_mission = m_state->GetMission(GameState()->GetActorId());
|
||||||
|
@ -182,14 +183,14 @@ void Pizza::FUN_10038220(MxU32 p_objectId)
|
||||||
AnimationManager()->EnableCamAnims(FALSE);
|
AnimationManager()->EnableCamAnims(FALSE);
|
||||||
AnimationManager()->FUN_1005f6d0(FALSE);
|
AnimationManager()->FUN_1005f6d0(FALSE);
|
||||||
PlayAction(p_objectId, FALSE);
|
PlayAction(p_objectId, FALSE);
|
||||||
m_unk0x8c = -1;
|
m_unk0x8c = IsleScript::c_noneIsle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100382b0
|
// FUNCTION: LEGO1 0x100382b0
|
||||||
void Pizza::FUN_100382b0()
|
void Pizza::FUN_100382b0()
|
||||||
{
|
{
|
||||||
if (m_state->m_unk0x0c != 8) {
|
if (m_state->m_unk0x0c != 8) {
|
||||||
if (m_unk0x8c != -1) {
|
if (m_unk0x8c != IsleScript::c_noneIsle) {
|
||||||
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x8c, NULL);
|
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x8c, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +203,7 @@ void Pizza::FUN_100382b0()
|
||||||
m_mission->m_startTime = INT_MIN;
|
m_mission->m_startTime = INT_MIN;
|
||||||
m_mission = NULL;
|
m_mission = NULL;
|
||||||
m_unk0x98 = FALSE;
|
m_unk0x98 = FALSE;
|
||||||
m_unk0x8c = -1;
|
m_unk0x8c = IsleScript::c_noneIsle;
|
||||||
BackgroundAudioManager()->RaiseVolume();
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
TickleManager()->UnregisterClient(this);
|
TickleManager()->UnregisterClient(this);
|
||||||
m_unk0x90 = INT_MIN;
|
m_unk0x90 = INT_MIN;
|
||||||
|
@ -275,7 +276,7 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||||
if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
|
if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
|
||||||
GameState()->GetActorId() == LegoActor::c_pepper) {
|
GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||||
m_state->m_unk0x0c = 5;
|
m_state->m_unk0x0c = 5;
|
||||||
m_state->SetUnknown0xb0(0x12e);
|
m_state->SetUnknown0xb0(SndanimScript::c_TRS302_OpenJailDoor);
|
||||||
|
|
||||||
if (time < m_mission->GetRedFinishTime()) {
|
if (time < m_mission->GetRedFinishTime()) {
|
||||||
m_mission->UpdateScore(LegoState::e_red);
|
m_mission->UpdateScore(LegoState::e_red);
|
||||||
|
@ -371,10 +372,17 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam&)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10038fe0
|
// FUNCTION: LEGO1 0x10038fe0
|
||||||
void Pizza::PlayAction(MxU32 p_objectId, MxBool)
|
// FUNCTION: BETA10 0x100ef520
|
||||||
|
void Pizza::PlayAction(MxU32 p_objectId, MxBool p_param7)
|
||||||
{
|
{
|
||||||
// TODO
|
m_state->SetUnknown0xb0(p_objectId);
|
||||||
|
|
||||||
|
if (m_unk0x8c != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x8c, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, FALSE, NULL, FALSE, p_param7, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10039030
|
// FUNCTION: LEGO1 0x10039030
|
||||||
|
@ -388,7 +396,7 @@ PizzaMissionState::PizzaMissionState()
|
||||||
m_missions[3] = Mission(LegoActor::c_nick, 2, g_nickFinishTimes, g_nickActions, 4);
|
m_missions[3] = Mission(LegoActor::c_nick, 2, g_nickFinishTimes, g_nickActions, 4);
|
||||||
m_missions[4] = Mission(LegoActor::c_laura, 2, g_lauraFinishTimes, g_lauraActions, 4);
|
m_missions[4] = Mission(LegoActor::c_laura, 2, g_lauraFinishTimes, g_lauraActions, 4);
|
||||||
m_pizzeriaState = (PizzeriaState*) GameState()->GetState("PizzeriaState");
|
m_pizzeriaState = (PizzeriaState*) GameState()->GetState("PizzeriaState");
|
||||||
m_unk0xb0 = -1;
|
m_unk0xb0 = IsleScript::c_noneIsle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100393c0
|
// FUNCTION: LEGO1 0x100393c0
|
||||||
|
|
|
@ -58,7 +58,7 @@ MxLong Pizzeria::HandleClick()
|
||||||
AnimationManager()->FUN_10061010(FALSE);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
|
|
||||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||||
pizza->FUN_10038220(m_pizzeriaState->FUN_10017d70());
|
pizza->FUN_10038220((IsleScript::Script) m_pizzeriaState->FUN_10017d70());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1108,7 +1108,7 @@ MxResult LegoAnimationManager::StartEntityAction(MxDSAction& p_dsAction, LegoEnt
|
||||||
// FUNCTION: LEGO1 0x10060dc0
|
// FUNCTION: LEGO1 0x10060dc0
|
||||||
// FUNCTION: BETA10 0x10041f2c
|
// FUNCTION: BETA10 0x10041f2c
|
||||||
MxResult LegoAnimationManager::FUN_10060dc0(
|
MxResult LegoAnimationManager::FUN_10060dc0(
|
||||||
IsleScript::Script p_objectId,
|
MxU32 p_objectId,
|
||||||
MxMatrix* p_matrix,
|
MxMatrix* p_matrix,
|
||||||
MxBool p_param3,
|
MxBool p_param3,
|
||||||
MxBool p_param4,
|
MxBool p_param4,
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
#include "pizza.h"
|
#include "pizza.h"
|
||||||
#include "pizzeria.h"
|
#include "pizzeria.h"
|
||||||
|
#include "racecar.h"
|
||||||
#include "scripts.h"
|
#include "scripts.h"
|
||||||
#include "skateboard.h"
|
#include "skateboard.h"
|
||||||
#include "towtrack.h"
|
#include "towtrack.h"
|
||||||
|
|
Loading…
Reference in a new issue