mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Compare commits
38 Commits
2451b041f6
...
continuous
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
828254cbfe | ||
|
|
fe5a238ae1 | ||
|
|
e355b55907 | ||
|
|
9531678dfd | ||
|
|
d05d583368 | ||
|
|
c06ffe71b5 | ||
|
|
6c83ceb549 | ||
|
|
0832bedbf2 | ||
|
|
4460d2a33d | ||
|
|
ef2d438a7d | ||
|
|
e3b77fb50b | ||
|
|
48febaf5c5 | ||
|
|
a7c43cbe17 | ||
|
|
190c040c96 | ||
|
|
34293a9c04 | ||
|
|
7c95890cad | ||
|
|
689b44d87c | ||
|
|
15fec495e5 | ||
|
|
61eaea8bb4 | ||
|
|
1a317a3ef8 | ||
|
|
4eba95c309 | ||
|
|
33c4d1fdcb | ||
|
|
3d6ab8ff9d | ||
|
|
2fc48b620e | ||
|
|
48b922d8f0 | ||
|
|
f381d692d0 | ||
|
|
67695b5233 | ||
|
|
1e9c0a95df | ||
|
|
3ed6c58701 | ||
|
|
d32384fc66 | ||
|
|
5361b01a10 | ||
|
|
5495da6c53 | ||
|
|
9f242021a4 | ||
|
|
0442fadc0e | ||
|
|
ddaf497cc4 | ||
|
|
d555df6a58 | ||
|
|
a9e261606d | ||
|
|
03adac0c58 |
6
.github/workflows/compare.yml
vendored
6
.github/workflows/compare.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
- name: Cache venv
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: venv-entropy-${{ github.run_id }}
|
||||
key: venv-entropy-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: .venv
|
||||
|
||||
- name: Install python packages
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
- name: Restore cached virtualenv
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: venv-entropy-${{ github.run_id }}
|
||||
key: venv-entropy-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: .venv
|
||||
|
||||
- name: Prepare builds
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
- name: Restore cached virtualenv
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: venv-entropy-${{ github.run_id }}
|
||||
key: venv-entropy-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: .venv
|
||||
|
||||
- name: Aggregate Accuracy
|
||||
|
||||
@@ -221,7 +221,7 @@ function(add_lego_libraries NAME)
|
||||
LEGO1/omni/src/common/mxcore.cpp
|
||||
LEGO1/omni/src/common/mxstring.cpp
|
||||
LEGO1/omni/src/audio/mxsoundmanager.cpp
|
||||
LEGO1/omni/src/main/mxomni.cpp
|
||||
LEGO1/omni/src/main/mxmain.cpp
|
||||
LEGO1/omni/src/notify/mxactionnotificationparam.cpp
|
||||
LEGO1/omni/src/main/mxomnicreateflags.cpp
|
||||
LEGO1/omni/src/main/mxomnicreateparam.cpp
|
||||
|
||||
@@ -324,9 +324,6 @@
|
||||
// GLOBAL: ISLE 0x411850
|
||||
// __cflush
|
||||
|
||||
// XGLOBAL ISLE 0x4125f8
|
||||
// ?_pnhHeap@@3P6AHI@ZA
|
||||
|
||||
// GLOBAL: ISLE 0x412888
|
||||
// ___setlc_active
|
||||
|
||||
|
||||
@@ -14,18 +14,24 @@ public:
|
||||
MxFloat m_position[3]; // 0x00
|
||||
MxFloat m_direction[3]; // 0x0c
|
||||
const char* m_boundary; // 0x18
|
||||
MxBool m_unk0x1c; // 0x1c
|
||||
MxBool m_cleared; // 0x1c
|
||||
};
|
||||
|
||||
enum VoiceOver {
|
||||
e_head = 0,
|
||||
e_behind = 1,
|
||||
e_interrupt = 2,
|
||||
};
|
||||
|
||||
Act2Actor();
|
||||
|
||||
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24
|
||||
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
||||
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform) override; // vtable+0x24
|
||||
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
||||
|
||||
// FUNCTION: LEGO1 0x1001a180
|
||||
MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3) override
|
||||
{
|
||||
if (m_unk0x1f) {
|
||||
if (m_animatingHit) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -35,16 +41,16 @@ public:
|
||||
void Animate(float p_time) override; // vtable+0x70
|
||||
MxResult HitActor(LegoPathActor*, MxBool) override; // vtable+0x94
|
||||
MxResult VTable0x9c() override; // vtable+0x9c
|
||||
MxS32 VTable0xa0() override; // vtable+0xa0
|
||||
MxS32 NextTargetLocation() override; // vtable+0xa0
|
||||
|
||||
void FUN_10018980();
|
||||
void FUN_10019250(MxFloat p_speed, MxFloat p_param2);
|
||||
void FUN_10019520();
|
||||
void FUN_10019560();
|
||||
MxU32 FUN_10019700(MxFloat p_param);
|
||||
void FUN_100199f0(MxS8 p_param);
|
||||
void FUN_100192a0(undefined4 p_location);
|
||||
LegoEntity* FUN_10019b90(MxBool* p_param);
|
||||
void InitializeNextShot();
|
||||
void SetWorldSpeed(MxFloat p_speed, MxFloat p_resetWorldSpeedAt);
|
||||
void GoingToHide();
|
||||
void Hide();
|
||||
MxU32 UpdateShot(MxFloat p_time);
|
||||
void PlayNextVoiceOver(MxS8 p_voiceOverType);
|
||||
void FindPath(MxU32 p_location);
|
||||
LegoEntity* GetNextEntity(MxBool* p_isBuilding);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1001a0a0
|
||||
// Act2Actor::`scalar deleting destructor'
|
||||
@@ -54,22 +60,31 @@ public:
|
||||
// `vbtable'
|
||||
|
||||
private:
|
||||
undefined m_unk0x1c; // 0x1c
|
||||
MxS8 m_unk0x1d; // 0x1d
|
||||
undefined m_unk0x1e; // 0x1e
|
||||
MxBool m_unk0x1f; // 0x1f
|
||||
MxFloat m_unk0x20; // 0x20
|
||||
MxFloat m_unk0x24; // 0x24
|
||||
MxS8 m_unk0x28; // 0x28
|
||||
MxFloat m_unk0x2c; // 0x2c
|
||||
MxFloat m_unk0x30; // 0x30
|
||||
LegoAnimActorStruct* m_shootAnim; // 0x34
|
||||
LegoCacheSound* m_unk0x38; // 0x38
|
||||
undefined4 m_unk0x3c; // 0x3c
|
||||
undefined m_unk0x40; // 0x40
|
||||
MxFloat m_unk0x44; // 0x44
|
||||
MxS8 m_unk0x48; // 0x48
|
||||
LegoEntity* m_unk0x4c; // 0x4c
|
||||
enum {
|
||||
e_readyToShoot = 0,
|
||||
e_endShot = 1,
|
||||
e_roaming = 2,
|
||||
e_createdBrick = 3,
|
||||
e_goingToHide = 4,
|
||||
e_hiding = 5,
|
||||
};
|
||||
|
||||
MxBool m_skipAnimation; // 0x1c
|
||||
MxS8 m_targetLocation; // 0x1d
|
||||
MxU8 m_state; // 0x1e
|
||||
MxBool m_animatingHit; // 0x1f
|
||||
MxFloat m_animationDuration; // 0x20
|
||||
MxFloat m_createBrickTime; // 0x24
|
||||
MxS8 m_baseWorldSpeed; // 0x28
|
||||
MxFloat m_shootAnimEnd; // 0x2c
|
||||
MxFloat m_entityAnimationTime; // 0x30
|
||||
LegoAnimActorStruct* m_shootAnim; // 0x34
|
||||
LegoCacheSound* m_cachedShootSound; // 0x38
|
||||
undefined4 m_unk0x3c; // 0x3c
|
||||
MxBool m_initializing; // 0x40
|
||||
MxFloat m_resetWorldSpeedAt; // 0x44
|
||||
MxS8 m_visitedLocations; // 0x48
|
||||
LegoEntity* m_nextEntity; // 0x4c
|
||||
};
|
||||
|
||||
// TEMPLATE: LEGO1 0x100194f0
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
// SIZE 0x194
|
||||
class Act2Brick : public LegoPathActor {
|
||||
public:
|
||||
enum {
|
||||
e_removed = 0,
|
||||
e_created = 1,
|
||||
e_placed = 2,
|
||||
e_atRest = 3,
|
||||
};
|
||||
|
||||
Act2Brick();
|
||||
~Act2Brick() override; // vtable+0x00
|
||||
|
||||
@@ -35,7 +42,7 @@ public:
|
||||
|
||||
MxResult Create(MxS32 p_index);
|
||||
void Remove();
|
||||
void FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary);
|
||||
void Place(MxMatrix& p_localToWorld, MxMatrix& p_endLocalToWorld, LegoPathBoundary* p_boundary);
|
||||
void PlayWhistleSound();
|
||||
void StopWhistleSound();
|
||||
void Mute(MxBool p_muted);
|
||||
@@ -44,12 +51,12 @@ private:
|
||||
static const LegoChar* g_lodNames[];
|
||||
static MxLong g_lastHitActorTime;
|
||||
|
||||
LegoCacheSound* m_whistleSound; // 0x154
|
||||
undefined m_unk0x158[0x0c]; // 0x158
|
||||
undefined4 m_unk0x164; // 0x164
|
||||
Mx3DPointFloat m_unk0x168; // 0x168
|
||||
Mx3DPointFloat m_unk0x17c; // 0x17c
|
||||
MxS32 m_unk0x190; // 0x190
|
||||
LegoCacheSound* m_whistleSound; // 0x154
|
||||
undefined m_unk0x158[0x0c]; // 0x158
|
||||
MxU32 m_state; // 0x164
|
||||
Mx3DPointFloat m_localToWorldMovementStep; // 0x168
|
||||
Mx3DPointFloat m_endLocalToWorld; // 0x17c
|
||||
MxS32 m_step; // 0x190
|
||||
};
|
||||
|
||||
#endif // ACT2BRICK_H
|
||||
|
||||
@@ -18,14 +18,20 @@ class MxQuaternionTransformer;
|
||||
|
||||
// SIZE 0x0c
|
||||
struct Act3ListElement {
|
||||
MxU32 m_objectId; // 0x00
|
||||
undefined4 m_unk0x04; // 0x04
|
||||
MxBool m_hasStarted; // 0x08
|
||||
enum InsertMode {
|
||||
e_replaceAction = 1,
|
||||
e_queueAction = 2,
|
||||
e_onlyIfEmpty = 3
|
||||
};
|
||||
|
||||
MxU32 m_objectId; // 0x00
|
||||
InsertMode m_insertMode; // 0x04
|
||||
MxBool m_hasStarted; // 0x08
|
||||
|
||||
Act3ListElement() {}
|
||||
|
||||
Act3ListElement(MxU32 p_objectId, undefined4 p_unk0x04, MxBool p_hasStarted)
|
||||
: m_objectId(p_objectId), m_unk0x04(p_unk0x04), m_hasStarted(p_hasStarted)
|
||||
Act3ListElement(MxU32 p_objectId, InsertMode p_insertMode, MxBool p_hasStarted)
|
||||
: m_objectId(p_objectId), m_insertMode(p_insertMode), m_hasStarted(p_hasStarted)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -36,21 +42,15 @@ struct Act3ListElement {
|
||||
// SIZE 0x10
|
||||
class Act3List : private list<Act3ListElement> {
|
||||
public:
|
||||
enum InsertMode {
|
||||
e_replaceAction = 1,
|
||||
e_queueAction = 2,
|
||||
e_onlyIfEmpty = 3
|
||||
};
|
||||
Act3List() { m_cleared = FALSE; }
|
||||
|
||||
Act3List() { m_unk0x0c = 0; }
|
||||
|
||||
void Insert(MxS32 p_objectId, InsertMode p_option);
|
||||
void Insert(MxS32 p_objectId, Act3ListElement::InsertMode p_option);
|
||||
void DeleteActionWrapper();
|
||||
void Clear();
|
||||
void RemoveByObjectIdOrFirst(MxU32 p_objectId);
|
||||
|
||||
private:
|
||||
undefined4 m_unk0x0c; // 0x0c
|
||||
MxU32 m_cleared; // 0x0c
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4fc8
|
||||
@@ -58,7 +58,14 @@ private:
|
||||
// SIZE 0x0c
|
||||
class Act3State : public LegoState {
|
||||
public:
|
||||
Act3State() { m_unk0x08 = 0; }
|
||||
enum {
|
||||
e_initial = 0,
|
||||
e_ready = 1,
|
||||
e_goodEnding = 2,
|
||||
e_badEnding = 3,
|
||||
};
|
||||
|
||||
Act3State() { m_state = Act3State::e_initial; }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e2f0
|
||||
MxBool IsSerializable() override { return FALSE; }
|
||||
@@ -80,11 +87,11 @@ public:
|
||||
// SYNTHETIC: LEGO1 0x1000e3c0
|
||||
// Act3State::`scalar deleting destructor'
|
||||
|
||||
undefined4 GetUnknown0x08() { return m_unk0x08; }
|
||||
MxU32 GetState() { return m_state; }
|
||||
|
||||
// TODO: Most likely getters/setters are not used according to BETA.
|
||||
|
||||
undefined4 m_unk0x08; // 0x08
|
||||
MxU32 m_state; // 0x08
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d9628
|
||||
@@ -99,7 +106,7 @@ public:
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10072500
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10072510
|
||||
// FUNCTION: BETA10 0x10017550
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10017f10
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10017f20
|
||||
// FUNCTION: BETA10 0x10028130
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10004770
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10004780
|
||||
// FUNCTION: BETA10 0x10029d40
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x100746a0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x100746b0
|
||||
// FUNCTION: BETA10 0x1002e1a0
|
||||
|
||||
@@ -18,6 +18,25 @@ class LegoControlManagerNotificationParam;
|
||||
// SIZE 0x94
|
||||
class InfocenterState : public LegoState {
|
||||
public:
|
||||
enum {
|
||||
e_playCutscene = 0,
|
||||
e_introCancelled = 1,
|
||||
e_notRegistered = 2,
|
||||
e_newState = 3,
|
||||
e_selectedSave = 4,
|
||||
e_selectedCharacterAndDestination = 5,
|
||||
// e_6 = 6,
|
||||
// e_7 = 7,
|
||||
e_exitQueried = 8,
|
||||
// e_9 = 9,
|
||||
// e_10 = 10,
|
||||
e_welcomeAnimation = 11,
|
||||
e_exiting = 12,
|
||||
e_playCredits = 13,
|
||||
e_exitingToIsland = 14,
|
||||
e_backToInfoAct1 = 15,
|
||||
};
|
||||
|
||||
InfocenterState();
|
||||
~InfocenterState() override;
|
||||
|
||||
@@ -72,7 +91,7 @@ public:
|
||||
Playlist m_returnDialogue[3]; // 0x20
|
||||
Playlist m_leaveDialogue[3]; // 0x44
|
||||
Playlist m_bricksterDialogue; // 0x68
|
||||
MxU32 m_unk0x74; // 0x74
|
||||
MxU32 m_state; // 0x74
|
||||
MxStillPresenter* m_letters[7]; // 0x78
|
||||
};
|
||||
|
||||
@@ -100,25 +119,6 @@ struct InfocenterMapEntry {
|
||||
// SIZE 0x1d8
|
||||
class Infocenter : public LegoWorld {
|
||||
public:
|
||||
enum Cutscene {
|
||||
e_noIntro = -1,
|
||||
e_legoMovie,
|
||||
e_mindscapeMovie,
|
||||
e_introMovie,
|
||||
e_outroMovie,
|
||||
e_badEndMovie,
|
||||
e_goodEndMovie
|
||||
};
|
||||
|
||||
enum Character {
|
||||
e_noCharacter = 0,
|
||||
e_pepper,
|
||||
e_mama,
|
||||
e_papa,
|
||||
e_nick,
|
||||
e_laura
|
||||
};
|
||||
|
||||
Infocenter();
|
||||
~Infocenter() override;
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
MxBool VTable0x5c() override; // vtable+0x5c
|
||||
MxBool WaitForTransition() override; // vtable+0x5c
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
void UpdateFrameHot(MxBool p_display);
|
||||
void Reset();
|
||||
|
||||
void PlayCutscene(Cutscene p_entityId, MxBool p_scale);
|
||||
void PlayCutscene(IntroScript::Script p_entityId, MxBool p_scale);
|
||||
void StopCutscene();
|
||||
|
||||
void UpdateEnabledGlowControl(MxS32 p_x, MxS32 p_y);
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
MxS16 m_selectedCharacter; // 0xfc
|
||||
InfocenterState* m_infocenterState; // 0x100
|
||||
LegoGameState::Area m_destLocation; // 0x104
|
||||
Cutscene m_currentCutscene; // 0x108
|
||||
IntroScript::Script m_currentCutscene; // 0x108
|
||||
Radio m_radio; // 0x10c
|
||||
MxStillPresenter* m_dragPresenter; // 0x11c
|
||||
InfocenterMapEntry m_glowInfo[7]; // 0x120
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100377a0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x100377b0
|
||||
// FUNCTION: BETA10 0x10032790
|
||||
|
||||
@@ -75,11 +75,11 @@ public:
|
||||
|
||||
MxU32 GetState() { return m_state; }
|
||||
ElevatorFloor GetElevatorFloor() { return (ElevatorFloor) m_elevFloor; }
|
||||
MxU8 GetUnknown21() { return m_unk0x021; }
|
||||
MxBool IsSpawnInInfocenter() { return m_spawnInInfocenter; }
|
||||
|
||||
void SetState(MxU32 p_state) { m_state = p_state; }
|
||||
void SetElevatorFloor(ElevatorFloor p_elevFloor) { m_elevFloor = p_elevFloor; }
|
||||
void SetUnknown21(MxU8 p_unk0x21) { m_unk0x021 = p_unk0x21; }
|
||||
void SetSpawnInInfocenter(MxBool p_spawnInInfocenter) { m_spawnInInfocenter = p_spawnInInfocenter; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10033960
|
||||
// Act1State::`scalar deleting destructor'
|
||||
@@ -90,11 +90,11 @@ public:
|
||||
IsleScript::Script m_currentCptClickDialogue; // 0x014
|
||||
MxU32 m_state; // 0x018
|
||||
MxS16 m_elevFloor; // 0x01c
|
||||
MxBool m_unk0x01e; // 0x01e
|
||||
MxBool m_unk0x01f; // 0x01f
|
||||
MxBool m_playingFloor2Animation; // 0x01e
|
||||
MxBool m_switchedToArea; // 0x01f
|
||||
MxBool m_planeActive; // 0x020
|
||||
undefined m_unk0x021; // 0x021
|
||||
MxBool m_unk0x022; // 0x022
|
||||
MxBool m_spawnInInfocenter; // 0x021
|
||||
MxBool m_playedExitExplanation; // 0x022
|
||||
undefined m_unk0x023; // 0x023
|
||||
LegoNamedPlane m_motocyclePlane; // 0x024
|
||||
LegoNamedPlane m_bikePlane; // 0x070
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10030900
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10030910
|
||||
// FUNCTION: BETA10 0x10035d70
|
||||
@@ -150,18 +150,18 @@ public:
|
||||
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
void Add(MxCore* p_object) override; // vtable+0x58
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+0x6c
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
void Add(MxCore* p_object) override; // vtable+0x58
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void RemoveVehicle(LegoPathActor* p_actor); // vtable+0x6c
|
||||
|
||||
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
||||
MxBool HasHelicopter() { return m_helicopter != NULL; }
|
||||
|
||||
void FUN_10033350();
|
||||
void SwitchToInfocenter();
|
||||
|
||||
friend class Act1State;
|
||||
|
||||
@@ -175,13 +175,13 @@ protected:
|
||||
MxLong HandleTransitionEnd();
|
||||
void HandleElevatorEndAction();
|
||||
void UpdateGlobe();
|
||||
void FUN_10032620();
|
||||
void CheckAreaExiting();
|
||||
void CreateState();
|
||||
void FUN_10032d30(
|
||||
void TransitionToOverlay(
|
||||
IsleScript::Script p_script,
|
||||
JukeboxScript::Script p_music,
|
||||
const char* p_cameraLocation,
|
||||
MxBool p_und
|
||||
MxBool p_setCamera
|
||||
);
|
||||
|
||||
Act1State* m_act1state; // 0xf8
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
void ActivateSceneActions();
|
||||
|
||||
MxS16 GetUnknown0x160() { return m_jetskiDashboardStreamId; }
|
||||
MxS16 GetJetskiDashboardStreamId() { return m_jetskiDashboardStreamId; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1007e5c0
|
||||
// Jetski::`scalar deleting destructor'
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1005d6e0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x1005d6f0
|
||||
// FUNCTION: BETA10 0x100388d0
|
||||
|
||||
@@ -15,9 +15,13 @@ class MxEndActionNotificationParam;
|
||||
// SIZE 0x10
|
||||
class LegoAct2State : public LegoState {
|
||||
public:
|
||||
enum {
|
||||
c_badEnding = 104
|
||||
};
|
||||
|
||||
LegoAct2State()
|
||||
{
|
||||
m_unk0x08 = 0;
|
||||
m_state = 0;
|
||||
m_enabled = FALSE;
|
||||
}
|
||||
~LegoAct2State() override {}
|
||||
@@ -43,14 +47,14 @@ public:
|
||||
// LegoAct2State::`scalar deleting destructor'
|
||||
|
||||
// FUNCTION: BETA10 0x100151b0
|
||||
void SetUnknown0x08(undefined4 p_unk0x08) { m_unk0x08 = p_unk0x08; }
|
||||
void SetState(MxU32 p_state) { m_state = p_state; }
|
||||
|
||||
undefined4 GetUnknown0x08() { return m_unk0x08; }
|
||||
MxU32 GetState() { return m_state; }
|
||||
|
||||
// TODO: Most likely getters/setters are not used according to BETA. (?)
|
||||
|
||||
undefined4 m_unk0x08; // 0x08
|
||||
MxBool m_enabled; // 0x0c
|
||||
MxU32 m_state; // 0x08
|
||||
MxBool m_enabled; // 0x0c
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d82e0
|
||||
@@ -67,7 +71,7 @@ public:
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
|
||||
// FUNCTION: LEGO1 0x1004fe10
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
void VTable0x60() override; // vtable+0x60
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
@@ -76,10 +80,10 @@ public:
|
||||
void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
|
||||
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
||||
|
||||
MxResult FUN_100516b0();
|
||||
MxResult CreateBrick();
|
||||
void FUN_100517b0();
|
||||
MxResult BadEnding();
|
||||
MxResult FUN_10052560(
|
||||
MxResult StartAction(
|
||||
Act2mainScript::Script p_objectId,
|
||||
MxBool p_param2,
|
||||
MxBool p_param3,
|
||||
@@ -92,48 +96,65 @@ public:
|
||||
// LegoAct2::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
enum {
|
||||
e_initial = 0,
|
||||
e_startSpeech = 1,
|
||||
e_holdingSpeech = 2,
|
||||
e_startDescription = 3,
|
||||
e_explaining = 4,
|
||||
e_goingToResidentialArea = 5,
|
||||
e_atResidentialArea = 6,
|
||||
e_chase = 7,
|
||||
e_droppingBrick = 9,
|
||||
e_goingToHide = 10,
|
||||
e_hidden = 11,
|
||||
e_distributeRemainingBricks = 12,
|
||||
e_brickHunt = 13,
|
||||
e_allPiecesCollected = 14,
|
||||
};
|
||||
|
||||
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||
MxLong HandleTransitionEnd();
|
||||
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
|
||||
void PlayMusic(JukeboxScript::Script p_objectId);
|
||||
void FUN_10051900();
|
||||
void FUN_10051960();
|
||||
void HideMaPaInfo();
|
||||
void InitBricks();
|
||||
void UninitBricks();
|
||||
void SpawnBricks();
|
||||
void FUN_10051fa0(MxS32 p_param1);
|
||||
void FUN_100521f0(MxS32 p_param1);
|
||||
MxResult FUN_10052800();
|
||||
void CheckBricksterDestroying(MxS32 p_pathData);
|
||||
void CheckBricksterIsLoose(MxS32 p_pathData);
|
||||
MxResult InitializeShooting();
|
||||
|
||||
Act2Brick m_bricks[10]; // 0x00f8
|
||||
MxU8 m_nextBrick; // 0x10c0
|
||||
undefined m_unk0x10c1; // 0x10c1
|
||||
MxU8 m_removedBricks; // 0x10c1
|
||||
MxBool m_ready; // 0x10c2
|
||||
undefined4 m_unk0x10c4; // 0x10c4
|
||||
undefined4 m_state; // 0x10c4
|
||||
JukeboxScript::Script m_music; // 0x10c8
|
||||
LegoAct2State* m_gameState; // 0x10cc
|
||||
MxS32 m_unk0x10d0; // 0x10d0
|
||||
MxS32 m_timeSinceLastStage; // 0x10d0
|
||||
|
||||
// variable name verified by BETA10 0x10014633
|
||||
const char* m_siFile; // 0x10d4
|
||||
|
||||
LegoROI* m_pepper; // 0x10d8
|
||||
MxMatrix m_unk0x10dc; // 0x10dc
|
||||
LegoPathBoundary* m_unk0x1124; // 0x1124
|
||||
LegoROI* m_ambulance; // 0x1128
|
||||
undefined4 m_unk0x112c; // 0x112c
|
||||
undefined4 m_unk0x1130; // 0x1130
|
||||
undefined4 m_unk0x1134; // 0x1134
|
||||
Act2Actor* m_unk0x1138; // 0x1138
|
||||
undefined m_unk0x113c; // 0x113c
|
||||
Act2mainScript::Script m_unk0x1140; // 0x1140
|
||||
Act2mainScript::Script m_unk0x1144; // 0x1144
|
||||
undefined4 m_unk0x1148; // 0x1148
|
||||
undefined m_firstBrick; // 0x114c
|
||||
undefined m_secondBrick; // 0x114d
|
||||
undefined m_thirdBrick; // 0x114e
|
||||
undefined m_fourthBrick; // 0x114e
|
||||
LegoGameState::Area m_destLocation; // 0x1150
|
||||
LegoROI* m_pepper; // 0x10d8
|
||||
MxMatrix m_transformOnDisable; // 0x10dc
|
||||
LegoPathBoundary* m_boundaryOnDisable; // 0x1124
|
||||
LegoROI* m_ambulance; // 0x1128
|
||||
undefined4 m_unk0x112c; // 0x112c
|
||||
undefined4 m_unk0x1130; // 0x1130
|
||||
undefined4 m_unk0x1134; // 0x1134
|
||||
Act2Actor* m_unk0x1138; // 0x1138
|
||||
undefined m_unk0x113c; // 0x113c
|
||||
Act2mainScript::Script m_currentAction; // 0x1140
|
||||
Act2mainScript::Script m_infomanDirecting; // 0x1144
|
||||
undefined4 m_unk0x1148; // 0x1148
|
||||
undefined m_firstBrick; // 0x114c
|
||||
undefined m_secondBrick; // 0x114d
|
||||
undefined m_thirdBrick; // 0x114e
|
||||
undefined m_fourthBrick; // 0x114e
|
||||
LegoGameState::Area m_destLocation; // 0x1150
|
||||
};
|
||||
|
||||
#endif // LEGOACT2_H
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
return !strcmp(p_name, LegoActor::ClassName()) || LegoEntity::IsA(p_name);
|
||||
}
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform) override; // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x10002cc0
|
||||
// FUNCTION: BETA10 0x1000f3e0
|
||||
|
||||
@@ -8,13 +8,13 @@ class LegoAnim;
|
||||
|
||||
// SIZE 0x20
|
||||
struct LegoAnimActorStruct {
|
||||
LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs);
|
||||
LegoAnimActorStruct(float p_worldSpeed, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs);
|
||||
~LegoAnimActorStruct();
|
||||
|
||||
float GetDuration();
|
||||
|
||||
// FUNCTION: BETA10 0x1000fb10
|
||||
float GetUnknown0x00() { return m_unk0x00; }
|
||||
float GetWorldSpeed() { return m_worldSpeed; }
|
||||
|
||||
// FUNCTION: BETA10 0x10012210
|
||||
LegoAnim* GetAnimTreePtr() { return m_AnimTreePtr; }
|
||||
@@ -23,7 +23,7 @@ struct LegoAnimActorStruct {
|
||||
LegoROI** GetROIMap() { return m_roiMap; }
|
||||
|
||||
// TODO: Possibly private
|
||||
float m_unk0x00; // 0x00
|
||||
float m_worldSpeed; // 0x00
|
||||
LegoAnim* m_AnimTreePtr; // 0x04
|
||||
LegoROI** m_roiMap; // 0x08
|
||||
MxU32 m_numROIs; // 0x0c
|
||||
@@ -47,9 +47,14 @@ public:
|
||||
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 MxResult GetTimeInCycle(float& p_timeInCycle);
|
||||
virtual MxResult AnimateWithTransform(float p_time, Matrix4& p_transform);
|
||||
virtual MxResult CreateAnimActorStruct(
|
||||
LegoAnim* p_AnimTreePtr,
|
||||
float p_worldSpeed,
|
||||
LegoROI** p_roiMap,
|
||||
MxU32 p_numROIs
|
||||
);
|
||||
virtual void ClearMaps();
|
||||
|
||||
// FUNCTION: LEGO1 0x1000fba0
|
||||
|
||||
@@ -231,7 +231,7 @@ private:
|
||||
MxBool FUN_100623a0(AnimInfo& p_info);
|
||||
MxBool ModelExists(AnimInfo& p_info, const char* p_name);
|
||||
void FUN_10062580(AnimInfo& p_info);
|
||||
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi);
|
||||
MxBool FUN_10062650(Mx3DPointFloat& p_position, float p_und, LegoROI* p_roi);
|
||||
MxBool FUN_10062710(AnimInfo& p_info);
|
||||
MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter);
|
||||
void FUN_10063950(LegoROI* p_roi);
|
||||
|
||||
@@ -58,7 +58,8 @@ public:
|
||||
// FUNCTION: LEGO1 0x1002f930
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// not in BETA10
|
||||
// While this class exists in BETA10, it didn't have a ClassName().
|
||||
// The constructor suggests that it did not inherit from MxCore back then and did not have a VTABLE.
|
||||
// STRING: LEGO1 0x100f37d0
|
||||
return "LegoBuildingManager";
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
class LegoCacheSound : public MxCore {
|
||||
public:
|
||||
LegoCacheSound();
|
||||
LegoCacheSound(LegoCacheSound& p_sound);
|
||||
~LegoCacheSound() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x10006580
|
||||
@@ -48,6 +49,10 @@ public:
|
||||
void SetDistance(MxS32 p_min, MxS32 p_max);
|
||||
void MuteSilence(MxBool p_muted);
|
||||
void MuteStop(MxBool p_mute);
|
||||
MxResult GetFrequency(LPDWORD p_freq);
|
||||
MxResult SetFrequency(DWORD p_freq);
|
||||
LegoCacheSound& operator=(LegoCacheSound& p_sound);
|
||||
void CopyFrom(LegoCacheSound& p_sound);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10006610
|
||||
// SYNTHETIC: BETA10 0x100675b0
|
||||
|
||||
@@ -20,11 +20,11 @@ class MxActionNotificationParam;
|
||||
class LegoVehicleBuildState : public LegoState {
|
||||
public:
|
||||
enum AnimationState {
|
||||
e_unknown0 = 0,
|
||||
e_none = 0,
|
||||
e_entering = 1,
|
||||
e_unknown2 = 2,
|
||||
e_settingUpMovie = 2,
|
||||
e_cutscene = 3,
|
||||
e_unknown4 = 4,
|
||||
e_finishedBuild = 4,
|
||||
e_exiting = 6
|
||||
};
|
||||
|
||||
@@ -57,9 +57,9 @@ public:
|
||||
MxString m_className; // 0x38
|
||||
|
||||
AnimationState m_animationState; // 0x48
|
||||
MxU8 m_unk0x4c; // 0x4c
|
||||
MxBool m_unk0x4d; // 0x4d
|
||||
MxBool m_unk0x4e; // 0x4e
|
||||
MxU8 m_introductionCounter; // 0x4c
|
||||
MxBool m_finishedBuild; // 0x4d
|
||||
MxBool m_playedExitScript; // 0x4e
|
||||
MxU8 m_placedPartCount; // 0x4f
|
||||
};
|
||||
|
||||
@@ -75,18 +75,28 @@ class LegoCarBuild : public LegoWorld {
|
||||
public:
|
||||
// SIZE 0x1c
|
||||
struct LookupTableActions {
|
||||
undefined4 m_unk0x00; // 0x00
|
||||
undefined4 m_unk0x04; // 0x04
|
||||
undefined4 m_unk0x08; // 0x08
|
||||
undefined4 m_unk0x0c; // 0x0c
|
||||
undefined4 m_unk0x10; // 0x10
|
||||
undefined4 m_unk0x14; // 0x14
|
||||
undefined4 m_unk0x18; // 0x18
|
||||
MxU32 m_introduction0; // 0x00
|
||||
MxU32 m_leaveUnfinished; // 0x04
|
||||
MxU32 m_completed; // 0x08
|
||||
MxU32 m_introduction1; // 0x0c
|
||||
MxU32 m_introduction2; // 0x10
|
||||
MxU32 m_introduction3; // 0x14
|
||||
MxU32 m_shortExplanation; // 0x18
|
||||
};
|
||||
|
||||
enum Unknown0xf8 {
|
||||
c_unknownminusone = -1,
|
||||
c_unknown8 = 8
|
||||
enum LookupTableActionType {
|
||||
e_introduction0 = 0,
|
||||
e_introduction1 = 1,
|
||||
e_introduction2 = 2,
|
||||
e_introduction3 = 3,
|
||||
e_leaveUnfinished = 4,
|
||||
e_completed = 5,
|
||||
e_shortExplanation = 6,
|
||||
};
|
||||
|
||||
enum ResetPlacedSelectedPart {
|
||||
c_disabled = -1,
|
||||
c_enabled = 8
|
||||
};
|
||||
|
||||
LegoCarBuild();
|
||||
@@ -94,7 +104,7 @@ public:
|
||||
|
||||
// FUNCTION: LEGO1 0x10022930
|
||||
// FUNCTION: BETA10 0x10070070
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10022940
|
||||
// FUNCTION: BETA10 0x10070090
|
||||
@@ -113,15 +123,15 @@ public:
|
||||
return !strcmp(p_name, LegoCarBuild::ClassName()) || LegoWorld::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void VTable0x6c(); // vtable+0x6c
|
||||
virtual void VTable0x70(); // vtable+0x70
|
||||
virtual void VTable0x74(MxFloat p_param1[2], MxFloat p_param2[3]); // vtable+0x74
|
||||
virtual void VTable0x78(MxFloat p_param1[2], MxFloat p_param2[3]); // vtable+0x78
|
||||
virtual void VTable0x7c(MxFloat p_param1[2], MxFloat p_param2[3]); // vtable+0x7c
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void ReadyWorld() override; // vtable+0x50
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual void InitializeDisplayingTransform(); // vtable+0x6c
|
||||
virtual void CalculateStartAndTargetScreenPositions(); // vtable+0x70
|
||||
virtual void CalculateDragPositionAbove(MxFloat p_coordinates[2], MxFloat p_position[3]); // vtable+0x74
|
||||
virtual void CalculateDragPositionBetween(MxFloat p_coordinates[2], MxFloat p_position[3]); // vtable+0x78
|
||||
virtual void CalculateDragPositionOnGround(MxFloat p_coordinates[2], MxFloat p_position[3]); // vtable+0x7c
|
||||
virtual void VTable0x80(
|
||||
MxFloat p_param1[2],
|
||||
MxFloat p_param2[2],
|
||||
@@ -132,33 +142,33 @@ public:
|
||||
MxS16 GetPlacedPartCount();
|
||||
void SetPlacedPartCount(MxU8 p_placedPartCount);
|
||||
void InitPresenters();
|
||||
void FUN_10022f00();
|
||||
void FUN_10022f30();
|
||||
void FUN_10023130(MxLong p_x, MxLong p_y);
|
||||
void DisplaySelectedPart();
|
||||
void ResetSelectedPart();
|
||||
void CalculateSelectedPartMatrix(MxLong p_x, MxLong p_y);
|
||||
void AddSelectedPartToBuild();
|
||||
undefined4 FUN_10024250(LegoEventNotificationParam* p_param);
|
||||
void FUN_100243a0();
|
||||
undefined4 FUN_10024480(MxActionNotificationParam* p_param);
|
||||
undefined4 SelectPartFromMousePosition(MxLong p_x, MxLong p_y);
|
||||
undefined4 FUN_100246e0(MxLong p_x, MxLong p_y);
|
||||
MxS32 FUN_10024850(MxLong p_x, MxLong p_y);
|
||||
undefined4 FUN_10024890(MxParam* p_param);
|
||||
undefined4 FUN_10024c20(MxNotificationParam* p_param);
|
||||
void FUN_10024ef0();
|
||||
void FUN_10024f30();
|
||||
void FUN_10024f50();
|
||||
void FUN_10024f70(MxBool p_enabled);
|
||||
void SetPresentersEnabled(MxBool p_enabled);
|
||||
void TogglePresentersEnabled();
|
||||
void FUN_100250e0(MxBool p_param);
|
||||
void FUN_10025350(MxS32 p_objectId);
|
||||
void FUN_10025450();
|
||||
void FUN_10025720(undefined4 p_param1);
|
||||
void FUN_10025d10(MxS32 p_param);
|
||||
MxS32 FUN_10025d70();
|
||||
void FUN_10025db0(const char* p_param1, undefined4 p_param2);
|
||||
void FUN_10025e40();
|
||||
MxS32 FUN_10025ee0(undefined4 p_param1);
|
||||
MxLong HandleKeyPress(LegoEventNotificationParam* p_param);
|
||||
void InitExiting();
|
||||
MxLong HandleEndAction(MxActionNotificationParam* p_param);
|
||||
MxLong SelectPartFromMousePosition(MxLong p_x, MxLong p_y);
|
||||
MxLong HandleButtonUp(MxLong p_x, MxLong p_y);
|
||||
MxLong HandleMouseMove(MxLong p_x, MxLong p_y);
|
||||
MxLong HandleControl(MxParam* p_param);
|
||||
MxLong HandleType0Notification(MxNotificationParam* p_param);
|
||||
void StartIntroduction();
|
||||
void MoveShelves();
|
||||
void RotateVehicle();
|
||||
void EnableColorControlsForSelectedPart(MxBool p_enabled);
|
||||
void SetColorControlsEnabled(MxBool p_enabled);
|
||||
void ToggleColorControlsEnabled();
|
||||
void EnableDecalForSelectedPart(MxBool p_enabled);
|
||||
void SetPartColor(MxS32 p_objectId);
|
||||
void CalculateStartAndTargetTransforms();
|
||||
void StartActorScriptByType(MxS32 p_actionType);
|
||||
void StartActorScript(MxS32 p_streamId);
|
||||
MxS32 GetNextIntroduction();
|
||||
void TickleControl(const char* p_controlName, MxULong p_time);
|
||||
void HandleEndAnim();
|
||||
MxS32 GetBuildMovieId(MxS32 p_carId);
|
||||
|
||||
// FUNCTION: BETA10 0x100735b0
|
||||
void SetCarBuildAnimPresenter(LegoCarBuildAnimPresenter* p_animPresenter) { m_animPresenter = p_animPresenter; }
|
||||
@@ -167,43 +177,45 @@ public:
|
||||
// LegoCarBuild::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
// inline functions
|
||||
MxU32 Beta0x10070520();
|
||||
void StopActionIn0x344();
|
||||
enum {
|
||||
e_idle = 0,
|
||||
e_returning = 3,
|
||||
e_selecting = 4,
|
||||
e_displaying = 5,
|
||||
e_dragging = 6,
|
||||
};
|
||||
|
||||
Unknown0xf8 m_unk0xf8; // 0xf8
|
||||
MxS16 m_unk0xfc; // 0xfc
|
||||
MxS32 m_unk0x100; // 0x100
|
||||
undefined4 m_unk0x104; // 0x104
|
||||
// inline functions
|
||||
MxU32 GetLookupIndex();
|
||||
void StopPlayingActorScript();
|
||||
|
||||
ResetPlacedSelectedPart m_resetPlacedSelectedPart; // 0xf8
|
||||
MxS16 m_rotateBuild; // 0xfc
|
||||
MxS32 m_clickState; // 0x100
|
||||
undefined4 m_unk0x104; // 0x104
|
||||
|
||||
// name verified by BETA10 0x1006ebba
|
||||
MxS8 m_numAnimsRun; // 0x108
|
||||
|
||||
MxU8 m_unk0x109; // 0x109
|
||||
MxU16 m_unk0x10a; // 0x10a
|
||||
DWORD m_unk0x10c; // 0x10c
|
||||
LegoROI* m_selectedPart; // 0x110
|
||||
BoundingSphere m_unk0x114; // 0x114
|
||||
MxMatrix m_unk0x12c; // 0x12c
|
||||
undefined m_unk0x174; // 0x174
|
||||
MxMatrix m_unk0x178; // 0x178
|
||||
MxMatrix m_unk0x1c0; // 0x1c0
|
||||
MxMatrix m_unk0x208; // 0x208
|
||||
|
||||
// This is likely a location in pixel space
|
||||
MxS32 m_unk0x250[2]; // 0x250
|
||||
|
||||
LegoCarBuildAnimPresenter* m_animPresenter; // 0x258
|
||||
MxQuaternionTransformer m_unk0x25c; // 0x25c
|
||||
|
||||
// These two are likely locations in pixel space
|
||||
MxS32 m_unk0x290[2]; // 0x290
|
||||
MxS32 m_unk0x298[2]; // 0x298
|
||||
|
||||
MxFloat m_unk0x2a0; // 0x2a0
|
||||
Mx4DPointFloat m_unk0x2a4; // 0x2a4
|
||||
Mx4DPointFloat m_unk0x2bc; // 0x2bc
|
||||
MxBool m_selectedPartIsPlaced; // 0x2d4
|
||||
MxU8 m_missclickCounter; // 0x109
|
||||
MxU16 m_lastActorScript; // 0x10a
|
||||
MxULong m_lastActorScriptStartTime; // 0x10c
|
||||
LegoROI* m_selectedPart; // 0x110
|
||||
BoundingSphere m_targetBoundingSphere; // 0x114
|
||||
MxMatrix m_originalSelectedPartTransform; // 0x12c
|
||||
MxBool m_alreadyFinished; // 0x174
|
||||
MxMatrix m_selectedPartStartTransform; // 0x178
|
||||
MxMatrix m_displayTransform; // 0x1c0
|
||||
MxMatrix m_selectedPartTargetTransform; // 0x208
|
||||
MxS32 m_selectedPartStartMousePosition[2]; // 0x250
|
||||
LegoCarBuildAnimPresenter* m_animPresenter; // 0x258
|
||||
MxQuaternionTransformer m_draggingQuarternionTransformer; // 0x25c
|
||||
MxS32 m_selectedPartStartScreenPosition[2]; // 0x290
|
||||
MxS32 m_selectedPartTargetScreenPosition[2]; // 0x298
|
||||
MxFloat m_normalizedDistance; // 0x2a0
|
||||
Mx4DPointFloat m_selectedPartStartPosition; // 0x2a4
|
||||
Mx4DPointFloat m_selectedPartTargetPosition; // 0x2bc
|
||||
MxBool m_displayedPartIsPlaced; // 0x2d4
|
||||
|
||||
// variable names verified by BETA10 0x1006b27a
|
||||
MxStillPresenter* m_ColorBook_Bitmap; // 0x2dc
|
||||
@@ -232,21 +244,21 @@ private:
|
||||
LegoVehicleBuildState* m_buildState; // 0x32c
|
||||
|
||||
// variable name verified by BETA10 0x1006d742
|
||||
undefined4 m_carId; // 0x330
|
||||
MxS32 m_carId; // 0x330
|
||||
|
||||
// variable name verified by BETA10 0x1006cba7
|
||||
LegoGameState::Area m_destLocation; // 0x334
|
||||
|
||||
MxPresenter* m_unk0x338; // 0x338
|
||||
MxControlPresenter* m_unk0x33c; // 0x33c
|
||||
undefined4 m_unk0x340; // 0x340
|
||||
undefined4 m_unk0x344; // 0x344
|
||||
MxU8 m_presentersEnabled; // 0x348
|
||||
MxPresenter* m_jukeboxPresenter; // 0x338
|
||||
MxControlPresenter* m_tickledControl; // 0x33c
|
||||
undefined4 m_unk0x340; // 0x340
|
||||
MxS32 m_playingActorScript; // 0x344
|
||||
MxU8 m_presentersEnabled; // 0x348
|
||||
|
||||
static MxS16 g_unk0x100f11cc;
|
||||
static MxFloat g_unk0x100d65a4;
|
||||
static MxS16 g_lastTickleState;
|
||||
static MxFloat g_selectedPartRotationAngleStepYAxis;
|
||||
static MxFloat g_rotationAngleStepYAxis;
|
||||
static LookupTableActions g_unk0x100d65b0[];
|
||||
static LookupTableActions g_actorScripts[];
|
||||
};
|
||||
|
||||
#endif // LEGOCARBUILD_H
|
||||
|
||||
@@ -21,10 +21,10 @@ public:
|
||||
};
|
||||
|
||||
// SIZE 0x0c
|
||||
struct UnknownListEntry {
|
||||
struct CarBuildPart {
|
||||
// FUNCTION: LEGO1 0x100795c0
|
||||
// FUNCTION: BETA10 0x10073850
|
||||
UnknownListEntry()
|
||||
CarBuildPart()
|
||||
{
|
||||
m_name = NULL;
|
||||
m_wiredName = NULL;
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
virtual MxResult Serialize(LegoStorage* p_storage);
|
||||
|
||||
void FUN_10079050(MxS16 p_index);
|
||||
void MakePartPlaced(MxS16 p_index);
|
||||
void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2);
|
||||
void InitBuildPlatform();
|
||||
void HideBuildPartByName(LegoChar* p_param);
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
LegoTreeNode* FindNodeByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);
|
||||
void AddPartToBuildByName(const LegoChar* p_name);
|
||||
void RotateAroundYAxis(MxFloat p_angle);
|
||||
MxBool FUN_10079c30(const LegoChar* p_name);
|
||||
MxBool IsNextPartToPlace(const LegoChar* p_name);
|
||||
MxBool PartIsPlaced(const LegoChar* p_name);
|
||||
void MoveShelfForward();
|
||||
MxBool StringEqualsPlatform(const LegoChar* p_string);
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
MxBool StringEndsOnW(LegoChar* p_param);
|
||||
MxBool StringEndsOnYOrN(const LegoChar* p_string);
|
||||
|
||||
const BoundingSphere& FUN_10079e20();
|
||||
const BoundingSphere& GetTargetBoundingSphere();
|
||||
|
||||
// FUNCTION: BETA10 0x100703e0
|
||||
const LegoChar* GetWiredNameOfLastPlacedPart() { return m_parts[m_placedPartCount].m_wiredName; }
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
// LegoCarBuildAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
void Beta10Inline0x100733d0();
|
||||
void UpdateFlashingPartVisibility();
|
||||
|
||||
MxU16 m_shelfState; // 0xbc
|
||||
|
||||
@@ -136,16 +136,16 @@ private:
|
||||
MxMatrix m_buildViewMatrix; // 0xe0
|
||||
|
||||
// variable name verified by BETA10 0x100719f0
|
||||
UnknownListEntry* m_parts; // 0x128
|
||||
CarBuildPart* m_parts; // 0x128
|
||||
|
||||
MxFloat m_shelfFrameBuffer; // 0x12c
|
||||
MxFloat m_shelfFrame; // 0x130
|
||||
MxFloat m_shelfFrameMax; // 0x134
|
||||
MxFloat m_shelfFrameInterval; // 0x138
|
||||
MxULong m_unk0x13c; // 0x13c
|
||||
LegoEntity* m_carBuildEntity; // 0x140
|
||||
MxS32 m_unk0x144; // 0x144
|
||||
MxS32 m_unk0x148; // 0x148
|
||||
MxFloat m_shelfFrameBuffer; // 0x12c
|
||||
MxFloat m_shelfFrame; // 0x130
|
||||
MxFloat m_shelfFrameMax; // 0x134
|
||||
MxFloat m_shelfFrameInterval; // 0x138
|
||||
MxULong m_flashingPartTimeState; // 0x13c
|
||||
LegoEntity* m_carBuildEntity; // 0x140
|
||||
MxS32 m_unk0x144; // 0x144
|
||||
MxS32 m_unk0x148; // 0x148
|
||||
|
||||
// name verified by BETA10 0x10070d63
|
||||
LegoChar* m_mainSourceId; // 0x14c
|
||||
|
||||
@@ -53,10 +53,10 @@ public:
|
||||
return !strcmp(p_name, LegoEntity::ClassName()) || MxEntity::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult Create(MxDSAction& p_dsAction); // vtable+0x18
|
||||
virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c
|
||||
virtual void ParseAction(char* p_extra); // vtable+0x20
|
||||
virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2); // vtable+0x24
|
||||
virtual MxResult Create(MxDSAction& p_dsAction); // vtable+0x18
|
||||
virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c
|
||||
virtual void ParseAction(char* p_extra); // vtable+0x20
|
||||
virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform); // vtable+0x24
|
||||
virtual void SetWorldTransform(
|
||||
const Vector3& p_location,
|
||||
const Vector3& p_direction,
|
||||
@@ -76,9 +76,9 @@ public:
|
||||
virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48
|
||||
virtual void SwitchMood(); // vtable+0x4c
|
||||
|
||||
void FUN_10010c30();
|
||||
void TransformPointOfView();
|
||||
void SetType(MxU8 p_type);
|
||||
void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und);
|
||||
void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_updateCamera);
|
||||
Mx3DPointFloat GetWorldDirection();
|
||||
Mx3DPointFloat GetWorldUp();
|
||||
Mx3DPointFloat GetWorldPosition();
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
History();
|
||||
void WriteScoreHistory();
|
||||
MxResult Serialize(LegoStorage* p_storage);
|
||||
ScoreItem* FindPlayerInScoreHistory(Username* p_player, MxS16 p_unk0x24, MxS32& p_unk0x2c);
|
||||
ScoreItem* FindPlayerInScoreHistory(Username* p_player, MxS16 p_playerId, MxS32& p_playerScoreHistoryIndex);
|
||||
|
||||
// FUNCTION: BETA10 0x1002c2b0
|
||||
MxS16 GetCount() { return m_count; }
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
MxBool m_isDirty; // 0x420
|
||||
Area m_currentArea; // 0x424
|
||||
Area m_previousArea; // 0x428
|
||||
Area m_unk0x42c; // 0x42c
|
||||
Area m_savedPreviousArea; // 0x42c
|
||||
};
|
||||
|
||||
MxBool ROIColorOverride(const char* p_input, char* p_output, MxU32 p_copyLen);
|
||||
|
||||
@@ -111,16 +111,15 @@ public:
|
||||
void SetWorld(LegoWorld* p_world);
|
||||
void ClearWorld();
|
||||
|
||||
void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; }
|
||||
void SetUnknown335(MxBool p_unk0x335) { m_unk0x335 = p_unk0x335; }
|
||||
void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; }
|
||||
void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; }
|
||||
void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; }
|
||||
|
||||
// FUNCTION: BETA10 0x1002e290
|
||||
// FUNCTION: BETA10 0x1002e390
|
||||
void DisableInputProcessing()
|
||||
{
|
||||
m_unk0x88 = TRUE;
|
||||
m_inputProcessingDisabled = TRUE;
|
||||
m_unk0x336 = FALSE;
|
||||
}
|
||||
|
||||
@@ -155,7 +154,7 @@ private:
|
||||
MxBool m_unk0x80; // 0x80
|
||||
MxBool m_unk0x81; // 0x81
|
||||
LegoControlManager* m_controlManager; // 0x84
|
||||
MxBool m_unk0x88; // 0x88
|
||||
MxBool m_inputProcessingDisabled; // 0x88
|
||||
IDirectInput* m_directInput; // 0x8c
|
||||
IDirectInputDevice* m_directInputDevice; // 0x90
|
||||
MxBool m_kbStateSuccess; // 0x94
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "compat.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxmain.h"
|
||||
|
||||
class Isle;
|
||||
class LegoAnimationManager;
|
||||
@@ -109,6 +109,7 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058ab0
|
||||
// FUNCTION: BETA10 0x1008f860
|
||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name);
|
||||
@@ -148,9 +149,14 @@ public:
|
||||
// FUNCTION: BETA10 0x1009e7a0
|
||||
LegoInputManager* GetInputManager() { return m_inputManager; }
|
||||
|
||||
// FUNCTION: BETA10 0x100e5400
|
||||
LegoTextureContainer* GetTextureContainer() { return m_textureContainer; }
|
||||
|
||||
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
|
||||
|
||||
// FUNCTION: BETA10 0x100969b0
|
||||
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
||||
|
||||
LegoNavController* GetNavController() { return m_navController; }
|
||||
LegoPathActor* GetUserActor() { return m_userActor; }
|
||||
|
||||
@@ -186,6 +192,7 @@ public:
|
||||
void CloseMainWindow() { PostMessage(m_windowHandle, WM_CLOSE, 0, 0); }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10058b30
|
||||
// SYNTHETIC: BETA10 0x1008f8d0
|
||||
// LegoOmni::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
|
||||
// FUNCTION: LEGO1 0x10002d60
|
||||
// FUNCTION: BETA10 0x1000f820
|
||||
virtual MxS32 VTable0xa0() { return 0; } // vtable+0xa0
|
||||
virtual MxS32 NextTargetLocation() { return 0; } // vtable+0xa0
|
||||
|
||||
virtual void VTable0xa4(MxBool& p_und1, MxS32& p_und2); // vtable+0xa4
|
||||
virtual void VTable0xa8(); // vtable+0xa8
|
||||
|
||||
@@ -31,6 +31,7 @@ typedef set<LegoPathActor*, LegoPathActorSetCompare> LegoPathActorSet;
|
||||
typedef set<LegoAnimPresenter*, LegoAnimPresenterSetCompare> LegoAnimPresenterSet;
|
||||
|
||||
// VTABLE: LEGO1 0x100d8618
|
||||
// VTABLE: BETA10 0x101bdd58
|
||||
// SIZE 0x74
|
||||
class LegoPathBoundary : public LegoWEGEdge {
|
||||
public:
|
||||
@@ -57,6 +58,7 @@ public:
|
||||
LegoAnimPresenterSet& GetPresenters() { return m_presenters; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10047a80
|
||||
// SYNTHETIC: BETA10 0x100bd300
|
||||
// LegoPathBoundary::`vector deleting destructor'
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// While this class exists in BETA10, it didn't have a ClassName().
|
||||
// I suppose it did not inherit from MxCore back then and likely did not have a VTABLE.
|
||||
// The constructor suggests that it did not inherit from MxCore back then and did not have a VTABLE.
|
||||
// STRING: LEGO1 0x100f318c
|
||||
return "LegoPlantManager";
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dae0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
|
||||
|
||||
@@ -60,7 +60,12 @@ MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
|
||||
void EnableAnimations(MxBool p_enable);
|
||||
void SetAppCursor(Cursor p_cursor);
|
||||
MxBool CanExit();
|
||||
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId);
|
||||
MxBool RemoveFromWorld(
|
||||
const MxAtomId& p_entityAtom,
|
||||
MxS32 p_entityId,
|
||||
const MxAtomId& p_worldAtom,
|
||||
MxS32 p_worldEntityId
|
||||
);
|
||||
MxS32 UpdateLightPosition(MxS32 p_increase);
|
||||
void SetLightPosition(MxS32 p_index);
|
||||
LegoNamedTexture* ReadNamedTexture(LegoStorage* p_storage);
|
||||
|
||||
@@ -20,6 +20,7 @@ class Renderer;
|
||||
}
|
||||
|
||||
// VTABLE: LEGO1 0x100d9c88
|
||||
// VTABLE: BETA10 0x101bef08
|
||||
// SIZE 0x590
|
||||
class LegoVideoManager : public MxVideoManager {
|
||||
public:
|
||||
@@ -41,6 +42,7 @@ public:
|
||||
virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38
|
||||
|
||||
// FUNCTION: LEGO1 0x1007ab10
|
||||
// FUNCTION: BETA10 0x100d8010
|
||||
virtual LegoPhonemeList* GetPhonemeList() { return m_phonemeRefList; } // vtable+0x3c
|
||||
|
||||
void SetSkyColor(float p_red, float p_green, float p_blue);
|
||||
@@ -67,6 +69,10 @@ public:
|
||||
|
||||
void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1007ab20
|
||||
// SYNTHETIC: BETA10 0x100d8040
|
||||
// LegoVideoManager::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
MxResult CreateDirect3D();
|
||||
MxResult ConfigureD3DRM();
|
||||
@@ -122,7 +128,4 @@ private:
|
||||
DWORD m_bufferCount; // 0x58c
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1007ab20
|
||||
// LegoVideoManager::`scalar deleting destructor'
|
||||
|
||||
#endif // LEGOVIDEOMANAGER_H
|
||||
|
||||
@@ -47,18 +47,18 @@ public:
|
||||
LegoWorld();
|
||||
~LegoWorld() override; // vtable+0x00
|
||||
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
|
||||
virtual void ReadyWorld(); // vtable+0x50
|
||||
virtual LegoCameraController* VTable0x54(); // vtable+0x54
|
||||
virtual void Add(MxCore* p_object); // vtable+0x58
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
|
||||
virtual void ReadyWorld(); // vtable+0x50
|
||||
virtual LegoCameraController* InitializeCameraController(); // vtable+0x54
|
||||
virtual void Add(MxCore* p_object); // vtable+0x58
|
||||
|
||||
// The BETA10 match could also be LegoWorld::Escape(), only the child classes might be able to tell
|
||||
// FUNCTION: LEGO1 0x1001d670
|
||||
// FUNCTION: BETA10 0x10017530
|
||||
virtual MxBool VTable0x5c() { return FALSE; } // vtable+0x5c
|
||||
virtual MxBool WaitForTransition() { return FALSE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x100010a0
|
||||
virtual void VTable0x60() {} // vtable+0x60
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
);
|
||||
void RemoveActor(LegoPathActor* p_actor);
|
||||
MxBool ActorExists(LegoPathActor* p_actor);
|
||||
void FUN_1001fda0(LegoAnimPresenter* p_presenter);
|
||||
void FUN_1001fe90(LegoAnimPresenter* p_presenter);
|
||||
void AddPresenterIfInRange(LegoAnimPresenter* p_presenter);
|
||||
void RemovePresenterFromBoundaries(LegoAnimPresenter* p_presenter);
|
||||
LegoPathBoundary* FindPathBoundary(const char* p_name);
|
||||
void AddPath(LegoPathController* p_controller);
|
||||
MxResult GetCurrPathInfo(LegoPathBoundary** p_boundaries, MxS32& p_numL);
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
LegoEntityList* GetEntityList() { return m_entityList; }
|
||||
LegoOmni::World GetWorldId() { return m_worldId; }
|
||||
MxBool GetUnknown0xd0Empty() { return m_set0xd0.empty(); }
|
||||
MxBool NoDisabledObjects() { return m_disabledObjects.empty(); }
|
||||
list<LegoROI*>& GetROIList() { return m_roiList; }
|
||||
LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnim; }
|
||||
|
||||
@@ -131,9 +131,9 @@ protected:
|
||||
LegoEntityList* m_entityList; // 0x9c
|
||||
LegoCacheSoundList* m_cacheSoundList; // 0xa0
|
||||
MxBool m_destroyed; // 0xa4
|
||||
MxCoreSet m_set0xa8; // 0xa8
|
||||
MxCoreSet m_objects; // 0xa8
|
||||
MxPresenterList m_controlPresenters; // 0xb8
|
||||
MxCoreSet m_set0xd0; // 0xd0
|
||||
MxCoreSet m_disabledObjects; // 0xd0
|
||||
list<LegoROI*> m_roiList; // 0xe0
|
||||
LegoOmni::World m_worldId; // 0xec
|
||||
|
||||
|
||||
@@ -16,12 +16,15 @@ class LegoWorld;
|
||||
// class MxPtrList<LegoWorld>
|
||||
|
||||
// VTABLE: LEGO1 0x100d8680
|
||||
// VTABLE: BETA10 0x101bc900
|
||||
// SIZE 0x18
|
||||
class LegoWorldList : public MxPtrList<LegoWorld> {
|
||||
public:
|
||||
// FUNCTION: BETA10 0x10092ce0
|
||||
LegoWorldList(MxBool p_ownership = FALSE) : MxPtrList<LegoWorld>(p_ownership) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x100598d0
|
||||
// FUNCTION: BETA10 0x10092d80
|
||||
MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10059a00
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS);
|
||||
|
||||
void Init();
|
||||
void Update(MxS32 p_targetVolume, MxS32 p_speed, MxPresenter::TickleState p_tickleState);
|
||||
void Stop();
|
||||
void LowerVolume();
|
||||
void RaiseVolume();
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
m_unk0x08 = 1;
|
||||
m_finishTimes = p_finishTimes;
|
||||
m_startTime = INT_MIN;
|
||||
m_unk0x14 = 1;
|
||||
m_counter = 1;
|
||||
m_score = LegoState::e_grey;
|
||||
m_hiScore = LegoState::e_grey;
|
||||
m_actions = p_actions;
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
m_unk0x08 = p_mission.m_unk0x08;
|
||||
m_finishTimes = p_mission.m_finishTimes;
|
||||
m_startTime = p_mission.m_startTime;
|
||||
m_unk0x14 = p_mission.m_unk0x14;
|
||||
m_counter = p_mission.m_counter;
|
||||
m_score = p_mission.m_score;
|
||||
m_hiScore = p_mission.m_hiScore;
|
||||
m_actions = p_mission.m_actions;
|
||||
@@ -100,12 +100,24 @@ public:
|
||||
undefined m_unk0x08; // 0x08
|
||||
MxLong* m_finishTimes; // 0x0c
|
||||
MxLong m_startTime; // 0x10
|
||||
MxS16 m_unk0x14; // 0x14
|
||||
MxS16 m_counter; // 0x14
|
||||
MxS16 m_score; // 0x16
|
||||
MxS16 m_hiScore; // 0x18
|
||||
IsleScript::Script* m_actions; // 0x1c
|
||||
};
|
||||
|
||||
enum {
|
||||
e_none = 0,
|
||||
e_introduction = 1,
|
||||
e_waitAcceptingQuest = 2,
|
||||
e_started = 3,
|
||||
e_delivering = 4,
|
||||
e_arrivedAtDestination = 5,
|
||||
e_suggestHelicopter = 6,
|
||||
e_transitionToAct2 = 8,
|
||||
e_timeoutAcceptingQuest = 9,
|
||||
};
|
||||
|
||||
PizzaMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x10039290
|
||||
@@ -140,7 +152,7 @@ public:
|
||||
MxS16 GetActorState();
|
||||
|
||||
PizzeriaState* m_pizzeriaState; // 0x08
|
||||
undefined4 m_unk0x0c; // 0x0c
|
||||
MxU32 m_state; // 0x0c
|
||||
Mission m_missions[5]; // 0x10
|
||||
MxU32 m_playedAction; // 0xb0
|
||||
|
||||
@@ -187,8 +199,8 @@ public:
|
||||
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
|
||||
|
||||
void CreateState();
|
||||
void FUN_10038220(IsleScript::Script p_objectId);
|
||||
void FUN_100382b0();
|
||||
void Start(IsleScript::Script p_objectId);
|
||||
void Reset();
|
||||
void StopActions();
|
||||
void PlayAction(MxU32 p_objectId, MxBool p_param7);
|
||||
|
||||
@@ -205,7 +217,7 @@ private:
|
||||
IsleScript::Script m_speechAction; // 0x8c
|
||||
MxLong m_startTime; // 0x90
|
||||
MxLong m_duration; // 0x94
|
||||
MxBool m_unk0x98; // 0x98
|
||||
MxBool m_playedLocationAnimation; // 0x98
|
||||
};
|
||||
|
||||
#endif // PIZZA_H
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e1d0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e1e0
|
||||
// FUNCTION: BETA10 0x100f0c50
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
void ParseAction(char* p_extra) override; // vtable+0x20
|
||||
|
||||
MxResult FUN_1001c360(float p_und, Matrix4& p_transform) override;
|
||||
MxResult AnimateWithTransform(float p_time, Matrix4& p_transform) override;
|
||||
|
||||
virtual void FUN_10071c80(Vector3& p_vec);
|
||||
|
||||
|
||||
@@ -54,12 +54,12 @@ private:
|
||||
struct {
|
||||
MxS16 m_letters[7]; // 0x00
|
||||
MxS16 m_cursorPos; // 0x0e
|
||||
} m_unk0x280; // 0x280
|
||||
} m_newName; // 0x280
|
||||
MxControlPresenter* m_checkmark[10]; // 0x290
|
||||
undefined2 m_unk0x2b8; // 0x2b8
|
||||
undefined2 m_vehiclesToPosition; // 0x2b8
|
||||
InfocenterState* m_infocenterState; // 0x2bc
|
||||
undefined m_unk0x2c0; // 0x2c0
|
||||
undefined m_unk0x2c1; // 0x2c1
|
||||
undefined m_awaitLoad; // 0x2c1
|
||||
undefined m_unk0x2c2[0x02]; // 0x2c2
|
||||
LPDIRECTDRAWSURFACE m_checkboxHilite; // 0x2c4
|
||||
LPDIRECTDRAWSURFACE m_checkboxSurface; // 0x2c8
|
||||
@@ -69,9 +69,9 @@ private:
|
||||
MxLong HandleKeyPress(MxU8 p_key);
|
||||
MxLong HandleControl(LegoControlManagerNotificationParam& p_param);
|
||||
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
|
||||
void FUN_100775c0(MxS16 p_playerIndex);
|
||||
void LoadSave(MxS16 p_checkMarkIndex);
|
||||
void WriteInfocenterLetters(MxS16);
|
||||
void FUN_100778c0();
|
||||
void LoadVehicles();
|
||||
MxBool CreateSurface();
|
||||
};
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100010b0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x100010c0
|
||||
// FUNCTION: BETA10 0x100f4f20
|
||||
|
||||
@@ -36,129 +36,131 @@ Act2Actor::Location g_brickstrLocations[] = {
|
||||
{{26.470566, 0.069, -44.670845}, {0.004602, 0.0, -0.99998897}, "int26", FALSE},
|
||||
{{-6.323625, 0.069, -47.96045}, {-0.982068, 0.0, 0.188529}, "edg02_53", FALSE},
|
||||
{{-36.689, -0.978409, 31.449}, {0.083792, -0.94303, -0.66398698}, "edg00_157", FALSE},
|
||||
#ifndef BETA10
|
||||
{{-44.6, 0.1, 45.3}, {0.95, 0.0, -0.3}, "edg00_154", FALSE},
|
||||
#endif
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f1c
|
||||
MxFloat g_unk0x100f0f1c = 0.0f;
|
||||
MxFloat g_lastAnimationTime = 0.0f;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f20
|
||||
// GLOBAL: BETA10 0x101dbe40
|
||||
MxBool g_unk0x100f0f20 = FALSE;
|
||||
MxBool g_nextEntityIsBuilding = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f24
|
||||
MxBool g_unk0x100f0f24 = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f28
|
||||
// GLOBAL: BETA10 0x101dbe44
|
||||
MxBool g_unk0x100f0f28 = FALSE;
|
||||
MxBool g_playedShootSound = FALSE;
|
||||
|
||||
// --- All of these are indices into g_plantInfo (0x10103180) ---
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f30
|
||||
// GLOBAL: BETA10 0x101dbe48
|
||||
MxS32 g_unk0x100f0f30[] = {2, 23, 32, 66, 71, 72, 73, -1};
|
||||
MxS32 g_location0Plants[] = {2, 23, 32, 66, 71, 72, 73, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f50
|
||||
// GLOBAL: BETA10 0x101dbe68
|
||||
MxS32 g_unk0x100f0f50[] = {0, 7, 16, 18, 20, 21, 34, 49, 58, 59, 63, 65, 69, 74, -1};
|
||||
MxS32 g_location1Plants[] = {0, 7, 16, 18, 20, 21, 34, 49, 58, 59, 63, 65, 69, 74, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0f90
|
||||
// GLOBAL: BETA10 0x101dbea8
|
||||
MxS32 g_unk0x100f0f90[] = {12, 19, 24, 48, 60, -1};
|
||||
MxS32 g_location2Plants[] = {12, 19, 24, 48, 60, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0fa8
|
||||
// GLOBAL: BETA10 0x101dbec0
|
||||
MxS32 g_unk0x100f0fa8[] = {8, 15, 46, -1};
|
||||
MxS32 g_location3Plants[] = {8, 15, 46, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0fb8
|
||||
// GLOBAL: BETA10 0x101dbed0
|
||||
MxS32 g_unk0x100f0fb8[] = {25, 26, 28, 29, 38, 39, 42, 50, 51, 56, -1};
|
||||
MxS32 g_location4Plants[] = {25, 26, 28, 29, 38, 39, 42, 50, 51, 56, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f0fe8
|
||||
// GLOBAL: BETA10 0x101dbf00
|
||||
MxS32 g_unk0x100f0fe8[] = {3, 40, 53, 55, -1};
|
||||
MxS32 g_location5Plants[] = {3, 40, 53, 55, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f1000
|
||||
// GLOBAL: BETA10 0x101dbf18
|
||||
MxS32 g_unk0x100f1000[] = {22, 33, 41, 45, 67, -1};
|
||||
MxS32 g_location6Plants[] = {22, 33, 41, 45, 67, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f1018
|
||||
// GLOBAL: BETA10 0x101dbf30
|
||||
MxS32 g_unk0x100f1018[] = {13, 30, 31, 62, -1};
|
||||
MxS32 g_location7Plants[] = {13, 30, 31, 62, -1};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f1030
|
||||
// GLOBAL: BETA10 0x101dbf48
|
||||
MxS32 g_unk0x100f1030[] = {1, 27, 37, 44, 47, 54, 61, 64, -1};
|
||||
MxS32 g_location8Plants[] = {1, 27, 37, 44, 47, 54, 61, 64, -1};
|
||||
|
||||
// --- End of indices into g_plantInfo ---
|
||||
|
||||
// GLOBAL: LEGO1 0x10102b1c
|
||||
// GLOBAL: BETA10 0x10209f60
|
||||
undefined4 g_nextHeadWavIndex = 0;
|
||||
MxU32 g_nextHeadWavIndex = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x10102b20
|
||||
// GLOBAL: BETA10 0x10209f64
|
||||
undefined4 g_nextBehindWavIndex = 0;
|
||||
MxU32 g_nextBehindWavIndex = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x10102b24
|
||||
// GLOBAL: BETA10 0x10209f68
|
||||
undefined4 g_nextInterruptWavIndex = 0;
|
||||
MxU32 g_nextInterruptWavIndex = 0;
|
||||
|
||||
// FUNCTION: LEGO1 0x100187e0
|
||||
// FUNCTION: BETA10 0x1000c7fb
|
||||
Act2Actor::Act2Actor()
|
||||
{
|
||||
m_unk0x1c = 0;
|
||||
m_unk0x1d = 0;
|
||||
m_unk0x1f = FALSE;
|
||||
m_unk0x24 = 0;
|
||||
m_unk0x20 = 0;
|
||||
m_unk0x1e = 0;
|
||||
m_unk0x28 = 4;
|
||||
m_unk0x2c = 0;
|
||||
m_unk0x30 = 0;
|
||||
m_skipAnimation = FALSE;
|
||||
m_targetLocation = 0;
|
||||
m_animatingHit = FALSE;
|
||||
m_createBrickTime = 0;
|
||||
m_animationDuration = 0;
|
||||
m_state = e_readyToShoot;
|
||||
m_baseWorldSpeed = 4;
|
||||
m_shootAnimEnd = 0;
|
||||
m_entityAnimationTime = 0;
|
||||
m_shootAnim = NULL;
|
||||
m_unk0x44 = 0;
|
||||
m_unk0x40 = 1;
|
||||
m_unk0x48 = 0;
|
||||
m_unk0x4c = NULL;
|
||||
m_unk0x38 = NULL;
|
||||
m_resetWorldSpeedAt = 0;
|
||||
m_initializing = TRUE;
|
||||
m_visitedLocations = 0;
|
||||
m_nextEntity = NULL;
|
||||
m_cachedShootSound = NULL;
|
||||
m_unk0x3c = 0;
|
||||
|
||||
// Odd: The code says < 10, but there are 11 entries in the array
|
||||
for (MxS32 i = 0; i < 10; i++) {
|
||||
g_brickstrLocations[i].m_unk0x1c = FALSE;
|
||||
g_brickstrLocations[i].m_cleared = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10018940
|
||||
void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform)
|
||||
{
|
||||
LegoAnimActor::SetROI(p_roi, p_bool1, p_bool2);
|
||||
LegoAnimActor::SetROI(p_roi, p_bool1, p_updateTransform);
|
||||
m_roi->SetVisibility(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10018980
|
||||
// FUNCTION: BETA10 0x1000c963
|
||||
void Act2Actor::FUN_10018980()
|
||||
void Act2Actor::InitializeNextShot()
|
||||
{
|
||||
for (MxS32 i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
|
||||
m_shootAnim = m_animMaps[i];
|
||||
}
|
||||
}
|
||||
|
||||
assert(m_shootAnim);
|
||||
|
||||
m_unk0x38 = SoundManager()->GetCacheSoundManager()->FindSoundByKey("xarrow");
|
||||
m_cachedShootSound = SoundManager()->GetCacheSoundManager()->FindSoundByKey("xarrow");
|
||||
#ifdef BETA10
|
||||
// actually 0x2c and 0x30
|
||||
m_unk0x38 = SoundManager()->GetCacheSoundManager()->FindSoundByKey("bcrash");
|
||||
m_unk0x38->SetDistance(35, 60);
|
||||
m_unk0x38->SetDistance(35, 60);
|
||||
m_cachedShootSound = SoundManager()->GetCacheSoundManager()->FindSoundByKey("bcrash");
|
||||
m_cachedShootSound->SetDistance(35, 60);
|
||||
m_cachedShootSound->SetDistance(35, 60);
|
||||
#else
|
||||
m_unk0x38->SetDistance(45, 55);
|
||||
m_cachedShootSound->SetDistance(45, 55);
|
||||
m_roi->SetVisibility(TRUE);
|
||||
#endif
|
||||
}
|
||||
@@ -167,9 +169,9 @@ void Act2Actor::FUN_10018980()
|
||||
// FUNCTION: BETA10 0x1000ca64
|
||||
MxResult Act2Actor::HitActor(LegoPathActor*, MxBool)
|
||||
{
|
||||
if (m_unk0x1f == FALSE) {
|
||||
m_unk0x1f = TRUE;
|
||||
m_unk0x20 = 0;
|
||||
if (m_animatingHit == FALSE) {
|
||||
m_animatingHit = TRUE;
|
||||
m_animationDuration = 0;
|
||||
}
|
||||
|
||||
SoundManager()->GetCacheSoundManager()->Play("hitactor", NULL, FALSE);
|
||||
@@ -185,7 +187,7 @@ MxResult Act2Actor::VTable0x9c()
|
||||
return SUCCESS;
|
||||
}
|
||||
else {
|
||||
if (m_unk0x1f) {
|
||||
if (m_animatingHit) {
|
||||
MxMatrix matrix = m_roi->GetLocal2World();
|
||||
matrix[3][1] -= 3.0f;
|
||||
m_roi->UpdateTransformationRelativeToParent(matrix);
|
||||
@@ -207,28 +209,28 @@ void Act2Actor::Animate(float p_time)
|
||||
int dummy1; // for BETA10, not sure what it is being used for
|
||||
|
||||
#ifndef BETA10
|
||||
MxFloat local48float = 0.0f;
|
||||
if (g_unk0x100f0f1c != 0.0f) {
|
||||
local48float = p_time - g_unk0x100f0f1c;
|
||||
MxFloat timeSinceLastAnimate = 0.0f;
|
||||
if (g_lastAnimationTime != 0.0f) {
|
||||
timeSinceLastAnimate = p_time - g_lastAnimationTime;
|
||||
}
|
||||
|
||||
g_unk0x100f0f1c = p_time;
|
||||
g_lastAnimationTime = p_time;
|
||||
#endif
|
||||
|
||||
LegoAnimActor::Animate(p_time);
|
||||
|
||||
if (m_unk0x44 != 0.0f && m_unk0x44 < p_time) {
|
||||
SetWorldSpeed(m_unk0x28);
|
||||
if (m_resetWorldSpeedAt != 0.0f && m_resetWorldSpeedAt < p_time) {
|
||||
SetWorldSpeed(m_baseWorldSpeed);
|
||||
}
|
||||
|
||||
if (m_unk0x1f) {
|
||||
if (m_unk0x20 > 600.0f) {
|
||||
m_unk0x1f = FALSE;
|
||||
m_unk0x20 = 0;
|
||||
if (m_animatingHit) {
|
||||
if (m_animationDuration > 600.0f) {
|
||||
m_animatingHit = FALSE;
|
||||
m_animationDuration = 0;
|
||||
}
|
||||
else {
|
||||
#ifndef BETA10
|
||||
m_unk0x20 += local48float;
|
||||
m_animationDuration += timeSinceLastAnimate;
|
||||
#endif
|
||||
MxMatrix matrix = m_roi->GetLocal2World();
|
||||
matrix[3][1] += 3.0f;
|
||||
@@ -245,41 +247,41 @@ void Act2Actor::Animate(float p_time)
|
||||
}
|
||||
|
||||
if (!m_grec) {
|
||||
if (m_unk0x1e == 2) {
|
||||
m_unk0x1e = 0;
|
||||
m_unk0x2c = m_shootAnim->GetDuration() + p_time;
|
||||
m_unk0x30 = m_unk0x2c - 1300.0f;
|
||||
if (m_state == e_roaming) {
|
||||
m_state = e_readyToShoot;
|
||||
m_shootAnimEnd = m_shootAnim->GetDuration() + p_time;
|
||||
m_entityAnimationTime = m_shootAnimEnd - 1300.0f;
|
||||
SetWorldSpeed(0);
|
||||
m_unk0x1c = FALSE;
|
||||
m_skipAnimation = FALSE;
|
||||
}
|
||||
else if (m_unk0x1e == 1) {
|
||||
else if (m_state == e_endShot) {
|
||||
FindROI("pwrbrik")->SetVisibility(FALSE);
|
||||
FindROI("debrick")->SetVisibility(FALSE);
|
||||
FindROI("ray")->SetVisibility(FALSE);
|
||||
m_unk0x4c = NULL;
|
||||
m_unk0x1e = 2;
|
||||
VTable0xa0();
|
||||
FUN_10019250(m_unk0x28 + 3, p_time + 3000.0f);
|
||||
m_nextEntity = NULL;
|
||||
m_state = e_roaming;
|
||||
NextTargetLocation();
|
||||
SetWorldSpeed(m_baseWorldSpeed + 3, p_time + 3000.0f);
|
||||
}
|
||||
else if (m_unk0x1e == 0) {
|
||||
if (m_unk0x40) {
|
||||
m_unk0x40 = 0;
|
||||
m_unk0x2c = m_shootAnim->GetDuration() + p_time;
|
||||
m_unk0x30 = m_unk0x2c - 1300.0f;
|
||||
else if (m_state == e_readyToShoot) {
|
||||
if (m_initializing) {
|
||||
m_initializing = FALSE;
|
||||
m_shootAnimEnd = m_shootAnim->GetDuration() + p_time;
|
||||
m_entityAnimationTime = m_shootAnimEnd - 1300.0f;
|
||||
}
|
||||
|
||||
if (FUN_10019700(p_time) == TRUE) {
|
||||
if (UpdateShot(p_time) == TRUE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (m_unk0x1e == 5) {
|
||||
else if (m_state == e_hiding) {
|
||||
FindROI("brickstr")->SetVisibility(FALSE);
|
||||
GetROI()->SetVisibility(FALSE);
|
||||
CurrentWorld()->RemoveActor(this);
|
||||
return;
|
||||
}
|
||||
#ifndef BETA10
|
||||
else if (m_unk0x1e == 4) {
|
||||
else if (m_state == e_goingToHide) {
|
||||
if (m_worldSpeed == 0.0f) {
|
||||
return;
|
||||
}
|
||||
@@ -291,14 +293,14 @@ void Act2Actor::Animate(float p_time)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (m_unk0x1e == 5 || m_unk0x1e == 4) {
|
||||
if (m_state == e_hiding || m_state == e_goingToHide) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_unk0x1e == 3) {
|
||||
if (p_time - m_unk0x24 > 600.0f) {
|
||||
m_unk0x1e = 2;
|
||||
FUN_10019250(m_unk0x28 + 4, p_time + 15000.0f);
|
||||
if (m_state == e_createdBrick) {
|
||||
if (p_time - m_createBrickTime > 600.0f) {
|
||||
m_state = e_roaming;
|
||||
SetWorldSpeed(m_baseWorldSpeed + 4, p_time + 15000.0f);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -323,38 +325,38 @@ void Act2Actor::Animate(float p_time)
|
||||
const MxFloat* pepperWorldPosition = roiPepper->GetWorldPosition();
|
||||
const MxFloat* worldPosition = m_roi->GetWorldPosition();
|
||||
|
||||
MxFloat distance1 = DISTSQRD3(pepperWorldPosition, worldPosition);
|
||||
MxFloat distanceToAmbulance = DISTSQRD3(pepperWorldPosition, worldPosition);
|
||||
|
||||
if (distance1 < 75.0f) {
|
||||
if (!m_unk0x1c) {
|
||||
m_unk0x1c = 1;
|
||||
if (distanceToAmbulance < 75.0f) {
|
||||
if (!m_skipAnimation) {
|
||||
m_skipAnimation = TRUE;
|
||||
|
||||
if (!m_unk0x1e) {
|
||||
FUN_100199f0(2);
|
||||
m_unk0x1e = 1;
|
||||
if (!m_state) {
|
||||
PlayNextVoiceOver(VoiceOver::e_interrupt);
|
||||
m_state = e_endShot;
|
||||
}
|
||||
else {
|
||||
LegoROI* childROI = m_roi->FindChildROI("windsd", m_roi);
|
||||
const MxFloat* childPosition = childROI->GetWorldPosition();
|
||||
MxFloat distance2 = DISTSQRD3(pepperWorldPosition, childPosition);
|
||||
MxFloat distanceToWindshield = DISTSQRD3(pepperWorldPosition, childPosition);
|
||||
|
||||
childROI = m_roi->FindChildROI("reardr", m_roi);
|
||||
childPosition = childROI->GetWorldPosition();
|
||||
MxFloat distance3 = DISTSQRD3(pepperWorldPosition, childPosition);
|
||||
MxFloat distanceToRearDoor = DISTSQRD3(pepperWorldPosition, childPosition);
|
||||
|
||||
if (distance3 > distance2) {
|
||||
FUN_100199f0(0);
|
||||
if (distanceToRearDoor > distanceToWindshield) {
|
||||
PlayNextVoiceOver(VoiceOver::e_head);
|
||||
}
|
||||
else
|
||||
#ifndef BETA10
|
||||
if (p_time - m_unk0x24 > 3000.0f) {
|
||||
if (p_time - m_createBrickTime > 3000.0f) {
|
||||
#endif
|
||||
SetWorldSpeed(m_unk0x28 - 1);
|
||||
m_unk0x1e = 3;
|
||||
m_unk0x24 = p_time;
|
||||
SetWorldSpeed(m_baseWorldSpeed - 1);
|
||||
m_state = e_createdBrick;
|
||||
m_createBrickTime = p_time;
|
||||
|
||||
if (((LegoAct2*) CurrentWorld())->FUN_100516b0() == SUCCESS) {
|
||||
FUN_100199f0(1);
|
||||
if (((LegoAct2*) CurrentWorld())->CreateBrick() == SUCCESS) {
|
||||
PlayNextVoiceOver(VoiceOver::e_behind);
|
||||
}
|
||||
#ifndef BETA10
|
||||
}
|
||||
@@ -363,8 +365,8 @@ void Act2Actor::Animate(float p_time)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_unk0x1c) {
|
||||
m_unk0x1c = 0;
|
||||
if (m_skipAnimation) {
|
||||
m_skipAnimation = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,11 +377,11 @@ void Act2Actor::Animate(float p_time)
|
||||
|
||||
// FUNCTION: LEGO1 0x10019250
|
||||
// FUNCTION: BETA10 0x1000d45c
|
||||
void Act2Actor::FUN_10019250(MxFloat p_speed, MxFloat p_param2)
|
||||
void Act2Actor::SetWorldSpeed(MxFloat p_speed, MxFloat p_resetWorldSpeedAt)
|
||||
{
|
||||
// The arguments have been changed from BETA10 to LEGO1
|
||||
SetWorldSpeed(p_speed);
|
||||
m_unk0x44 = p_param2;
|
||||
m_resetWorldSpeedAt = p_resetWorldSpeedAt;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10019280
|
||||
@@ -387,12 +389,12 @@ void Act2Actor::FUN_10019250(MxFloat p_speed, MxFloat p_param2)
|
||||
void Act2Actor::SetWorldSpeed(MxFloat p_worldSpeed)
|
||||
{
|
||||
LegoAnimActor::SetWorldSpeed(p_worldSpeed);
|
||||
m_unk0x44 = 0;
|
||||
m_resetWorldSpeedAt = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100192a0
|
||||
// FUNCTION: BETA10 0x1000d4d6
|
||||
void Act2Actor::FUN_100192a0(undefined4 p_location)
|
||||
void Act2Actor::FindPath(MxU32 p_location)
|
||||
{
|
||||
Mx3DPointFloat newPosition(0.0, 0.0, 0.0);
|
||||
Mx3DPointFloat newDirection(0.0, 0.0, 0.0);
|
||||
@@ -429,37 +431,37 @@ void Act2Actor::FUN_100192a0(undefined4 p_location)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10019520
|
||||
void Act2Actor::FUN_10019520()
|
||||
void Act2Actor::GoingToHide()
|
||||
{
|
||||
m_unk0x1e = 4;
|
||||
SetWorldSpeed(m_unk0x28 + 3);
|
||||
FUN_100192a0(10);
|
||||
m_state = e_goingToHide;
|
||||
SetWorldSpeed(m_baseWorldSpeed + 3);
|
||||
FindPath(10);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10019560
|
||||
void Act2Actor::FUN_10019560()
|
||||
void Act2Actor::Hide()
|
||||
{
|
||||
m_unk0x1e = 5;
|
||||
SetWorldSpeed(m_unk0x28 + 5);
|
||||
FUN_100192a0(9);
|
||||
m_state = e_hiding;
|
||||
SetWorldSpeed(m_baseWorldSpeed + 5);
|
||||
FindPath(9);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100195a0
|
||||
// FUNCTION: BETA10 0x1000d7d3
|
||||
MxS32 Act2Actor::VTable0xa0()
|
||||
MxS32 Act2Actor::NextTargetLocation()
|
||||
{
|
||||
undefined4 newLocation;
|
||||
MxU32 newLocation;
|
||||
|
||||
assert(!m_grec);
|
||||
|
||||
CurrentWorld();
|
||||
MxU16 randomVal = rand() / (RAND_MAX / 2) + 1;
|
||||
|
||||
if (m_unk0x48 == 8 && m_unk0x1d != 8) {
|
||||
if (m_visitedLocations == 8 && m_targetLocation != 8) {
|
||||
newLocation = 8;
|
||||
}
|
||||
else {
|
||||
switch (m_unk0x1d) {
|
||||
switch (m_targetLocation) {
|
||||
case 0:
|
||||
if (randomVal == 1) {
|
||||
newLocation = 3;
|
||||
@@ -534,10 +536,10 @@ MxS32 Act2Actor::VTable0xa0()
|
||||
}
|
||||
}
|
||||
|
||||
undefined4 firstChoice = newLocation;
|
||||
MxU32 firstChoice = newLocation;
|
||||
|
||||
if (m_unk0x48 < 7 || g_brickstrLocations[m_unk0x1d].m_unk0x1c) {
|
||||
while (g_brickstrLocations[newLocation].m_unk0x1c || m_unk0x1d == newLocation) {
|
||||
if (m_visitedLocations < 7 || g_brickstrLocations[m_targetLocation].m_cleared) {
|
||||
while (g_brickstrLocations[newLocation].m_cleared || m_targetLocation == newLocation) {
|
||||
if (newLocation == 7) {
|
||||
newLocation = 0;
|
||||
}
|
||||
@@ -549,8 +551,8 @@ MxS32 Act2Actor::VTable0xa0()
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x1d = newLocation;
|
||||
FUN_100192a0(newLocation);
|
||||
m_targetLocation = newLocation;
|
||||
FindPath(newLocation);
|
||||
|
||||
if (m_grec) {
|
||||
return SUCCESS;
|
||||
@@ -562,64 +564,64 @@ MxS32 Act2Actor::VTable0xa0()
|
||||
|
||||
// FUNCTION: LEGO1 0x10019700
|
||||
// FUNCTION: BETA10 0x1000dd27
|
||||
MxU32 Act2Actor::FUN_10019700(MxFloat p_param)
|
||||
MxU32 Act2Actor::UpdateShot(MxFloat p_time)
|
||||
{
|
||||
if (!m_unk0x4c) {
|
||||
g_unk0x100f0f20 = FALSE;
|
||||
m_unk0x4c = FUN_10019b90(&g_unk0x100f0f20);
|
||||
if (!m_nextEntity) {
|
||||
g_nextEntityIsBuilding = FALSE;
|
||||
m_nextEntity = GetNextEntity(&g_nextEntityIsBuilding);
|
||||
g_unk0x100f0f24 = FALSE;
|
||||
g_unk0x100f0f28 = FALSE;
|
||||
g_playedShootSound = FALSE;
|
||||
}
|
||||
|
||||
if (!m_unk0x4c) {
|
||||
MxTrace("nothing left to destroy at location %d\n", m_unk0x1d);
|
||||
m_unk0x1e = 1;
|
||||
if (!m_nextEntity) {
|
||||
MxTrace("nothing left to destroy at location %d\n", m_targetLocation);
|
||||
m_state = e_endShot;
|
||||
|
||||
if (m_unk0x1d == 8) {
|
||||
if (m_targetLocation == 8) {
|
||||
((LegoAct2*) CurrentWorld())->BadEnding();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!g_unk0x100f0f28 && m_unk0x30 < p_param) {
|
||||
g_unk0x100f0f28 = TRUE;
|
||||
if (!g_playedShootSound && m_entityAnimationTime < p_time) {
|
||||
g_playedShootSound = TRUE;
|
||||
assert(SoundManager()->GetCacheSoundManager());
|
||||
SoundManager()->GetCacheSoundManager()->Play(m_unk0x38, "brickstr", FALSE);
|
||||
SoundManager()->GetCacheSoundManager()->Play(m_cachedShootSound, "brickstr", FALSE);
|
||||
|
||||
if (g_unk0x100f0f20) {
|
||||
BuildingManager()->ScheduleAnimation(m_unk0x4c, 800, TRUE, FALSE);
|
||||
if (g_nextEntityIsBuilding) {
|
||||
BuildingManager()->ScheduleAnimation(m_nextEntity, 800, TRUE, FALSE);
|
||||
}
|
||||
else {
|
||||
PlantManager()->ScheduleAnimation(m_unk0x4c, 800);
|
||||
PlantManager()->ScheduleAnimation(m_nextEntity, 800);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_unk0x2c < p_param) {
|
||||
g_unk0x100f0f20 = FALSE;
|
||||
m_unk0x4c = FUN_10019b90(&g_unk0x100f0f20);
|
||||
m_unk0x2c = m_shootAnim->GetDuration() + p_param;
|
||||
m_unk0x30 = m_unk0x2c - 1300.0f;
|
||||
if (m_shootAnimEnd < p_time) {
|
||||
g_nextEntityIsBuilding = FALSE;
|
||||
m_nextEntity = GetNextEntity(&g_nextEntityIsBuilding);
|
||||
m_shootAnimEnd = m_shootAnim->GetDuration() + p_time;
|
||||
m_entityAnimationTime = m_shootAnimEnd - 1300.0f;
|
||||
g_unk0x100f0f24 = FALSE;
|
||||
g_unk0x100f0f28 = FALSE;
|
||||
g_playedShootSound = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_lastTime = p_param;
|
||||
m_lastTime = p_time;
|
||||
LegoROI* brickstrROI = FindROI("brickstr");
|
||||
|
||||
MxMatrix matrix = m_roi->GetLocal2World();
|
||||
matrix[3][1] += 1.0f;
|
||||
brickstrROI->SetLocal2World(matrix);
|
||||
MxMatrix initialTransform = m_roi->GetLocal2World();
|
||||
initialTransform[3][1] += 1.0f;
|
||||
brickstrROI->SetLocal2World(initialTransform);
|
||||
brickstrROI->WrappedUpdateWorldData();
|
||||
|
||||
Vector3 col0(matrix[0]);
|
||||
Vector3 col1(matrix[1]);
|
||||
Vector3 col2(matrix[2]);
|
||||
Vector3 col3(matrix[3]);
|
||||
Vector3 col0(initialTransform[0]);
|
||||
Vector3 col1(initialTransform[1]);
|
||||
Vector3 col2(initialTransform[2]);
|
||||
Vector3 col3(initialTransform[3]);
|
||||
|
||||
col2 = col3;
|
||||
col2 -= m_unk0x4c->GetROI()->GetWorldPosition();
|
||||
col2 -= m_nextEntity->GetROI()->GetWorldPosition();
|
||||
col2.Unitize();
|
||||
col0.EqualsCross(col1, col2);
|
||||
col0.Unitize();
|
||||
@@ -628,10 +630,10 @@ MxU32 Act2Actor::FUN_10019700(MxFloat p_param)
|
||||
assert(!m_cameraFlag);
|
||||
|
||||
LegoTreeNode* root = m_shootAnim->GetAnimTreePtr()->GetRoot();
|
||||
MxFloat time = p_param - (m_unk0x2c - m_shootAnim->GetDuration());
|
||||
MxFloat time = p_time - (m_shootAnimEnd - m_shootAnim->GetDuration());
|
||||
|
||||
for (MxS32 i = 0; i < root->GetNumChildren(); i++) {
|
||||
LegoROI::ApplyAnimationTransformation(root->GetChild(i), matrix, time, m_shootAnim->GetROIMap());
|
||||
LegoROI::ApplyAnimationTransformation(root->GetChild(i), initialTransform, time, m_shootAnim->GetROIMap());
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -639,68 +641,68 @@ MxU32 Act2Actor::FUN_10019700(MxFloat p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x100199f0
|
||||
// FUNCTION: BETA10 0x1000e11a
|
||||
void Act2Actor::FUN_100199f0(MxS8 p_param)
|
||||
void Act2Actor::PlayNextVoiceOver(MxS8 p_voiceOverType)
|
||||
{
|
||||
switch (p_param) {
|
||||
case 0:
|
||||
switch (p_voiceOverType) {
|
||||
case VoiceOver::e_head:
|
||||
switch (g_nextHeadWavIndex) {
|
||||
case 0:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOhead0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOhead0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
|
||||
g_nextHeadWavIndex++;
|
||||
break;
|
||||
default:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOhead1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOhead1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
g_nextHeadWavIndex = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case VoiceOver::e_behind:
|
||||
switch (g_nextBehindWavIndex) {
|
||||
case 0:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VObehind0_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VObehind0_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
g_nextBehindWavIndex++;
|
||||
break;
|
||||
case 1:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VObehind1_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VObehind1_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
g_nextBehindWavIndex++;
|
||||
break;
|
||||
case 2:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VObehind2_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VObehind2_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
g_nextBehindWavIndex++;
|
||||
break;
|
||||
default:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VObehind3_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VObehind3_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
|
||||
g_nextBehindWavIndex = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case VoiceOver::e_interrupt:
|
||||
switch (g_nextInterruptWavIndex) {
|
||||
case 0:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOinterrupt0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOinterrupt0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
g_nextInterruptWavIndex++;
|
||||
break;
|
||||
case 1:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOinterrupt1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOinterrupt1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
g_nextInterruptWavIndex++;
|
||||
break;
|
||||
case 2:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOinterrupt2_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOinterrupt2_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
g_nextInterruptWavIndex++;
|
||||
break;
|
||||
default:
|
||||
((LegoAct2*) CurrentWorld())
|
||||
->FUN_10052560(Act2mainScript::c_VOinterrupt3_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
->StartAction(Act2mainScript::c_VOinterrupt3_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
g_nextInterruptWavIndex = 0;
|
||||
break;
|
||||
}
|
||||
@@ -709,27 +711,27 @@ void Act2Actor::FUN_100199f0(MxS8 p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x10019b90
|
||||
// FUNCTION: BETA10 0x1000e374
|
||||
LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
LegoEntity* Act2Actor::GetNextEntity(MxBool* p_isBuilding)
|
||||
{
|
||||
MxS32 i;
|
||||
LegoBuildingInfo* buildingInfo = BuildingManager()->GetInfoArray(i);
|
||||
LegoPlantInfo* plantInfo = PlantManager()->GetInfoArray(i);
|
||||
LegoEntity* result = 0;
|
||||
|
||||
switch (m_unk0x1d) {
|
||||
switch (m_targetLocation) {
|
||||
case 0:
|
||||
if (buildingInfo[12].m_counter) {
|
||||
result = buildingInfo[12].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else if (buildingInfo[14].m_counter) {
|
||||
result = buildingInfo[14].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0f30[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0f30[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0f30[i]].m_entity;
|
||||
for (i = 0; g_location0Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location0Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location0Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -738,12 +740,12 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 1:
|
||||
if (buildingInfo[13].m_counter) {
|
||||
result = buildingInfo[13].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0f50[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0f50[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0f50[i]].m_entity;
|
||||
for (i = 0; g_location1Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location1Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location1Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -752,16 +754,16 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 2:
|
||||
if (buildingInfo[9].m_counter) {
|
||||
result = buildingInfo[9].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else if (buildingInfo[11].m_counter) {
|
||||
result = buildingInfo[11].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0f90[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0f90[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0f90[i]].m_entity;
|
||||
for (i = 0; g_location2Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location2Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location2Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -770,20 +772,20 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 3:
|
||||
if (buildingInfo[7].m_counter) {
|
||||
result = buildingInfo[7].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else if (buildingInfo[8].m_counter) {
|
||||
result = buildingInfo[8].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else if (buildingInfo[3].m_counter) {
|
||||
result = buildingInfo[3].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0fa8[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0fa8[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0fa8[i]].m_entity;
|
||||
for (i = 0; g_location3Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location3Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location3Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -792,16 +794,16 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 4:
|
||||
if (buildingInfo[5].m_counter) {
|
||||
result = buildingInfo[5].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else if (buildingInfo[10].m_counter) {
|
||||
result = buildingInfo[10].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0fb8[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0fb8[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0fb8[i]].m_entity;
|
||||
for (i = 0; g_location4Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location4Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location4Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -810,12 +812,12 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 5:
|
||||
if (buildingInfo[4].m_counter) {
|
||||
result = buildingInfo[4].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f0fe8[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f0fe8[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f0fe8[i]].m_entity;
|
||||
for (i = 0; g_location5Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location5Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location5Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -824,12 +826,12 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 6:
|
||||
if (buildingInfo[2].m_counter) {
|
||||
result = buildingInfo[2].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f1000[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f1000[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f1000[i]].m_entity;
|
||||
for (i = 0; g_location6Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location6Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location6Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -838,21 +840,21 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
case 7:
|
||||
if (buildingInfo[6].m_counter) {
|
||||
result = buildingInfo[6].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
else {
|
||||
for (i = 0; g_unk0x100f1018[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f1018[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f1018[i]].m_entity;
|
||||
for (i = 0; g_location7Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location7Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location7Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
for (i = 0; g_unk0x100f1030[i] != -1; i++) {
|
||||
if (plantInfo[g_unk0x100f1030[i]].m_counter) {
|
||||
result = plantInfo[g_unk0x100f1030[i]].m_entity;
|
||||
for (i = 0; g_location8Plants[i] != -1; i++) {
|
||||
if (plantInfo[g_location8Plants[i]].m_counter) {
|
||||
result = plantInfo[g_location8Plants[i]].m_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -863,14 +865,14 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
|
||||
|
||||
if (buildingInfo[15].m_counter) {
|
||||
result = buildingInfo[15].m_entity;
|
||||
*p_param = TRUE;
|
||||
*p_isBuilding = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!result && !g_brickstrLocations[m_unk0x1d].m_unk0x1c) {
|
||||
g_brickstrLocations[m_unk0x1d].m_unk0x1c = TRUE;
|
||||
m_unk0x48++;
|
||||
if (!result && !g_brickstrLocations[m_targetLocation].m_cleared) {
|
||||
g_brickstrLocations[m_targetLocation].m_cleared = TRUE;
|
||||
m_visitedLocations++;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -270,7 +270,7 @@ void Act3Cop::ParseAction(char* p_extra)
|
||||
}
|
||||
|
||||
for (i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
|
||||
m_eatAnim = m_animMaps[i];
|
||||
}
|
||||
}
|
||||
@@ -558,7 +558,7 @@ void Act3Brickster::ParseAction(char* p_extra)
|
||||
((Act3*) m_world)->SetBrickster(this);
|
||||
|
||||
for (MxS32 i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
|
||||
m_shootAnim = m_animMaps[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,8 +111,8 @@ void Bike::ActivateSceneActions()
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!act1state->m_unk0x022) {
|
||||
act1state->m_unk0x022 = TRUE;
|
||||
if (!act1state->m_playedExitExplanation) {
|
||||
act1state->m_playedExitExplanation = TRUE;
|
||||
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
@@ -49,7 +49,7 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
|
||||
}
|
||||
|
||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
isle->FUN_10033350();
|
||||
isle->SwitchToInfocenter();
|
||||
isle->SetDestLocation(LegoGameState::Area::e_infomain);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
|
||||
@@ -192,8 +192,8 @@ void DuneBuggy::ActivateSceneActions()
|
||||
PlayMusic(JukeboxScript::c_GarageArea_Music);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!act1state->m_unk0x022) {
|
||||
act1state->m_unk0x022 = TRUE;
|
||||
if (!act1state->m_playedExitExplanation) {
|
||||
act1state->m_playedExitExplanation = TRUE;
|
||||
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
@@ -342,7 +342,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
|
||||
|
||||
assert(m_world && m_world->GetCameraController());
|
||||
m_world->GetCameraController()->SetWorldTransform(at, dir, up);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
@@ -388,13 +388,13 @@ void Helicopter::VTable0x74(Matrix4& p_transform)
|
||||
{
|
||||
if (m_userNavFlag) {
|
||||
m_roi->UpdateTransformationRelativeToParent(p_transform);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
else {
|
||||
m_roi->SetLocal2World(p_transform);
|
||||
m_roi->WrappedUpdateWorldData();
|
||||
if (m_cameraFlag) {
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void IslePathActor::Enter()
|
||||
|
||||
SetUserActor(this);
|
||||
FUN_1001b660();
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void IslePathActor::Exit()
|
||||
}
|
||||
|
||||
FUN_1001b660();
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
ResetViewVelocity();
|
||||
}
|
||||
|
||||
@@ -583,11 +583,11 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8
|
||||
break;
|
||||
}
|
||||
|
||||
if (state != NULL && state->m_unk0x4d && !state->m_unk0x4e) {
|
||||
if (state != NULL && state->m_finishedBuild && !state->m_playedExitScript) {
|
||||
if (AnimationManager()
|
||||
->FUN_10060dc0(anim, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, TRUE, TRUE) ==
|
||||
SUCCESS) {
|
||||
state->m_unk0x4e = TRUE;
|
||||
state->m_playedExitScript = TRUE;
|
||||
camAnim = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -633,7 +633,7 @@ void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundar
|
||||
m_roi->SetLocal2World(p_transform);
|
||||
if (m_cameraFlag) {
|
||||
ResetViewVelocity();
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,11 +163,11 @@ void Jetski::ActivateSceneActions()
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!act1state->m_state) {
|
||||
if (act1state->m_unk0x022) {
|
||||
if (act1state->m_playedExitExplanation) {
|
||||
PlayCamAnim(this, FALSE, 68, TRUE);
|
||||
}
|
||||
else {
|
||||
act1state->m_unk0x022 = TRUE;
|
||||
act1state->m_playedExitExplanation = TRUE;
|
||||
|
||||
LegoPathActor* user = UserActor();
|
||||
if (user != NULL) {
|
||||
|
||||
@@ -151,8 +151,8 @@ void Motocycle::ActivateSceneActions()
|
||||
PlayMusic(JukeboxScript::c_PoliceStation_Music);
|
||||
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!act1state->m_unk0x022) {
|
||||
act1state->m_unk0x022 = TRUE;
|
||||
if (!act1state->m_playedExitExplanation) {
|
||||
act1state->m_playedExitExplanation = TRUE;
|
||||
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
@@ -137,7 +137,7 @@ Pizza::Pizza()
|
||||
m_skateBoard = NULL;
|
||||
m_act1state = NULL;
|
||||
m_speechAction = IsleScript::c_noneIsle;
|
||||
m_unk0x98 = FALSE;
|
||||
m_playedLocationAnimation = FALSE;
|
||||
m_startTime = INT_MIN;
|
||||
}
|
||||
|
||||
@@ -177,11 +177,11 @@ void Pizza::CreateState()
|
||||
|
||||
// FUNCTION: LEGO1 0x10038220
|
||||
// FUNCTION: BETA10 0x100edb81
|
||||
void Pizza::FUN_10038220(IsleScript::Script p_objectId)
|
||||
void Pizza::Start(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_10064740(NULL);
|
||||
m_mission = m_state->GetMission(GameState()->GetActorId());
|
||||
m_state->m_unk0x0c = 1;
|
||||
m_state->m_state = PizzaMissionState::e_introduction;
|
||||
m_act1state->m_state = Act1State::e_pizza;
|
||||
m_mission->m_startTime = INT_MIN;
|
||||
g_isleFlags &= ~Isle::c_playMusic;
|
||||
@@ -193,22 +193,22 @@ void Pizza::FUN_10038220(IsleScript::Script p_objectId)
|
||||
|
||||
// FUNCTION: LEGO1 0x100382b0
|
||||
// FUNCTION: BETA10 0x100edc9b
|
||||
void Pizza::FUN_100382b0()
|
||||
void Pizza::Reset()
|
||||
{
|
||||
if (m_state->m_unk0x0c != 8) {
|
||||
if (m_state->m_state != PizzaMissionState::e_transitionToAct2) {
|
||||
if (m_speechAction != IsleScript::c_noneIsle) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_speechAction, NULL);
|
||||
}
|
||||
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
m_state->m_unk0x0c = 0;
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
UserActor()->SetActorState(LegoPathActor::c_initial);
|
||||
g_isleFlags |= Isle::c_playMusic;
|
||||
AnimationManager()->EnableCamAnims(TRUE);
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
m_mission->m_startTime = INT_MIN;
|
||||
m_mission = NULL;
|
||||
m_unk0x98 = FALSE;
|
||||
m_playedLocationAnimation = FALSE;
|
||||
m_speechAction = IsleScript::c_noneIsle;
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
TickleManager()->UnregisterClient(this);
|
||||
@@ -237,14 +237,14 @@ void Pizza::StopActions()
|
||||
// FUNCTION: BETA10 0x100edd10
|
||||
MxLong Pizza::HandleClick()
|
||||
{
|
||||
if (m_state->m_unk0x0c == 1) {
|
||||
m_state->m_unk0x0c = 2;
|
||||
if (m_state->m_state == PizzaMissionState::e_introduction) {
|
||||
m_state->m_state = PizzaMissionState::e_waitAcceptingQuest;
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
}
|
||||
|
||||
if (m_state->m_unk0x0c == 2) {
|
||||
if (m_state->m_state == PizzaMissionState::e_waitAcceptingQuest) {
|
||||
m_act1state->m_state = Act1State::e_pizza;
|
||||
|
||||
if (m_skateBoard == NULL) {
|
||||
@@ -266,7 +266,7 @@ MxLong Pizza::HandleClick()
|
||||
}
|
||||
|
||||
PlayAction(action, TRUE);
|
||||
m_state->m_unk0x0c = 3;
|
||||
m_state->m_state = PizzaMissionState::e_started;
|
||||
PlayMusic(JukeboxScript::c_PizzaMission_Music);
|
||||
return 1;
|
||||
}
|
||||
@@ -278,12 +278,12 @@ MxLong Pizza::HandleClick()
|
||||
// FUNCTION: BETA10 0x100ede53
|
||||
MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
if (m_state->m_unk0x0c == 4) {
|
||||
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
||||
MxLong time = Timer()->GetTime() - m_mission->m_startTime;
|
||||
|
||||
if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
|
||||
GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||
m_state->m_unk0x0c = 5;
|
||||
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
||||
m_state->SetPlayedAction(SndanimScript::c_TRS302_OpenJailDoor);
|
||||
|
||||
if (time < m_mission->GetRedFinishTime()) {
|
||||
@@ -348,20 +348,20 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
break;
|
||||
}
|
||||
|
||||
m_state->m_unk0x0c = 5;
|
||||
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
||||
PlayAction(action, TRUE);
|
||||
|
||||
MxTrace("Pizza mission: ending\n");
|
||||
}
|
||||
else if (p_param.GetTrigger() == LegoPathStruct::c_w) {
|
||||
if (p_param.GetData() == 0x15e && GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||
if (!m_unk0x98) {
|
||||
m_unk0x98 = TRUE;
|
||||
if (!m_playedLocationAnimation) {
|
||||
m_playedLocationAnimation = TRUE;
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns050p1_RunAnim, NULL);
|
||||
}
|
||||
}
|
||||
else if (p_param.GetData() == 0x15f && GameState()->GetActorId() == LegoActor::c_papa && !m_unk0x98) {
|
||||
m_unk0x98 = TRUE;
|
||||
else if (p_param.GetData() == 0x15f && GameState()->GetActorId() == LegoActor::c_papa && !m_playedLocationAnimation) {
|
||||
m_playedLocationAnimation = TRUE;
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_wns050p1_RunAnim, NULL);
|
||||
}
|
||||
}
|
||||
@@ -384,13 +384,13 @@ MxResult Pizza::Tickle()
|
||||
}
|
||||
|
||||
if (m_mission != NULL && m_mission->m_startTime != INT_MIN) {
|
||||
if (m_state->m_unk0x0c == 4) {
|
||||
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
||||
assert(m_mission);
|
||||
|
||||
if (time > m_mission->m_startTime + m_mission->GetTimeoutTime()) {
|
||||
StopActions();
|
||||
m_mission->UpdateScore(LegoState::e_grey);
|
||||
FUN_100382b0();
|
||||
Reset();
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_Avo917In_PlayWav, NULL);
|
||||
MxTrace("Pizza mission: timeout, stop\n");
|
||||
@@ -421,7 +421,7 @@ MxResult Pizza::Tickle()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_state->m_unk0x0c == 2) {
|
||||
else if (m_state->m_state == PizzaMissionState::e_waitAcceptingQuest) {
|
||||
assert(m_mission);
|
||||
|
||||
if (Timer()->GetTime() > m_mission->m_startTime + 5000) {
|
||||
@@ -429,7 +429,7 @@ MxResult Pizza::Tickle()
|
||||
m_skateBoard->EnableScenePresentation(FALSE);
|
||||
TickleManager()->UnregisterClient(this);
|
||||
m_mission->UpdateScore(LegoState::e_grey);
|
||||
m_state->m_unk0x0c = 9;
|
||||
m_state->m_state = PizzaMissionState::e_timeoutAcceptingQuest;
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
PlayAction(m_mission->GetUnknownFinishAction(), TRUE);
|
||||
MxTrace("Pizza mission: timeout, declining\n");
|
||||
@@ -452,16 +452,16 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (m_state->m_unk0x0c) {
|
||||
case 1:
|
||||
switch (m_state->m_state) {
|
||||
case PizzaMissionState::e_introduction:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_state->m_unk0x0c = 2;
|
||||
m_state->m_state = PizzaMissionState::e_waitAcceptingQuest;
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
MxTrace("Pizza mission: proposed\n");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case PizzaMissionState::e_started:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_mission->m_startTime = Timer()->GetTime();
|
||||
|
||||
@@ -470,7 +470,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
InvokeAction(Extra::e_start, *g_isleScript, mission->GetActions()[i], NULL);
|
||||
}
|
||||
|
||||
m_state->m_unk0x0c = 4;
|
||||
m_state->m_state = PizzaMissionState::e_delivering;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
UserActor()->SetActorState(LegoPathActor::c_initial);
|
||||
m_skateBoard->SetPizzaVisible(TRUE);
|
||||
@@ -489,7 +489,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case PizzaMissionState::e_arrivedAtDestination:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
StopActions();
|
||||
|
||||
@@ -497,26 +497,26 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
IsleScript::Script action = IsleScript::c_noneIsle;
|
||||
|
||||
if (!((Isle*) CurrentWorld())->HasHelicopter()) {
|
||||
switch (m_mission->m_unk0x14) {
|
||||
switch (m_mission->m_counter) {
|
||||
case 1:
|
||||
action = IsleScript::c_pja126br_RunAnim;
|
||||
m_mission->m_unk0x14++;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_mission->m_counter++;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
MxTrace("Pizza mission: succeeds\n");
|
||||
break;
|
||||
case 2:
|
||||
action = IsleScript::c_pja129br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 500;
|
||||
m_mission->m_unk0x14++;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_mission->m_counter++;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
MxTrace("Pizza mission: succeeds\n");
|
||||
break;
|
||||
case 3:
|
||||
action = IsleScript::c_pja131br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 500;
|
||||
m_state->m_unk0x0c = 6;
|
||||
m_state->m_state = PizzaMissionState::e_suggestHelicopter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -524,7 +524,7 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
action = IsleScript::c_pja132br_RunAnim;
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 2300;
|
||||
m_state->m_unk0x0c = 8;
|
||||
m_state->m_state = PizzaMissionState::e_transitionToAct2;
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
MxTrace("Pizza mission: go to Act2\n");
|
||||
@@ -533,42 +533,42 @@ MxLong Pizza::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
PlayAction(action, TRUE);
|
||||
}
|
||||
else {
|
||||
FUN_100382b0();
|
||||
m_state->m_unk0x0c = 0;
|
||||
Reset();
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
case PizzaMissionState::e_suggestHelicopter:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
if (objectId == IsleScript::c_pja126br_RunAnim) {
|
||||
PlayAction(IsleScript::c_pja127br_RunAnim, TRUE);
|
||||
PlayAction(IsleScript::c_pja127br_RunAnim, TRUE); // build helicopter!
|
||||
m_startTime = Timer()->GetTime();
|
||||
m_duration = 700;
|
||||
}
|
||||
else if (objectId == IsleScript::c_pja129br_RunAnim) {
|
||||
PlayAction(IsleScript::c_pja130br_RunAnim, TRUE);
|
||||
PlayAction(IsleScript::c_pja130br_RunAnim, TRUE); // build helicopter!
|
||||
}
|
||||
else {
|
||||
FUN_100382b0();
|
||||
m_state->m_unk0x0c = 0;
|
||||
Reset();
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
m_state->SetPlayedAction(IsleScript::c_noneIsle);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
case PizzaMissionState::e_transitionToAct2:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
m_state->m_unk0x0c = 0;
|
||||
m_state->m_state = PizzaMissionState::e_none;
|
||||
GameState()->m_currentArea = LegoGameState::e_isle;
|
||||
TickleManager()->UnregisterClient(this);
|
||||
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_act2main);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
case PizzaMissionState::e_timeoutAcceptingQuest:
|
||||
if (m_state->GetPlayedAction() == objectId) {
|
||||
FUN_100382b0();
|
||||
Reset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -594,7 +594,7 @@ void Pizza::PlayAction(MxU32 p_objectId, MxBool p_param7)
|
||||
// FUNCTION: BETA10 0x100eea25
|
||||
PizzaMissionState::PizzaMissionState()
|
||||
{
|
||||
m_unk0x0c = 0;
|
||||
m_state = PizzaMissionState::e_none;
|
||||
m_missions[0] = Mission(LegoActor::c_pepper, 2, g_pepperFinishTimes, g_pepperActions, 4);
|
||||
m_missions[1] = Mission(LegoActor::c_mama, 2, g_mamaFinishTimes, g_mamaActions, 4);
|
||||
m_missions[2] = Mission(LegoActor::c_papa, 2, g_papaFinishTimes, g_papaActions, 4);
|
||||
@@ -613,7 +613,7 @@ MxResult PizzaMissionState::Serialize(LegoStorage* p_storage)
|
||||
if (p_storage->IsReadMode()) {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
p_storage->ReadS16(m_missions[i].m_unk0x06);
|
||||
p_storage->ReadS16(m_missions[i].m_unk0x14);
|
||||
p_storage->ReadS16(m_missions[i].m_counter);
|
||||
p_storage->ReadS16(m_missions[i].m_score);
|
||||
p_storage->ReadS16(m_missions[i].m_hiScore);
|
||||
}
|
||||
@@ -621,7 +621,7 @@ MxResult PizzaMissionState::Serialize(LegoStorage* p_storage)
|
||||
else if (p_storage->IsWriteMode()) {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
p_storage->WriteS16(m_missions[i].m_unk0x06);
|
||||
p_storage->WriteS16(m_missions[i].m_unk0x14);
|
||||
p_storage->WriteS16(m_missions[i].m_counter);
|
||||
p_storage->WriteS16(m_missions[i].m_score);
|
||||
p_storage->WriteS16(m_missions[i].m_hiScore);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void Pizzeria::CreateState()
|
||||
// FUNCTION: BETA10 0x100efc91
|
||||
MxLong Pizzeria::HandleClick()
|
||||
{
|
||||
if (CanExit() && m_pizzaMissionState->m_unk0x0c == 0) {
|
||||
if (CanExit() && m_pizzaMissionState->m_state == PizzaMissionState::e_none) {
|
||||
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
if (!UserActor()->IsA("SkateBoard")) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
@@ -79,7 +79,7 @@ MxLong Pizzeria::HandleClick()
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
|
||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||
pizza->FUN_10038220((IsleScript::Script) m_pizzeriaState->NextAction());
|
||||
pizza->Start((IsleScript::Script) m_pizzeriaState->NextAction());
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -59,7 +59,7 @@ void SkateBoard::Exit()
|
||||
if (m_act1state->m_state == Act1State::e_pizza) {
|
||||
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
|
||||
pizza->StopActions();
|
||||
pizza->FUN_100382b0();
|
||||
pizza->Reset();
|
||||
m_pizzaVisible = FALSE;
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ void SkateBoard::ActivateSceneActions()
|
||||
if (m_act1state->m_state != Act1State::e_pizza) {
|
||||
PlayMusic(JukeboxScript::c_BeachBlvd_Music);
|
||||
|
||||
if (!m_act1state->m_unk0x022) {
|
||||
m_act1state->m_unk0x022 = TRUE;
|
||||
if (!m_act1state->m_playedExitExplanation) {
|
||||
m_act1state->m_playedExitExplanation = TRUE;
|
||||
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.2, mat[2][2] * 2.5);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "legosoundmanager.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxmain.h"
|
||||
|
||||
#include <vec.h>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "mxcompositepresenter.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxmain.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Lego3DWavePresenter, 0xa0)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "legosoundmanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxmain.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -317,6 +317,42 @@ void LegoCacheSound::MuteStop(MxBool p_muted)
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10066f4d
|
||||
MxResult LegoCacheSound::GetFrequency(LPDWORD p_freq)
|
||||
{
|
||||
return m_dsBuffer->GetFrequency(p_freq);
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10066f7b
|
||||
MxResult LegoCacheSound::SetFrequency(DWORD p_freq)
|
||||
{
|
||||
return m_dsBuffer->SetFrequency(p_freq);
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10066fa9
|
||||
LegoCacheSound::LegoCacheSound(LegoCacheSound& p_sound)
|
||||
{
|
||||
CopyFrom(p_sound);
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10067062
|
||||
LegoCacheSound& LegoCacheSound::operator=(LegoCacheSound& p_sound)
|
||||
{
|
||||
if (this == &p_sound) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
CopyFrom(p_sound);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1006709d
|
||||
void LegoCacheSound::CopyFrom(LegoCacheSound& p_sound)
|
||||
{
|
||||
MessageBox(NULL, "don't know how to copy DirectSoundBuffer", NULL, MB_OK);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10006d80
|
||||
// FUNCTION: BETA10 0x100670e7
|
||||
MxString LegoCacheSound::GetBaseFilename(MxString& p_path)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "legocachesoundmanager.h"
|
||||
#include "mxautolock.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxmain.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150)
|
||||
|
||||
// FUNCTION: LEGO1 0x1007ea90
|
||||
// FUNCTION: BETA10 0x100e8530
|
||||
MxBackgroundAudioManager::MxBackgroundAudioManager()
|
||||
{
|
||||
NotificationManager()->Register(this);
|
||||
@@ -281,6 +282,17 @@ MxResult MxBackgroundAudioManager::PlayMusic(
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x100e92ec
|
||||
void MxBackgroundAudioManager::Update(MxS32 p_targetVolume, MxS32 p_speed, MxPresenter::TickleState p_tickleState)
|
||||
{
|
||||
assert(p_targetVolume >= 0 && p_targetVolume <= 100);
|
||||
assert(p_speed > 0);
|
||||
|
||||
m_tickleState = p_tickleState;
|
||||
m_speed = p_speed;
|
||||
m_targetVolume = p_targetVolume;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007f470
|
||||
// FUNCTION: BETA10 0x100e9388
|
||||
void MxBackgroundAudioManager::Stop()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
||||
#include "mxtimer.h"
|
||||
#include "realtime/realtime.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter::UnknownListEntry, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter::CarBuildPart, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter, 0x150)
|
||||
|
||||
// FUNCTION: LEGO1 0x10078400
|
||||
@@ -32,7 +32,7 @@ LegoCarBuildAnimPresenter::LegoCarBuildAnimPresenter()
|
||||
m_shelfFrameBuffer = 0;
|
||||
m_shelfFrameMax = 0;
|
||||
m_shelfFrameInterval = 0;
|
||||
m_unk0x13c = 0;
|
||||
m_flashingPartTimeState = 0;
|
||||
m_carBuildEntity = NULL;
|
||||
m_unk0x144 = -1;
|
||||
m_unk0x148 = -1;
|
||||
@@ -60,28 +60,28 @@ LegoCarBuildAnimPresenter::~LegoCarBuildAnimPresenter()
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x100733d0
|
||||
inline void LegoCarBuildAnimPresenter::Beta10Inline0x100733d0()
|
||||
inline void LegoCarBuildAnimPresenter::UpdateFlashingPartVisibility()
|
||||
{
|
||||
MxLong time = Timer()->GetTime();
|
||||
MxLong bvar5;
|
||||
MxLong showFlashingPart;
|
||||
|
||||
if (m_unk0x13c < time) {
|
||||
bvar5 = FALSE;
|
||||
if (m_flashingPartTimeState < time) {
|
||||
showFlashingPart = FALSE;
|
||||
|
||||
// I have no idea why this conditional is so convoluted
|
||||
if (m_unk0x13c & c_bit1) {
|
||||
bvar5 = TRUE;
|
||||
m_unk0x13c = time + 400;
|
||||
if (m_flashingPartTimeState & c_bit1) {
|
||||
showFlashingPart = TRUE;
|
||||
m_flashingPartTimeState = time + 400;
|
||||
}
|
||||
else {
|
||||
m_unk0x13c = time + 200;
|
||||
m_flashingPartTimeState = time + 200;
|
||||
}
|
||||
|
||||
if (bvar5) {
|
||||
m_unk0x13c &= ~c_bit1;
|
||||
if (showFlashingPart) {
|
||||
m_flashingPartTimeState &= ~c_bit1;
|
||||
}
|
||||
else {
|
||||
m_unk0x13c |= c_bit1;
|
||||
m_flashingPartTimeState |= c_bit1;
|
||||
}
|
||||
|
||||
if (m_placedPartCount < m_numberOfParts) {
|
||||
@@ -96,7 +96,7 @@ inline void LegoCarBuildAnimPresenter::Beta10Inline0x100733d0()
|
||||
const LegoChar* name = roi->GetName();
|
||||
|
||||
if (name && stricmp(wiredName, name) == 0) {
|
||||
if (bvar5) {
|
||||
if (showFlashingPart) {
|
||||
roi->SetVisibility(TRUE);
|
||||
}
|
||||
else {
|
||||
@@ -127,7 +127,7 @@ void LegoCarBuildAnimPresenter::PutFrame()
|
||||
break;
|
||||
}
|
||||
|
||||
Beta10Inline0x100733d0();
|
||||
UpdateFlashingPartVisibility();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100788c0
|
||||
@@ -209,7 +209,7 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
|
||||
}
|
||||
|
||||
if (i < m_placedPartCount) {
|
||||
FUN_10079050(i);
|
||||
MakePartPlaced(i);
|
||||
ShowBuildPartByName(m_parts[i].m_name);
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ MxResult LegoCarBuildAnimPresenter::Serialize(LegoStorage* p_storage)
|
||||
|
||||
// FUNCTION: LEGO1 0x10079050
|
||||
// FUNCTION: BETA10 0x1007151e
|
||||
void LegoCarBuildAnimPresenter::FUN_10079050(MxS16 p_index)
|
||||
void LegoCarBuildAnimPresenter::MakePartPlaced(MxS16 p_index)
|
||||
{
|
||||
SwapNodesByName(m_parts[p_index].m_wiredName, m_parts[p_index].m_name);
|
||||
HideBuildPartByName(m_parts[p_index].m_wiredName);
|
||||
@@ -382,7 +382,7 @@ void LegoCarBuildAnimPresenter::InitBuildPlatform()
|
||||
}
|
||||
|
||||
assert(m_numberOfParts);
|
||||
m_parts = new UnknownListEntry[m_numberOfParts];
|
||||
m_parts = new CarBuildPart[m_numberOfParts];
|
||||
assert(m_parts);
|
||||
|
||||
// Go through and add the wired name of each part
|
||||
@@ -551,7 +551,7 @@ void LegoCarBuildAnimPresenter::AddPartToBuildByName(const LegoChar* p_name)
|
||||
strcpy(m_parts[i].m_name, buffer);
|
||||
Swap(m_parts[m_placedPartCount].m_objectId, m_parts[i].m_objectId);
|
||||
}
|
||||
FUN_10079050(m_placedPartCount);
|
||||
MakePartPlaced(m_placedPartCount);
|
||||
m_placedPartCount++;
|
||||
|
||||
((LegoCarBuild*) m_currentWorld)->SetPlacedPartCount(m_placedPartCount);
|
||||
@@ -644,7 +644,7 @@ MxBool LegoCarBuildAnimPresenter::StringEqualsShelf(const LegoChar* p_string)
|
||||
|
||||
// FUNCTION: LEGO1 0x10079c30
|
||||
// FUNCTION: BETA10 0x100726a6
|
||||
MxBool LegoCarBuildAnimPresenter::FUN_10079c30(const LegoChar* p_name)
|
||||
MxBool LegoCarBuildAnimPresenter::IsNextPartToPlace(const LegoChar* p_name)
|
||||
{
|
||||
if (PartIsPlaced(p_name)) {
|
||||
return FALSE;
|
||||
@@ -708,7 +708,7 @@ void LegoCarBuildAnimPresenter::SetPartObjectIdByName(const LegoChar* p_name, Mx
|
||||
|
||||
// FUNCTION: LEGO1 0x10079e20
|
||||
// FUNCTION: BETA10 0x10072959
|
||||
const BoundingSphere& LegoCarBuildAnimPresenter::FUN_10079e20()
|
||||
const BoundingSphere& LegoCarBuildAnimPresenter::GetTargetBoundingSphere()
|
||||
{
|
||||
LegoROI* roi = m_carBuildEntity->GetROI();
|
||||
return roi->FindChildROI(m_parts[m_placedPartCount].m_wiredName, roi)->GetWorldBoundingSphere();
|
||||
|
||||
@@ -1794,7 +1794,7 @@ void LegoAnimationManager::FUN_10062580(AnimInfo& p_info)
|
||||
|
||||
// FUNCTION: LEGO1 0x10062650
|
||||
// FUNCTION: BETA10 0x100436e2
|
||||
MxBool LegoAnimationManager::FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi)
|
||||
MxBool LegoAnimationManager::FUN_10062650(Mx3DPointFloat& p_position, float p_und, LegoROI* p_roi)
|
||||
{
|
||||
if (p_roi != NULL) {
|
||||
Mx3DPointFloat position(p_position);
|
||||
@@ -2812,7 +2812,11 @@ MxResult LegoAnimationManager::FUN_10064880(const char* p_name, MxS32 p_unk0x0c,
|
||||
// FUNCTION: BETA10 0x10045daf
|
||||
void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404)
|
||||
{
|
||||
if (m_unk0x402 && p_tranInfo->m_unk0x14) {
|
||||
if (
|
||||
#ifndef BETA10
|
||||
m_unk0x402 &&
|
||||
#endif
|
||||
p_tranInfo->m_unk0x14) {
|
||||
p_tranInfo->m_flags |= LegoTranInfo::c_bit1;
|
||||
m_unk0x430 = TRUE;
|
||||
m_unk0x42c = p_tranInfo;
|
||||
@@ -2833,11 +2837,13 @@ void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x
|
||||
if (location != NULL) {
|
||||
CalcLocalTransform(location->m_position, location->m_direction, location->m_up, m_unk0x484);
|
||||
m_unk0x4cc.SetStartEnd(m_unk0x43c, m_unk0x484);
|
||||
#ifndef BETA10
|
||||
m_unk0x4cc.NormalizeDirection();
|
||||
}
|
||||
else {
|
||||
p_tranInfo->m_flags &= ~LegoTranInfo::c_bit1;
|
||||
m_unk0x430 = FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
Mx3DPointFloat vec;
|
||||
|
||||
@@ -47,6 +47,7 @@ MxU8 g_buildingInfoDownshift[16] = {
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3478
|
||||
// GLOBAL: BETA10 0x101e4d78
|
||||
LegoBuildingInfo g_buildingInfoInit[16] = {
|
||||
{
|
||||
NULL, "infocen",
|
||||
@@ -236,8 +237,11 @@ void LegoBuildingManager::configureLegoBuildingManager(MxS32 p_buildingManagerCo
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002f8c0
|
||||
// FUNCTION: BETA10 0x10063a30
|
||||
LegoBuildingManager::LegoBuildingManager()
|
||||
{
|
||||
// Note that Init() is inlined in BETA10 and the class did not inherit from MxCore,
|
||||
// so the BETA10 match is much better on Init().
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -247,6 +251,7 @@ LegoBuildingManager::~LegoBuildingManager()
|
||||
delete[] g_customizeAnimFile;
|
||||
}
|
||||
|
||||
// // FUNCTION: BETA10 0x10063a30 -- see the constructor
|
||||
// FUNCTION: LEGO1 0x1002f9d0
|
||||
void LegoBuildingManager::Init()
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ LegoGameState::LegoGameState()
|
||||
m_jukeboxMusic = JukeboxScript::c_noneJukebox;
|
||||
m_currentArea = e_undefined;
|
||||
m_previousArea = e_undefined;
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
m_playerCount = 0;
|
||||
m_isDirty = FALSE;
|
||||
m_loadedAct = e_actNotFound;
|
||||
@@ -313,7 +313,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
|
||||
}
|
||||
}
|
||||
|
||||
area = m_unk0x42c;
|
||||
area = m_savedPreviousArea;
|
||||
storage.WriteU16(area);
|
||||
SerializeScoreHistory(LegoFile::c_write);
|
||||
m_isDirty = FALSE;
|
||||
@@ -431,10 +431,10 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
storage.ReadS16(actArea);
|
||||
|
||||
if (m_currentAct == e_act1) {
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
}
|
||||
else {
|
||||
m_unk0x42c = (Area) actArea;
|
||||
m_savedPreviousArea = (Area) actArea;
|
||||
}
|
||||
|
||||
result = SUCCESS;
|
||||
@@ -835,7 +835,7 @@ inline void LoadIsle()
|
||||
{
|
||||
LegoWorld* world = FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||
if (world != NULL) {
|
||||
if (!world->GetUnknown0xd0Empty()) {
|
||||
if (!world->NoDisabledObjects()) {
|
||||
NotificationManager()->Send(world, MxNotificationParam(c_notificationType20, NULL));
|
||||
}
|
||||
}
|
||||
@@ -1164,33 +1164,33 @@ void LegoGameState::Init()
|
||||
Helicopter* copter = (Helicopter*) isle->Find(*g_copterScript, CopterScript::c_Helicopter_Actor);
|
||||
if (copter) {
|
||||
isle->RemoveActor(copter);
|
||||
isle->VTable0x6c(copter);
|
||||
isle->RemoveVehicle(copter);
|
||||
delete copter;
|
||||
}
|
||||
|
||||
DuneBuggy* dunebuggy = (DuneBuggy*) isle->Find(*g_dunecarScript, DunecarScript::c_DuneBugy_Actor);
|
||||
if (dunebuggy) {
|
||||
isle->RemoveActor(dunebuggy);
|
||||
isle->VTable0x6c(dunebuggy);
|
||||
isle->RemoveVehicle(dunebuggy);
|
||||
delete dunebuggy;
|
||||
}
|
||||
|
||||
Jetski* jetski = (Jetski*) isle->Find(*g_jetskiScript, JetskiScript::c_Jetski_Actor);
|
||||
if (jetski) {
|
||||
isle->RemoveActor(jetski);
|
||||
isle->VTable0x6c(jetski);
|
||||
isle->RemoveVehicle(jetski);
|
||||
delete jetski;
|
||||
}
|
||||
|
||||
RaceCar* racecar = (RaceCar*) isle->Find(*g_racecarScript, RacecarScript::c_RaceCar_Actor);
|
||||
if (racecar) {
|
||||
isle->RemoveActor(racecar);
|
||||
isle->VTable0x6c(racecar);
|
||||
isle->RemoveVehicle(racecar);
|
||||
delete racecar;
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10086510
|
||||
@@ -1569,18 +1569,18 @@ void LegoGameState::History::WriteScoreHistory()
|
||||
// FUNCTION: BETA10 0x1008732a
|
||||
LegoGameState::ScoreItem* LegoGameState::History::FindPlayerInScoreHistory(
|
||||
LegoGameState::Username* p_player,
|
||||
MxS16 p_unk0x24,
|
||||
MxS32& p_unk0x2c
|
||||
MxS16 p_playerId,
|
||||
MxS32& p_playerScoreHistoryIndex
|
||||
)
|
||||
{
|
||||
MxS32 i = 0;
|
||||
for (; i < m_count; i++) {
|
||||
if (!memcmp(p_player, &m_scores[i].m_name, sizeof(*p_player)) && m_scores[i].m_playerId == p_unk0x24) {
|
||||
if (!memcmp(p_player, &m_scores[i].m_name, sizeof(*p_player)) && m_scores[i].m_playerId == p_playerId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p_unk0x2c = i;
|
||||
p_playerScoreHistoryIndex = i;
|
||||
|
||||
if (i >= m_count) {
|
||||
return NULL;
|
||||
|
||||
@@ -60,8 +60,11 @@ char* LegoPlantManager::g_customizeAnimFile = NULL;
|
||||
LegoPlantInfo g_plantInfo[81];
|
||||
|
||||
// FUNCTION: LEGO1 0x10026220
|
||||
// FUNCTION: BETA10 0x100c4f90
|
||||
LegoPlantManager::LegoPlantManager()
|
||||
{
|
||||
// Note that Init() is inlined in BETA10 and the class did not inherit from MxCore,
|
||||
// so the BETA10 match is much better on Init().
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -72,12 +75,10 @@ LegoPlantManager::~LegoPlantManager()
|
||||
delete[] g_customizeAnimFile;
|
||||
}
|
||||
|
||||
// // FUNCTION: BETA10 0x100c4f90 -- see the constructor
|
||||
// FUNCTION: LEGO1 0x10026330
|
||||
// FUNCTION: BETA10 0x100c4f90
|
||||
void LegoPlantManager::Init()
|
||||
{
|
||||
// In BETA10 this appears to be LegoPlantManager::LegoPlantManager()
|
||||
|
||||
for (MxS32 i = 0; i < sizeOfArray(g_plantInfo); i++) {
|
||||
g_plantInfo[i] = g_plantInfoInit[i];
|
||||
}
|
||||
|
||||
@@ -521,7 +521,12 @@ MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003ee80
|
||||
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId)
|
||||
MxBool RemoveFromWorld(
|
||||
const MxAtomId& p_entityAtom,
|
||||
MxS32 p_entityId,
|
||||
const MxAtomId& p_worldAtom,
|
||||
MxS32 p_worldEntityId
|
||||
)
|
||||
{
|
||||
LegoWorld* world = FindWorld(p_worldAtom, p_worldEntityId);
|
||||
|
||||
|
||||
@@ -127,8 +127,10 @@ LegoBuildingManager* BuildingManager()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015800
|
||||
// FUNCTION: BETA10 0x100e4bb7
|
||||
LegoTextureContainer* TextureContainer()
|
||||
{
|
||||
assert(LegoOmni::GetInstance());
|
||||
return LegoOmni::GetInstance()->GetTextureContainer();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ MxBool MxControlPresenter::CheckButtonDown(MxS32 p_x, MxS32 p_y, MxPresenter* p_
|
||||
assert(map && map->IsA("MxStillPresenter"));
|
||||
|
||||
if (presenter == map || map->GetDisplayZ() < presenter->GetDisplayZ()) {
|
||||
if (map->VTable0x7c()) {
|
||||
if (map->HasFrameBitmapOrAlpha()) {
|
||||
MxRect32 rect(0, 0, map->GetWidth() - 1, map->GetHeight() - 1);
|
||||
rect += map->GetLocation();
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900)
|
||||
RECT g_fullScreenRect = {0, 0, 640, 480};
|
||||
|
||||
// FUNCTION: LEGO1 0x1004b8d0
|
||||
// FUNCTION: BETA10 0x100ec2c0
|
||||
MxTransitionManager::MxTransitionManager()
|
||||
{
|
||||
m_animationTimer = 0;
|
||||
@@ -120,15 +121,9 @@ MxResult MxTransitionManager::StartTransition(
|
||||
|
||||
m_animationSpeed = p_speed;
|
||||
|
||||
MxTickleManager* tickleManager = TickleManager();
|
||||
tickleManager->RegisterClient(this, p_speed);
|
||||
|
||||
LegoInputManager* inputManager = InputManager();
|
||||
inputManager->SetUnknown88(TRUE);
|
||||
inputManager->SetUnknown336(FALSE);
|
||||
|
||||
LegoVideoManager* videoManager = VideoManager();
|
||||
videoManager->SetRender3D(FALSE);
|
||||
TickleManager()->RegisterClient(this, p_speed);
|
||||
InputManager()->DisableInputProcessing();
|
||||
VideoManager()->SetRender3D(FALSE);
|
||||
|
||||
SetAppCursor(e_cursorBusy);
|
||||
return SUCCESS;
|
||||
|
||||
@@ -14,6 +14,7 @@ DECOMP_SIZE_ASSERT(LegoControlManagerNotificationParam, 0x2c)
|
||||
DECOMP_SIZE_ASSERT(LegoEventNotificationParam, 0x20)
|
||||
|
||||
// FUNCTION: LEGO1 0x10028520
|
||||
// STUB: BETA10 0x1008ae50
|
||||
LegoControlManager::LegoControlManager()
|
||||
{
|
||||
m_presenterList = NULL;
|
||||
|
||||
@@ -31,7 +31,7 @@ MxLong Act2Brick::g_lastHitActorTime = 0;
|
||||
Act2Brick::Act2Brick()
|
||||
{
|
||||
m_whistleSound = NULL;
|
||||
m_unk0x164 = 0;
|
||||
m_state = Act2Brick::e_removed;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007a470
|
||||
@@ -72,7 +72,7 @@ MxResult Act2Brick::Create(MxS32 p_index)
|
||||
|
||||
m_roi->SetEntity(this);
|
||||
CurrentWorld()->Add(this);
|
||||
m_unk0x164 = 1;
|
||||
m_state = Act2Brick::e_created;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -88,27 +88,27 @@ void Act2Brick::Remove()
|
||||
m_roi = NULL;
|
||||
}
|
||||
|
||||
m_unk0x164 = 0;
|
||||
m_state = Act2Brick::e_removed;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007a670
|
||||
// FUNCTION: BETA10 0x10012c04
|
||||
void Act2Brick::FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary)
|
||||
void Act2Brick::Place(MxMatrix& p_localToWorld, MxMatrix& p_endLocalToWorld, LegoPathBoundary* p_boundary)
|
||||
{
|
||||
m_unk0x17c = p_param2[3];
|
||||
m_unk0x168 = p_param2[3];
|
||||
m_unk0x168 -= p_param1[3];
|
||||
m_unk0x168 /= 8.0f;
|
||||
m_endLocalToWorld = p_endLocalToWorld[3];
|
||||
m_localToWorldMovementStep = p_endLocalToWorld[3];
|
||||
m_localToWorldMovementStep -= p_localToWorld[3];
|
||||
m_localToWorldMovementStep /= 8.0f;
|
||||
|
||||
m_unk0x190 = 0;
|
||||
m_step = 0;
|
||||
TickleManager()->RegisterClient(this, 20);
|
||||
|
||||
m_unk0x164 = 2;
|
||||
m_state = Act2Brick::e_placed;
|
||||
CurrentWorld()->PlaceActor(this);
|
||||
p_boundary->AddActor(this);
|
||||
|
||||
SetActorState(c_disabled);
|
||||
m_roi->SetLocal2World(p_param1);
|
||||
m_roi->SetLocal2World(p_localToWorld);
|
||||
m_roi->WrappedUpdateWorldData();
|
||||
m_roi->SetVisibility(TRUE);
|
||||
}
|
||||
@@ -136,15 +136,15 @@ MxResult Act2Brick::HitActor(LegoPathActor* p_actor, MxBool)
|
||||
MxResult Act2Brick::Tickle()
|
||||
{
|
||||
MxMatrix local2world(m_roi->GetLocal2World());
|
||||
m_unk0x190++;
|
||||
m_step++;
|
||||
|
||||
if (m_unk0x190 >= 8) {
|
||||
local2world.SetTranslation(m_unk0x17c[0], m_unk0x17c[1], m_unk0x17c[2]);
|
||||
m_unk0x164 = 3;
|
||||
if (m_step >= 8) {
|
||||
local2world.SetTranslation(m_endLocalToWorld[0], m_endLocalToWorld[1], m_endLocalToWorld[2]);
|
||||
m_state = Act2Brick::e_atRest;
|
||||
TickleManager()->UnregisterClient(this);
|
||||
}
|
||||
else {
|
||||
VPV3(local2world[3], local2world[3], m_unk0x168);
|
||||
VPV3(local2world[3], local2world[3], m_localToWorldMovementStep);
|
||||
}
|
||||
|
||||
m_roi->SetLocal2World(local2world);
|
||||
@@ -165,7 +165,7 @@ MxLong Act2Brick::Notify(MxParam& p_param)
|
||||
StopWhistleSound();
|
||||
}
|
||||
|
||||
MxNotificationParam param(c_notificationType22, this);
|
||||
MxNotificationParam param(c_notificationAct2Brick, this);
|
||||
NotificationManager()->Send(CurrentWorld(), param);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ const char* LegoActor::GetActorName(MxU8 p_id)
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d670
|
||||
// FUNCTION: BETA10 0x1003d65f
|
||||
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform)
|
||||
{
|
||||
if (p_roi) {
|
||||
const char* name = p_roi->GetName();
|
||||
@@ -141,7 +141,7 @@ void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
}
|
||||
}
|
||||
|
||||
LegoEntity::SetROI(p_roi, p_bool1, p_bool2);
|
||||
LegoEntity::SetROI(p_roi, p_bool1, p_updateTransform);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d6e0
|
||||
|
||||
@@ -124,12 +124,12 @@ void LegoEntity::SetWorld()
|
||||
|
||||
// FUNCTION: LEGO1 0x100108a0
|
||||
// FUNCTION: BETA10 0x1007e724
|
||||
void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_updateTransform)
|
||||
{
|
||||
m_roi = p_roi;
|
||||
|
||||
if (m_roi != NULL) {
|
||||
if (p_bool2) {
|
||||
if (p_updateTransform) {
|
||||
MxMatrix mat;
|
||||
CalcLocalTransform(
|
||||
Mx3DPointFloat(m_worldLocation[0], m_worldLocation[1], m_worldLocation[2]),
|
||||
@@ -155,7 +155,12 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
|
||||
// FUNCTION: LEGO1 0x100109b0
|
||||
// FUNCTION: BETA10 0x1007e8b8
|
||||
void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und)
|
||||
void LegoEntity::SetLocation(
|
||||
const Vector3& p_location,
|
||||
const Vector3& p_direction,
|
||||
const Vector3& p_up,
|
||||
MxBool p_updateCamera
|
||||
)
|
||||
{
|
||||
Mx3DPointFloat direction;
|
||||
Mx3DPointFloat up;
|
||||
@@ -182,14 +187,14 @@ void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_directi
|
||||
m_roi->UpdateTransformationRelativeToParent(mat);
|
||||
VideoManager()->Get3DManager()->Moved(*m_roi);
|
||||
|
||||
if (p_und) {
|
||||
FUN_10010c30();
|
||||
if (p_updateCamera) {
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10010c30
|
||||
void LegoEntity::FUN_10010c30()
|
||||
void LegoEntity::TransformPointOfView()
|
||||
{
|
||||
LegoWorld* world = CurrentWorld();
|
||||
|
||||
|
||||
@@ -666,10 +666,10 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
assert(state);
|
||||
|
||||
if (state != NULL && state->m_unk0x74 != 8 && currentWorld->Escape()) {
|
||||
if (state != NULL && state->m_state != InfocenterState::e_exitQueried && currentWorld->Escape()) {
|
||||
BackgroundAudioManager()->Stop();
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
state->m_unk0x74 = 8;
|
||||
state->m_state = InfocenterState::e_exitQueried;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -864,7 +864,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
}
|
||||
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act3);
|
||||
act3State->m_unk0x08 = 2;
|
||||
act3State->m_state = Act3State::e_goodEnding;
|
||||
GameState()->m_currentArea = LegoGameState::e_act3script;
|
||||
GameState()->SwitchArea(LegoGameState::e_infomain);
|
||||
break;
|
||||
@@ -878,7 +878,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
}
|
||||
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act3);
|
||||
act3State->m_unk0x08 = 3;
|
||||
act3State->m_state = Act3State::e_badEnding;
|
||||
GameState()->m_currentArea = LegoGameState::e_act3script;
|
||||
GameState()->SwitchArea(LegoGameState::e_infomain);
|
||||
break;
|
||||
|
||||
@@ -70,7 +70,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (!VTable0x54()) {
|
||||
if (!InitializeCameraController()) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
}
|
||||
|
||||
while (!m_set0xa8.empty()) {
|
||||
MxCoreSet::iterator it = m_set0xa8.begin();
|
||||
while (!m_objects.empty()) {
|
||||
MxCoreSet::iterator it = m_objects.begin();
|
||||
MxCore* object = *it;
|
||||
m_set0xa8.erase(it);
|
||||
m_objects.erase(it);
|
||||
|
||||
if (object->IsA("MxPresenter")) {
|
||||
MxPresenter* presenter = (MxPresenter*) object;
|
||||
@@ -161,7 +161,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_worldId != LegoOmni::e_undefined && m_set0xd0.empty()) {
|
||||
if (m_worldId != LegoOmni::e_undefined && m_disabledObjects.empty()) {
|
||||
PlantManager()->Reset(m_worldId);
|
||||
BuildingManager()->Reset();
|
||||
}
|
||||
@@ -229,7 +229,7 @@ MxLong LegoWorld::Notify(MxParam& p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001f630
|
||||
// FUNCTION: BETA10 0x100d9fc2
|
||||
LegoCameraController* LegoWorld::VTable0x54()
|
||||
LegoCameraController* LegoWorld::InitializeCameraController()
|
||||
{
|
||||
MxBool success = FALSE;
|
||||
|
||||
@@ -352,7 +352,7 @@ MxBool LegoWorld::ActorExists(LegoPathActor* p_actor)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001fda0
|
||||
// FUNCTION: BETA10 0x100da621
|
||||
void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
|
||||
void LegoWorld::AddPresenterIfInRange(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
@@ -364,7 +364,7 @@ void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001fe90
|
||||
// FUNCTION: BETA10 0x100da6b5
|
||||
void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter)
|
||||
void LegoWorld::RemovePresenterFromBoundaries(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
@@ -481,25 +481,25 @@ void LegoWorld::Add(MxCore* p_object)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
MxCoreSet::iterator it = m_set0xa8.find(p_object);
|
||||
if (it == m_set0xa8.end()) {
|
||||
MxCoreSet::iterator it = m_objects.find(p_object);
|
||||
if (it == m_objects.end()) {
|
||||
#ifdef BETA10
|
||||
if (p_object->IsA("MxPresenter")) {
|
||||
assert(static_cast<MxPresenter*>(p_object)->GetAction());
|
||||
}
|
||||
#endif
|
||||
|
||||
m_set0xa8.insert(p_object);
|
||||
m_objects.insert(p_object);
|
||||
}
|
||||
else {
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_set0xd0.size() != 0 && p_object->IsA("MxPresenter")) {
|
||||
if (m_disabledObjects.size() != 0 && p_object->IsA("MxPresenter")) {
|
||||
if (((MxPresenter*) p_object)->IsEnabled()) {
|
||||
((MxPresenter*) p_object)->Enable(FALSE);
|
||||
m_set0xd0.insert(p_object);
|
||||
m_disabledObjects.insert(p_object);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -557,15 +557,15 @@ void LegoWorld::Remove(MxCore* p_object)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
it = m_set0xa8.find(p_object);
|
||||
if (it != m_set0xa8.end()) {
|
||||
m_set0xa8.erase(it);
|
||||
it = m_objects.find(p_object);
|
||||
if (it != m_objects.end()) {
|
||||
m_objects.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
it = m_set0xd0.find(p_object);
|
||||
if (it != m_set0xd0.end()) {
|
||||
m_set0xd0.erase(it);
|
||||
it = m_disabledObjects.find(p_object);
|
||||
if (it != m_disabledObjects.end()) {
|
||||
m_disabledObjects.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (MxCoreSet::iterator i = m_set0xa8.begin(); i != m_set0xa8.end(); i++) {
|
||||
for (MxCoreSet::iterator i = m_objects.begin(); i != m_objects.end(); i++) {
|
||||
if ((*i)->IsA(p_class) && (*i)->IsA("MxPresenter")) {
|
||||
assert(((MxPresenter*) (*i))->GetAction());
|
||||
|
||||
@@ -664,7 +664,7 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId)
|
||||
}
|
||||
}
|
||||
|
||||
for (MxCoreSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
|
||||
for (MxCoreSet::iterator it = m_objects.begin(); it != m_objects.end(); it++) {
|
||||
MxCore* core = *it;
|
||||
|
||||
if (core->IsA("MxPresenter")) {
|
||||
@@ -686,7 +686,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
{
|
||||
MxCoreSet::iterator it;
|
||||
|
||||
if (p_enable && m_set0xd0.size() != 0) {
|
||||
if (p_enable && m_disabledObjects.size() != 0) {
|
||||
if (CurrentWorld() == this) {
|
||||
return;
|
||||
}
|
||||
@@ -709,8 +709,8 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
}
|
||||
}
|
||||
|
||||
while (m_set0xd0.size() != 0) {
|
||||
it = m_set0xd0.begin();
|
||||
while (m_disabledObjects.size() != 0) {
|
||||
it = m_disabledObjects.begin();
|
||||
|
||||
if ((*it)->IsA("MxPresenter")) {
|
||||
((MxPresenter*) *it)->Enable(TRUE);
|
||||
@@ -719,7 +719,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
((LegoPathController*) *it)->Enable(TRUE);
|
||||
}
|
||||
|
||||
m_set0xd0.erase(it);
|
||||
m_disabledObjects.erase(it);
|
||||
}
|
||||
|
||||
SetCurrentWorld(this);
|
||||
@@ -743,7 +743,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
SetIsWorldActive(TRUE);
|
||||
#endif
|
||||
}
|
||||
else if (!p_enable && m_set0xd0.size() == 0) {
|
||||
else if (!p_enable && m_disabledObjects.size() == 0) {
|
||||
MxPresenter* presenter;
|
||||
LegoPathController* controller;
|
||||
LegoPathActor* actor = UserActor();
|
||||
@@ -753,7 +753,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
}
|
||||
|
||||
AnimationManager()->Reset(FALSE);
|
||||
m_set0xd0.insert(this);
|
||||
m_disabledObjects.insert(this);
|
||||
|
||||
if (m_worldId != LegoOmni::e_undefined) {
|
||||
PlantManager()->Reset(m_worldId);
|
||||
@@ -766,15 +766,15 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
|
||||
while (controlPresenterCursor.Next(presenter)) {
|
||||
if (presenter->IsEnabled()) {
|
||||
m_set0xd0.insert(presenter);
|
||||
m_disabledObjects.insert(presenter);
|
||||
presenter->Enable(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
for (MxCoreSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
|
||||
for (MxCoreSet::iterator it = m_objects.begin(); it != m_objects.end(); it++) {
|
||||
if ((*it)->IsA("LegoActionControlPresenter") ||
|
||||
((*it)->IsA("MxPresenter") && ((MxPresenter*) *it)->IsEnabled())) {
|
||||
m_set0xd0.insert(*it);
|
||||
m_disabledObjects.insert(*it);
|
||||
((MxPresenter*) *it)->Enable(FALSE);
|
||||
}
|
||||
}
|
||||
@@ -800,7 +800,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
|
||||
while (pathControllerCursor.Next(controller)) {
|
||||
controller->Enable(FALSE);
|
||||
m_set0xd0.insert(controller);
|
||||
m_disabledObjects.insert(controller);
|
||||
}
|
||||
|
||||
GetViewManager()->RemoveAll(NULL);
|
||||
@@ -858,7 +858,7 @@ MxBool LegoWorld::PresentersPending()
|
||||
}
|
||||
}
|
||||
|
||||
for (MxCoreSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) {
|
||||
for (MxCoreSet::iterator it = m_objects.begin(); it != m_objects.end(); it++) {
|
||||
if ((*it)->IsA("MxPresenter")) {
|
||||
presenter = (MxPresenter*) *it;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ LegoWorldPresenter::~LegoWorldPresenter()
|
||||
PlantManager()->LoadWorldInfo(worldId);
|
||||
AnimationManager()->LoadWorldInfo(worldId);
|
||||
BuildingManager()->LoadWorldInfo();
|
||||
result = ((LegoWorld*) m_entity)->VTable0x5c();
|
||||
result = ((LegoWorld*) m_entity)->WaitForTransition();
|
||||
}
|
||||
|
||||
if (result == FALSE) {
|
||||
|
||||
@@ -26,6 +26,7 @@ const char* g_clickedAtom = NULL;
|
||||
MxBool g_unk0x100f67b8 = TRUE;
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b790
|
||||
// STUB: BETA10 0x10088a8e
|
||||
LegoInputManager::LegoInputManager()
|
||||
{
|
||||
m_keyboardNotifyList = NULL;
|
||||
@@ -38,7 +39,7 @@ LegoInputManager::LegoInputManager()
|
||||
m_y = 0;
|
||||
m_controlManager = NULL;
|
||||
m_unk0x81 = FALSE;
|
||||
m_unk0x88 = FALSE;
|
||||
m_inputProcessingDisabled = FALSE;
|
||||
m_directInput = NULL;
|
||||
m_directInputDevice = NULL;
|
||||
m_kbStateSuccess = FALSE;
|
||||
@@ -59,11 +60,13 @@ LegoInputManager::~LegoInputManager()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b960
|
||||
// STUB: BETA10 0x10088c9c
|
||||
MxResult LegoInputManager::Create(HWND p_hwnd)
|
||||
{
|
||||
MxResult result = SUCCESS;
|
||||
|
||||
m_controlManager = new LegoControlManager;
|
||||
assert(m_controlManager);
|
||||
|
||||
if (!m_keyboardNotifyList) {
|
||||
m_keyboardNotifyList = new LegoNotifyList;
|
||||
@@ -343,7 +346,7 @@ void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p
|
||||
{
|
||||
LegoEventNotificationParam param = LegoEventNotificationParam(p_id, NULL, p_modifier, p_x, p_y, p_key);
|
||||
|
||||
if (((!m_unk0x88) || ((m_unk0x335 && (param.GetNotification() == c_notificationButtonDown)))) ||
|
||||
if (((!m_inputProcessingDisabled) || ((m_unk0x335 && (param.GetNotification() == c_notificationButtonDown)))) ||
|
||||
((m_unk0x336 && (p_key == VK_SPACE)))) {
|
||||
ProcessOneEvent(param);
|
||||
}
|
||||
@@ -582,9 +585,10 @@ void LegoInputManager::StopAutoDragTimer()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005cff0
|
||||
// FUNCTION: BETA10 0x10096a10
|
||||
void LegoInputManager::EnableInputProcessing()
|
||||
{
|
||||
m_unk0x88 = FALSE;
|
||||
m_inputProcessingDisabled = FALSE;
|
||||
g_clickedObjectId = -1;
|
||||
g_clickedAtom = NULL;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ DECOMP_SIZE_ASSERT(LegoWorldList, 0x18)
|
||||
DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f6718
|
||||
// GLOBAL: BETA10 0x101ee748
|
||||
// STRING: LEGO1 0x100f6710
|
||||
const char* g_current = "current";
|
||||
|
||||
@@ -48,12 +49,14 @@ LegoOmni::LegoOmni()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058b50
|
||||
// FUNCTION: BETA10 0x1008d128
|
||||
LegoOmni::~LegoOmni()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058bd0
|
||||
// FUNCTION: BETA10 0x1008d1b4
|
||||
void LegoOmni::Init()
|
||||
{
|
||||
MxOmni::Init();
|
||||
@@ -76,6 +79,7 @@ void LegoOmni::Init()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058c30
|
||||
// STUB: BETA10 0x1008d299
|
||||
void LegoOmni::Destroy()
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
@@ -151,6 +155,13 @@ void LegoOmni::Destroy()
|
||||
MxOmni::Destroy();
|
||||
}
|
||||
|
||||
#ifdef BETA10
|
||||
// FUNCTION: BETA10 0x100d4e5e
|
||||
void EmptyFunction(int p_unknown)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x10058e70
|
||||
// FUNCTION: BETA10 0x1008d6bf
|
||||
MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
@@ -170,40 +181,67 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
if (MxOmni::Create(p_param) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
// LINE: BETA10 0x1008d7fa
|
||||
if (!(m_objectFactory = new LegoObjectFactory())) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
// LINE: BETA10 0x1008d882
|
||||
if (!(m_soundManager = new LegoSoundManager()) || m_soundManager->Create(10, 0) != SUCCESS) {
|
||||
delete m_soundManager;
|
||||
m_soundManager = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// LINE: BETA10 0x1008d990
|
||||
if (!(m_videoManager = new LegoVideoManager()) ||
|
||||
m_videoManager->Create(p_param.GetVideoParam(), 100, 0) != SUCCESS) {
|
||||
delete m_videoManager;
|
||||
m_videoManager = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// LINE: BETA10 0x1008daa7
|
||||
if (!(m_inputManager = new LegoInputManager()) || m_inputManager->Create(p_param.GetWindowHandle()) != SUCCESS) {
|
||||
delete m_inputManager;
|
||||
m_inputManager = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// LINE: BETA10 0x1008dbdb
|
||||
m_viewLODListManager = new ViewLODListManager();
|
||||
|
||||
// LINE: BETA10 0x1008dc32
|
||||
m_textureContainer = new LegoTextureContainer();
|
||||
|
||||
#ifndef BETA10
|
||||
m_textureContainer->SetOwnership(FALSE);
|
||||
#else
|
||||
// One more class is instantiated here in BETA10 that we don't find in LEGO1.
|
||||
|
||||
// Based on `LegoOmni::getTextureContainer()` we know that `LegoTextureContainer` is at LegoOmni's offset 0x230,
|
||||
// so the first instantiation is `LegoTextureContainer` and the second one is the unknown one.
|
||||
|
||||
// We repeat the initialisation of LegoTextureContainer for the sake of a structural match,
|
||||
// even though it is wrong semantically.
|
||||
// LINE: BETA10 0x1008dc89
|
||||
m_textureContainer = new LegoTextureContainer();
|
||||
|
||||
// Something else happens here starting at BETA10 0x1008dcdd that has not been decompiled.
|
||||
// It involves external calls, bit manipulation, and two globals.
|
||||
// Those appear to involve classes that are either not present in LEGO1 or we have the wrong names for them
|
||||
// (like LegoMaterialCache).
|
||||
#endif
|
||||
|
||||
// LINE: BETA10 0x1008dd17
|
||||
LegoPathController::Init();
|
||||
|
||||
m_characterManager = new LegoCharacterManager();
|
||||
|
||||
m_plantManager = new LegoPlantManager();
|
||||
// LINE: BETA10 0x1008ddca
|
||||
m_animationManager = new LegoAnimationManager();
|
||||
|
||||
m_buildingManager = new LegoBuildingManager();
|
||||
// LINE: BETA10 0x1008de7b
|
||||
m_gameState = new LegoGameState();
|
||||
// LINE: BETA10 0x1008ded5
|
||||
m_worldList = new LegoWorldList(TRUE);
|
||||
|
||||
if (!m_viewLODListManager || !m_textureContainer || !m_worldList || !m_characterManager || !m_plantManager ||
|
||||
@@ -211,56 +249,83 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
goto done;
|
||||
}
|
||||
|
||||
MxVariable* variable;
|
||||
|
||||
if (!(variable = new VisibilityVariable())) {
|
||||
MxVariable *visibilityVar, *cameraLocationVar, *cursorVar, *whoAmIVar, *debugVar;
|
||||
// LINE: BETA10 0x1008dfbd
|
||||
visibilityVar = new VisibilityVariable();
|
||||
if (!visibilityVar) {
|
||||
goto done;
|
||||
}
|
||||
m_variableTable->SetVariable(variable);
|
||||
m_variableTable->SetVariable(visibilityVar);
|
||||
|
||||
if (!(variable = new CameraLocationVariable())) {
|
||||
// LINE: BETA10 0x1008e031
|
||||
cameraLocationVar = new CameraLocationVariable();
|
||||
if (!cameraLocationVar) {
|
||||
goto done;
|
||||
}
|
||||
m_variableTable->SetVariable(variable);
|
||||
m_variableTable->SetVariable(cameraLocationVar);
|
||||
|
||||
if (!(variable = new CursorVariable())) {
|
||||
// LINE: BETA10 0x1008e0a5
|
||||
cursorVar = new CursorVariable();
|
||||
if (!cursorVar) {
|
||||
goto done;
|
||||
}
|
||||
m_variableTable->SetVariable(variable);
|
||||
m_variableTable->SetVariable(cursorVar);
|
||||
|
||||
if (!(variable = new WhoAmIVariable())) {
|
||||
// LINE: BETA10 0x1008e119
|
||||
whoAmIVar = new WhoAmIVariable();
|
||||
if (!whoAmIVar) {
|
||||
goto done;
|
||||
}
|
||||
m_variableTable->SetVariable(variable);
|
||||
m_variableTable->SetVariable(whoAmIVar);
|
||||
|
||||
#ifdef BETA10
|
||||
debugVar = new DebugVariable();
|
||||
if (!debugVar) {
|
||||
goto done;
|
||||
}
|
||||
m_variableTable->SetVariable(debugVar);
|
||||
#endif
|
||||
|
||||
// LINE: BETA10 0x1008e201
|
||||
CreateScripts();
|
||||
|
||||
#ifndef BETA10
|
||||
IslePathActor::RegisterSpawnLocations();
|
||||
result = RegisterWorlds();
|
||||
|
||||
if (result != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!(m_bkgAudioManager = new MxBackgroundAudioManager())) {
|
||||
// LINE: BETA10 0x1008e206
|
||||
m_bkgAudioManager = new MxBackgroundAudioManager();
|
||||
if (!m_bkgAudioManager) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!(m_transitionManager = new MxTransitionManager())) {
|
||||
goto done;
|
||||
// LINE: BETA10 0x1008e27d
|
||||
m_transitionManager = new MxTransitionManager();
|
||||
|
||||
if (m_transitionManager) {
|
||||
if (m_transitionManager->GetDDrawSurfaceFromVideoManager() != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifdef BETA10
|
||||
NotificationManager()->Register(this);
|
||||
EmptyFunction(0);
|
||||
#else
|
||||
m_notificationManager->Register(this);
|
||||
SetAppCursor(e_cursorBusy);
|
||||
m_gameState->SetCurrentAct(LegoGameState::e_act1);
|
||||
#endif
|
||||
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
||||
if (m_transitionManager->GetDDrawSurfaceFromVideoManager() != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_notificationManager->Register(this);
|
||||
SetAppCursor(e_cursorBusy);
|
||||
m_gameState->SetCurrentAct(LegoGameState::e_act1);
|
||||
|
||||
result = SUCCESS;
|
||||
|
||||
done:
|
||||
return result;
|
||||
// LINE: BETA10 0x1008e35d
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005a5f0
|
||||
@@ -375,6 +440,7 @@ LegoWorld* LegoOmni::FindWorld(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b1d0
|
||||
// STUB: BETA10 0x1008e93e
|
||||
void LegoOmni::DeleteObject(MxDSAction& p_dsAction)
|
||||
{
|
||||
if (p_dsAction.GetAtomId().GetInternal() != NULL) {
|
||||
@@ -427,15 +493,16 @@ LegoROI* LegoOmni::FindROI(const char* p_name)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b2f0
|
||||
// FUNCTION: BETA10 0x1008eb66
|
||||
MxEntity* LegoOmni::AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter)
|
||||
{
|
||||
LegoWorld* world = NULL;
|
||||
LegoWorld* world;
|
||||
|
||||
if (strcmpi(p_id, g_current)) {
|
||||
world = FindWorld(MxAtomId(p_id, e_lowerCase2), p_entityId);
|
||||
}
|
||||
else {
|
||||
world = this->m_currentWorld;
|
||||
world = GetCurrentWorld();
|
||||
}
|
||||
|
||||
if (world != NULL) {
|
||||
@@ -446,14 +513,17 @@ MxEntity* LegoOmni::AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter*
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b3a0
|
||||
// FUNCTION: BETA10 0x1008ec27
|
||||
void LegoOmni::NotifyCurrentEntity(const MxNotificationParam& p_param)
|
||||
{
|
||||
if (m_currentWorld) {
|
||||
NotificationManager()->Send(m_currentWorld, p_param);
|
||||
LegoWorld* currentWorld = GetCurrentWorld();
|
||||
if (currentWorld) {
|
||||
NotificationManager()->Send(currentWorld, p_param);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b3c0
|
||||
// FUNCTION: BETA10 0x1008ec72
|
||||
MxBool LegoOmni::DoesEntityExist(MxDSAction& p_dsAction)
|
||||
{
|
||||
if (MxOmni::DoesEntityExist(p_dsAction)) {
|
||||
@@ -559,12 +629,19 @@ void LegoOmni::CreateBackgroundAudio()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b580
|
||||
// FUNCTION: BETA10 0x1008f7e0
|
||||
MxResult LegoOmni::Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
MxResult result = MxOmni::Start(p_dsAction);
|
||||
#ifdef BETA10
|
||||
this->m_action = *p_dsAction;
|
||||
#else
|
||||
// TODO: This is likely an inlined `MxDsAction::operator=`, see the BETA10 code.
|
||||
// As of this commit, the operator is not inlined automatically.
|
||||
this->m_action.SetAtomId(p_dsAction->GetAtomId());
|
||||
this->m_action.SetObjectId(p_dsAction->GetObjectId());
|
||||
this->m_action.SetUnknown24(p_dsAction->GetUnknown24());
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ MxAtomId* g_creditsScript = NULL;
|
||||
MxAtomId* g_nocdSourceName = NULL;
|
||||
|
||||
// FUNCTION: LEGO1 0x100528e0
|
||||
// STUB: BETA10 0x100f6133
|
||||
void CreateScripts()
|
||||
{
|
||||
g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", e_lowerCase2);
|
||||
|
||||
@@ -13,9 +13,14 @@ DECOMP_SIZE_ASSERT(LegoAnimActorStruct, 0x20)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001bf80
|
||||
// FUNCTION: BETA10 0x1003dc10
|
||||
LegoAnimActorStruct::LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs)
|
||||
LegoAnimActorStruct::LegoAnimActorStruct(
|
||||
float p_worldSpeed,
|
||||
LegoAnim* p_AnimTreePtr,
|
||||
LegoROI** p_roiMap,
|
||||
MxU32 p_numROIs
|
||||
)
|
||||
{
|
||||
m_unk0x00 = p_unk0x00;
|
||||
m_worldSpeed = p_worldSpeed;
|
||||
m_AnimTreePtr = p_AnimTreePtr;
|
||||
m_roiMap = p_roiMap;
|
||||
m_numROIs = p_numROIs;
|
||||
@@ -50,22 +55,22 @@ LegoAnimActor::~LegoAnimActor()
|
||||
|
||||
// FUNCTION: LEGO1 0x1001c1f0
|
||||
// FUNCTION: BETA10 0x1003f240
|
||||
MxResult LegoAnimActor::FUN_1001c1f0(float& p_und)
|
||||
MxResult LegoAnimActor::GetTimeInCycle(float& p_timeInCycle)
|
||||
{
|
||||
float duration = (float) m_animMaps[m_curAnim]->m_AnimTreePtr->GetDuration();
|
||||
p_und = m_actorTime - duration * ((MxS32) (m_actorTime / duration));
|
||||
p_timeInCycle = m_actorTime - duration * ((MxS32) (m_actorTime / duration));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001c240
|
||||
void LegoAnimActor::VTable0x74(Matrix4& p_transform)
|
||||
{
|
||||
float und;
|
||||
float timeInCycle;
|
||||
LegoPathActor::VTable0x74(p_transform);
|
||||
|
||||
if (m_curAnim >= 0) {
|
||||
FUN_1001c1f0(und);
|
||||
FUN_1001c360(und, p_transform);
|
||||
GetTimeInCycle(timeInCycle);
|
||||
AnimateWithTransform(timeInCycle, p_transform);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +86,10 @@ void LegoAnimActor::Animate(float p_time)
|
||||
|
||||
if (m_actorState == c_initial && !m_userNavFlag && m_worldSpeed <= 0) {
|
||||
if (m_curAnim >= 0) {
|
||||
MxMatrix matrix(m_unk0xec);
|
||||
float f;
|
||||
FUN_1001c1f0(f);
|
||||
FUN_1001c360(f, matrix);
|
||||
MxMatrix transform(m_unk0xec);
|
||||
float timeInCycle;
|
||||
GetTimeInCycle(timeInCycle);
|
||||
AnimateWithTransform(timeInCycle, transform);
|
||||
}
|
||||
|
||||
m_lastTime = m_actorTime = p_time;
|
||||
@@ -96,9 +101,9 @@ void LegoAnimActor::Animate(float p_time)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001c360
|
||||
// FUNCTION: BETA10 0x1003e2d3
|
||||
MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
|
||||
MxResult LegoAnimActor::AnimateWithTransform(float p_time, Matrix4& p_transform)
|
||||
{
|
||||
if (p_und >= 0) {
|
||||
if (p_time >= 0) {
|
||||
assert((m_curAnim >= 0) && (m_curAnim < m_animMaps.size()));
|
||||
|
||||
LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap;
|
||||
@@ -133,11 +138,11 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
|
||||
}
|
||||
|
||||
for (MxS32 j = 0; j < n->GetNumChildren(); j++) {
|
||||
LegoROI::ApplyAnimationTransformation(n->GetChild(j), p_transform, p_und, roiMap);
|
||||
LegoROI::ApplyAnimationTransformation(n->GetChild(j), p_transform, p_time, roiMap);
|
||||
}
|
||||
|
||||
if (m_cameraFlag) {
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,15 +155,20 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001c450
|
||||
// FUNCTION: BETA10 0x1003e590
|
||||
MxResult LegoAnimActor::FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs)
|
||||
MxResult LegoAnimActor::CreateAnimActorStruct(
|
||||
LegoAnim* p_AnimTreePtr,
|
||||
float p_worldSpeed,
|
||||
LegoROI** p_roiMap,
|
||||
MxU32 p_numROIs
|
||||
)
|
||||
{
|
||||
// the capitalization of `p_AnimTreePtr` was taken from BETA10
|
||||
assert(p_AnimTreePtr && p_roiMap);
|
||||
|
||||
LegoAnimActorStruct* laas = new LegoAnimActorStruct(p_unk0x00, p_AnimTreePtr, p_roiMap, p_numROIs);
|
||||
LegoAnimActorStruct* laas = new LegoAnimActorStruct(p_worldSpeed, p_AnimTreePtr, p_roiMap, p_numROIs);
|
||||
|
||||
for (vector<LegoAnimActorStruct*>::iterator it = m_animMaps.begin(); it != m_animMaps.end(); it++) {
|
||||
if (p_unk0x00 < (*it)->m_unk0x00) {
|
||||
if (p_worldSpeed < (*it)->m_worldSpeed) {
|
||||
m_animMaps.insert(it, laas);
|
||||
SetWorldSpeed(m_worldSpeed);
|
||||
return SUCCESS;
|
||||
@@ -196,12 +206,12 @@ void LegoAnimActor::SetWorldSpeed(MxFloat p_worldSpeed)
|
||||
if (m_animMaps.size() > 0) {
|
||||
m_curAnim = 0;
|
||||
|
||||
if (m_worldSpeed >= m_animMaps[m_animMaps.size() - 1]->m_unk0x00) {
|
||||
if (m_worldSpeed >= m_animMaps[m_animMaps.size() - 1]->m_worldSpeed) {
|
||||
m_curAnim = m_animMaps.size() - 1;
|
||||
}
|
||||
else {
|
||||
for (MxU32 i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_worldSpeed <= m_animMaps[i]->m_unk0x00) {
|
||||
if (m_worldSpeed <= m_animMaps[i]->m_worldSpeed) {
|
||||
m_curAnim = i;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ inline void LegoExtraActor::FUN_1002ad8a()
|
||||
m_assAnimP->FUN_1006d680(this, -20.0f);
|
||||
|
||||
for (MxS32 i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -20.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -20.0f) {
|
||||
m_assAnim = new LegoAnimActorStruct(*m_animMaps[i]);
|
||||
break;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ inline void LegoExtraActor::FUN_1002ad8a()
|
||||
m_disAnimP->FUN_1006d680(this, -21.0f);
|
||||
|
||||
for (MxS32 i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -21.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -21.0f) {
|
||||
m_disAnim = new LegoAnimActorStruct(*m_animMaps[i]);
|
||||
break;
|
||||
}
|
||||
@@ -410,7 +410,7 @@ void LegoExtraActor::VTable0xc4()
|
||||
if (b) {
|
||||
float duration = m_animMaps[m_curAnim]->GetDuration();
|
||||
MxMatrix matrix(m_unk0xec);
|
||||
LegoAnimActor::FUN_1001c360(duration, matrix);
|
||||
LegoAnimActor::AnimateWithTransform(duration, matrix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ MxResult LegoPathActor::VTable0x88(
|
||||
}
|
||||
else {
|
||||
m_boundary->AddActor(this);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
|
||||
m_unk0xec = m_roi->GetLocal2World();
|
||||
@@ -222,7 +222,7 @@ MxResult LegoPathActor::VTable0x84(
|
||||
|
||||
if (m_cameraFlag && m_userNavFlag) {
|
||||
m_boundary->AddActor(this);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
else {
|
||||
p5.EqualsCross(*p_boundary->GetUp(), p3);
|
||||
@@ -392,14 +392,14 @@ void LegoPathActor::VTable0x74(Matrix4& p_transform)
|
||||
{
|
||||
if (m_userNavFlag) {
|
||||
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
else {
|
||||
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform);
|
||||
m_roi->WrappedUpdateWorldData();
|
||||
|
||||
if (m_cameraFlag) {
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -745,7 +745,7 @@ void LegoPathActor::VTable0xa8()
|
||||
|
||||
if (m_userNavFlag) {
|
||||
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(m_unk0xec);
|
||||
FUN_10010c30();
|
||||
TransformPointOfView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ DECOMP_SIZE_ASSERT(LegoPathStruct, 0x14)
|
||||
extern MxU32 g_isleFlags;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f119c
|
||||
// GLOBAL: BETA10 0x100f119c
|
||||
MxBool g_unk0x100f119c = FALSE;
|
||||
|
||||
// FUNCTION: LEGO1 0x1001b700
|
||||
|
||||
@@ -68,6 +68,7 @@ const LegoChar* g_strCRCEDGEY0 = "C_RCEDGEY0";
|
||||
MxS32 g_unk0x100f0c7c = 2;
|
||||
|
||||
// FUNCTION: LEGO1 0x10016a90
|
||||
// FUNCTION: BETA10 0x100c82e8
|
||||
CarRace::CarRace()
|
||||
{
|
||||
m_skeleton = NULL;
|
||||
|
||||
@@ -53,6 +53,7 @@ MxResult LegoRace::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015d40
|
||||
// FUNCTION: BETA10 0x100c7ab5
|
||||
LegoRace::~LegoRace()
|
||||
{
|
||||
g_unk0x100f119c = FALSE;
|
||||
@@ -101,7 +102,7 @@ MxLong LegoRace::Notify(MxParam& p_param)
|
||||
// FUNCTION: BETA10 0x100c7c3f
|
||||
void LegoRace::Enable(MxBool p_enable)
|
||||
{
|
||||
if (GetUnknown0xd0Empty() != p_enable && !p_enable) {
|
||||
if (NoDisabledObjects() != p_enable && !p_enable) {
|
||||
Remove(UserActor());
|
||||
|
||||
MxU8 oldActorId = GameState()->GetActorId();
|
||||
|
||||
@@ -268,10 +268,10 @@ void LegoRaceCar::ParseAction(char* p_extra)
|
||||
MxS32 i;
|
||||
|
||||
for (i = 0; i < m_animMaps.size(); i++) {
|
||||
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) {
|
||||
if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
|
||||
m_skelKick1Anim = m_animMaps[i];
|
||||
}
|
||||
else if (m_animMaps[i]->GetUnknown0x00() == -2.0f) {
|
||||
else if (m_animMaps[i]->GetWorldSpeed() == -2.0f) {
|
||||
m_skelKick2Anim = m_animMaps[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,15 +22,15 @@ RaceSkel::~RaceSkel()
|
||||
|
||||
// FUNCTION: LEGO1 0x10071b50
|
||||
// FUNCTION: BETA10 0x100f13cf
|
||||
MxResult RaceSkel::FUN_1001c360(float p_und, Matrix4& p_transform)
|
||||
MxResult RaceSkel::AnimateWithTransform(float p_time, Matrix4& p_transform)
|
||||
{
|
||||
p_transform[3][0] = -630.0f;
|
||||
p_transform[3][1] = -4.688f;
|
||||
p_transform[3][2] = 323.0f;
|
||||
|
||||
m_animPosition = p_und;
|
||||
m_animPosition = p_time;
|
||||
|
||||
return LegoAnimActor::FUN_1001c360(p_und, p_transform);
|
||||
return LegoAnimActor::AnimateWithTransform(p_time, p_transform);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071b90
|
||||
|
||||
@@ -1136,7 +1136,7 @@ void LegoAnimPresenter::VTable0x8c()
|
||||
}
|
||||
|
||||
if (m_currentWorld) {
|
||||
m_currentWorld->FUN_1001fda0(this);
|
||||
m_currentWorld->AddPresenterIfInRange(this);
|
||||
if (!m_compositePresenter || !m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
m_currentWorld->Add(this);
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ void LegoAnimPresenter::VTable0x8c()
|
||||
void LegoAnimPresenter::VTable0x90()
|
||||
{
|
||||
if (m_currentWorld != NULL) {
|
||||
m_currentWorld->FUN_1001fe90(this);
|
||||
m_currentWorld->RemovePresenterFromBoundaries(this);
|
||||
|
||||
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
return;
|
||||
@@ -1435,7 +1435,7 @@ void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
m_roiMapList->Append(m_roiMap);
|
||||
p_actor->FUN_1001c450(m_anim, p_value, m_roiMap, m_roiMapSize);
|
||||
p_actor->CreateAnimActorStruct(m_anim, p_value, m_roiMap, m_roiMapSize);
|
||||
m_roiMap = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "misc/legocontainer.h"
|
||||
#include "mxdsaction.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoFlcTexturePresenter, 0x70)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005de80
|
||||
@@ -27,11 +29,14 @@ void LegoFlcTexturePresenter::StartingTickle()
|
||||
char* pp;
|
||||
char extraCopy[128];
|
||||
m_action->GetExtra(extraLength, pp);
|
||||
assert(pp);
|
||||
|
||||
if (pp != NULL) {
|
||||
strcpy(extraCopy, pp);
|
||||
strcat(extraCopy, ".gif");
|
||||
m_texture = TextureContainer()->Get(extraCopy);
|
||||
LegoTextureContainer* textureContainer = TextureContainer();
|
||||
assert(textureContainer);
|
||||
m_texture = textureContainer->Get(extraCopy);
|
||||
}
|
||||
|
||||
MxFlcPresenter::StartingTickle();
|
||||
|
||||
@@ -44,7 +44,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007f6b0
|
||||
// FUNCTION: BETA10 0x1009845e
|
||||
// STUB: BETA10 0x1009845e
|
||||
MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
@@ -26,6 +26,7 @@ DECOMP_SIZE_ASSERT(MxStopWatch, 0x18)
|
||||
DECOMP_SIZE_ASSERT(MxFrequencyMeter, 0x20)
|
||||
|
||||
// FUNCTION: LEGO1 0x1007aa20
|
||||
// FUNCTION: BETA10 0x100d5a00
|
||||
LegoVideoManager::LegoVideoManager()
|
||||
{
|
||||
m_renderer = NULL;
|
||||
@@ -286,12 +287,15 @@ void LegoVideoManager::ToggleFPS(MxBool p_visible)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007b770
|
||||
// STUB: BETA10 0x100d69cc
|
||||
MxResult LegoVideoManager::Tickle()
|
||||
{
|
||||
#ifndef BETA10
|
||||
if (m_unk0x554 && !m_videoParam.Flags().GetFlipSurfaces() &&
|
||||
TransitionManager()->GetTransitionType() == MxTransitionManager::e_idle) {
|
||||
Sleep(30);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_stopWatch->Stop();
|
||||
m_elapsedSeconds = m_stopWatch->ElapsedSeconds();
|
||||
@@ -514,6 +518,7 @@ void LegoVideoManager::DrawFPS()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c080
|
||||
// FUNCTION: BETA10 0x100d6d28
|
||||
MxPresenter* LegoVideoManager::GetPresenterAt(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
MxPresenterListCursor cursor(m_presenters);
|
||||
@@ -551,6 +556,7 @@ MxPresenter* LegoVideoManager::GetPresenterByActionObjectName(const char* p_acti
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c290
|
||||
// FUNCTION: BETA10 0x100d731e
|
||||
MxResult LegoVideoManager::RealizePalette(MxPalette* p_pallete)
|
||||
{
|
||||
if (p_pallete && m_videoParam.GetPalette()) {
|
||||
@@ -652,6 +658,7 @@ void LegoVideoManager::OverrideSkyColor(MxBool p_shouldOverride)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007c4d0
|
||||
// FUNCTION: BETA10 0x100d77d3
|
||||
void LegoVideoManager::UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
|
||||
{
|
||||
if (p_width == 0) {
|
||||
|
||||
@@ -109,14 +109,14 @@ Act3Script::Script g_unk0x100d95e8[] =
|
||||
{Act3Script::c_tlp053in_RunAnim, Act3Script::c_tlp064la_RunAnim, Act3Script::c_tlp068in_RunAnim};
|
||||
|
||||
// FUNCTION: LEGO1 0x10071d40
|
||||
void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
||||
void Act3List::Insert(MxS32 p_objectId, Act3ListElement::InsertMode p_option)
|
||||
{
|
||||
if (m_unk0x0c) {
|
||||
if (m_cleared) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (p_option) {
|
||||
case InsertMode::e_replaceAction:
|
||||
case Act3ListElement::InsertMode::e_replaceAction:
|
||||
if (!empty()) {
|
||||
DeleteActionWrapper();
|
||||
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
||||
@@ -126,7 +126,7 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||
}
|
||||
break;
|
||||
case InsertMode::e_queueAction:
|
||||
case Act3ListElement::InsertMode::e_queueAction:
|
||||
if (empty()) {
|
||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
||||
@@ -135,7 +135,7 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
||||
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
||||
}
|
||||
break;
|
||||
case InsertMode::e_onlyIfEmpty:
|
||||
case Act3ListElement::InsertMode::e_onlyIfEmpty:
|
||||
if (empty()) {
|
||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
||||
@@ -153,7 +153,7 @@ void Act3List::DeleteActionWrapper()
|
||||
// FUNCTION: LEGO1 0x10071fb0
|
||||
void Act3List::Clear()
|
||||
{
|
||||
m_unk0x0c = 1;
|
||||
m_cleared = TRUE;
|
||||
BackgroundAudioManager()->Stop();
|
||||
|
||||
if (empty()) {
|
||||
@@ -176,7 +176,7 @@ void Act3List::Clear()
|
||||
// FUNCTION: LEGO1 0x100720d0
|
||||
void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
||||
{
|
||||
if (m_unk0x0c) {
|
||||
if (m_cleared) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
||||
it++;
|
||||
|
||||
while (it != end()) {
|
||||
if ((*it).m_unk0x04 == 1) {
|
||||
if ((*it).m_insertMode == Act3ListElement::e_replaceAction) {
|
||||
for (Act3List::iterator it2 = begin(); it2 != it; erase(it2++)) {
|
||||
if ((*it2).m_hasStarted) {
|
||||
DeleteActionWrapper();
|
||||
@@ -468,14 +468,14 @@ void Act3::TriggerHitSound(undefined4 p_param1)
|
||||
m_bricksterDonutSound = 0;
|
||||
}
|
||||
|
||||
m_unk0x4220.Insert(g_bricksterDonutSounds[m_bricksterDonutSound++], Act3List::e_replaceAction);
|
||||
m_unk0x4220.Insert(g_bricksterDonutSounds[m_bricksterDonutSound++], Act3ListElement::e_replaceAction);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
m_unk0x4220.Insert(objectId, Act3List::e_onlyIfEmpty);
|
||||
m_unk0x4220.Insert(objectId, Act3ListElement::e_onlyIfEmpty);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10072c30
|
||||
@@ -632,22 +632,22 @@ MxLong Act3::Notify(MxParam& p_param)
|
||||
break;
|
||||
}
|
||||
case c_notificationKeyPress:
|
||||
if (m_state->m_unk0x08 == 1 && ((LegoEventNotificationParam&) p_param).GetKey() == ' ') {
|
||||
if (m_state->m_state == Act3State::e_ready && ((LegoEventNotificationParam&) p_param).GetKey() == ' ') {
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case c_notificationButtonUp:
|
||||
case c_notificationButtonDown:
|
||||
if (m_state->m_unk0x08 == 1) {
|
||||
if (m_state->m_state == Act3State::e_ready) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case c_notificationEndAnim:
|
||||
if (m_state->m_unk0x08 == 1) {
|
||||
if (m_state->m_state == Act3State::e_ready) {
|
||||
assert(m_copter && m_brickster && m_cop1 && m_cop2);
|
||||
m_unk0x4220.RemoveByObjectIdOrFirst(0);
|
||||
m_state->m_unk0x08 = 0;
|
||||
m_state->m_state = Act3State::e_initial;
|
||||
Disable(TRUE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
m_copter->HandleClick();
|
||||
m_copter->m_state->m_unk0x08 = 1;
|
||||
@@ -686,7 +686,7 @@ void Act3::ReadyWorld()
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(m_unk0x426c, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, TRUE, FALSE, FALSE, FALSE);
|
||||
|
||||
m_state->m_unk0x08 = 1;
|
||||
m_state->m_state = Act3State::e_ready;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073300
|
||||
@@ -758,7 +758,7 @@ void Act3::SetBrickster(Act3Brickster* p_brickster)
|
||||
// FUNCTION: LEGO1 0x10073400
|
||||
void Act3::FUN_10073400()
|
||||
{
|
||||
m_state->m_unk0x08 = 2;
|
||||
m_state->m_state = Act3State::e_goodEnding;
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
@@ -766,7 +766,7 @@ void Act3::FUN_10073400()
|
||||
// FUNCTION: LEGO1 0x10073430
|
||||
void Act3::FUN_10073430()
|
||||
{
|
||||
m_state->m_unk0x08 = 3;
|
||||
m_state->m_state = Act3State::e_badEnding;
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
@@ -781,6 +781,7 @@ void Act3::GoodEnding(const Matrix4& p_destination)
|
||||
m_cop2->SetActorState(LegoPathActor::c_disabled);
|
||||
m_brickster->SetActorState(LegoPathActor::c_disabled);
|
||||
|
||||
#ifndef BETA10
|
||||
m_unk0x4220.Clear();
|
||||
m_copter->FUN_10004640(p_destination);
|
||||
|
||||
@@ -792,6 +793,10 @@ void Act3::GoodEnding(const Matrix4& p_destination)
|
||||
m_copter->m_unk0x1a8,
|
||||
m_copter->m_unk0x1f4
|
||||
);
|
||||
#else
|
||||
m_state->m_state = Act3State::e_goodEnding;
|
||||
GameState()->SwitchArea(LegoGameState::Area::e_infomain);
|
||||
#endif
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10073500
|
||||
@@ -883,7 +888,7 @@ void Act3::FUN_10073a60()
|
||||
// FUNCTION: LEGO1 0x10073a90
|
||||
void Act3::Enable(MxBool p_enable)
|
||||
{
|
||||
if ((MxBool) m_set0xd0.empty() == p_enable) {
|
||||
if ((MxBool) m_disabledObjects.empty() == p_enable) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "credits_actions.h"
|
||||
#include "helicopter.h"
|
||||
#include "infomain_actions.h"
|
||||
#include "intro_actions.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoact2.h"
|
||||
@@ -128,13 +129,13 @@ InfomainScript::Script g_bricksterDialogue[2] = {
|
||||
// FUNCTION: LEGO1 0x1006ea20
|
||||
Infocenter::Infocenter()
|
||||
{
|
||||
m_selectedCharacter = e_noCharacter;
|
||||
m_selectedCharacter = LegoActor::c_none;
|
||||
m_dragPresenter = NULL;
|
||||
m_infocenterState = NULL;
|
||||
m_frame = NULL;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
m_currentInfomainScript = InfomainScript::c_noneInfomain;
|
||||
m_currentCutscene = e_noIntro;
|
||||
m_currentCutscene = IntroScript::c_noneIntro;
|
||||
|
||||
memset(&m_glowInfo, 0, sizeof(m_glowInfo));
|
||||
|
||||
@@ -190,12 +191,13 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
||||
m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (!m_infocenterState) {
|
||||
m_infocenterState = (InfocenterState*) GameState()->CreateState("InfocenterState");
|
||||
m_infocenterState->m_unk0x74 = 3;
|
||||
m_infocenterState->m_state = InfocenterState::e_newState;
|
||||
}
|
||||
else {
|
||||
if (m_infocenterState->m_unk0x74 != 8 && m_infocenterState->m_unk0x74 != 4 &&
|
||||
m_infocenterState->m_unk0x74 != 15) {
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
if (m_infocenterState->m_state != InfocenterState::e_exitQueried &&
|
||||
m_infocenterState->m_state != InfocenterState::e_selectedSave &&
|
||||
m_infocenterState->m_state != InfocenterState::e_backToInfoAct1) {
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
}
|
||||
|
||||
MxS16 count, i;
|
||||
@@ -217,9 +219,9 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
||||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
GameState()->StopArea(LegoGameState::e_previousArea);
|
||||
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
|
||||
LegoGameState* state = GameState();
|
||||
state->m_previousArea = GameState()->m_unk0x42c;
|
||||
state->m_previousArea = GameState()->m_savedPreviousArea;
|
||||
}
|
||||
|
||||
InputManager()->Register(this);
|
||||
@@ -266,9 +268,9 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
||||
StopBookAnimation();
|
||||
m_bookAnimationTimer = 0;
|
||||
|
||||
if (m_infocenterState->m_unk0x74 == 0x0c) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exiting) {
|
||||
StartCredits();
|
||||
m_infocenterState->m_unk0x74 = 0xd;
|
||||
m_infocenterState->m_state = InfocenterState::e_playCredits;
|
||||
}
|
||||
else if (m_destLocation != 0) {
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
@@ -305,19 +307,19 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
GameState()->SetActor(m_selectedCharacter);
|
||||
|
||||
switch (m_selectedCharacter) {
|
||||
case e_pepper:
|
||||
case LegoActor::c_pepper:
|
||||
PlayAction(InfomainScript::c_avo901in_RunAnim);
|
||||
break;
|
||||
case e_mama:
|
||||
case LegoActor::c_mama:
|
||||
PlayAction(InfomainScript::c_avo902in_RunAnim);
|
||||
break;
|
||||
case e_papa:
|
||||
case LegoActor::c_papa:
|
||||
PlayAction(InfomainScript::c_avo903in_RunAnim);
|
||||
break;
|
||||
case e_nick:
|
||||
case LegoActor::c_nick:
|
||||
PlayAction(InfomainScript::c_avo904in_RunAnim);
|
||||
break;
|
||||
case e_laura:
|
||||
case LegoActor::c_laura:
|
||||
PlayAction(InfomainScript::c_avo905in_RunAnim);
|
||||
break;
|
||||
default:
|
||||
@@ -339,80 +341,80 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
m_bigInfoBlinkTimer = 0;
|
||||
}
|
||||
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 0:
|
||||
switch (m_infocenterState->m_state) {
|
||||
case InfocenterState::e_playCutscene:
|
||||
switch (m_currentCutscene) {
|
||||
case e_legoMovie:
|
||||
PlayCutscene(e_mindscapeMovie, FALSE);
|
||||
case IntroScript::c_Lego_Movie:
|
||||
PlayCutscene(IntroScript::c_Mindscape_Movie, FALSE);
|
||||
return 1;
|
||||
case e_mindscapeMovie:
|
||||
PlayCutscene(e_introMovie, TRUE);
|
||||
case IntroScript::c_Mindscape_Movie:
|
||||
PlayCutscene(IntroScript::c_Intro_Movie, TRUE);
|
||||
return 1;
|
||||
case e_badEndMovie:
|
||||
case IntroScript::c_BadEnd_Movie:
|
||||
StopCutscene();
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
|
||||
PlayAction(InfomainScript::c_tic092in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
m_currentCutscene = IntroScript::c_noneIntro;
|
||||
return 1;
|
||||
case e_goodEndMovie:
|
||||
case IntroScript::c_GoodEnd_Movie:
|
||||
StopCutscene();
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
|
||||
PlayAction(InfomainScript::c_tic089in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
m_currentCutscene = IntroScript::c_noneIntro;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// default / 2nd case probably?
|
||||
StopCutscene();
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
|
||||
PlayAction(InfomainScript::c_iic001in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
m_currentCutscene = IntroScript::c_noneIntro;
|
||||
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
case InfocenterState::e_introCancelled:
|
||||
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
|
||||
|
||||
switch (m_currentCutscene) {
|
||||
case e_badEndMovie:
|
||||
case IntroScript::c_BadEnd_Movie:
|
||||
PlayAction(InfomainScript::c_tic092in_RunAnim);
|
||||
break;
|
||||
case e_goodEndMovie:
|
||||
case IntroScript::c_GoodEnd_Movie:
|
||||
PlayAction(InfomainScript::c_tic089in_RunAnim);
|
||||
break;
|
||||
default:
|
||||
PlayAction(InfomainScript::c_iic001in_RunAnim);
|
||||
}
|
||||
|
||||
m_currentCutscene = e_noIntro;
|
||||
m_currentCutscene = IntroScript::c_noneIntro;
|
||||
return 1;
|
||||
case 2:
|
||||
case InfocenterState::e_notRegistered:
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
return 1;
|
||||
case 4:
|
||||
case InfocenterState::e_selectedSave:
|
||||
if (action->GetObjectId() == InfomainScript::c_GoTo_RegBook ||
|
||||
action->GetObjectId() == InfomainScript::c_GoTo_RegBook_Red) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case InfocenterState::e_selectedCharacterAndDestination:
|
||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||
if (GameState()->GetCurrentAct() != LegoGameState::e_act3 && m_selectedCharacter != e_noCharacter) {
|
||||
if (GameState()->GetCurrentAct() != LegoGameState::e_act3 && m_selectedCharacter != LegoActor::c_none) {
|
||||
GameState()->SetActor(m_selectedCharacter);
|
||||
}
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
case InfocenterState::e_welcomeAnimation:
|
||||
if (!m_infocenterState->HasRegistered() && m_currentInfomainScript != InfomainScript::c_Mama_All_Movie &&
|
||||
m_currentInfomainScript != InfomainScript::c_Papa_All_Movie &&
|
||||
m_currentInfomainScript != InfomainScript::c_Pepper_All_Movie &&
|
||||
@@ -422,10 +424,10 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
SetROIVisible("infoman", TRUE);
|
||||
return 1;
|
||||
case 12:
|
||||
case InfocenterState::e_exiting:
|
||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
@@ -452,13 +454,13 @@ void Infocenter::ReadyWorld()
|
||||
bg->Enable(TRUE);
|
||||
InitializeBitmaps();
|
||||
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 3:
|
||||
PlayCutscene(e_legoMovie, TRUE);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
switch (m_infocenterState->m_state) {
|
||||
case InfocenterState::e_newState:
|
||||
PlayCutscene(IntroScript::c_Lego_Movie, TRUE);
|
||||
m_infocenterState->m_state = InfocenterState::e_playCutscene;
|
||||
return;
|
||||
case 4:
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
case InfocenterState::e_selectedSave:
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
}
|
||||
@@ -467,7 +469,7 @@ void Infocenter::ReadyWorld()
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
return;
|
||||
case 5:
|
||||
case InfocenterState::e_selectedCharacterAndDestination:
|
||||
default: {
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
|
||||
@@ -486,13 +488,13 @@ void Infocenter::ReadyWorld()
|
||||
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
case InfocenterState::e_exitQueried:
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
return;
|
||||
case 0xf:
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
case InfocenterState::e_backToInfoAct1:
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
}
|
||||
@@ -504,7 +506,7 @@ void Infocenter::ReadyWorld()
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_act2: {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
bgRed->Enable(TRUE);
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
@@ -515,14 +517,14 @@ void Infocenter::ReadyWorld()
|
||||
LegoAct2State* state = (LegoAct2State*) GameState()->GetState("LegoAct2State");
|
||||
GameState()->FindLoadedAct();
|
||||
|
||||
if (state && state->GetUnknown0x08() == 0x68) {
|
||||
if (state && state->GetState() == LegoAct2State::c_badEnding) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_badEndMovie, TRUE);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
PlayCutscene(IntroScript::c_BadEnd_Movie, TRUE);
|
||||
m_infocenterState->m_state = InfocenterState::e_playCutscene;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
|
||||
bgRed->Enable(TRUE);
|
||||
|
||||
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
|
||||
@@ -531,7 +533,7 @@ void Infocenter::ReadyWorld()
|
||||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = LegoGameState::e_act2main;
|
||||
|
||||
InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue();
|
||||
@@ -549,7 +551,7 @@ void Infocenter::ReadyWorld()
|
||||
break;
|
||||
}
|
||||
case LegoGameState::e_act3: {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
bgRed->Enable(TRUE);
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
@@ -560,21 +562,21 @@ void Infocenter::ReadyWorld()
|
||||
Act3State* state = (Act3State*) GameState()->GetState("Act3State");
|
||||
GameState()->FindLoadedAct();
|
||||
|
||||
if (state && state->GetUnknown0x08() == 3) {
|
||||
if (state && state->GetState() == Act3State::e_badEnding) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_badEndMovie, TRUE);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
PlayCutscene(IntroScript::c_BadEnd_Movie, TRUE);
|
||||
m_infocenterState->m_state = InfocenterState::e_playCutscene;
|
||||
return;
|
||||
}
|
||||
|
||||
if (state && state->GetUnknown0x08() == 2) {
|
||||
if (state && state->GetState() == Act3State::e_goodEnding) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_goodEndMovie, TRUE);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
PlayCutscene(IntroScript::c_GoodEnd_Movie, TRUE);
|
||||
m_infocenterState->m_state = InfocenterState::e_playCutscene;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
|
||||
bgRed->Enable(TRUE);
|
||||
|
||||
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
|
||||
@@ -583,7 +585,7 @@ void Infocenter::ReadyWorld()
|
||||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = LegoGameState::e_act3script;
|
||||
|
||||
InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue();
|
||||
@@ -602,7 +604,7 @@ void Infocenter::ReadyWorld()
|
||||
}
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
|
||||
@@ -701,37 +703,37 @@ MxLong Infocenter::HandleKeyPress(MxS8 p_key)
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_key == VK_SPACE && m_worldStarted) {
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 0:
|
||||
switch (m_infocenterState->m_state) {
|
||||
case InfocenterState::e_playCutscene:
|
||||
StopCutscene();
|
||||
m_infocenterState->m_unk0x74 = 1;
|
||||
m_infocenterState->m_state = InfocenterState::e_introCancelled;
|
||||
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
case InfocenterState::e_introCancelled:
|
||||
case InfocenterState::e_selectedSave:
|
||||
break;
|
||||
default: {
|
||||
InfomainScript::Script script = m_currentInfomainScript;
|
||||
StopCurrentAction();
|
||||
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 5:
|
||||
case 12:
|
||||
switch (m_infocenterState->m_state) {
|
||||
case InfocenterState::e_selectedCharacterAndDestination:
|
||||
case InfocenterState::e_exiting:
|
||||
m_currentInfomainScript = script;
|
||||
return 1;
|
||||
default:
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
return 1;
|
||||
case 8:
|
||||
case 11:
|
||||
case InfocenterState::e_exitQueried:
|
||||
case InfocenterState::e_welcomeAnimation:
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 13:
|
||||
case InfocenterState::e_playCredits:
|
||||
StopCredits();
|
||||
break;
|
||||
}
|
||||
@@ -751,19 +753,19 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
|
||||
switch (m_dragPresenter->GetAction()->GetObjectId()) {
|
||||
case InfomainScript::c_PepperHot_Bitmap:
|
||||
m_selectedCharacter = e_pepper;
|
||||
m_selectedCharacter = LegoActor::c_pepper;
|
||||
break;
|
||||
case InfomainScript::c_MamaHot_Bitmap:
|
||||
m_selectedCharacter = e_mama;
|
||||
m_selectedCharacter = LegoActor::c_mama;
|
||||
break;
|
||||
case InfomainScript::c_PapaHot_Bitmap:
|
||||
m_selectedCharacter = e_papa;
|
||||
m_selectedCharacter = LegoActor::c_papa;
|
||||
break;
|
||||
case InfomainScript::c_NickHot_Bitmap:
|
||||
m_selectedCharacter = e_nick;
|
||||
m_selectedCharacter = LegoActor::c_nick;
|
||||
break;
|
||||
case InfomainScript::c_LauraHot_Bitmap:
|
||||
m_selectedCharacter = e_laura;
|
||||
m_selectedCharacter = LegoActor::c_laura;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -772,7 +774,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
|
||||
switch (control->GetAction()->GetObjectId()) {
|
||||
case InfomainScript::c_Pepper_Ctl:
|
||||
if (m_selectedCharacter == e_pepper) {
|
||||
if (m_selectedCharacter == LegoActor::c_pepper) {
|
||||
m_radio.Stop();
|
||||
BackgroundAudioManager()->Stop();
|
||||
PlayAction(InfomainScript::c_Pepper_All_Movie);
|
||||
@@ -780,7 +782,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
break;
|
||||
case InfomainScript::c_Mama_Ctl:
|
||||
if (m_selectedCharacter == e_mama) {
|
||||
if (m_selectedCharacter == LegoActor::c_mama) {
|
||||
m_radio.Stop();
|
||||
BackgroundAudioManager()->Stop();
|
||||
PlayAction(InfomainScript::c_Mama_All_Movie);
|
||||
@@ -788,7 +790,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
break;
|
||||
case InfomainScript::c_Papa_Ctl:
|
||||
if (m_selectedCharacter == e_papa) {
|
||||
if (m_selectedCharacter == LegoActor::c_papa) {
|
||||
m_radio.Stop();
|
||||
BackgroundAudioManager()->Stop();
|
||||
PlayAction(InfomainScript::c_Papa_All_Movie);
|
||||
@@ -796,7 +798,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
break;
|
||||
case InfomainScript::c_Nick_Ctl:
|
||||
if (m_selectedCharacter == e_nick) {
|
||||
if (m_selectedCharacter == LegoActor::c_nick) {
|
||||
m_radio.Stop();
|
||||
BackgroundAudioManager()->Stop();
|
||||
PlayAction(InfomainScript::c_Nick_All_Movie);
|
||||
@@ -804,7 +806,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
break;
|
||||
case InfomainScript::c_Laura_Ctl:
|
||||
if (m_selectedCharacter == e_laura) {
|
||||
if (m_selectedCharacter == LegoActor::c_laura) {
|
||||
m_radio.Stop();
|
||||
BackgroundAudioManager()->Stop();
|
||||
PlayAction(InfomainScript::c_Laura_All_Movie);
|
||||
@@ -822,19 +824,19 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
GameState()->SetActor(m_selectedCharacter);
|
||||
|
||||
switch (m_selectedCharacter) {
|
||||
case e_pepper:
|
||||
case LegoActor::c_pepper:
|
||||
PlayAction(InfomainScript::c_avo901in_RunAnim);
|
||||
break;
|
||||
case e_mama:
|
||||
case LegoActor::c_mama:
|
||||
PlayAction(InfomainScript::c_avo902in_RunAnim);
|
||||
break;
|
||||
case e_papa:
|
||||
case LegoActor::c_papa:
|
||||
PlayAction(InfomainScript::c_avo903in_RunAnim);
|
||||
break;
|
||||
case e_nick:
|
||||
case LegoActor::c_nick:
|
||||
PlayAction(InfomainScript::c_avo904in_RunAnim);
|
||||
break;
|
||||
case e_laura:
|
||||
case LegoActor::c_laura:
|
||||
PlayAction(InfomainScript::c_avo905in_RunAnim);
|
||||
break;
|
||||
}
|
||||
@@ -842,37 +844,37 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
case InfocenterMapEntry::e_jetrace:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_jetraceExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
case InfocenterMapEntry::e_carrace:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_carraceExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
case InfocenterMapEntry::e_pizzeria:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_pizzeriaExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
case InfocenterMapEntry::e_garage:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_garageExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
case InfocenterMapEntry::e_hospital:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_hospitalExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
case InfocenterMapEntry::e_police:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_policeExterior;
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -882,34 +884,34 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
m_dragPresenter->Enable(FALSE);
|
||||
m_dragPresenter = NULL;
|
||||
|
||||
if (m_infocenterState->m_unk0x74 == 5) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_selectedCharacterAndDestination) {
|
||||
InfomainScript::Script dialogueToPlay;
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
dialogueToPlay = InfomainScript::c_iic007in_PlayWav;
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
}
|
||||
else {
|
||||
switch (m_selectedCharacter) {
|
||||
case e_pepper:
|
||||
case LegoActor::c_pepper:
|
||||
dialogueToPlay = InfomainScript::c_avo901in_RunAnim;
|
||||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
case e_mama:
|
||||
case LegoActor::c_mama:
|
||||
dialogueToPlay = InfomainScript::c_avo902in_RunAnim;
|
||||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
case e_papa:
|
||||
case LegoActor::c_papa:
|
||||
dialogueToPlay = InfomainScript::c_avo903in_RunAnim;
|
||||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
case e_nick:
|
||||
case LegoActor::c_nick:
|
||||
dialogueToPlay = InfomainScript::c_avo904in_RunAnim;
|
||||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
case e_laura:
|
||||
case LegoActor::c_laura:
|
||||
dialogueToPlay = InfomainScript::c_avo905in_RunAnim;
|
||||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
@@ -952,7 +954,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case InfomainScript::c_LeftArrow_Ctl:
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
|
||||
StopCurrentAction();
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
@@ -967,7 +969,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
|
||||
break;
|
||||
case InfomainScript::c_RightArrow_Ctl:
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
|
||||
StopCurrentAction();
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
@@ -986,10 +988,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
m_radio.Stop();
|
||||
break;
|
||||
case InfomainScript::c_Door_Ctl:
|
||||
if (m_infocenterState->m_unk0x74 != 8) {
|
||||
if (m_infocenterState->m_state != InfocenterState::e_exitQueried) {
|
||||
actionToPlay = InfomainScript::c_iic043in_RunAnim;
|
||||
m_radio.Stop();
|
||||
m_infocenterState->m_unk0x74 = 8;
|
||||
m_infocenterState->m_state = InfocenterState::e_exitQueried;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1025,7 +1027,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
case LegoGameState::e_infodoor:
|
||||
case LegoGameState::e_regbook:
|
||||
case LegoGameState::e_infoscor:
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = state->m_previousArea;
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
m_radio.Stop();
|
||||
@@ -1044,10 +1046,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
if (state->GetActorId() != LegoActor::c_none) {
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
PlayAction(InfomainScript::c_iic007in_PlayWav);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
}
|
||||
else {
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = state->m_previousArea;
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
m_radio.Stop();
|
||||
@@ -1060,14 +1062,14 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_act2:
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = LegoGameState::e_act2main;
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_act3:
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
|
||||
m_destLocation = LegoGameState::e_act3script;
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
InputManager()->DisableInputProcessing();
|
||||
@@ -1077,11 +1079,11 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
break;
|
||||
case InfomainScript::c_Book_Ctl:
|
||||
m_destLocation = LegoGameState::e_regbook;
|
||||
m_infocenterState->m_unk0x74 = 4;
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedSave;
|
||||
actionToPlay = GameState()->GetCurrentAct() != LegoGameState::e_act1 ? InfomainScript::c_GoTo_RegBook_Red
|
||||
: InfomainScript::c_GoTo_RegBook;
|
||||
m_radio.Stop();
|
||||
GameState()->m_unk0x42c = GameState()->m_previousArea;
|
||||
GameState()->m_savedPreviousArea = GameState()->m_previousArea;
|
||||
InputManager()->DisableInputProcessing();
|
||||
break;
|
||||
case InfomainScript::c_Mama_Ctl:
|
||||
@@ -1128,13 +1130,13 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
|
||||
MxCore* sender = p_param.GetSender();
|
||||
|
||||
if (sender == NULL) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
StopCutscene();
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
}
|
||||
}
|
||||
else if (sender->IsA("MxEntity") && m_infocenterState->m_unk0x74 != 5 && m_infocenterState->m_unk0x74 != 12) {
|
||||
else if (sender->IsA("MxEntity") && m_infocenterState->m_state != InfocenterState::e_selectedCharacterAndDestination && m_infocenterState->m_state != InfocenterState::e_exiting) {
|
||||
switch (((MxEntity*) sender)->GetEntityId()) {
|
||||
case 5: {
|
||||
m_infoManDialogueTimer = 0;
|
||||
@@ -1153,21 +1155,21 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
|
||||
return 1;
|
||||
}
|
||||
case 6:
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
|
||||
StopCurrentAction();
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
PlayAction(InfomainScript::c_iicb28in_RunAnim);
|
||||
return 1;
|
||||
}
|
||||
case 7:
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
|
||||
if (m_infocenterState->HasRegistered()) {
|
||||
GameState()->Save(0);
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 12;
|
||||
m_infocenterState->m_state = InfocenterState::e_exiting;
|
||||
PlayAction(InfomainScript::c_iic046in_RunAnim);
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
@@ -1254,7 +1256,7 @@ MxResult Infocenter::Tickle()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070c20
|
||||
void Infocenter::PlayCutscene(Cutscene p_entityId, MxBool p_scale)
|
||||
void Infocenter::PlayCutscene(IntroScript::Script p_entityId, MxBool p_scale)
|
||||
{
|
||||
m_currentCutscene = p_entityId;
|
||||
|
||||
@@ -1264,9 +1266,9 @@ void Infocenter::PlayCutscene(Cutscene p_entityId, MxBool p_scale)
|
||||
SetAppCursor(e_cursorNone);
|
||||
VideoManager()->GetDisplaySurface()->ClearScreen();
|
||||
|
||||
if (m_currentCutscene != e_noIntro) {
|
||||
if (m_currentCutscene != IntroScript::c_noneIntro) {
|
||||
// check if the cutscene is an ending
|
||||
if (m_currentCutscene >= e_badEndMovie && m_currentCutscene <= e_goodEndMovie) {
|
||||
if (m_currentCutscene >= IntroScript::c_BadEnd_Movie && m_currentCutscene <= IntroScript::c_GoodEnd_Movie) {
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -1277,7 +1279,7 @@ void Infocenter::PlayCutscene(Cutscene p_entityId, MxBool p_scale)
|
||||
// FUNCTION: LEGO1 0x10070cb0
|
||||
void Infocenter::StopCutscene()
|
||||
{
|
||||
if (m_currentCutscene != e_noIntro) {
|
||||
if (m_currentCutscene != IntroScript::c_noneIntro) {
|
||||
InvokeAction(Extra::ActionType::e_close, *g_introScript, m_currentCutscene, NULL);
|
||||
}
|
||||
|
||||
@@ -1288,7 +1290,7 @@ void Infocenter::StopCutscene()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070d00
|
||||
MxBool Infocenter::VTable0x5c()
|
||||
MxBool Infocenter::WaitForTransition()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1391,12 +1393,12 @@ void Infocenter::Reset()
|
||||
CharacterManager()->ReleaseAllActors();
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act1);
|
||||
GameState()->m_previousArea = LegoGameState::e_undefined;
|
||||
GameState()->m_unk0x42c = LegoGameState::e_undefined;
|
||||
GameState()->m_savedPreviousArea = LegoGameState::e_undefined;
|
||||
|
||||
InitializeBitmaps();
|
||||
m_selectedCharacter = e_pepper;
|
||||
m_selectedCharacter = LegoActor::c_pepper;
|
||||
|
||||
GameState()->SetActor(e_pepper);
|
||||
GameState()->SetActor(LegoActor::c_pepper);
|
||||
|
||||
HelicopterState* state = (HelicopterState*) GameState()->GetState("HelicopterState");
|
||||
|
||||
@@ -1409,17 +1411,17 @@ void Infocenter::Reset()
|
||||
MxBool Infocenter::Escape()
|
||||
{
|
||||
if (m_infocenterState != NULL) {
|
||||
MxU32 val = m_infocenterState->m_unk0x74;
|
||||
MxU32 val = m_infocenterState->m_state;
|
||||
|
||||
if (val == 0) {
|
||||
if (val == InfocenterState::e_playCutscene) {
|
||||
StopCutscene();
|
||||
m_infocenterState->m_unk0x74 = 1;
|
||||
m_infocenterState->m_state = InfocenterState::e_introCancelled;
|
||||
}
|
||||
else if (val == 13) {
|
||||
else if (val == InfocenterState::e_playCredits) {
|
||||
StopCredits();
|
||||
}
|
||||
else if (val != 8) {
|
||||
m_infocenterState->m_unk0x74 = 8;
|
||||
else if (val != InfocenterState::e_exitQueried) {
|
||||
m_infocenterState->m_state = InfocenterState::e_exitQueried;
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
@@ -1440,10 +1442,10 @@ void Infocenter::StartCredits()
|
||||
{
|
||||
MxPresenter* presenter;
|
||||
|
||||
while (!m_set0xa8.empty()) {
|
||||
MxCoreSet::iterator it = m_set0xa8.begin();
|
||||
while (!m_objects.empty()) {
|
||||
MxCoreSet::iterator it = m_objects.begin();
|
||||
MxCore* object = *it;
|
||||
m_set0xa8.erase(it);
|
||||
m_objects.erase(it);
|
||||
|
||||
if (object->IsA("MxPresenter")) {
|
||||
presenter = (MxPresenter*) object;
|
||||
|
||||
@@ -81,7 +81,7 @@ Isle::~Isle()
|
||||
}
|
||||
|
||||
if (UserActor() != NULL) {
|
||||
VTable0x6c(UserActor());
|
||||
RemoveVehicle(UserActor());
|
||||
}
|
||||
|
||||
NotificationManager()->Unregister(this);
|
||||
@@ -244,15 +244,15 @@ void Isle::HandleElevatorEndAction()
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
break;
|
||||
case Act1State::c_floor2:
|
||||
if (m_act1state->m_unk0x01e) {
|
||||
m_act1state->m_unk0x01e = FALSE;
|
||||
if (m_act1state->m_playingFloor2Animation) {
|
||||
m_act1state->m_playingFloor2Animation = FALSE;
|
||||
m_act1state->m_state = Act1State::e_none;
|
||||
InputManager()->EnableInputProcessing();
|
||||
}
|
||||
else {
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_Floor2, NULL);
|
||||
InputManager()->EnableInputProcessing();
|
||||
m_act1state->m_unk0x01e = TRUE;
|
||||
m_act1state->m_playingFloor2Animation = TRUE;
|
||||
}
|
||||
break;
|
||||
case Act1State::c_floor3:
|
||||
@@ -268,14 +268,14 @@ void Isle::ReadyWorld()
|
||||
{
|
||||
LegoWorld::ReadyWorld();
|
||||
|
||||
if (m_act1state->GetUnknown21()) {
|
||||
if (m_act1state->IsSpawnInInfocenter()) {
|
||||
GameState()->SwitchArea(LegoGameState::e_infomain);
|
||||
m_act1state->SetState(Act1State::e_none);
|
||||
m_act1state->SetUnknown21(0);
|
||||
m_act1state->SetSpawnInInfocenter(FALSE);
|
||||
}
|
||||
else if (GameState()->GetLoadedAct() != LegoGameState::e_act1) {
|
||||
EnableAnimations(TRUE);
|
||||
FUN_10032620();
|
||||
CheckAreaExiting();
|
||||
m_act1state->PlaceActors();
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
@@ -318,7 +318,7 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
break;
|
||||
case Act1State::c_floor2:
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_Floor2, NULL);
|
||||
m_act1state->m_unk0x01e = TRUE;
|
||||
m_act1state->m_playingFloor2Animation = TRUE;
|
||||
break;
|
||||
case Act1State::c_floor3:
|
||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_Elev3_2_Ride, NULL);
|
||||
@@ -529,7 +529,7 @@ MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
// FUNCTION: BETA10 0x10034158
|
||||
void Isle::Enable(MxBool p_enable)
|
||||
{
|
||||
if ((MxBool) m_set0xd0.empty() == p_enable) {
|
||||
if ((MxBool) m_disabledObjects.empty() == p_enable) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
actor->SetActorState(LegoPathActor::c_initial);
|
||||
}
|
||||
else {
|
||||
FUN_10032620();
|
||||
CheckAreaExiting();
|
||||
}
|
||||
|
||||
switch (GameState()->m_currentArea) {
|
||||
@@ -858,7 +858,7 @@ void Isle::Enable(MxBool p_enable)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10032620
|
||||
void Isle::FUN_10032620()
|
||||
void Isle::CheckAreaExiting()
|
||||
{
|
||||
VideoManager()->Get3DManager()->SetFrustrum(90.0, 0.1, 250.0);
|
||||
|
||||
@@ -907,19 +907,29 @@ MxLong Isle::HandleTransitionEnd()
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
break;
|
||||
case LegoGameState::e_elevride:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide infocen");
|
||||
FUN_10032d30(IsleScript::c_ElevRide_Background_Bitmap, JukeboxScript::c_Elevator_Music, "LCAMZI1,90", FALSE);
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevRide_Background_Bitmap,
|
||||
JukeboxScript::c_Elevator_Music,
|
||||
"LCAMZI1,90",
|
||||
FALSE
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_elevride2:
|
||||
FUN_10032d30(IsleScript::c_ElevRide_Background_Bitmap, JukeboxScript::c_Elevator_Music, "LCAMZI2,90", FALSE);
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevRide_Background_Bitmap,
|
||||
JukeboxScript::c_Elevator_Music,
|
||||
"LCAMZI2,90",
|
||||
FALSE
|
||||
);
|
||||
|
||||
if (m_destLocation == LegoGameState::e_undefined) {
|
||||
((MxStillPresenter*) Find(m_atomId, IsleScript::c_Meter3_Bitmap))->Enable(TRUE);
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_elevopen:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevOpen_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIS,90",
|
||||
@@ -927,7 +937,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_seaview:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_SeaView_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIE,90",
|
||||
@@ -935,7 +945,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_observe:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_Observe_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIW,90",
|
||||
@@ -943,7 +953,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_elevdown:
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_ElevDown_Background_Bitmap,
|
||||
JukeboxScript::c_InfoCenter_3rd_Floor_Music,
|
||||
"LCAMZIN,90",
|
||||
@@ -951,9 +961,9 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_garadoor:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide Gas");
|
||||
FUN_10032d30(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
|
||||
TransitionToOverlay(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
|
||||
break;
|
||||
case LegoGameState::e_garageExited:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -976,9 +986,9 @@ MxLong Isle::HandleTransitionEnd()
|
||||
SetIsWorldActive(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_polidoor:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
VariableTable()->SetVariable("VISIBILITY", "Hide Policsta");
|
||||
FUN_10032d30(
|
||||
TransitionToOverlay(
|
||||
IsleScript::c_PoliDoor_Background_Bitmap,
|
||||
JukeboxScript::c_PoliceStation_Music,
|
||||
"LCAMZP1,90",
|
||||
@@ -986,64 +996,69 @@ MxLong Isle::HandleTransitionEnd()
|
||||
);
|
||||
break;
|
||||
case LegoGameState::e_bike:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(IsleScript::c_BikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_bike->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_dunecar:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(IsleScript::c_DuneCarFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_dunebuggy->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_motocycle:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_motocycle->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_copter:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(IsleScript::c_HelicopterDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
break;
|
||||
case LegoGameState::e_skateboard:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_skateboard->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_ambulance:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
m_act1state->m_state = Act1State::e_ambulance;
|
||||
FUN_10032d30(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_AmbulanceFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_ambulance->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_towtrack:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
m_act1state->m_state = Act1State::e_towtrack;
|
||||
FUN_10032d30(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
TransitionToOverlay(IsleScript::c_TowFuelMeter, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_towtrack->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_jetski:
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
FUN_10032d30((IsleScript::Script) m_jetski->GetUnknown0x160(), JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
TransitionToOverlay(
|
||||
(IsleScript::Script) m_jetski->GetJetskiDashboardStreamId(),
|
||||
JukeboxScript::c_MusicTheme1,
|
||||
NULL,
|
||||
TRUE
|
||||
);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
if (!m_act1state->m_switchedToArea) {
|
||||
m_jetski->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
@@ -1056,14 +1071,14 @@ MxLong Isle::HandleTransitionEnd()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10032d30
|
||||
void Isle::FUN_10032d30(
|
||||
void Isle::TransitionToOverlay(
|
||||
IsleScript::Script p_script,
|
||||
JukeboxScript::Script p_music,
|
||||
const char* p_cameraLocation,
|
||||
MxBool p_und
|
||||
MxBool p_setCamera
|
||||
)
|
||||
{
|
||||
if (m_act1state->m_unk0x01f) {
|
||||
if (m_act1state->m_switchedToArea) {
|
||||
MxPresenter* presenter = (MxPresenter*) Find(m_atomId, p_script);
|
||||
|
||||
if (presenter != NULL && presenter->GetCurrentTickleState() == MxPresenter::e_repeating) {
|
||||
@@ -1071,7 +1086,7 @@ void Isle::FUN_10032d30(
|
||||
PlayMusic(p_music);
|
||||
}
|
||||
|
||||
if (p_und) {
|
||||
if (p_setCamera) {
|
||||
InputManager()->SetCamera(m_cameraController);
|
||||
}
|
||||
else {
|
||||
@@ -1085,7 +1100,7 @@ void Isle::FUN_10032d30(
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
SetAppCursor(e_cursorArrow);
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
m_act1state->m_unk0x01f = FALSE;
|
||||
m_act1state->m_switchedToArea = FALSE;
|
||||
}
|
||||
else {
|
||||
NotificationManager()->Send(this, MxNotificationParam(c_notificationTransitioned, NULL));
|
||||
@@ -1095,7 +1110,7 @@ void Isle::FUN_10032d30(
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
GameState()->StopArea(LegoGameState::e_previousArea);
|
||||
NotificationManager()->Send(this, MxNotificationParam(c_notificationTransitioned, NULL));
|
||||
m_act1state->m_unk0x01f = TRUE;
|
||||
m_act1state->m_switchedToArea = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1143,7 +1158,7 @@ void Isle::Add(MxCore* p_object)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033050
|
||||
void Isle::VTable0x6c(LegoPathActor* p_actor)
|
||||
void Isle::RemoveVehicle(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoWorld::Remove(p_actor);
|
||||
|
||||
@@ -1197,7 +1212,7 @@ MxBool Isle::Escape()
|
||||
case Act1State::e_pizza:
|
||||
if (UserActor() != NULL) {
|
||||
m_pizza->StopActions();
|
||||
m_pizza->FUN_100382b0();
|
||||
m_pizza->Reset();
|
||||
}
|
||||
break;
|
||||
case Act1State::e_towtrack:
|
||||
@@ -1214,9 +1229,9 @@ MxBool Isle::Escape()
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_act1state->m_unk0x01e == TRUE) {
|
||||
if (m_act1state->m_playingFloor2Animation == TRUE) {
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_Floor2, NULL);
|
||||
m_act1state->m_unk0x01e = FALSE;
|
||||
m_act1state->m_playingFloor2Animation = FALSE;
|
||||
}
|
||||
|
||||
m_act1state->m_elevFloor = Act1State::c_floor1;
|
||||
@@ -1245,7 +1260,7 @@ MxBool Isle::Escape()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10033350
|
||||
void Isle::FUN_10033350()
|
||||
void Isle::SwitchToInfocenter()
|
||||
{
|
||||
if (m_act1state->m_state == Act1State::e_ambulance) {
|
||||
if (UserActor() != NULL && !UserActor()->IsA("Ambulance")) {
|
||||
@@ -1264,7 +1279,7 @@ void Isle::FUN_10033350()
|
||||
if (m_act1state->m_state == Act1State::e_pizza) {
|
||||
if (UserActor() != NULL) {
|
||||
m_pizza->StopActions();
|
||||
m_pizza->FUN_100382b0();
|
||||
m_pizza->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1294,18 +1309,18 @@ Act1State::Act1State()
|
||||
{
|
||||
m_elevFloor = Act1State::c_floor1;
|
||||
m_state = Act1State::e_initial;
|
||||
m_unk0x01e = FALSE;
|
||||
m_playingFloor2Animation = FALSE;
|
||||
m_cptClickDialogue = Playlist((MxU32*) g_cptClickDialogue, sizeOfArray(g_cptClickDialogue), Playlist::e_loop);
|
||||
m_unk0x01f = FALSE;
|
||||
m_switchedToArea = FALSE;
|
||||
m_planeActive = FALSE;
|
||||
m_currentCptClickDialogue = IsleScript::c_noneIsle;
|
||||
m_unk0x022 = FALSE;
|
||||
m_playedExitExplanation = FALSE;
|
||||
m_helicopterWindshield = NULL;
|
||||
m_helicopterJetLeft = NULL;
|
||||
m_helicopterJetRight = NULL;
|
||||
m_helicopter = NULL;
|
||||
m_jetskiFront = NULL;
|
||||
m_unk0x021 = 1;
|
||||
m_spawnInInfocenter = 1;
|
||||
m_jetskiWindshield = NULL;
|
||||
m_jetski = NULL;
|
||||
m_dunebuggyFront = NULL;
|
||||
@@ -1404,7 +1419,7 @@ MxResult Act1State::Serialize(LegoStorage* p_storage)
|
||||
}
|
||||
|
||||
p_storage->WriteS16(m_cptClickDialogue.m_nextIndex);
|
||||
p_storage->WriteU8(m_unk0x022);
|
||||
p_storage->WriteU8(m_playedExitExplanation);
|
||||
}
|
||||
else if (p_storage->IsReadMode()) {
|
||||
if (strcmp(m_helicopterPlane.m_name.GetData(), "")) {
|
||||
@@ -1452,7 +1467,7 @@ MxResult Act1State::Serialize(LegoStorage* p_storage)
|
||||
}
|
||||
|
||||
p_storage->ReadS16(m_cptClickDialogue.m_nextIndex);
|
||||
p_storage->ReadU8(m_unk0x022);
|
||||
p_storage->ReadU8(m_playedExitExplanation);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
@@ -1485,7 +1500,7 @@ MxBool Act1State::Reset()
|
||||
m_motocyclePlane.m_name = "";
|
||||
m_bikePlane.m_name = "";
|
||||
m_skateboardPlane.m_name = "";
|
||||
m_unk0x022 = FALSE;
|
||||
m_playedExitExplanation = FALSE;
|
||||
|
||||
m_helicopterPlane.m_name = "";
|
||||
if (m_helicopterWindshield) {
|
||||
@@ -1572,7 +1587,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_helicopter->UpdatePlane(m_helicopterPlane);
|
||||
m_helicopter = isle->m_helicopter;
|
||||
isle->RemoveActor(m_helicopter);
|
||||
isle->VTable0x6c(m_helicopter);
|
||||
isle->RemoveVehicle(m_helicopter);
|
||||
m_helicopter->SetBoundary(NULL);
|
||||
m_helicopter->SetController(NULL);
|
||||
}
|
||||
@@ -1581,7 +1596,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_jetski->UpdatePlane(m_jetskiPlane);
|
||||
m_jetski = isle->m_jetski;
|
||||
isle->RemoveActor(m_jetski);
|
||||
isle->VTable0x6c(m_jetski);
|
||||
isle->RemoveVehicle(m_jetski);
|
||||
m_jetski->SetBoundary(NULL);
|
||||
m_jetski->SetController(NULL);
|
||||
}
|
||||
@@ -1590,7 +1605,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_dunebuggy->UpdatePlane(m_dunebuggyPlane);
|
||||
m_dunebuggy = isle->m_dunebuggy;
|
||||
isle->RemoveActor(m_dunebuggy);
|
||||
isle->VTable0x6c(m_dunebuggy);
|
||||
isle->RemoveVehicle(m_dunebuggy);
|
||||
m_dunebuggy->SetBoundary(NULL);
|
||||
m_dunebuggy->SetController(NULL);
|
||||
}
|
||||
@@ -1599,7 +1614,7 @@ void Act1State::RemoveActors()
|
||||
isle->m_racecar->UpdatePlane(m_racecarPlane);
|
||||
m_racecar = isle->m_racecar;
|
||||
isle->RemoveActor(m_racecar);
|
||||
isle->VTable0x6c(m_racecar);
|
||||
isle->RemoveVehicle(m_racecar);
|
||||
m_racecar->SetBoundary(NULL);
|
||||
m_racecar->SetController(NULL);
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@ DECOMP_SIZE_ASSERT(LegoAct2, 0x1154)
|
||||
DECOMP_SIZE_ASSERT(LegoAct2State, 0x10)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f4474
|
||||
Act2mainScript::Script g_unk0x100f4474 = (Act2mainScript::Script) 0;
|
||||
Act2mainScript::Script g_bricksterSpeech = (Act2mainScript::Script) 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f43f0
|
||||
// GLOBAL: BETA10 0x101e14a8
|
||||
MxS32 g_unk0x100f43f0[] = {
|
||||
MxS32 g_animationsBricksterIsLoose[] = {
|
||||
Act2mainScript::c_tns030bd_RunAnim,
|
||||
Act2mainScript::c_tns030pg_RunAnim,
|
||||
Act2mainScript::c_tns030rd_RunAnim,
|
||||
@@ -49,7 +49,7 @@ MxS32 g_unk0x100f43f0[] = {
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f4410
|
||||
const LegoChar* g_unk0x100f4410[] = {"bd", "pg", "rd", "sy", "ro", "cl"};
|
||||
const LegoChar* g_charactersBricksterIsLoose[] = {"bd", "pg", "rd", "sy", "ro", "cl"};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f4428
|
||||
MxS32 g_unk0x100f4428[] = {
|
||||
@@ -74,17 +74,17 @@ const LegoChar* g_unk0x100f4458[] = {"papa", "nick", "laura", "cl", "pg", "rd",
|
||||
// FUNCTION: BETA10 0x1003a5a0
|
||||
LegoAct2::LegoAct2()
|
||||
{
|
||||
m_unk0x10c4 = 0;
|
||||
m_state = LegoAct2::e_initial;
|
||||
m_gameState = NULL;
|
||||
m_pepper = NULL;
|
||||
m_ambulance = NULL;
|
||||
m_ready = FALSE;
|
||||
m_unk0x1130 = 0;
|
||||
m_nextBrick = 0;
|
||||
m_unk0x10c1 = 0;
|
||||
m_removedBricks = 0;
|
||||
m_unk0x1138 = NULL;
|
||||
m_unk0x1140 = (Act2mainScript::Script) 0;
|
||||
m_unk0x1144 = (Act2mainScript::Script) 0;
|
||||
m_currentAction = (Act2mainScript::Script) 0;
|
||||
m_infomanDirecting = (Act2mainScript::Script) 0;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
m_music = JukeboxScript::c_MusicTheme1;
|
||||
m_siFile = "";
|
||||
@@ -127,7 +127,7 @@ MxResult LegoAct2::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
m_gameState = state;
|
||||
m_gameState->m_unk0x08 = 0;
|
||||
m_gameState->m_state = 0;
|
||||
|
||||
switch (GameState()->GetLoadedAct()) {
|
||||
case LegoGameState::e_act2:
|
||||
@@ -166,97 +166,97 @@ MxResult LegoAct2::Tickle()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
switch (m_unk0x10c4) {
|
||||
case 0:
|
||||
m_unk0x10c4 = 1;
|
||||
switch (m_state) {
|
||||
case LegoAct2::e_initial:
|
||||
m_state = LegoAct2::e_startSpeech;
|
||||
break;
|
||||
case 1:
|
||||
case LegoAct2::e_startSpeech:
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetActorState(LegoPathActor::c_disabled);
|
||||
|
||||
switch (rand() % 3) {
|
||||
case 0:
|
||||
g_unk0x100f4474 = Act2mainScript::c_tns002br_RunAnim;
|
||||
g_bricksterSpeech = Act2mainScript::c_tns002br_RunAnim;
|
||||
break;
|
||||
case 1:
|
||||
g_unk0x100f4474 = Act2mainScript::c_tns003br_RunAnim;
|
||||
g_bricksterSpeech = Act2mainScript::c_tns003br_RunAnim;
|
||||
break;
|
||||
case 2:
|
||||
g_unk0x100f4474 = Act2mainScript::c_tns004br_RunAnim;
|
||||
g_bricksterSpeech = Act2mainScript::c_tns004br_RunAnim;
|
||||
break;
|
||||
}
|
||||
|
||||
FUN_10052560(g_unk0x100f4474, TRUE, TRUE, NULL, NULL, NULL);
|
||||
m_unk0x10d0 = 0;
|
||||
m_unk0x10c4 = 2;
|
||||
StartAction(g_bricksterSpeech, TRUE, TRUE, NULL, NULL, NULL);
|
||||
m_timeSinceLastStage = 0;
|
||||
m_state = LegoAct2::e_holdingSpeech;
|
||||
break;
|
||||
case 2:
|
||||
if (g_unk0x100f4474) {
|
||||
if (AnimationManager()->FUN_10064ee0(g_unk0x100f4474)) {
|
||||
case LegoAct2::e_holdingSpeech:
|
||||
if (g_bricksterSpeech) {
|
||||
if (AnimationManager()->FUN_10064ee0(g_bricksterSpeech)) {
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
g_unk0x100f4474 = (Act2mainScript::Script) 0;
|
||||
g_bricksterSpeech = (Act2mainScript::Script) 0;
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x10d0 += 50;
|
||||
m_timeSinceLastStage += 50;
|
||||
break;
|
||||
case 3:
|
||||
case LegoAct2::e_startDescription:
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
m_unk0x10d0 = 0;
|
||||
m_unk0x10c4 = 4;
|
||||
FUN_10052560(Act2mainScript::c_tja009ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
m_timeSinceLastStage = 0;
|
||||
m_state = LegoAct2::e_explaining;
|
||||
StartAction(Act2mainScript::c_tja009ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
|
||||
AnimationManager()->EnableCamAnims(TRUE);
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
AnimationManager()->FUN_100604f0(g_unk0x100f43f0, sizeOfArray(g_unk0x100f43f0));
|
||||
AnimationManager()->FUN_10060480(g_unk0x100f4410, sizeOfArray(g_unk0x100f4410));
|
||||
AnimationManager()->FUN_100604f0(g_animationsBricksterIsLoose, sizeOfArray(g_animationsBricksterIsLoose));
|
||||
AnimationManager()->FUN_10060480(g_charactersBricksterIsLoose, sizeOfArray(g_charactersBricksterIsLoose));
|
||||
break;
|
||||
case 4:
|
||||
m_unk0x10d0 += 50;
|
||||
case LegoAct2::e_explaining:
|
||||
m_timeSinceLastStage += 50;
|
||||
break;
|
||||
case 5:
|
||||
m_unk0x10d0 += 50;
|
||||
case LegoAct2::e_goingToResidentialArea:
|
||||
m_timeSinceLastStage += 50;
|
||||
|
||||
if (m_unk0x10d0 == 20000) {
|
||||
if (m_timeSinceLastStage == 20000) {
|
||||
const MxFloat* pepperPosition = FindROI("pepper")->GetWorldPosition();
|
||||
MxFloat otherPoint[] = {-52.0f, 5.25f, -16.5f};
|
||||
|
||||
distance = DISTSQRD3(pepperPosition, otherPoint);
|
||||
|
||||
if (m_unk0x1144 == (Act2mainScript::Script) 0 && distance > 50.0f && pepperPosition[0] > -57.0f) {
|
||||
FUN_10052560(Act2mainScript::c_Avo906In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_unk0x1144 = Act2mainScript::c_Avo906In_PlayWav;
|
||||
if (m_infomanDirecting == (Act2mainScript::Script) 0 && distance > 50.0f && pepperPosition[0] > -57.0f) {
|
||||
StartAction(Act2mainScript::c_Avo906In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_infomanDirecting = Act2mainScript::c_Avo906In_PlayWav;
|
||||
}
|
||||
}
|
||||
else if (m_unk0x10d0 >= 90000 && m_unk0x10d0 % 90000 == 0 && m_unk0x1144 == (Act2mainScript::Script) 0) {
|
||||
FUN_10052560(Act2mainScript::c_Avo908In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_unk0x1144 = Act2mainScript::c_Avo908In_PlayWav;
|
||||
else if (m_timeSinceLastStage >= 90000 && m_timeSinceLastStage % 90000 == 0 && m_infomanDirecting == (Act2mainScript::Script) 0) {
|
||||
StartAction(Act2mainScript::c_Avo908In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_infomanDirecting = Act2mainScript::c_Avo908In_PlayWav;
|
||||
}
|
||||
|
||||
break;
|
||||
case 6:
|
||||
m_unk0x10d0 += 50;
|
||||
case LegoAct2::e_atResidentialArea:
|
||||
m_timeSinceLastStage += 50;
|
||||
break;
|
||||
case 9:
|
||||
m_unk0x10d0 += 50;
|
||||
case LegoAct2::e_droppingBrick:
|
||||
m_timeSinceLastStage += 50;
|
||||
|
||||
if (m_unk0x10d0 >= 200) {
|
||||
if (m_timeSinceLastStage >= 200) {
|
||||
if (m_nextBrick < 5) {
|
||||
m_unk0x10c4 = 7;
|
||||
m_state = LegoAct2::e_chase;
|
||||
}
|
||||
else {
|
||||
m_unk0x10c4 = 10;
|
||||
m_unk0x10d0 = 0;
|
||||
m_unk0x1138->FUN_10019520();
|
||||
m_state = LegoAct2::e_goingToHide;
|
||||
m_timeSinceLastStage = 0;
|
||||
m_unk0x1138->GoingToHide();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 10:
|
||||
m_unk0x10d0 += 50;
|
||||
case LegoAct2::e_goingToHide:
|
||||
m_timeSinceLastStage += 50;
|
||||
break;
|
||||
case 11:
|
||||
case LegoAct2::e_hidden:
|
||||
break;
|
||||
case 12:
|
||||
case LegoAct2::e_distributeRemainingBricks:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -294,12 +294,12 @@ MxLong LegoAct2::Notify(MxParam& p_param)
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
case c_notificationType22:
|
||||
case c_notificationAct2Brick:
|
||||
SoundManager()->GetCacheSoundManager()->Play("28bng", NULL, FALSE);
|
||||
|
||||
m_unk0x10c1++;
|
||||
if (m_unk0x10c1 == 10 && m_unk0x10c4 == 13) {
|
||||
m_unk0x10c4 = 14;
|
||||
m_removedBricks++;
|
||||
if (m_removedBricks == 10 && m_state == LegoAct2::e_brickHunt) {
|
||||
m_state = LegoAct2::e_allPiecesCollected;
|
||||
|
||||
LegoEntity* entity = (LegoEntity*) param.GetSender();
|
||||
|
||||
@@ -326,10 +326,10 @@ MxLong LegoAct2::Notify(MxParam& p_param)
|
||||
|
||||
Mx3DPointFloat locald4(local2world[2]);
|
||||
Mx3DPointFloat localc0(local2world[1]);
|
||||
FUN_10052560(Act2mainScript::c_tns051in_RunAnim, TRUE, TRUE, &locala4, &locald4, NULL);
|
||||
StartAction(Act2mainScript::c_tns051in_RunAnim, TRUE, TRUE, &locala4, &locald4, NULL);
|
||||
|
||||
m_unk0x10c4 = 14;
|
||||
m_unk0x10d0 = 0;
|
||||
m_state = LegoAct2::e_allPiecesCollected;
|
||||
m_timeSinceLastStage = 0;
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetActorState(LegoPathActor::c_disabled);
|
||||
}
|
||||
break;
|
||||
@@ -348,27 +348,27 @@ MxLong LegoAct2::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
if (m_gameState->m_enabled && p_param.GetAction() != NULL) {
|
||||
MxU32 objectId = p_param.GetAction()->GetObjectId();
|
||||
|
||||
if (m_unk0x10c4 == 5 && m_unk0x1144 == objectId) {
|
||||
m_unk0x1144 = (Act2mainScript::Script) 0;
|
||||
if (m_state == LegoAct2::e_goingToResidentialArea && m_infomanDirecting == objectId) {
|
||||
m_infomanDirecting = (Act2mainScript::Script) 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m_unk0x1140 != objectId) {
|
||||
if (m_currentAction != objectId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
m_unk0x1140 = (Act2mainScript::Script) 0;
|
||||
m_currentAction = (Act2mainScript::Script) 0;
|
||||
|
||||
switch (m_unk0x10c4) {
|
||||
case 2:
|
||||
m_unk0x10c4 = 3;
|
||||
switch (m_state) {
|
||||
case LegoAct2::e_holdingSpeech:
|
||||
m_state = LegoAct2::e_startDescription;
|
||||
break;
|
||||
case 4:
|
||||
FUN_10051960();
|
||||
m_unk0x10c4 = 5;
|
||||
m_unk0x10d0 = 0;
|
||||
case LegoAct2::e_explaining:
|
||||
HideMaPaInfo();
|
||||
m_state = LegoAct2::e_goingToResidentialArea;
|
||||
m_timeSinceLastStage = 0;
|
||||
break;
|
||||
case 6: {
|
||||
case LegoAct2::e_atResidentialArea: {
|
||||
LegoROI* roi;
|
||||
|
||||
roi = FindROI("nick");
|
||||
@@ -400,24 +400,24 @@ MxLong LegoAct2::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
roi->SetVisibility(FALSE);
|
||||
|
||||
VariableTable()->SetVariable("ACTOR_01", "brickstr");
|
||||
FUN_10052800();
|
||||
m_unk0x10c4 = 7;
|
||||
InitializeShooting();
|
||||
m_state = LegoAct2::e_chase;
|
||||
PlayMusic(JukeboxScript::c_BrickstrChase);
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
case LegoAct2::e_hidden:
|
||||
m_bricks[m_nextBrick - 1].Mute(TRUE);
|
||||
m_unk0x10c4 = 12;
|
||||
m_unk0x10d0 = 0;
|
||||
m_state = LegoAct2::e_distributeRemainingBricks;
|
||||
m_timeSinceLastStage = 0;
|
||||
|
||||
FUN_10052560(Act2mainScript::c_tra045la_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_tra045la_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetActorState(LegoPathActor::c_disabled);
|
||||
AnimationManager()->EnableCamAnims(TRUE);
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
AnimationManager()->FUN_100604f0(g_unk0x100f4428, sizeOfArray(g_unk0x100f4428));
|
||||
AnimationManager()->FUN_10060480(g_unk0x100f4458, sizeOfArray(g_unk0x100f4458));
|
||||
break;
|
||||
case 12: {
|
||||
case LegoAct2::e_distributeRemainingBricks: {
|
||||
LegoROI* roi;
|
||||
|
||||
roi = FindROI("nick");
|
||||
@@ -441,13 +441,13 @@ MxLong LegoAct2::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
}
|
||||
|
||||
m_bricks[m_nextBrick - 1].Mute(FALSE);
|
||||
m_unk0x10c4 = 13;
|
||||
m_state = LegoAct2::e_brickHunt;
|
||||
SpawnBricks();
|
||||
PlayMusic(JukeboxScript::c_BrickHunt);
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetActorState(LegoPathActor::c_initial);
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
case LegoAct2::e_allPiecesCollected:
|
||||
for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_bricks); i++) {
|
||||
m_bricks[i].Remove();
|
||||
}
|
||||
@@ -522,7 +522,7 @@ void LegoAct2::ReadyWorld()
|
||||
// FUNCTION: BETA10 0x1003bb2d
|
||||
void LegoAct2::Enable(MxBool p_enable)
|
||||
{
|
||||
if ((MxBool) m_set0xd0.empty() == p_enable) {
|
||||
if ((MxBool) m_disabledObjects.empty() == p_enable) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ void LegoAct2::Enable(MxBool p_enable)
|
||||
GameState()->SetActor(LegoActor::c_pepper);
|
||||
m_pepper = FindROI("pepper");
|
||||
|
||||
((IslePathActor*) m_pepper->GetEntity())->VTable0xec(m_unk0x10dc, m_unk0x1124, TRUE);
|
||||
((IslePathActor*) m_pepper->GetEntity())->VTable0xec(m_transformOnDisable, m_boundaryOnDisable, TRUE);
|
||||
|
||||
if (GameState()->m_previousArea == LegoGameState::e_infomain) {
|
||||
GameState()->StopArea(LegoGameState::e_infomain);
|
||||
@@ -542,26 +542,27 @@ void LegoAct2::Enable(MxBool p_enable)
|
||||
|
||||
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
|
||||
if (m_unk0x10c4 != 6 && m_unk0x10c4 != 12) {
|
||||
if (m_state != LegoAct2::e_atResidentialArea && m_state != LegoAct2::e_distributeRemainingBricks) {
|
||||
PlayMusic(m_music);
|
||||
}
|
||||
|
||||
if (m_unk0x10c4 == 10 && m_nextBrick == 6 && m_bricks[5].GetROI() != NULL) {
|
||||
if (m_state == LegoAct2::e_goingToHide && m_nextBrick == 6 && m_bricks[5].GetROI() != NULL) {
|
||||
m_bricks[5].PlayWhistleSound();
|
||||
}
|
||||
else if (m_unk0x10c4 == 13) {
|
||||
else if (m_state == LegoAct2::e_brickHunt) {
|
||||
InitBricks();
|
||||
}
|
||||
|
||||
TickleManager()->RegisterClient(this, 20);
|
||||
SetAppCursor(e_cursorArrow);
|
||||
|
||||
if (m_unk0x10c4 == 2 || m_unk0x10c4 == 4 || m_unk0x10c4 == 6 || m_unk0x10c4 == 11 || m_unk0x10c4 == 12 ||
|
||||
m_unk0x10c4 == 14) {
|
||||
if (m_state == LegoAct2::e_holdingSpeech || m_state == LegoAct2::e_explaining ||
|
||||
m_state == LegoAct2::e_atResidentialArea || m_state == LegoAct2::e_hidden ||
|
||||
m_state == LegoAct2::e_distributeRemainingBricks || m_state == LegoAct2::e_allPiecesCollected) {
|
||||
MxDSAction action;
|
||||
MxEndActionNotificationParam param(c_notificationEndAction, NULL, &action, FALSE);
|
||||
|
||||
m_unk0x1140 = (Act2mainScript::Script) 0;
|
||||
m_currentAction = (Act2mainScript::Script) 0;
|
||||
action.SetObjectId(0);
|
||||
HandleEndAction(param);
|
||||
}
|
||||
@@ -569,21 +570,21 @@ void LegoAct2::Enable(MxBool p_enable)
|
||||
GameState()->m_isDirty = TRUE;
|
||||
}
|
||||
else {
|
||||
m_unk0x10dc = m_pepper->GetLocal2World();
|
||||
m_unk0x1124 = ((LegoPathActor*) m_pepper->GetEntity())->GetBoundary();
|
||||
m_transformOnDisable = m_pepper->GetLocal2World();
|
||||
m_boundaryOnDisable = ((LegoPathActor*) m_pepper->GetEntity())->GetBoundary();
|
||||
|
||||
FUN_10051900();
|
||||
BackgroundAudioManager()->Stop();
|
||||
UninitBricks();
|
||||
DeleteObjects(&m_atomId, Act2mainScript::c_VOhead0_PlayWav, Act2mainScript::c_VOhide_PlayWav);
|
||||
|
||||
if (m_unk0x1144 != (Act2mainScript::Script) 0) {
|
||||
if (m_infomanDirecting != (Act2mainScript::Script) 0) {
|
||||
MxDSAction action;
|
||||
action.SetAtomId(m_atomId);
|
||||
action.SetUnknown24(-2);
|
||||
action.SetObjectId(m_unk0x1144);
|
||||
action.SetObjectId(m_infomanDirecting);
|
||||
DeleteObject(action);
|
||||
m_unk0x1144 = (Act2mainScript::Script) 0;
|
||||
m_infomanDirecting = (Act2mainScript::Script) 0;
|
||||
}
|
||||
|
||||
TickleManager()->UnregisterClient(this);
|
||||
@@ -594,46 +595,46 @@ void LegoAct2::Enable(MxBool p_enable)
|
||||
// FUNCTION: BETA10 0x1003bb72
|
||||
MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x10c4 == 5 && p_param.GetData() == 0x32) {
|
||||
if (m_state == LegoAct2::e_goingToResidentialArea && p_param.GetData() == 0x32) {
|
||||
LegoPathActor* actor = (LegoPathActor*) m_pepper->GetEntity();
|
||||
actor->SetActorState(LegoPathActor::c_disabled);
|
||||
actor->SetWorldSpeed(0.0f);
|
||||
FUN_10051900();
|
||||
|
||||
if (m_unk0x10d0 < 90000) {
|
||||
FUN_10052560(Act2mainScript::c_tra031ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
if (m_timeSinceLastStage < 90000) {
|
||||
StartAction(Act2mainScript::c_tra031ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_tra032ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_tra032ni_RunAnim, TRUE, TRUE, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
m_unk0x112c = 50;
|
||||
m_unk0x10c4 = 6;
|
||||
m_unk0x10d0 = 0;
|
||||
m_state = LegoAct2::e_atResidentialArea;
|
||||
m_timeSinceLastStage = 0;
|
||||
}
|
||||
else if (m_unk0x10c4 == 5 && p_param.GetData() == 0x2a) {
|
||||
if (m_unk0x1144 == (Act2mainScript::Script) 0) {
|
||||
FUN_10052560(Act2mainScript::c_Avo907In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_unk0x1144 = Act2mainScript::c_Avo907In_PlayWav;
|
||||
else if (m_state == LegoAct2::e_goingToResidentialArea && p_param.GetData() == 0x2a) {
|
||||
if (m_infomanDirecting == (Act2mainScript::Script) 0) {
|
||||
StartAction(Act2mainScript::c_Avo907In_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
|
||||
m_infomanDirecting = Act2mainScript::c_Avo907In_PlayWav;
|
||||
}
|
||||
}
|
||||
else if (m_unk0x10c4 == 5) {
|
||||
FUN_100521f0(p_param.GetData());
|
||||
else if (m_state == LegoAct2::e_goingToResidentialArea) {
|
||||
CheckBricksterIsLoose(p_param.GetData());
|
||||
}
|
||||
else if (m_unk0x10c4 == 7) {
|
||||
FUN_10051fa0(p_param.GetData());
|
||||
else if (m_state == LegoAct2::e_chase) {
|
||||
CheckBricksterDestroying(p_param.GetData());
|
||||
}
|
||||
else if (m_unk0x10c4 == 10 && p_param.GetData() == 0x165) {
|
||||
else if (m_state == LegoAct2::e_goingToHide && p_param.GetData() == 0x165) {
|
||||
((LegoPathActor*) m_pepper->GetEntity())->SetActorState(LegoPathActor::c_disabled);
|
||||
|
||||
if (FUN_10052560(Act2mainScript::c_VOhide_PlayWav, FALSE, TRUE, NULL, NULL, NULL) == SUCCESS) {
|
||||
m_unk0x1140 = Act2mainScript::c_VOhide_PlayWav;
|
||||
if (StartAction(Act2mainScript::c_VOhide_PlayWav, FALSE, TRUE, NULL, NULL, NULL) == SUCCESS) {
|
||||
m_currentAction = Act2mainScript::c_VOhide_PlayWav;
|
||||
}
|
||||
|
||||
m_unk0x1138->FUN_10019560();
|
||||
m_unk0x1138->Hide();
|
||||
|
||||
m_unk0x10c4 = 11;
|
||||
m_unk0x10d0 = 0;
|
||||
m_state = LegoAct2::e_hidden;
|
||||
m_timeSinceLastStage = 0;
|
||||
|
||||
if (m_nextBrick < 6) {
|
||||
m_bricks[m_nextBrick].Create(m_nextBrick);
|
||||
@@ -647,7 +648,7 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
local2world[3][1] += 1.5;
|
||||
local2world2[3][1] -= 0.1;
|
||||
|
||||
m_bricks[m_nextBrick - 1].FUN_1007a670(local2world, local2world2, boundary);
|
||||
m_bricks[m_nextBrick - 1].Place(local2world, local2world2, boundary);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -655,7 +656,7 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x100516b0
|
||||
// FUNCTION: BETA10 0x1003bcbc
|
||||
MxResult LegoAct2::FUN_100516b0()
|
||||
MxResult LegoAct2::CreateBrick()
|
||||
{
|
||||
if (m_nextBrick > 4) {
|
||||
return FAILURE;
|
||||
@@ -671,10 +672,10 @@ MxResult LegoAct2::FUN_100516b0()
|
||||
local2world[3][1] += 1.3;
|
||||
local2world2[3][1] -= 0.1;
|
||||
|
||||
brick.FUN_1007a670(local2world, local2world2, boundary);
|
||||
brick.Place(local2world, local2world2, boundary);
|
||||
m_nextBrick++;
|
||||
m_unk0x10c4 = 9;
|
||||
m_unk0x10d0 = 0;
|
||||
m_state = LegoAct2::e_droppingBrick;
|
||||
m_timeSinceLastStage = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -721,7 +722,7 @@ void LegoAct2::FUN_10051900()
|
||||
|
||||
// FUNCTION: LEGO1 0x10051960
|
||||
// FUNCTION: BETA10 0x1003bf2c
|
||||
void LegoAct2::FUN_10051960()
|
||||
void LegoAct2::HideMaPaInfo()
|
||||
{
|
||||
LegoROI* roi;
|
||||
|
||||
@@ -933,98 +934,98 @@ MxResult LegoAct2::BadEnding()
|
||||
LegoPathActor* actor = m_unk0x1138;
|
||||
actor->SetActorState(LegoPathActor::c_disabled);
|
||||
|
||||
m_gameState->SetUnknown0x08(104);
|
||||
m_gameState->SetState(LegoAct2State::c_badEnding);
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
||||
MxTrace("Bad End of Act2\n");
|
||||
m_unk0x10c4 = 14;
|
||||
m_state = LegoAct2::e_allPiecesCollected;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10051fa0
|
||||
// FUNCTION: BETA10 0x10013fd3
|
||||
void LegoAct2::FUN_10051fa0(MxS32 p_param1)
|
||||
void LegoAct2::CheckBricksterDestroying(MxS32 p_pathData)
|
||||
{
|
||||
MxU8 randN = rand() / (RAND_MAX / 3);
|
||||
randN++;
|
||||
|
||||
switch (p_param1) {
|
||||
switch (p_pathData) {
|
||||
case 2:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx50bu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx50bu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx51bu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx51bu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx29nu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx29nu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx30nu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx30nu_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx33na_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx33na_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx34na_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx34na_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx46cl_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx46cl_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx48cl_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx48cl_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 23:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx58va_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx58va_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx60va_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx60va_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
case 25:
|
||||
FUN_10052560(Act2mainScript::c_snsx31sh_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx31sh_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
break;
|
||||
case 26:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx52sn_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx52sn_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx53sn_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx53sn_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 34:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx15la_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx15la_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx16la_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx16la_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 36:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx10ni_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx10ni_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx11ni_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx11ni_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 38:
|
||||
case 42:
|
||||
if (randN == 1) {
|
||||
FUN_10052560(Act2mainScript::c_snsx03ma_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx03ma_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
FUN_10052560(Act2mainScript::c_snsx04ma_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
StartAction(Act2mainScript::c_snsx04ma_RunAnim, TRUE, FALSE, NULL, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1032,44 +1033,44 @@ void LegoAct2::FUN_10051fa0(MxS32 p_param1)
|
||||
|
||||
// FUNCTION: LEGO1 0x100521f0
|
||||
// FUNCTION: BETA10 0x100142f1
|
||||
void LegoAct2::FUN_100521f0(MxS32 p_param1)
|
||||
void LegoAct2::CheckBricksterIsLoose(MxS32 p_pathData)
|
||||
{
|
||||
Act2mainScript::Script objectId = (Act2mainScript::Script) 0;
|
||||
Mx3DPointFloat vec;
|
||||
Mx3DPointFloat actorPosition;
|
||||
|
||||
switch (p_param1) {
|
||||
switch (p_pathData) {
|
||||
case 0x02: {
|
||||
vec = Mx3DPointFloat(-9.1f, 0.0f, -16.5f);
|
||||
actorPosition = Mx3DPointFloat(-9.1f, 0.0f, -16.5f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "bd");
|
||||
objectId = Act2mainScript::c_tns030bd_RunAnim;
|
||||
break;
|
||||
}
|
||||
case 0x2a: {
|
||||
vec = Mx3DPointFloat(-9.67f, 0.0f, -44.3f);
|
||||
actorPosition = Mx3DPointFloat(-9.67f, 0.0f, -44.3f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "rd");
|
||||
objectId = Act2mainScript::c_tns030rd_RunAnim;
|
||||
break;
|
||||
}
|
||||
case 0x133: {
|
||||
vec = Mx3DPointFloat(25.75f, 0.0f, -13.0f);
|
||||
actorPosition = Mx3DPointFloat(25.75f, 0.0f, -13.0f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "pg");
|
||||
objectId = Act2mainScript::c_tns030pg_RunAnim;
|
||||
break;
|
||||
}
|
||||
case 0x134: {
|
||||
vec = Mx3DPointFloat(43.63f, 0.0f, -46.33f);
|
||||
actorPosition = Mx3DPointFloat(43.63f, 0.0f, -46.33f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "sy");
|
||||
objectId = Act2mainScript::c_tns030sy_RunAnim;
|
||||
break;
|
||||
}
|
||||
case 0x135: {
|
||||
vec = Mx3DPointFloat(50.0f, 0.0f, -34.6f);
|
||||
actorPosition = Mx3DPointFloat(50.0f, 0.0f, -34.6f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "rd");
|
||||
objectId = Act2mainScript::c_tns030rd_RunAnim;
|
||||
break;
|
||||
}
|
||||
case 0x138: {
|
||||
vec = Mx3DPointFloat(-41.15f, 4.0f, 31.0f);
|
||||
actorPosition = Mx3DPointFloat(-41.15f, 4.0f, 31.0f);
|
||||
VariableTable()->SetVariable("ACTOR_01", "sy");
|
||||
objectId = Act2mainScript::c_tns030sy_RunAnim;
|
||||
break;
|
||||
@@ -1077,30 +1078,30 @@ void LegoAct2::FUN_100521f0(MxS32 p_param1)
|
||||
}
|
||||
|
||||
if (objectId != (Act2mainScript::Script) 0) {
|
||||
Mx3DPointFloat local30(vec);
|
||||
Mx3DPointFloat lookingAtPepper(actorPosition);
|
||||
Mx3DPointFloat position(m_pepper->GetWorldPosition());
|
||||
local30 -= position;
|
||||
Mx3DPointFloat local44 = local30;
|
||||
local30.Unitize();
|
||||
FUN_10052560(objectId, TRUE, TRUE, &vec, &local30, NULL);
|
||||
lookingAtPepper -= position;
|
||||
Mx3DPointFloat local44 = lookingAtPepper;
|
||||
lookingAtPepper.Unitize();
|
||||
StartAction(objectId, TRUE, TRUE, &actorPosition, &lookingAtPepper, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10052560
|
||||
// FUNCTION: BETA10 0x100145c6
|
||||
MxResult LegoAct2::FUN_10052560(
|
||||
MxResult LegoAct2::StartAction(
|
||||
Act2mainScript::Script p_objectId,
|
||||
MxBool p_param2,
|
||||
MxBool p_param3,
|
||||
MxBool p_isAnimation,
|
||||
MxBool p_ignoreCurrentAction,
|
||||
Mx3DPointFloat* p_location,
|
||||
Mx3DPointFloat* p_direction,
|
||||
Mx3DPointFloat* p_param6
|
||||
)
|
||||
{
|
||||
if (m_unk0x1140 == (Act2mainScript::Script) 0 || p_param3) {
|
||||
if (m_currentAction == (Act2mainScript::Script) 0 || p_ignoreCurrentAction) {
|
||||
assert(strlen(m_siFile));
|
||||
|
||||
if (!p_param2) {
|
||||
if (!p_isAnimation) {
|
||||
MxDSAction action;
|
||||
|
||||
action.SetObjectId(p_objectId);
|
||||
@@ -1188,7 +1189,7 @@ MxResult LegoAct2::FUN_10052560(
|
||||
}
|
||||
|
||||
if (result == SUCCESS) {
|
||||
m_unk0x1140 = p_objectId;
|
||||
m_currentAction = p_objectId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1199,7 @@ MxResult LegoAct2::FUN_10052560(
|
||||
|
||||
// FUNCTION: LEGO1 0x10052800
|
||||
// FUNCTION: BETA10 0x10014aa8
|
||||
MxResult LegoAct2::FUN_10052800()
|
||||
MxResult LegoAct2::InitializeShooting()
|
||||
{
|
||||
LegoPathActor* actor = m_unk0x1138;
|
||||
LegoLocomotionAnimPresenter* ap;
|
||||
@@ -1222,6 +1223,6 @@ MxResult LegoAct2::FUN_10052800()
|
||||
ap->FUN_1006d680(m_unk0x1138, -1.0f);
|
||||
|
||||
actor->SetWorldSpeed(0.0f);
|
||||
m_unk0x1138->FUN_10018980();
|
||||
m_unk0x1138->InitializeNextShot();
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -46,17 +46,17 @@ RegistrationBook::RegistrationBook() : m_registerDialogueTimer(0x80000000), m_un
|
||||
{
|
||||
memset(m_alphabet, 0, sizeof(m_alphabet));
|
||||
memset(m_name, 0, sizeof(m_name));
|
||||
m_unk0x280.m_cursorPos = 0;
|
||||
m_newName.m_cursorPos = 0;
|
||||
|
||||
memset(m_checkmark, 0, sizeof(m_checkmark));
|
||||
memset(&m_unk0x280, -1, sizeof(m_unk0x280) - 2);
|
||||
memset(&m_newName, -1, sizeof(m_newName) - 2);
|
||||
|
||||
m_unk0x2b8 = 0;
|
||||
m_vehiclesToPosition = 0;
|
||||
m_infocenterState = NULL;
|
||||
|
||||
NotificationManager()->Register(this);
|
||||
|
||||
m_unk0x2c1 = FALSE;
|
||||
m_awaitLoad = FALSE;
|
||||
m_checkboxHilite = NULL;
|
||||
m_checkboxSurface = NULL;
|
||||
m_checkboxNormal = NULL;
|
||||
@@ -152,9 +152,9 @@ MxLong RegistrationBook::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
|
||||
switch ((MxS32) p_param.GetAction()->GetObjectId()) {
|
||||
case RegbookScript::c_Textures:
|
||||
m_unk0x2c1 = FALSE;
|
||||
m_awaitLoad = FALSE;
|
||||
|
||||
if (m_unk0x2b8 == 0) {
|
||||
if (m_vehiclesToPosition == 0) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
@@ -186,37 +186,37 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
}
|
||||
}
|
||||
else if (key != VK_BACK && m_unk0x280.m_cursorPos < 7) {
|
||||
m_name[0][m_unk0x280.m_cursorPos] = m_alphabet[key - 'A']->Clone();
|
||||
else if (key != VK_BACK && m_newName.m_cursorPos < 7) {
|
||||
m_name[0][m_newName.m_cursorPos] = m_alphabet[key - 'A']->Clone();
|
||||
|
||||
if (m_name[0][m_unk0x280.m_cursorPos] != NULL) {
|
||||
if (m_name[0][m_newName.m_cursorPos] != NULL) {
|
||||
m_alphabet[key - 'A']->GetAction()->SetUnknown24(m_alphabet[key - 'A']->GetAction()->GetUnknown24() + 1);
|
||||
m_name[0][m_unk0x280.m_cursorPos]->Enable(TRUE);
|
||||
m_name[0][m_unk0x280.m_cursorPos]->SetTickleState(MxPresenter::e_repeating);
|
||||
m_name[0][m_unk0x280.m_cursorPos]->SetPosition(m_unk0x280.m_cursorPos * 23 + 343, 121);
|
||||
m_name[0][m_newName.m_cursorPos]->Enable(TRUE);
|
||||
m_name[0][m_newName.m_cursorPos]->SetTickleState(MxPresenter::e_repeating);
|
||||
m_name[0][m_newName.m_cursorPos]->SetPosition(m_newName.m_cursorPos * 23 + 343, 121);
|
||||
|
||||
if (m_unk0x280.m_cursorPos == 0) {
|
||||
if (m_newName.m_cursorPos == 0) {
|
||||
m_checkmark[0]->Enable(TRUE);
|
||||
}
|
||||
|
||||
m_unk0x280.m_letters[m_unk0x280.m_cursorPos] = key - 'A';
|
||||
m_unk0x280.m_cursorPos++;
|
||||
m_newName.m_letters[m_newName.m_cursorPos] = key - 'A';
|
||||
m_newName.m_cursorPos++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (key == VK_BACK && m_unk0x280.m_cursorPos > 0) {
|
||||
m_unk0x280.m_cursorPos--;
|
||||
if (key == VK_BACK && m_newName.m_cursorPos > 0) {
|
||||
m_newName.m_cursorPos--;
|
||||
|
||||
m_name[0][m_unk0x280.m_cursorPos]->Enable(FALSE);
|
||||
m_name[0][m_newName.m_cursorPos]->Enable(FALSE);
|
||||
|
||||
delete m_name[0][m_unk0x280.m_cursorPos];
|
||||
m_name[0][m_unk0x280.m_cursorPos] = NULL;
|
||||
delete m_name[0][m_newName.m_cursorPos];
|
||||
m_name[0][m_newName.m_cursorPos] = NULL;
|
||||
|
||||
if (m_unk0x280.m_cursorPos == 0) {
|
||||
if (m_newName.m_cursorPos == 0) {
|
||||
m_checkmark[0]->Enable(FALSE);
|
||||
}
|
||||
|
||||
m_unk0x280.m_letters[m_unk0x280.m_cursorPos] = -1;
|
||||
m_newName.m_letters[m_newName.m_cursorPos] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,10 +238,10 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
m_infocenterState->m_unk0x74 = 15;
|
||||
m_infocenterState->m_state = InfocenterState::e_backToInfoAct1;
|
||||
}
|
||||
else {
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_infocenterState->m_state = InfocenterState::e_notRegistered;
|
||||
}
|
||||
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
@@ -266,7 +266,7 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
||||
}
|
||||
}
|
||||
|
||||
FUN_100775c0(i);
|
||||
LoadSave(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,56 +275,57 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
||||
|
||||
// FUNCTION: LEGO1 0x100775c0
|
||||
// STUB: BETA10 0x100f32b2
|
||||
void RegistrationBook::FUN_100775c0(MxS16 p_playerIndex)
|
||||
void RegistrationBook::LoadSave(MxS16 p_checkMarkIndex)
|
||||
{
|
||||
if (m_infocenterState->HasRegistered()) {
|
||||
GameState()->Save(0);
|
||||
}
|
||||
|
||||
// The first checkmark searches for the name and is -1 if not found, while all other checkmarks start at 1
|
||||
// TODO: structure incorrect
|
||||
MxS16 player = p_playerIndex == 0 ? GameState()->FindPlayer(*(LegoGameState::Username*) &m_unk0x280.m_letters)
|
||||
: p_playerIndex - 1;
|
||||
MxS16 player = p_checkMarkIndex == 0 ? GameState()->FindPlayer(*(LegoGameState::Username*) &m_newName.m_letters)
|
||||
: p_checkMarkIndex - 1;
|
||||
|
||||
switch (player) {
|
||||
case 0:
|
||||
case 0: // Current save
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
GameState()->SwitchPlayer(0);
|
||||
WriteInfocenterLetters(1);
|
||||
FUN_100778c0();
|
||||
LoadVehicles();
|
||||
}
|
||||
break;
|
||||
case -1:
|
||||
case -1: // New save
|
||||
GameState()->Init();
|
||||
|
||||
PlayAction(RegbookScript::c_Textures);
|
||||
|
||||
m_unk0x2c1 = TRUE;
|
||||
m_awaitLoad = TRUE;
|
||||
|
||||
// TOOD: structure incorrect
|
||||
GameState()->AddPlayer(*(LegoGameState::Username*) &m_unk0x280.m_letters);
|
||||
GameState()->AddPlayer(*(LegoGameState::Username*) &m_newName.m_letters);
|
||||
GameState()->Save(0);
|
||||
|
||||
WriteInfocenterLetters(0);
|
||||
GameState()->SerializePlayersInfo(2);
|
||||
FUN_100778c0();
|
||||
GameState()->SerializePlayersInfo(LegoFile::c_write);
|
||||
LoadVehicles();
|
||||
break;
|
||||
default:
|
||||
GameState()->Init();
|
||||
|
||||
PlayAction(RegbookScript::c_Textures);
|
||||
|
||||
m_unk0x2c1 = TRUE;
|
||||
m_awaitLoad = TRUE;
|
||||
|
||||
GameState()->SwitchPlayer(player);
|
||||
|
||||
WriteInfocenterLetters(player + 1);
|
||||
GameState()->SerializePlayersInfo(2);
|
||||
FUN_100778c0();
|
||||
GameState()->SerializePlayersInfo(LegoFile::c_write);
|
||||
LoadVehicles();
|
||||
break;
|
||||
}
|
||||
|
||||
m_infocenterState->m_unk0x74 = 4;
|
||||
if (m_unk0x2b8 == 0 && !m_unk0x2c1) {
|
||||
m_infocenterState->m_state = InfocenterState::e_selectedSave;
|
||||
if (m_vehiclesToPosition == 0 && !m_awaitLoad) {
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
@@ -341,7 +342,7 @@ void RegistrationBook::WriteInfocenterLetters(MxS16 p_user)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100778c0
|
||||
void RegistrationBook::FUN_100778c0()
|
||||
void RegistrationBook::LoadVehicles()
|
||||
{
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
@@ -353,7 +354,7 @@ void RegistrationBook::FUN_100778c0()
|
||||
LegoPathStructNotificationParam(c_notificationPathStruct, NULL, 0, CopterScript::c_Helicopter_Actor)
|
||||
);
|
||||
|
||||
m_unk0x2b8++;
|
||||
m_vehiclesToPosition++;
|
||||
}
|
||||
|
||||
if (act1state->m_jetskiPlane.IsPresent()) {
|
||||
@@ -363,7 +364,7 @@ void RegistrationBook::FUN_100778c0()
|
||||
LegoPathStructNotificationParam(c_notificationPathStruct, NULL, 0, JetskiScript::c_Jetski_Actor)
|
||||
);
|
||||
|
||||
m_unk0x2b8++;
|
||||
m_vehiclesToPosition++;
|
||||
}
|
||||
|
||||
if (act1state->m_dunebuggyPlane.IsPresent()) {
|
||||
@@ -373,7 +374,7 @@ void RegistrationBook::FUN_100778c0()
|
||||
LegoPathStructNotificationParam(c_notificationPathStruct, NULL, 0, DunecarScript::c_DuneBugy_Actor)
|
||||
);
|
||||
|
||||
m_unk0x2b8++;
|
||||
m_vehiclesToPosition++;
|
||||
}
|
||||
|
||||
if (act1state->m_racecarPlane.IsPresent()) {
|
||||
@@ -383,10 +384,10 @@ void RegistrationBook::FUN_100778c0()
|
||||
LegoPathStructNotificationParam(c_notificationPathStruct, NULL, 0, RacecarScript::c_RaceCar_Actor)
|
||||
);
|
||||
|
||||
m_unk0x2b8++;
|
||||
m_vehiclesToPosition++;
|
||||
}
|
||||
|
||||
if (m_unk0x2b8 != 0) {
|
||||
if (m_vehiclesToPosition != 0) {
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
InputManager()->DisableInputProcessing();
|
||||
SetAppCursor(e_cursorBusy);
|
||||
@@ -593,10 +594,10 @@ MxLong RegistrationBook::HandlePathStruct(LegoPathStructNotificationParam& p_par
|
||||
else {
|
||||
RemoveActor(actor);
|
||||
Remove(actor);
|
||||
m_unk0x2b8--;
|
||||
m_vehiclesToPosition--;
|
||||
}
|
||||
|
||||
if (m_unk0x2b8 == 0 && !m_unk0x2c1) {
|
||||
if (m_vehiclesToPosition == 0 && !m_awaitLoad) {
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
}
|
||||
@@ -619,12 +620,12 @@ MxBool RegistrationBook::CreateSurface()
|
||||
}
|
||||
|
||||
if (presenter) {
|
||||
m_checkboxSurface = presenter->VTable0x78();
|
||||
m_checkboxSurface = presenter->GetSurface();
|
||||
}
|
||||
|
||||
presenter = (MxStillPresenter*) Find("MxStillPresenter", "CheckHiLite_Bitmap");
|
||||
if (presenter) {
|
||||
m_checkboxHilite = presenter->VTable0x78();
|
||||
m_checkboxHilite = presenter->GetSurface();
|
||||
}
|
||||
|
||||
if (m_checkboxSurface && m_checkboxHilite) {
|
||||
|
||||
@@ -12,6 +12,7 @@ LegoWEEdge::LegoWEEdge()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a590
|
||||
// FUNCTION: BETA10 0x10182530
|
||||
LegoWEEdge::~LegoWEEdge()
|
||||
{
|
||||
if (m_edges) {
|
||||
@@ -20,31 +21,52 @@ LegoWEEdge::~LegoWEEdge()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a5b0
|
||||
// FUNCTION: BETA10 0x10182577
|
||||
LegoS32 LegoWEEdge::LinkEdgesAndFaces()
|
||||
{
|
||||
assert(m_edges);
|
||||
assert(m_numEdges);
|
||||
|
||||
for (LegoS32 i = 0; i < m_numEdges; i++) {
|
||||
LegoOrientedEdge* e1 = m_edges[i];
|
||||
LegoOrientedEdge* e2 = (m_numEdges - i) == 1 ? m_edges[0] : m_edges[i + 1];
|
||||
LegoOrientedEdge* e2 = (m_numEdges - 1) == i ? m_edges[0] : m_edges[i + 1];
|
||||
|
||||
if (e2->m_pointA == e1->m_pointA) {
|
||||
assert(e1->m_faceA == NULL || e1->m_faceA == this);
|
||||
assert(e2->m_faceB == NULL || e2->m_faceB == this);
|
||||
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
|
||||
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
|
||||
e1->m_faceA = this;
|
||||
e2->m_faceB = this;
|
||||
e1->m_ccwA = e2;
|
||||
e2->m_cwB = e1;
|
||||
}
|
||||
else if (e2->m_pointB == e1->m_pointA) {
|
||||
assert(e1->m_faceA == NULL || e1->m_faceA == this);
|
||||
assert(e2->m_faceA == NULL || e2->m_faceA == this);
|
||||
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
|
||||
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
|
||||
e1->m_faceA = this;
|
||||
e2->m_faceA = this;
|
||||
e1->m_ccwA = e2;
|
||||
e2->m_cwA = e1;
|
||||
}
|
||||
else if (e1->m_pointB == e2->m_pointA) {
|
||||
assert(e1->m_faceB == NULL || e1->m_faceB == this);
|
||||
assert(e2->m_faceB == NULL || e2->m_faceB == this);
|
||||
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
|
||||
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
|
||||
e1->m_faceB = this;
|
||||
e2->m_faceB = this;
|
||||
e1->m_ccwB = e2;
|
||||
e2->m_cwB = e1;
|
||||
}
|
||||
else {
|
||||
assert(e1->m_pointB == e2->m_pointB);
|
||||
assert(e1->m_faceB == NULL || e1->m_faceB == this);
|
||||
assert(e2->m_faceA == NULL || e2->m_faceA == this);
|
||||
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
|
||||
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
|
||||
e1->m_faceB = this;
|
||||
e2->m_faceA = this;
|
||||
e1->m_ccwB = e2;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
struct LegoOrientedEdge;
|
||||
|
||||
// might be a struct with public members
|
||||
// VTABLE: LEGO1 0x100db7c0
|
||||
// VTABLE: BETA10 0x101c3730
|
||||
// SIZE 0x0c
|
||||
class LegoWEEdge {
|
||||
public:
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1009a570
|
||||
// SYNTHETIC: BETA10 0x10182b70
|
||||
// LegoWEEdge::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
|
||||
@@ -22,6 +22,7 @@ LegoWEGEdge::LegoWEGEdge()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a800
|
||||
// FUNCTION: BETA10 0x101831bd
|
||||
LegoWEGEdge::~LegoWEGEdge()
|
||||
{
|
||||
if (m_edges) {
|
||||
|
||||
@@ -29,6 +29,7 @@ struct PathWithTrigger {
|
||||
|
||||
// might be a struct with public members
|
||||
// VTABLE: LEGO1 0x100db7f8
|
||||
// VTABLE: BETA10 0x101c3798
|
||||
// SIZE 0x54
|
||||
class LegoWEGEdge : public LegoWEEdge {
|
||||
public:
|
||||
@@ -80,6 +81,7 @@ public:
|
||||
LegoU8 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1009a7e0
|
||||
// SYNTHETIC: BETA10 0x10184130
|
||||
// LegoWEGEdge::`scalar deleting destructor'
|
||||
|
||||
friend class LegoPathController;
|
||||
|
||||
@@ -122,6 +122,10 @@ public:
|
||||
LegoTextureInfo* GetCached(LegoTextureInfo* p_textureInfo);
|
||||
void EraseCached(LegoTextureInfo* p_textureInfo);
|
||||
|
||||
// Verified by LegoOmni::Create(), even though there have been significant changes.
|
||||
// SYNTHETIC: BETA10 0x10093ea0
|
||||
// LegoTextureContainer::LegoTextureContainer
|
||||
|
||||
protected:
|
||||
LegoCachedTextureList m_cached; // 0x18
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "shape/legobox.h"
|
||||
#include "shape/legosphere.h"
|
||||
|
||||
#include <crtdbg.h>
|
||||
#include <string.h>
|
||||
#include <vec.h>
|
||||
|
||||
@@ -410,8 +411,7 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
|
||||
roi->m_local2world.Product(mat, p_matrix);
|
||||
roi->UpdateWorldData();
|
||||
|
||||
LegoBool visibility = data->GetVisibility(p_time);
|
||||
roi->SetVisibility(visibility);
|
||||
roi->SetVisibility(data->GetVisibility(p_time));
|
||||
|
||||
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
ApplyChildAnimationTransformation(p_node->GetChild(i), roi->m_local2world, p_time, roi);
|
||||
@@ -419,6 +419,11 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
|
||||
}
|
||||
else {
|
||||
FUN_100a81b0("%s ROI Not found\n", name);
|
||||
#ifdef BETA10
|
||||
_RPT1(_CRT_ASSERT, "%s ROI Not Found", name);
|
||||
// Note that the macro inserts an INT3, which breaks the assumption that INT3
|
||||
// only occurs as a filler for empty space in the binary.
|
||||
#endif
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user