mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Minor refactor SkateBoard setter in Pizza (#874)
This commit is contained in:
parent
84b789ef9e
commit
6c89cd3315
3 changed files with 22 additions and 20 deletions
|
@ -4,6 +4,8 @@
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "isleactor.h"
|
#include "isleactor.h"
|
||||||
|
|
||||||
|
class SkateBoard;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7380
|
// VTABLE: LEGO1 0x100d7380
|
||||||
// SIZE 0x9c
|
// SIZE 0x9c
|
||||||
class Pizza : public IsleActor {
|
class Pizza : public IsleActor {
|
||||||
|
@ -34,7 +36,7 @@ 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; }
|
inline void SetSkateboard(SkateBoard* p_skateboard) { m_skateboard = p_skateboard; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100380e0
|
// SYNTHETIC: LEGO1 0x100380e0
|
||||||
// Pizza::`scalar deleting destructor'
|
// Pizza::`scalar deleting destructor'
|
||||||
|
@ -42,7 +44,7 @@ class Pizza : public IsleActor {
|
||||||
private:
|
private:
|
||||||
undefined4 m_unk0x7c; // 0x7c
|
undefined4 m_unk0x7c; // 0x7c
|
||||||
undefined4 m_unk0x80; // 0x80
|
undefined4 m_unk0x80; // 0x80
|
||||||
undefined* m_unk0x84; // 0x84
|
SkateBoard* m_skateboard; // 0x84
|
||||||
undefined4 m_unk0x88; // 0x88
|
undefined4 m_unk0x88; // 0x88
|
||||||
undefined4 m_unk0x8c; // 0x8c
|
undefined4 m_unk0x8c; // 0x8c
|
||||||
undefined4 m_unk0x90; // 0x90
|
undefined4 m_unk0x90; // 0x90
|
||||||
|
|
|
@ -8,13 +8,13 @@ DECOMP_SIZE_ASSERT(Pizza, 0x9c)
|
||||||
// FUNCTION: LEGO1 0x10037ef0
|
// FUNCTION: LEGO1 0x10037ef0
|
||||||
Pizza::Pizza()
|
Pizza::Pizza()
|
||||||
{
|
{
|
||||||
this->m_unk0x7c = 0;
|
m_unk0x7c = 0;
|
||||||
this->m_unk0x80 = 0;
|
m_unk0x80 = 0;
|
||||||
this->m_unk0x84 = 0;
|
m_skateboard = NULL;
|
||||||
this->m_unk0x88 = 0;
|
m_unk0x88 = 0;
|
||||||
this->m_unk0x8c = -1;
|
m_unk0x8c = -1;
|
||||||
this->m_unk0x98 = 0;
|
m_unk0x98 = 0;
|
||||||
this->m_unk0x90 = 0x80000000;
|
m_unk0x90 = 0x80000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10038100
|
// FUNCTION: LEGO1 0x10038100
|
||||||
|
|
|
@ -42,10 +42,10 @@ MxResult SkateBoard::Create(MxDSAction& p_dsAction)
|
||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
m_world = CurrentWorld();
|
m_world = CurrentWorld();
|
||||||
m_world->Add(this);
|
m_world->Add(this);
|
||||||
// The type `Pizza` is an educated guesss, inferred from VTable0xe4() below
|
|
||||||
Pizza* findResult = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||||
if (findResult) {
|
if (pizza) {
|
||||||
findResult->SetUnknown0x84((undefined*) this);
|
pizza->SetSkateboard(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue