mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement LegoCarBuild::FUN_10024890()
and others, refactor (#1126)
* Commit finished code changes * Add enum data type * Refactor away GetCurrentArea, SetCurrentArea * Clean up and add FUN_10024890 * Add `SetPartObjectIdByName()` * Fix naming error * Address review comments, part 1 * Address review comments, part 2 --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "legoworld.h"
|
||||
|
||||
class LegoCarBuildAnimPresenter;
|
||||
class LegoControlManagerNotificationParam;
|
||||
class LegoEventNotificationParam;
|
||||
class MxControlPresenter;
|
||||
class MxStillPresenter;
|
||||
@@ -21,6 +22,7 @@ public:
|
||||
e_entering = 1,
|
||||
e_unknown2 = 2,
|
||||
e_cutscene = 3,
|
||||
e_unknown4 = 4,
|
||||
e_exiting = 6
|
||||
};
|
||||
|
||||
@@ -71,6 +73,11 @@ typedef LegoVehicleBuildState LegoJetskiBuildState;
|
||||
// SIZE 0x34c
|
||||
class LegoCarBuild : public LegoWorld {
|
||||
public:
|
||||
enum Unknown0xf8 {
|
||||
c_unknownminusone = -1,
|
||||
c_unknown8 = 8
|
||||
};
|
||||
|
||||
LegoCarBuild();
|
||||
~LegoCarBuild() override;
|
||||
|
||||
@@ -117,14 +124,16 @@ public:
|
||||
undefined4 FUN_100244e0(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(LegoEventNotificationParam* p_param);
|
||||
undefined4 FUN_10024890(MxParam* p_param);
|
||||
undefined4 FUN_10024c20(LegoEventNotificationParam* 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_param);
|
||||
void FUN_10025450();
|
||||
undefined4 FUN_10025720(undefined4 p_param1);
|
||||
MxS32 FUN_10025d70();
|
||||
@@ -139,7 +148,7 @@ public:
|
||||
// LegoCarBuild::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
undefined4 m_unk0xf8; // 0xf8
|
||||
Unknown0xf8 m_unk0xf8; // 0xf8
|
||||
MxS16 m_unk0xfc; // 0xfc
|
||||
undefined m_unk0xfe[2]; // 0xfe
|
||||
MxS32 m_unk0x100; // 0x100
|
||||
@@ -197,7 +206,8 @@ private:
|
||||
// variable name verified by BETA10 0x1006b219
|
||||
LegoVehicleBuildState* m_buildState; // 0x32c
|
||||
|
||||
undefined4 m_unk0x330; // 0x330
|
||||
// variable name verified by BETA10 0x1006d742
|
||||
undefined4 m_carId; // 0x330
|
||||
|
||||
// variable name verified by BETA10 0x1006cba7
|
||||
LegoGameState::Area m_destLocation; // 0x334
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
{
|
||||
m_name = NULL;
|
||||
m_wiredName = NULL;
|
||||
m_unk0x08 = 0;
|
||||
m_objectId = 0;
|
||||
}
|
||||
|
||||
// variable name verified by BETA10 0x10071b56
|
||||
@@ -30,7 +30,8 @@ public:
|
||||
// variable name verified by BETA10 0x100719f0
|
||||
LegoChar* m_wiredName; // 0x04
|
||||
|
||||
undefined2 m_unk0x08; // 0x08
|
||||
// variable name guessed based on the setter at LEGO1 0x0x10079dc0 and its use in LEGO1 0x10024890
|
||||
MxS16 m_objectId; // 0x08
|
||||
};
|
||||
|
||||
LegoCarBuildAnimPresenter();
|
||||
@@ -77,15 +78,33 @@ public:
|
||||
MxBool StringEqualsShelf(const LegoChar* p_string);
|
||||
MxBool StringEndsOnY(const LegoChar* p_string);
|
||||
MxBool StringEndsOnZero(const LegoChar* p_string);
|
||||
const LegoChar* GetWiredNameByPartName(const LegoChar* p_name);
|
||||
void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId);
|
||||
|
||||
// FUNCTION: BETA10 0x10070180
|
||||
void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; }
|
||||
|
||||
// FUNCTION: BETA10 0x100703b0
|
||||
MxMatrix& GetUnknown0xe0() { return m_unk0xe0; }
|
||||
|
||||
MxBool StringEndsOnW(LegoChar* p_param);
|
||||
MxBool StringEndsOnYOrN(const LegoChar* p_string);
|
||||
|
||||
const BoundingSphere& FUN_10079e20();
|
||||
|
||||
// FUNCTION: BETA10 0x100703e0
|
||||
const LegoChar* GetWiredNameOfLastPlacedPart() { return m_parts[m_placedPartCount].m_wiredName; }
|
||||
|
||||
MxS16 GetNumberOfParts() { return m_numberOfParts; }
|
||||
MxS16 GetPlacedPartCount() { return m_placedPartCount; }
|
||||
|
||||
// FUNCTION: BETA10 0x10070270
|
||||
MxBool AllPartsPlaced()
|
||||
{
|
||||
// this function differs in BETA10
|
||||
return m_placedPartCount == m_numberOfParts;
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10078660
|
||||
// LegoCarBuildAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
@@ -118,8 +137,6 @@ private:
|
||||
|
||||
// name verified by BETA10 0x10070d63
|
||||
LegoChar* m_mainSourceId; // 0x14c
|
||||
|
||||
friend class LegoCarBuild;
|
||||
};
|
||||
|
||||
#endif // LEGOCARBUILDPRESENTER_H
|
||||
|
@@ -172,13 +172,11 @@ public:
|
||||
|
||||
Act GetCurrentAct() { return m_currentAct; }
|
||||
Act GetLoadedAct() { return m_loadedAct; }
|
||||
Area GetCurrentArea() { return m_currentArea; }
|
||||
Area GetPreviousArea() { return m_previousArea; }
|
||||
Area GetUnknown0x42c() { return m_unk0x42c; }
|
||||
History* GetHistory() { return &m_history; }
|
||||
|
||||
void SetDirty(MxBool p_isDirty) { m_isDirty = p_isDirty; }
|
||||
void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; }
|
||||
void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
|
||||
void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
|
||||
void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
|
||||
|
@@ -121,7 +121,9 @@ public:
|
||||
// FUNCTION: BETA10 0x10031ba0
|
||||
LegoControlManager* GetControlManager() { return m_controlManager; }
|
||||
|
||||
// FUNCTION: BETA10 0x10017870
|
||||
LegoWorld* GetWorld() { return m_world; }
|
||||
|
||||
LegoCameraController* GetCamera() { return m_camera; }
|
||||
|
||||
void ProcessEvents();
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
virtual MxResult GetDDrawSurfaceFromVideoManager(); // vtable+0x14
|
||||
|
||||
enum TransitionType {
|
||||
e_notTransitioning = 0,
|
||||
e_idle = 0, // name verified by BETA10 0x100ec4e6
|
||||
e_noAnimation,
|
||||
e_dissolve,
|
||||
e_mosaic,
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim);
|
||||
|
||||
TransitionType GetTransitionType() { return m_transitionType; }
|
||||
TransitionType GetTransitionType() { return m_mode; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1004b9e0
|
||||
// MxTransitionManager::`scalar deleting destructor'
|
||||
@@ -68,13 +68,16 @@ private:
|
||||
FlagBitfield m_copyFlags; // 0x20
|
||||
undefined4 m_unk0x24; // 0x24
|
||||
FlagBitfield m_unk0x28; // 0x28
|
||||
TransitionType m_transitionType; // 0x2c
|
||||
LPDIRECTDRAWSURFACE m_ddSurface; // 0x30
|
||||
MxU16 m_animationTimer; // 0x34
|
||||
MxU16 m_columnOrder[640]; // 0x36
|
||||
MxU16 m_randomShift[480]; // 0x536
|
||||
MxULong m_systemTime; // 0x8f8
|
||||
MxS32 m_animationSpeed; // 0x8fc
|
||||
|
||||
// name verified by BETA10 0x100ec4e6
|
||||
TransitionType m_mode; // 0x2c
|
||||
|
||||
LPDIRECTDRAWSURFACE m_ddSurface; // 0x30
|
||||
MxU16 m_animationTimer; // 0x34
|
||||
MxU16 m_columnOrder[640]; // 0x36
|
||||
MxU16 m_randomShift[480]; // 0x536
|
||||
MxULong m_systemTime; // 0x8f8
|
||||
MxS32 m_animationSpeed; // 0x8fc
|
||||
};
|
||||
|
||||
#endif // MXTRANSITIONMANAGER_H
|
||||
|
Reference in New Issue
Block a user