From 4029af97c29bdc8927b209210029adfa1669d5a6 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 1 Jun 2024 11:52:49 -0400 Subject: [PATCH] Naming --- LEGO1/lego/legoomni/include/lego3dsound.h | 2 +- LEGO1/lego/legoomni/include/legoactor.h | 15 +++++++++------ LEGO1/lego/legoomni/src/audio/lego3dsound.cpp | 8 ++++---- LEGO1/lego/legoomni/src/entity/legoactor.cpp | 2 +- .../lego/legoomni/src/entity/legocarraceactor.cpp | 2 +- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/LEGO1/lego/legoomni/include/lego3dsound.h b/LEGO1/lego/legoomni/include/lego3dsound.h index 7f7ae7ae..49dd0254 100644 --- a/LEGO1/lego/legoomni/include/lego3dsound.h +++ b/LEGO1/lego/legoomni/include/lego3dsound.h @@ -33,7 +33,7 @@ class Lego3DSound { MxBool m_unk0x14; // 0x14 MxBool m_isCharacter; // 0x15 LegoActor* m_actor; // 0x18 - double m_unk0x20; // 0x20 + double m_frequencyFactor; // 0x20 DWORD m_dwFrequency; // 0x28 MxS32 m_volume; // 0x2c }; diff --git a/LEGO1/lego/legoomni/include/legoactor.h b/LEGO1/lego/legoomni/include/legoactor.h index ebde373c..267de5a0 100644 --- a/LEGO1/lego/legoomni/include/legoactor.h +++ b/LEGO1/lego/legoomni/include/legoactor.h @@ -30,10 +30,13 @@ class LegoActor : public LegoEntity { void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 // FUNCTION: LEGO1 0x10002cc0 - virtual MxFloat VTable0x50() { return m_unk0x68; } // vtable+0x50 + virtual MxFloat GetSoundFrequencyFactor() { return m_frequencyFactor; } // vtable+0x50 // FUNCTION: LEGO1 0x10002cd0 - virtual void VTable0x54(MxFloat p_unk0x68) { m_unk0x68 = p_unk0x68; } // vtable+0x54 + virtual void SetSoundFrequencyFactor(MxFloat p_frequencyFactor) + { + m_frequencyFactor = p_frequencyFactor; + } // vtable+0x54 // FUNCTION: LEGO1 0x10002ce0 virtual void VTable0x58(MxFloat p_unk0x70) { m_unk0x70 = p_unk0x70; } // vtable+0x58 @@ -52,10 +55,10 @@ class LegoActor : public LegoEntity { protected: void FUN_1002d6e0(MxBool); - MxFloat m_unk0x68; // 0x68 - LegoCacheSound* m_sound; // 0x6c - MxFloat m_unk0x70; // 0x70 - MxU8 m_actorId; // 0x74 + MxFloat m_frequencyFactor; // 0x68 + LegoCacheSound* m_sound; // 0x6c + MxFloat m_unk0x70; // 0x70 + MxU8 m_actorId; // 0x74 }; // SYNTHETIC: LEGO1 0x1002d300 diff --git a/LEGO1/lego/legoomni/src/audio/lego3dsound.cpp b/LEGO1/lego/legoomni/src/audio/lego3dsound.cpp index ca4dbb9e..dfb29236 100644 --- a/LEGO1/lego/legoomni/src/audio/lego3dsound.cpp +++ b/LEGO1/lego/legoomni/src/audio/lego3dsound.cpp @@ -86,17 +86,17 @@ MxResult Lego3DSound::Create(LPDIRECTSOUNDBUFFER p_directSoundBuffer, const char } LegoEntity* entity = m_roi->GetEntity(); - if (entity != NULL && entity->IsA("LegoActor") && ((LegoActor*) entity)->VTable0x50() != 0.0f) { + if (entity != NULL && entity->IsA("LegoActor") && ((LegoActor*) entity)->GetSoundFrequencyFactor() != 0.0f) { m_actor = ((LegoActor*) entity); } p_directSoundBuffer->GetFrequency(&m_dwFrequency); if (m_actor != NULL) { - m_unk0x20 = m_actor->VTable0x50(); + m_frequencyFactor = m_actor->GetSoundFrequencyFactor(); - if (m_unk0x20 != 0.0) { - p_directSoundBuffer->SetFrequency(m_unk0x20 * m_dwFrequency); + if (m_frequencyFactor != 0.0) { + p_directSoundBuffer->SetFrequency(m_frequencyFactor * m_dwFrequency); } } diff --git a/LEGO1/lego/legoomni/src/entity/legoactor.cpp b/LEGO1/lego/legoomni/src/entity/legoactor.cpp index 6c455909..79c6571e 100644 --- a/LEGO1/lego/legoomni/src/entity/legoactor.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoactor.cpp @@ -15,7 +15,7 @@ const char* g_actorNames[] = {"none", "pepper", "mama", "papa", "nick", "laura", // FUNCTION: LEGO1 0x1002d110 LegoActor::LegoActor() { - m_unk0x68 = 0.0f; + m_frequencyFactor = 0.0f; m_sound = NULL; m_unk0x70 = 0.0f; m_unk0x10 = 0; diff --git a/LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp b/LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp index 33c04798..af8c95b0 100644 --- a/LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp +++ b/LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp @@ -30,7 +30,7 @@ LegoCarRaceActor::LegoCarRaceActor() m_unk0x70 = 0.0f; m_unk0x0c = 0; m_unk0x13c = 0.0f; - m_unk0x68 = 1.0f; + m_frequencyFactor = 1.0f; m_unk0x1c = 0; m_unk0x10 = 0.65f; m_unk0x14 = 0.03f;