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).
This commit is contained in:
parent
024a6d8091
commit
2efb4eb8c3
1 changed files with 29 additions and 0 deletions
|
|
@ -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<float>((timeGetTime() - this->render.unknown_008C) / 24.0);
|
||||
if (frame > static_cast<float>(this->lifetime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
if (mode) {
|
||||
const float half = static_cast<float>(this->lifetime / 2);
|
||||
float alpha;
|
||||
if (frame > half) {
|
||||
const float rise = frame - half;
|
||||
const float span = static_cast<float>(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<GroundSlot15>((*reinterpret_cast<void***>(ground))[15])(ground, alpha, this->screenX, this->screenY);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DA4960
|
||||
// FUNCTION: fn_22417
|
||||
void CSoundMaker::Render(int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue