mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
GasStation destructor, enable, create
This commit is contained in:
parent
6d3ce3b5cb
commit
28b1ba73cb
@ -2,6 +2,7 @@
|
||||
#define GASSTATION_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "gasstationstate.h"
|
||||
#include "legoworld.h"
|
||||
#include "radio.h"
|
||||
|
||||
@ -39,18 +40,18 @@ class GasStation : public LegoWorld {
|
||||
// GasStation::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
undefined2 m_unk0xf8; // 0xf8
|
||||
undefined2 m_unk0xfa; // 0xfa
|
||||
undefined4 m_unk0xfc; // 0xfc
|
||||
undefined4 m_unk0x100; // 0x100
|
||||
undefined2 m_unk0x104; // 0x104
|
||||
undefined2 m_unk0x106; // 0x106
|
||||
undefined4 m_unk0x108; // 0x108
|
||||
undefined4 m_unk0x10c; // 0x10c
|
||||
undefined4 m_unk0x110; // 0x110
|
||||
undefined m_unk0x114; // 0x114
|
||||
undefined m_unk0x115; // 0x115
|
||||
Radio m_radio; // 0x118
|
||||
undefined2 m_unk0xf8; // 0xf8
|
||||
undefined2 m_unk0xfa; // 0xfa
|
||||
undefined4 m_unk0xfc; // 0xfc
|
||||
GasStationState* m_gasStationState; // 0x100
|
||||
undefined2 m_unk0x104; // 0x104
|
||||
undefined2 m_unk0x106; // 0x106
|
||||
undefined4 m_unk0x108; // 0x108
|
||||
undefined4 m_unk0x10c; // 0x10c
|
||||
undefined4 m_unk0x110; // 0x110
|
||||
undefined m_unk0x114; // 0x114
|
||||
undefined m_unk0x115; // 0x115
|
||||
Radio m_radio; // 0x118
|
||||
};
|
||||
|
||||
#endif // GASSTATION_H
|
||||
|
||||
@ -27,6 +27,9 @@ class GasStationState : public LegoState {
|
||||
// SYNTHETIC: LEGO1 0x10006290
|
||||
// GasStationState::`scalar deleting destructor'
|
||||
|
||||
inline undefined4 GetUnknown0x14() { return m_unk0x14; }
|
||||
inline void SetUnknown0x14(undefined4 p_unk0x14) { m_unk0x14 = p_unk0x14; }
|
||||
|
||||
private:
|
||||
undefined4 m_unk0x08[3]; // 0x08
|
||||
undefined4 m_unk0x14; // 0x14
|
||||
|
||||
@ -1,12 +1,19 @@
|
||||
#include "gasstation.h"
|
||||
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legoomni.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxticklemanager.h"
|
||||
|
||||
undefined4 g_unk0x100f0160;
|
||||
|
||||
// FUNCTION: LEGO1 0x100046a0
|
||||
GasStation::GasStation()
|
||||
{
|
||||
m_unk0xf8 = 0;
|
||||
m_unk0x100 = 0;
|
||||
m_gasStationState = NULL;
|
||||
m_unk0xfc = 0;
|
||||
m_unk0x108 = 0;
|
||||
m_unk0x104 = 0;
|
||||
@ -25,17 +32,48 @@ MxBool GasStation::VTable0x5c()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100048c0
|
||||
// FUNCTION: LEGO1 0x100048c0
|
||||
GasStation::~GasStation()
|
||||
{
|
||||
// TODO
|
||||
InputManager()->UnRegister(this);
|
||||
if (InputManager()->GetWorld() == this) {
|
||||
InputManager()->ClearWorld();
|
||||
}
|
||||
|
||||
ControlManager()->Unregister(this);
|
||||
TickleManager()->UnregisterClient(this);
|
||||
NotificationManager()->Unregister(this);
|
||||
g_unk0x100f0160 = 3;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10004990
|
||||
// FUNCTION: LEGO1 0x10004990
|
||||
MxResult GasStation::Create(MxDSAction& p_dsAction)
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
MxResult ret = LegoWorld::Create(p_dsAction);
|
||||
if (ret == SUCCESS) {
|
||||
InputManager()->SetWorld(this);
|
||||
ControlManager()->Register(this);
|
||||
}
|
||||
|
||||
InputManager()->SetCamera(NULL);
|
||||
|
||||
m_gasStationState = (GasStationState*) GameState()->GetState("GasStationState");
|
||||
if (!m_gasStationState) {
|
||||
m_gasStationState = (GasStationState*) GameState()->CreateState("GasStationState");
|
||||
m_gasStationState->SetUnknown0x14(1);
|
||||
}
|
||||
else {
|
||||
if (m_gasStationState->GetUnknown0x14() != 4) {
|
||||
m_gasStationState->SetUnknown0x14(3);
|
||||
}
|
||||
}
|
||||
|
||||
GameState()->SetCurrentArea(LegoGameState::e_garage);
|
||||
GameState()->StopArea(LegoGameState::e_previousArea);
|
||||
|
||||
InputManager()->Register(this);
|
||||
SetIsWorldActive(FALSE);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10004a60
|
||||
@ -52,10 +90,21 @@ void GasStation::ReadyWorld()
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10005c40
|
||||
// FUNCTION: LEGO1 0x10005c40
|
||||
void GasStation::Enable(MxBool p_enable)
|
||||
{
|
||||
// TODO
|
||||
LegoWorld::Enable(p_enable);
|
||||
|
||||
if (p_enable) {
|
||||
InputManager()->SetWorld(this);
|
||||
InputManager()->SetCamera(NULL);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (InputManager()->GetWorld() == this) {
|
||||
InputManager()->ClearWorld();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10005c90
|
||||
|
||||
Loading…
Reference in New Issue
Block a user