Decompile fn_07897 (EZeffectClip::Texture)

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

- fn_07897 EZeffectClip::Texture: logic confirmed by peer review

Peer-reviewed-by: youko, kyoshi
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-10 15:39:34 +00:00
commit 498483a238

View file

@ -98,25 +98,25 @@ void CEZeffectRes::Unload() {
// OFFSET: 0x0074D850
// FUNCTION: fn_07897
CTexture* EZeffectClip::Texture(int index) {
if (index >= this->textureCount) {
return g_texMgr.Default();
}
if (index < this->textureCount) {
if (!this->textures[index]) {
std::string path = std::format("effect\\{}", this->names[index]);
if (!this->textures[index]) {
std::string path = std::format("effect\\{}", this->names[index]);
if (path.find_last_of('.') == std::string::npos) {
path.append(".bmp", 4);
}
if (path.find_last_of('.') == std::string::npos) {
path.append(".bmp", 4);
this->textures[index] = g_texMgr.Load(path.c_str(), 1, false, true, false);
if (this->textures[index]) {
this->textures[index]->Retain();
}
}
this->textures[index] = g_texMgr.Load(path.c_str(), 1, false, true, false);
if (this->textures[index]) {
this->textures[index]->Retain();
}
return this->textures[index];
}
return this->textures[index];
return g_texMgr.Default();
}
// OFFSET: 0x0074D9A0