Decompile fn_07205 (CDancingKnifeEffect::Slot04)

Batch #3635 by superintelligence: 0 byte-identical, 1 confirmed by peer review.

- fn_07205 CDancingKnifeEffect::Slot04: logic confirmed by peer review

Peer-reviewed-by: meitogi
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-29 22:53:52 +00:00
commit 0ada5577df
2 changed files with 111 additions and 3 deletions

View file

@ -85,6 +85,11 @@ bool CSpriteMableEffect::Slot06() {
return this->ActorExists();
}
// OFFSET: 0x0070D300
// FUNCTION: fn_07148
CStemSpearEffect::CStemSpearEffect() : CEffect(1100) {
}
// OFFSET: 0x0070D660
// FUNCTION: fn_07153
bool CStemSpearEffect::Slot06() {
@ -97,6 +102,11 @@ bool CStemSpearEffect::Slot06() {
return false;
}
// OFFSET: 0x0070D850
// FUNCTION: fn_07156
CSvgSpiritEffect::CSvgSpiritEffect() : CEffect(1128) {
}
// OFFSET: 0x0070D690
// OFFSET: 0x0070DB30
@ -107,12 +117,23 @@ bool CSvgSpiritEffect::Slot06() {
// OFFSET: 0x0070DB50
// OFFSET: 0x0070DCF0
// FUNCTION: fn_07163
CTunaPartyEffect::CTunaPartyEffect() : CEffect(1097) {
}
// OFFSET: 0x0070DF30
// FUNCTION: fn_07167
bool CTunaPartyEffect::Slot06() {
return this->ActorExists();
}
// OFFSET: 0x0070E0C0
// FUNCTION: fn_07170
CCurseOfCubeEffect::CCurseOfCubeEffect()
: CEffect(-1), unknown_00D8(0), unknown_00DC(0), unknown_00E0(-10.0f), unknown_00E4(0) {
}
// OFFSET: 0x0070EB60
// FUNCTION: fn_07178
bool CCurseOfCubeEffect::Slot06() {
@ -131,6 +152,11 @@ void CCurseOfCubeEffect::Slot04() {
}
}
// OFFSET: 0x0070F0D0
// FUNCTION: fn_07181
CWarningPlaneEffect::CWarningPlaneEffect() : CEffect(1114), fadingIn(0), expireTime(0) {
}
// OFFSET: 0x0070F350
// FUNCTION: fn_07185
void CWarningPlaneEffect::Slot01() {
@ -155,6 +181,22 @@ void CWarningPlaneEffect::Slot04() {
}
}
// OFFSET: 0x0070FFA0
// FUNCTION: fn_07196
void CCylinderEffect::Slot04() {
for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) {
CEZ2STRParticle* particle = AsParticle(*it);
if (!particle) {
continue;
}
const int texPart = particle->unknown_000C;
const ParticleQuad quad = {false, 0.0f, static_cast<float>(texPart + 1) / 21.0, 1.0f,
static_cast<float>(texPart) / 21.0, false, true};
particle->Render(quad);
}
}
// OFFSET: 0x007100D0
// FUNCTION: fn_07197
CDancingKnifeEffect::CDancingKnifeEffect() : CEffect(1829) {
@ -166,6 +208,22 @@ bool CDancingKnifeEffect::Slot06() {
return this->ActorExists();
}
// OFFSET: 0x00710A20
// FUNCTION: fn_07205
void CDancingKnifeEffect::Slot04() {
for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) {
if (*it) {
AsParticle(*it)->DrawScreen(static_cast<CGameMode*>(g_modeMgr.GetGameMode())->camera->frame.view);
}
}
for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) {
if (*it) {
AsParticle(*it)->DrawScreen(static_cast<CGameMode*>(g_modeMgr.GetGameMode())->camera->frame.view);
}
}
}
// OFFSET: 0x00710AE0
// FUNCTION: fn_07206
CEternalSlashAttackEffect::CEternalSlashAttackEffect() : CEffect(-1) {
@ -268,6 +326,23 @@ bool CFallenAngelEffect::Slot06() {
return static_cast<float>(this->emitter->elapsed) < this->emitter->lifetime * 60.0f;
}
// OFFSET: 0x007116D0
// FUNCTION: fn_07225
void CFallenAngelEffect::Slot03() {
EZ2STREmitter* emitter = this->emitter;
const vector3d start = emitter->position;
const float dx = this->unknown_00D0 - this->position[0];
const float dz = this->unknown_00D8 - this->position[2];
const float speed = 1.0f / SquareRoot(dx * dx + dz * dz);
AsParticle(emitter)->Process(0.0f, -80.0f, 0.0f);
emitter->position.x = start.x + dx * speed * 0.9f;
emitter->position.y = start.y;
emitter->position.z = start.z + dz * speed * 0.9f;
emitter->elapsed++;
}
// OFFSET: 0x007117F0
// FUNCTION: fn_07226
void CFallenAngelEffect::Slot04() {
@ -535,6 +610,26 @@ void CRandomOptEffect::Slot11(std::string name) {
}
}
// OFFSET: 0x00721430
// FUNCTION: fn_07373
void CRandomOptEffect::Slot04() {
for (auto it = this->particles.begin(); it != this->particles.end(); ++it) {
CParticle* particle = *it;
if (!particle) {
continue;
}
const int texPart = particle->unknown_000C;
if (texPart <= 0) {
continue;
}
const ParticleQuad quad = {false, 0.0f, static_cast<float>(texPart) / 21.0f, 1.0f,
static_cast<float>(texPart - 1) / 21.0f, false, true};
particle->Render(quad);
}
}
// OFFSET: 0x00721560
// FUNCTION: fn_07374
CRichsCoinEffect::CRichsCoinEffect() : CEffect(1135), unknown_00E4(0) {

View file

@ -38,6 +38,7 @@ public:
class CStemSpearEffect : public CEffect {
public:
CStemSpearEffect();
void Slot03() override;
bool Slot06() override;
@ -46,6 +47,7 @@ public:
class CSvgSpiritEffect : public CEffect {
public:
CSvgSpiritEffect();
void Slot03() override;
bool Slot06() override;
@ -54,6 +56,7 @@ public:
class CTunaPartyEffect : public CEffect {
public:
CTunaPartyEffect();
bool Slot06() override;
/* 00CC */ std::vector<EZ2STREmitter*> emitters;
@ -61,14 +64,20 @@ public:
class CCurseOfCubeEffect : public CEffect {
public:
CCurseOfCubeEffect();
void Slot04() override;
bool Slot06() override;
/* 00CC */ std::vector<EZ2STREmitter*> emitters;
/* 00D8 */ int unknown_00D8;
/* 00DC */ int unknown_00DC;
/* 00E0 */ float unknown_00E0;
/* 00E4 */ int unknown_00E4;
};
class CWarningPlaneEffect : public CEffect {
public:
CWarningPlaneEffect();
void Slot01() override;
void Slot04() override;
bool Slot06() override;
@ -82,6 +91,7 @@ public:
class CCylinderEffect : public CEffect {
public:
CCylinderEffect();
void Slot04() override;
bool Slot06() override;
/* 00CC */ unsigned int startTime;
@ -91,6 +101,7 @@ public:
class CDancingKnifeEffect : public CEffect {
public:
CDancingKnifeEffect();
void Slot04() override;
bool Slot06() override;
/* 00CC */ std::vector<EZ2STREmitter*> emitters;
@ -121,13 +132,14 @@ public:
class CFallenAngelEffect : public CEffect {
public:
CFallenAngelEffect();
void Slot03() override;
void Slot04() override;
bool Slot06() override;
/* 00CC */ EZ2STREmitter* emitter;
/* 00D0 */ int unknown_00D0;
/* 00D4 */ int unknown_00D4;
/* 00D8 */ int unknown_00D8;
/* 00D0 */ float unknown_00D0;
/* 00D4 */ float unknown_00D4;
/* 00D8 */ float unknown_00D8;
};
class CFloralFlareRoad : public CEffect {
@ -216,6 +228,7 @@ public:
class CRandomOptEffect : public CEffect {
public:
CRandomOptEffect();
void Slot04() override;
void Slot08(int red, int green, int blue) override;
void Slot11(std::string name) override;