From a996ad893be537aafc21315b738b9082555970cc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 27 Oct 2026 09:30:10 +0000 Subject: [PATCH] Decompile fn_22417 (CSoundMaker::Draw) Batch #1018 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_22417 CSoundMaker::Draw: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/Sound/SoundMaker.cpp --- Source/Contents/Sound/SoundMaker.cpp | 21 +++++++++++++ Source/Contents/Sound/SoundMaker.h | 47 ++++++++++++++++++++++++++++ compile.json | 1 + 3 files changed, 69 insertions(+) create mode 100644 Source/Contents/Sound/SoundMaker.cpp create mode 100644 Source/Contents/Sound/SoundMaker.h diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp new file mode 100644 index 0000000..aedc647 --- /dev/null +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -0,0 +1,21 @@ +#include "Contents/Sound/SoundMaker.h" + +#include "Contents/Sound/SoundMgr.h" +#include "Resource/World/WorldResource.h" +#include "Utility/Math/AffineMatrix.h" +#include "Utility/Math/ScalarConversion.h" + +#include +#include +#include + +// OFFSET: 0x00DA1E30 + +// OFFSET: 0x00DA3A60 + +// OFFSET: 0x00DA4960 +// FUNCTION: fn_22417 +void CSoundMaker::Draw(int) { +} + +// OFFSET: 0x00DA56E0 diff --git a/Source/Contents/Sound/SoundMaker.h b/Source/Contents/Sound/SoundMaker.h new file mode 100644 index 0000000..90f16a7 --- /dev/null +++ b/Source/Contents/Sound/SoundMaker.h @@ -0,0 +1,47 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_SOUND_SOUNDMAKER_H +#define RAGNAROK_SOURCE_CONTENTS_SOUND_SOUNDMAKER_H + +#include "Contents/Actors/RenderObject.h" + +#include + +struct SoundMakerContext { + CRenderObject* const& localPlayer; +}; + +class CSoundMaker : public CRenderObject { +public: + CSoundMaker(ResourceMgr& resources, JobNames& names, SoundMakerContext& context); + ~CSoundMaker() override = default; + bool Update() override; + void SendObjectMessage( + CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m + ) override; + void Draw(int argument) override; + + /* 0138 */ std::string file; + /* 0150 */ float volume; + /* 0154 */ int width; + /* 0158 */ int height; + /* 015C */ float range; + /* 0160 */ float radius; + /* 0164 */ std::uint32_t lastTick; + /* 0168 */ std::uint32_t cycle; + +private: + alignas(8) SoundMakerContext* m_context; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(CSoundMaker, file) == 0x138); +static_assert(offsetof(CSoundMaker, volume) == 0x150); +static_assert(offsetof(CSoundMaker, width) == 0x154); +static_assert(offsetof(CSoundMaker, height) == 0x158); +static_assert(offsetof(CSoundMaker, range) == 0x15C); +static_assert(offsetof(CSoundMaker, radius) == 0x160); +static_assert(offsetof(CSoundMaker, lastTick) == 0x164); +static_assert(offsetof(CSoundMaker, cycle) == 0x168); +static_assert(sizeof(CSoundMaker) == 0x178); +#endif + +#endif diff --git a/compile.json b/compile.json index a65ce9b..83aa5b1 100644 --- a/compile.json +++ b/compile.json @@ -380,6 +380,7 @@ "Source/Contents/Skills/SkillTreeScript.cpp": 4, "Source/Contents/SkinInfo.cpp": 3, "Source/Contents/Sound/SoundConfiguration.cpp": 4, + "Source/Contents/Sound/SoundMaker.cpp": 4, "Source/Contents/Sound/SoundMgr.cpp": 4, "Source/Contents/Store/MCStoreInfoBackup.cpp": 4, "Source/Contents/Store/MCStoreInfoBackupAsyncWork.cpp": 4,