diff --git a/Source/Contents/Actors/EffectActors.h b/Source/Contents/Actors/EffectActors.h index b68a74bd..b8939175 100644 --- a/Source/Contents/Actors/EffectActors.h +++ b/Source/Contents/Actors/EffectActors.h @@ -18,6 +18,7 @@ class CCorpse : public CRenderObject { public: CCorpse(); ~CCorpse() override; + bool OnProcess() override; void SendMsg( 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; diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 79802414..9f5ac30d 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -90,7 +90,9 @@ public: /* 0288 */ int unknown_0288; /* 028C */ unsigned char unknown_028C[0x04]; /* 0290 */ int unknown_0290; - /* 0294 */ unsigned char unknown_0294[0x0C]; + /* 0294 */ int unknown_0294; + /* 0298 */ int unknown_0298; + /* 029C */ unsigned char unknown_029C[0x04]; /* 02A0 */ std::list unknown_02A0; /* 02A8 */ std::list unknown_02A8; /* 02B0 */ int unknown_02B0; @@ -304,6 +306,7 @@ static_assert(offsetof(CGameActor, unknown_023C) == 0x23C); static_assert(offsetof(CGameActor, unknown_0258) == 0x258); static_assert(offsetof(CGameActor, unknown_0264) == 0x264); static_assert(offsetof(CGameActor, unknown_0290) == 0x290); +static_assert(offsetof(CGameActor, unknown_0298) == 0x298); static_assert(offsetof(CGameActor, unknown_02A0) == 0x2A0); static_assert(offsetof(CGameActor, unknown_02A8) == 0x2A8); static_assert(offsetof(CGameActor, unknown_02B8) == 0x2B8); diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp index 075cce36..5ae0859a 100644 --- a/Source/Contents/Sound/SoundMaker.cpp +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -1,5 +1,6 @@ #include "Contents/Sound/SoundMaker.h" +#include "Contents/Actors/ActorStateFlags.h" #include "Contents/Actors/EffectActors.h" #include "Contents/Actors/GndRiser.h" #include "Contents/Actors/Npc.h" @@ -8,15 +9,21 @@ #include "Client/Mode/ModeMgr.h" #include "Client/Mode/CGameMode.h" #include "Client/Session.h" +#include "Contents/Configuration/ServiceOptions.h" +#include "Contents/Skills/ClientSkills.h" #include "Contents/World/World.h" #include "UI/Window/UIWindowMgr.h" #include "Resource/ResourceMgr.h" +#include "Resource/Sprites/ActionResource.h" #include "Resource/World/WorldResource.h" +#include "Render/Renderer.h" +#include "Render/SpriteGeometry.h" #include "Utility/Math/AffineMatrix.h" #include "Utility/Math/ScalarConversion.h" #include #include +#include #include #include @@ -676,3 +683,60 @@ bool CHalluPC::OnProcess() { } return true; } + +// OFFSET: 0x00DA3010 +// FUNCTION: fn_22398 +bool CCorpse::OnProcess() { + const float elapsed = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + this->render.previousAnimation = this->Get8Dir(this->render.angle) + this->render.animation; + this->render.curMotion = this->GetActRes()->FrameCount(this->render.previousAnimation) - 1; + this->SetColor(static_cast(255.0f - elapsed), -1, -1, -1); + return elapsed < 255.0f; +} + +// OFFSET: 0x00DA4160 +// FUNCTION: fn_22412 +void CHalluNPC::Render(int argument) { + const float* matrix = reinterpret_cast(argument); + if (StateFlag02(this->stateFlags) || StateFlag06(this->stateFlags) || StateFlag01(this->stateFlags)) { + return; + } + + rand(); + rand(); + rand(); + rand(); + + if (this->GetEffectiveJob(-1) >= 6017 && this->GetEffectiveJob(-1) <= 6046) { + if (!this->render.visible) { + this->UpdateTlvertex(matrix); + return; + } + + if ((this->render.color & 0xFF000000) == 0xFF000000) { + this->DrawShadow(argument, this->render.scale); + } + if (this->render.enabled) { + this->RenderMercenary(matrix, this->GetEffectiveJob(-1)); + } else { + this->UpdateTlvertex(matrix); + } + return; + } + + if (!this->render.visible) { + this->UpdateTlvertex(matrix); + return; + } + + if (this->render.unknown_0070 != 6 && this->render.unknown_0070 != 3) { + this->DrawShadow(argument, this->render.scale); + } + if (this->render.enabled) { + this->DrawSprite(argument, this->IsMonsterClass(this->GetEffectiveJob(-1)), 0.0f); + } else { + this->UpdateTlvertex(matrix); + } +} + +// OFFSET: 0x00DA44D0