From e084db99bdb662fd91e0b68e42cde6fed47da019 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 9 Nov 2026 08:23:13 +0000 Subject: [PATCH] Decompile fn_15036 (EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate) Batch #15063 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_15036 EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Item/UIEquipmentPropertiesWnd.cpp | 30 +++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp index eafc6db15..0549cf010 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp @@ -15,6 +15,7 @@ #include "Utility/Text/StringUtil.h" #include "Resource/MSGSTRINGID.h" +#include #include #include #include @@ -23,6 +24,8 @@ #include #include +extern template bool std::_Traits_equal>(const char*, std::size_t, const char*, std::size_t) noexcept; + namespace EquipmentProperties { class CEquipmentPropertiesMgr { public: @@ -275,6 +278,13 @@ public: } } + // INLINED + explicit EncryptedName(const std::array& source) : m_encrypted(true) { + for (std::uint64_t index = 0; index < Length; ++index) { + this->m_text[index] = source[index]; + } + } + ~EncryptedName() { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = 0; @@ -888,10 +898,12 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate(int width, this->labelText->SetText(""); this->labelText->SetFitText(0); this->labelText->SetAlign(6, 0); - const char titleFontSource[] = {'\x9E', '\x8C', '\x8D', '\x8A', '\x00', '\x15'}; - // GLOBAL: gl_25121 - thread_local EncryptedName titleFont(titleFontSource); - this->labelText->SetFont(std::string(titleFont.Text())); + this->labelText->SetFont(std::string([] { + const char source[] = {'\x9E', '\x8C', '\x8D', '\x8A', '\x00', '\x15'}; + // GLOBAL: gl_25121 + thread_local EncryptedName name(source); + return name.Text(); + }())); this->labelText->SetFontHeight(12); this->labelText->SetBold(0); this->labelText->SetColor(0xFF2A00); @@ -905,10 +917,12 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate(int width, this->valueText->SetText(""); this->valueText->SetFitText(1); this->valueText->SetAlign(0, 0); - const char textFontSource[] = {'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}; - // GLOBAL: gl_25122 - thread_local EncryptedName textFont(textFontSource); - this->valueText->SetFont(std::string(textFont.Text())); + this->valueText->SetFont(std::string([] { + const char source[] = {'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}; + // GLOBAL: gl_25122 + thread_local EncryptedName name(source); + return name.Text(); + }())); this->valueText->SetFontHeight(12); this->valueText->SetBold(0); this->valueText->SetColor(0);