Decompile fn_07476 (CStarEmperorEffect::BuildSphere)

Batch #18263 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_07476 CStarEmperorEffect::BuildSphere: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, alisonrag, bibinir
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-11-12 14:48:06 +00:00
commit 1b7ac8a70c

View file

@ -15,14 +15,13 @@ CStarEmperorEffect::CStarEmperorEffect() : CEffect(-1), sphere(), rings() {
// OFFSET: 0x0072BE20
// FUNCTION: fn_07476
void CStarEmperorEffect::BuildSphere() {
for (int row = 0; row < 6;) {
for (int row = 0; row < 6; ++row) {
const float top = static_cast<float>(row) * 0.16666667f;
const float bottom = static_cast<float>(row + 1) * 0.16666667f;
const float topPitch = (static_cast<float>(row) * 30.0f - 90.0f) / 180.0f * 3.141592f;
++row;
const float bottom = static_cast<float>(row) * 0.16666667f;
const float bottomPitch = (static_cast<float>(row) * 30.0f - 90.0f) / 180.0f * 3.141592f;
const float bottomPitch = (static_cast<float>(row + 1) * 30.0f - 90.0f) / 180.0f * 3.141592f;
for (int column = 0; column < 12;) {
for (int column = 0; column < 12; ++column) {
CParticle* particle = CreateParticle(reinterpret_cast<const vector3d*>(this->position), 1);
particle->SetTexture("effect\\star_emperor\\boom.tga");
@ -30,8 +29,7 @@ void CStarEmperorEffect::BuildSphere() {
const float left = leftYaw * 0.083333336f;
particle->vertices[0].u = left < 0.0f ? 0.0f : (left > 1.0f ? 1.0f : left);
particle->vertices[0].v = top < 0.0f ? 0.0f : (top > 1.0f ? 1.0f : top);
++column;
float rightYaw = static_cast<float>(column);
float rightYaw = static_cast<float>(column + 1);
const float right = rightYaw * 0.083333336f;
particle->vertices[1].u = right < 0.0f ? 0.0f : (right > 1.0f ? 1.0f : right);
particle->vertices[1].v = top < 0.0f ? 0.0f : (top > 1.0f ? 1.0f : top);