From 8fee73c525662606c84e1bca1396cb99b95c89f3 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 21 May 2024 15:03:50 -0400 Subject: [PATCH] Implement/match LegoPathStruct (#944) * Implement/match LegoPathStruct * Rename some nums * Consistent naming * Naming * relax regex * Name some functions * Improve naming * Rename --- LEGO1/lego/legoomni/include/isle.h | 1 + LEGO1/lego/legoomni/include/jukeboxstate.h | 2 +- .../legoomni/include/legoanimationmanager.h | 4 +- .../legoomni/include/legohideanimpresenter.h | 3 +- .../legoomni/include/legopathcontroller.h | 2 +- LEGO1/lego/legoomni/include/legopathstruct.h | 36 +++- LEGO1/lego/legoomni/include/legoutils.h | 4 +- LEGO1/lego/legoomni/include/legoworld.h | 1 + .../legoomni/src/actors/islepathactor.cpp | 2 +- .../src/common/legoanimationmanager.cpp | 2 +- LEGO1/lego/legoomni/src/common/legoutils.cpp | 2 +- .../legoomni/src/paths/legopathboundary.cpp | 8 +- .../legoomni/src/paths/legopathcontroller.cpp | 9 +- .../legoomni/src/paths/legopathstruct.cpp | 165 +++++++++++++++++- LEGO1/lego/legoomni/src/worlds/isle.cpp | 2 +- LEGO1/lego/sources/geom/legowegedge.cpp | 2 +- LEGO1/lego/sources/geom/legowegedge.h | 18 +- tools/ncc/ncc.style | 2 +- 18 files changed, 225 insertions(+), 40 deletions(-) diff --git a/LEGO1/lego/legoomni/include/isle.h b/LEGO1/lego/legoomni/include/isle.h index 38895964..39ab1527 100644 --- a/LEGO1/lego/legoomni/include/isle.h +++ b/LEGO1/lego/legoomni/include/isle.h @@ -26,6 +26,7 @@ class Isle : public LegoWorld { public: // For g_unk0x100f1198 enum { + c_bit6 = 0x20, c_bit7 = 0x40 }; diff --git a/LEGO1/lego/legoomni/include/jukeboxstate.h b/LEGO1/lego/legoomni/include/jukeboxstate.h index dc465dfd..393da756 100644 --- a/LEGO1/lego/legoomni/include/jukeboxstate.h +++ b/LEGO1/lego/legoomni/include/jukeboxstate.h @@ -30,7 +30,7 @@ class JukeBoxState : public LegoState { // SYNTHETIC: LEGO1 0x1000f3d0 // JukeBoxState::`scalar deleting destructor' -protected: + // protected: MxU32 m_state; // 0x08 MxU32 m_active; // 0x0c }; diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 18479255..e4fe914f 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -9,11 +9,11 @@ #include "mxgeometry/mxgeometry3d.h" class AnimState; -class IslePathActor; class LegoAnimPresenter; class LegoEntity; class LegoExtraActor; class LegoFile; +class LegoPathActor; class LegoPathBoundary; class LegoROIList; struct LegoUnknown100db7f4; @@ -102,7 +102,7 @@ class LegoAnimationManager : public MxCore { MxBool p_param8, MxBool p_param9 ); - void CameraTriggerFire(IslePathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool); + void CameraTriggerFire(LegoPathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool); void FUN_10061010(MxBool p_und); LegoTranInfo* GetTranInfo(MxU32 p_index); void FUN_10062770(); diff --git a/LEGO1/lego/legoomni/include/legohideanimpresenter.h b/LEGO1/lego/legoomni/include/legohideanimpresenter.h index 0bb652d7..d560f224 100644 --- a/LEGO1/lego/legoomni/include/legohideanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legohideanimpresenter.h @@ -47,10 +47,11 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter { void VTable0x8c() override; // vtable+0x8c void VTable0x90() override; // vtable+0x90 + void FUN_1006db40(LegoTime p_time); + private: void Init(); void Destroy(MxBool p_fromDestructor); - void FUN_1006db40(LegoTime p_time); void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time); void FUN_1006dc10(); void FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node); diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index e5d84e94..a65a1f34 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -9,7 +9,7 @@ #include "mxstl/stlcompat.h" class LegoAnimPresenter; -struct LegoPathStruct; +class LegoPathStruct; class LegoWorld; class MxAtomId; class Vector3; diff --git a/LEGO1/lego/legoomni/include/legopathstruct.h b/LEGO1/lego/legoomni/include/legopathstruct.h index 174ad7b8..062da938 100644 --- a/LEGO1/lego/legoomni/include/legopathstruct.h +++ b/LEGO1/lego/legoomni/include/legopathstruct.h @@ -12,7 +12,17 @@ class LegoWorld; // SIZE 0x0c struct LegoPathStructBase { public: - LegoPathStructBase() : m_name(NULL), m_unk0x08(0) {} + enum { + c_bit1 = 0x01 << 24, + c_bit2 = 0x02 << 24, + c_bit3 = 0x04 << 24, + c_bit4 = 0x08 << 24, + c_bit5 = 0x10 << 24, + c_bit6 = 0x20 << 24, + c_bit7 = 0x40 << 24 + }; + + LegoPathStructBase() : m_name(NULL), m_flags(0) {} // FUNCTION: LEGO1 0x10047420 virtual ~LegoPathStructBase() @@ -22,25 +32,41 @@ struct LegoPathStructBase { } } - char* m_name; // 0x04 - undefined4 m_unk0x08; // 0x08 + char* m_name; // 0x04 + MxU32 m_flags; // 0x08 }; // VTABLE: LEGO1 0x100d7da0 // SIZE 0x14 -struct LegoPathStruct : public LegoPathStructBase { +class LegoPathStruct : public LegoPathStructBase { public: + enum Trigger { + c_camAnim = 'C', + c_d = 'D', + c_e = 'E', + c_g = 'G', + c_h = 'H', + c_music = 'M', + c_s = 'S', + c_w = 'W' + }; + // FUNCTION: LEGO1 0x100473a0 LegoPathStruct() : m_world(NULL) {} // FUNCTION: LEGO1 0x10047470 ~LegoPathStruct() override {} - virtual void VTable0x04(LegoPathActor*, undefined4, undefined4); // vtable+0x04 + virtual void HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data); // vtable+0x04 inline void SetWorld(LegoWorld* p_world) { m_world = p_world; } inline void SetAtomId(const MxAtomId& p_atomId) { m_atomId = p_atomId; } +private: + MxBool HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data, MxBool p_bool); + void FUN_1001bc40(const char* p_name, MxU32 p_data, MxBool p_bool); + void PlayMusic(MxBool p_direction, MxU32 p_data); + LegoWorld* m_world; // 0x0c MxAtomId m_atomId; // 0x10 }; diff --git a/LEGO1/lego/legoomni/include/legoutils.h b/LEGO1/lego/legoomni/include/legoutils.h index 36364268..118b6c1d 100644 --- a/LEGO1/lego/legoomni/include/legoutils.h +++ b/LEGO1/lego/legoomni/include/legoutils.h @@ -7,12 +7,12 @@ #include -class IslePathActor; class MxAtomId; class LegoEntity; class LegoFile; class LegoAnimPresenter; class LegoNamedTexture; +class LegoPathActor; class LegoROI; class LegoTreeNode; @@ -24,7 +24,7 @@ Extra::ActionType MatchActionString(const char*); void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_targetEntityId, 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(IslePathActor* p_actor, undefined4 p_unused, MxU32 p_location, MxBool p_bool); +void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool); void FUN_1003eda0(); MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id); void FUN_1003ef00(MxBool p_enable); diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index cde4f4b1..5e54c748 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -94,6 +94,7 @@ class LegoWorld : public LegoEntity { inline MxS32 GetScriptIndex() { return m_scriptIndex; } inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; } inline list& GetROIList() { return m_roiList; } + inline LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnimPresenter; } inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; } diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp index 91cf9804..72f558aa 100644 --- a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp @@ -535,7 +535,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p } if (camAnim) { - PlayCamAnim(this, 0, g_spawnLocations[i].m_location, TRUE); + PlayCamAnim(this, FALSE, g_spawnLocations[i].m_location, TRUE); } } diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index ce297e26..5a761d94 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -1153,7 +1153,7 @@ MxResult LegoAnimationManager::FUN_10060dc0( // FUNCTION: LEGO1 0x10060eb0 // FUNCTION: BETA10 0x1004206c -void LegoAnimationManager::CameraTriggerFire(IslePathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool) +void LegoAnimationManager::CameraTriggerFire(LegoPathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool) { if (Lego()->m_unk0x13c && m_enableCamAnims && !m_animRunning) { LegoLocation* location = LegoNavController::GetLocation(p_location); diff --git a/LEGO1/lego/legoomni/src/common/legoutils.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp index 0bc11754..60d96755 100644 --- a/LEGO1/lego/legoomni/src/common/legoutils.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -344,7 +344,7 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO // FUNCTION: LEGO1 0x1003ecc0 // FUNCTION: BETA10 0x100d4b38 -void PlayCamAnim(IslePathActor* p_actor, undefined4 p_unused, MxU32 p_location, MxBool p_bool) +void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool) { LegoWorld* world = CurrentWorld(); MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp b/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp index 729b1575..67116bf0 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathboundary.cpp @@ -61,19 +61,19 @@ void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPa if (dot2 > dot1) { for (MxS32 i = 0; i < m_unk0x48; i++) { - LegoPathStruct* s = m_unk0x4c[i].m_unk0x00; + LegoPathStruct* s = m_unk0x4c[i].m_pathStruct; if (m_unk0x4c[i].m_unk0x08 >= dot1 && m_unk0x4c[i].m_unk0x08 < dot2) { - s->VTable0x04(p_actor, 1, m_unk0x4c[i].m_unk0x04); + s->HandleTrigger(p_actor, TRUE, m_unk0x4c[i].m_data); } } } else if (dot2 < dot1) { for (MxS32 i = 0; i < m_unk0x48; i++) { - LegoPathStruct* s = m_unk0x4c[i].m_unk0x00; + LegoPathStruct* s = m_unk0x4c[i].m_pathStruct; if (m_unk0x4c[i].m_unk0x08 >= dot2 && m_unk0x4c[i].m_unk0x08 < dot1) { - s->VTable0x04(p_actor, 0, m_unk0x4c[i].m_unk0x04); + s->HandleTrigger(p_actor, FALSE, m_unk0x4c[i].m_data); } } } diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp index 8894ea40..4dd2afbf 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp @@ -528,7 +528,7 @@ MxResult LegoPathController::ReadStructs(LegoStorage* p_storage) m_structs[i].m_name[length] = '\0'; } - if (p_storage->Read(&m_structs[i].m_unk0x08, sizeof(m_structs[i].m_unk0x08)) != SUCCESS) { + if (p_storage->Read(&m_structs[i].m_flags, sizeof(m_structs[i].m_flags)) != SUCCESS) { return FAILURE; } } @@ -678,17 +678,16 @@ MxResult LegoPathController::ReadBoundaries(LegoStorage* p_storage) if (boundary.m_unk0x48 > 0) { boundary.m_unk0x50 = new Mx3DPointFloat; - boundary.m_unk0x4c = new LegoWEGEdge::Path[boundary.m_unk0x48]; + boundary.m_unk0x4c = new LegoWEGEdge::PathWithTrigger[boundary.m_unk0x48]; for (j = 0; j < boundary.m_unk0x48; j++) { if (p_storage->Read(&s, sizeof(s)) != SUCCESS) { return FAILURE; } - boundary.m_unk0x4c[j].m_unk0x00 = &m_structs[s]; + boundary.m_unk0x4c[j].m_pathStruct = &m_structs[s]; - if (p_storage->Read(&boundary.m_unk0x4c[j].m_unk0x04, sizeof(boundary.m_unk0x4c[j].m_unk0x04)) != - SUCCESS) { + if (p_storage->Read(&boundary.m_unk0x4c[j].m_data, sizeof(boundary.m_unk0x4c[j].m_data)) != SUCCESS) { return FAILURE; } diff --git a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp index 5b694042..e4150852 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp @@ -1,11 +1,168 @@ #include "legopathstruct.h" +#include "isle.h" +#include "jukebox_actions.h" +#include "jukeboxstate.h" +#include "legohideanimpresenter.h" +#include "legopathactor.h" +#include "legoutils.h" +#include "misc.h" +#include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" +#include "mxnotificationmanager.h" +#include "mxtype19notificationparam.h" +#include "scripts.h" + DECOMP_SIZE_ASSERT(LegoPathStructBase, 0x0c) DECOMP_SIZE_ASSERT(LegoPathStruct, 0x14) -// STUB: LEGO1 0x1001b700 -// FUNCTION: BETA10 0x100c26c5 -void LegoPathStruct::VTable0x04(LegoPathActor*, undefined4, undefined4) +// Flags used in isle.cpp +extern MxU32 g_unk0x100f1198; + +// GLOBAL: LEGO1 0x100f119c +MxBool g_unk0x100f119c = FALSE; + +// FUNCTION: LEGO1 0x1001b700 +void LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data) { - // TODO + if (!HandleTrigger(p_actor, p_direction, p_data, FALSE) && g_unk0x100f119c) { + HandleTrigger(p_actor, p_direction, p_data, TRUE); + } +} + +// FUNCTION: LEGO1 0x1001b740 +// FUNCTION: BETA10 0x100c26c5 +MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data, MxBool p_bool) +{ + MxBool triggered = FALSE; + MxBool bool2 = p_bool ? !p_direction : p_direction; + + MxU32 flags = bool2 ? c_bit5 : c_bit6; + flags |= p_actor->GetCameraFlag() ? c_bit1 : (c_bit2 | c_bit3 | c_bit4); + + if ((m_flags & flags & (c_bit5 | c_bit6 | c_bit7)) && (m_flags & flags & (c_bit1 | c_bit2 | c_bit3 | c_bit4))) { + triggered = TRUE; + + switch (m_name[2]) { + case c_camAnim: + if (g_unk0x100f1198 & Isle::c_bit6) { + PlayCamAnim(p_actor, bool2, p_data, TRUE); + } + break; + case c_d: { + p_actor->VTable0x58(p_data); + + MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data); + p_actor->Notify(param); + + LegoWorld* world = CurrentWorld(); + if (world != NULL) { + NotificationManager()->Send(world, param); + } + break; + } + case c_e: + FUN_1001bc40(m_name, p_data, !(p_bool == FALSE)); + break; + case c_g: + break; + case c_h: { + LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter(); + + if (presenter != NULL) { + presenter->FUN_1006db40(p_data * 100); + } + break; + } + case c_music: + if (g_unk0x100f1198 & Isle::c_bit7) { + PlayMusic(p_direction, p_data); + } + break; + case c_s: { + LegoWorld* world = CurrentWorld(); + if (world != NULL) { + MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data); + + if (world->Notify(param) != 0) { + break; + } + } + + FUN_1001bc40(m_name, p_data, p_bool == FALSE); + break; + } + case c_w: { + LegoWorld* world = CurrentWorld(); + if (world != NULL) { + MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data); + NotificationManager()->Send(world, param); + } + break; + } + } + } + + return triggered; +} + +// FUNCTION: LEGO1 0x1001bc40 +// FUNCTION: BETA10 0x100c2a6c +void LegoPathStruct::FUN_1001bc40(const char* p_name, MxU32 p_data, MxBool p_bool) +{ + MxDSAction action; + action.SetObjectId(p_data); + action.SetAtomId(m_atomId); + + if (p_bool) { + action.SetUnknown24(-1); + Start(&action); + } + else { + action.SetUnknown24(-2); + DeleteObject(action); + } +} + +// FUNCTION: LEGO1 0x1001bd10 +// FUNCTION: BETA10 0x100c2b4a +void LegoPathStruct::PlayMusic(MxBool p_direction, MxU32 p_data) +{ + JukeBoxState* state = (JukeBoxState*) GameState()->GetState("JukeBoxState"); + if (state != NULL && state->m_active) { + return; + } + + JukeboxScript::Script music[] = { + JukeboxScript::c_ResidentalArea_Music, + JukeboxScript::c_BeachBlvd_Music, + JukeboxScript::c_Cave_Music, + JukeboxScript::c_CentralRoads_Music, + JukeboxScript::c_Jail_Music, + JukeboxScript::c_Hospital_Music, + JukeboxScript::c_InformationCenter_Music, + JukeboxScript::c_PoliceStation_Music, + JukeboxScript::c_Park_Music, + JukeboxScript::c_CentralNorthRoad_Music, + JukeboxScript::c_GarageArea_Music, + JukeboxScript::c_RaceTrackRoad_Music, + JukeboxScript::c_Beach_Music, + JukeboxScript::c_Quiet_Audio + }; + + MxS16 triggersReff[24][2] = {{11, 10}, {6, 10}, {3, 1}, {4, 1}, {1, 4}, {1, 4}, {13, 2}, {13, 2}, + {13, 2}, {4, 10}, {11, 9}, {9, 7}, {8, 7}, {8, 5}, {5, 2}, {2, 4}, + {4, 2}, {4, 5}, {11, 4}, {12, 10}, {10, 12}, {10, 12}, {14, 2}, {14, 2}}; + + MxDSAction action; + action.SetAtomId(*g_jukeboxScript); + action.SetUnknown24(-1); + + if (p_data <= sizeOfArray(triggersReff)) { + action.SetObjectId(music[triggersReff[p_data - 1][p_direction == FALSE] - 1]); + } + + if (action.GetObjectId() != -1) { + BackgroundAudioManager()->PlayMusic(action, 5, 4); + } } diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 41e1a61c..ba0d822b 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -38,7 +38,7 @@ DECOMP_SIZE_ASSERT(Isle, 0x140) // GLOBAL: LEGO1 0x100f1198 -undefined4 g_unk0x100f1198 = 0x7f; +MxU32 g_unk0x100f1198 = 0x7f; // FUNCTION: LEGO1 0x10030820 Isle::Isle() diff --git a/LEGO1/lego/sources/geom/legowegedge.cpp b/LEGO1/lego/sources/geom/legowegedge.cpp index 1eb88448..480533f6 100644 --- a/LEGO1/lego/sources/geom/legowegedge.cpp +++ b/LEGO1/lego/sources/geom/legowegedge.cpp @@ -1,7 +1,7 @@ #include "legowegedge.h" DECOMP_SIZE_ASSERT(LegoWEGEdge, 0x54) -DECOMP_SIZE_ASSERT(LegoWEGEdge::Path, 0x0c) +DECOMP_SIZE_ASSERT(LegoWEGEdge::PathWithTrigger, 0x0c) // FUNCTION: LEGO1 0x1009a730 LegoWEGEdge::LegoWEGEdge() diff --git a/LEGO1/lego/sources/geom/legowegedge.h b/LEGO1/lego/sources/geom/legowegedge.h index 906ec015..3617151e 100644 --- a/LEGO1/lego/sources/geom/legowegedge.h +++ b/LEGO1/lego/sources/geom/legowegedge.h @@ -5,7 +5,7 @@ #include "legoweedge.h" #include "mxgeometry/mxgeometry3d.h" -struct LegoPathStruct; +class LegoPathStruct; // might be a struct with public members // VTABLE: LEGO1 0x100db7f8 @@ -20,19 +20,19 @@ class LegoWEGEdge : public LegoWEEdge { }; // SIZE 0x0c - struct Path { + struct PathWithTrigger { // FUNCTION: LEGO1 0x10048280 // FUNCTION: BETA10 0x100bd450 - Path() + PathWithTrigger() { - m_unk0x00 = NULL; - m_unk0x04 = 0; + m_pathStruct = NULL; + m_data = 0; m_unk0x08 = 0.0f; } - LegoPathStruct* m_unk0x00; // 0x00 - undefined4 m_unk0x04; // 0x04 - float m_unk0x08; // 0x08 + LegoPathStruct* m_pathStruct; // 0x00 + unsigned int m_data; // 0x04 + float m_unk0x08; // 0x08 }; LegoWEGEdge(); @@ -71,7 +71,7 @@ class LegoWEGEdge : public LegoWEEdge { Mx3DPointFloat m_unk0x30; // 0x30 LegoU32 m_unk0x44; // 0x44 LegoU8 m_unk0x48; // 0x48 - Path* m_unk0x4c; // 0x4c + PathWithTrigger* m_unk0x4c; // 0x4c Mx3DPointFloat* m_unk0x50; // 0x50 }; diff --git a/tools/ncc/ncc.style b/tools/ncc/ncc.style index 5147d6bc..4ddb4f57 100644 --- a/tools/ncc/ncc.style +++ b/tools/ncc/ncc.style @@ -1,7 +1,7 @@ ClassName: '^[A-Z][a-zA-Z0-9]+$' CppMethod: '^operator|^FUN_[a-f0-9]{8}$|^VTable0x[a-f0-9]{1,8}$|^(?!VTable)[A-Z][a-zA-Z0-9]+$' EnumName: '^\(unnamed|^[A-Z][a-zA-Z0-9]+$' -EnumConstantName: '^(c_|e_)[a-z][a-zA-Z0-9]+$' +EnumConstantName: '^(c_|e_)[a-z][a-zA-Z0-9]*$' FunctionName: '^operator|^FUN_[a-f0-9]{8}$|^VTable0x[a-f0-9]{1,8}$|^(?!VTable)[A-Z][a-zA-Z0-9]+$' ParameterName: '^p_(unk0x[a-f0-9]{1,8}$|(?!unk)[a-z][a-zA-Z0-9]*)$|^$' StructName: '^\(anon|^\(unnamed|^[A-Z][a-zA-Z0-9]+$'