rodecomp/Source/Contents/Effects/TetraBallEffect.cpp
ragnarok-clanker 804b2d4d7a Decompile 10 functions in Source/Contents/Effects/TetraBallEffect.cpp, Source/Contents/Effects/TetraBallEffect.h, ...
Batch #3793 by eAthena: 0 byte-identical, 10 confirmed by peer review.

- fn_07514 CTetraBallEffect::ActiveCount: logic confirmed by peer review (annotation added to existing code)
- fn_07517 CTetraBallEffect::Slot03: logic confirmed by peer review (annotation added to existing code)
- fn_07518 CTetraBallEffect::Slot04: logic confirmed by peer review (annotation added to existing code)
- fn_07519 CTetraBallEffect::Spread: logic confirmed by peer review (annotation added to existing code)
- fn_07520 CTetraBallEffect::MoveFirstTo: logic confirmed by peer review (annotation added to existing code)
- fn_07521 CTriangleShotArrow::CTriangleShotArrow: logic confirmed by peer review (annotation added to existing code)
- fn_07525 CTriangleShotArrow::Slot06: logic confirmed by peer review (annotation added to existing code)
- fn_07527 CTriangleShotArrow::Slot04: logic confirmed by peer review (annotation added to existing code)
- fn_07528 CTriangleShotArrow::Slot16: logic confirmed by peer review (annotation added to existing code)
- fn_07529 CViolentQuakeEffect::CViolentQuakeEffect: logic confirmed by peer review (annotation added to existing code)

Peer-reviewed-by: youko, superintelligence
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 23:25:11 +00:00

73 lines
1.7 KiB
C++

#include "Contents/Effects/TetraBallEffect.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Camera/Camera.h"
#include "Contents/Effects/Particle.h"
// OFFSET: 0x0072EA90
// FUNCTION: fn_07514
unsigned char CTetraBallEffect::ActiveCount() {
unsigned char count = 0;
for (int index = 0; index < 5; ++index) {
if (this->balls[index]) {
++count;
}
}
return count;
}
// OFFSET: 0x0072EB00
// FUNCTION: fn_07516
bool CTetraBallEffect::Slot06() {
return this->ActorExists();
}
// OFFSET: 0x0072EB10
// FUNCTION: fn_07517
void CTetraBallEffect::Slot03() {
for (int index = 0; index < 5; ++index) {
CEZ2STRParticle* ball = this->balls[index];
if (ball) {
ball->position.x = this->position[0];
ball->position.y = this->position[1];
ball->position.z = this->position[2];
ball->Process(0.0f, 0.0f, 0.0f);
++ball->unknown_00E8;
}
}
}
// OFFSET: 0x0072EBD0
// FUNCTION: fn_07518
void CTetraBallEffect::Slot04() {
for (int index = 0; index < 5; ++index) {
if (this->balls[index]) {
this->balls[index]->DrawScreen(static_cast<CGameMode*>(g_modeMgr.GetGameMode())->camera->frame.view);
}
}
}
// OFFSET: 0x0072EC40
// FUNCTION: fn_07519
void CTetraBallEffect::Spread() {
const unsigned char count = this->ActiveCount();
if (count > 1) {
for (int index = 0; index < 5; ++index) {
if (this->balls[index]) {
this->balls[index]->Restart();
this->balls[index]->Advance(static_cast<float>(index) / static_cast<float>(count));
}
}
}
}
// OFFSET: 0x0072ECD0
// FUNCTION: fn_07520
void CTetraBallEffect::MoveFirstTo(int index) {
if (index != 0) {
this->balls[index] = this->balls[0];
this->balls[0] = nullptr;
}
}