Decompile fn_18892 (CGlassWall::Open)

Batch #14972 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_18892 CGlassWall::Open: logic confirmed by peer review

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-09 01:33:04 +00:00
commit a8fc1dbac0
2 changed files with 9 additions and 9 deletions

View file

@ -17,7 +17,7 @@ CGlassWall::~CGlassWall() {
// OFFSET: 0x00B44860
// FUNCTION: fn_18890
void CGlassWall::AddPanel(float angle, float scale, float x, float y, float z) {
void CGlassWall::AddPanel(float angle, float scale, vector3d offset) {
const int startFrame = this->effectLifetime - 6;
CParticle* particle = CreateParticle(reinterpret_cast<const vector3d*>(this->position), 1);
float* params = &particle->animationParameter;
@ -25,9 +25,9 @@ void CGlassWall::AddPanel(float angle, float scale, float x, float y, float z) {
particle->speedParameter = 0.25f;
particle->alpha = 0;
*reinterpret_cast<float*>(&particle->angleBits) = angle;
particle->offsetX = x;
particle->offsetY = y;
particle->offsetZ = z;
particle->offsetX = offset.x;
particle->offsetY = offset.y;
particle->offsetZ = offset.z;
params[0] = 40.0f;
params[1] = 30.0f;
params[2] = static_cast<float>(startFrame);
@ -62,10 +62,10 @@ void CGlassWall::Open() {
const float depth = 2.6f;
const float scale = 3.0f;
this->AddPanel(static_cast<float>(angle + 90), scale, 0.0f, 0.0f, depth);
this->AddPanel(static_cast<float>(angle + 90), scale, 0.0f, 0.0f, -depth);
this->AddPanel(static_cast<float>(angle), depth, scale, 0.0f, 0.0f);
this->AddPanel(static_cast<float>(angle), depth, -scale, 0.0f, 0.0f);
this->AddPanel(static_cast<float>(angle + 90), scale, vector3d{0.0f, 0.0f, depth});
this->AddPanel(static_cast<float>(angle + 90), scale, vector3d{0.0f, 0.0f, -depth});
this->AddPanel(static_cast<float>(angle), depth, vector3d{scale, 0.0f, 0.0f});
this->AddPanel(static_cast<float>(angle), depth, vector3d{-scale, 0.0f, 0.0f});
this->effect = new CEZ2STRScreenEffect();
this->effect->SetActor(this->actor);

View file

@ -17,7 +17,7 @@ public:
void Close() override;
bool IsAlive() override;
void AddPanel(float angle, float scale, float x, float y, float z);
void AddPanel(float angle, float scale, vector3d offset);
/* 00CC */ std::vector<CParticle*> particles;
/* 00D8 */ CEffect* effect;