Skip to content

Commit

Permalink
Implement FUN_10025720() and others (#1134)
Browse files Browse the repository at this point in the history
* Implement `FUN_10025720()` and others

* Address review comments, get 100 %

---------

Co-authored-by: jonschz <[email protected]>
  • Loading branch information
jonschz and jonschz authored Nov 5, 2024
1 parent 1badade commit c65bc67
Show file tree
Hide file tree
Showing 10 changed files with 344 additions and 37 deletions.
35 changes: 27 additions & 8 deletions LEGO1/lego/legoomni/include/legocarbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ typedef LegoVehicleBuildState LegoJetskiBuildState;
// SIZE 0x34c
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
};

enum Unknown0xf8 {
c_unknownminusone = -1,
c_unknown8 = 8
Expand Down Expand Up @@ -133,9 +144,10 @@ class LegoCarBuild : public LegoWorld {
void SetPresentersEnabled(MxBool p_enabled);
void TogglePresentersEnabled();
void FUN_100250e0(MxBool p_param);
void FUN_10025350(MxS32 p_param);
void FUN_10025350(MxS32 p_objectId);
void FUN_10025450();
undefined4 FUN_10025720(undefined4 p_param1);
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();
Expand All @@ -148,12 +160,18 @@ class LegoCarBuild : public LegoWorld {
// LegoCarBuild::`scalar deleting destructor'

private:
Unknown0xf8 m_unk0xf8; // 0xf8
MxS16 m_unk0xfc; // 0xfc
undefined m_unk0xfe[2]; // 0xfe
MxS32 m_unk0x100; // 0x100
undefined4 m_unk0x104; // 0x104
MxS8 m_unk0x108; // 0x108
// inline functions
MxU32 Beta0x10070520();
void StopActionIn0x344();

Unknown0xf8 m_unk0xf8; // 0xf8
MxS16 m_unk0xfc; // 0xfc
MxS32 m_unk0x100; // 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
Expand Down Expand Up @@ -221,6 +239,7 @@ class LegoCarBuild : public LegoWorld {
static MxS16 g_unk0x100f11cc;
static MxFloat g_unk0x100d65a4;
static MxFloat g_rotationAngleStepYAxis;
static LookupTableActions g_unk0x100d65b0[];
};

#endif // LEGOCARBUILD_H
3 changes: 3 additions & 0 deletions LEGO1/lego/legoomni/include/legomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ class LegoOmni : public MxOmni {
void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
void SetUserActor(LegoPathActor* p_userActor) { m_userActor = p_userActor; }
void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }

// FUNCTION: BETA10 0x100d55c0
void SetExit(MxBool p_exit) { m_exit = p_exit; }

MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction) { return m_unk0x13c ? Start(&p_dsAction) : SUCCESS; }
void SetUnknown13c(MxBool p_unk0x13c) { m_unk0x13c = p_unk0x13c; }

Expand Down
5 changes: 4 additions & 1 deletion LEGO1/lego/legoomni/include/legoutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#define WM_ISLE_SETCURSOR 0x5400

// name verified by BETA10 0x100d4054
#define DS_NOT_A_STREAM -1

enum Cursor {
e_cursorArrow = 0,
e_cursorBusy,
Expand Down Expand Up @@ -46,7 +49,7 @@ MxS16 CountTotalTreeNodes(LegoTreeNode* p_node);
LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index);
void FUN_1003e050(LegoAnimPresenter* p_presenter);
Extra::ActionType MatchActionString(const char*);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_targetEntityId, LegoEntity* p_sender);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender);
void SetCameraControllerFromIsle();
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool);
Expand Down
1 change: 1 addition & 0 deletions LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ void MxBackgroundAudioManager::Stop()
}

// FUNCTION: LEGO1 0x1007f570
// FUNCTION: BETA10 0x100e94e6
void MxBackgroundAudioManager::LowerVolume()
{
if (m_unk0x148 == 0) {
Expand Down
Loading

0 comments on commit c65bc67

Please sign in to comment.