diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 5babacb..88baeb3 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -7,6 +7,8 @@ class CGameActor : public CRenderObject { public: + ~CGameActor() override; + /* 0138 */ unsigned char unknown_0138[0x100]; /* 0238 */ unsigned char unknown_0238; /* 0239 */ unsigned char unknown_0239[0x27]; @@ -29,6 +31,7 @@ public: /* 0378 */ float unknown_0378; /* 037C */ unsigned char unknown_037C[0x4C]; /* 03C8 */ int unknown_03C8; + /* 03CC */ unsigned char unknown_03CC[0x44]; void SetAnimation(unsigned animation, int motion, int repeat) override; @@ -49,6 +52,7 @@ public: }; #if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CGameActor) == 0x410); static_assert(offsetof(CGameActor, unknown_0238) == 0x238); static_assert(offsetof(CGameActor, unknown_0260) == 0x260); static_assert(offsetof(CGameActor, unknown_02C8) == 0x2C8); diff --git a/Source/Contents/Actors/GndRiser.h b/Source/Contents/Actors/GndRiser.h new file mode 100644 index 0000000..215ff29 --- /dev/null +++ b/Source/Contents/Actors/GndRiser.h @@ -0,0 +1,29 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_GNDRISER_H +#define RAGNAROK_SOURCE_CONTENTS_ACTORS_GNDRISER_H + +#include "Contents/Effects/EffectActor.h" + +#include + +class CGndRiser : public EffectActor { +public: + 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; + + /* 0158 */ int lifetime; + /* 015C */ int screenX; + /* 0160 */ int screenY; + /* 0164 */ int unknown_0164; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CGndRiser) == 0x168); +static_assert(offsetof(CGndRiser, lifetime) == 0x158); +static_assert(offsetof(CGndRiser, screenX) == 0x15C); +static_assert(offsetof(CGndRiser, screenY) == 0x160); +#endif + +#endif diff --git a/Source/Contents/Actors/Npc.h b/Source/Contents/Actors/Npc.h new file mode 100644 index 0000000..8f830b4 --- /dev/null +++ b/Source/Contents/Actors/Npc.h @@ -0,0 +1,84 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_NPC_H +#define RAGNAROK_SOURCE_CONTENTS_ACTORS_NPC_H + +#include "Contents/Actors/GameActor.h" + +#include +#include + +class UIWindow; + +class CNpc : public CGameActor { +public: + ~CNpc() 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 + ) override; + void Draw(int argument) override; + + /* 0410 */ unsigned char unknown_0410[0x1C]; + /* 042C */ UIWindow* unknown_042C; + /* 0430 */ UIWindow* unknown_0430; + /* 0434 */ CGameObject* unknown_0434; + /* 0438 */ std::uint16_t unknown_0438; + /* 043A */ std::uint16_t unknown_043A; + /* 043C */ int unknown_043C; +}; + +class CCharacterNpc : public CNpc { +public: + ~CCharacterNpc() 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; + + /* 0440 */ CGameObject* unknown_0440; +}; + +class CHalluNPC : public CNpc { +public: + ~CHalluNPC() 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 + ) override; + void Draw(int argument) override; + + /* 0440 */ float unknown_0440; + /* 0444 */ int unknown_0444; + /* 0448 */ int unknown_0448; + /* 044C */ int unknown_044C; + /* 0450 */ int unknown_0450; + /* 0454 */ int unknown_0454; +}; + +class CHalluPlant : public CNpc { +public: + ~CHalluPlant() 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 + ) override; + void Draw(int argument) override; + + /* 0440 */ std::uint32_t unknown_0440; + /* 0444 */ int unknown_0444; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CNpc) == 0x440); +static_assert(sizeof(CCharacterNpc) == 0x448); +static_assert(sizeof(CHalluNPC) == 0x458); +static_assert(sizeof(CHalluPlant) == 0x448); +static_assert(offsetof(CNpc, unknown_042C) == 0x42C); +static_assert(offsetof(CNpc, unknown_0434) == 0x434); +static_assert(offsetof(CNpc, unknown_0438) == 0x438); +static_assert(offsetof(CCharacterNpc, unknown_0440) == 0x440); +static_assert(offsetof(CHalluNPC, unknown_0444) == 0x444); +static_assert(offsetof(CHalluNPC, unknown_0454) == 0x454); +static_assert(offsetof(CHalluPlant, unknown_0440) == 0x440); +#endif + +#endif diff --git a/Source/Contents/Actors/Pc.h b/Source/Contents/Actors/Pc.h new file mode 100644 index 0000000..ddfd973 --- /dev/null +++ b/Source/Contents/Actors/Pc.h @@ -0,0 +1,83 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_PC_H +#define RAGNAROK_SOURCE_CONTENTS_ACTORS_PC_H + +#include "Contents/Actors/GameActor.h" + +#include +#include +#include + +class CPc : public CGameActor { +public: + ~CPc() 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; + + float* GetExtent(float* extent) const; + + /* 0410 */ unsigned char unknown_0410[8]; + /* 0418 */ std::string unknown_0418; + /* 0430 */ unsigned char unknown_0430[0xB4]; + /* 04E4 */ float unknown_04E4; + /* 04E8 */ float unknown_04E8; + /* 04EC */ float unknown_04EC; + /* 04F0 */ float unknown_04F0; + /* 04F4 */ int unknown_04F4; + /* 04F8 */ float unknown_04F8; + /* 04FC */ int unknown_04FC; + /* 0500 */ unsigned char unknown_0500[0x0C]; + /* 050C */ int unknown_050C; +}; + +class CBlurPC : public CPc { +public: + ~CBlurPC() 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 + ) override; + void Draw(int argument) override; +}; + +class CHalluPC : public CPc { +public: + ~CHalluPC() 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 + ) override; + void Draw(int argument) override; + + /* 0510 */ int unknown_0510; + /* 0514 */ int unknown_0514; +}; + +class CHalluPC2 : public CPc { +public: + ~CHalluPC2() 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 + ) override; + void Draw(int argument) override; + + /* 0510 */ int unknown_0510; + /* 0514 */ int unknown_0514; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CBlurPC) == 0x510); +static_assert(sizeof(CHalluPC) == 0x518); +static_assert(sizeof(CHalluPC2) == 0x518); +static_assert(offsetof(CPc, unknown_0418) == 0x418); +static_assert(offsetof(CPc, unknown_04E4) == 0x4E4); +static_assert(offsetof(CPc, unknown_04F0) == 0x4F0); +static_assert(offsetof(CPc, unknown_04F8) == 0x4F8); +static_assert(offsetof(CPc, unknown_04FC) == 0x4FC); +static_assert(offsetof(CPc, unknown_050C) == 0x50C); +static_assert(offsetof(CHalluPC, unknown_0510) == 0x510); +static_assert(offsetof(CHalluPC2, unknown_0510) == 0x510); +#endif + +#endif diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp index 1590d69..442b8bf 100644 --- a/Source/Contents/Sound/SoundMaker.cpp +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -1,7 +1,11 @@ #include "Contents/Sound/SoundMaker.h" #include "Contents/Actors/EffectActors.h" +#include "Contents/Actors/GndRiser.h" +#include "Contents/Actors/Npc.h" +#include "Contents/Actors/Pc.h" #include "Contents/Sound/SoundMgr.h" +#include "UI/Window/UIWindowMgr.h" #include "Resource/World/WorldResource.h" #include "Utility/Math/AffineMatrix.h" #include "Utility/Math/ScalarConversion.h" @@ -23,6 +27,8 @@ CSoundMaker::CSoundMaker(ResourceMgr& resources, JobNames& names, SoundMakerCont this->lastTick = timeGetTime() - 4000u; } +// OFFSET: 0x00DA2220 + // OFFSET: 0x00DA2370 // FUNCTION: fn_22365 CBlowEffect::~CBlowEffect() = default; @@ -39,6 +45,12 @@ CMasterChaser::~CMasterChaser() = default; // FUNCTION: fn_22375 CNumEffect::~CNumEffect() = default; +// OFFSET: 0x00DA3340 +// FUNCTION: fn_22403 +bool CHalluPlant::Update() { + return ++this->unknown_0440 <= 60; +} + // OFFSET: 0x00DA3980 // FUNCTION: fn_22405 bool CNumEffect::Update() { @@ -113,6 +125,13 @@ bool CSoundMaker::Update() { return true; } +// OFFSET: 0x00DA2B00 + +// OFFSET: 0x00DA4150 +// FUNCTION: fn_22411 +void CGndRiser::Draw(int) { +} + // OFFSET: 0x00DA4960 // FUNCTION: fn_22417 void CSoundMaker::Draw(int) { @@ -137,6 +156,8 @@ void CBlowEffect::SendObjectMessage( this->render.unknown_008C = timeGetTime(); } +// OFFSET: 0x00DA4A00 + // OFFSET: 0x00DA4AD0 // FUNCTION: fn_22420 void CCorpse::SendObjectMessage( @@ -145,6 +166,14 @@ void CCorpse::SendObjectMessage( CRenderObject::SendObjectMessage(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); } +// OFFSET: 0x00DA4BF0 + +// OFFSET: 0x00DA4CC0 + +// OFFSET: 0x00DA4D90 + +// OFFSET: 0x00DA4E60 + // OFFSET: 0x00DA5610 // FUNCTION: fn_22427 void CNumEffect::SendObjectMessage(