mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-04-07 20:24:26 -04:00
Improve order until legomain.cpp
(#1350)
* Fix `LegoBackgroundColor` order * Order * Improve order in Act3Actors * Improve order * Add BETA annotation * Order more * More order * More order * Order * Match/order * Remove blank line * Modern compiler fix * vtable annotation
This commit is contained in:
parent
e1ce96c473
commit
fc03e7a682
24 changed files with 218 additions and 208 deletions
CMakeLists.txt
LEGO1
lego
legoomni
include
act3actors.hlegoact2.hlegoanimactor.hlegoanimmmpresenter.hlegogamestate.hlegopathactor.hlegopathcontroller.hmxcontrolpresenter.htowtrack.h
src
sources
omni/include
realtime
|
@ -340,7 +340,6 @@ function(add_lego_libraries NAME)
|
|||
LEGO1/lego/legoomni/src/common/legovariables.cpp
|
||||
LEGO1/lego/legoomni/src/actors/pizza.cpp
|
||||
LEGO1/lego/legoomni/src/common/legogamestate.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3ammo.cpp
|
||||
LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp
|
||||
LEGO1/lego/legoomni/src/common/legoutils.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3actors.cpp
|
||||
|
@ -350,7 +349,6 @@ function(add_lego_libraries NAME)
|
|||
LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/legophoneme.cpp
|
||||
LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp
|
||||
LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp
|
||||
|
@ -361,9 +359,11 @@ function(add_lego_libraries NAME)
|
|||
LEGO1/lego/legoomni/src/worlds/legoact2.cpp
|
||||
LEGO1/lego/legoomni/src/main/scripts.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3ammo.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp
|
||||
LEGO1/lego/legoomni/src/paths/legopathboundary.cpp
|
||||
LEGO1/lego/legoomni/src/main/legomain.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp
|
||||
LEGO1/lego/legoomni/src/input/legoinputmanager.cpp
|
||||
LEGO1/lego/legoomni/src/race/legoracemap.cpp
|
||||
LEGO1/lego/legoomni/src/worlds/jukebox.cpp
|
||||
|
|
|
@ -10,6 +10,44 @@ struct LegoBuildingInfo;
|
|||
struct LegoPlantInfo;
|
||||
class LegoWorld;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7920 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d79f0 LegoAnimActor
|
||||
// SIZE 0x1a8
|
||||
class Act3Shark : public LegoAnimActor {
|
||||
public:
|
||||
Act3Shark();
|
||||
|
||||
void ParseAction(char*) override; // vtable+0x20
|
||||
void Animate(float p_time) override; // vtable+0x70
|
||||
|
||||
// LegoAnimActor vtable
|
||||
virtual MxResult EatPizza(Act3Ammo* p_ammo); // vtable+0x10
|
||||
|
||||
// FUNCTION: LEGO1 0x100430d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// Does not exist in BETA10
|
||||
// STRING: LEGO1 0x100f03a0
|
||||
return "Act3Shark";
|
||||
}
|
||||
|
||||
MxFloat GetUnknown0x2c() { return m_unk0x2c; }
|
||||
|
||||
void SetUnknown0x2c(MxFloat p_unk0x2c) { m_unk0x2c = p_unk0x2c; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10043030
|
||||
// Act3Shark::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
list<Act3Ammo*> m_eatPizzas; // 0x1c
|
||||
Act3Ammo* m_nextPizza; // 0x28
|
||||
MxFloat m_unk0x2c; // 0x2c
|
||||
LegoWorld* m_world; // 0x30
|
||||
LegoAnimActorStruct* m_unk0x34; // 0x34
|
||||
LegoROI* m_unk0x38; // 0x38
|
||||
Mx3DPointFloat m_unk0x3c; // 0x3c
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d7668 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d7738 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101b8a98 LegoPathActor
|
||||
|
@ -17,19 +55,11 @@ class LegoWorld;
|
|||
// SIZE 0x178
|
||||
class Act3Actor : public LegoAnimActor {
|
||||
public:
|
||||
struct Act3CopDest {
|
||||
// name verified by BETA10 0x10018776
|
||||
const char* m_bName; // 0x00
|
||||
|
||||
// name verified by BETA10 0x100187cb
|
||||
LegoPathBoundary* m_boundary; // 0x04
|
||||
|
||||
MxFloat m_unk0x08[3]; // 0x08
|
||||
MxFloat m_unk0x14[3]; // 0x14
|
||||
};
|
||||
|
||||
Act3Actor();
|
||||
|
||||
MxU32 VTable0x90(float p_time, Matrix4& p_transform) override; // vtable+0x90
|
||||
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
||||
|
||||
// FUNCTION: LEGO1 0x100431b0
|
||||
// FUNCTION: BETA10 0x1001d320
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -38,9 +68,6 @@ public:
|
|||
return "Act3Actor";
|
||||
}
|
||||
|
||||
MxU32 VTable0x90(float p_time, Matrix4& p_transform) override; // vtable+0x90
|
||||
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
||||
|
||||
MxFloat GetUnknown0x1c() { return m_unk0x1c; }
|
||||
|
||||
void SetUnknown0x1c(MxFloat p_unk0x1c) { m_unk0x1c = p_unk0x1c; }
|
||||
|
@ -62,6 +89,17 @@ private:
|
|||
// SIZE 0x188
|
||||
class Act3Cop : public Act3Actor {
|
||||
public:
|
||||
struct Act3CopDest {
|
||||
// name verified by BETA10 0x10018776
|
||||
const char* m_bName; // 0x00
|
||||
|
||||
// name verified by BETA10 0x100187cb
|
||||
LegoPathBoundary* m_boundary; // 0x04
|
||||
|
||||
MxFloat m_unk0x08[3]; // 0x08
|
||||
MxFloat m_unk0x14[3]; // 0x14
|
||||
};
|
||||
|
||||
Act3Cop();
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
|
@ -137,44 +175,6 @@ private:
|
|||
MxU8 m_unk0x58; // 0x58
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d7920 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d79f0 LegoAnimActor
|
||||
// SIZE 0x1a8
|
||||
class Act3Shark : public LegoAnimActor {
|
||||
public:
|
||||
Act3Shark();
|
||||
|
||||
// FUNCTION: LEGO1 0x100430d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// Does not exist in BETA10
|
||||
// STRING: LEGO1 0x100f03a0
|
||||
return "Act3Shark";
|
||||
}
|
||||
|
||||
void ParseAction(char*) override; // vtable+0x20
|
||||
void Animate(float p_time) override; // vtable+0x70
|
||||
|
||||
// LegoAnimActor vtable
|
||||
virtual MxResult EatPizza(Act3Ammo* p_ammo); // vtable+0x10
|
||||
|
||||
MxFloat GetUnknown0x2c() { return m_unk0x2c; }
|
||||
|
||||
void SetUnknown0x2c(MxFloat p_unk0x2c) { m_unk0x2c = p_unk0x2c; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10043030
|
||||
// Act3Shark::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
list<Act3Ammo*> m_eatPizzas; // 0x1c
|
||||
Act3Ammo* m_nextPizza; // 0x28
|
||||
MxFloat m_unk0x2c; // 0x2c
|
||||
LegoWorld* m_world; // 0x30
|
||||
LegoAnimActorStruct* m_unk0x34; // 0x34
|
||||
LegoROI* m_unk0x38; // 0x38
|
||||
Mx3DPointFloat m_unk0x3c; // 0x3c
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x1003ff10
|
||||
// Act3Actor::`vbase destructor'
|
||||
|
||||
|
|
|
@ -65,10 +65,13 @@ public:
|
|||
MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
MxBool VTable0x5c() override; // vtable+0x5c
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fe10
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
|
||||
void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
|
||||
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
||||
|
|
|
@ -42,6 +42,16 @@ public:
|
|||
|
||||
~LegoAnimActor() override;
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
||||
void Animate(float p_time) override; // vtable+0x70
|
||||
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
|
||||
|
||||
virtual MxResult FUN_1001c1f0(float& p_und);
|
||||
virtual MxResult FUN_1001c360(float, Matrix4& p_transform);
|
||||
virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs);
|
||||
virtual void ClearMaps();
|
||||
|
||||
// FUNCTION: LEGO1 0x1000fba0
|
||||
// FUNCTION: BETA10 0x10012400
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -57,16 +67,6 @@ public:
|
|||
return !strcmp(p_name, LegoAnimActor::ClassName()) || LegoPathActor::IsA(p_name);
|
||||
}
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
||||
void Animate(float p_time) override; // vtable+0x70
|
||||
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
|
||||
|
||||
virtual MxResult FUN_1001c1f0(float& p_und);
|
||||
virtual MxResult FUN_1001c360(float, Matrix4& p_transform);
|
||||
virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs);
|
||||
virtual void ClearMaps();
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000fb60
|
||||
// LegoAnimActor::`scalar deleting destructor'
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef LEGOANIMMMPRESENTER_H
|
||||
#define LEGOANIMMMPRESENTER_H
|
||||
|
||||
// MxDSActionListCursor needs to be included before std::list
|
||||
// clang-format off
|
||||
#include "mxdsmultiaction.h"
|
||||
// clang-format on
|
||||
#include "mxcompositepresenter.h"
|
||||
|
||||
class LegoAnimPresenter;
|
||||
|
|
|
@ -26,6 +26,7 @@ struct ColorStringStruct {
|
|||
// SIZE 0x30
|
||||
class LegoBackgroundColor : public MxVariable {
|
||||
public:
|
||||
LegoBackgroundColor();
|
||||
LegoBackgroundColor(const char* p_key, const char* p_value);
|
||||
|
||||
void SetValue(const char* p_colorString) override; // vtable+0x04
|
||||
|
|
|
@ -37,20 +37,6 @@ public:
|
|||
LegoPathActor();
|
||||
~LegoPathActor() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c430
|
||||
// FUNCTION: BETA10 0x10012790
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0114
|
||||
return "LegoPathActor";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c440
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name);
|
||||
}
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
virtual MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3); // vtable+0x68
|
||||
virtual MxU32 VTable0x6c(
|
||||
|
@ -137,6 +123,20 @@ public:
|
|||
// FUNCTION: LEGO1 0x10002de0
|
||||
virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c430
|
||||
// FUNCTION: BETA10 0x10012790
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0114
|
||||
return "LegoPathActor";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c440
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name);
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1001ca40
|
||||
LegoPathBoundary* GetBoundary() { return m_boundary; }
|
||||
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
#include "geom/legounkown100db7f4.h"
|
||||
#include "legopathactor.h"
|
||||
#include "legopathboundary.h"
|
||||
#include "mxcore.h"
|
||||
#include "legopathstruct.h"
|
||||
#include "mxstl/stlcompat.h"
|
||||
|
||||
class LegoAnimPresenter;
|
||||
class LegoPathStruct;
|
||||
class LegoWorld;
|
||||
class MxAtomId;
|
||||
class Vector3;
|
||||
|
|
|
@ -15,6 +15,15 @@ public:
|
|||
MxControlPresenter();
|
||||
~MxControlPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x10043fd0
|
||||
void RepeatingTickle() override {} // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x10043fe0
|
||||
MxBool VTable0x64(undefined4 p_undefined) override { return m_unk0x50; } // vtable+0x64
|
||||
|
||||
// FUNCTION: LEGO1 0x10043ff0
|
||||
virtual void VTable0x68(MxBool p_unk0x50) { m_unk0x50 = p_unk0x50; } // vtable+0x68
|
||||
|
||||
// FUNCTION: LEGO1 0x10044000
|
||||
// FUNCTION: BETA10 0x100ebf80
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -30,15 +39,12 @@ public:
|
|||
}
|
||||
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c
|
||||
void EndAction() override; // vtable+0x40
|
||||
MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
MxBool VTable0x64(undefined4 p_undefined) override; // vtable+0x64
|
||||
virtual void VTable0x68(MxBool p_unk0x50); // vtable+0x68
|
||||
virtual void VTable0x6c(MxS16 p_unk0x4e); // vtable+0x6c
|
||||
|
||||
MxBool FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter);
|
||||
|
|
|
@ -14,6 +14,40 @@ class TowTrackMissionState : public LegoState {
|
|||
public:
|
||||
TowTrackMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dde0
|
||||
// FUNCTION: BETA10 0x100f8720
|
||||
MxResult Serialize(LegoStorage* p_storage) override
|
||||
{
|
||||
LegoState::Serialize(p_storage);
|
||||
|
||||
if (p_storage->IsReadMode()) {
|
||||
p_storage->ReadS16(m_peScore);
|
||||
p_storage->ReadS16(m_maScore);
|
||||
p_storage->ReadS16(m_paScore);
|
||||
p_storage->ReadS16(m_niScore);
|
||||
p_storage->ReadS16(m_laScore);
|
||||
p_storage->ReadS16(m_peHighScore);
|
||||
p_storage->ReadS16(m_maHighScore);
|
||||
p_storage->ReadS16(m_paHighScore);
|
||||
p_storage->ReadS16(m_niHighScore);
|
||||
p_storage->ReadS16(m_laHighScore);
|
||||
}
|
||||
else if (p_storage->IsWriteMode()) {
|
||||
p_storage->WriteS16(m_peScore);
|
||||
p_storage->WriteS16(m_maScore);
|
||||
p_storage->WriteS16(m_paScore);
|
||||
p_storage->WriteS16(m_niScore);
|
||||
p_storage->WriteS16(m_laScore);
|
||||
p_storage->WriteS16(m_peHighScore);
|
||||
p_storage->WriteS16(m_maHighScore);
|
||||
p_storage->WriteS16(m_paHighScore);
|
||||
p_storage->WriteS16(m_niHighScore);
|
||||
p_storage->WriteS16(m_laHighScore);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
} // vtable+0x1c
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dfa0
|
||||
// FUNCTION: BETA10 0x100f8920
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -28,8 +62,6 @@ public:
|
|||
return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c
|
||||
|
||||
// FUNCTION: BETA10 0x10088890
|
||||
MxS16 GetHighScore(MxU8 p_actorId)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ DECOMP_SIZE_ASSERT(Act3Shark, 0x1a8)
|
|||
// name verified by BETA10 0x10018776
|
||||
// GLOBAL: LEGO1 0x100f4120
|
||||
// GLOBAL: BETA10 0x101dcdc8
|
||||
Act3Actor::Act3CopDest g_copDest[5] = {
|
||||
Act3Cop::Act3CopDest g_copDest[5] = {
|
||||
{"INT38", NULL, {3.69, -1.31251, -59.231}, {-0.99601698, 0.0, -0.089166}},
|
||||
{
|
||||
"EDG02_08",
|
||||
|
@ -1012,9 +1012,6 @@ MxResult Act3Brickster::FUN_100417c0()
|
|||
// FUNCTION: BETA10 0x1001b017
|
||||
MxS32 Act3Brickster::FUN_10042300()
|
||||
{
|
||||
// TODO: Has poor inlining, can be fixed by changing the assignment operator in vector.h
|
||||
// See extended comment in vector.h for operator=
|
||||
|
||||
Act3* a3 = (Act3*) m_world;
|
||||
|
||||
assert(a3 && a3->m_cop1 && a3->m_cop2);
|
||||
|
|
|
@ -607,37 +607,3 @@ TowTrackMissionState::TowTrackMissionState()
|
|||
m_niHighScore = 0;
|
||||
m_laHighScore = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dde0
|
||||
// FUNCTION: BETA10 0x100f8720
|
||||
MxResult TowTrackMissionState::Serialize(LegoStorage* p_storage)
|
||||
{
|
||||
LegoState::Serialize(p_storage);
|
||||
|
||||
if (p_storage->IsReadMode()) {
|
||||
p_storage->ReadS16(m_peScore);
|
||||
p_storage->ReadS16(m_maScore);
|
||||
p_storage->ReadS16(m_paScore);
|
||||
p_storage->ReadS16(m_niScore);
|
||||
p_storage->ReadS16(m_laScore);
|
||||
p_storage->ReadS16(m_peHighScore);
|
||||
p_storage->ReadS16(m_maHighScore);
|
||||
p_storage->ReadS16(m_paHighScore);
|
||||
p_storage->ReadS16(m_niHighScore);
|
||||
p_storage->ReadS16(m_laHighScore);
|
||||
}
|
||||
else if (p_storage->IsWriteMode()) {
|
||||
p_storage->WriteS16(m_peScore);
|
||||
p_storage->WriteS16(m_maScore);
|
||||
p_storage->WriteS16(m_paScore);
|
||||
p_storage->WriteS16(m_niScore);
|
||||
p_storage->WriteS16(m_laScore);
|
||||
p_storage->WriteS16(m_peHighScore);
|
||||
p_storage->WriteS16(m_maHighScore);
|
||||
p_storage->WriteS16(m_paHighScore);
|
||||
p_storage->WriteS16(m_niHighScore);
|
||||
p_storage->WriteS16(m_laHighScore);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ LegoCacheSoundManager::~LegoCacheSoundManager()
|
|||
|
||||
while (!m_list.empty()) {
|
||||
sound = (*m_list.begin()).GetSound();
|
||||
// TODO: LegoCacheSoundEntry::~LegoCacheSoundEntry should not be inlined here
|
||||
m_list.erase(m_list.begin());
|
||||
sound->Stop();
|
||||
// DECOMP: delete should not be inlined here
|
||||
delete sound;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1084,6 +1084,7 @@ LegoState* LegoGameState::CreateState(const char* p_stateName)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bc30
|
||||
// FUNCTION: BETA10 0x1008636e
|
||||
void LegoGameState::RegisterState(LegoState* p_state)
|
||||
{
|
||||
MxS32 targetIndex;
|
||||
|
@ -1164,7 +1165,16 @@ void LegoGameState::Init()
|
|||
m_unk0x42c = e_undefined;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10086510
|
||||
LegoBackgroundColor::LegoBackgroundColor()
|
||||
{
|
||||
m_h = 0.0f;
|
||||
m_s = 0.0f;
|
||||
m_v = 0.0f;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bfb0
|
||||
// FUNCTION: BETA10 0x1008659d
|
||||
LegoBackgroundColor::LegoBackgroundColor(const char* p_key, const char* p_value)
|
||||
{
|
||||
m_key = p_key;
|
||||
|
@ -1173,6 +1183,7 @@ LegoBackgroundColor::LegoBackgroundColor(const char* p_key, const char* p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c070
|
||||
// FUNCTION: BETA10 0x10086634
|
||||
void LegoBackgroundColor::SetValue(const char* p_colorString)
|
||||
{
|
||||
m_value = p_colorString;
|
||||
|
@ -1213,6 +1224,7 @@ void LegoBackgroundColor::SetValue(const char* p_colorString)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c230
|
||||
// FUNCTION: BETA10 0x100867f9
|
||||
void LegoBackgroundColor::ToggleDayNight(MxBool p_sun)
|
||||
{
|
||||
char buffer[30];
|
||||
|
@ -1240,6 +1252,7 @@ void LegoBackgroundColor::ToggleDayNight(MxBool p_sun)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c330
|
||||
// FUNCTION: BETA10 0x100868de
|
||||
void LegoBackgroundColor::ToggleSkyColor()
|
||||
{
|
||||
char buffer[30];
|
||||
|
@ -1259,6 +1272,7 @@ void LegoBackgroundColor::ToggleSkyColor()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c400
|
||||
// FUNCTION: BETA10 0x10086984
|
||||
void LegoBackgroundColor::SetLightColor(float p_r, float p_g, float p_b)
|
||||
{
|
||||
if (!VideoManager()->GetVideoParam().Flags().GetF2bit0()) {
|
||||
|
@ -1293,6 +1307,7 @@ void LegoBackgroundColor::SetLightColor()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c500
|
||||
// FUNCTION: BETA10 0x10086af6
|
||||
LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value)
|
||||
{
|
||||
m_key = p_key;
|
||||
|
@ -1301,6 +1316,7 @@ LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003c5c0
|
||||
// FUNCTION: BETA10 0x10086b8d
|
||||
void LegoFullScreenMovie::SetValue(const char* p_option)
|
||||
{
|
||||
m_value = p_option;
|
||||
|
@ -1310,12 +1326,9 @@ void LegoFullScreenMovie::SetValue(const char* p_option)
|
|||
if (videomanager) {
|
||||
if (!strcmp(m_value.GetData(), g_strEnable)) {
|
||||
videomanager->EnableFullScreenMovie(TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strcmp(m_value.GetData(), g_strDisable)) {
|
||||
else if (!strcmp(m_value.GetData(), g_strDisable)) {
|
||||
videomanager->EnableFullScreenMovie(FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,30 +14,12 @@ DECOMP_SIZE_ASSERT(MxControlPresenter, 0x5c)
|
|||
// FUNCTION: LEGO1 0x10043f50
|
||||
MxControlPresenter::MxControlPresenter()
|
||||
{
|
||||
this->m_unk0x4c = 0;
|
||||
this->m_unk0x4e = -1;
|
||||
this->m_unk0x50 = FALSE;
|
||||
this->m_unk0x52 = 0;
|
||||
this->m_unk0x58 = 0;
|
||||
this->m_unk0x54 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10043fd0
|
||||
void MxControlPresenter::RepeatingTickle()
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10043fe0
|
||||
MxBool MxControlPresenter::VTable0x64(undefined4 p_undefined)
|
||||
{
|
||||
return m_unk0x50;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10043ff0
|
||||
void MxControlPresenter::VTable0x68(MxBool p_unk0x50)
|
||||
{
|
||||
m_unk0x50 = p_unk0x50;
|
||||
m_unk0x4c = 0;
|
||||
m_unk0x4e = -1;
|
||||
m_unk0x50 = FALSE;
|
||||
m_unk0x52 = 0;
|
||||
m_unk0x58 = 0;
|
||||
m_unk0x54 = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10044110
|
||||
|
@ -89,6 +71,7 @@ void MxControlPresenter::EndAction()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10044270
|
||||
// FUNCTION: BETA10 0x100eae68
|
||||
MxBool MxControlPresenter::FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter* p_presenter)
|
||||
{
|
||||
if (m_unk0x4c == 3) {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "mxautolock.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxdisplaysurface.h"
|
||||
#include "mxdsfile.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxomnicreateflags.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "legopathcontroller.h"
|
||||
|
||||
#include "legopathedgecontainer.h"
|
||||
#include "legopathstruct.h"
|
||||
#include "misc/legostorage.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxticklemanager.h"
|
||||
|
@ -214,12 +213,21 @@ MxResult LegoPathController::PlaceActor(
|
|||
}
|
||||
|
||||
LegoPathBoundary* pBoundary = GetPathBoundary(p_name);
|
||||
|
||||
assert(pBoundary);
|
||||
assert(p_src < pBoundary->GetNumEdges() && p_dest < pBoundary->GetNumEdges());
|
||||
|
||||
LegoEdge* pSrcE = pBoundary->GetEdges()[p_src];
|
||||
LegoEdge* pDestE = pBoundary->GetEdges()[p_dest];
|
||||
float time = Timer()->GetTime();
|
||||
|
||||
if (p_actor->VTable0x88(pBoundary, time, *pSrcE, p_srcScale, (LegoUnknown100db7f4&) *pDestE, p_destScale) !=
|
||||
SUCCESS) {
|
||||
assert(pSrcE && pDestE);
|
||||
|
||||
float time = Timer()->GetTime();
|
||||
MxResult result =
|
||||
p_actor->VTable0x88(pBoundary, time, *pSrcE, p_srcScale, (LegoUnknown100db7f4&) *pDestE, p_destScale);
|
||||
|
||||
if (result != SUCCESS) {
|
||||
assert(0);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
@ -679,7 +687,7 @@ MxResult LegoPathController::ReadBoundaries(LegoStorage* p_storage)
|
|||
|
||||
if (boundary.m_numTriggers > 0) {
|
||||
boundary.m_unk0x50 = new Mx3DPointFloat;
|
||||
boundary.m_pathTrigger = new LegoWEGEdge::PathWithTrigger[boundary.m_numTriggers];
|
||||
boundary.m_pathTrigger = new PathWithTrigger[boundary.m_numTriggers];
|
||||
|
||||
for (j = 0; j < boundary.m_numTriggers; j++) {
|
||||
if (p_storage->Read(&s, sizeof(s)) != SUCCESS) {
|
||||
|
|
|
@ -92,12 +92,6 @@ LegoAct2::LegoAct2()
|
|||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fe10
|
||||
MxBool LegoAct2::VTable0x5c()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fe40
|
||||
// FUNCTION: BETA10 0x1003a6f0
|
||||
LegoAct2::~LegoAct2()
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoWEGEdge, 0x54)
|
||||
DECOMP_SIZE_ASSERT(LegoWEGEdge::PathWithTrigger, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(PathWithTrigger, 0x0c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a730
|
||||
// FUNCTION: BETA10 0x101830ec
|
||||
|
|
|
@ -1,13 +1,32 @@
|
|||
#ifndef __LEGOWEGEDGE_H
|
||||
#define __LEGOWEGEDGE_H
|
||||
|
||||
class LegoPathStruct;
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoweedge.h"
|
||||
|
||||
// This struct might have been defined elsewhere (legopathstruct.h?).
|
||||
// Must be defined before the inclusion of Mx4DPointFloat for correct order
|
||||
// SIZE 0x0c
|
||||
struct PathWithTrigger {
|
||||
// FUNCTION: LEGO1 0x10048280
|
||||
// FUNCTION: BETA10 0x100bd450
|
||||
PathWithTrigger()
|
||||
{
|
||||
m_pathStruct = NULL;
|
||||
m_data = 0;
|
||||
m_unk0x08 = 0.0f;
|
||||
}
|
||||
|
||||
LegoPathStruct* m_pathStruct; // 0x00
|
||||
unsigned int m_data; // 0x04
|
||||
float m_unk0x08; // 0x08
|
||||
};
|
||||
|
||||
#include "mxgeometry/mxgeometry3d.h"
|
||||
#include "mxgeometry/mxgeometry4d.h"
|
||||
|
||||
class LegoPathStruct;
|
||||
|
||||
// might be a struct with public members
|
||||
// VTABLE: LEGO1 0x100db7f8
|
||||
// SIZE 0x54
|
||||
|
@ -20,22 +39,6 @@ public:
|
|||
c_bit5 = 0x10
|
||||
};
|
||||
|
||||
// SIZE 0x0c
|
||||
struct PathWithTrigger {
|
||||
// FUNCTION: LEGO1 0x10048280
|
||||
// FUNCTION: BETA10 0x100bd450
|
||||
PathWithTrigger()
|
||||
{
|
||||
m_pathStruct = NULL;
|
||||
m_data = 0;
|
||||
m_unk0x08 = 0.0f;
|
||||
}
|
||||
|
||||
LegoPathStruct* m_pathStruct; // 0x00
|
||||
unsigned int m_data; // 0x04
|
||||
float m_unk0x08; // 0x08
|
||||
};
|
||||
|
||||
LegoWEGEdge();
|
||||
~LegoWEGEdge() override;
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ class LegoContainerInfo : public map<const char*, T*, LegoContainerInfoComparato
|
|||
template <class T>
|
||||
class LegoContainer {
|
||||
public:
|
||||
LegoContainer() { m_ownership = TRUE; }
|
||||
|
||||
virtual ~LegoContainer()
|
||||
{
|
||||
#ifdef COMPAT_MODE
|
||||
|
@ -115,7 +117,6 @@ typedef list<LegoCachedTexture> LegoCachedTextureList;
|
|||
// SIZE 0x24
|
||||
class LegoTextureContainer : public LegoContainer<LegoTextureInfo> {
|
||||
public:
|
||||
LegoTextureContainer() { m_ownership = TRUE; }
|
||||
~LegoTextureContainer() override;
|
||||
|
||||
LegoTextureInfo* GetCached(LegoTextureInfo* p_textureInfo);
|
||||
|
|
|
@ -40,15 +40,15 @@ public:
|
|||
MxBitmap();
|
||||
~MxBitmap() override; // vtable+00
|
||||
|
||||
virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+14
|
||||
virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+18
|
||||
virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool); // vtable+1c
|
||||
virtual MxResult LoadFile(HANDLE p_handle); // vtable+20
|
||||
virtual MxLong Read(const char* p_filename); // vtable+24
|
||||
virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+0x14
|
||||
virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+0x18
|
||||
virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool); // vtable+0x1c
|
||||
virtual MxResult LoadFile(HANDLE p_handle); // vtable+0x20
|
||||
virtual MxLong Read(const char* p_filename); // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x1004e0d0
|
||||
// FUNCTION: BETA10 0x10060fc0
|
||||
virtual int VTable0x28(int) { return -1; } // vtable+28
|
||||
virtual MxS32 VTable0x28(MxS32) { return -1; } // vtable+0x28
|
||||
|
||||
virtual void BitBlt(
|
||||
MxBitmap* p_src,
|
||||
|
@ -58,7 +58,7 @@ public:
|
|||
MxS32 p_bottom,
|
||||
MxS32 p_width,
|
||||
MxS32 p_height
|
||||
); // vtable+2c
|
||||
); // vtable+0x2c
|
||||
virtual void BitBltTransparent(
|
||||
MxBitmap* p_src,
|
||||
MxS32 p_left,
|
||||
|
@ -67,10 +67,10 @@ public:
|
|||
MxS32 p_bottom,
|
||||
MxS32 p_width,
|
||||
MxS32 p_height
|
||||
); // vtable+30
|
||||
virtual MxPalette* CreatePalette(); // vtable+34
|
||||
virtual void ImportPalette(MxPalette* p_palette); // vtable+38
|
||||
virtual MxResult SetBitDepth(MxBool); // vtable+3c
|
||||
); // vtable+0x30
|
||||
virtual MxPalette* CreatePalette(); // vtable+0x34
|
||||
virtual void ImportPalette(MxPalette* p_palette); // vtable+0x38
|
||||
virtual MxResult SetBitDepth(MxBool); // vtable+0x3c
|
||||
virtual MxResult StretchBits(
|
||||
HDC p_hdc,
|
||||
MxS32 p_xSrc,
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
MxS32 p_yDest,
|
||||
MxS32 p_destWidth,
|
||||
MxS32 p_destHeight
|
||||
); // vtable+40
|
||||
); // vtable+0x40
|
||||
|
||||
// Bit mask trick to round up to the nearest multiple of four.
|
||||
// Pixel data may be stored with padding.
|
||||
|
|
|
@ -13,6 +13,9 @@ public:
|
|||
// FUNCTION: LEGO1 0x10043550
|
||||
~MxStillPresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x100435b0
|
||||
void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
|
||||
// FUNCTION: BETA10 0x100980c0
|
||||
static const char* HandlerClassName()
|
||||
{
|
||||
|
@ -33,14 +36,10 @@ public:
|
|||
return !strcmp(p_name, MxStillPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
|
||||
// FUNCTION: LEGO1 0x100435b0
|
||||
void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
void CreateBitmap() override; // vtable+0x60
|
||||
|
|
|
@ -49,6 +49,8 @@ public:
|
|||
inline void Swap(int p_d1, int p_d2);
|
||||
|
||||
float* operator[](int idx) { return m_data[idx]; }
|
||||
|
||||
// FUNCTION: BETA10 0x10017780
|
||||
const float* operator[](int idx) const { return m_data[idx]; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue