From 2efb4eb8c302e65a48f7bb9c1ca8d00eb455bb32 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 17:46:34 +0000 Subject: [PATCH] Decompile fn_22399 (CGndRiser::OnProcess) Batch #5912 by superintelligence: 0 byte-identical, 1 confirmed by peer review. - fn_22399 CGndRiser::OnProcess: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, ntrl, System4z Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Sound/SoundMaker.cpp | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp index 5c8ce175..30423e5d 100644 --- a/Source/Contents/Sound/SoundMaker.cpp +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -5,6 +5,7 @@ #include "Contents/Actors/GndRiser.h" #include "Contents/Actors/Npc.h" #include "Contents/Actors/Pc.h" +#include "Contents/MapSkyMgr.h" #include "Contents/Sound/SoundMgr.h" #include "Client/Mode/ModeMgr.h" #include "Client/Mode/CGameMode.h" @@ -353,6 +354,34 @@ void CPc::Slot57(int value) { void CGndRiser::Render(int) { } +// OFFSET: 0x00DA30B0 +// FUNCTION: fn_22399 +bool CGndRiser::OnProcess() { + const float frame = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + if (frame > static_cast(this->lifetime)) { + return false; + } + + CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); + if (mode) { + const float half = static_cast(this->lifetime / 2); + float alpha; + if (frame > half) { + const float rise = frame - half; + const float span = static_cast(this->lifetime) * g_depthAverageHalf; + alpha = (rise * rise - span * span) / 25.0f; + } else { + alpha = -(frame * frame) / 25.0f; + } + + using GroundSlot15 = void(__thiscall*)(GroundGeometry*, float, int, int); + GroundGeometry* ground = mode->scene->ground; + reinterpret_cast((*reinterpret_cast(ground))[15])(ground, alpha, this->screenX, this->screenY); + } + + return true; +} + // OFFSET: 0x00DA4960 // FUNCTION: fn_22417 void CSoundMaker::Render(int) {