mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Implement Isle::VTable0x50 (#432)
* push changes * fix formatting * Fix structure * Fix return --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
c2da041f40
commit
5b8ea35756
10 changed files with 81 additions and 6 deletions
|
@ -24,10 +24,21 @@ class Act1State : public LegoState {
|
||||||
|
|
||||||
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
|
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
|
||||||
inline MxU32 GetUnknown18() { return m_unk0x18; }
|
inline MxU32 GetUnknown18() { return m_unk0x18; }
|
||||||
|
inline void SetUnknown21(MxS16 p_unk0x21) { m_unk0x21 = p_unk0x21; }
|
||||||
|
inline MxS16 GetUnknown21() { return m_unk0x21; }
|
||||||
|
|
||||||
|
void FUN_10034d00();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
undefined m_unk0x8[0x10]; // 0x8
|
undefined m_unk0x8[0x10]; // 0x8
|
||||||
MxU32 m_unk0x18; // 0x18
|
MxU32 m_unk0x18; // 0x18
|
||||||
|
undefined2 m_unk0x1c; // 0x1c
|
||||||
|
undefined m_unk0x1e; // 0x1e
|
||||||
|
undefined m_unk0x1f; // 0x1f
|
||||||
|
undefined m_unk0x20; // 0x20
|
||||||
|
MxBool m_unk0x21; // 0x21
|
||||||
|
undefined m_unk0x22; // 0x22
|
||||||
|
// TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ACT1STATE_H
|
#endif // ACT1STATE_H
|
||||||
|
|
|
@ -57,6 +57,7 @@ class Isle : public LegoWorld {
|
||||||
MxLong HandleType17Notification(MxParam& p_param);
|
MxLong HandleType17Notification(MxParam& p_param);
|
||||||
MxLong HandleType19Notification(MxParam& p_param);
|
MxLong HandleType19Notification(MxParam& p_param);
|
||||||
MxLong HandleTransitionEnd();
|
MxLong HandleTransitionEnd();
|
||||||
|
void FUN_10032620();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Act1State* m_act1state; // 0xf8
|
Act1State* m_act1state; // 0xf8
|
||||||
|
|
|
@ -27,6 +27,7 @@ class LegoAnimationManager : public MxCore {
|
||||||
return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name);
|
return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FUN_1005ef10();
|
||||||
void FUN_1005f6d0(MxBool);
|
void FUN_1005f6d0(MxBool);
|
||||||
void FUN_1005f720(undefined4);
|
void FUN_1005f720(undefined4);
|
||||||
void FUN_10064670(MxBool);
|
void FUN_10064670(MxBool);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "extra.h"
|
#include "extra.h"
|
||||||
#include "mxdsobject.h"
|
#include "mxdsaction.h"
|
||||||
#include "mxentity.h"
|
#include "mxentity.h"
|
||||||
#include "realtime/vector.h"
|
#include "realtime/vector.h"
|
||||||
#include "roi/legoroi.h"
|
#include "roi/legoroi.h"
|
||||||
|
|
|
@ -72,7 +72,7 @@ class LegoGameState {
|
||||||
undefined m_unk0x41a[8]; // 0x41a - might be part of the structure at 0xa6
|
undefined m_unk0x41a[8]; // 0x41a - might be part of the structure at 0xa6
|
||||||
MxBool m_isDirty; // 0x420
|
MxBool m_isDirty; // 0x420
|
||||||
undefined4 m_unk0x424; // 0x424
|
undefined4 m_unk0x424; // 0x424
|
||||||
undefined4 m_unk0x428; // 0x428
|
undefined4 m_prevArea; // 0x428
|
||||||
undefined4 m_unk0x42c; // 0x42c
|
undefined4 m_unk0x42c; // 0x42c
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ class LegoVideoManager : public MxVideoManager {
|
||||||
inline Lego3DManager* Get3DManager() { return this->m_3dManager; }
|
inline Lego3DManager* Get3DManager() { return this->m_3dManager; }
|
||||||
inline MxDirect3D* GetDirect3D() { return this->m_direct3d; }
|
inline MxDirect3D* GetDirect3D() { return this->m_direct3d; }
|
||||||
inline void SetRender3D(MxBool p_render3d) { this->m_render3d = p_render3d; }
|
inline void SetRender3D(MxBool p_render3d) { this->m_render3d = p_render3d; }
|
||||||
|
inline void SetUnk0x554(MxBool p_unk0x554) { this->m_unk0x554 = p_unk0x554; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxResult CreateDirect3D();
|
MxResult CreateDirect3D();
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
// STUB: LEGO1 0x100334b0
|
// STUB: LEGO1 0x100334b0
|
||||||
Act1State::Act1State()
|
Act1State::Act1State()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
m_unk0x1e = 0;
|
||||||
|
m_unk0x18 = 1;
|
||||||
|
m_unk0x20 = 0;
|
||||||
|
m_unk0x1f = 0;
|
||||||
|
m_unk0x21 = TRUE;
|
||||||
|
m_unk0x22 = 0;
|
||||||
|
m_unk0x1c = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10034d00
|
||||||
|
void Act1State::FUN_10034d00()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
|
|
||||||
#include "infocenterstate.h"
|
#include "infocenterstate.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "legostate.h"
|
#include "legostate.h"
|
||||||
#include "legostream.h"
|
#include "legostream.h"
|
||||||
|
#include "legoutil.h"
|
||||||
|
#include "legovideomanager.h"
|
||||||
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxobjectfactory.h"
|
#include "mxobjectfactory.h"
|
||||||
#include "mxstring.h"
|
#include "mxstring.h"
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
|
@ -186,9 +190,30 @@ void LegoGameState::FUN_1003a720(MxU32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003b060
|
// STUB: LEGO1 0x1003b060
|
||||||
void LegoGameState::HandleAction(MxU32)
|
void LegoGameState::HandleAction(MxU32 p_area)
|
||||||
{
|
{
|
||||||
// TODO
|
m_prevArea = p_area;
|
||||||
|
BackgroundAudioManager()->Stop();
|
||||||
|
AnimationManager()->FUN_1005ef10();
|
||||||
|
VideoManager()->SetUnk0x554(0);
|
||||||
|
|
||||||
|
MxAtomId* script = g_isleScript;
|
||||||
|
switch (p_area) {
|
||||||
|
case 1:
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
VideoManager()->SetUnk0x554(1);
|
||||||
|
script = g_infomainScript;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
VideoManager()->SetUnk0x554(1);
|
||||||
|
script = g_infodoorScript;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// TODO: implement other cases
|
||||||
|
}
|
||||||
|
|
||||||
|
InvokeAction(ExtraActionType_opendisk, *script, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003bac0
|
// FUNCTION: LEGO1 0x1003bac0
|
||||||
|
|
|
@ -152,10 +152,22 @@ MxLong Isle::StopAction(MxParam& p_param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10030fc0
|
// FUNCTION: LEGO1 0x10030fc0
|
||||||
void Isle::VTable0x50()
|
void Isle::VTable0x50()
|
||||||
{
|
{
|
||||||
// TODO
|
LegoWorld::VTable0x50();
|
||||||
|
|
||||||
|
if (m_act1state->GetUnknown21()) {
|
||||||
|
GameState()->HandleAction(2);
|
||||||
|
m_act1state->SetUnknown18(0);
|
||||||
|
m_act1state->SetUnknown21(0);
|
||||||
|
}
|
||||||
|
else if (GameState()->GetCurrentAct()) {
|
||||||
|
FUN_1003ef00(TRUE);
|
||||||
|
FUN_10032620();
|
||||||
|
m_act1state->FUN_10034d00();
|
||||||
|
FUN_10015820(0, 7);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LGEO1 0x10031030
|
// STUB: LGEO1 0x10031030
|
||||||
|
@ -176,6 +188,12 @@ void Isle::VTable0x68(MxBool p_add)
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10032620
|
||||||
|
void Isle::FUN_10032620()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100327a0
|
// STUB: LEGO1 0x100327a0
|
||||||
MxLong Isle::HandleTransitionEnd()
|
MxLong Isle::HandleTransitionEnd()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,11 @@ LegoAnimationManager::~LegoAnimationManager()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1005ef10
|
||||||
|
void LegoAnimationManager::FUN_1005ef10()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005f130
|
// STUB: LEGO1 0x1005f130
|
||||||
void LegoAnimationManager::Init()
|
void LegoAnimationManager::Init()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue