From 3a66ea587a966c552e131b862306eadd4ddda0af Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 11:45:24 +0000 Subject: [PATCH] Maintenance: B3': the Display*TextTag wrappers, DisplayTextTag, ExpandTextEscapes and ItemLink's Number are __stdcall in the original Batch #18201 by ragnarok-clanker: forced by an admin (9 lower score(s), 20 changed function(s)); checked with 11 compiled unit(s), including every includer of Source/UI/Text/TextMarkup.h. --- Source/Contents/Items/ItemLink.cpp | 2 +- Source/UI/Text/TextMarkup.cpp | 14 +++++++------- Source/UI/Text/TextMarkup.h | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/Contents/Items/ItemLink.cpp b/Source/Contents/Items/ItemLink.cpp index fa4dbc6b9..4d85bc4fe 100644 --- a/Source/Contents/Items/ItemLink.cpp +++ b/Source/Contents/Items/ItemLink.cpp @@ -10,7 +10,7 @@ namespace { // OFFSET: 0x0087A700 // FUNCTION: fn_11236 - int Number(std::string text) { + int __stdcall Number(std::string text) { char digits[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int result = 0; const int size = static_cast(text.size()) + 1; diff --git a/Source/UI/Text/TextMarkup.cpp b/Source/UI/Text/TextMarkup.cpp index 7b760eea6..83896d9fd 100644 --- a/Source/UI/Text/TextMarkup.cpp +++ b/Source/UI/Text/TextMarkup.cpp @@ -81,7 +81,7 @@ bool HasTextLinks(const std::string& text) { // OFFSET: 0x008791E0 // FUNCTION: fn_11214 -std::string ExpandTextEscapes(const std::string& text) { +std::string __stdcall ExpandTextEscapes(const std::string& text) { std::string result = text; auto position = result.find("\\n"); @@ -123,7 +123,7 @@ std::string RemoveTextColors(const char* text) { // OFFSET: 0x00A7F660 // FUNCTION: fn_16966 -const std::string DisplayTextTag(const std::string& source, const std::string& begin, const std::string& end) { +const std::string __stdcall DisplayTextTag(const std::string& source, const std::string& begin, const std::string& end) { std::string text = source; int position = static_cast(text.find(begin)); @@ -156,31 +156,31 @@ const std::string DisplayTextTag(const std::string& source, const std::string& b // OFFSET: 0x00A7F510 // FUNCTION: fn_16963 -const std::string DisplayItemTextTag(const std::string& text) { +const std::string __stdcall DisplayItemTextTag(const std::string& text) { return DisplayTextTag(text, g_itemTagBegin, g_itemTagEnd); } // OFFSET: 0x00A7F580 // FUNCTION: fn_16964 -const std::string DisplayNavigationTextTag(const std::string& text) { +const std::string __stdcall DisplayNavigationTextTag(const std::string& text) { return DisplayTextTag(text, g_naviTagBegin, g_naviTagEnd); } // OFFSET: 0x00A7F5F0 // FUNCTION: fn_16965 -const std::string DisplayQuestTextTag(const std::string& text) { +const std::string __stdcall DisplayQuestTextTag(const std::string& text) { return DisplayTextTag(text, g_questTagBegin, g_questTagEnd); } // OFFSET: 0x00A7FE50 // FUNCTION: fn_16967 -const std::string DisplayTipBoxTextTag(const std::string& text) { +const std::string __stdcall DisplayTipBoxTextTag(const std::string& text) { return DisplayTextTag(text, g_tipBoxTagBegin, g_tipBoxTagEnd); } // OFFSET: 0x00A7FEC0 // FUNCTION: fn_16968 -const std::string DisplayUrlTextTag(const std::string& text) { +const std::string __stdcall DisplayUrlTextTag(const std::string& text) { return DisplayTextTag(text, g_urlTagBegin, g_urlTagEnd); } diff --git a/Source/UI/Text/TextMarkup.h b/Source/UI/Text/TextMarkup.h index 460332d8f..29b76e27a 100644 --- a/Source/UI/Text/TextMarkup.h +++ b/Source/UI/Text/TextMarkup.h @@ -14,14 +14,14 @@ struct TextLink { }; bool HasTextLinks(const std::string& text); -std::string ExpandTextEscapes(const std::string& text); +std::string __stdcall ExpandTextEscapes(const std::string& text); std::string RemoveTextColors(const char* text); -const std::string DisplayTextTag(const std::string& source, const std::string& begin, const std::string& end); -const std::string DisplayItemTextTag(const std::string& text); -const std::string DisplayNavigationTextTag(const std::string& text); -const std::string DisplayQuestTextTag(const std::string& text); -const std::string DisplayTipBoxTextTag(const std::string& text); -const std::string DisplayUrlTextTag(const std::string& text); +const std::string __stdcall DisplayTextTag(const std::string& source, const std::string& begin, const std::string& end); +const std::string __stdcall DisplayItemTextTag(const std::string& text); +const std::string __stdcall DisplayNavigationTextTag(const std::string& text); +const std::string __stdcall DisplayQuestTextTag(const std::string& text); +const std::string __stdcall DisplayTipBoxTextTag(const std::string& text); +const std::string __stdcall DisplayUrlTextTag(const std::string& text); const std::string RemoveTextLinkInfo(const std::string& source); void __stdcall ExtractTextLinks(const std::string& source, const std::string& begin, const std::string& end, std::vector& links); void __stdcall ExtractNavigationTextLinks(const std::string& text, std::vector& links);