mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
Merge remote-tracking branch 'isle/master'
This commit is contained in:
commit
6a45dbec34
@ -460,9 +460,6 @@ target_sources(lego1 PRIVATE
|
||||
LEGO1/lego/legoomni/src/race/raceskel.cpp
|
||||
LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legoflctexturepresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legoloopinganimpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp
|
||||
LEGO1/lego/legoomni/src/video/legopartpresenter.cpp
|
||||
|
||||
@ -304,4 +304,7 @@ class LegoAnimationManager : public MxCore {
|
||||
// TEMPLATE: LEGO1 0x10061750
|
||||
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
|
||||
|
||||
// TEMPLATE: BETA10 0x1004b5d0
|
||||
// MxListCursor<LegoTranInfo *>::Next
|
||||
|
||||
#endif // LEGOANIMATIONMANAGER_H
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOANIMPRESENTER_H
|
||||
|
||||
#include "legoroilist.h"
|
||||
#include "legoroimaplist.h"
|
||||
#include "mxatom.h"
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
@ -147,14 +148,191 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
||||
MxS16 m_unk0x9c; // 0x9c
|
||||
Matrix4* m_unk0xa0; // 0xa0
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10068650
|
||||
// LegoAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
public:
|
||||
float m_unk0xa4; // 0xa4
|
||||
Mx3DPointFloat m_unk0xa8; // 0xa8
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4900
|
||||
// SIZE 0xc0
|
||||
class LegoLoopingAnimPresenter : public LegoAnimPresenter {
|
||||
public:
|
||||
// FUNCTION: BETA10 0x1005c6f0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f0700
|
||||
return "LegoLoopingAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c9a0
|
||||
// FUNCTION: BETA10 0x1005c6c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c9b0
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006d000
|
||||
// LegoLoopingAnimPresenter::~LegoLoopingAnimPresenter
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000f440
|
||||
// LegoLoopingAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
undefined4 m_unk0xbc; // 0xbc
|
||||
};
|
||||
|
||||
class LegoAnimActor;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9170
|
||||
// SIZE 0xd8
|
||||
class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
public:
|
||||
LegoLocomotionAnimPresenter();
|
||||
~LegoLocomotionAnimPresenter() override;
|
||||
|
||||
// FUNCTION: BETA10 0x1005c4e0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f06e4
|
||||
return "LegoLocomotionAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ce50
|
||||
// FUNCTION: BETA10 0x1005c4b0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ce60
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoLoopingAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void EndAction() override; // vtable+0x40
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
MxResult CreateAnim(MxStreamChunk* p_chunk) override; // vtable+0x88
|
||||
|
||||
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
|
||||
|
||||
void DecrementUnknown0xd4()
|
||||
{
|
||||
if (m_unk0xd4) {
|
||||
--m_unk0xd4;
|
||||
}
|
||||
}
|
||||
|
||||
undefined2 GetUnknown0xd4() { return m_unk0xd4; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006cfe0
|
||||
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
undefined4 m_unk0xc0; // 0xc0
|
||||
undefined4* m_unk0xc4; // 0xc4
|
||||
LegoROIMapList* m_roiMapList; // 0xc8
|
||||
MxS32 m_unk0xcc; // 0xcc
|
||||
MxS32 m_unk0xd0; // 0xd0
|
||||
undefined2 m_unk0xd4; // 0xd4
|
||||
};
|
||||
|
||||
class LegoPathBoundary;
|
||||
|
||||
struct LegoHideAnimStructComparator {
|
||||
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
|
||||
};
|
||||
|
||||
// SIZE 0x08
|
||||
struct LegoHideAnimStruct {
|
||||
LegoPathBoundary* m_boundary; // 0x00
|
||||
MxU32 m_index; // 0x04
|
||||
};
|
||||
|
||||
typedef map<const char*, LegoHideAnimStruct, LegoHideAnimStructComparator> LegoHideAnimStructMap;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9278
|
||||
// SIZE 0xc4
|
||||
class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
public:
|
||||
LegoHideAnimPresenter();
|
||||
~LegoHideAnimPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d860
|
||||
void VTable0x8c() override {} // vtable+0x8c
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d870
|
||||
void VTable0x90() override {} // vtable+0x90
|
||||
|
||||
// FUNCTION: BETA10 0x1005d4a0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f06cc
|
||||
return "LegoHideAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d880
|
||||
// FUNCTION: BETA10 0x1005d470
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d890
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x18
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void EndAction() override; // vtable+0x40
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
|
||||
void FUN_1006db40(LegoTime p_time);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006d9d0
|
||||
// LegoHideAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time);
|
||||
void FUN_1006dc10();
|
||||
void FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
|
||||
void FUN_1006e470(
|
||||
LegoHideAnimStructMap& p_map,
|
||||
LegoAnimNodeData* p_data,
|
||||
const char* p_name,
|
||||
LegoPathBoundary* p_boundary
|
||||
);
|
||||
|
||||
LegoPathBoundary** m_boundaryMap; // 0xc0
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
// SYNTHETIC: LEGO1 0x10068650
|
||||
// LegoAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
// TEMPLATE: LEGO1 0x100689c0
|
||||
// map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> >::~map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> >
|
||||
@ -212,6 +390,33 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7688
|
||||
// _Tree<char const *,pair<char const * const,LegoAnimStruct>,map<char const *,LegoAnimStruct,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Kfn,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Nil
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006ddb0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~_Tree<char const *,pair<ch
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006de80
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Inc
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006dec0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::erase
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e310
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Erase
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e350
|
||||
// Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>::~Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e3a0
|
||||
// map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e6d0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Dec
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e720
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Insert
|
||||
|
||||
// GLOBAL: LEGO1 0x100f768c
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Nil
|
||||
// clang-format on
|
||||
|
||||
#endif // LEGOANIMPRESENTER_H
|
||||
|
||||
@ -24,11 +24,11 @@ class LegoControlManagerNotificationParam : public LegoEventNotificationParam {
|
||||
|
||||
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
|
||||
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
||||
void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; }
|
||||
void SetEnabledChild(MxS16 p_enabledChild) { m_enabledChild = p_enabledChild; }
|
||||
|
||||
MxS32 m_clickedObjectId; // 0x20
|
||||
const char* m_clickedAtom; // 0x24
|
||||
MxS16 m_unk0x28; // 0x28
|
||||
MxS16 m_enabledChild; // 0x28
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10028bf0
|
||||
|
||||
@ -110,19 +110,19 @@ class LegoGameState {
|
||||
e_dunecarbuild,
|
||||
e_jetskibuild,
|
||||
e_racecarbuild,
|
||||
e_unk40,
|
||||
e_helicopterSpawn,
|
||||
e_unk41,
|
||||
e_unk42,
|
||||
e_unk43,
|
||||
e_unk44,
|
||||
e_unk45,
|
||||
e_dunebuggySpawn,
|
||||
e_racecarSpawn,
|
||||
e_jetskiSpawn,
|
||||
e_act2main,
|
||||
e_act3script,
|
||||
e_unk48,
|
||||
e_unk49,
|
||||
e_unk50,
|
||||
e_unk51,
|
||||
e_unk52,
|
||||
e_towTrackHookedUp,
|
||||
e_jukeboxw,
|
||||
e_jukeboxExterior,
|
||||
e_unk55,
|
||||
|
||||
@ -1,111 +0,0 @@
|
||||
#ifndef LEGOHIDEANIMPRESENTER_H
|
||||
#define LEGOHIDEANIMPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoloopinganimpresenter.h"
|
||||
|
||||
class LegoPathBoundary;
|
||||
|
||||
struct LegoHideAnimStructComparator {
|
||||
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
|
||||
};
|
||||
|
||||
// SIZE 0x08
|
||||
struct LegoHideAnimStruct {
|
||||
LegoPathBoundary* m_boundary; // 0x00
|
||||
MxU32 m_index; // 0x04
|
||||
};
|
||||
|
||||
typedef map<const char*, LegoHideAnimStruct, LegoHideAnimStructComparator> LegoHideAnimStructMap;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9278
|
||||
// SIZE 0xc4
|
||||
class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
public:
|
||||
LegoHideAnimPresenter();
|
||||
~LegoHideAnimPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d860
|
||||
void VTable0x8c() override {} // vtable+0x8c
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d870
|
||||
void VTable0x90() override {} // vtable+0x90
|
||||
|
||||
// FUNCTION: BETA10 0x1005d4a0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f06cc
|
||||
return "LegoHideAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d880
|
||||
// FUNCTION: BETA10 0x1005d470
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d890
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x18
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void EndAction() override; // vtable+0x40
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
|
||||
void FUN_1006db40(LegoTime p_time);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time);
|
||||
void FUN_1006dc10();
|
||||
void FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
|
||||
void FUN_1006e470(
|
||||
LegoHideAnimStructMap& p_map,
|
||||
LegoAnimNodeData* p_data,
|
||||
const char* p_name,
|
||||
LegoPathBoundary* p_boundary
|
||||
);
|
||||
|
||||
LegoPathBoundary** m_boundaryMap; // 0xc0
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
// SYNTHETIC: LEGO1 0x1006d9d0
|
||||
// LegoHideAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006ddb0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~_Tree<char const *,pair<ch
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006de80
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Inc
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006dec0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::erase
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e310
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Erase
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e350
|
||||
// Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>::~Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e3a0
|
||||
// map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e6d0
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Dec
|
||||
|
||||
// TEMPLATE: LEGO1 0x1006e720
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Insert
|
||||
|
||||
// GLOBAL: LEGO1 0x100f768c
|
||||
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Nil
|
||||
// clang-format on
|
||||
|
||||
#endif // LEGOHIDEANIMPRESENTER_H
|
||||
@ -1,71 +0,0 @@
|
||||
#ifndef LEGOLOCOMOTIONANIMPRESENTER_H
|
||||
#define LEGOLOCOMOTIONANIMPRESENTER_H
|
||||
|
||||
#include "legoloopinganimpresenter.h"
|
||||
#include "legoroimaplist.h"
|
||||
|
||||
class LegoAnimActor;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9170
|
||||
// SIZE 0xd8
|
||||
class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
public:
|
||||
LegoLocomotionAnimPresenter();
|
||||
~LegoLocomotionAnimPresenter() override;
|
||||
|
||||
// FUNCTION: BETA10 0x1005c4e0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f06e4
|
||||
return "LegoLocomotionAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ce50
|
||||
// FUNCTION: BETA10 0x1005c4b0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ce60
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoLoopingAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void EndAction() override; // vtable+0x40
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
MxResult CreateAnim(MxStreamChunk* p_chunk) override; // vtable+0x88
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006cfe0
|
||||
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
|
||||
|
||||
void DecrementUnknown0xd4()
|
||||
{
|
||||
if (m_unk0xd4) {
|
||||
--m_unk0xd4;
|
||||
}
|
||||
}
|
||||
|
||||
undefined2 GetUnknown0xd4() { return m_unk0xd4; }
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
undefined4 m_unk0xc0; // 0xc0
|
||||
undefined4* m_unk0xc4; // 0xc4
|
||||
LegoROIMapList* m_roiMapList; // 0xc8
|
||||
MxS32 m_unk0xcc; // 0xcc
|
||||
MxS32 m_unk0xd0; // 0xd0
|
||||
undefined2 m_unk0xd4; // 0xd4
|
||||
};
|
||||
|
||||
#endif // LEGOLOCOMOTIONANIMPRESENTER_H
|
||||
@ -1,43 +0,0 @@
|
||||
#ifndef LEGOLOOPINGANIMPRESENTER_H
|
||||
#define LEGOLOOPINGANIMPRESENTER_H
|
||||
|
||||
#include "legoanimpresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d4900
|
||||
// SIZE 0xc0
|
||||
class LegoLoopingAnimPresenter : public LegoAnimPresenter {
|
||||
public:
|
||||
// FUNCTION: BETA10 0x1005c6f0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
// STRING: LEGO1 0x100f0700
|
||||
return "LegoLoopingAnimPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c9a0
|
||||
// FUNCTION: BETA10 0x1005c6c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return HandlerClassName();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c9b0
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
|
||||
private:
|
||||
undefined4 m_unk0xbc; // 0xbc
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006d000
|
||||
// LegoLoopingAnimPresenter::~LegoLoopingAnimPresenter
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000f440
|
||||
// LegoLoopingAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
#endif // LEGOLOOPINGANIMPRESENTER_H
|
||||
@ -185,8 +185,8 @@ class LegoOmni : public MxOmni {
|
||||
// FUNCTION: BETA10 0x100d55c0
|
||||
void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
||||
|
||||
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction) { return m_unk0x13c ? Start(&p_dsAction) : SUCCESS; }
|
||||
void SetUnknown13c(MxBool p_unk0x13c) { m_unk0x13c = p_unk0x13c; }
|
||||
MxResult StartActionIfInitialized(MxDSAction& p_dsAction) { return m_initialized ? Start(&p_dsAction) : SUCCESS; }
|
||||
void SetInitialized(MxBool p_unk0x13c) { m_initialized = p_unk0x13c; }
|
||||
|
||||
void CloseMainWindow()
|
||||
{
|
||||
@ -227,7 +227,7 @@ class LegoOmni : public MxOmni {
|
||||
MxBool m_version10;
|
||||
|
||||
public:
|
||||
MxBool m_unk0x13c; // 0x13c
|
||||
MxBool m_initialized; // 0x13c
|
||||
};
|
||||
|
||||
#endif // LEGOMAIN_H
|
||||
|
||||
@ -28,9 +28,11 @@ class LegoTranInfoList : public MxPtrList<LegoTranInfo> {
|
||||
// class MxPtrListCursor<LegoTranInfo>
|
||||
|
||||
// VTABLE: LEGO1 0x100d8d20
|
||||
// VTABLE: BETA10 0x101bad70
|
||||
// SIZE 0x10
|
||||
class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
|
||||
public:
|
||||
// FUNCTION: BETA10 0x100496d0
|
||||
LegoTranInfoListCursor(LegoTranInfoList* p_list) : MxPtrListCursor<LegoTranInfo>(p_list) {}
|
||||
};
|
||||
|
||||
@ -62,9 +64,14 @@ class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
|
||||
// MxPtrList<LegoTranInfo>::`scalar deleting destructor'
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100612f0
|
||||
// SYNTHETIC: BETA10 0x100498c0
|
||||
// LegoTranInfoListCursor::`scalar deleting destructor'
|
||||
|
||||
// SYNTHETIC: BETA10 0x10049770
|
||||
// MxPtrListCursor<LegoTranInfo>::MxPtrListCursor<LegoTranInfo>
|
||||
|
||||
// FUNCTION: LEGO1 0x10061360
|
||||
// FUNCTION: BETA10 0x10049910
|
||||
// MxPtrListCursor<LegoTranInfo>::~MxPtrListCursor<LegoTranInfo>
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100613b0
|
||||
@ -77,6 +84,7 @@ class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
|
||||
// MxListCursor<LegoTranInfo *>::~MxListCursor<LegoTranInfo *>
|
||||
|
||||
// FUNCTION: LEGO1 0x100614e0
|
||||
// FUNCTION: BETA10 0x10049ab0
|
||||
// LegoTranInfoListCursor::~LegoTranInfoListCursor
|
||||
|
||||
#endif // LEGOTRANINFOLIST_H
|
||||
|
||||
@ -53,7 +53,7 @@ void Disable(MxBool p_disable, MxU16 p_flags);
|
||||
LegoROI* FindROI(const char* p_name);
|
||||
void SetROIVisible(const char* p_name, MxBool p_visible);
|
||||
void SetUserActor(LegoPathActor* p_userActor);
|
||||
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction);
|
||||
MxResult StartActionIfInitialized(MxDSAction& p_dsAction);
|
||||
void DeleteAction();
|
||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
MxDSAction& GetCurrentAction();
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
#include "act3ammo.h"
|
||||
#include "anim/legoanim.h"
|
||||
#include "define.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legobuildingmanager.h"
|
||||
#include "legocachesoundmanager.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legopathedgecontainer.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legoplants.h"
|
||||
|
||||
@ -440,7 +440,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_AmbulanceArms_Ctl:
|
||||
Exit();
|
||||
@ -457,7 +457,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_AmbulanceHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
presenter->Enable(p_param.m_enabledChild);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_BikeArms_Ctl:
|
||||
Exit();
|
||||
@ -97,7 +97,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_BikeHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
presenter->Enable(p_param.m_enabledChild);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_DuneCarArms_Ctl:
|
||||
Exit();
|
||||
@ -140,7 +140,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case IsleScript::c_DuneCarHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
presenter->Enable(p_param.m_enabledChild);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ void Helicopter::Exit()
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
SpawnPlayer(
|
||||
LegoGameState::e_unk40,
|
||||
LegoGameState::e_helicopterSpawn,
|
||||
TRUE,
|
||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||
);
|
||||
@ -189,7 +189,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
MxU32 isPizza = FALSE;
|
||||
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
|
||||
@ -355,7 +355,7 @@ void IslePathActor::RegisterSpawnLocations()
|
||||
JukeboxScript::c_PoliceStation_Music
|
||||
);
|
||||
g_spawnLocations[16] = SpawnLocation(
|
||||
LegoGameState::e_unk40,
|
||||
LegoGameState::e_helicopterSpawn,
|
||||
g_isleScript,
|
||||
0,
|
||||
"edg02_51",
|
||||
@ -379,7 +379,7 @@ void IslePathActor::RegisterSpawnLocations()
|
||||
JukeboxScript::c_noneJukebox
|
||||
);
|
||||
g_spawnLocations[18] = SpawnLocation(
|
||||
LegoGameState::e_unk43,
|
||||
LegoGameState::e_dunebuggySpawn,
|
||||
g_isleScript,
|
||||
0,
|
||||
"edg02_35",
|
||||
@ -391,7 +391,7 @@ void IslePathActor::RegisterSpawnLocations()
|
||||
JukeboxScript::c_noneJukebox
|
||||
);
|
||||
g_spawnLocations[19] = SpawnLocation(
|
||||
LegoGameState::e_unk44,
|
||||
LegoGameState::e_racecarSpawn,
|
||||
g_isleScript,
|
||||
0,
|
||||
"EDG03_01",
|
||||
@ -403,7 +403,7 @@ void IslePathActor::RegisterSpawnLocations()
|
||||
JukeboxScript::c_noneJukebox
|
||||
);
|
||||
g_spawnLocations[20] = SpawnLocation(
|
||||
LegoGameState::e_unk45,
|
||||
LegoGameState::e_jetskiSpawn,
|
||||
g_isleScript,
|
||||
0,
|
||||
"edg10_70",
|
||||
@ -475,7 +475,7 @@ void IslePathActor::RegisterSpawnLocations()
|
||||
JukeboxScript::c_noneJukebox
|
||||
);
|
||||
g_spawnLocations[26] = SpawnLocation(
|
||||
LegoGameState::e_unk52,
|
||||
LegoGameState::e_towTrackHookedUp,
|
||||
g_isleScript,
|
||||
0,
|
||||
"edg02_19",
|
||||
|
||||
@ -69,7 +69,7 @@ void Jetski::Animate(float p_time)
|
||||
// FUNCTION: LEGO1 0x1007e6f0
|
||||
void Jetski::Exit()
|
||||
{
|
||||
SpawnPlayer(LegoGameState::e_unk45, FALSE, c_spawnBit1 | c_playMusic | c_spawnBit3);
|
||||
SpawnPlayer(LegoGameState::e_jetskiSpawn, FALSE, c_spawnBit1 | c_playMusic | c_spawnBit3);
|
||||
IslePathActor::Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_jetski;
|
||||
RemoveFromWorld();
|
||||
@ -139,7 +139,7 @@ void Jetski::RemoveFromWorld()
|
||||
// FUNCTION: LEGO1 0x1007e8e0
|
||||
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
if (p_param.m_enabledChild == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_JetskiArms_Ctl:
|
||||
Exit();
|
||||
|
||||
@ -117,7 +117,7 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_MotoBikeArms_Ctl:
|
||||
Exit();
|
||||
|
||||
@ -110,7 +110,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxU32 result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
|
||||
if (p_param.m_enabledChild == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::Area::e_vehicleExited;
|
||||
result = 1;
|
||||
|
||||
@ -434,7 +434,7 @@ MxLong TowTrack::HandleClick()
|
||||
}
|
||||
|
||||
if (m_state->m_state == TowTrackMissionState::e_hookedUp) {
|
||||
SpawnPlayer(LegoGameState::e_unk52, TRUE, 0);
|
||||
SpawnPlayer(LegoGameState::e_towTrackHookedUp, TRUE, 0);
|
||||
FindROI("rcred")->SetVisibility(FALSE);
|
||||
}
|
||||
else {
|
||||
@ -485,7 +485,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_TowTrackArms_Ctl:
|
||||
Exit();
|
||||
@ -501,7 +501,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
break;
|
||||
case IsleScript::c_TowHorn_Ctl:
|
||||
MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
presenter->Enable(p_param.m_enabledChild);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ void LegoLoadCacheSoundPresenter::DoneTickle()
|
||||
// FUNCTION: LEGO1 0x10018700
|
||||
MxResult LegoLoadCacheSoundPresenter::PutData()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_currentTickleState == e_done) {
|
||||
m_cacheSound = SoundManager()->GetCacheSoundManager()->ManageSoundEntry(m_cacheSound);
|
||||
|
||||
@ -45,7 +45,7 @@ MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
MxResult result = FAILURE;
|
||||
|
||||
if (MxSoundManager::Create(10, FALSE) == SUCCESS) {
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
locked = TRUE;
|
||||
m_cacheSoundManager = new LegoCacheSoundManager;
|
||||
assert(m_cacheSoundManager);
|
||||
|
||||
@ -956,7 +956,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
LegoControlManagerNotificationParam* param = (LegoControlManagerNotificationParam*) p_param;
|
||||
assert(m_buildState);
|
||||
|
||||
if (param->m_unk0x28) {
|
||||
if (param->m_enabledChild) {
|
||||
switch (param->m_clickedObjectId) {
|
||||
// The enum values are all identical between CopterScript, DunecarScript, JetskiScript, and RacecarScript
|
||||
case CopterScript::c_Info_Ctl:
|
||||
@ -1012,7 +1012,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
case CopterScript::c_Platform_Ctl:
|
||||
FUN_10024f50();
|
||||
m_unk0xf8 = c_unknown8;
|
||||
m_unk0xfc = param->m_unk0x28;
|
||||
m_unk0xfc = param->m_enabledChild;
|
||||
result = 1;
|
||||
break;
|
||||
default:
|
||||
@ -1054,7 +1054,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
LegoControlManagerNotificationParam* param = (LegoControlManagerNotificationParam*) p_param;
|
||||
assert(m_buildState);
|
||||
|
||||
if (param->m_unk0x28) {
|
||||
if (param->m_enabledChild) {
|
||||
switch (param->m_clickedObjectId) {
|
||||
case CopterScript::c_Info_Ctl:
|
||||
m_animPresenter->SetShelfState(LegoCarBuildAnimPresenter::e_selected);
|
||||
@ -1116,7 +1116,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
case CopterScript::c_Platform_Ctl:
|
||||
FUN_10024f50();
|
||||
m_unk0xf8 = c_unknown8;
|
||||
m_unk0xfc = param->m_unk0x28;
|
||||
m_unk0xfc = param->m_enabledChild;
|
||||
result = 1;
|
||||
break;
|
||||
default:
|
||||
@ -1233,7 +1233,7 @@ undefined4 LegoCarBuild::FUN_10024c20(MxNotificationParam* p_param)
|
||||
jukeboxScript = JukeboxScript::c_RaceCarBuild_Music;
|
||||
}
|
||||
|
||||
m_unk0x338 = SoundManager()->FUN_100aebd0(*g_jukeboxScript, jukeboxScript);
|
||||
m_unk0x338 = SoundManager()->FindPresenter(*g_jukeboxScript, jukeboxScript);
|
||||
|
||||
if (m_unk0x338) {
|
||||
BackgroundAudioManager()->SetPendingPresenter(m_unk0x338, 5, MxPresenter::e_repeating);
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include "legoentitylist.h"
|
||||
#include "legoextraactor.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legomain.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legoroilist.h"
|
||||
@ -20,6 +19,7 @@
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxdebug.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxticklemanager.h"
|
||||
@ -1021,7 +1021,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
|
||||
action.SetUnknown24(-1);
|
||||
action.AppendExtra(strlen(buf) + 1, buf);
|
||||
|
||||
if (StartActionIfUnknown0x13c(action) == SUCCESS) {
|
||||
if (StartActionIfInitialized(action) == SUCCESS) {
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
tranInfo->m_flags |= LegoTranInfo::c_bit2;
|
||||
animInfo.m_unk0x22++;
|
||||
@ -1088,7 +1088,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix
|
||||
action.SetUnknown24(-1);
|
||||
action.AppendExtra(strlen(buf) + 1, buf);
|
||||
|
||||
if (StartActionIfUnknown0x13c(action) == SUCCESS) {
|
||||
if (StartActionIfInitialized(action) == SUCCESS) {
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
info->m_flags |= LegoTranInfo::c_bit2;
|
||||
m_animRunning = TRUE;
|
||||
@ -1131,7 +1131,7 @@ MxResult LegoAnimationManager::StartEntityAction(MxDSAction& p_dsAction, LegoEnt
|
||||
}
|
||||
}
|
||||
|
||||
if (LegoOmni::GetInstance()->StartActionIfUnknown0x13c(p_dsAction) == SUCCESS) {
|
||||
if (LegoOmni::GetInstance()->StartActionIfInitialized(p_dsAction) == SUCCESS) {
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
||||
@ -1155,7 +1155,7 @@ MxResult LegoAnimationManager::FUN_10060dc0(
|
||||
MxResult result = FAILURE;
|
||||
MxBool found = FALSE;
|
||||
|
||||
if (!Lego()->m_unk0x13c) {
|
||||
if (!Lego()->m_initialized) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -1192,7 +1192,7 @@ MxResult LegoAnimationManager::FUN_10060dc0(
|
||||
// FUNCTION: BETA10 0x1004206c
|
||||
void LegoAnimationManager::CameraTriggerFire(LegoPathActor* p_actor, MxBool, MxU32 p_location, MxBool p_bool)
|
||||
{
|
||||
if (Lego()->m_unk0x13c && m_enableCamAnims && !m_animRunning) {
|
||||
if (Lego()->m_initialized && m_enableCamAnims && !m_animRunning) {
|
||||
LegoLocation* location = LegoNavController::GetLocation(p_location);
|
||||
|
||||
if (location != NULL) {
|
||||
@ -1231,12 +1231,10 @@ void LegoAnimationManager::CameraTriggerFire(LegoPathActor* p_actor, MxBool, MxU
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10061010
|
||||
#ifdef BETA10
|
||||
// FUNCTION: BETA10 0x100422cc
|
||||
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||
{
|
||||
MxBool unk0x39 = FALSE;
|
||||
|
||||
FUN_10064b50(-1);
|
||||
|
||||
if (m_tranInfoList != NULL) {
|
||||
@ -1244,17 +1242,47 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||
LegoTranInfo* tranInfo;
|
||||
|
||||
while (cursor.Next(tranInfo)) {
|
||||
if (tranInfo->m_presenter != NULL) {
|
||||
// TODO: Match
|
||||
MxU32 flags = tranInfo->m_flags;
|
||||
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1) {
|
||||
MxTrace("Releasing user from %d\n", tranInfo->m_objectId);
|
||||
|
||||
if (tranInfo->m_presenter != NULL) {
|
||||
tranInfo->m_presenter->FUN_1004b8c0();
|
||||
}
|
||||
|
||||
tranInfo->m_unk0x14 = FALSE;
|
||||
}
|
||||
else {
|
||||
MxTrace("Stopping %d\n", tranInfo->m_objectId);
|
||||
|
||||
if (tranInfo->m_presenter != NULL) {
|
||||
tranInfo->m_presenter->FUN_1004b840();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_animRunning = FALSE;
|
||||
m_unk0x404 = Timer()->GetTime();
|
||||
}
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x10061010
|
||||
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||
{
|
||||
MxBool animRunning = FALSE;
|
||||
FUN_10064b50(-1);
|
||||
|
||||
if (m_tranInfoList != NULL) {
|
||||
LegoTranInfoListCursor cursor(m_tranInfoList);
|
||||
LegoTranInfo* tranInfo;
|
||||
|
||||
while (cursor.Next(tranInfo)) {
|
||||
if (tranInfo->m_presenter) {
|
||||
// LINE: LEGO1 0x100610e6
|
||||
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1 && p_und) {
|
||||
LegoAnim* anim;
|
||||
|
||||
if (tranInfo->m_presenter->GetPresenter() != NULL &&
|
||||
(anim = tranInfo->m_presenter->GetPresenter()->GetAnimation()) != NULL &&
|
||||
anim->GetCamAnim() != NULL) {
|
||||
if (flags & LegoTranInfo::c_bit2) {
|
||||
if (tranInfo->m_presenter->GetPresenter() &&
|
||||
tranInfo->m_presenter->GetPresenter()->GetAnimation() &&
|
||||
tranInfo->m_presenter->GetPresenter()->GetAnimation()->GetCamAnim()) {
|
||||
if (tranInfo->m_flags & LegoTranInfo::c_bit2) {
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||
}
|
||||
@ -1263,37 +1291,43 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||
tranInfo->m_unk0x14 = FALSE;
|
||||
}
|
||||
else {
|
||||
MxTrace("Releasing user from %d\n", tranInfo->m_objectId);
|
||||
// LINE: LEGO1 0x10061137
|
||||
tranInfo->m_presenter->FUN_1004b8c0();
|
||||
animRunning = TRUE;
|
||||
tranInfo->m_unk0x14 = FALSE;
|
||||
unk0x39 = TRUE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (flags & LegoTranInfo::c_bit2) {
|
||||
if (tranInfo->m_flags & LegoTranInfo::c_bit2) {
|
||||
// LINE: LEGO1 0x10061150
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||
}
|
||||
|
||||
MxTrace("Stopping %d\n", tranInfo->m_objectId);
|
||||
tranInfo->m_presenter->FUN_1004b840();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_tranInfoList2 != NULL) {
|
||||
LegoTranInfoListCursor cursor(m_tranInfoList2);
|
||||
|
||||
if (!cursor.Find(tranInfo)) {
|
||||
// TODO: For some reason, the embedded `MxListEntry` constructor is not inlined.
|
||||
// This may be the key for getting this function to match correctly.
|
||||
m_tranInfoList2->Append(tranInfo);
|
||||
}
|
||||
}
|
||||
|
||||
unk0x39 = TRUE;
|
||||
animRunning = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_animRunning = unk0x39;
|
||||
m_animRunning = animRunning;
|
||||
m_unk0x404 = Timer()->GetTime();
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x10061530
|
||||
void LegoAnimationManager::FUN_10061530()
|
||||
|
||||
@ -425,6 +425,21 @@ MxBool LegoAnimMMPresenter::FUN_1004b6b0(MxLong p_time)
|
||||
// FUNCTION: BETA10 0x1004ce18
|
||||
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||
{
|
||||
#ifdef BETA10
|
||||
switch (m_unk0x58) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
LegoROI* viewROI = VideoManager()->GetViewROI();
|
||||
LegoPathActor* actor = UserActor();
|
||||
|
||||
@ -455,9 +470,13 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||
m_world->PlaceActor(actor);
|
||||
}
|
||||
|
||||
#ifdef BETA10
|
||||
actor->VTable0xa8();
|
||||
#else
|
||||
if (m_tranInfo->m_unk0x29) {
|
||||
actor->VTable0xa8();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
actor->SetActorState(LegoPathActor::c_initial);
|
||||
@ -491,9 +510,11 @@ void LegoAnimMMPresenter::FUN_1004b840()
|
||||
FUN_1004b6d0(0);
|
||||
EndAction();
|
||||
|
||||
#ifndef BETA10
|
||||
if (action != NULL) {
|
||||
Streamer()->FUN_100b98f0(action);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004b8b0
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "legoentity.h"
|
||||
#include "legopathactor.h"
|
||||
// The below header inclusions should be sound.
|
||||
#include "legoloopinganimpresenter.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "mxcompositemediapresenter.h"
|
||||
#include "legoactorpresenter.h"
|
||||
#include "legomodelpresenter.h"
|
||||
@ -71,10 +71,7 @@
|
||||
#include "legoentity.h"
|
||||
#include "legoentitypresenter.h"
|
||||
#include "legoflctexturepresenter.h"
|
||||
#include "legohideanimpresenter.h"
|
||||
#include "legoloadcachesoundpresenter.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legoloopinganimpresenter.h"
|
||||
#include "legometerpresenter.h"
|
||||
#include "legomodelpresenter.h"
|
||||
#include "legopalettepresenter.h"
|
||||
|
||||
@ -172,9 +172,9 @@ void SetUserActor(LegoPathActor* p_userActor)
|
||||
|
||||
// FUNCTION: LEGO1 0x10015890
|
||||
// FUNCTION: BETA10 0x100e4d80
|
||||
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction)
|
||||
MxResult StartActionIfInitialized(MxDSAction& p_dsAction)
|
||||
{
|
||||
return LegoOmni::GetInstance()->StartActionIfUnknown0x13c(p_dsAction);
|
||||
return LegoOmni::GetInstance()->StartActionIfInitialized(p_dsAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100158b0
|
||||
|
||||
@ -27,6 +27,7 @@ MxCompositeMediaPresenter::~MxCompositeMediaPresenter()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10074090
|
||||
// FUNCTION: BETA10 0x100e9d37
|
||||
MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
@ -157,7 +157,7 @@ MxBool MxControlPresenter::Notify(LegoControlManagerNotificationParam* p_param,
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
UpdateEnabledChild(0);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_enabledChild);
|
||||
p_param->SetEnabledChild(m_enabledChild);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -167,7 +167,7 @@ MxBool MxControlPresenter::Notify(LegoControlManagerNotificationParam* p_param,
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
UpdateEnabledChild(m_stateOrCellIndex);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_enabledChild);
|
||||
p_param->SetEnabledChild(m_enabledChild);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -902,7 +902,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
break;
|
||||
case SDLK_A:
|
||||
if (g_animationCalcStep == 1) {
|
||||
Lego()->m_unk0x13c = TRUE;
|
||||
Lego()->m_initialized = TRUE;
|
||||
AnimationManager()->FUN_10060570(TRUE);
|
||||
g_animationCalcStep = 0;
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legosoundmanager.h"
|
||||
@ -288,6 +287,7 @@ MxResult LegoWorld::PlaceActor(
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001fa70
|
||||
// FUNCTION: BETA10 0x100da328
|
||||
MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
@ -303,6 +303,7 @@ MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001fb70
|
||||
// FUNCTION: BETA10 0x100da3f1
|
||||
MxResult LegoWorld::PlaceActor(
|
||||
LegoPathActor* p_actor,
|
||||
LegoAnimPresenter* p_presenter,
|
||||
|
||||
@ -74,7 +74,7 @@ void LegoOmni::Init()
|
||||
m_animationManager = NULL;
|
||||
m_buildingManager = NULL;
|
||||
m_bkgAudioManager = NULL;
|
||||
m_unk0x13c = TRUE;
|
||||
m_initialized = TRUE;
|
||||
m_transitionManager = NULL;
|
||||
m_version10 = FALSE;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "define.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legopathboundary.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#include "legoextraactor.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legocachesoundmanager.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legosoundmanager.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "decomp.h"
|
||||
#include "geom/legoorientededge.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legopathactor.h"
|
||||
#include "legopathstruct.h"
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "isle.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legohideanimpresenter.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legopathactor.h"
|
||||
#include "legoutils.h"
|
||||
#include "misc.h"
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
#include "isle.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legohideanimpresenter.h"
|
||||
#include "legomain.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legopathstruct.h"
|
||||
@ -339,7 +339,7 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
// FUNCTION: LEGO1 0x10017650
|
||||
MxLong CarRace::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case 3:
|
||||
InvokeAction(Extra::e_stop, *g_carraceScript, CarraceScript::c_irtx08ra_PlayWav, NULL);
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
#include "jetski_actions.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legohideanimpresenter.h"
|
||||
#include "legomain.h"
|
||||
#include "legopathstruct.h"
|
||||
#include "legoracers.h"
|
||||
@ -126,7 +126,7 @@ MxLong JetskiRace::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case JetraceScript::c_JetskiArms_Ctl:
|
||||
m_act1State->m_state = Act1State::e_none;
|
||||
|
||||
@ -129,7 +129,7 @@ MxLong LegoRaceMap::Notify(MxParam& p_param)
|
||||
if (param.GetNotification() == c_notificationControl &&
|
||||
m_Map_Ctl->GetAction()->GetObjectId() == ((LegoControlManagerNotificationParam&) p_param).m_clickedObjectId) {
|
||||
|
||||
if (((LegoControlManagerNotificationParam&) p_param).m_unk0x28 == 1) {
|
||||
if (((LegoControlManagerNotificationParam&) p_param).m_enabledChild == 1) {
|
||||
m_unk0x08 = TRUE;
|
||||
FUN_1005d4b0();
|
||||
m_stillPresenter->Enable(TRUE);
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "anim/legoanim.h"
|
||||
#include "define.h"
|
||||
#include "legoanimactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimmmpresenter.h"
|
||||
#include "legocameracontroller.h"
|
||||
@ -30,6 +31,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoAnimPresenter, 0xbc)
|
||||
DECOMP_SIZE_ASSERT(LegoLoopingAnimPresenter, 0xc0)
|
||||
DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8)
|
||||
DECOMP_SIZE_ASSERT(LegoHideAnimPresenter, 0xc4)
|
||||
DECOMP_SIZE_ASSERT(LegoHideAnimStruct, 0x08)
|
||||
|
||||
// FUNCTION: LEGO1 0x10068420
|
||||
// FUNCTION: BETA10 0x1004e5f0
|
||||
@ -1219,3 +1224,439 @@ MxResult LegoAnimPresenter::VTable0x98(LegoPathBoundary* p_boundary)
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006caa0
|
||||
// FUNCTION: BETA10 0x1005223d
|
||||
void LegoLoopingAnimPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_subscriber->PeekData()) {
|
||||
MxStreamChunk* chunk = m_subscriber->PopData();
|
||||
m_subscriber->FreeDataChunk(chunk);
|
||||
}
|
||||
|
||||
if (m_unk0x95) {
|
||||
ProgressTickleState(e_done);
|
||||
if (m_compositePresenter) {
|
||||
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() > m_action->GetDuration() + m_action->GetStartTime()) {
|
||||
m_unk0x95 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006cb40
|
||||
// FUNCTION: BETA10 0x1005239a
|
||||
void LegoLoopingAnimPresenter::PutFrame()
|
||||
{
|
||||
MxLong time;
|
||||
|
||||
if (m_action->GetStartTime() <= m_action->GetElapsedTime()) {
|
||||
time = (m_action->GetElapsedTime() - m_action->GetStartTime()) % m_anim->GetDuration();
|
||||
}
|
||||
else {
|
||||
time = 0;
|
||||
}
|
||||
|
||||
FUN_1006b9a0(m_anim, time, m_unk0x78);
|
||||
|
||||
if (m_unk0x8c != NULL && m_currentWorld != NULL && m_currentWorld->GetCameraController() != NULL) {
|
||||
for (MxS32 i = 0; i < m_unk0x94; i++) {
|
||||
if (m_unk0x8c[i] != NULL) {
|
||||
MxMatrix mat(m_unk0x8c[i]->GetLocal2World());
|
||||
|
||||
Vector3 pos(mat[0]);
|
||||
Vector3 dir(mat[1]);
|
||||
Vector3 up(mat[2]);
|
||||
Vector3 und(mat[3]);
|
||||
|
||||
float possqr = sqrt(pos.LenSquared());
|
||||
float dirsqr = sqrt(dir.LenSquared());
|
||||
float upsqr = sqrt(up.LenSquared());
|
||||
|
||||
up = und;
|
||||
|
||||
up -= m_currentWorld->GetCameraController()->GetWorldLocation();
|
||||
dir /= dirsqr;
|
||||
pos.EqualsCross(dir, up);
|
||||
pos.Unitize();
|
||||
up.EqualsCross(pos, dir);
|
||||
pos *= possqr;
|
||||
dir *= dirsqr;
|
||||
up *= upsqr;
|
||||
|
||||
m_unk0x8c[i]->SetLocal2World(mat);
|
||||
m_unk0x8c[i]->WrappedUpdateWorldData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006cdd0
|
||||
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d050
|
||||
LegoLocomotionAnimPresenter::~LegoLocomotionAnimPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d0b0
|
||||
void LegoLocomotionAnimPresenter::Init()
|
||||
{
|
||||
m_unk0xc0 = 0;
|
||||
m_unk0xc4 = NULL;
|
||||
m_unk0xcc = -1;
|
||||
m_unk0xd0 = -1;
|
||||
m_roiMapList = NULL;
|
||||
m_unk0xd4 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d0e0
|
||||
void LegoLocomotionAnimPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_unk0xc4) {
|
||||
delete[] m_unk0xc4;
|
||||
}
|
||||
|
||||
if (m_roiMapList) {
|
||||
delete m_roiMapList;
|
||||
}
|
||||
|
||||
m_roiMap = NULL;
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor) {
|
||||
LegoLoopingAnimPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d140
|
||||
MxResult LegoLocomotionAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
||||
{
|
||||
MxResult result = LegoAnimPresenter::CreateAnim(p_chunk);
|
||||
return result == SUCCESS ? SUCCESS : result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d160
|
||||
// FUNCTION: BETA10 0x100528c7
|
||||
MxResult LegoLocomotionAnimPresenter::AddToManager()
|
||||
{
|
||||
m_roiMapList = new LegoROIMapList();
|
||||
|
||||
if (m_roiMapList == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
return LegoAnimPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5b0
|
||||
void LegoLocomotionAnimPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5c0
|
||||
void LegoLocomotionAnimPresenter::PutFrame()
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5d0
|
||||
void LegoLocomotionAnimPresenter::ReadyTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::ReadyTickle();
|
||||
|
||||
if (m_currentWorld != NULL && m_currentTickleState == e_starting) {
|
||||
m_currentWorld->Add(this);
|
||||
if (m_compositePresenter != NULL) {
|
||||
SendToCompositePresenter(Lego());
|
||||
}
|
||||
|
||||
m_unk0xd4++;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d610
|
||||
// FUNCTION: BETA10 0x10052a34
|
||||
void LegoLocomotionAnimPresenter::StartingTickle()
|
||||
{
|
||||
if (m_subscriber->PeekData()) {
|
||||
MxStreamChunk* chunk = m_subscriber->PopData();
|
||||
m_subscriber->FreeDataChunk(chunk);
|
||||
}
|
||||
|
||||
if (m_roiMapList->GetNumElements() != 0) {
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d660
|
||||
void LegoLocomotionAnimPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_unk0xd4 == 0) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d670
|
||||
void LegoLocomotionAnimPresenter::EndAction()
|
||||
{
|
||||
if (m_action) {
|
||||
MxVideoPresenter::EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d680
|
||||
// FUNCTION: BETA10 0x10052b3d
|
||||
void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value)
|
||||
{
|
||||
// This asserts that LegoLocomotionAnimPresenter is contained in legoanimpresenter.cpp
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
MxVariableTable* variableTable = VariableTable();
|
||||
|
||||
const char* key = ((LegoAnimNodeData*) m_anim->GetRoot()->GetData())->GetName();
|
||||
variableTable->SetVariable(key, p_actor->GetROI()->GetName());
|
||||
|
||||
FUN_100695c0();
|
||||
FUN_10069b10();
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
m_roiMapList->Append(m_roiMap);
|
||||
p_actor->FUN_1001c450(m_anim, p_value, m_roiMap, m_roiMapSize);
|
||||
m_roiMap = NULL;
|
||||
}
|
||||
|
||||
variableTable->SetVariable(key, "");
|
||||
|
||||
if (m_sceneROIs != NULL) {
|
||||
delete m_sceneROIs;
|
||||
m_sceneROIs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// We do not have any hard evidence that `LegoHideAnimPresenter` is part of this file as well.
|
||||
// However, since all of the other AnimPresenters are in the same file, it is reasonable to assume
|
||||
// that the same holds here.
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d7e0
|
||||
LegoHideAnimPresenter::LegoHideAnimPresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d9f0
|
||||
LegoHideAnimPresenter::~LegoHideAnimPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006da50
|
||||
void LegoHideAnimPresenter::Init()
|
||||
{
|
||||
m_boundaryMap = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006da60
|
||||
void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_boundaryMap) {
|
||||
delete[] m_boundaryMap;
|
||||
}
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
// This appears to be a bug, since it results in an endless loop
|
||||
if (!p_fromDestructor) {
|
||||
LegoHideAnimPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dab0
|
||||
MxResult LegoHideAnimPresenter::AddToManager()
|
||||
{
|
||||
return LegoAnimPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dac0
|
||||
void LegoHideAnimPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dad0
|
||||
void LegoHideAnimPresenter::PutFrame()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dae0
|
||||
// FUNCTION: BETA10 0x100530f4
|
||||
void LegoHideAnimPresenter::ReadyTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::ReadyTickle();
|
||||
|
||||
if (m_currentWorld) {
|
||||
if (m_currentTickleState == e_starting && m_compositePresenter != NULL) {
|
||||
SendToCompositePresenter(Lego());
|
||||
}
|
||||
|
||||
m_currentWorld->Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db20
|
||||
// FUNCTION: BETA10 0x1005316b
|
||||
void LegoHideAnimPresenter::StartingTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::StartingTickle();
|
||||
|
||||
if (m_currentTickleState == e_streaming) {
|
||||
FUN_1006dc10();
|
||||
FUN_1006db40(0);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db40
|
||||
// FUNCTION: BETA10 0x100531ab
|
||||
void LegoHideAnimPresenter::FUN_1006db40(LegoTime p_time)
|
||||
{
|
||||
FUN_1006db60(m_anim->GetRoot(), p_time);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db60
|
||||
// FUNCTION: BETA10 0x100531de
|
||||
void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time)
|
||||
{
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
|
||||
MxBool newB = FALSE;
|
||||
MxBool previousB = FALSE;
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
LegoROI* roi = m_roiMap[data->GetROIIndex()];
|
||||
|
||||
if (roi != NULL) {
|
||||
newB = data->GetVisibility(p_time);
|
||||
previousB = roi->GetVisibility();
|
||||
roi->SetVisibility(newB);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_boundaryMap != NULL) {
|
||||
LegoPathBoundary* boundary = m_boundaryMap[data->GetBoundaryIndex()];
|
||||
|
||||
if (boundary != NULL) {
|
||||
newB = data->GetVisibility(p_time);
|
||||
previousB = boundary->GetFlag0x10();
|
||||
boundary->SetFlag0x10(newB);
|
||||
}
|
||||
}
|
||||
|
||||
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
FUN_1006db60(p_node->GetChild(i), p_time);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dc10
|
||||
// FUNCTION: BETA10 0x100532fd
|
||||
void LegoHideAnimPresenter::FUN_1006dc10()
|
||||
{
|
||||
LegoHideAnimStructMap anims;
|
||||
|
||||
FUN_1006e3f0(anims, m_anim->GetRoot());
|
||||
|
||||
if (m_boundaryMap != NULL) {
|
||||
delete[] m_boundaryMap;
|
||||
}
|
||||
|
||||
m_boundaryMap = new LegoPathBoundary*[anims.size() + 1];
|
||||
m_boundaryMap[0] = NULL;
|
||||
|
||||
for (LegoHideAnimStructMap::iterator it = anims.begin(); !(it == anims.end()); it++) {
|
||||
m_boundaryMap[(*it).second.m_index] = (*it).second.m_boundary;
|
||||
delete[] const_cast<char*>((*it).first);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e3f0
|
||||
// FUNCTION: BETA10 0x1005345e
|
||||
void LegoHideAnimPresenter::FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node)
|
||||
{
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
|
||||
const char* name = data->GetName();
|
||||
|
||||
if (name != NULL) {
|
||||
LegoPathBoundary* boundary = m_currentWorld->FindPathBoundary(name);
|
||||
|
||||
if (boundary != NULL) {
|
||||
FUN_1006e470(p_map, data, name, boundary);
|
||||
}
|
||||
else {
|
||||
data->SetBoundaryIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
MxS32 count = p_node->GetNumChildren();
|
||||
for (MxS32 i = 0; i < count; i++) {
|
||||
FUN_1006e3f0(p_map, p_node->GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e470
|
||||
// FUNCTION: BETA10 0x10053520
|
||||
void LegoHideAnimPresenter::FUN_1006e470(
|
||||
LegoHideAnimStructMap& p_map,
|
||||
LegoAnimNodeData* p_data,
|
||||
const char* p_name,
|
||||
LegoPathBoundary* p_boundary
|
||||
)
|
||||
{
|
||||
LegoHideAnimStructMap::iterator it;
|
||||
|
||||
it = p_map.find(p_name);
|
||||
if (it == p_map.end()) {
|
||||
LegoHideAnimStruct animStruct;
|
||||
animStruct.m_index = p_map.size() + 1;
|
||||
animStruct.m_boundary = p_boundary;
|
||||
|
||||
p_data->SetBoundaryIndex(animStruct.m_index);
|
||||
|
||||
char* name = new char[strlen(p_name) + 1];
|
||||
strcpy(name, p_name);
|
||||
|
||||
p_map[name] = animStruct;
|
||||
}
|
||||
else {
|
||||
p_data->SetBoundaryIndex((*it).second.m_index);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e9e0
|
||||
// FUNCTION: BETA10 0x100535ef
|
||||
void LegoHideAnimPresenter::EndAction()
|
||||
{
|
||||
if (m_action) {
|
||||
MxVideoPresenter::EndAction();
|
||||
|
||||
if (m_currentWorld) {
|
||||
m_currentWorld->Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,216 +0,0 @@
|
||||
#include "legohideanimpresenter.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "legomain.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoHideAnimPresenter, 0xc4)
|
||||
DECOMP_SIZE_ASSERT(LegoHideAnimStruct, 0x08)
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d7e0
|
||||
LegoHideAnimPresenter::LegoHideAnimPresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d9f0
|
||||
LegoHideAnimPresenter::~LegoHideAnimPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006da50
|
||||
void LegoHideAnimPresenter::Init()
|
||||
{
|
||||
m_boundaryMap = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006da60
|
||||
void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_boundaryMap) {
|
||||
delete[] m_boundaryMap;
|
||||
}
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
// This appears to be a bug, since it results in an endless loop
|
||||
if (!p_fromDestructor) {
|
||||
LegoHideAnimPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dab0
|
||||
MxResult LegoHideAnimPresenter::AddToManager()
|
||||
{
|
||||
return LegoAnimPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dac0
|
||||
void LegoHideAnimPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dad0
|
||||
void LegoHideAnimPresenter::PutFrame()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dae0
|
||||
// FUNCTION: BETA10 0x100530f4
|
||||
void LegoHideAnimPresenter::ReadyTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::ReadyTickle();
|
||||
|
||||
if (m_currentWorld) {
|
||||
if (m_currentTickleState == e_starting && m_compositePresenter != NULL) {
|
||||
SendToCompositePresenter(Lego());
|
||||
}
|
||||
|
||||
m_currentWorld->Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db20
|
||||
// FUNCTION: BETA10 0x1005316b
|
||||
void LegoHideAnimPresenter::StartingTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::StartingTickle();
|
||||
|
||||
if (m_currentTickleState == e_streaming) {
|
||||
FUN_1006dc10();
|
||||
FUN_1006db40(0);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db40
|
||||
// FUNCTION: BETA10 0x100531ab
|
||||
void LegoHideAnimPresenter::FUN_1006db40(LegoTime p_time)
|
||||
{
|
||||
FUN_1006db60(m_anim->GetRoot(), p_time);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db60
|
||||
// FUNCTION: BETA10 0x100531de
|
||||
void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time)
|
||||
{
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
|
||||
MxBool newB = FALSE;
|
||||
MxBool previousB = FALSE;
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
LegoROI* roi = m_roiMap[data->GetROIIndex()];
|
||||
|
||||
if (roi != NULL) {
|
||||
newB = data->GetVisibility(p_time);
|
||||
previousB = roi->GetVisibility();
|
||||
roi->SetVisibility(newB);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_boundaryMap != NULL) {
|
||||
LegoPathBoundary* boundary = m_boundaryMap[data->GetBoundaryIndex()];
|
||||
|
||||
if (boundary != NULL) {
|
||||
newB = data->GetVisibility(p_time);
|
||||
previousB = boundary->GetFlag0x10();
|
||||
boundary->SetFlag0x10(newB);
|
||||
}
|
||||
}
|
||||
|
||||
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
FUN_1006db60(p_node->GetChild(i), p_time);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006dc10
|
||||
// FUNCTION: BETA10 0x100532fd
|
||||
void LegoHideAnimPresenter::FUN_1006dc10()
|
||||
{
|
||||
LegoHideAnimStructMap anims;
|
||||
|
||||
FUN_1006e3f0(anims, m_anim->GetRoot());
|
||||
|
||||
if (m_boundaryMap != NULL) {
|
||||
delete[] m_boundaryMap;
|
||||
}
|
||||
|
||||
m_boundaryMap = new LegoPathBoundary*[anims.size() + 1];
|
||||
m_boundaryMap[0] = NULL;
|
||||
|
||||
for (LegoHideAnimStructMap::iterator it = anims.begin(); !(it == anims.end()); it++) {
|
||||
m_boundaryMap[(*it).second.m_index] = (*it).second.m_boundary;
|
||||
delete[] const_cast<char*>((*it).first);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e3f0
|
||||
// FUNCTION: BETA10 0x1005345e
|
||||
void LegoHideAnimPresenter::FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node)
|
||||
{
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
|
||||
const char* name = data->GetName();
|
||||
|
||||
if (name != NULL) {
|
||||
LegoPathBoundary* boundary = m_currentWorld->FindPathBoundary(name);
|
||||
|
||||
if (boundary != NULL) {
|
||||
FUN_1006e470(p_map, data, name, boundary);
|
||||
}
|
||||
else {
|
||||
data->SetBoundaryIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
MxS32 count = p_node->GetNumChildren();
|
||||
for (MxS32 i = 0; i < count; i++) {
|
||||
FUN_1006e3f0(p_map, p_node->GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e470
|
||||
// FUNCTION: BETA10 0x10053520
|
||||
void LegoHideAnimPresenter::FUN_1006e470(
|
||||
LegoHideAnimStructMap& p_map,
|
||||
LegoAnimNodeData* p_data,
|
||||
const char* p_name,
|
||||
LegoPathBoundary* p_boundary
|
||||
)
|
||||
{
|
||||
LegoHideAnimStructMap::iterator it;
|
||||
|
||||
it = p_map.find(p_name);
|
||||
if (it == p_map.end()) {
|
||||
LegoHideAnimStruct animStruct;
|
||||
animStruct.m_index = p_map.size() + 1;
|
||||
animStruct.m_boundary = p_boundary;
|
||||
|
||||
p_data->SetBoundaryIndex(animStruct.m_index);
|
||||
|
||||
char* name = new char[strlen(p_name) + 1];
|
||||
strcpy(name, p_name);
|
||||
|
||||
p_map[name] = animStruct;
|
||||
}
|
||||
else {
|
||||
p_data->SetBoundaryIndex((*it).second.m_index);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006e9e0
|
||||
// FUNCTION: BETA10 0x100535ef
|
||||
void LegoHideAnimPresenter::EndAction()
|
||||
{
|
||||
if (m_action) {
|
||||
MxVideoPresenter::EndAction();
|
||||
|
||||
if (m_currentWorld) {
|
||||
m_currentWorld->Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,164 +0,0 @@
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "legoanimactor.h"
|
||||
#include "legomain.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxautolock.h"
|
||||
#include "mxdssubscriber.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxvariabletable.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8)
|
||||
|
||||
// FUNCTION: LEGO1 0x1006cdd0
|
||||
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d050
|
||||
LegoLocomotionAnimPresenter::~LegoLocomotionAnimPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d0b0
|
||||
void LegoLocomotionAnimPresenter::Init()
|
||||
{
|
||||
m_unk0xc0 = 0;
|
||||
m_unk0xc4 = NULL;
|
||||
m_unk0xcc = -1;
|
||||
m_unk0xd0 = -1;
|
||||
m_roiMapList = NULL;
|
||||
m_unk0xd4 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d0e0
|
||||
void LegoLocomotionAnimPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_unk0xc4) {
|
||||
delete[] m_unk0xc4;
|
||||
}
|
||||
|
||||
if (m_roiMapList) {
|
||||
delete m_roiMapList;
|
||||
}
|
||||
|
||||
m_roiMap = NULL;
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor) {
|
||||
LegoLoopingAnimPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d140
|
||||
MxResult LegoLocomotionAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
||||
{
|
||||
MxResult result = LegoAnimPresenter::CreateAnim(p_chunk);
|
||||
return result == SUCCESS ? SUCCESS : result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d160
|
||||
// FUNCTION: BETA10 0x100528c7
|
||||
MxResult LegoLocomotionAnimPresenter::AddToManager()
|
||||
{
|
||||
m_roiMapList = new LegoROIMapList();
|
||||
|
||||
if (m_roiMapList == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
return LegoAnimPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5b0
|
||||
void LegoLocomotionAnimPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5c0
|
||||
void LegoLocomotionAnimPresenter::PutFrame()
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d5d0
|
||||
void LegoLocomotionAnimPresenter::ReadyTickle()
|
||||
{
|
||||
LegoLoopingAnimPresenter::ReadyTickle();
|
||||
|
||||
if (m_currentWorld != NULL && m_currentTickleState == e_starting) {
|
||||
m_currentWorld->Add(this);
|
||||
if (m_compositePresenter != NULL) {
|
||||
SendToCompositePresenter(Lego());
|
||||
}
|
||||
|
||||
m_unk0xd4++;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d610
|
||||
// FUNCTION: BETA10 0x10052a34
|
||||
void LegoLocomotionAnimPresenter::StartingTickle()
|
||||
{
|
||||
if (m_subscriber->PeekData()) {
|
||||
MxStreamChunk* chunk = m_subscriber->PopData();
|
||||
m_subscriber->FreeDataChunk(chunk);
|
||||
}
|
||||
|
||||
if (m_roiMapList->GetNumElements() != 0) {
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d660
|
||||
void LegoLocomotionAnimPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_unk0xd4 == 0) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d670
|
||||
void LegoLocomotionAnimPresenter::EndAction()
|
||||
{
|
||||
if (m_action) {
|
||||
MxVideoPresenter::EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d680
|
||||
// FUNCTION: BETA10 0x10052b3d
|
||||
void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value)
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
MxVariableTable* variableTable = VariableTable();
|
||||
|
||||
const char* key = ((LegoAnimNodeData*) m_anim->GetRoot()->GetData())->GetName();
|
||||
variableTable->SetVariable(key, p_actor->GetROI()->GetName());
|
||||
|
||||
FUN_100695c0();
|
||||
FUN_10069b10();
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
m_roiMapList->Append(m_roiMap);
|
||||
p_actor->FUN_1001c450(m_anim, p_value, m_roiMap, m_roiMapSize);
|
||||
m_roiMap = NULL;
|
||||
}
|
||||
|
||||
variableTable->SetVariable(key, "");
|
||||
|
||||
if (m_sceneROIs != NULL) {
|
||||
delete m_sceneROIs;
|
||||
m_sceneROIs = NULL;
|
||||
}
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
#include "legoloopinganimpresenter.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "legocameracontroller.h"
|
||||
#include "legoworld.h"
|
||||
#include "mxcompositepresenter.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxdssubscriber.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoLoopingAnimPresenter, 0xc0)
|
||||
|
||||
// FUNCTION: LEGO1 0x1006caa0
|
||||
// FUNCTION: BETA10 0x1005223d
|
||||
void LegoLoopingAnimPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_subscriber->PeekData()) {
|
||||
MxStreamChunk* chunk = m_subscriber->PopData();
|
||||
m_subscriber->FreeDataChunk(chunk);
|
||||
}
|
||||
|
||||
if (m_unk0x95) {
|
||||
ProgressTickleState(e_done);
|
||||
if (m_compositePresenter) {
|
||||
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() > m_action->GetDuration() + m_action->GetStartTime()) {
|
||||
m_unk0x95 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006cb40
|
||||
// FUNCTION: BETA10 0x1005239a
|
||||
void LegoLoopingAnimPresenter::PutFrame()
|
||||
{
|
||||
MxLong time;
|
||||
|
||||
if (m_action->GetStartTime() <= m_action->GetElapsedTime()) {
|
||||
time = (m_action->GetElapsedTime() - m_action->GetStartTime()) % m_anim->GetDuration();
|
||||
}
|
||||
else {
|
||||
time = 0;
|
||||
}
|
||||
|
||||
FUN_1006b9a0(m_anim, time, m_unk0x78);
|
||||
|
||||
if (m_unk0x8c != NULL && m_currentWorld != NULL && m_currentWorld->GetCameraController() != NULL) {
|
||||
for (MxS32 i = 0; i < m_unk0x94; i++) {
|
||||
if (m_unk0x8c[i] != NULL) {
|
||||
MxMatrix mat(m_unk0x8c[i]->GetLocal2World());
|
||||
|
||||
Vector3 pos(mat[0]);
|
||||
Vector3 dir(mat[1]);
|
||||
Vector3 up(mat[2]);
|
||||
Vector3 und(mat[3]);
|
||||
|
||||
float possqr = sqrt(pos.LenSquared());
|
||||
float dirsqr = sqrt(dir.LenSquared());
|
||||
float upsqr = sqrt(up.LenSquared());
|
||||
|
||||
up = und;
|
||||
|
||||
up -= m_currentWorld->GetCameraController()->GetWorldLocation();
|
||||
dir /= dirsqr;
|
||||
pos.EqualsCross(dir, up);
|
||||
pos.Unitize();
|
||||
up.EqualsCross(pos, dir);
|
||||
pos *= possqr;
|
||||
dir *= dirsqr;
|
||||
up *= upsqr;
|
||||
|
||||
m_unk0x8c[i]->SetLocal2World(mat);
|
||||
m_unk0x8c[i]->WrappedUpdateWorldData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@ void LegoModelPresenter::configureLegoModelPresenter(MxS32 p_modelPresenterConfi
|
||||
// FUNCTION: LEGO1 0x1007f670
|
||||
void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
m_roi = NULL;
|
||||
m_addedToView = FALSE;
|
||||
m_criticalSection.Leave();
|
||||
|
||||
@ -31,7 +31,7 @@ void LegoPalettePresenter::Init()
|
||||
// FUNCTION: LEGO1 0x1007a0e0
|
||||
void LegoPalettePresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
if (m_palette) {
|
||||
delete m_palette;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ MxResult LegoPartPresenter::AddToManager()
|
||||
// FUNCTION: LEGO1 0x1007c9d0
|
||||
void LegoPartPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
VideoManager()->UnregisterPresenter(*this);
|
||||
|
||||
if (m_parts) {
|
||||
|
||||
@ -87,7 +87,7 @@ MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_para
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case ElevbottScript::c_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_infodoor;
|
||||
|
||||
@ -389,7 +389,7 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param
|
||||
// FUNCTION: BETA10 0x10029445
|
||||
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
|
||||
@ -555,7 +555,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
// FUNCTION: LEGO1 0x10075f90
|
||||
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case HospitalScript::c_Info_Ctl:
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
|
||||
@ -948,7 +948,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
// FUNCTION: BETA10 0x1002ffd4
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
|
||||
InfomainScript::Script actionToPlay = InfomainScript::c_noneInfomain;
|
||||
|
||||
@ -96,7 +96,7 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_para
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
DeleteObjects(&m_atomId, InfodoorScript::c_iic037in_PlayWav, 510);
|
||||
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
|
||||
@ -284,7 +284,7 @@ void Isle::ReadyWorld()
|
||||
// FUNCTION: LEGO1 0x10031030
|
||||
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
@ -577,7 +577,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
if (UserActor() != NULL && UserActor()->IsA("Jetski")) {
|
||||
IslePathActor* actor = (IslePathActor*) UserActor();
|
||||
actor->SpawnPlayer(
|
||||
LegoGameState::e_unk45,
|
||||
LegoGameState::e_jetskiSpawn,
|
||||
FALSE,
|
||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||
);
|
||||
@ -1633,7 +1633,7 @@ void Act1State::PlaceActors()
|
||||
|
||||
if (m_helicopter != NULL) {
|
||||
if (!m_helicopterPlane.IsPresent()) {
|
||||
m_helicopter->SpawnPlayer(LegoGameState::e_unk40, FALSE, 0);
|
||||
m_helicopter->SpawnPlayer(LegoGameState::e_helicopterSpawn, FALSE, 0);
|
||||
}
|
||||
else {
|
||||
isle->PlaceActor(m_helicopter, m_helicopterPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
||||
@ -1673,7 +1673,7 @@ void Act1State::PlaceActors()
|
||||
|
||||
if (m_jetski != NULL) {
|
||||
if (!m_jetskiPlane.IsPresent()) {
|
||||
m_jetski->SpawnPlayer(LegoGameState::e_unk45, FALSE, 0);
|
||||
m_jetski->SpawnPlayer(LegoGameState::e_jetskiSpawn, FALSE, 0);
|
||||
}
|
||||
else {
|
||||
isle->PlaceActor(m_jetski, m_jetskiPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
||||
@ -1703,7 +1703,7 @@ void Act1State::PlaceActors()
|
||||
|
||||
if (m_dunebuggy != NULL) {
|
||||
if (!m_dunebuggyPlane.IsPresent()) {
|
||||
m_dunebuggy->SpawnPlayer(LegoGameState::e_unk43, FALSE, 0);
|
||||
m_dunebuggy->SpawnPlayer(LegoGameState::e_dunebuggySpawn, FALSE, 0);
|
||||
}
|
||||
else {
|
||||
isle->PlaceActor(m_dunebuggy, m_dunebuggyPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
||||
@ -1731,7 +1731,7 @@ void Act1State::PlaceActors()
|
||||
|
||||
if (m_racecar != NULL) {
|
||||
if (!m_racecarPlane.IsPresent()) {
|
||||
m_racecar->SpawnPlayer(LegoGameState::e_unk44, FALSE, 0);
|
||||
m_racecar->SpawnPlayer(LegoGameState::e_racecarSpawn, FALSE, 0);
|
||||
}
|
||||
else {
|
||||
isle->PlaceActor(m_racecar, m_racecarPlane.GetName(), 0, 0.5f, 1, 0.5f);
|
||||
|
||||
@ -123,7 +123,7 @@ MxBool JukeBox::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxStillPresenter* presenter;
|
||||
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case JukeboxwScript::c_Dback_Ctl:
|
||||
switch (m_state->m_music) {
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
#include "islepathactor.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legocachesoundmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legomain.h"
|
||||
#include "legopathstruct.h"
|
||||
#include "legosoundmanager.h"
|
||||
@ -1117,7 +1117,7 @@ MxResult LegoAct2::FUN_10052560(
|
||||
action.SetDirection(*p_direction);
|
||||
}
|
||||
|
||||
StartActionIfUnknown0x13c(action);
|
||||
StartActionIfInitialized(action);
|
||||
}
|
||||
else {
|
||||
MxMatrix matrix;
|
||||
|
||||
@ -101,7 +101,7 @@ void Police::ReadyWorld()
|
||||
// FUNCTION: LEGO1 0x1005e550
|
||||
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
if (p_param.m_enabledChild == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case PoliceScript::c_LeftArrow_Ctl:
|
||||
case PoliceScript::c_RightArrow_Ctl:
|
||||
|
||||
@ -241,7 +241,7 @@ MxLong RegistrationBook::HandleKeyPress(SDL_Keycode p_key)
|
||||
// FUNCTION: LEGO1 0x100774a0
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 buttonId = p_param.m_unk0x28;
|
||||
MxS16 buttonId = p_param.m_enabledChild;
|
||||
const InternationalCharacter* intChar = NULL;
|
||||
|
||||
for (int i = 0; i < sizeOfArray(m_intAlphabet); i++) {
|
||||
|
||||
@ -165,7 +165,7 @@ void Score::ReadyWorld()
|
||||
// FUNCTION: LEGO1 0x100016d0
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.m_unk0x28;
|
||||
MxS16 unk0x28 = p_param.m_enabledChild;
|
||||
|
||||
if (unk0x28 == 1 || p_param.m_clickedObjectId == InfoscorScript::c_LegoBox_Ctl) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
|
||||
@ -87,13 +87,10 @@
|
||||
#include "lego/legoomni/include/legoextraactor.h"
|
||||
#include "lego/legoomni/include/legoflctexturepresenter.h"
|
||||
#include "lego/legoomni/include/legogamestate.h"
|
||||
#include "lego/legoomni/include/legohideanimpresenter.h"
|
||||
#include "lego/legoomni/include/legoinputmanager.h"
|
||||
#include "lego/legoomni/include/legoloadcachesoundpresenter.h"
|
||||
#include "lego/legoomni/include/legolocations.h"
|
||||
#include "lego/legoomni/include/legolocomotionanimpresenter.h"
|
||||
#include "lego/legoomni/include/legolodlist.h"
|
||||
#include "lego/legoomni/include/legoloopinganimpresenter.h"
|
||||
#include "lego/legoomni/include/legomain.h"
|
||||
#include "lego/legoomni/include/legometerpresenter.h"
|
||||
#include "lego/legoomni/include/legomodelpresenter.h"
|
||||
|
||||
@ -3,15 +3,27 @@
|
||||
|
||||
class MxCriticalSection;
|
||||
|
||||
#ifdef BETA10
|
||||
#define AUTOLOCK(CS) MxAutoLock lock(&CS, __FILE__, __LINE__)
|
||||
#else
|
||||
#define AUTOLOCK(CS) MxAutoLock lock(&CS)
|
||||
#endif
|
||||
|
||||
class MxAutoLock {
|
||||
public:
|
||||
#ifdef BETA10
|
||||
MxAutoLock(MxCriticalSection* p_criticalSection, const char* filename, int line);
|
||||
#else
|
||||
MxAutoLock(MxCriticalSection* p_criticalSection);
|
||||
#endif
|
||||
~MxAutoLock();
|
||||
|
||||
private:
|
||||
MxCriticalSection* m_criticalSection; // 0x00
|
||||
|
||||
#ifdef BETA10
|
||||
unsigned long m_currentThreadId; // 0x04
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // MXAUTOLOCK_H
|
||||
|
||||
@ -11,7 +11,11 @@ class MxCriticalSection {
|
||||
|
||||
static void SetDoMutex();
|
||||
|
||||
#ifdef BETA10
|
||||
void Enter(unsigned long p_threadId, const char* filename, int line);
|
||||
#else
|
||||
void Enter();
|
||||
#endif
|
||||
void Leave();
|
||||
|
||||
private:
|
||||
@ -22,4 +26,11 @@ class MxCriticalSection {
|
||||
SDL_Mutex* m_mutex;
|
||||
};
|
||||
|
||||
#ifdef BETA10
|
||||
// TODO: Not quite correct yet, the second argument becomes a relocated value
|
||||
#define ENTER(criticalSection) criticalSection.Enter(-1, NULL, 0)
|
||||
#else
|
||||
#define ENTER(criticalSection) criticalSection.Enter()
|
||||
#endif
|
||||
|
||||
#endif // MXCRITICALSECTION_H
|
||||
|
||||
@ -254,11 +254,11 @@ inline MxBool MxListCursor<T>::Next()
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||
{
|
||||
if (!m_match) {
|
||||
m_match = m_list->m_first;
|
||||
if (m_match) {
|
||||
m_match = m_match->GetNext();
|
||||
}
|
||||
else {
|
||||
m_match = m_match->GetNext();
|
||||
m_match = m_list->m_first;
|
||||
}
|
||||
|
||||
if (m_match) {
|
||||
|
||||
@ -26,7 +26,7 @@ class MxSoundManager : public MxAudioManager {
|
||||
|
||||
float GetAttenuation(MxU32 p_volume);
|
||||
|
||||
MxPresenter* FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_objectId);
|
||||
MxPresenter* FindPresenter(const MxAtomId& p_atomId, MxU32 p_objectId);
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
@ -26,7 +26,7 @@ void MxAudioManager::Init()
|
||||
// FUNCTION: LEGO1 0x100b8e00
|
||||
void MxAudioManager::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
g_count--;
|
||||
Init();
|
||||
m_criticalSection.Leave();
|
||||
@ -43,7 +43,7 @@ MxResult MxAudioManager::Create()
|
||||
MxBool success = FALSE;
|
||||
|
||||
if (MxMediaManager::Create() == SUCCESS) {
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
success = TRUE;
|
||||
result = SUCCESS;
|
||||
g_count++;
|
||||
@ -69,7 +69,7 @@ void MxAudioManager::Destroy()
|
||||
// FUNCTION: LEGO1 0x100b8ea0
|
||||
void MxAudioManager::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
m_volume = p_volume;
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ void MxSoundManager::Destroy(MxBool p_fromDestructor)
|
||||
TickleManager()->UnregisterClient(this);
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_stream) {
|
||||
SDL_DestroyAudioStream(m_stream);
|
||||
@ -82,7 +82,7 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
locked = TRUE;
|
||||
|
||||
engineConfig = ma_engine_config_init();
|
||||
@ -167,7 +167,7 @@ void MxSoundManager::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
MxAudioManager::SetVolume(p_volume);
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(m_presenters);
|
||||
@ -180,7 +180,7 @@ void MxSoundManager::SetVolume(MxS32 p_volume)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aebd0
|
||||
MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_objectId)
|
||||
MxPresenter* MxSoundManager::FindPresenter(const MxAtomId& p_atomId, MxU32 p_objectId)
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
MSoundManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
MxMediaPresenter::Init();
|
||||
m_criticalSection.Leave();
|
||||
|
||||
|
||||
@ -289,7 +289,7 @@ void MxWavePresenter::EndAction()
|
||||
// FUNCTION: LEGO1 0x100b2300
|
||||
void MxWavePresenter::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
m_volume = p_volume;
|
||||
if (m_sound) {
|
||||
|
||||
@ -25,7 +25,7 @@ MxCompositePresenter::~MxCompositePresenter()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6410
|
||||
// FUNCTION: BETA10 0x100e9d37
|
||||
// FUNCTION: BETA10 0x10137344
|
||||
MxResult MxCompositePresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
@ -48,7 +48,7 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
MxResult result = MxMediaManager::Create();
|
||||
if (result == SUCCESS) {
|
||||
if (p_createThread) {
|
||||
this->m_criticalSection.Enter();
|
||||
ENTER(this->m_criticalSection);
|
||||
locked = TRUE;
|
||||
this->m_thread = new MxTickleThread(this, p_frequencyMS);
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ void MxEventPresenter::Destroy()
|
||||
EventManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_data) {
|
||||
delete[] m_data;
|
||||
|
||||
@ -2,8 +2,19 @@
|
||||
|
||||
#include "mxcriticalsection.h"
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8ed0
|
||||
#ifdef BETA10
|
||||
// FUNCTION: BETA10 0x101386f0
|
||||
MxAutoLock::MxAutoLock(MxCriticalSection* p_criticalSection, const char* filename, int line)
|
||||
{
|
||||
m_criticalSection = p_criticalSection;
|
||||
m_currentThreadId = GetCurrentThreadId();
|
||||
|
||||
if (m_criticalSection != NULL) {
|
||||
m_criticalSection->Enter(m_currentThreadId, filename, line);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x100b8ed0
|
||||
MxAutoLock::MxAutoLock(MxCriticalSection* p_criticalSection)
|
||||
{
|
||||
m_criticalSection = p_criticalSection;
|
||||
@ -12,6 +23,7 @@ MxAutoLock::MxAutoLock(MxCriticalSection* p_criticalSection)
|
||||
m_criticalSection->Enter();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8ef0
|
||||
// FUNCTION: BETA10 0x10138744
|
||||
|
||||
@ -22,14 +22,43 @@ MxCriticalSection::~MxCriticalSection()
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6d80
|
||||
#ifdef BETA10
|
||||
// FUNCTION: BETA10 0x1013c725
|
||||
void MxCriticalSection::Enter(unsigned long p_threadId, const char* filename, int line)
|
||||
{
|
||||
DWORD result;
|
||||
FILE* file;
|
||||
|
||||
if (m_mutex != NULL) {
|
||||
result = WaitForSingleObject(m_mutex, 5000);
|
||||
if (result == WAIT_FAILED) {
|
||||
file = fopen("C:\\DEADLOCK.TXT", "a");
|
||||
if (file != NULL) {
|
||||
fprintf(file, "mutex timeout occurred!\n");
|
||||
fprintf(file, "file: %s, line: %d\n", filename, line);
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
abort();
|
||||
}
|
||||
}
|
||||
else {
|
||||
EnterCriticalSection(&m_criticalSection);
|
||||
}
|
||||
|
||||
// There is way more structure in here, and the MxCriticalSection class is much larger in BETA10.
|
||||
// The LEGO1 compilation is very unlikely to profit from a further decompilation here.
|
||||
}
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x100b6d80
|
||||
void MxCriticalSection::Enter()
|
||||
{
|
||||
SDL_LockMutex(m_mutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6de0
|
||||
// FUNCTION: BETA10 0x1013c7ef
|
||||
void MxCriticalSection::Leave()
|
||||
{
|
||||
SDL_UnlockMutex(m_mutex);
|
||||
|
||||
@ -29,7 +29,7 @@ void MxLoopingFlcPresenter::Init()
|
||||
// FUNCTION: LEGO1 0x100b4430
|
||||
void MxLoopingFlcPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
Init();
|
||||
m_criticalSection.Leave();
|
||||
|
||||
@ -117,7 +117,7 @@ MxResult MxLoopingFlcPresenter::AddToManager()
|
||||
MxBool locked = FALSE;
|
||||
|
||||
if (MxFlcPresenter::AddToManager() == SUCCESS) {
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
locked = TRUE;
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ void MxLoopingSmkPresenter::Init()
|
||||
// FUNCTION: LEGO1 0x100b49d0
|
||||
void MxLoopingSmkPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
Init();
|
||||
m_criticalSection.Leave();
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ void MxSmkPresenter::Init()
|
||||
// FUNCTION: LEGO1 0x100b3900
|
||||
void MxSmkPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
MxSmk::Destroy(&m_mxSmk);
|
||||
Init();
|
||||
|
||||
@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c);
|
||||
// FUNCTION: LEGO1 0x100b9c70
|
||||
void MxStillPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_bitmapInfo) {
|
||||
delete[] ((MxU8*) m_bitmapInfo);
|
||||
|
||||
@ -54,7 +54,7 @@ void MxVideoManager::Destroy(MxBool p_fromDestructor)
|
||||
TickleManager()->UnregisterClient(this);
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_displaySurface) {
|
||||
delete m_displaySurface;
|
||||
@ -154,7 +154,7 @@ MxResult MxVideoManager::VTable0x28(
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
locked = TRUE;
|
||||
|
||||
m_videoParam = p_videoParam;
|
||||
@ -229,7 +229,7 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS,
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
locked = TRUE;
|
||||
|
||||
m_videoParam = p_videoParam;
|
||||
@ -316,7 +316,7 @@ void MxVideoManager::Destroy()
|
||||
// FUNCTION: LEGO1 0x100bea60
|
||||
void MxVideoManager::InvalidateRect(MxRect32& p_rect)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (m_region) {
|
||||
m_region->AddRect(p_rect);
|
||||
@ -356,7 +356,7 @@ MxResult MxVideoManager::RealizePalette(MxPalette* p_palette)
|
||||
{
|
||||
PALETTEENTRY paletteEntries[256];
|
||||
|
||||
m_criticalSection.Enter();
|
||||
ENTER(m_criticalSection);
|
||||
|
||||
if (p_palette && m_videoParam.GetPalette()) {
|
||||
p_palette->GetEntries(paletteEntries);
|
||||
|
||||
@ -153,6 +153,7 @@ void OrientableROI::UpdateWorldDataWithTransformAndChildren(const Matrix4& p_tra
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5a30
|
||||
// FUNCTION: BETA10 0x10167d31
|
||||
void OrientableROI::SetWorldVelocity(const Vector3& p_world_velocity)
|
||||
{
|
||||
m_world_velocity = p_world_velocity;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user