mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Merge branch 'master' into flic
This commit is contained in:
commit
21343dd24b
@ -511,12 +511,12 @@ if (MSVC_FOR_DECOMP)
|
|||||||
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
|
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
|
||||||
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
|
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
|
||||||
if (ISLE_BUILD_APP)
|
if (ISLE_BUILD_APP)
|
||||||
target_compile_options(isle PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
|
||||||
target_link_options(isle PRIVATE "/OPT:REF")
|
target_link_options(isle PRIVATE "/OPT:REF")
|
||||||
|
set_property(TARGET isle ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Equivalent to target_compile_options(... PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
# Equivalent to target_compile_options(... PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
||||||
set_property(TARGET lego1 ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
|
set_property(TARGET lego1 ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")
|
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Zi /Od /D \"_DEBUG\"")
|
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Zi /Od /D \"_DEBUG\"")
|
||||||
@ -542,14 +542,19 @@ if (MSVC_FOR_DECOMP)
|
|||||||
# Force non-parallel builds of isle and lego1 by putting them in a pool with 1 available job.
|
# Force non-parallel builds of isle and lego1 by putting them in a pool with 1 available job.
|
||||||
if (CMAKE_CXX_COMPILER_ID VERSION_LESS 12)
|
if (CMAKE_CXX_COMPILER_ID VERSION_LESS 12)
|
||||||
foreach(tgt IN LISTS lego1_targets)
|
foreach(tgt IN LISTS lego1_targets)
|
||||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_${tgt}=1;msvc_lego1=1")
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_${tgt}=1")
|
||||||
set_property(TARGET ${tgt} PROPERTY JOB_POOL_COMPILE msvc_${tgt})
|
set_property(TARGET ${tgt} PROPERTY JOB_POOL_COMPILE "msvc_${tgt}")
|
||||||
set_property(TARGET ${tgt} PROPERTY JOB_POOL_LINK msvc_${tgt})
|
set_property(TARGET ${tgt} PROPERTY JOB_POOL_LINK "msvc_${tgt}")
|
||||||
endforeach()
|
endforeach()
|
||||||
if (TARGET isle)
|
if (TARGET isle)
|
||||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_isle=1")
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_isle=1")
|
||||||
set_property(TARGET isle PROPERTY JOB_POOL_COMPILE msvc_isle)
|
set_property(TARGET isle PROPERTY JOB_POOL_COMPILE "msvc_isle")
|
||||||
set_property(TARGET isle PROPERTY JOB_POOL_LINK msvc_isle)
|
set_property(TARGET isle PROPERTY JOB_POOL_LINK "msvc_isle")
|
||||||
|
endif()
|
||||||
|
if (TARGET config)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_config=1")
|
||||||
|
set_property(TARGET config PROPERTY JOB_POOL_COMPILE "msvc_config")
|
||||||
|
set_property(TARGET config PROPERTY JOB_POOL_LINK "msvc_config")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -2,39 +2,25 @@
|
|||||||
#define JUKEBOX_H
|
#define JUKEBOX_H
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "jukeboxstate.h"
|
||||||
|
#include "legocontrolmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d8958
|
// VTABLE: LEGO1 0x100d8958
|
||||||
// SIZE 0x104
|
// SIZE 0x104
|
||||||
class JukeBox : public LegoWorld {
|
class JukeBox : public LegoWorld {
|
||||||
public:
|
public:
|
||||||
JukeBox();
|
// JUKEBOXW.SI
|
||||||
|
enum JukeBoxWorldScript {
|
||||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
c_volDownCtl = 1,
|
||||||
MxResult Tickle() override; // vtable+0x08
|
c_volUpCtl = 2,
|
||||||
|
c_dBackCtl = 3,
|
||||||
// FUNCTION: LEGO1 0x1005d6f0
|
c_dFwdCtl = 4,
|
||||||
inline const char* ClassName() const override // vtable+0x0c
|
c_noteCtl = 5
|
||||||
{
|
};
|
||||||
// STRING: LEGO1 0x100f02cc
|
|
||||||
return "JukeBox";
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005d700
|
|
||||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
|
||||||
{
|
|
||||||
return !strcmp(p_name, JukeBox::ClassName()) || LegoWorld::IsA(p_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
|
||||||
void ReadyWorld() override; // vtable+0x50
|
|
||||||
MxBool VTable0x5c() override; // vtable+0x5c
|
|
||||||
MxBool VTable0x64() override; // vtable+0x64
|
|
||||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1005d810
|
|
||||||
// JukeBox::`scalar deleting destructor'
|
|
||||||
|
|
||||||
|
// JUKEBOX.SI (the actual audio)
|
||||||
enum JukeBoxScript {
|
enum JukeBoxScript {
|
||||||
e_mamaPapaBrickolini,
|
e_mamaPapaBrickolini,
|
||||||
e_jailUnused,
|
e_jailUnused,
|
||||||
@ -108,10 +94,40 @@ class JukeBox : public LegoWorld {
|
|||||||
e_pizzaMission,
|
e_pizzaMission,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
JukeBox();
|
||||||
|
~JukeBox() override;
|
||||||
|
|
||||||
|
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||||
|
MxResult Tickle() override; // vtable+0x08
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1005d6f0
|
||||||
|
inline const char* ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
// STRING: LEGO1 0x100f02cc
|
||||||
|
return "JukeBox";
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1005d700
|
||||||
|
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(p_name, JukeBox::ClassName()) || LegoWorld::IsA(p_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||||
|
void ReadyWorld() override; // vtable+0x50
|
||||||
|
MxBool VTable0x5c() override; // vtable+0x5c
|
||||||
|
MxBool VTable0x64() override; // vtable+0x64
|
||||||
|
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1005d810
|
||||||
|
// JukeBox::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
undefined m_unk0xf8[4]; // 0xf8
|
MxBool HandleClick(LegoControlManagerEvent& p_param);
|
||||||
undefined4 m_unk0xfc; // 0xfc
|
|
||||||
undefined2 m_unk0x100; // 0x100
|
LegoGameState::Area m_transitionDestination; // 0xf8
|
||||||
|
JukeBoxState* m_state; // 0xfc
|
||||||
|
undefined2 m_unk0x100; // 0x100
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // JUKEBOX_H
|
#endif // JUKEBOX_H
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class JukeBoxState : public LegoState {
|
|||||||
inline MxU32 IsActive() { return m_active; }
|
inline MxU32 IsActive() { return m_active; }
|
||||||
inline void SetActive(MxU32 p_active) { m_active = p_active; }
|
inline void SetActive(MxU32 p_active) { m_active = p_active; }
|
||||||
inline MxU32 GetState() { return m_state; }
|
inline MxU32 GetState() { return m_state; }
|
||||||
|
inline void SetState(MxU32 p_state) { m_state = p_state; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f3d0
|
// SYNTHETIC: LEGO1 0x1000f3d0
|
||||||
// JukeBoxState::`scalar deleting destructor'
|
// JukeBoxState::`scalar deleting destructor'
|
||||||
|
|||||||
@ -41,16 +41,18 @@ class LegoActor : public LegoEntity {
|
|||||||
virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c
|
virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10002d00
|
// FUNCTION: LEGO1 0x10002d00
|
||||||
virtual MxU8 VTable0x60() { return m_unk0x74; } // vtable+0x60
|
virtual MxU8 GetActorId() { return m_actorId; } // vtable+0x60
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10002d10
|
// FUNCTION: LEGO1 0x10002d10
|
||||||
virtual void VTable0x64(MxU8 p_unk0x74) { m_unk0x74 = p_unk0x74; } // vtable+0x64
|
virtual void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } // vtable+0x64
|
||||||
|
|
||||||
|
static const char* GetActorName(MxU8 p_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxFloat m_unk0x68; // 0x68
|
MxFloat m_unk0x68; // 0x68
|
||||||
LegoCacheSound* m_sound; // 0x6c
|
LegoCacheSound* m_sound; // 0x6c
|
||||||
MxFloat m_unk0x70; // 0x70
|
MxFloat m_unk0x70; // 0x70
|
||||||
MxU8 m_unk0x74; // 0x74
|
MxU8 m_actorId; // 0x74
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1002d300
|
// SYNTHETIC: LEGO1 0x1002d300
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
|
|||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1004aa40
|
// SYNTHETIC: LEGO1 0x1004aa40
|
||||||
// LegoAnimMMPresenter::`scalar deleting destructor'
|
// LegoAnimMMPresenter::`scalar deleting destructor'
|
||||||
|
|
||||||
|
MxBool FUN_1004b8b0();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOANIMMMPRESENTER_H
|
#endif // LEGOANIMMMPRESENTER_H
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define LEGOANIMPRESENTER_H
|
#define LEGOANIMPRESENTER_H
|
||||||
|
|
||||||
#include "anim/legoanim.h"
|
#include "anim/legoanim.h"
|
||||||
|
#include "legoroilist.h"
|
||||||
#include "mxgeometry/mxgeometry3d.h"
|
#include "mxgeometry/mxgeometry3d.h"
|
||||||
#include "mxvideopresenter.h"
|
#include "mxvideopresenter.h"
|
||||||
|
|
||||||
@ -12,6 +13,10 @@ class LegoAnimClass;
|
|||||||
// SIZE 0xc0
|
// SIZE 0xc0
|
||||||
class LegoAnimPresenter : public MxVideoPresenter {
|
class LegoAnimPresenter : public MxVideoPresenter {
|
||||||
public:
|
public:
|
||||||
|
enum {
|
||||||
|
c_bit2 = 0x02
|
||||||
|
};
|
||||||
|
|
||||||
LegoAnimPresenter();
|
LegoAnimPresenter();
|
||||||
~LegoAnimPresenter() override;
|
~LegoAnimPresenter() override;
|
||||||
|
|
||||||
@ -38,7 +43,16 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||||||
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||||
void EndAction() override; // vtable+0x40
|
void EndAction() override; // vtable+0x40
|
||||||
void PutFrame() override; // vtable+0x6c
|
void PutFrame() override; // vtable+0x6c
|
||||||
virtual MxResult VTable0x88(MxStreamChunk* p_chunk); // vtable+0x88
|
virtual MxResult CreateAnim(MxStreamChunk* p_chunk); // vtable+0x88
|
||||||
|
virtual void VTable0x8c(); // vtable+0x8c
|
||||||
|
virtual void VTable0x90(); // vtable+0x90
|
||||||
|
virtual void VTable0x94(); // vtable+0x94
|
||||||
|
virtual void VTable0x98(); // vtable+0x98
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1000c990
|
||||||
|
virtual void VTable0x9c() {} // vtable+0x9c
|
||||||
|
|
||||||
|
virtual void VTable0xa0(); // vtable+0xa0
|
||||||
|
|
||||||
inline LegoAnim* GetAnimation() { return m_anim; }
|
inline LegoAnim* GetAnimation() { return m_anim; }
|
||||||
|
|
||||||
@ -47,13 +61,23 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||||||
protected:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
LegoChar* FUN_10069150(const LegoChar* p_und1);
|
||||||
|
void FUN_100692b0();
|
||||||
|
void FUN_100695c0();
|
||||||
|
LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2);
|
||||||
|
LegoBool FUN_100698b0(const CompoundObject& p_und1, const LegoChar* p_und2);
|
||||||
|
void FUN_10069b10();
|
||||||
|
LegoBool FUN_1006aba0();
|
||||||
|
LegoBool FUN_1006abb0(LegoTreeNode*, undefined4);
|
||||||
|
void FUN_1006ac90();
|
||||||
|
void FUN_1006c8a0(LegoBool);
|
||||||
|
|
||||||
LegoAnim* m_anim; // 0x64
|
LegoAnim* m_anim; // 0x64
|
||||||
undefined4 m_unk0x68; // 0x68
|
undefined4* m_unk0x68; // 0x68
|
||||||
undefined4 m_unk0x6c; // 0x6c
|
undefined4 m_unk0x6c; // 0x6c
|
||||||
undefined4 m_unk0x70; // 0x70
|
LegoROIList* m_unk0x70; // 0x70
|
||||||
undefined4 m_unk0x74; // 0x74
|
LegoROIList* m_unk0x74; // 0x74
|
||||||
undefined4 m_unk0x78; // 0x78
|
MxMatrix* m_unk0x78; // 0x78
|
||||||
undefined4 m_unk0x7c; // 0x7c
|
undefined4 m_unk0x7c; // 0x7c
|
||||||
LegoWorld* m_currentWorld; // 0x80
|
LegoWorld* m_currentWorld; // 0x80
|
||||||
MxAtomId m_animAtom; // 0x84
|
MxAtomId m_animAtom; // 0x84
|
||||||
@ -62,7 +86,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||||||
undefined4 m_unk0x90; // 0x90
|
undefined4 m_unk0x90; // 0x90
|
||||||
undefined m_unk0x94; // 0x94
|
undefined m_unk0x94; // 0x94
|
||||||
undefined m_unk0x95; // 0x95
|
undefined m_unk0x95; // 0x95
|
||||||
undefined m_unk0x96; // 0x96
|
MxBool m_unk0x96; // 0x96
|
||||||
undefined m_unk0x97; // 0x97
|
undefined m_unk0x97; // 0x97
|
||||||
undefined4 m_unk0x98; // 0x98
|
undefined4 m_unk0x98; // 0x98
|
||||||
MxS16 m_unk0x9c; // 0x9c
|
MxS16 m_unk0x9c; // 0x9c
|
||||||
|
|||||||
@ -9,6 +9,8 @@ class LegoBackgroundColor : public MxVariable {
|
|||||||
public:
|
public:
|
||||||
LegoBackgroundColor(const char* p_key, const char* p_value);
|
LegoBackgroundColor(const char* p_key, const char* p_value);
|
||||||
void SetValue(const char* p_colorString) override;
|
void SetValue(const char* p_colorString) override;
|
||||||
|
void SetLights(float p_r, float p_g, float p_b);
|
||||||
|
void SetLights();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_h;
|
float m_h;
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define LEGOBUILDINGMANAGER_H
|
#define LEGOBUILDINGMANAGER_H
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "misc/legostorage.h"
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6f50
|
// VTABLE: LEGO1 0x100d6f50
|
||||||
@ -23,8 +24,11 @@ class LegoBuildingManager : public MxCore {
|
|||||||
static void configureLegoBuildingManager(MxS32);
|
static void configureLegoBuildingManager(MxS32);
|
||||||
static void SetCustomizeAnimFile(const char* p_value);
|
static void SetCustomizeAnimFile(const char* p_value);
|
||||||
|
|
||||||
|
void Init();
|
||||||
void FUN_1002fa00();
|
void FUN_1002fa00();
|
||||||
void FUN_1002fb30();
|
void FUN_1002fb30();
|
||||||
|
MxResult Save(LegoStorage* p_storage);
|
||||||
|
MxResult Load(LegoStorage* p_storage);
|
||||||
void FUN_10030590();
|
void FUN_10030590();
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1002f940
|
// SYNTHETIC: LEGO1 0x1002f940
|
||||||
@ -33,8 +37,6 @@ class LegoBuildingManager : public MxCore {
|
|||||||
private:
|
private:
|
||||||
static char* g_customizeAnimFile;
|
static char* g_customizeAnimFile;
|
||||||
|
|
||||||
void Init();
|
|
||||||
|
|
||||||
undefined m_unk0x08[0x28]; // 0x08
|
undefined m_unk0x08[0x28]; // 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class LegoCacheSoundList : public MxPtrList<LegoCacheSound> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoCacheSoundListCursor : public MxPtrListCursor<LegoCacheSound> {
|
class LegoCacheSoundListCursor : public MxPtrListCursor<LegoCacheSound> {
|
||||||
public:
|
public:
|
||||||
LegoCacheSoundListCursor(LegoCacheSoundList* p_list) : MxPtrListCursor<LegoCacheSound>(p_list){};
|
LegoCacheSoundListCursor(LegoCacheSoundList* p_list) : MxPtrListCursor<LegoCacheSound>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1001e670
|
// TEMPLATE: LEGO1 0x1001e670
|
||||||
|
|||||||
@ -63,6 +63,7 @@ class LegoEntity : public MxEntity {
|
|||||||
inline MxU8 GetFlags() { return m_flags; }
|
inline MxU8 GetFlags() { return m_flags; }
|
||||||
|
|
||||||
inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
|
inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
|
||||||
|
inline void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class LegoEntityList : public MxPtrList<LegoEntity> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoEntityListCursor : public MxPtrListCursor<LegoEntity> {
|
class LegoEntityListCursor : public MxPtrListCursor<LegoEntity> {
|
||||||
public:
|
public:
|
||||||
LegoEntityListCursor(LegoEntityList* p_list) : MxPtrListCursor<LegoEntity>(p_list){};
|
LegoEntityListCursor(LegoEntityList* p_list) : MxPtrListCursor<LegoEntity>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1001e2f0
|
// TEMPLATE: LEGO1 0x1001e2f0
|
||||||
|
|||||||
@ -35,35 +35,35 @@ class LegoGameState {
|
|||||||
e_infodoor,
|
e_infodoor,
|
||||||
e_unk4,
|
e_unk4,
|
||||||
e_elevbott,
|
e_elevbott,
|
||||||
e_unk6,
|
e_elevride,
|
||||||
e_unk7,
|
e_elevride2,
|
||||||
e_unk8,
|
e_elevopen,
|
||||||
e_unk9,
|
e_seaview,
|
||||||
e_unk10,
|
e_observe,
|
||||||
e_unk11,
|
e_elevdown,
|
||||||
e_regbook,
|
e_regbook,
|
||||||
e_infoscor,
|
e_infoscor,
|
||||||
e_jetrace,
|
e_jetrace,
|
||||||
e_unk15,
|
e_jetrace2,
|
||||||
e_unk16,
|
e_jetraceExterior,
|
||||||
e_unk17,
|
e_unk17,
|
||||||
e_carrace,
|
e_carrace,
|
||||||
e_unk19,
|
e_carraceExterior,
|
||||||
e_unk20,
|
e_unk20,
|
||||||
e_unk21,
|
e_unk21,
|
||||||
e_unk22,
|
e_pizzeriaExterior,
|
||||||
|
|
||||||
e_unk25 = 25,
|
e_garageExterior = 25,
|
||||||
e_garage,
|
e_garage,
|
||||||
e_unk27,
|
e_garadoor,
|
||||||
|
e_unk28,
|
||||||
e_unk29 = 29,
|
e_hospitalExterior,
|
||||||
e_hospital,
|
e_hospital,
|
||||||
e_unk31,
|
e_unk31,
|
||||||
e_unk32,
|
e_policeExterior,
|
||||||
|
e_unk33,
|
||||||
e_police = 34,
|
e_police,
|
||||||
e_unk35,
|
e_polidoor,
|
||||||
e_copter,
|
e_copter,
|
||||||
e_dunecar,
|
e_dunecar,
|
||||||
e_jetski,
|
e_jetski,
|
||||||
@ -73,6 +73,7 @@ class LegoGameState {
|
|||||||
e_act3script,
|
e_act3script,
|
||||||
|
|
||||||
e_jukeboxw = 53,
|
e_jukeboxw = 53,
|
||||||
|
e_unk54,
|
||||||
|
|
||||||
e_histbook = 56,
|
e_histbook = 56,
|
||||||
e_unk57,
|
e_unk57,
|
||||||
@ -87,8 +88,13 @@ class LegoGameState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x0c
|
// SIZE 0x0c
|
||||||
struct ScoreName {
|
struct Username {
|
||||||
ScoreName* operator=(const ScoreName* p_other);
|
Username();
|
||||||
|
inline Username(Username& p_other) { Set(p_other); }
|
||||||
|
inline void Set(Username& p_other) { memcpy(m_letters, p_other.m_letters, sizeof(m_letters)); }
|
||||||
|
|
||||||
|
MxResult ReadWrite(LegoStorage* p_storage);
|
||||||
|
Username& operator=(const Username& p_other);
|
||||||
|
|
||||||
MxS16 m_letters[7]; // 0x00
|
MxS16 m_letters[7]; // 0x00
|
||||||
};
|
};
|
||||||
@ -96,13 +102,14 @@ class LegoGameState {
|
|||||||
// SIZE 0x2c
|
// SIZE 0x2c
|
||||||
struct ScoreItem {
|
struct ScoreItem {
|
||||||
undefined2 m_unk0x00; // 0x00
|
undefined2 m_unk0x00; // 0x00
|
||||||
MxU8 m_state[25]; // 0x02
|
MxU8 m_state[5][5]; // 0x02
|
||||||
ScoreName m_name; // 0x1c
|
Username m_name; // 0x1c
|
||||||
undefined2 m_unk0x2a; // 0x2a
|
undefined2 m_unk0x2a; // 0x2a
|
||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x372
|
// SIZE 0x372
|
||||||
struct Scores {
|
struct History {
|
||||||
|
History();
|
||||||
void WriteScoreHistory();
|
void WriteScoreHistory();
|
||||||
void FUN_1003ccf0(LegoFile&);
|
void FUN_1003ccf0(LegoFile&);
|
||||||
|
|
||||||
@ -110,65 +117,77 @@ class LegoGameState {
|
|||||||
|
|
||||||
MxS16 m_count; // 0x00
|
MxS16 m_count; // 0x00
|
||||||
ScoreItem m_scores[20]; // 0x02
|
ScoreItem m_scores[20]; // 0x02
|
||||||
|
undefined2 m_unk0x372; // 0x372
|
||||||
};
|
};
|
||||||
|
|
||||||
LegoGameState();
|
LegoGameState();
|
||||||
~LegoGameState();
|
~LegoGameState();
|
||||||
|
|
||||||
MxResult Load(MxULong);
|
void SetActor(MxU8 p_actorId);
|
||||||
|
void RemoveActor();
|
||||||
|
void ResetROI();
|
||||||
|
|
||||||
MxResult Save(MxULong);
|
MxResult Save(MxULong);
|
||||||
void SerializePlayersInfo(MxS16);
|
MxResult DeleteState();
|
||||||
|
MxResult Load(MxULong);
|
||||||
|
|
||||||
|
void SerializePlayersInfo(MxS16 p_flags);
|
||||||
|
MxResult AddPlayer(Username& p_player);
|
||||||
|
void SwitchPlayer(MxS16 p_playerId);
|
||||||
|
MxS16 FindPlayer(Username& p_player);
|
||||||
|
|
||||||
void SerializeScoreHistory(MxS16 p_flags);
|
void SerializeScoreHistory(MxS16 p_flags);
|
||||||
void SetSavePath(char*);
|
void SetSavePath(char*);
|
||||||
|
|
||||||
LegoState* GetState(const char* p_stateName);
|
LegoState* GetState(const char* p_stateName);
|
||||||
LegoState* CreateState(const char* p_stateName);
|
LegoState* CreateState(const char* p_stateName);
|
||||||
|
|
||||||
void GetFileSavePath(MxString* p_outPath, MxULong p_slotn);
|
void GetFileSavePath(MxString* p_outPath, MxU8 p_slotn);
|
||||||
void StopArea(Area p_area);
|
void StopArea(Area p_area);
|
||||||
void SwitchArea(Area p_area);
|
void SwitchArea(Area p_area);
|
||||||
|
void Init();
|
||||||
|
|
||||||
inline MxU8 GetUnknownC() { return m_unk0x0c; }
|
inline MxU8 GetActorId() { return m_actorId; }
|
||||||
inline Act GetCurrentAct() { return m_currentAct; }
|
inline Act GetCurrentAct() { return m_currentAct; }
|
||||||
inline Act GetLoadedAct() { return m_loadedAct; }
|
inline Act GetLoadedAct() { return m_loadedAct; }
|
||||||
inline Area GetCurrentArea() { return m_currentArea; }
|
inline Area GetCurrentArea() { return m_currentArea; }
|
||||||
inline Area GetPreviousArea() { return m_previousArea; }
|
inline Area GetPreviousArea() { return m_previousArea; }
|
||||||
inline MxU32 GetUnknown0x41c() { return m_unk0x41c; }
|
inline MxU32 GetUnknown0x41c() { return m_unk0x41c; }
|
||||||
inline Area GetUnknown0x42c() { return m_unk0x42c; }
|
inline Area GetUnknown0x42c() { return m_unk0x42c; }
|
||||||
inline Scores* GetScores() { return &m_unk0xa6; }
|
inline History* GetHistory() { return &m_history; }
|
||||||
|
|
||||||
inline void SetDirty(MxBool p_dirty) { m_isDirty = p_dirty; }
|
inline void SetDirty(MxBool p_dirty) { m_isDirty = p_dirty; }
|
||||||
inline void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; }
|
inline void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; }
|
||||||
inline void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
|
inline void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
|
||||||
inline void SetUnknown0x0c(MxU8 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
|
inline void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
|
||||||
inline void SetUnknown0x41c(undefined4 p_unk0x41c) { m_unk0x41c = p_unk0x41c; }
|
inline void SetUnknown0x41c(undefined4 p_unk0x41c) { m_unk0x41c = p_unk0x41c; }
|
||||||
inline void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
|
inline void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
|
||||||
|
|
||||||
void SetCurrentAct(Act p_currentAct);
|
void SetCurrentAct(Act p_currentAct);
|
||||||
void FindLoadedAct();
|
void FindLoadedAct();
|
||||||
void FUN_10039780(MxU8);
|
|
||||||
void FUN_10039940();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RegisterState(LegoState* p_state);
|
void RegisterState(LegoState* p_state);
|
||||||
MxResult WriteVariable(LegoStorage* p_stream, MxVariableTable* p_from, const char* p_variableName);
|
MxResult WriteVariable(LegoStorage* p_storage, MxVariableTable* p_from, const char* p_variableName);
|
||||||
MxResult WriteEndOfVariables(LegoStorage* p_stream);
|
MxResult WriteEndOfVariables(LegoStorage* p_storage);
|
||||||
MxS32 ReadVariable(LegoStorage* p_stream, MxVariableTable* p_to);
|
MxS32 ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to);
|
||||||
|
void SetColors();
|
||||||
void SetROIHandlerFunction();
|
void SetROIHandlerFunction();
|
||||||
|
|
||||||
char* m_savePath; // 0x00
|
char* m_savePath; // 0x00
|
||||||
MxS16 m_stateCount; // 0x04
|
MxS16 m_stateCount; // 0x04
|
||||||
LegoState** m_stateArray; // 0x08
|
LegoState** m_stateArray; // 0x08
|
||||||
MxU8 m_unk0x0c; // 0x0c
|
MxU8 m_actorId; // 0x0c
|
||||||
Act m_currentAct; // 0x10
|
Act m_currentAct; // 0x10
|
||||||
Act m_loadedAct; // 0x14
|
Act m_loadedAct; // 0x14
|
||||||
LegoBackgroundColor* m_backgroundColor; // 0x18
|
LegoBackgroundColor* m_backgroundColor; // 0x18
|
||||||
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
||||||
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
||||||
MxU16 m_unk0x24; // 0x24
|
MxU16 m_unk0x24; // 0x24
|
||||||
undefined m_unk0x26[128]; // 0x26
|
MxS16 m_playerCount; // 0x26
|
||||||
Scores m_unk0xa6; // 0xa6
|
Username m_players[9]; // 0x28
|
||||||
undefined4 m_unk0x418; // 0x418
|
History m_history; // 0xa6
|
||||||
|
undefined2 m_unk0x41a; // 0x41a
|
||||||
undefined4 m_unk0x41c; // 0x41c
|
undefined4 m_unk0x41c; // 0x41c
|
||||||
MxBool m_isDirty; // 0x420
|
MxBool m_isDirty; // 0x420
|
||||||
Area m_currentArea; // 0x424
|
Area m_currentArea; // 0x424
|
||||||
@ -178,4 +197,7 @@ class LegoGameState {
|
|||||||
|
|
||||||
MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen);
|
MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen);
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1003c860
|
||||||
|
// LegoGameState::ScoreItem::ScoreItem
|
||||||
|
|
||||||
#endif // LEGOGAMESTATE_H
|
#endif // LEGOGAMESTATE_H
|
||||||
|
|||||||
@ -30,6 +30,8 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
|||||||
void Destroy() override; // vtable+0x38
|
void Destroy() override; // vtable+0x38
|
||||||
void EndAction() override; // vtable+0x40
|
void EndAction() override; // vtable+0x40
|
||||||
void PutFrame() override; // vtable+0x6c
|
void PutFrame() override; // vtable+0x6c
|
||||||
|
void VTable0x8c() override; // vtable+0x8c
|
||||||
|
void VTable0x90() override; // vtable+0x90
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
|
|||||||
void Destroy() override; // vtable+0x38
|
void Destroy() override; // vtable+0x38
|
||||||
void EndAction() override; // vtable+0x40
|
void EndAction() override; // vtable+0x40
|
||||||
void PutFrame() override; // vtable+0x6c
|
void PutFrame() override; // vtable+0x6c
|
||||||
MxResult VTable0x88(MxStreamChunk* p_chunk) override; // vtable+0x88
|
MxResult CreateAnim(MxStreamChunk* p_chunk) override; // vtable+0x88
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1006cfe0
|
// SYNTHETIC: LEGO1 0x1006cfe0
|
||||||
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
|
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
|
||||||
|
|||||||
@ -56,6 +56,7 @@ class LegoNavController : public MxCore {
|
|||||||
void SetControlMax(int p_hMax, int p_vMax);
|
void SetControlMax(int p_hMax, int p_vMax);
|
||||||
void ResetToDefault();
|
void ResetToDefault();
|
||||||
void SetTargets(int p_hPos, int p_vPos, MxBool p_accel);
|
void SetTargets(int p_hPos, int p_vPos, MxBool p_accel);
|
||||||
|
static void SetLocation(MxU32 p_location);
|
||||||
float CalculateNewTargetSpeed(int p_pos, int p_center, float p_maxSpeed);
|
float CalculateNewTargetSpeed(int p_pos, int p_center, float p_maxSpeed);
|
||||||
float CalculateNewAccel(int p_pos, int p_center, float p_maxAccel, int p_minAccel);
|
float CalculateNewAccel(int p_pos, int p_center, float p_maxAccel, int p_minAccel);
|
||||||
float CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time);
|
float CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time);
|
||||||
|
|||||||
@ -213,9 +213,10 @@ class LegoOmni : public MxOmni {
|
|||||||
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
||||||
LegoInputManager* GetInputManager() { return m_inputManager; }
|
LegoInputManager* GetInputManager() { return m_inputManager; }
|
||||||
LegoTextureContainer* GetTextureContainer() { return m_textureContainer; }
|
LegoTextureContainer* GetTextureContainer() { return m_textureContainer; }
|
||||||
|
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
|
||||||
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
||||||
LegoNavController* GetNavController() { return m_navController; }
|
LegoNavController* GetNavController() { return m_navController; }
|
||||||
IslePathActor* GetCurrentVehicle() { return m_currentVehicle; }
|
IslePathActor* GetCurrentActor() { return m_currentActor; }
|
||||||
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
||||||
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
||||||
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
||||||
@ -227,6 +228,7 @@ class LegoOmni : public MxOmni {
|
|||||||
LegoWorldList* GetWorldList() { return m_worldList; }
|
LegoWorldList* GetWorldList() { return m_worldList; }
|
||||||
|
|
||||||
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
||||||
|
inline void SetCurrentActor(IslePathActor* p_currentActor) { m_currentActor = p_currentActor; }
|
||||||
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||||
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
||||||
|
|
||||||
@ -244,7 +246,7 @@ class LegoOmni : public MxOmni {
|
|||||||
LegoWorld* m_currentWorld; // 0x7c
|
LegoWorld* m_currentWorld; // 0x7c
|
||||||
MxBool m_exit; // 0x80
|
MxBool m_exit; // 0x80
|
||||||
LegoNavController* m_navController; // 0x84
|
LegoNavController* m_navController; // 0x84
|
||||||
IslePathActor* m_currentVehicle; // 0x88
|
IslePathActor* m_currentActor; // 0x88
|
||||||
LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c
|
LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c
|
||||||
LegoPlantManager* m_plantManager; // 0x90
|
LegoPlantManager* m_plantManager; // 0x90
|
||||||
LegoAnimationManager* m_animationManager; // 0x94
|
LegoAnimationManager* m_animationManager; // 0x94
|
||||||
@ -270,14 +272,16 @@ LegoAnimationManager* AnimationManager();
|
|||||||
LegoNavController* NavController();
|
LegoNavController* NavController();
|
||||||
LegoBuildingManager* BuildingManager();
|
LegoBuildingManager* BuildingManager();
|
||||||
LegoControlManager* ControlManager();
|
LegoControlManager* ControlManager();
|
||||||
IslePathActor* CurrentVehicle();
|
IslePathActor* CurrentActor();
|
||||||
ViewManager* GetViewManager();
|
ViewManager* GetViewManager();
|
||||||
LegoPlantManager* PlantManager();
|
LegoPlantManager* PlantManager();
|
||||||
LegoWorld* CurrentWorld();
|
LegoWorld* CurrentWorld();
|
||||||
LegoUnkSaveDataWriter* UnkSaveDataWriter();
|
LegoUnkSaveDataWriter* UnkSaveDataWriter();
|
||||||
LegoTextureContainer* TextureContainer();
|
LegoTextureContainer* TextureContainer();
|
||||||
|
ViewLODListManager* GetViewLODListManager();
|
||||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
||||||
void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c);
|
void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c);
|
||||||
|
void SetCurrentActor(IslePathActor* p_currentActor);
|
||||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||||
LegoROI* FindROI(const char* p_name);
|
LegoROI* FindROI(const char* p_name);
|
||||||
MxDSAction& GetCurrentAction();
|
MxDSAction& GetCurrentAction();
|
||||||
|
|||||||
@ -65,13 +65,18 @@ class LegoPathActor : public LegoActor {
|
|||||||
// FUNCTION: LEGO1 0x10002de0
|
// FUNCTION: LEGO1 0x10002de0
|
||||||
virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8
|
virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8
|
||||||
|
|
||||||
|
inline MxU32 GetUnknown88() { return m_unk0x88; }
|
||||||
|
|
||||||
|
inline void SetUnknown88(MxU32 p_unk0x88) { m_unk0x88 = p_unk0x88; }
|
||||||
inline void SetUnknownDC(MxU32 p_unk0xdc) { m_unk0xdc = p_unk0xdc; }
|
inline void SetUnknownDC(MxU32 p_unk0xdc) { m_unk0xdc = p_unk0xdc; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1002d800
|
// SYNTHETIC: LEGO1 0x1002d800
|
||||||
// LegoPathActor::`scalar deleting destructor'
|
// LegoPathActor::`scalar deleting destructor'
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
undefined m_unk0x78[0x64]; // 0x78
|
undefined m_unk0x78[0x10]; // 0x78
|
||||||
|
MxU32 m_unk0x88; // 0x88
|
||||||
|
undefined m_unk0x8c[0x50]; // 0x8c
|
||||||
MxU32 m_unk0xdc; // 0xdc
|
MxU32 m_unk0xdc; // 0xdc
|
||||||
undefined m_unk0xe0[0xa]; // 0xe0
|
undefined m_unk0xe0[0xa]; // 0xe0
|
||||||
MxU8 m_unk0xea; // 0xea
|
MxU8 m_unk0xea; // 0xea
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class LegoPathControllerList : public MxPtrList<LegoPathController> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoPathControllerListCursor : public MxPtrListCursor<LegoPathController> {
|
class LegoPathControllerListCursor : public MxPtrListCursor<LegoPathController> {
|
||||||
public:
|
public:
|
||||||
LegoPathControllerListCursor(LegoPathControllerList* p_list) : MxPtrListCursor<LegoPathController>(p_list){};
|
LegoPathControllerListCursor(LegoPathControllerList* p_list) : MxPtrListCursor<LegoPathController>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1001d230
|
// TEMPLATE: LEGO1 0x1001d230
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define LEGOPLANTMANAGER_H
|
#define LEGOPLANTMANAGER_H
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "misc/legostorage.h"
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6758
|
// VTABLE: LEGO1 0x100d6758
|
||||||
@ -20,8 +21,11 @@ class LegoPlantManager : public MxCore {
|
|||||||
return "LegoPlantManager";
|
return "LegoPlantManager";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Init();
|
||||||
void FUN_10026360(MxS32 p_scriptIndex);
|
void FUN_10026360(MxS32 p_scriptIndex);
|
||||||
void FUN_100263a0(undefined4 p_und);
|
void FUN_100263a0(undefined4 p_und);
|
||||||
|
void Save(LegoStorage* p_storage);
|
||||||
|
MxResult Load(LegoStorage* p_storage);
|
||||||
void FUN_10027120();
|
void FUN_10027120();
|
||||||
|
|
||||||
static void SetCustomizeAnimFile(const char* p_value);
|
static void SetCustomizeAnimFile(const char* p_value);
|
||||||
@ -32,8 +36,6 @@ class LegoPlantManager : public MxCore {
|
|||||||
private:
|
private:
|
||||||
static char* g_customizeAnimFile;
|
static char* g_customizeAnimFile;
|
||||||
|
|
||||||
void Init();
|
|
||||||
|
|
||||||
undefined m_unk0x08[0x24]; // 0x08
|
undefined m_unk0x08[0x24]; // 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
57
LEGO1/lego/legoomni/include/legoroilist.h
Normal file
57
LEGO1/lego/legoomni/include/legoroilist.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#ifndef LEGOROILIST_H
|
||||||
|
#define LEGOROILIST_H
|
||||||
|
|
||||||
|
#include "mxlist.h"
|
||||||
|
#include "mxtypes.h"
|
||||||
|
#include "roi/legoroi.h"
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d8c30
|
||||||
|
// class MxCollection<LegoROI *>
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d8c48
|
||||||
|
// class MxList<LegoROI *>
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d8c60
|
||||||
|
// class MxPtrList<LegoROI>
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d8c78
|
||||||
|
// SIZE 0x18
|
||||||
|
class LegoROIList : public MxPtrList<LegoROI> {
|
||||||
|
public:
|
||||||
|
LegoROIList(MxBool p_ownership = FALSE) : MxPtrList<LegoROI>(p_ownership) {}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1005f360
|
||||||
|
MxS8 Compare(LegoROI* p_a, LegoROI* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1005f480
|
||||||
|
// LegoROIList::`scalar deleting destructor'
|
||||||
|
};
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1005f380
|
||||||
|
// MxCollection<LegoROI *>::Compare
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1005f390
|
||||||
|
// MxCollection<LegoROI *>::~MxCollection<LegoROI *>
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1005f3e0
|
||||||
|
// MxCollection<LegoROI *>::Destroy
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1005f3f0
|
||||||
|
// MxList<LegoROI *>::~MxList<LegoROI *>
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1005f4f0
|
||||||
|
// MxPtrList<LegoROI>::~MxPtrList<LegoROI>
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1005f540
|
||||||
|
// MxCollection<LegoROI *>::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1005f5b0
|
||||||
|
// MxList<LegoROI *>::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1005f660
|
||||||
|
// MxPtrList<LegoROI>::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1006ea00
|
||||||
|
// MxListEntry<LegoROI *>::MxListEntry<LegoROI *>
|
||||||
|
|
||||||
|
#endif // LEGOROILIST_H
|
||||||
@ -55,15 +55,19 @@ class LegoUnkSaveDataWriter {
|
|||||||
public:
|
public:
|
||||||
LegoUnkSaveDataWriter();
|
LegoUnkSaveDataWriter();
|
||||||
|
|
||||||
MxResult WriteSaveData3(LegoStorage* p_stream);
|
MxResult WriteSaveData3(LegoStorage* p_storage);
|
||||||
LegoROI* FUN_10083500(char*, MxBool);
|
MxResult ReadSaveData3(LegoStorage* p_storage);
|
||||||
|
LegoROI* FUN_10083500(const char*, MxBool);
|
||||||
|
|
||||||
static void InitSaveData();
|
void InitSaveData();
|
||||||
static void SetCustomizeAnimFile(const char* p_value);
|
static void SetCustomizeAnimFile(const char* p_value);
|
||||||
|
static MxBool FUN_10084c00(const LegoChar*);
|
||||||
|
|
||||||
void FUN_100832a0();
|
void FUN_100832a0();
|
||||||
void FUN_10083db0(LegoROI* p_roi);
|
void FUN_10083db0(LegoROI* p_roi);
|
||||||
void FUN_10083f10(LegoROI* p_roi);
|
void FUN_10083f10(LegoROI* p_roi);
|
||||||
|
LegoROI* FUN_10085210(const LegoChar*, LegoChar*, undefined);
|
||||||
|
LegoROI* FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static char* g_customizeAnimFile;
|
static char* g_customizeAnimFile;
|
||||||
|
|||||||
@ -34,12 +34,14 @@ class NamedTexture {
|
|||||||
void FUN_1003e050(LegoAnimPresenter* p_presenter);
|
void FUN_1003e050(LegoAnimPresenter* p_presenter);
|
||||||
Extra::ActionType MatchActionString(const char*);
|
Extra::ActionType MatchActionString(const char*);
|
||||||
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
||||||
|
void SetCameraControllerFromIsle();
|
||||||
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
|
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
|
||||||
MxBool FUN_1003ee00(MxAtomId& p_atomId, MxS32 p_id);
|
MxBool FUN_1003ee00(MxAtomId& p_atomId, MxS32 p_id);
|
||||||
void FUN_1003ef00(MxBool);
|
void FUN_1003ef00(MxBool);
|
||||||
void SetAppCursor(WPARAM p_wparam);
|
void SetAppCursor(WPARAM p_wparam);
|
||||||
MxBool FUN_1003ef60();
|
MxBool FUN_1003ef60();
|
||||||
MxBool RemoveFromWorld(MxAtomId& p_atomId1, MxS32 p_id1, MxAtomId& p_atomId2, MxS32 p_id2);
|
MxBool RemoveFromWorld(MxAtomId& p_atomId1, MxS32 p_id1, MxAtomId& p_atomId2, MxS32 p_id2);
|
||||||
|
void SetLightPosition(MxU32);
|
||||||
NamedTexture* ReadNamedTexture(LegoFile* p_file);
|
NamedTexture* ReadNamedTexture(LegoFile* p_file);
|
||||||
void FUN_1003f540(LegoFile* p_file, const char* p_filename);
|
void FUN_1003f540(LegoFile* p_file, const char* p_filename);
|
||||||
void WriteNamedTexture(LegoFile* p_file, NamedTexture* p_texture);
|
void WriteNamedTexture(LegoFile* p_file, NamedTexture* p_texture);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class LegoWorldList : public MxPtrList<LegoWorld> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoWorldListCursor : public MxPtrListCursor<LegoWorld> {
|
class LegoWorldListCursor : public MxPtrListCursor<LegoWorld> {
|
||||||
public:
|
public:
|
||||||
LegoWorldListCursor(LegoWorldList* p_list) : MxPtrListCursor<LegoWorld>(p_list){};
|
LegoWorldListCursor(LegoWorldList* p_list) : MxPtrListCursor<LegoWorld>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1003e870
|
// SYNTHETIC: LEGO1 0x1003e870
|
||||||
|
|||||||
@ -67,9 +67,9 @@ void Helicopter::VTable0xe4()
|
|||||||
|
|
||||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||||
GameState()->SetCurrentArea(LegoGameState::e_unk60);
|
GameState()->SetCurrentArea(LegoGameState::e_unk60);
|
||||||
if (CurrentVehicle()) {
|
if (CurrentActor()) {
|
||||||
if (CurrentVehicle()->IsA("IslePathActor")) {
|
if (CurrentActor()->IsA("IslePathActor")) {
|
||||||
((IslePathActor*) CurrentVehicle())->VTable0xe8(0x37, TRUE, 7);
|
((IslePathActor*) CurrentActor())->VTable0xe8(0x37, TRUE, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,9 +102,9 @@ MxU32 Helicopter::VTable0xcc()
|
|||||||
|
|
||||||
AnimationManager()->FUN_1005f6d0(FALSE);
|
AnimationManager()->FUN_1005f6d0(FALSE);
|
||||||
|
|
||||||
if (CurrentVehicle()) {
|
if (CurrentActor()) {
|
||||||
if (CurrentVehicle()->VTable0x60() != GameState()->GetUnknownC()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentVehicle()->VTable0xe4();
|
CurrentActor()->VTable0xe4();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,18 @@ void LegoBuildingManager::FUN_1002fb30()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1002fb80
|
||||||
|
MxResult LegoBuildingManager::Save(LegoStorage* p_storage)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1002fc10
|
||||||
|
MxResult LegoBuildingManager::Load(LegoStorage* p_storage)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002ff90
|
// FUNCTION: LEGO1 0x1002ff90
|
||||||
void LegoBuildingManager::SetCustomizeAnimFile(const char* p_value)
|
void LegoBuildingManager::SetCustomizeAnimFile(const char* p_value)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -66,3 +66,16 @@ void LegoBackgroundColor::SetValue(const char* p_colorString)
|
|||||||
|
|
||||||
delete[] colorStringCopy;
|
delete[] colorStringCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1003c400
|
||||||
|
void LegoBackgroundColor::SetLights(float p_r, float p_g, float p_b)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1003c4b0
|
||||||
|
void LegoBackgroundColor::SetLights()
|
||||||
|
{
|
||||||
|
float convertedR, convertedG, convertedB;
|
||||||
|
ConvertHSVToRGB(m_h, m_s, m_v, &convertedR, &convertedG, &convertedB);
|
||||||
|
SetLights(convertedR, convertedG, convertedB);
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,18 @@ void LegoPlantManager::FUN_100263a0(undefined4 p_und)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10026720
|
||||||
|
void LegoPlantManager::Save(LegoStorage* p_storage)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x100267b0
|
||||||
|
MxResult LegoPlantManager::Load(LegoStorage* p_storage)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10026be0
|
// FUNCTION: LEGO1 0x10026be0
|
||||||
void LegoPlantManager::SetCustomizeAnimFile(const char* p_value)
|
void LegoPlantManager::SetCustomizeAnimFile(const char* p_value)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void LegoUnkSaveDataWriter::FUN_100832a0()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10083310
|
// FUNCTION: LEGO1 0x10083310
|
||||||
MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_stream)
|
MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_storage)
|
||||||
{
|
{
|
||||||
MxResult result = FAILURE;
|
MxResult result = FAILURE;
|
||||||
|
|
||||||
@ -51,34 +51,34 @@ MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_stream)
|
|||||||
const LegoSaveDataEntry3* end = &g_saveData3[66];
|
const LegoSaveDataEntry3* end = &g_saveData3[66];
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (p_stream->Write(&entry->m_savePart1, 4) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart1, 4) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart2, 4) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart2, 4) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart3, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart3, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_currentFrame, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_currentFrame, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart5, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart5, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart6, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart6, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart7, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart7, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart8, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart8, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart9, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart9, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p_stream->Write(&entry->m_savePart10, 1) != SUCCESS) {
|
if (p_storage->Write(&entry->m_savePart10, 1) != SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (++entry >= end) {
|
if (++entry >= end) {
|
||||||
@ -86,11 +86,18 @@ MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_stream)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x100833f0
|
||||||
|
MxResult LegoUnkSaveDataWriter::ReadSaveData3(LegoStorage* p_storage)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10083500
|
// STUB: LEGO1 0x10083500
|
||||||
LegoROI* LegoUnkSaveDataWriter::FUN_10083500(char* p_key, MxBool p_option)
|
LegoROI* LegoUnkSaveDataWriter::FUN_10083500(const char* p_key, MxBool p_option)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
// involves an STL map with a _Nil node at 0x100fc508
|
// involves an STL map with a _Nil node at 0x100fc508
|
||||||
@ -109,6 +116,13 @@ void LegoUnkSaveDataWriter::FUN_10083f10(LegoROI* p_roi)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10084c00
|
||||||
|
MxBool LegoUnkSaveDataWriter::FUN_10084c00(const LegoChar*)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100851a0
|
// FUNCTION: LEGO1 0x100851a0
|
||||||
void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value)
|
void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value)
|
||||||
{
|
{
|
||||||
@ -127,3 +141,15 @@ void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value)
|
|||||||
g_customizeAnimFile = NULL;
|
g_customizeAnimFile = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10085210
|
||||||
|
LegoROI* LegoUnkSaveDataWriter::FUN_10085210(const LegoChar*, LegoChar*, undefined)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10085a80
|
||||||
|
LegoROI* LegoUnkSaveDataWriter::FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3)
|
||||||
|
{
|
||||||
|
return FUN_10085210(p_und1, p_und2, p_und3);
|
||||||
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "legoutil.h"
|
#include "legoutil.h"
|
||||||
|
|
||||||
|
#include "legoinputmanager.h"
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
#include "legoworldlist.h"
|
#include "legoworldlist.h"
|
||||||
@ -161,6 +162,12 @@ void NotifyEntity(const char* p_filename, MxS32 p_entityId, LegoEntity* p_sender
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1003eab0
|
||||||
|
void SetCameraControllerFromIsle()
|
||||||
|
{
|
||||||
|
InputManager()->SetCamera(FindWorld(*g_isleScript, 0)->GetCamera());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003eae0
|
// FUNCTION: LEGO1 0x1003eae0
|
||||||
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut)
|
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut)
|
||||||
{
|
{
|
||||||
@ -284,6 +291,11 @@ MxBool FUN_1003ef60()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1003f0d0
|
||||||
|
void SetLightPosition(MxU32)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003f3b0
|
// STUB: LEGO1 0x1003f3b0
|
||||||
NamedTexture* ReadNamedTexture(LegoFile* p_file)
|
NamedTexture* ReadNamedTexture(LegoFile* p_file)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
|
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f32d0
|
// GLOBAL: LEGO1 0x100f32d0
|
||||||
const char* g_unk0x100f32d0[] = {"none", "pepper", "mama", "papa", "nick", "laura", "The_Brickster!"};
|
const char* g_actorNames[] = {"none", "pepper", "mama", "papa", "nick", "laura", "The_Brickster!"};
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002d110
|
// FUNCTION: LEGO1 0x1002d110
|
||||||
LegoActor::LegoActor()
|
LegoActor::LegoActor()
|
||||||
@ -12,7 +12,7 @@ LegoActor::LegoActor()
|
|||||||
m_sound = NULL;
|
m_sound = NULL;
|
||||||
m_unk0x70 = 0.0f;
|
m_unk0x70 = 0.0f;
|
||||||
m_unk0x10 = 0;
|
m_unk0x10 = 0;
|
||||||
m_unk0x74 = 0;
|
m_actorId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002d320
|
// FUNCTION: LEGO1 0x1002d320
|
||||||
@ -29,16 +29,22 @@ void LegoActor::ParseAction(char*)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1002d660
|
||||||
|
const char* LegoActor::GetActorName(MxU8 p_id)
|
||||||
|
{
|
||||||
|
return g_actorNames[p_id];
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002d670
|
// FUNCTION: LEGO1 0x1002d670
|
||||||
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||||
{
|
{
|
||||||
if (p_roi) {
|
if (p_roi) {
|
||||||
const char* name = p_roi->GetName();
|
const char* name = p_roi->GetName();
|
||||||
|
|
||||||
for (MxU32 i = 1; i <= _countof(g_unk0x100f32d0) - 1; i++) {
|
for (MxU32 i = 1; i <= _countof(g_actorNames) - 1; i++) {
|
||||||
if (!strcmpi(name, g_unk0x100f32d0[i])) {
|
if (!strcmpi(name, g_actorNames[i])) {
|
||||||
m_unk0x59 = 0;
|
m_unk0x59 = 0;
|
||||||
m_unk0x74 = i;
|
m_actorId = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -230,6 +230,11 @@ float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel,
|
|||||||
return newVel;
|
return newVel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10055620
|
||||||
|
void LegoNavController::SetLocation(MxU32 p_location)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10055a60
|
// STUB: LEGO1 0x10055a60
|
||||||
MxLong LegoNavController::Notify(MxParam& p_param)
|
MxLong LegoNavController::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -581,17 +581,17 @@ void LegoWorld::Enable(MxBool p_enable)
|
|||||||
AnimationManager()->FUN_1005f0b0();
|
AnimationManager()->FUN_1005f0b0();
|
||||||
}
|
}
|
||||||
|
|
||||||
GameState()->FUN_10039940();
|
GameState()->ResetROI();
|
||||||
SetIsWorldActive(TRUE);
|
SetIsWorldActive(TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!p_enable && m_set0xd0.empty()) {
|
else if (!p_enable && m_set0xd0.empty()) {
|
||||||
MxPresenter* presenter;
|
MxPresenter* presenter;
|
||||||
LegoPathController* controller;
|
LegoPathController* controller;
|
||||||
IslePathActor* vehicle = CurrentVehicle();
|
IslePathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (vehicle) {
|
if (actor) {
|
||||||
FUN_1001fc80(vehicle);
|
FUN_1001fc80(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationManager()->FUN_1005ee80(FALSE);
|
AnimationManager()->FUN_1005ee80(FALSE);
|
||||||
|
|||||||
@ -101,7 +101,7 @@ MxLong ElevatorBottom::HandleClick(LegoControlManagerEvent& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
state->SetUnknown1c(1);
|
state->SetUnknown1c(1);
|
||||||
m_unk0xf8 = LegoGameState::e_unk6;
|
m_unk0xf8 = LegoGameState::e_elevride;
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||||
VariableTable()->SetVariable(g_varCAMERALOCATION, "LCAMZI1,90");
|
VariableTable()->SetVariable(g_varCAMERALOCATION, "LCAMZI1,90");
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|||||||
@ -201,7 +201,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||||||
|
|
||||||
if (!m_unk0x1d4) {
|
if (!m_unk0x1d4) {
|
||||||
PlayMusic(JukeBox::e_informationCenter);
|
PlayMusic(JukeBox::e_informationCenter);
|
||||||
GameState()->FUN_10039780(m_selectedCharacter);
|
GameState()->SetActor(m_selectedCharacter);
|
||||||
|
|
||||||
switch (m_selectedCharacter) {
|
switch (m_selectedCharacter) {
|
||||||
case e_pepper:
|
case e_pepper:
|
||||||
@ -303,7 +303,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||||||
case 5:
|
case 5:
|
||||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||||
if (GameState()->GetCurrentAct() != LegoGameState::e_act3 && m_selectedCharacter != e_noCharacter) {
|
if (GameState()->GetCurrentAct() != LegoGameState::e_act3 && m_selectedCharacter != e_noCharacter) {
|
||||||
GameState()->FUN_10039780(m_selectedCharacter);
|
GameState()->SetActor(m_selectedCharacter);
|
||||||
}
|
}
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||||
m_infocenterState->SetUnknown0x74(14);
|
m_infocenterState->SetUnknown0x74(14);
|
||||||
@ -734,7 +734,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||||||
|
|
||||||
switch (m_mapAreas[m_unk0x1c8].m_unk0x04) {
|
switch (m_mapAreas[m_unk0x1c8].m_unk0x04) {
|
||||||
case 3:
|
case 3:
|
||||||
GameState()->FUN_10039780(m_selectedCharacter);
|
GameState()->SetActor(m_selectedCharacter);
|
||||||
|
|
||||||
switch (m_selectedCharacter) {
|
switch (m_selectedCharacter) {
|
||||||
case e_pepper:
|
case e_pepper:
|
||||||
@ -756,37 +756,37 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk16;
|
m_transitionDestination = LegoGameState::e_jetraceExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk19;
|
m_transitionDestination = LegoGameState::e_carraceExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk22;
|
m_transitionDestination = LegoGameState::e_pizzeriaExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk25;
|
m_transitionDestination = LegoGameState::e_garageExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk29;
|
m_transitionDestination = LegoGameState::e_hospitalExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
if (m_selectedCharacter) {
|
if (m_selectedCharacter) {
|
||||||
m_transitionDestination = LegoGameState::e_unk32;
|
m_transitionDestination = LegoGameState::e_policeExterior;
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -810,23 +810,23 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||||||
switch (m_selectedCharacter) {
|
switch (m_selectedCharacter) {
|
||||||
case e_pepper:
|
case e_pepper:
|
||||||
dialogueToPlay = c_pepperCharacterSelect;
|
dialogueToPlay = c_pepperCharacterSelect;
|
||||||
GameState()->SetUnknown0x0c(m_selectedCharacter);
|
GameState()->SetActorId(m_selectedCharacter);
|
||||||
break;
|
break;
|
||||||
case e_mama:
|
case e_mama:
|
||||||
dialogueToPlay = c_mamaCharacterSelect;
|
dialogueToPlay = c_mamaCharacterSelect;
|
||||||
GameState()->SetUnknown0x0c(m_selectedCharacter);
|
GameState()->SetActorId(m_selectedCharacter);
|
||||||
break;
|
break;
|
||||||
case e_papa:
|
case e_papa:
|
||||||
dialogueToPlay = c_papaCharacterSelect;
|
dialogueToPlay = c_papaCharacterSelect;
|
||||||
GameState()->SetUnknown0x0c(m_selectedCharacter);
|
GameState()->SetActorId(m_selectedCharacter);
|
||||||
break;
|
break;
|
||||||
case e_nick:
|
case e_nick:
|
||||||
dialogueToPlay = c_nickCharacterSelect;
|
dialogueToPlay = c_nickCharacterSelect;
|
||||||
GameState()->SetUnknown0x0c(m_selectedCharacter);
|
GameState()->SetActorId(m_selectedCharacter);
|
||||||
break;
|
break;
|
||||||
case e_laura:
|
case e_laura:
|
||||||
dialogueToPlay = c_lauraCharacterSelect;
|
dialogueToPlay = c_lauraCharacterSelect;
|
||||||
GameState()->SetUnknown0x0c(m_selectedCharacter);
|
GameState()->SetActorId(m_selectedCharacter);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dialogueToPlay =
|
dialogueToPlay =
|
||||||
@ -948,7 +948,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param)
|
|||||||
InputManager()->SetUnknown336(TRUE);
|
InputManager()->SetUnknown336(TRUE);
|
||||||
break;
|
break;
|
||||||
case LegoGameState::e_unk4:
|
case LegoGameState::e_unk4:
|
||||||
if (state->GetUnknownC()) {
|
if (state->GetActorId()) {
|
||||||
if (m_infocenterState->HasRegistered()) {
|
if (m_infocenterState->HasRegistered()) {
|
||||||
m_infocenterState->SetUnknown0x74(5);
|
m_infocenterState->SetUnknown0x74(5);
|
||||||
m_transitionDestination = state->GetPreviousArea();
|
m_transitionDestination = state->GetPreviousArea();
|
||||||
@ -1228,7 +1228,7 @@ void Infocenter::UpdateFrameHot(MxBool p_display)
|
|||||||
if (p_display) {
|
if (p_display) {
|
||||||
MxS32 x, y;
|
MxS32 x, y;
|
||||||
|
|
||||||
switch (GameState()->GetUnknownC()) {
|
switch (GameState()->GetActorId()) {
|
||||||
case 1:
|
case 1:
|
||||||
x = 302;
|
x = 302;
|
||||||
y = 81;
|
y = 81;
|
||||||
@ -1292,7 +1292,7 @@ void Infocenter::Reset()
|
|||||||
InitializeBitmaps();
|
InitializeBitmaps();
|
||||||
m_selectedCharacter = e_pepper;
|
m_selectedCharacter = e_pepper;
|
||||||
|
|
||||||
GameState()->FUN_10039780(e_pepper);
|
GameState()->SetActor(e_pepper);
|
||||||
|
|
||||||
HelicopterState* state = (HelicopterState*) GameState()->GetState("HelicopterState");
|
HelicopterState* state = (HelicopterState*) GameState()->GetState("HelicopterState");
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ MxLong InfocenterDoor::HandleClick(LegoControlManagerEvent& p_param)
|
|||||||
result = 1;
|
result = 1;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (GameState()->GetUnknownC()) {
|
if (GameState()->GetActorId()) {
|
||||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||||
if (state->HasRegistered()) {
|
if (state->HasRegistered()) {
|
||||||
m_unk0xf8 = LegoGameState::e_unk4;
|
m_unk0xf8 = LegoGameState::e_unk4;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ inline void SetColor(MxStillPresenter* p_presenter, MxU8 p_color, MxU8* p_colors
|
|||||||
void HistoryBook::ReadyWorld()
|
void HistoryBook::ReadyWorld()
|
||||||
{
|
{
|
||||||
LegoWorld::ReadyWorld();
|
LegoWorld::ReadyWorld();
|
||||||
GameState()->GetScores()->WriteScoreHistory();
|
GameState()->GetHistory()->WriteScoreHistory();
|
||||||
|
|
||||||
char bitmap[] = "A_Bitmap";
|
char bitmap[] = "A_Bitmap";
|
||||||
for (MxS16 i = 0; i < 26; i++) {
|
for (MxS16 i = 0; i < 26; i++) {
|
||||||
@ -93,8 +93,8 @@ void HistoryBook::ReadyWorld()
|
|||||||
{0x76, 0x4c, 0x38}; // yellow - #FFB900, blue - #00548C, red - #CB1220, background - #CECECE, border - #74818B
|
{0x76, 0x4c, 0x38}; // yellow - #FFB900, blue - #00548C, red - #CB1220, background - #CECECE, border - #74818B
|
||||||
MxS32 scoreY = 0x79;
|
MxS32 scoreY = 0x79;
|
||||||
|
|
||||||
for (MxS16 scoreIndex = 0; scoreIndex < GameState()->GetScores()->m_count; scoreIndex++) {
|
for (MxS16 scoreIndex = 0; scoreIndex < GameState()->GetHistory()->m_count; scoreIndex++) {
|
||||||
LegoGameState::ScoreItem* score = GameState()->GetScores()->GetScore(scoreIndex);
|
LegoGameState::ScoreItem* score = GameState()->GetHistory()->GetScore(scoreIndex);
|
||||||
|
|
||||||
MxStillPresenter** scorebox = &m_scores[scoreIndex];
|
MxStillPresenter** scorebox = &m_scores[scoreIndex];
|
||||||
*scorebox = scoreboxMaster->Clone();
|
*scorebox = scoreboxMaster->Clone();
|
||||||
@ -110,14 +110,14 @@ void HistoryBook::ReadyWorld()
|
|||||||
|
|
||||||
MxS32 scoreboxX = 1;
|
MxS32 scoreboxX = 1;
|
||||||
MxS32 scoreboxRow = 5;
|
MxS32 scoreboxRow = 5;
|
||||||
MxU8* scoreState = score->m_state;
|
MxS32 scoreState = 0;
|
||||||
|
|
||||||
for (; scoreboxRow > 0; scoreboxRow--) {
|
for (; scoreboxRow > 0; scoreboxRow--) {
|
||||||
for (MxS32 scoreBoxColumn = 0, scoreboxY = 1; scoreBoxColumn < 5; scoreBoxColumn++, scoreboxY += 5) {
|
for (MxS32 scoreBoxColumn = 0, scoreboxY = 1; scoreBoxColumn < 5; scoreBoxColumn++, scoreboxY += 5) {
|
||||||
SetColor(*scorebox, scoreState[scoreBoxColumn], scoreColors, scoreboxX, scoreboxY);
|
SetColor(*scorebox, score->m_state[scoreState][scoreBoxColumn], scoreColors, scoreboxX, scoreboxY);
|
||||||
}
|
}
|
||||||
|
|
||||||
scoreState += 5;
|
scoreState++;
|
||||||
scoreboxX += 5;
|
scoreboxX += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,8 +46,8 @@ Isle::~Isle()
|
|||||||
InputManager()->ClearWorld();
|
InputManager()->ClearWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentVehicle() != NULL) {
|
if (CurrentActor() != NULL) {
|
||||||
VTable0x6c(CurrentVehicle());
|
VTable0x6c(CurrentActor());
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationManager()->Unregister(this);
|
NotificationManager()->Unregister(this);
|
||||||
@ -121,7 +121,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
|||||||
case c_notificationType18:
|
case c_notificationType18:
|
||||||
switch (m_act1state->GetUnknown18()) {
|
switch (m_act1state->GetUnknown18()) {
|
||||||
case 4:
|
case 4:
|
||||||
result = CurrentVehicle()->Notify(p_param);
|
result = CurrentActor()->Notify(p_param);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
result = m_towtrack->Notify(p_param);
|
result = m_towtrack->Notify(p_param);
|
||||||
|
|||||||
@ -1,7 +1,17 @@
|
|||||||
#include "jukebox.h"
|
#include "jukebox.h"
|
||||||
|
|
||||||
|
#include "act1state.h"
|
||||||
|
#include "jukeboxstate.h"
|
||||||
|
#include "legocontrolmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
|
#include "legoinputmanager.h"
|
||||||
|
#include "legoomni.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
|
#include "mxstillpresenter.h"
|
||||||
|
#include "mxticklemanager.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
#include "mxvideopresenter.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(JukeBox, 0x104)
|
DECOMP_SIZE_ASSERT(JukeBox, 0x104)
|
||||||
|
|
||||||
@ -9,7 +19,7 @@ DECOMP_SIZE_ASSERT(JukeBox, 0x104)
|
|||||||
JukeBox::JukeBox()
|
JukeBox::JukeBox()
|
||||||
{
|
{
|
||||||
m_unk0x100 = 0;
|
m_unk0x100 = 0;
|
||||||
m_unk0xfc = 0;
|
m_state = NULL;
|
||||||
NotificationManager()->Register(this);
|
NotificationManager()->Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,42 +29,231 @@ MxBool JukeBox::VTable0x5c()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005d8d0
|
// FUNCTION: LEGO1 0x1005d830
|
||||||
|
JukeBox::~JukeBox()
|
||||||
|
{
|
||||||
|
if (InputManager()->GetWorld() == this) {
|
||||||
|
InputManager()->ClearWorld();
|
||||||
|
}
|
||||||
|
|
||||||
|
ControlManager()->Unregister(this);
|
||||||
|
TickleManager()->UnregisterClient(this);
|
||||||
|
NotificationManager()->Unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1005d8d0
|
||||||
MxResult JukeBox::Create(MxDSAction& p_dsAction)
|
MxResult JukeBox::Create(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
// TODO
|
MxResult ret = LegoWorld::Create(p_dsAction);
|
||||||
return SUCCESS;
|
if (ret == SUCCESS) {
|
||||||
|
InputManager()->SetWorld(this);
|
||||||
|
ControlManager()->Register(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
InputManager()->SetCamera(NULL);
|
||||||
|
|
||||||
|
m_state = (JukeBoxState*) GameState()->GetState("JukeBoxState");
|
||||||
|
if (!m_state) {
|
||||||
|
m_state = (JukeBoxState*) GameState()->CreateState("JukeBoxState");
|
||||||
|
m_state->SetState(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
GameState()->SetCurrentArea(LegoGameState::e_jukeboxw);
|
||||||
|
GameState()->StopArea(LegoGameState::e_previousArea);
|
||||||
|
TickleManager()->RegisterClient(this, 2000);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005d980
|
// FUNCTION: LEGO1 0x1005d980
|
||||||
MxLong JukeBox::Notify(MxParam& p_param)
|
MxLong JukeBox::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
MxLong result = 0;
|
||||||
return 0;
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
|
if (m_worldStarted) {
|
||||||
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
|
case c_notificationClick:
|
||||||
|
result = HandleClick((LegoControlManagerEvent&) p_param);
|
||||||
|
break;
|
||||||
|
case c_notificationTransitioned:
|
||||||
|
GameState()->SwitchArea(m_transitionDestination);
|
||||||
|
result = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005d9f0
|
// FUNCTION: LEGO1 0x1005d9f0
|
||||||
void JukeBox::ReadyWorld()
|
void JukeBox::ReadyWorld()
|
||||||
{
|
{
|
||||||
// TODO
|
MxStillPresenter* presenter = NULL;
|
||||||
|
|
||||||
|
switch (m_state->GetState()) {
|
||||||
|
case 1:
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Right_Bitmap");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Decal_Bitmap");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Wallis_Bitmap");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Nelson_Bitmap");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Torpedos_Bitmap");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (presenter) {
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_unk0x100 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005dde0
|
// FUNCTION: LEGO1 0x1005da70
|
||||||
|
MxBool JukeBox::HandleClick(LegoControlManagerEvent& p_param)
|
||||||
|
{
|
||||||
|
MxStillPresenter* presenter;
|
||||||
|
|
||||||
|
if (p_param.GetUnknown0x28() == 1) {
|
||||||
|
switch (p_param.GetClickedObjectId()) {
|
||||||
|
case c_dBackCtl:
|
||||||
|
switch (m_state->GetState()) {
|
||||||
|
case JukeBoxScript::e_mamaPapaBrickolini:
|
||||||
|
m_state->SetState(JukeBoxScript::e_residentialArea);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Torpedos_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_jailUnused:
|
||||||
|
m_state->SetState(JukeBoxScript::e_mamaPapaBrickolini);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Right_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_act2Cave:
|
||||||
|
m_state->SetState(JukeBoxScript::e_jailUnused);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Decal_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Right_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_bricksterChase:
|
||||||
|
m_state->SetState(JukeBoxScript::e_act2Cave);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Wallis_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Decal_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_brickHunt:
|
||||||
|
m_state->SetState(JukeBoxScript::e_bricksterChase);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Nelson_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Wallis_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_residentialArea:
|
||||||
|
m_state->SetState(JukeBoxScript::e_brickHunt);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Torpedos_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Nelson_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JukeBoxWorldScript::c_dFwdCtl:
|
||||||
|
switch (m_state->GetState()) {
|
||||||
|
case JukeBoxScript::e_mamaPapaBrickolini:
|
||||||
|
m_state->SetState(JukeBoxScript::e_jailUnused);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Right_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_jailUnused:
|
||||||
|
m_state->SetState(JukeBoxScript::e_act2Cave);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Right_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Decal_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_act2Cave:
|
||||||
|
m_state->SetState(JukeBoxScript::e_bricksterChase);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Decal_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Wallis_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_bricksterChase:
|
||||||
|
m_state->SetState(JukeBoxScript::e_brickHunt);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Wallis_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Nelson_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_brickHunt:
|
||||||
|
m_state->SetState(JukeBoxScript::e_residentialArea);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Nelson_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Torpedos_Bitmap");
|
||||||
|
presenter->Enable(TRUE);
|
||||||
|
break;
|
||||||
|
case JukeBoxScript::e_residentialArea:
|
||||||
|
m_state->SetState(JukeBoxScript::e_mamaPapaBrickolini);
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "Torpedos_Bitmap");
|
||||||
|
presenter->Enable(FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case JukeBoxWorldScript::c_noteCtl:
|
||||||
|
LegoGameState* gameState = GameState();
|
||||||
|
Act1State* act1State = (Act1State*) gameState->GetState("Act1State");
|
||||||
|
act1State->SetUnknown18(11);
|
||||||
|
m_transitionDestination = LegoGameState::Area::e_unk54;
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, 0, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1005dde0
|
||||||
void JukeBox::Enable(MxBool p_enable)
|
void JukeBox::Enable(MxBool p_enable)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoWorld::Enable(p_enable);
|
||||||
|
|
||||||
|
if (p_enable) {
|
||||||
|
InputManager()->SetWorld(this);
|
||||||
|
InputManager()->SetCamera(NULL);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (InputManager()->GetWorld() == this) {
|
||||||
|
InputManager()->ClearWorld();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005de30
|
// FUNCTION: LEGO1 0x1005de30
|
||||||
MxResult JukeBox::Tickle()
|
MxResult JukeBox::Tickle()
|
||||||
{
|
{
|
||||||
// TODO
|
if (m_worldStarted == FALSE) {
|
||||||
|
LegoWorld::Tickle();
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x100 == 1) {
|
||||||
|
m_unk0x100 = 0;
|
||||||
|
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005de70
|
// FUNCTION: LEGO1 0x1005de70
|
||||||
MxBool JukeBox::VTable0x64()
|
MxBool JukeBox::VTable0x64()
|
||||||
{
|
{
|
||||||
// TODO
|
m_transitionDestination = LegoGameState::e_infomain;
|
||||||
return FALSE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,8 +29,8 @@ MxLong JukeBoxEntity::Notify(MxParam& p_param)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentVehicle()->VTable0x60() != GameState()->GetUnknownC()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentVehicle()->VTable0xe4();
|
CurrentActor()->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
((Isle*) FindWorld(*g_isleScript, 0))->SetUnknown13c(0x35);
|
((Isle*) FindWorld(*g_isleScript, 0))->SetUnknown13c(0x35);
|
||||||
|
|||||||
@ -179,9 +179,9 @@ LegoNavController* NavController()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015790
|
// FUNCTION: LEGO1 0x10015790
|
||||||
IslePathActor* CurrentVehicle()
|
IslePathActor* CurrentActor()
|
||||||
{
|
{
|
||||||
return LegoOmni::GetInstance()->GetCurrentVehicle();
|
return LegoOmni::GetInstance()->GetCurrentActor();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100157a0
|
// FUNCTION: LEGO1 0x100157a0
|
||||||
@ -220,6 +220,12 @@ LegoTextureContainer* TextureContainer()
|
|||||||
return LegoOmni::GetInstance()->GetTextureContainer();
|
return LegoOmni::GetInstance()->GetTextureContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10015810
|
||||||
|
ViewLODListManager* GetViewLODListManager()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetViewLODListManager();
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015820
|
// FUNCTION: LEGO1 0x10015820
|
||||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
|
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
|
||||||
{
|
{
|
||||||
@ -242,6 +248,12 @@ void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10015880
|
||||||
|
void SetCurrentActor(IslePathActor* p_currentActor)
|
||||||
|
{
|
||||||
|
LegoOmni::GetInstance()->SetCurrentActor(p_currentActor);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100158c0
|
// FUNCTION: LEGO1 0x100158c0
|
||||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid)
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||||
{
|
{
|
||||||
@ -472,7 +484,7 @@ void LegoOmni::Init()
|
|||||||
m_worldList = NULL;
|
m_worldList = NULL;
|
||||||
m_currentWorld = NULL;
|
m_currentWorld = NULL;
|
||||||
m_exit = FALSE;
|
m_exit = FALSE;
|
||||||
m_currentVehicle = NULL;
|
m_currentActor = NULL;
|
||||||
m_saveDataWriter = NULL;
|
m_saveDataWriter = NULL;
|
||||||
m_plantManager = NULL;
|
m_plantManager = NULL;
|
||||||
m_gameState = NULL;
|
m_gameState = NULL;
|
||||||
|
|||||||
@ -108,7 +108,7 @@ MxLong Police::HandleClick(LegoControlManagerEvent& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BackgroundAudioManager()->Stop();
|
BackgroundAudioManager()->Stop();
|
||||||
m_transitionDestination = LegoGameState::Area::e_unk35;
|
m_transitionDestination = LegoGameState::Area::e_polidoor;
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||||
break;
|
break;
|
||||||
case c_infoCtl:
|
case c_infoCtl:
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void PoliceState::FUN_1005ea40()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (CurrentVehicle()->VTable0x60()) {
|
switch (CurrentActor()->GetActorId()) {
|
||||||
case 4:
|
case 4:
|
||||||
policeScript = Police::PoliceScript::c_lauraAnim;
|
policeScript = Police::PoliceScript::c_lauraAnim;
|
||||||
m_policeScript = policeScript;
|
m_policeScript = policeScript;
|
||||||
|
|||||||
@ -28,47 +28,47 @@ MxResult TowTrackMissionState::VTable0x1c(LegoFile* p_legoFile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p_legoFile->IsReadMode()) {
|
if (p_legoFile->IsReadMode()) {
|
||||||
p_legoFile->Read(&m_unk0x12, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x12, sizeof(m_unk0x12));
|
||||||
p_legoFile->Read(&m_unk0x14, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x14, sizeof(m_unk0x14));
|
||||||
p_legoFile->Read(&m_unk0x16, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x16, sizeof(m_unk0x16));
|
||||||
p_legoFile->Read(&m_unk0x18, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x18, sizeof(m_unk0x18));
|
||||||
p_legoFile->Read(&m_unk0x1a, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x1a, sizeof(m_unk0x1a));
|
||||||
p_legoFile->Read(&m_unk0x1c, sizeof(MxU16));
|
p_legoFile->Read(&m_unk0x1c, sizeof(m_unk0x1c));
|
||||||
p_legoFile->Read(&m_color1, sizeof(MxU16));
|
p_legoFile->Read(&m_color1, sizeof(m_color1));
|
||||||
p_legoFile->Read(&m_color2, sizeof(MxU16));
|
p_legoFile->Read(&m_color2, sizeof(m_color2));
|
||||||
p_legoFile->Read(&m_color3, sizeof(MxU16));
|
p_legoFile->Read(&m_color3, sizeof(m_color3));
|
||||||
p_legoFile->Read(&m_color4, sizeof(MxU16));
|
p_legoFile->Read(&m_color4, sizeof(m_color4));
|
||||||
}
|
}
|
||||||
else if (p_legoFile->IsWriteMode()) {
|
else if (p_legoFile->IsWriteMode()) {
|
||||||
MxU16 write = m_unk0x12;
|
MxU16 write = m_unk0x12;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_unk0x14;
|
write = m_unk0x14;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_unk0x16;
|
write = m_unk0x16;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_unk0x18;
|
write = m_unk0x18;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_unk0x1a;
|
write = m_unk0x1a;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_unk0x1c;
|
write = m_unk0x1c;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_color1;
|
write = m_color1;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_color2;
|
write = m_color2;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_color3;
|
write = m_color3;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
|
|
||||||
write = m_color4;
|
write = m_color4;
|
||||||
p_legoFile->Write(&write, sizeof(MxU16));
|
p_legoFile->Write(&write, sizeof(m_unk0x12));
|
||||||
}
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
|
|||||||
@ -67,3 +67,10 @@ void LegoAnimMMPresenter::ParseExtra()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1004b8b0
|
||||||
|
MxBool LegoAnimMMPresenter::FUN_1004b8b0()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
#include "legoanimpresenter.h"
|
#include "legoanimpresenter.h"
|
||||||
|
|
||||||
|
#include "legoanimmmpresenter.h"
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
|
#include "legounksavedatawriter.h"
|
||||||
|
#include "legovideomanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
#include "mxcompositepresenter.h"
|
#include "mxcompositepresenter.h"
|
||||||
#include "mxdsanim.h"
|
#include "mxdsanim.h"
|
||||||
#include "mxstreamchunk.h"
|
#include "mxstreamchunk.h"
|
||||||
|
#include "mxtimer.h"
|
||||||
#include "mxvideomanager.h"
|
#include "mxvideomanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(LegoAnimPresenter, 0xc0)
|
DECOMP_SIZE_ASSERT(LegoAnimPresenter, 0xc0)
|
||||||
@ -25,11 +29,11 @@ LegoAnimPresenter::~LegoAnimPresenter()
|
|||||||
void LegoAnimPresenter::Init()
|
void LegoAnimPresenter::Init()
|
||||||
{
|
{
|
||||||
m_anim = NULL;
|
m_anim = NULL;
|
||||||
m_unk0x68 = 0;
|
m_unk0x68 = NULL;
|
||||||
m_unk0x6c = 0;
|
m_unk0x6c = 0;
|
||||||
m_unk0x74 = 0;
|
m_unk0x74 = NULL;
|
||||||
m_unk0x70 = 0;
|
m_unk0x70 = NULL;
|
||||||
m_unk0x78 = 0;
|
m_unk0x78 = NULL;
|
||||||
m_unk0x7c = 0;
|
m_unk0x7c = 0;
|
||||||
m_unk0xa8.Clear();
|
m_unk0xa8.Clear();
|
||||||
m_unk0xa4 = 0;
|
m_unk0xa4 = 0;
|
||||||
@ -42,7 +46,7 @@ void LegoAnimPresenter::Init()
|
|||||||
m_unk0x8c = 0;
|
m_unk0x8c = 0;
|
||||||
m_unk0x90 = 0;
|
m_unk0x90 = 0;
|
||||||
m_unk0x94 = 0;
|
m_unk0x94 = 0;
|
||||||
m_unk0x96 = 1;
|
m_unk0x96 = TRUE;
|
||||||
m_unk0xa0 = 0;
|
m_unk0xa0 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +58,7 @@ void LegoAnimPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10068fb0
|
// FUNCTION: LEGO1 0x10068fb0
|
||||||
MxResult LegoAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
MxResult LegoAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
||||||
{
|
{
|
||||||
MxResult result = FAILURE;
|
MxResult result = FAILURE;
|
||||||
LegoMemory storage(p_chunk->GetData());
|
LegoMemory storage(p_chunk->GetData());
|
||||||
@ -104,6 +108,227 @@ MxResult LegoAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10069150
|
||||||
|
LegoChar* LegoAnimPresenter::FUN_10069150(const LegoChar* p_und1)
|
||||||
|
{
|
||||||
|
LegoChar* str;
|
||||||
|
|
||||||
|
if (LegoUnkSaveDataWriter::FUN_10084c00(p_und1 + 1)) {
|
||||||
|
str = new LegoChar[strlen(p_und1)];
|
||||||
|
|
||||||
|
if (str != NULL) {
|
||||||
|
strcpy(str, p_und1 + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LegoChar buffer[32];
|
||||||
|
sprintf(buffer, "%d", m_action->GetUnknown24());
|
||||||
|
str = new LegoChar[strlen(p_und1) + strlen(buffer) + strlen(GetActionObjectName()) + 1];
|
||||||
|
|
||||||
|
if (str != NULL) {
|
||||||
|
strcpy(str, p_und1);
|
||||||
|
strcat(str, buffer);
|
||||||
|
strcat(str, GetActionObjectName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100692b0
|
||||||
|
void LegoAnimPresenter::FUN_100692b0()
|
||||||
|
{
|
||||||
|
m_unk0x74 = new LegoROIList();
|
||||||
|
|
||||||
|
if (m_unk0x74) {
|
||||||
|
LegoU32 numActors = m_anim->GetNumActors();
|
||||||
|
|
||||||
|
for (LegoU32 i = 0; i < numActors; i++) {
|
||||||
|
LegoChar* str = FUN_100697c0(m_anim->GetActorName(i), NULL);
|
||||||
|
undefined4 unk0x04 = m_anim->GetActorUnknown0x04(i);
|
||||||
|
LegoROI* roi = NULL;
|
||||||
|
|
||||||
|
if (unk0x04 == 2) {
|
||||||
|
LegoChar* src;
|
||||||
|
if (str[0] == '*') {
|
||||||
|
src = str + 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
src = str;
|
||||||
|
}
|
||||||
|
|
||||||
|
roi = UnkSaveDataWriter()->FUN_10083500(src, TRUE);
|
||||||
|
|
||||||
|
if (roi != NULL && str[0] == '*') {
|
||||||
|
roi->SetUnknown0x0c(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (unk0x04 == 4) {
|
||||||
|
LegoChar* src = new LegoChar[strlen(str)];
|
||||||
|
strcpy(src, str + 1);
|
||||||
|
strlwr(src);
|
||||||
|
|
||||||
|
LegoChar* und = FUN_10069150(str);
|
||||||
|
roi = UnkSaveDataWriter()->FUN_10085a80(und, src, 1);
|
||||||
|
|
||||||
|
if (roi != NULL) {
|
||||||
|
roi->SetUnknown0x0c(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] src;
|
||||||
|
delete[] und;
|
||||||
|
}
|
||||||
|
else if (unk0x04 == 3) {
|
||||||
|
LegoChar* src = new LegoChar[strlen(str)];
|
||||||
|
strcpy(src, str + 1);
|
||||||
|
|
||||||
|
for (LegoChar* i = &src[strlen(src) - 1]; i > src; i--) {
|
||||||
|
if ((*i < '0' || *i > '9') && *i != '_') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*i = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
strlwr(src);
|
||||||
|
|
||||||
|
LegoChar* und = FUN_10069150(str);
|
||||||
|
roi = UnkSaveDataWriter()->FUN_10085210(und, src, 1);
|
||||||
|
|
||||||
|
if (roi != NULL) {
|
||||||
|
roi->SetUnknown0x0c(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] src;
|
||||||
|
delete[] und;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (roi != NULL) {
|
||||||
|
m_unk0x74->Append(roi);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100695c0
|
||||||
|
void LegoAnimPresenter::FUN_100695c0()
|
||||||
|
{
|
||||||
|
m_unk0x70 = new LegoROIList();
|
||||||
|
|
||||||
|
if (m_unk0x70) {
|
||||||
|
CompoundObject& unk0x08 = VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->GetUnknown0x08();
|
||||||
|
LegoU32 numActors = m_anim->GetNumActors();
|
||||||
|
|
||||||
|
for (LegoU32 i = 0; i < numActors; i++) {
|
||||||
|
if (FUN_100698b0(unk0x08, m_anim->GetActorName(i)) == FALSE) {
|
||||||
|
undefined4 unk0x04 = m_anim->GetActorUnknown0x04(i);
|
||||||
|
|
||||||
|
if (unk0x04 == 5 || unk0x04 == 6) {
|
||||||
|
LegoChar dest[256];
|
||||||
|
const LegoChar* str = m_anim->GetActorName(i);
|
||||||
|
|
||||||
|
LegoU32 len = strlen(str);
|
||||||
|
strcpy(dest, str);
|
||||||
|
|
||||||
|
for (LegoChar* i = &dest[len - 1]; isdigit(*i) || *i == '_'; i--) {
|
||||||
|
*i = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
strlwr(dest);
|
||||||
|
|
||||||
|
UnkSaveDataWriter()->FUN_10085210(str, dest, 0);
|
||||||
|
FUN_100698b0(unk0x08, str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100697c0
|
||||||
|
LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2)
|
||||||
|
{
|
||||||
|
const LegoChar* str = p_und1;
|
||||||
|
const char* var = VariableTable()->GetVariable(p_und1);
|
||||||
|
|
||||||
|
if (*var) {
|
||||||
|
str = var;
|
||||||
|
}
|
||||||
|
|
||||||
|
LegoU32 len = strlen(str) + (p_und2 ? strlen(p_und2) : 0) + 2;
|
||||||
|
LegoChar* result = new LegoChar[len];
|
||||||
|
|
||||||
|
if (result != NULL) {
|
||||||
|
*result = '\0';
|
||||||
|
|
||||||
|
if (p_und2) {
|
||||||
|
strcpy(result, p_und2);
|
||||||
|
strcat(result, ":");
|
||||||
|
}
|
||||||
|
|
||||||
|
strcat(result, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100698b0
|
||||||
|
LegoBool LegoAnimPresenter::FUN_100698b0(const CompoundObject& p_und1, const LegoChar* p_und2)
|
||||||
|
{
|
||||||
|
LegoBool result = FALSE;
|
||||||
|
|
||||||
|
LegoChar* str;
|
||||||
|
if (*(str = FUN_100697c0(p_und2, NULL)) == '*') {
|
||||||
|
LegoChar* tmp = FUN_10069150(str);
|
||||||
|
delete[] str;
|
||||||
|
str = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str != NULL && *str != '\0' && p_und1.size() > 0) {
|
||||||
|
for (CompoundObject::const_iterator it = p_und1.begin(); it != p_und1.end(); it++) {
|
||||||
|
LegoROI* roi = (LegoROI*) *it;
|
||||||
|
const char* name = roi->GetName();
|
||||||
|
|
||||||
|
if (name != NULL) {
|
||||||
|
if (!strcmpi(name, str)) {
|
||||||
|
m_unk0x70->Append(roi);
|
||||||
|
result = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] str;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10069b10
|
||||||
|
void LegoAnimPresenter::FUN_10069b10()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1006aba0
|
||||||
|
LegoBool LegoAnimPresenter::FUN_1006aba0()
|
||||||
|
{
|
||||||
|
return FUN_1006abb0(m_anim->GetRoot(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006abb0
|
||||||
|
LegoBool LegoAnimPresenter::FUN_1006abb0(LegoTreeNode*, undefined4)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006ac90
|
||||||
|
void LegoAnimPresenter::FUN_1006ac90()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1006ad30
|
// STUB: LEGO1 0x1006ad30
|
||||||
void LegoAnimPresenter::PutFrame()
|
void LegoAnimPresenter::PutFrame()
|
||||||
{
|
{
|
||||||
@ -120,7 +345,7 @@ void LegoAnimPresenter::ReadyTickle()
|
|||||||
|
|
||||||
if (chunk && chunk->GetTime() + m_action->GetStartTime() <= m_action->GetElapsedTime()) {
|
if (chunk && chunk->GetTime() + m_action->GetStartTime() <= m_action->GetElapsedTime()) {
|
||||||
chunk = m_subscriber->PopData();
|
chunk = m_subscriber->PopData();
|
||||||
MxResult result = VTable0x88(chunk);
|
MxResult result = CreateAnim(chunk);
|
||||||
m_subscriber->FreeDataChunk(chunk);
|
m_subscriber->FreeDataChunk(chunk);
|
||||||
|
|
||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
@ -134,12 +359,57 @@ void LegoAnimPresenter::ReadyTickle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1006b5e0
|
// FUNCTION: LEGO1 0x1006b5e0
|
||||||
void LegoAnimPresenter::StartingTickle()
|
void LegoAnimPresenter::StartingTickle()
|
||||||
{
|
{
|
||||||
// TODO
|
FUN_1006ac90();
|
||||||
ProgressTickleState(e_streaming);
|
FUN_100692b0();
|
||||||
EndAction(); // Allow game to start
|
FUN_100695c0();
|
||||||
|
|
||||||
|
if ((m_unk0x7c & c_bit2) == 0 || FUN_1006aba0()) {
|
||||||
|
FUN_10069b10();
|
||||||
|
FUN_1006c8a0(TRUE);
|
||||||
|
|
||||||
|
if (m_unk0x78 == NULL) {
|
||||||
|
if (fabs(m_action->GetDirection().GetX()) >= 0.00000047683716F ||
|
||||||
|
fabs(m_action->GetDirection().GetY()) >= 0.00000047683716F ||
|
||||||
|
fabs(m_action->GetDirection().GetZ()) >= 0.00000047683716F) {
|
||||||
|
m_unk0x78 = new MxMatrix();
|
||||||
|
CalcLocalTransform(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), *m_unk0x78);
|
||||||
|
}
|
||||||
|
else if (m_unk0x68) {
|
||||||
|
MxU8* und = (MxU8*) m_unk0x68[1];
|
||||||
|
|
||||||
|
if (und) {
|
||||||
|
MxMatrix mat;
|
||||||
|
mat = *(Matrix4*) (und + 0x10);
|
||||||
|
m_unk0x78 = new MxMatrix(mat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_action->GetDuration() == -1 || ((MxDSMediaAction*) m_action)->GetSustainTime() == -1) &&
|
||||||
|
m_compositePresenter) {
|
||||||
|
m_compositePresenter->VTable0x60(this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_action->SetUnknown90(Timer()->GetTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
ProgressTickleState(e_streaming);
|
||||||
|
|
||||||
|
if (m_compositePresenter && m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||||
|
m_unk0x96 = ((LegoAnimMMPresenter*) m_compositePresenter)->FUN_1004b8b0();
|
||||||
|
m_compositePresenter->VTable0x60(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
VTable0x8c();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x70 != NULL) {
|
||||||
|
delete m_unk0x70;
|
||||||
|
m_unk0x70 = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006b840
|
// FUNCTION: LEGO1 0x1006b840
|
||||||
@ -165,10 +435,10 @@ void LegoAnimPresenter::StreamingTickle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1006b8c0
|
// FUNCTION: LEGO1 0x1006b8c0
|
||||||
void LegoAnimPresenter::DoneTickle()
|
void LegoAnimPresenter::DoneTickle()
|
||||||
{
|
{
|
||||||
// TODO
|
MxVideoPresenter::DoneTickle();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006b8d0
|
// FUNCTION: LEGO1 0x1006b8d0
|
||||||
@ -195,6 +465,12 @@ void LegoAnimPresenter::ParseExtra()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006c570
|
||||||
|
void LegoAnimPresenter::VTable0xa0()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006c620
|
// FUNCTION: LEGO1 0x1006c620
|
||||||
MxResult LegoAnimPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
|
MxResult LegoAnimPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
|
||||||
{
|
{
|
||||||
@ -209,3 +485,33 @@ void LegoAnimPresenter::EndAction()
|
|||||||
// TODO
|
// TODO
|
||||||
MxVideoPresenter::EndAction();
|
MxVideoPresenter::EndAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006c7d0
|
||||||
|
void LegoAnimPresenter::VTable0x8c()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006c860
|
||||||
|
void LegoAnimPresenter::VTable0x90()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006c8a0
|
||||||
|
void LegoAnimPresenter::FUN_1006c8a0(LegoBool)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006c8f0
|
||||||
|
void LegoAnimPresenter::VTable0x94()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006ca50
|
||||||
|
void LegoAnimPresenter::VTable0x98()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|||||||
@ -8,6 +8,18 @@ LegoHideAnimPresenter::LegoHideAnimPresenter()
|
|||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006d860
|
||||||
|
void LegoHideAnimPresenter::VTable0x8c()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1006d870
|
||||||
|
void LegoHideAnimPresenter::VTable0x90()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006d9f0
|
// FUNCTION: LEGO1 0x1006d9f0
|
||||||
LegoHideAnimPresenter::~LegoHideAnimPresenter()
|
LegoHideAnimPresenter::~LegoHideAnimPresenter()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void LegoLocomotionAnimPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
delete m_unk0xc8;
|
delete m_unk0xc8;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_unk0x68 = 0;
|
m_unk0x68 = NULL;
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
@ -52,9 +52,9 @@ void LegoLocomotionAnimPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006d140
|
// FUNCTION: LEGO1 0x1006d140
|
||||||
MxResult LegoLocomotionAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
MxResult LegoLocomotionAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
||||||
{
|
{
|
||||||
MxResult result = LegoAnimPresenter::VTable0x88(p_chunk);
|
MxResult result = LegoAnimPresenter::CreateAnim(p_chunk);
|
||||||
return result == SUCCESS ? SUCCESS : result;
|
return result == SUCCESS ? SUCCESS : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "legomodelpresenter.h"
|
#include "legomodelpresenter.h"
|
||||||
|
|
||||||
|
#include "anim/legoanim.h"
|
||||||
#include "define.h"
|
#include "define.h"
|
||||||
#include "legoentity.h"
|
#include "legoentity.h"
|
||||||
#include "legoentitypresenter.h"
|
#include "legoentitypresenter.h"
|
||||||
@ -7,6 +8,9 @@
|
|||||||
#include "legounksavedatawriter.h"
|
#include "legounksavedatawriter.h"
|
||||||
#include "legovideomanager.h"
|
#include "legovideomanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
#include "misc/legocontainer.h"
|
||||||
|
#include "misc/legotexture.h"
|
||||||
|
#include "misc/version.h"
|
||||||
#include "mxcompositepresenter.h"
|
#include "mxcompositepresenter.h"
|
||||||
#include "mxutil.h"
|
#include "mxutil.h"
|
||||||
#include "roi/legoroi.h"
|
#include "roi/legoroi.h"
|
||||||
@ -47,11 +51,155 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1007f6b0
|
// FUNCTION: LEGO1 0x1007f6b0
|
||||||
MxResult LegoModelPresenter::CreateROI(MxStreamChunk* p_chunk)
|
MxResult LegoModelPresenter::CreateROI(MxStreamChunk* p_chunk)
|
||||||
{
|
{
|
||||||
// TODO
|
MxResult result = FAILURE;
|
||||||
return FAILURE;
|
LegoU32 numROIs;
|
||||||
|
Mx3DPointFloat vect;
|
||||||
|
LegoMemory storage(p_chunk->GetData());
|
||||||
|
LegoAnim anim;
|
||||||
|
LegoU32 version, textureInfoOffset, i, numTextures, skipTextures;
|
||||||
|
MxMatrix mat;
|
||||||
|
LegoChar* textureName = NULL;
|
||||||
|
LegoTexture* texture = NULL;
|
||||||
|
LegoS32 hardwareMode = VideoManager()->GetDirect3D()->AssignedDevice()->GetHardwareMode();
|
||||||
|
|
||||||
|
if (m_roi) {
|
||||||
|
delete m_roi;
|
||||||
|
}
|
||||||
|
if (!(m_roi = new LegoROI(VideoManager()->GetRenderer()))) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (storage.Read(&version, sizeof(version)) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (version != MODEL_VERSION) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (storage.Read(&textureInfoOffset, sizeof(textureInfoOffset)) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
storage.SetPosition(textureInfoOffset);
|
||||||
|
|
||||||
|
if (storage.Read(&numTextures, sizeof(numTextures)) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (storage.Read(&skipTextures, sizeof(skipTextures)) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < numTextures; i++) {
|
||||||
|
LegoU32 textureNameLength;
|
||||||
|
|
||||||
|
storage.Read(&textureNameLength, sizeof(textureNameLength));
|
||||||
|
textureName = new LegoChar[textureNameLength + 1];
|
||||||
|
storage.Read(textureName, textureNameLength);
|
||||||
|
textureName[textureNameLength] = '\0';
|
||||||
|
|
||||||
|
strlwr(textureName);
|
||||||
|
|
||||||
|
if (textureName[0] == '^') {
|
||||||
|
strcpy(textureName, textureName + 1);
|
||||||
|
|
||||||
|
if (g_modelPresenterConfig) {
|
||||||
|
texture = new LegoTexture();
|
||||||
|
if (texture->Read(&storage, hardwareMode) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
LegoTexture* discardTexture = new LegoTexture();
|
||||||
|
if (discardTexture->Read(&storage, FALSE) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
delete discardTexture;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LegoTexture* discardTexture = new LegoTexture();
|
||||||
|
if (discardTexture->Read(&storage, FALSE) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
delete discardTexture;
|
||||||
|
|
||||||
|
texture = new LegoTexture();
|
||||||
|
if (texture->Read(&storage, hardwareMode) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
texture = new LegoTexture();
|
||||||
|
if (texture->Read(&storage, hardwareMode) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!skipTextures) {
|
||||||
|
if (TextureContainer()->Get(textureName) == NULL) {
|
||||||
|
LegoTextureInfo* textureInfo = LegoTextureInfo::Create(textureName, texture);
|
||||||
|
|
||||||
|
if (textureInfo == NULL) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
TextureContainer()->Add(textureName, textureInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] textureName;
|
||||||
|
textureName = NULL;
|
||||||
|
delete texture;
|
||||||
|
texture = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
storage.SetPosition(8);
|
||||||
|
|
||||||
|
if (storage.Read(&numROIs, sizeof(numROIs)) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (anim.Read(&storage, FALSE) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (m_roi->Read(NULL, VideoManager()->GetRenderer(), GetViewLODListManager(), TextureContainer(), &storage) !=
|
||||||
|
SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (m_roi->SetFrame(&anim, 0) != SUCCESS) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get scripted location, direction and up vectors
|
||||||
|
|
||||||
|
CalcLocalTransform(
|
||||||
|
Mx3DPointFloat(m_action->GetLocation().GetX(), m_action->GetLocation().GetY(), m_action->GetLocation().GetZ()),
|
||||||
|
Mx3DPointFloat(
|
||||||
|
m_action->GetDirection().GetX(),
|
||||||
|
m_action->GetDirection().GetY(),
|
||||||
|
m_action->GetDirection().GetZ()
|
||||||
|
),
|
||||||
|
Mx3DPointFloat(m_action->GetUp().GetX(), m_action->GetUp().GetY(), m_action->GetUp().GetZ()),
|
||||||
|
mat
|
||||||
|
);
|
||||||
|
m_roi->FUN_100a46b0(mat);
|
||||||
|
|
||||||
|
result = SUCCESS;
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (textureName != NULL) {
|
||||||
|
delete[] textureName;
|
||||||
|
}
|
||||||
|
if (texture != NULL) {
|
||||||
|
delete texture;
|
||||||
|
}
|
||||||
|
if (result != SUCCESS) {
|
||||||
|
if (m_roi) {
|
||||||
|
delete m_roi;
|
||||||
|
m_roi = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10080050
|
// FUNCTION: LEGO1 0x10080050
|
||||||
@ -66,7 +214,7 @@ void LegoModelPresenter::ReadyTickle()
|
|||||||
|
|
||||||
if (m_roi != NULL) {
|
if (m_roi != NULL) {
|
||||||
if (m_compositePresenter && m_compositePresenter->IsA("LegoEntityPresenter")) {
|
if (m_compositePresenter && m_compositePresenter->IsA("LegoEntityPresenter")) {
|
||||||
((LegoEntityPresenter*) m_compositePresenter)->GetEntity()->SetROI((LegoROI*) m_roi, m_addedToView, TRUE);
|
((LegoEntityPresenter*) m_compositePresenter)->GetEntity()->SetROI(m_roi, m_addedToView, TRUE);
|
||||||
((LegoEntityPresenter*) m_compositePresenter)
|
((LegoEntityPresenter*) m_compositePresenter)
|
||||||
->GetEntity()
|
->GetEntity()
|
||||||
->SetFlags(
|
->SetFlags(
|
||||||
@ -92,7 +240,7 @@ void LegoModelPresenter::ReadyTickle()
|
|||||||
VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_roi);
|
VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_roi);
|
||||||
|
|
||||||
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter")) {
|
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter")) {
|
||||||
((LegoEntityPresenter*) m_compositePresenter)->GetEntity()->SetROI((LegoROI*) m_roi, TRUE, TRUE);
|
((LegoEntityPresenter*) m_compositePresenter)->GetEntity()->SetROI(m_roi, TRUE, TRUE);
|
||||||
((LegoEntityPresenter*) m_compositePresenter)
|
((LegoEntityPresenter*) m_compositePresenter)
|
||||||
->GetEntity()
|
->GetEntity()
|
||||||
->SetFlags(
|
->SetFlags(
|
||||||
|
|||||||
@ -94,3 +94,11 @@ double Lego3DManager::Render(double p_und)
|
|||||||
|
|
||||||
return m_pLego3DView->Render(p_und);
|
return m_pLego3DView->Render(p_und);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100ab4d0
|
||||||
|
int Lego3DManager::SetFrustrum(float p_fov, float p_front, float p_back)
|
||||||
|
{
|
||||||
|
m_pLego3DView->GetView()->SetFrustrum(p_front, p_back, p_fov);
|
||||||
|
m_pLego3DView->GetViewManager()->SetFrustrum(p_fov, p_front, p_back);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -51,6 +51,8 @@ class Lego3DManager {
|
|||||||
|
|
||||||
double Render(double p_und);
|
double Render(double p_und);
|
||||||
|
|
||||||
|
int SetFrustrum(float p_fov, float p_front, float p_back);
|
||||||
|
|
||||||
Tgl::Renderer* GetRenderer();
|
Tgl::Renderer* GetRenderer();
|
||||||
Tgl::Group* GetScene();
|
Tgl::Group* GetScene();
|
||||||
Lego3DView* GetLego3DView();
|
Lego3DView* GetLego3DView();
|
||||||
|
|||||||
@ -504,6 +504,26 @@ LegoResult LegoAnim::Write(LegoStorage* p_storage)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a0f20
|
||||||
|
const LegoChar* LegoAnim::GetActorName(LegoU32 p_index)
|
||||||
|
{
|
||||||
|
if (p_index < m_numActors) {
|
||||||
|
return m_actors[p_index].m_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a0f40
|
||||||
|
undefined4 LegoAnim::GetActorUnknown0x04(LegoU32 p_index)
|
||||||
|
{
|
||||||
|
if (p_index < m_numActors) {
|
||||||
|
return m_actors[p_index].m_unk0x04;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a0f60
|
// FUNCTION: LEGO1 0x100a0f60
|
||||||
LegoMorphKey::LegoMorphKey()
|
LegoMorphKey::LegoMorphKey()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -139,9 +139,13 @@ class LegoAnim : public LegoTree {
|
|||||||
LegoAnim();
|
LegoAnim();
|
||||||
~LegoAnim() override;
|
~LegoAnim() override;
|
||||||
LegoTime GetDuration() { return m_duration; }
|
LegoTime GetDuration() { return m_duration; }
|
||||||
|
LegoU32 GetNumActors() { return m_numActors; }
|
||||||
LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08
|
LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08
|
||||||
virtual LegoResult Read(LegoStorage* p_storage, LegoS32 p_parseScene); // vtable+0x10
|
virtual LegoResult Read(LegoStorage* p_storage, LegoS32 p_parseScene); // vtable+0x10
|
||||||
|
|
||||||
|
const LegoChar* GetActorName(LegoU32 p_index);
|
||||||
|
undefined4 GetActorUnknown0x04(LegoU32 p_index);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a0ba0
|
// SYNTHETIC: LEGO1 0x100a0ba0
|
||||||
// LegoAnim::`scalar deleting destructor'
|
// LegoAnim::`scalar deleting destructor'
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ LegoTextureContainer::~LegoTextureContainer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100998e0
|
// FUNCTION: LEGO1 0x100998e0
|
||||||
LegoTextureInfo* LegoTextureContainer::Insert(LegoTextureInfo* p_textureInfo)
|
LegoTextureInfo* LegoTextureContainer::AddToList(LegoTextureInfo* p_textureInfo)
|
||||||
{
|
{
|
||||||
DDSURFACEDESC desc, newDesc;
|
DDSURFACEDESC desc, newDesc;
|
||||||
DWORD width, height;
|
DWORD width, height;
|
||||||
@ -110,7 +110,7 @@ LegoTextureInfo* LegoTextureContainer::Insert(LegoTextureInfo* p_textureInfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10099cc0
|
// FUNCTION: LEGO1 0x10099cc0
|
||||||
void LegoTextureContainer::Erase(LegoTextureInfo* p_textureInfo)
|
void LegoTextureContainer::EraseFromList(LegoTextureInfo* p_textureInfo)
|
||||||
{
|
{
|
||||||
if (p_textureInfo == NULL) {
|
if (p_textureInfo == NULL) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -13,7 +13,10 @@
|
|||||||
#pragma warning(disable : 4237)
|
#pragma warning(disable : 4237)
|
||||||
|
|
||||||
struct LegoContainerInfoComparator {
|
struct LegoContainerInfoComparator {
|
||||||
bool operator()(const char* const& p_key0, const char* const& p_key1) const { return strcmp(p_key0, p_key1) > 0; }
|
LegoBool operator()(const char* const& p_key0, const char* const& p_key1) const
|
||||||
|
{
|
||||||
|
return strcmp(p_key0, p_key1) > 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
@ -44,16 +47,45 @@ class LegoContainer {
|
|||||||
|
|
||||||
inline T* Get(const char* p_name)
|
inline T* Get(const char* p_name)
|
||||||
{
|
{
|
||||||
|
// TODO: Score::Paint matches better with no `value` on the stack,
|
||||||
|
// while LegoModelPresenter::CreateROI only matches with `value`
|
||||||
|
T* value = NULL;
|
||||||
|
|
||||||
#ifdef COMPAT_MODE
|
#ifdef COMPAT_MODE
|
||||||
typename LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
typename LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
||||||
#else
|
#else
|
||||||
LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (it != m_map.end()) {
|
if (it != m_map.end()) {
|
||||||
return (*it).second;
|
value = (*it).second;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Add(const char* p_name, T* p_value)
|
||||||
|
{
|
||||||
|
#ifdef COMPAT_MODE
|
||||||
|
typename LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
||||||
|
#else
|
||||||
|
LegoContainerInfo<T>::iterator it = m_map.find(p_name);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char* name;
|
||||||
|
if (it != m_map.end()) {
|
||||||
|
name = const_cast<char*>((*it).first);
|
||||||
|
|
||||||
|
if (m_ownership) {
|
||||||
|
delete (*it).second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
name = new char[strlen(p_name) + 1];
|
||||||
|
strcpy(name, p_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_map[name] = p_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void SetOwnership(LegoBool p_ownership) { m_ownership = p_ownership; }
|
inline void SetOwnership(LegoBool p_ownership) { m_ownership = p_ownership; }
|
||||||
@ -76,8 +108,8 @@ class LegoTextureContainer : public LegoContainer<LegoTextureInfo> {
|
|||||||
LegoTextureContainer() { m_ownership = TRUE; }
|
LegoTextureContainer() { m_ownership = TRUE; }
|
||||||
~LegoTextureContainer() override;
|
~LegoTextureContainer() override;
|
||||||
|
|
||||||
LegoTextureInfo* Insert(LegoTextureInfo* p_textureInfo);
|
LegoTextureInfo* AddToList(LegoTextureInfo* p_textureInfo);
|
||||||
void Erase(LegoTextureInfo* p_textureInfo);
|
void EraseFromList(LegoTextureInfo* p_textureInfo);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LegoTextureList m_list; // 0x18
|
LegoTextureList m_list; // 0x18
|
||||||
@ -90,6 +122,9 @@ class LegoTextureContainer : public LegoContainer<LegoTextureInfo> {
|
|||||||
// TEMPLATE: LEGO1 0x10001cc0
|
// TEMPLATE: LEGO1 0x10001cc0
|
||||||
// _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Lbound
|
// _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Lbound
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1004f960
|
||||||
|
// _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::iterator::_Dec
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1004f9b0
|
// TEMPLATE: LEGO1 0x1004f9b0
|
||||||
// _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Insert
|
// _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Insert
|
||||||
|
|
||||||
|
|||||||
@ -126,17 +126,3 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode)
|
|||||||
}
|
}
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100994a0
|
|
||||||
LegoResult LegoMemory::GetPosition(LegoU32& p_position)
|
|
||||||
{
|
|
||||||
p_position = m_position;
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100994b0
|
|
||||||
LegoResult LegoMemory::SetPosition(LegoU32 p_position)
|
|
||||||
{
|
|
||||||
m_position = p_position;
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -20,18 +20,18 @@ class LegoStorage {
|
|||||||
LegoStorage() : m_mode(0) {}
|
LegoStorage() : m_mode(0) {}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10045ad0
|
// FUNCTION: LEGO1 0x10045ad0
|
||||||
virtual ~LegoStorage(){};
|
virtual ~LegoStorage() {}
|
||||||
|
|
||||||
virtual LegoResult Read(void* p_buffer, LegoU32 p_size) = 0;
|
virtual LegoResult Read(void* p_buffer, LegoU32 p_size) = 0; // vtable+0x04
|
||||||
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size) = 0;
|
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size) = 0; // vtable+0x08
|
||||||
virtual LegoResult GetPosition(LegoU32& p_position) = 0;
|
virtual LegoResult GetPosition(LegoU32& p_position) = 0; // vtable+0x0c
|
||||||
virtual LegoResult SetPosition(LegoU32 p_position) = 0;
|
virtual LegoResult SetPosition(LegoU32 p_position) = 0; // vtable+0x10
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10045ae0
|
// FUNCTION: LEGO1 0x10045ae0
|
||||||
virtual LegoBool IsWriteMode() { return m_mode == c_write; }
|
virtual LegoBool IsWriteMode() { return m_mode == c_write; } // vtable+0x14
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10045af0
|
// FUNCTION: LEGO1 0x10045af0
|
||||||
virtual LegoBool IsReadMode() { return m_mode == c_read; }
|
virtual LegoBool IsReadMode() { return m_mode == c_read; } // vtable+0x18
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10045b00
|
// SYNTHETIC: LEGO1 0x10045b00
|
||||||
// LegoStorage::`scalar deleting destructor'
|
// LegoStorage::`scalar deleting destructor'
|
||||||
@ -40,15 +40,39 @@ class LegoStorage {
|
|||||||
LegoU8 m_mode; // 0x04
|
LegoU8 m_mode; // 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
inline void Read(LegoStorage* p_storage, T* p_variable, LegoU32 p_size = sizeof(T))
|
||||||
|
{
|
||||||
|
p_storage->Read(p_variable, p_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
inline void Write(LegoStorage* p_storage, T p_variable)
|
||||||
|
{
|
||||||
|
p_storage->Write(&p_variable, sizeof(p_variable));
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db710
|
// VTABLE: LEGO1 0x100db710
|
||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoMemory : public LegoStorage {
|
class LegoMemory : public LegoStorage {
|
||||||
public:
|
public:
|
||||||
LegoMemory(void* p_buffer);
|
LegoMemory(void* p_buffer);
|
||||||
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
|
LegoResult Read(void* p_buffer, LegoU32 p_size) override; // vtable+0x04
|
||||||
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
|
LegoResult Write(const void* p_buffer, LegoU32 p_size) override; // vtable+0x08
|
||||||
LegoResult GetPosition(LegoU32& p_position) override;
|
|
||||||
LegoResult SetPosition(LegoU32 p_position) override;
|
// FUNCTION: LEGO1 0x100994a0
|
||||||
|
LegoResult GetPosition(LegoU32& p_position) override // vtable+0x0c
|
||||||
|
{
|
||||||
|
p_position = m_position;
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100994b0
|
||||||
|
LegoResult SetPosition(LegoU32 p_position) override // vtable+0x10
|
||||||
|
{
|
||||||
|
m_position = p_position;
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10045a80
|
// SYNTHETIC: LEGO1 0x10045a80
|
||||||
// LegoMemory::~LegoMemory
|
// LegoMemory::~LegoMemory
|
||||||
@ -67,10 +91,10 @@ class LegoFile : public LegoStorage {
|
|||||||
public:
|
public:
|
||||||
LegoFile();
|
LegoFile();
|
||||||
~LegoFile() override;
|
~LegoFile() override;
|
||||||
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
|
LegoResult Read(void* p_buffer, LegoU32 p_size) override; // vtable+0x04
|
||||||
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
|
LegoResult Write(const void* p_buffer, LegoU32 p_size) override; // vtable+0x08
|
||||||
LegoResult GetPosition(LegoU32& p_position) override;
|
LegoResult GetPosition(LegoU32& p_position) override; // vtable+0x0c
|
||||||
LegoResult SetPosition(LegoU32 p_position) override;
|
LegoResult SetPosition(LegoU32 p_position) override; // vtable+0x10
|
||||||
LegoResult Open(const char* p_name, LegoU32 p_mode);
|
LegoResult Open(const char* p_name, LegoU32 p_mode);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100343d0
|
// FUNCTION: LEGO1 0x100343d0
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#ifndef __VERSION_H
|
#ifndef __VERSION_H
|
||||||
#define __VERSION_H
|
#define __VERSION_H
|
||||||
|
|
||||||
#define MODEL_VERSION 3
|
#define MODEL_VERSION 19
|
||||||
|
|
||||||
#endif // __VERSION_H
|
#endif // __VERSION_H
|
||||||
|
|||||||
@ -50,7 +50,7 @@ void LegoROI::FUN_100a46b0(Matrix4& p_transform)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100a58f0
|
// STUB: LEGO1 0x100a58f0
|
||||||
void LegoROI::FUN_100a58f0(Matrix4& p_transform)
|
void LegoROI::FUN_100a58f0(const Matrix4& p_transform)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +96,24 @@ LegoROI::~LegoROI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x100a84a0
|
||||||
|
LegoResult LegoROI::Read(
|
||||||
|
OrientableROI* p_unk0xd4,
|
||||||
|
Tgl::Renderer* p_renderer,
|
||||||
|
ViewLODListManager* p_viewLODListManager,
|
||||||
|
LegoTextureContainer* p_textureContainer,
|
||||||
|
LegoStorage* p_storage
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x100a90f0
|
||||||
|
LegoResult LegoROI::SetFrame(LegoAnim* p_anim, LegoTime p_time)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a9a50
|
// FUNCTION: LEGO1 0x100a9a50
|
||||||
TimeROI::TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, int p_time) : LegoROI(p_renderer, p_lodList)
|
TimeROI::TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, int p_time) : LegoROI(p_renderer, p_lodList)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,6 +7,9 @@
|
|||||||
typedef unsigned char (*ROIHandler)(char*, char*, unsigned int);
|
typedef unsigned char (*ROIHandler)(char*, char*, unsigned int);
|
||||||
|
|
||||||
class LegoEntity;
|
class LegoEntity;
|
||||||
|
class LegoTextureContainer;
|
||||||
|
class LegoStorage;
|
||||||
|
class LegoAnim;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbe38
|
// VTABLE: LEGO1 0x100dbe38
|
||||||
// SIZE 0x108
|
// SIZE 0x108
|
||||||
@ -16,6 +19,15 @@ class LegoROI : public ViewROI {
|
|||||||
LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList);
|
LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList);
|
||||||
~LegoROI() override;
|
~LegoROI() override;
|
||||||
|
|
||||||
|
LegoResult Read(
|
||||||
|
OrientableROI* p_unk0xd4,
|
||||||
|
Tgl::Renderer* p_renderer,
|
||||||
|
ViewLODListManager* p_viewLODListManager,
|
||||||
|
LegoTextureContainer* p_textureContainer,
|
||||||
|
LegoStorage* p_storage
|
||||||
|
);
|
||||||
|
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
||||||
|
|
||||||
float IntrinsicImportance() const override; // vtable+0x04
|
float IntrinsicImportance() const override; // vtable+0x04
|
||||||
void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
||||||
|
|
||||||
@ -34,7 +46,7 @@ class LegoROI : public ViewROI {
|
|||||||
|
|
||||||
void WrappedSetLocalTransform(Matrix4& p_transform);
|
void WrappedSetLocalTransform(Matrix4& p_transform);
|
||||||
void FUN_100a46b0(Matrix4& p_transform);
|
void FUN_100a46b0(Matrix4& p_transform);
|
||||||
void FUN_100a58f0(Matrix4& p_transform);
|
void FUN_100a58f0(const Matrix4& p_transform);
|
||||||
|
|
||||||
inline const char* GetName() const { return m_name; }
|
inline const char* GetName() const { return m_name; }
|
||||||
inline LegoEntity* GetUnknown0x104() { return m_unk0x104; }
|
inline LegoEntity* GetUnknown0x104() { return m_unk0x104; }
|
||||||
|
|||||||
@ -81,6 +81,9 @@
|
|||||||
// LIBRARY: LEGO1 0x1008c5c0
|
// LIBRARY: LEGO1 0x1008c5c0
|
||||||
// _fseek
|
// _fseek
|
||||||
|
|
||||||
|
// LIBRARY: LEGO1 0x1008c6a0
|
||||||
|
// _isdigit
|
||||||
|
|
||||||
// LIBRARY: LEGO1 0x1008ca60
|
// LIBRARY: LEGO1 0x1008ca60
|
||||||
// _abort
|
// _abort
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class MxAssignedDevice {
|
|||||||
~MxAssignedDevice();
|
~MxAssignedDevice();
|
||||||
|
|
||||||
inline unsigned int GetFlags() { return m_flags; }
|
inline unsigned int GetFlags() { return m_flags; }
|
||||||
|
inline BOOL GetHardwareMode() { return ((int) m_flags << 31) >> 31; }
|
||||||
inline D3DDEVICEDESC& GetDesc() { return m_desc; }
|
inline D3DDEVICEDESC& GetDesc() { return m_desc; }
|
||||||
|
|
||||||
friend class MxDirect3D;
|
friend class MxDirect3D;
|
||||||
|
|||||||
@ -15,6 +15,10 @@ class Mx3DPointFloat : public Vector3 {
|
|||||||
m_elements[2] = p_z;
|
m_elements[2] = p_z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline float GetX() { return m_data[0]; }
|
||||||
|
inline float GetY() { return m_data[1]; }
|
||||||
|
inline float GetZ() { return m_data[2]; }
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100343a0
|
// FUNCTION: LEGO1 0x100343a0
|
||||||
inline Mx3DPointFloat(const Mx3DPointFloat& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }
|
inline Mx3DPointFloat(const Mx3DPointFloat& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }
|
||||||
|
|
||||||
@ -39,7 +43,7 @@ class Mx3DPointFloat : public Vector3 {
|
|||||||
inline void EqualsCross(Mx3DPointFloat& p_a, Mx3DPointFloat& p_b) { EqualsCrossImpl(p_a.m_data, p_b.m_data); }
|
inline void EqualsCross(Mx3DPointFloat& p_a, Mx3DPointFloat& p_b) { EqualsCrossImpl(p_a.m_data, p_b.m_data); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_elements[3];
|
float m_elements[3]; // 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d41e8
|
// VTABLE: LEGO1 0x100d41e8
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class MxCollection : public MxCore {
|
|||||||
SetDestroy(Destroy);
|
SetDestroy(Destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Destroy(T){};
|
static void Destroy(T) {}
|
||||||
|
|
||||||
void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; }
|
void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; }
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class MxDSActionList : public MxList<MxDSAction*> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class MxDSActionListCursor : public MxListCursor<MxDSAction*> {
|
class MxDSActionListCursor : public MxListCursor<MxDSAction*> {
|
||||||
public:
|
public:
|
||||||
MxDSActionListCursor(MxDSActionList* p_list) : MxListCursor<MxDSAction*>(p_list){};
|
MxDSActionListCursor(MxDSActionList* p_list) : MxListCursor<MxDSAction*>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x100c9cc0
|
// TEMPLATE: LEGO1 0x100c9cc0
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class MxListCursor : public MxCore {
|
|||||||
template <class T>
|
template <class T>
|
||||||
class MxPtrListCursor : public MxListCursor<T*> {
|
class MxPtrListCursor : public MxListCursor<T*> {
|
||||||
public:
|
public:
|
||||||
MxPtrListCursor(MxPtrList<T>* p_list) : MxListCursor<T*>(p_list){};
|
MxPtrListCursor(MxPtrList<T>* p_list) : MxListCursor<T*>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class MxPresenterList : public MxPtrList<MxPresenter> {
|
|||||||
// VTABLE: LEGO1 0x100d6470
|
// VTABLE: LEGO1 0x100d6470
|
||||||
class MxPresenterListCursor : public MxPtrListCursor<MxPresenter> {
|
class MxPresenterListCursor : public MxPtrListCursor<MxPresenter> {
|
||||||
public:
|
public:
|
||||||
MxPresenterListCursor(MxPresenterList* p_list) : MxPtrListCursor<MxPresenter>(p_list){};
|
MxPresenterListCursor(MxPresenterList* p_list) : MxPtrListCursor<MxPresenter>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6350
|
// VTABLE: LEGO1 0x100d6350
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class MxRectList : public MxPtrList<MxRect32> {
|
|||||||
// VTABLE: LEGO1 0x100dc420
|
// VTABLE: LEGO1 0x100dc420
|
||||||
class MxRectListCursor : public MxPtrListCursor<MxRect32> {
|
class MxRectListCursor : public MxPtrListCursor<MxRect32> {
|
||||||
public:
|
public:
|
||||||
MxRectListCursor(MxRectList* p_list) : MxPtrListCursor<MxRect32>(p_list){};
|
MxRectListCursor(MxRectList* p_list) : MxPtrListCursor<MxRect32>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc3d8
|
// VTABLE: LEGO1 0x100dc3d8
|
||||||
|
|||||||
@ -54,7 +54,7 @@ class MxRegionLeftRightList : public MxPtrList<MxRegionLeftRight> {
|
|||||||
// VTABLE: LEGO1 0x100dcc10
|
// VTABLE: LEGO1 0x100dcc10
|
||||||
class MxRegionLeftRightListCursor : public MxPtrListCursor<MxRegionLeftRight> {
|
class MxRegionLeftRightListCursor : public MxPtrListCursor<MxRegionLeftRight> {
|
||||||
public:
|
public:
|
||||||
MxRegionLeftRightListCursor(MxRegionLeftRightList* p_list) : MxPtrListCursor<MxRegionLeftRight>(p_list){};
|
MxRegionLeftRightListCursor(MxRegionLeftRightList* p_list) : MxPtrListCursor<MxRegionLeftRight>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x0c
|
// SIZE 0x0c
|
||||||
@ -116,7 +116,7 @@ class MxRegionTopBottomList : public MxPtrList<MxRegionTopBottom> {
|
|||||||
// VTABLE: LEGO1 0x100dcb88
|
// VTABLE: LEGO1 0x100dcb88
|
||||||
class MxRegionTopBottomListCursor : public MxPtrListCursor<MxRegionTopBottom> {
|
class MxRegionTopBottomListCursor : public MxPtrListCursor<MxRegionTopBottom> {
|
||||||
public:
|
public:
|
||||||
MxRegionTopBottomListCursor(MxPtrList<MxRegionTopBottom>* p_list) : MxPtrListCursor<MxRegionTopBottom>(p_list){};
|
MxRegionTopBottomListCursor(MxPtrList<MxRegionTopBottom>* p_list) : MxPtrListCursor<MxRegionTopBottom>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x100c32e0
|
// TEMPLATE: LEGO1 0x100c32e0
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class MxStreamChunkList : public MxList<MxStreamChunk*> {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class MxStreamChunkListCursor : public MxListCursor<MxStreamChunk*> {
|
class MxStreamChunkListCursor : public MxListCursor<MxStreamChunk*> {
|
||||||
public:
|
public:
|
||||||
MxStreamChunkListCursor(MxStreamChunkList* p_list) : MxListCursor<MxStreamChunk*>(p_list){};
|
MxStreamChunkListCursor(MxStreamChunkList* p_list) : MxListCursor<MxStreamChunk*>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc528
|
// VTABLE: LEGO1 0x100dc528
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class MxStringList : public MxList<MxString> {};
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class MxStringListCursor : public MxListCursor<MxString> {
|
class MxStringListCursor : public MxListCursor<MxString> {
|
||||||
public:
|
public:
|
||||||
MxStringListCursor(MxStringList* p_list) : MxListCursor<MxString>(p_list){};
|
MxStringListCursor(MxStringList* p_list) : MxListCursor<MxString>(p_list) {}
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100cb860
|
// SYNTHETIC: LEGO1 0x100cb860
|
||||||
// MxStringList::`scalar deleting destructor'
|
// MxStringList::`scalar deleting destructor'
|
||||||
|
|||||||
@ -28,8 +28,9 @@ class MxTimer : public MxCore {
|
|||||||
// MxTimer::`scalar deleting destructor'
|
// MxTimer::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxLong m_startTime;
|
MxLong m_startTime; // 0x08
|
||||||
MxBool m_isRunning;
|
MxBool m_isRunning; // 0x0c
|
||||||
|
|
||||||
static MxLong g_lastTimeCalculated;
|
static MxLong g_lastTimeCalculated;
|
||||||
static MxLong g_lastTimeTimerStarted;
|
static MxLong g_lastTimeTimerStarted;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -72,7 +72,8 @@ MxBool GetRectIntersection(
|
|||||||
);
|
);
|
||||||
|
|
||||||
void MakeSourceName(char*, const char*);
|
void MakeSourceName(char*, const char*);
|
||||||
void SetOmniUserMessage(void (*)(const char*, int));
|
void OmniError(const char* p_message, MxS32 p_status);
|
||||||
|
void SetOmniUserMessage(void (*p_omniUserMessage)(const char*, MxS32));
|
||||||
MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter);
|
MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter);
|
||||||
void FUN_100b7220(MxDSAction* p_action, MxU32 p_newFlags, MxBool p_setFlags);
|
void FUN_100b7220(MxDSAction* p_action, MxU32 p_newFlags, MxBool p_setFlags);
|
||||||
MxDSObject* CreateStreamObject(MxDSFile*, MxS16);
|
MxDSObject* CreateStreamObject(MxDSFile*, MxS16);
|
||||||
|
|||||||
@ -43,20 +43,20 @@ class MxVideoPresenter : public MxMediaPresenter {
|
|||||||
MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50
|
MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c700
|
// FUNCTION: LEGO1 0x1000c700
|
||||||
virtual void LoadHeader(MxStreamChunk* p_chunk){}; // vtable+0x5c
|
virtual void LoadHeader(MxStreamChunk* p_chunk) {} // vtable+0x5c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c710
|
// FUNCTION: LEGO1 0x1000c710
|
||||||
virtual void CreateBitmap(){}; // vtable+0x60
|
virtual void CreateBitmap() {} // vtable+0x60
|
||||||
|
|
||||||
virtual void NextFrame(); // vtable+0x64
|
virtual void NextFrame(); // vtable+0x64
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c720
|
// FUNCTION: LEGO1 0x1000c720
|
||||||
virtual void LoadFrame(MxStreamChunk* p_chunk){}; // vtable+0x68
|
virtual void LoadFrame(MxStreamChunk* p_chunk) {} // vtable+0x68
|
||||||
|
|
||||||
virtual void PutFrame(); // vtable+0x6c
|
virtual void PutFrame(); // vtable+0x6c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c730
|
// FUNCTION: LEGO1 0x1000c730
|
||||||
virtual void RealizePalette(){}; // vtable+0x70
|
virtual void RealizePalette() {} // vtable+0x70
|
||||||
|
|
||||||
virtual undefined VTable0x74(); // vtable+0x74
|
virtual undefined VTable0x74(); // vtable+0x74
|
||||||
|
|
||||||
|
|||||||
@ -127,10 +127,21 @@ MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter*
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b7210
|
// FUNCTION: LEGO1 0x100b71e0
|
||||||
void SetOmniUserMessage(void (*p_userMsg)(const char*, int))
|
void OmniError(const char* p_message, MxS32 p_status)
|
||||||
{
|
{
|
||||||
g_omniUserMessage = p_userMsg;
|
if (g_omniUserMessage) {
|
||||||
|
g_omniUserMessage(p_message, p_status);
|
||||||
|
}
|
||||||
|
else if (p_status) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100b7210
|
||||||
|
void SetOmniUserMessage(void (*p_omniUserMessage)(const char*, MxS32))
|
||||||
|
{
|
||||||
|
g_omniUserMessage = p_omniUserMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b7220
|
// FUNCTION: LEGO1 0x100b7220
|
||||||
|
|||||||
@ -145,7 +145,7 @@ class Vector2 {
|
|||||||
inline const float& operator[](size_t idx) const { return m_data[idx]; }
|
inline const float& operator[](size_t idx) const { return m_data[idx]; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float* m_data;
|
float* m_data; // 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d4518
|
// VTABLE: LEGO1 0x100d4518
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user