mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-27 18:21:15 +00:00
Address review comments
This commit is contained in:
parent
b063c861e1
commit
3bc43ed121
@ -26,13 +26,10 @@ class LegoControlManagerEvent : public LegoEventNotificationParam {
|
|||||||
inline void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
inline void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
||||||
inline void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; }
|
inline void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; }
|
||||||
|
|
||||||
MxS32 m_clickedObjectId; // 0x20
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
MxS32 m_clickedObjectId; // 0x20
|
||||||
const char* m_clickedAtom; // 0x24
|
const char* m_clickedAtom; // 0x24
|
||||||
|
MxS16 m_unk0x28; // 0x28
|
||||||
public:
|
|
||||||
MxS16 m_unk0x28; // 0x28
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10028bf0
|
// SYNTHETIC: LEGO1 0x10028bf0
|
||||||
|
|||||||
@ -34,17 +34,15 @@ class Pizza : public IsleActor {
|
|||||||
void FUN_100382b0();
|
void FUN_100382b0();
|
||||||
void FUN_10038380();
|
void FUN_10038380();
|
||||||
|
|
||||||
|
inline void SetUnknown0x84(undefined* p_unk0x84) { m_unk0x84 = p_unk0x84; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100380e0
|
// SYNTHETIC: LEGO1 0x100380e0
|
||||||
// Pizza::`scalar deleting destructor'
|
// Pizza::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
undefined4 m_unk0x7c; // 0x7c
|
undefined4 m_unk0x7c; // 0x7c
|
||||||
undefined4 m_unk0x80; // 0x80
|
undefined4 m_unk0x80; // 0x80
|
||||||
|
|
||||||
public:
|
|
||||||
undefined* m_unk0x84; // 0x84
|
undefined* m_unk0x84; // 0x84
|
||||||
|
|
||||||
private:
|
|
||||||
undefined4 m_unk0x88; // 0x88
|
undefined4 m_unk0x88; // 0x88
|
||||||
undefined4 m_unk0x8c; // 0x8c
|
undefined4 m_unk0x8c; // 0x8c
|
||||||
undefined4 m_unk0x90; // 0x90
|
undefined4 m_unk0x90; // 0x90
|
||||||
|
|||||||
@ -36,12 +36,8 @@ class SkateBoard : public IslePathActor {
|
|||||||
// SkateBoard::`scalar deleting destructor'
|
// SkateBoard::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// TODO: SkateBoard types
|
undefined m_unk0x160; // 0x160
|
||||||
undefined m_unk0x160;
|
undefined* m_unk0x164; // 0x164
|
||||||
undefined m_unk0x161;
|
|
||||||
undefined m_unk0x162;
|
|
||||||
undefined m_unk0x163;
|
|
||||||
undefined* m_unk0x164;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SKATEBOARD_H
|
#endif // SKATEBOARD_H
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#include "skateboard.h"
|
#include "skateboard.h"
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "isle_actions.h"
|
||||||
#include "legoutils.h"
|
#include "legoutils.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
@ -12,10 +13,10 @@ DECOMP_SIZE_ASSERT(SkateBoard, 0x168)
|
|||||||
// FUNCTION: LEGO1 0x1000fd40
|
// FUNCTION: LEGO1 0x1000fd40
|
||||||
SkateBoard::SkateBoard()
|
SkateBoard::SkateBoard()
|
||||||
{
|
{
|
||||||
this->m_unk0x160 = 0;
|
m_unk0x160 = 0;
|
||||||
this->m_unk0x13c = 15.0;
|
m_unk0x13c = 15.0;
|
||||||
this->m_unk0x150 = 3.5;
|
m_unk0x150 = 3.5;
|
||||||
this->m_unk0x148 = 1;
|
m_unk0x148 = 1;
|
||||||
|
|
||||||
NotificationManager()->Register(this);
|
NotificationManager()->Register(this);
|
||||||
}
|
}
|
||||||
@ -31,15 +32,17 @@ SkateBoard::~SkateBoard()
|
|||||||
MxResult SkateBoard::Create(MxDSAction& p_dsAction)
|
MxResult SkateBoard::Create(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
MxResult result = IslePathActor::Create(p_dsAction);
|
MxResult result = IslePathActor::Create(p_dsAction);
|
||||||
|
|
||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
this->m_world = CurrentWorld();
|
m_world = CurrentWorld();
|
||||||
this->m_world->Add(this);
|
m_world->Add(this);
|
||||||
// The type `Pizza` is an educated guesss, inferred from VTable0xe4() below
|
// The type `Pizza` is an educated guesss, inferred from VTable0xe4() below
|
||||||
Pizza* findResult = (Pizza*) CurrentWorld()->Find(*g_isleScript, 0x49d);
|
Pizza* findResult = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||||
if (findResult) {
|
if (findResult) {
|
||||||
findResult->m_unk0x84 = (undefined*) this;
|
findResult->SetUnknown0x84((undefined*) this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,16 +50,16 @@ MxResult SkateBoard::Create(MxDSAction& p_dsAction)
|
|||||||
void SkateBoard::VTable0xe4()
|
void SkateBoard::VTable0xe4()
|
||||||
{
|
{
|
||||||
// TODO: Work out what kind of structure this points to
|
// TODO: Work out what kind of structure this points to
|
||||||
if (*(int*) (this->m_unk0x164 + 0x18) == 3) {
|
if (*(int*) (m_unk0x164 + 0x18) == 3) {
|
||||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, 0x49d);
|
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||||
pizza->FUN_10038380();
|
pizza->FUN_10038380();
|
||||||
pizza->FUN_100382b0();
|
pizza->FUN_100382b0();
|
||||||
this->m_unk0x160 = 0;
|
m_unk0x160 = 0;
|
||||||
}
|
}
|
||||||
IslePathActor::VTable0xe4();
|
IslePathActor::VTable0xe4();
|
||||||
GameState()->m_currentArea = LegoGameState::Area::e_skateboard;
|
GameState()->m_currentArea = LegoGameState::Area::e_skateboard;
|
||||||
RemoveFromCurrentWorld(*g_isleScript, 0xc3);
|
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_SkateArms_Ctl);
|
||||||
RemoveFromCurrentWorld(*g_isleScript, 0xc2);
|
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_SkatePizza_Bitmap);
|
||||||
ControlManager()->Unregister(this);
|
ControlManager()->Unregister(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,11 +74,13 @@ MxU32 SkateBoard::VTable0xcc()
|
|||||||
MxU32 SkateBoard::VTable0xd4(LegoControlManagerEvent& p_param)
|
MxU32 SkateBoard::VTable0xd4(LegoControlManagerEvent& p_param)
|
||||||
{
|
{
|
||||||
MxU32 result = 0;
|
MxU32 result = 0;
|
||||||
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == 0xc3) {
|
|
||||||
|
if (p_param.GetUnknown0x28() == 1 && p_param.GetClickedObjectId() == 0xc3) {
|
||||||
VTable0xe4();
|
VTable0xe4();
|
||||||
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user