From 087a98ab81df560ebaf423627caa7aaa2681f5b8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 20:08:08 +0000 Subject: [PATCH] Decompile fn_07779 (CTokenizer::operator[]) Batch #13554 by SapitoSucio: 1 byte-identical, 0 confirmed by peer review. - fn_07779 CTokenizer::operator[]: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Client/Application/ErrorDialog.cpp | 6 ++++++ Source/Client/Application/ErrorDialog.h | 1 + Source/Resource/GifResource.cpp | 2 +- Source/Utility/Tokenizer.cpp | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/Client/Application/ErrorDialog.cpp b/Source/Client/Application/ErrorDialog.cpp index 0782c1acd..b847cdb3f 100644 --- a/Source/Client/Application/ErrorDialog.cpp +++ b/Source/Client/Application/ErrorDialog.cpp @@ -13,6 +13,12 @@ int ShowErrorDialog(const std::string& text, const UINT& type) { // OFFSET: 0x00AD6360 // FUNCTION: fn_17828 +int ShowErrorDialog(const char* text, UINT type) { + GetRenderSystemHolder()->PrepareErrorDialog(); + return MessageBoxA(nullptr, text, "Error", type); +} + +// INLINED int ShowErrorDialog(CRenderSystemBase* renderSystem, const char* text, UINT type) { if (renderSystem) { renderSystem->PrepareErrorDialog(); diff --git a/Source/Client/Application/ErrorDialog.h b/Source/Client/Application/ErrorDialog.h index be58e98ec..a3bbf14de 100644 --- a/Source/Client/Application/ErrorDialog.h +++ b/Source/Client/Application/ErrorDialog.h @@ -7,6 +7,7 @@ class CRenderSystemBase; int ShowErrorDialog(const std::string& text, const UINT& type); +int ShowErrorDialog(const char* text, UINT type); int ShowErrorDialog(CRenderSystemBase* renderSystem, const char* text, UINT type); int ShowErrorDialog(int code); diff --git a/Source/Resource/GifResource.cpp b/Source/Resource/GifResource.cpp index a88e3968f..ce72b1bfc 100644 --- a/Source/Resource/GifResource.cpp +++ b/Source/Resource/GifResource.cpp @@ -117,7 +117,7 @@ bool CGifRes::Decode(const char* name, const void* data, int bytes, bool iconOnl return this->image.DecodePng(data, bytes, name); } - ShowErrorDialog(GetRenderSystemHolder()->system, "Unsupport fileformat!", 0); + ShowErrorDialog("Unsupport fileformat!", 0); return false; } diff --git a/Source/Utility/Tokenizer.cpp b/Source/Utility/Tokenizer.cpp index b4d29a1da..7fa8b8445 100644 --- a/Source/Utility/Tokenizer.cpp +++ b/Source/Utility/Tokenizer.cpp @@ -8,9 +8,9 @@ // FUNCTION: fn_07779 std::string& CTokenizer::operator[](int index) { if (index < 0 || static_cast(index) >= this->tokens.size()) { - ShowErrorDialog(GetRenderSystemHolder()->system, "Error in CTokenizer :: operator []", 0); + ShowErrorDialog("Error in CTokenizer :: operator []", 0); for (unsigned int token = 0; token < this->tokens.size(); ++token) { - ShowErrorDialog(GetRenderSystemHolder()->system, this->tokens[token].c_str(), 0); + ShowErrorDialog(this->tokens[token].c_str(), 0); } }