From f42c9f11495be02cf69ece37ec1aafdd80373451 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 8 Nov 2026 00:15:28 +0000 Subject: [PATCH] Decompile fn_07963 (C3dGrannyModelRes::Load) Batch #14867 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_07963 C3dGrannyModelRes::Load: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, codeplay, NYD Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Resource/Models/AnimatedModelResource.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Resource/Models/AnimatedModelResource.cpp b/Source/Resource/Models/AnimatedModelResource.cpp index bc8351e75..5f5c2cc7c 100644 --- a/Source/Resource/Models/AnimatedModelResource.cpp +++ b/Source/Resource/Models/AnimatedModelResource.cpp @@ -320,15 +320,11 @@ bool C3dGrannyModelRes::Load(const char* name) { this->file = GrannyReadEntireFileFromMemory(file.GetSize(), file.GetData()); file.Close(); - if (!this->file) { - ShowErrorDialog("Unable to load file .gr2 (C3dGrannyModelRes :: Load)", 0); - } else { + if (this->file) { granny_file_info* info = GrannyGetFileInfo(this->file); std::strcpy(this->fileName, name); - if (!info) { - ShowErrorDialog("Unable to access file data .gr2", 0); - } else { + if (info) { this->textureCount = info->textureCount; this->textures = new GrannyTextureEntry[this->textureCount]; @@ -358,12 +354,16 @@ bool C3dGrannyModelRes::Load(const char* name) { } result = true; + } else { + ShowErrorDialog("Unable to access file data .gr2", 0); } GrannyFreeFileSection(this->file, 1); GrannyFreeFileSection(this->file, 2); GrannyFreeFileSection(this->file, 4); GrannyFreeFileSection(this->file, 5); + } else { + ShowErrorDialog("Unable to load file .gr2 (C3dGrannyModelRes :: Load)", 0); } this->unknown_0110 = 1920.0f;