Decompile 2 functions in Source/Contents/Sound/SoundMaker.cpp, Source/Contents/Sound/SoundMaker.h
Batch #1494 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_22406 CSoundMaker::Update: logic confirmed by peer review - fn_22363 CSoundMaker::CSoundMaker: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
07e0e8c45c
commit
d58f8f5ac1
2 changed files with 20 additions and 13 deletions
|
|
@ -5,6 +5,9 @@
|
|||
#include "Contents/Actors/Npc.h"
|
||||
#include "Contents/Actors/Pc.h"
|
||||
#include "Contents/Sound/SoundMgr.h"
|
||||
#include "Client/Mode/ActiveGameMode.h"
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Contents/World/WorldScene.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "Resource/World/WorldResource.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
|
|
@ -16,8 +19,7 @@
|
|||
|
||||
// OFFSET: 0x00DA1E30
|
||||
// FUNCTION: fn_22363
|
||||
CSoundMaker::CSoundMaker(ResourceMgr& resources, JobNames& names, SoundMakerContext& context)
|
||||
: CRenderObject(resources, names), m_context(&context) {
|
||||
CSoundMaker::CSoundMaker(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
|
||||
this->file.clear();
|
||||
this->volume = 100.0f;
|
||||
this->range = 1.0f;
|
||||
|
|
@ -45,6 +47,18 @@ CNpc::~CNpc() {
|
|||
// FUNCTION: fn_22365
|
||||
CBlowEffect::~CBlowEffect() = default;
|
||||
|
||||
CBlurPC::~CBlurPC() = default;
|
||||
|
||||
CHalluNPC::~CHalluNPC() = default;
|
||||
|
||||
CHalluPC2::~CHalluPC2() = default;
|
||||
|
||||
CHalluPC::~CHalluPC() = default;
|
||||
|
||||
CHalluPlant::~CHalluPlant() = default;
|
||||
|
||||
CSoundMaker::~CSoundMaker() = default;
|
||||
|
||||
// OFFSET: 0x00DA2450
|
||||
// FUNCTION: fn_22367
|
||||
CCorpse::~CCorpse() = default;
|
||||
|
|
@ -87,7 +101,7 @@ bool CSoundMaker::Update() {
|
|||
return true;
|
||||
}
|
||||
|
||||
const CRenderObject* player = this->m_context->localPlayer;
|
||||
const auto* player = reinterpret_cast<const CRenderObject*>(static_cast<CGameMode*>(g_world.ActiveGameMode())->scene->player);
|
||||
if (!player) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,10 @@
|
|||
|
||||
#include <cstddef>
|
||||
|
||||
struct SoundMakerContext {
|
||||
CRenderObject* const& localPlayer;
|
||||
};
|
||||
|
||||
class CSoundMaker : public CRenderObject {
|
||||
public:
|
||||
CSoundMaker(ResourceMgr& resources, JobNames& names, SoundMakerContext& context);
|
||||
~CSoundMaker() override = default;
|
||||
CSoundMaker(ResourceMgr& resources, JobNames& names);
|
||||
~CSoundMaker() override;
|
||||
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
|
||||
|
|
@ -27,9 +23,6 @@ public:
|
|||
/* 0160 */ float radius;
|
||||
/* 0164 */ std::uint32_t lastTick;
|
||||
/* 0168 */ std::uint32_t cycle;
|
||||
|
||||
private:
|
||||
alignas(8) SoundMakerContext* m_context;
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
|
|
@ -41,7 +34,7 @@ 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);
|
||||
static_assert(sizeof(CSoundMaker) == 0x170);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue