From d446717a1b80fda656318ee128966de54d975271 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 03:32:51 +0000 Subject: [PATCH] Decompile 4 functions in Source/Resource/EZeffectResource.cpp Batch #11760 by cremane: 1 byte-identical, 3 confirmed by peer review. - fn_07894 EZeffectClip::EZeffectClip: byte-identical - fn_07893 CEZeffectRes::CEZeffectRes: logic confirmed by peer review - fn_07890 CEZeffectRes::Load: logic confirmed by peer review - fn_07897 EZeffectClip::Texture: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Resource/EZeffectResource.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/Resource/EZeffectResource.cpp b/Source/Resource/EZeffectResource.cpp index 19d64500..210c0242 100644 --- a/Source/Resource/EZeffectResource.cpp +++ b/Source/Resource/EZeffectResource.cpp @@ -4,14 +4,17 @@ #include "Resource/EZeffectResource.h" #include "Render/Textures/TextureCache.h" +#include +#include +#include #include // OFFSET: 0x0074D640 // FUNCTION: fn_07894 -EZeffectClip::EZeffectClip() : textureCount(0), unknown_0004(0), frameCount(0), frames(nullptr), textures{} { - for (const char*& name : this->names) { - name = "1.bmp"; - } +EZeffectClip::EZeffectClip() : textureCount(0), unknown_0004(0), frameCount(0), frames(nullptr) { + const char* const defaultName = "1.bmp"; + std::fill_n(this->names, std::size(this->names), defaultName); + std::fill_n(this->textures, std::size(this->textures), nullptr); } // OFFSET: 0x0074D790 @@ -26,7 +29,8 @@ EZeffectClip::~EZeffectClip() { // OFFSET: 0x0074D570 // FUNCTION: fn_07893 -CEZeffectRes::CEZeffectRes() : unknown_D320(0) { +CEZeffectRes::CEZeffectRes() { + this->unknown_D320 = 0; } // OFFSET: 0x0074D6F0 @@ -45,8 +49,7 @@ bool CEZeffectRes::Load(const char* name) { auto& file = this->m_file; if (!file.Open(name, 0, true, false)) { - const std::string message = std::string("Str::Cannot find File : ") + name; - ShowErrorDialog(GetRenderSystemHolder()->system, message.c_str(), 0); + ShowErrorDialog(GetRenderSystemHolder()->system, (std::string("Str::Cannot find File : ") + std::string(name)).c_str(), 0); this->Unload(); return false; @@ -99,7 +102,7 @@ CTexture* EZeffectClip::Texture(int index) { } if (!this->textures[index]) { - std::string path = std::string("effect\\") + this->names[index]; + std::string path = std::format("effect\\{}", this->names[index]); if (path.find_last_of('.') == std::string::npos) { path.append(".bmp", 4);