mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Add SkateBoard::VTable0xe4()
This commit is contained in:
parent
0decfbbd66
commit
09979b3987
@ -31,13 +31,18 @@ class Pizza : public IsleActor {
|
||||
undefined4 HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
||||
undefined4 VTable0x80(MxParam&) override; // vtable+0x80
|
||||
|
||||
void FUN_100382b0();
|
||||
void FUN_10038380();
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100380e0
|
||||
// Pizza::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
undefined4 m_unk0x7c; // 0x7c
|
||||
undefined4 m_unk0x80; // 0x80
|
||||
undefined4 m_unk0x84; // 0x84
|
||||
public:
|
||||
undefined* m_unk0x84; // 0x84
|
||||
private:
|
||||
undefined4 m_unk0x88; // 0x88
|
||||
undefined4 m_unk0x8c; // 0x8c
|
||||
undefined4 m_unk0x90; // 0x90
|
||||
|
||||
@ -38,7 +38,10 @@ class SkateBoard : public IslePathActor {
|
||||
private:
|
||||
// TODO: SkateBoard types
|
||||
undefined m_unk0x160;
|
||||
undefined m_unk0x161[0x7];
|
||||
undefined m_unk0x161;
|
||||
undefined m_unk0x162;
|
||||
undefined m_unk0x163;
|
||||
undefined* m_unk0x164;
|
||||
};
|
||||
|
||||
#endif // SKATEBOARD_H
|
||||
|
||||
@ -30,6 +30,17 @@ MxResult Pizza::Create(MxDSAction& p_dsAction)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
// STUB: LEGO1 0x100382b0
|
||||
void Pizza::FUN_100382b0() {
|
||||
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10038380
|
||||
void Pizza::FUN_10038380() {
|
||||
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100383f0
|
||||
undefined4 Pizza::VTable0x68()
|
||||
{
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
#include "skateboard.h"
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoutils.h"
|
||||
#include "misc.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "pizza.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(SkateBoard, 0x168)
|
||||
|
||||
@ -32,21 +34,32 @@ MxResult SkateBoard::Create(MxDSAction& p_dsAction)
|
||||
if (result == SUCCESS) {
|
||||
this->m_world = CurrentWorld();
|
||||
this->m_world->Add(this);
|
||||
MxCore* findResult = CurrentWorld()->Find(*g_isleScript, 0x49d);
|
||||
// The type `Pizza` is an educated guesss, inferred from VTable0xe4() below
|
||||
Pizza* findResult = (Pizza*)CurrentWorld()->Find(*g_isleScript, 0x49d);
|
||||
if (findResult) {
|
||||
// TODO: There is most likely a typecast here, but I don't know to what.
|
||||
// The only applicable candidate at the moment is MxDSAction
|
||||
((MxU32*)findResult)[0x21] = (MxU32)this;
|
||||
findResult->m_unk0x84 = (undefined*) this;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10010050
|
||||
// FUNCTION: LEGO1 0x10010050
|
||||
void SkateBoard::VTable0xe4()
|
||||
{
|
||||
// TODO
|
||||
// Add a stub so the call in VTable0xd4 is not optimized away
|
||||
// TODO: Work out what kind of structure this points to
|
||||
if (*(int*) (this->m_unk0x164 + 0x18) == 3) {
|
||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(
|
||||
*g_isleScript,
|
||||
0x49d
|
||||
);
|
||||
pizza->FUN_10038380();
|
||||
pizza->FUN_100382b0();
|
||||
this->m_unk0x160 = 0;
|
||||
}
|
||||
IslePathActor::VTable0xe4();
|
||||
GameState()->m_currentArea = LegoGameState::Area::e_skateboard;
|
||||
RemoveFromCurrentWorld(*g_isleScript, 0xc3);
|
||||
RemoveFromCurrentWorld(*g_isleScript, 0xc2);
|
||||
ControlManager()->Unregister(this);
|
||||
}
|
||||
|
||||
@ -63,7 +76,6 @@ MxU32 SkateBoard::VTable0xd4(LegoControlManagerEvent& p_param)
|
||||
MxU32 result = 0;
|
||||
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == 0xc3) {
|
||||
VTable0xe4();
|
||||
// current area (?) Ghidra says "currentActionId"
|
||||
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user