diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index b90f051ec..c9ef7a5fd 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -27,9 +27,30 @@ namespace { +template +class EncryptedSource { +public: + // INLINED + template + constexpr explicit EncryptedSource(const Byte (&source)[Length]) : data{} { + for (std::size_t index = 0; index < Length; ++index) { + this->data[index] = static_cast(source[index]); + } + } + + char data[Length]; +}; + template class EncryptedName { public: + // INLINED + explicit EncryptedName(const EncryptedSource& source) : m_encrypted(true) { + for (std::uint64_t index = 0; index < Length; ++index) { + this->m_text[index] = static_cast(source.data[index]); + } + } + // INLINED explicit EncryptedName(const char (&source)[Length]) : m_encrypted(true) { for (std::uint64_t index = 0; index < Length; ++index) { @@ -171,13 +192,15 @@ void CUIAdventureGuide::Slot15(int width, int height) { this->background->Move(0, 0); { CUIStaticImage* background = this->background; - const char backgroundImageSource[] = { + background->SetImage(std::string([]() { + constexpr char bytes[] = { '\x49', '\x74', '\xA3', '\x83', '\x2B', '\x55', '\x0A', '\x7E', '\x4F', '\x3F', '\xA3', '\xB5', '\x56', '\x21', '\x93', '\xF2', '\xED', '\xAD', '\x06', '\x17', '\x9F', '\xEE', '\xBD', '\xD6', '\xCE', '\xAE', '\x0A', '\x1D', '\x8E', '\xC7', '\xAD', '\xD4', '\xD6', '\xBC', '\x16', '\x10', '\x8F', '\xFE', '\xE1', '\xD1', '\xE4', '\xAB', '\x63'}; - thread_local EncryptedName backgroundImageName(backgroundImageSource); - const std::string backgroundImage(backgroundImageName.Text()); - background->SetImage(backgroundImage); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0xB3CF9BEB7963DB89ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->background); @@ -186,39 +209,47 @@ void CUIAdventureGuide::Slot15(int width, int height) { this->titleBar->Move(0, 0); { CUITitleBar* titleBar = this->titleBar; - const char titleRightSource[] = { - '\x5F', '\x56', '\x81', '\x37', '\x39', '\xA5', '\x62', '\x7A', '\x59', '\x1D', '\x81', '\x01', '\x44', '\xD1', '\xFB', '\xD5', '\xFE', '\x8A', '\x28', - '\xAE', '\xA6', '\x02', '\xC9', '\xC3', '\xFA', '\x8B', '\x27', '\xAC', '\x9A', '\x0E', '\xFB', '\xC3', '\xF6', '\x8D', '\x2D', '\xA8', '\x9B', '\x0A', - '\xD5', '\xE8', '\xED', '\x90', '\x26', '\xA5', '\x8D', '\x45', '\xC5', '\xDA', '\xEF', '\xF9'}; - thread_local EncryptedName titleRightName(titleRightSource); - const std::string titleRight(titleRightName.Text()); - const char titleMiddleSource[] = { - '\x7F', '\x2A', '\xE7', '\x87', '\x93', '\xED', '\x3E', '\x2E', '\x79', '\x61', '\xE7', '\xB1', '\xEE', '\x99', '\xA7', '\x81', '\xDE', '\xF6', '\x4E', - '\x1E', '\x0C', '\x4A', '\x95', '\x97', '\xDA', '\xF7', '\x41', '\x1C', '\x30', '\x46', '\xA7', '\x97', '\xD6', '\xF1', '\x4B', '\x18', '\x31', '\x42', - '\x89', '\xBC', '\xD2', '\xEC', '\x43', '\x53', '\x31', '\x4E', '\x8B', '\xE3'}; - thread_local EncryptedName titleMiddleName(titleMiddleSource); - const std::string titleMiddle(titleMiddleName.Text()); - const char titleLeftSource[] = { + titleBar->SetImages(std::string([]() { + constexpr char bytes[] = { '\x23', '\xF8', '\xD5', '\xA7', '\xD7', '\x4F', '\x1E', '\xD2', '\x25', '\xB3', '\xD5', '\x91', '\xAA', '\x3B', '\x87', '\x7D', '\x82', '\x24', '\x7C', '\x3E', '\x48', '\xE8', '\xB5', '\x6B', '\x86', '\x25', '\x73', '\x3C', '\x74', '\xE4', '\x87', '\x6B', '\x8A', '\x23', '\x79', '\x38', '\x75', '\xE0', '\xA9', '\x40', '\x8F', '\x32', '\x73', '\x29', '\x39', '\xE3', '\xB6', '\x6F', '\xE3'}; - thread_local EncryptedName titleLeftName(titleLeftSource); - const std::string titleLeft(titleLeftName.Text()); - titleBar->SetImages(titleLeft, titleMiddle, titleRight); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x1FDB81175D1557E3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x7F', '\x2A', '\xE7', '\x87', '\x93', '\xED', '\x3E', '\x2E', '\x79', '\x61', '\xE7', '\xB1', '\xEE', '\x99', '\xA7', '\x81', '\xDE', '\xF6', '\x4E', + '\x1E', '\x0C', '\x4A', '\x95', '\x97', '\xDA', '\xF7', '\x41', '\x1C', '\x30', '\x46', '\xA7', '\x97', '\xD6', '\xF1', '\x4B', '\x18', '\x31', '\x42', + '\x89', '\xBC', '\xD2', '\xEC', '\x43', '\x53', '\x31', '\x4E', '\x8B', '\xE3'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xE3FB23537D2785BFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x5F', '\x56', '\x81', '\x37', '\x39', '\xA5', '\x62', '\x7A', '\x59', '\x1D', '\x81', '\x01', '\x44', '\xD1', '\xFB', '\xD5', '\xFE', '\x8A', '\x28', + '\xAE', '\xA6', '\x02', '\xC9', '\xC3', '\xFA', '\x8B', '\x27', '\xAC', '\x9A', '\x0E', '\xFB', '\xC3', '\xF6', '\x8D', '\x2D', '\xA8', '\x9B', '\x0A', + '\xD5', '\xE8', '\xED', '\x90', '\x26', '\xA5', '\x8D', '\x45', '\xC5', '\xDA', '\xEF', '\xF9'}; + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xB7A76BF9CD41F99FULL> name(source); + return name.Text(); + }())); } this->AddChild(this->titleBar); CUIStaticText* title = new CUIStaticText(); title->SetSize(100, 17); title->Move(18, 0); - title->SetText("", 0); + title->SetText(""); title->SetFitText(0); title->SetAlign(0, 6); { - const char titleFontSource[] = {'\x90', '\x32', '\x91', '\x0A', '\x60', '\x39'}; - thread_local EncryptedName titleFontName(titleFontSource); - const std::string titleFont(titleFontName.Text()); - title->SetFont(titleFont); + title->SetFont(std::string([]() { + constexpr char bytes[] = {'\x90', '\x32', '\x91', '\x0A', '\x60', '\x39'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x732B390D63FD47D7ULL> name(source); + return name.Text(); + }())); } title->SetFontHeight(12); title->SetBold(0); @@ -235,31 +266,39 @@ void CUIAdventureGuide::Slot15(int width, int height) { menuButton->disabled = 0; menuButton->Invalidate(); { - const char menuDisabledSource[] = { - '\x49', '\xC4', '\x29', '\x65', '\x8B', '\x91', '\x5C', '\x08', '\x4F', '\x8F', '\x29', '\x53', '\xF6', '\xE5', '\xC5', '\xA7', '\xE8', '\x18', '\x80', - '\xFC', '\x14', '\x36', '\xF7', '\xB1', '\xEC', '\x19', '\x8F', '\xFE', '\x28', '\x3A', '\xC5', '\xB6', '\xF0', '\x18', '\xB6', '\xFD', '\x2A', '\x2C', - '\xFC', '\x9A', '\xE6', '\x0D', '\x8F', '\xB1', '\x29', '\x32', '\xE9', '\xC5'}; - thread_local EncryptedName menuDisabledName(menuDisabledSource); - const std::string menuDisabled(menuDisabledName.Text()); - const char menuPressedSource[] = { - '\xDB', '\x66', '\x01', '\x15', '\x11', '\xB3', '\xCA', '\xAC', '\xDD', '\x2D', '\x01', '\x23', '\x6C', '\xC7', '\x53', '\x03', '\x7A', '\xBA', '\xA8', - '\x8C', '\x8E', '\x14', '\x61', '\x15', '\x7E', '\xBB', '\xA7', '\x8E', '\xB2', '\x18', '\x53', '\x12', '\x62', '\xBA', '\x9E', '\x8D', '\xB0', '\x0E', - '\x6A', '\x3E', '\x74', '\xA7', '\xEF', '\x8D', '\xBC', '\x0D', '\x0F'}; - thread_local EncryptedName menuPressedName(menuPressedSource); - const std::string menuPressed(menuPressedName.Text()); - const char menuHoverSource[] = { - '\xF7', '\xDA', '\x6D', '\x5D', '\x03', '\x6F', '\x56', '\x92', '\xF1', '\x91', '\x6D', '\x6B', '\x7E', '\x1B', '\xCF', '\x3D', '\x56', '\x06', '\xC4', - '\xC4', '\x9C', '\xC8', '\xFD', '\x2B', '\x52', '\x07', '\xCB', '\xC6', '\xA0', '\xC4', '\xCF', '\x2C', '\x4E', '\x06', '\xF2', '\xC5', '\xA2', '\xD2', - '\xF6', '\x00', '\x58', '\x1B', '\x83', '\xC5', '\xAE', '\xD1', '\x93'}; - thread_local EncryptedName menuHoverName(menuHoverSource); - const std::string menuHover(menuHoverName.Text()); - const char menuNormalSource[] = { + menuButton->SetImages(std::string([]() { + constexpr char bytes[] = { '\x47', '\x08', '\x85', '\x89', '\xD5', '\x47', '\xB6', '\xC4', '\x41', '\x43', '\x85', '\xBF', '\xA8', '\x33', '\x2F', '\x6B', '\xE6', '\xD4', '\x2C', '\x10', '\x4A', '\xE0', '\x1D', '\x7D', '\xE2', '\xD5', '\x23', '\x12', '\x76', '\xEC', '\x2F', '\x7A', '\xFE', '\xD4', '\x1A', '\x11', '\x74', '\xFA', '\x16', '\x56', '\xE8', '\xC1', '\x23', '\x5D', '\x77', '\xE4', '\x03', '\x09'}; - thread_local EncryptedName menuNormalName(menuNormalSource); - const std::string menuNormal(menuNormalName.Text()); - menuButton->SetImages(menuNormal, menuHover, menuPressed, menuDisabled); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x097389157345A787ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xF7', '\xDA', '\x6D', '\x5D', '\x03', '\x6F', '\x56', '\x92', '\xF1', '\x91', '\x6D', '\x6B', '\x7E', '\x1B', '\xCF', '\x3D', '\x56', '\x06', '\xC4', + '\xC4', '\x9C', '\xC8', '\xFD', '\x2B', '\x52', '\x07', '\xCB', '\xC6', '\xA0', '\xC4', '\xCF', '\x2C', '\x4E', '\x06', '\xF2', '\xC5', '\xA2', '\xD2', + '\xF6', '\x00', '\x58', '\x1B', '\x83', '\xC5', '\xAE', '\xD1', '\x93'}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0x5F93A1C3A7AD7537ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xDB', '\x66', '\x01', '\x15', '\x11', '\xB3', '\xCA', '\xAC', '\xDD', '\x2D', '\x01', '\x23', '\x6C', '\xC7', '\x53', '\x03', '\x7A', '\xBA', '\xA8', + '\x8C', '\x8E', '\x14', '\x61', '\x15', '\x7E', '\xBB', '\xA7', '\x8E', '\xB2', '\x18', '\x53', '\x12', '\x62', '\xBA', '\x9E', '\x8D', '\xB0', '\x0E', + '\x6A', '\x3E', '\x74', '\xA7', '\xEF', '\x8D', '\xBC', '\x0D', '\x0F'}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0x610F7DD1EFC1C91BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x49', '\xC4', '\x29', '\x65', '\x8B', '\x91', '\x5C', '\x08', '\x4F', '\x8F', '\x29', '\x53', '\xF6', '\xE5', '\xC5', '\xA7', '\xE8', '\x18', '\x80', + '\xFC', '\x14', '\x36', '\xF7', '\xB1', '\xEC', '\x19', '\x8F', '\xFE', '\x28', '\x3A', '\xC5', '\xB6', '\xF0', '\x18', '\xB6', '\xFD', '\x2A', '\x2C', + '\xFC', '\x9A', '\xE6', '\x0D', '\x8F', '\xB1', '\x29', '\x32', '\xE9', '\xC5'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xC5995F4B9FE96B89ULL> name(source); + return name.Text(); + }())); } this->titleBar->AddChild(menuButton); @@ -270,31 +309,39 @@ void CUIAdventureGuide::Slot15(int width, int height) { closeButton->disabled = 0; closeButton->Invalidate(); { - const char closeDisabledSource[] = { - '\x53', '\x34', '\xE5', '\x23', '\xE5', '\xE3', '\x68', '\x90', '\x55', '\x7F', '\xE5', '\x15', '\x98', '\x97', '\xF1', '\x3F', '\xF2', '\xE8', '\x4C', - '\xBA', '\x7A', '\x44', '\xC3', '\x29', '\xF6', '\xE9', '\x43', '\xB8', '\x46', '\x48', '\xF1', '\x2E', '\xEA', '\xE8', '\x7A', '\xBA', '\x49', '\x42', - '\xDE', '\x38', '\xCC', '\xF4', '\x43', '\xBF', '\x0B', '\x4F', '\xC0', '\x2D', '\x93'}; - thread_local EncryptedName closeDisabledName(closeDisabledSource); - const std::string closeDisabled(closeDisabledName.Text()); - const char closePressedSource[] = { - '\x3D', '\x6E', '\xB3', '\xB9', '\xE7', '\x9F', '\xD8', '\xD2', '\x3B', '\x25', '\xB3', '\x8F', '\x9A', '\xEB', '\x41', '\x7D', '\x9C', '\xB2', '\x1A', - '\x20', '\x78', '\x38', '\x73', '\x6B', '\x98', '\xB3', '\x15', '\x22', '\x44', '\x34', '\x41', '\x6C', '\x84', '\xB2', '\x2C', '\x20', '\x4B', '\x3E', - '\x6E', '\x7A', '\xA2', '\xAE', '\x1D', '\x6D', '\x45', '\x3C', '\x6D', '\x1F'}; - thread_local EncryptedName closePressedName(closePressedSource); - const std::string closePressed(closePressedName.Text()); - const char closeHoverSource[] = { - '\xE7', '\x3C', '\xBF', '\xF5', '\x9B', '\xD1', '\xF2', '\xF0', '\xE1', '\x77', '\xBF', '\xC3', '\xE6', '\xA5', '\x6B', '\x5F', '\x46', '\xE0', '\x16', - '\x6C', '\x04', '\x76', '\x59', '\x49', '\x42', '\xE1', '\x19', '\x6E', '\x38', '\x7A', '\x6B', '\x4E', '\x5E', '\xE0', '\x20', '\x6C', '\x37', '\x70', - '\x44', '\x58', '\x78', '\xFC', '\x11', '\x21', '\x39', '\x72', '\x47', '\x3D'}; - thread_local EncryptedName closeHoverName(closeHoverSource); - const std::string closeHover(closeHoverName.Text()); - const char closeNormalSource[] = { + closeButton->SetImages(std::string([]() { + constexpr char bytes[] = { '\xE9', '\x60', '\xE9', '\xFD', '\x23', '\xE7', '\x32', '\xA6', '\xEF', '\x2B', '\xE9', '\xCB', '\x5E', '\x93', '\xAB', '\x09', '\x48', '\xBC', '\x40', '\x64', '\xBC', '\x40', '\x99', '\x1F', '\x4C', '\xBD', '\x4F', '\x66', '\x80', '\x4C', '\xAB', '\x18', '\x50', '\xBC', '\x76', '\x64', '\x8F', '\x46', '\x84', '\x0E', '\x76', '\xA0', '\x4F', '\x61', '\xCD', '\x4B', '\x9A', '\x1B', '\x29'}; - thread_local EncryptedName closeNormalName(closeNormalSource); - const std::string closeNormal(closeNormalName.Text()); - closeButton->SetImages(closeNormal, closeHover, closePressed, closeDisabled); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x6BF729E30729CF29ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xE7', '\x3C', '\xBF', '\xF5', '\x9B', '\xD1', '\xF2', '\xF0', '\xE1', '\x77', '\xBF', '\xC3', '\xE6', '\xA5', '\x6B', '\x5F', '\x46', '\xE0', '\x16', + '\x6C', '\x04', '\x76', '\x59', '\x49', '\x42', '\xE1', '\x19', '\x6E', '\x38', '\x7A', '\x6B', '\x4E', '\x5E', '\xE0', '\x20', '\x6C', '\x37', '\x70', + '\x44', '\x58', '\x78', '\xFC', '\x11', '\x21', '\x39', '\x72', '\x47', '\x3D'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x3D371F5B0F7F9327ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x3D', '\x6E', '\xB3', '\xB9', '\xE7', '\x9F', '\xD8', '\xD2', '\x3B', '\x25', '\xB3', '\x8F', '\x9A', '\xEB', '\x41', '\x7D', '\x9C', '\xB2', '\x1A', + '\x20', '\x78', '\x38', '\x73', '\x6B', '\x98', '\xB3', '\x15', '\x22', '\x44', '\x34', '\x41', '\x6C', '\x84', '\xB2', '\x2C', '\x20', '\x4B', '\x3E', + '\x6E', '\x7A', '\xA2', '\xAE', '\x1D', '\x6D', '\x45', '\x3C', '\x6D', '\x1F'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x1F1D51274373C1FDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x53', '\x34', '\xE5', '\x23', '\xE5', '\xE3', '\x68', '\x90', '\x55', '\x7F', '\xE5', '\x15', '\x98', '\x97', '\xF1', '\x3F', '\xF2', '\xE8', '\x4C', + '\xBA', '\x7A', '\x44', '\xC3', '\x29', '\xF6', '\xE9', '\x43', '\xB8', '\x46', '\x48', '\xF1', '\x2E', '\xEA', '\xE8', '\x7A', '\xBA', '\x49', '\x42', + '\xDE', '\x38', '\xCC', '\xF4', '\x43', '\xBF', '\x0B', '\x4F', '\xC0', '\x2D', '\x93'}; + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x5DAD2D25D9259B93ULL> name(source); + return name.Text(); + }())); } this->titleBar->SetSecondButton(closeButton); @@ -306,15 +353,17 @@ void CUIAdventureGuide::Slot15(int width, int height) { this->titleText = new CUIStaticText(); this->titleText->SetSize(104, 20); this->titleText->Move(362, 28); - this->titleText->SetText("", 0); + this->titleText->SetText(""); this->titleText->SetFitText(0); this->titleText->SetAlign(6, 6); { CUIStaticText* titleText = this->titleText; - const char stageFontSource[] = {'\xF0', '\x14', '\x91', '\xD6', '\x5A', '\x2D'}; - thread_local EncryptedName stageFontName(stageFontSource); - const std::string stageFont(stageFontName.Text()); - titleText->SetFont(stageFont); + titleText->SetFont(std::string([]() { + constexpr char bytes[] = {'\xF0', '\x14', '\x91', '\xD6', '\x5A', '\x2D'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x9D8F2D37BFFD61B7ULL> name(source); + return name.Text(); + }())); } this->titleText->SetFontHeight(14); this->titleText->SetBold(1); @@ -349,31 +398,39 @@ void CUIAdventureGuide::Slot15(int width, int height) { this->tabs->SetOnSelect([this](AdventureGuide::CUITab* tab) { this->OnSelectTab(tab); }); { CUIListBox* tabs = this->tabs; - const char tabDisabledSource[] = { - '\xB9', '\x02', '\x47', '\x89', '\xB3', '\x21', '\x26', '\x56', '\xBF', '\x49', '\x47', '\xBF', '\xCE', '\x55', '\xBF', '\xDA', '\x1D', '\xDB', '\xE2', - '\x1D', '\x07', '\x9A', '\x91', '\xFE', '\x3E', '\xD8', '\xEE', '\x17', '\x16', '\xB3', '\x97', '\xFA', '\x1B', '\xF2', '\xE5', '\x07', '\x1D', '\xB0', - '\x8D', '\xF4', '\x0B', '\xC0', '\xE6', '\x1F', '\x5D', '\x8D', '\x8E', '\xEB', '\x79'}; - thread_local EncryptedName tabDisabledName(tabDisabledSource); - const std::string tabDisabled(tabDisabledName.Text()); - const char tabPressedSource[] = { - '\xF7', '\x52', '\xB5', '\xAF', '\xF5', '\x0F', '\x90', '\x8A', '\xF1', '\x19', '\xB5', '\x99', '\x88', '\x7B', '\x09', '\x06', '\x53', '\x8B', '\x10', - '\x3B', '\x41', '\xB4', '\x27', '\x22', '\x70', '\x88', '\x1C', '\x31', '\x50', '\x9D', '\x21', '\x26', '\x55', '\xA2', '\x17', '\x21', '\x5B', '\x9E', - '\x3A', '\x31', '\x52', '\x8F', '\x5B', '\x37', '\x58', '\xB1', '\x55'}; - thread_local EncryptedName tabPressedName(tabPressedSource); - const std::string tabPressed(tabPressedName.Text()); - const char tabHoverSource[] = { - '\xC7', '\x72', '\xB7', '\x99', '\xA3', '\xFB', '\x0E', '\xDC', '\xC1', '\x39', '\xB7', '\xAF', '\xDE', '\x8F', '\x97', '\x50', '\x63', '\xAB', '\x12', - '\x0D', '\x17', '\x40', '\xB9', '\x74', '\x40', '\xA8', '\x1E', '\x07', '\x06', '\x69', '\xBF', '\x70', '\x65', '\x82', '\x15', '\x17', '\x0D', '\x6A', - '\xBB', '\x63', '\x62', '\xAE', '\x04', '\x4D', '\x01', '\x58', '\xBB', '\x11'}; - thread_local EncryptedName tabHoverName(tabHoverSource); - const std::string tabHover(tabHoverName.Text()); - const char tabNormalSource[] = { + tabs->SetImages(std::string([]() { + constexpr char bytes[] = { '\xB5', '\xCA', '\xA1', '\x23', '\x8D', '\xC7', '\x1A', '\xB4', '\xB3', '\x81', '\xA1', '\x15', '\xF0', '\xB3', '\x83', '\x38', '\x11', '\x13', '\x04', '\xB7', '\x39', '\x7C', '\xAD', '\x1C', '\x32', '\x10', '\x08', '\xBD', '\x28', '\x55', '\xAB', '\x18', '\x17', '\x3A', '\x03', '\xAD', '\x23', '\x56', '\xB1', '\x16', '\x07', '\x08', '\x00', '\xB5', '\x63', '\x6B', '\xB2', '\x09', '\x75'}; - thread_local EncryptedName tabNormalName(tabNormalSource); - const std::string tabNormal(tabNormalName.Text()); - tabs->SetImages(tabNormal, tabHover, tabPressed, tabDisabled); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x79DF094DD9616575ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xC7', '\x72', '\xB7', '\x99', '\xA3', '\xFB', '\x0E', '\xDC', '\xC1', '\x39', '\xB7', '\xAF', '\xDE', '\x8F', '\x97', '\x50', '\x63', '\xAB', '\x12', + '\x0D', '\x17', '\x40', '\xB9', '\x74', '\x40', '\xA8', '\x1E', '\x07', '\x06', '\x69', '\xBF', '\x70', '\x65', '\x82', '\x15', '\x17', '\x0D', '\x6A', + '\xBB', '\x63', '\x62', '\xAE', '\x04', '\x4D', '\x01', '\x58', '\xBB', '\x11'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x11CB35636377DD07ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xF7', '\x52', '\xB5', '\xAF', '\xF5', '\x0F', '\x90', '\x8A', '\xF1', '\x19', '\xB5', '\x99', '\x88', '\x7B', '\x09', '\x06', '\x53', '\x8B', '\x10', + '\x3B', '\x41', '\xB4', '\x27', '\x22', '\x70', '\x88', '\x1C', '\x31', '\x50', '\x9D', '\x21', '\x26', '\x55', '\xA2', '\x17', '\x21', '\x5B', '\x9E', + '\x3A', '\x31', '\x52', '\x8F', '\x5B', '\x37', '\x58', '\xB1', '\x55'}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0x4755C1355575FD37ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xB9', '\x02', '\x47', '\x89', '\xB3', '\x21', '\x26', '\x56', '\xBF', '\x49', '\x47', '\xBF', '\xCE', '\x55', '\xBF', '\xDA', '\x1D', '\xDB', '\xE2', + '\x1D', '\x07', '\x9A', '\x91', '\xFE', '\x3E', '\xD8', '\xEE', '\x17', '\x16', '\xB3', '\x97', '\xFA', '\x1B', '\xF2', '\xE5', '\x07', '\x1D', '\xB0', + '\x8D', '\xF4', '\x0B', '\xC0', '\xE6', '\x1F', '\x5D', '\x8D', '\x8E', '\xEB', '\x79'}; + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x9BE3EF737387AD79ULL> name(source); + return name.Text(); + }())); } this->tabs->itemWidth = 98; @@ -385,51 +442,63 @@ void CUIAdventureGuide::Slot15(int width, int height) { this->tabs->scrollBar->step = 20; { CUIListBox* tabs = this->tabs; - const char downImageSource[] = { - '\x9F', '\xD6', '\x61', '\x1D', '\x31', '\x03', '\x9A', '\x4A', '\x99', '\x9D', '\x61', '\x2B', '\x4C', '\x77', '\x03', '\xC6', '\x3B', '\x0F', '\xC4', - '\x89', '\x85', '\xB8', '\x2D', '\xE2', '\x18', '\x0C', '\xC8', '\x83', '\x94', '\x91', '\x2C', '\xE4', '\x2D', '\x16', '\xCD', '\x8B', '\xAE', '\xAC', - '\x2D', '\xF5', '\x30', '\x0E', '\xFE', '\x83', '\x9E', '\xBA', '\x31', '\xA9', '\x3D', '\x14', '\xD1', '\xE7'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + tabs->scrollBar->SetButtonImages(std::string([]() { + constexpr char bytes[] = { '\xA9', '\x2A', '\x9F', '\xDF', '\x77', '\xB9', '\xAE', '\x74', '\xAF', '\x61', '\x9F', '\xE9', '\x0A', '\xCD', '\x37', '\xF8', '\x0D', '\xF3', '\x3A', '\x4B', '\xC3', '\x02', '\x19', '\xDC', '\x2E', '\xF0', '\x36', '\x41', '\xD2', '\x2B', '\x18', '\xDA', '\x1B', '\xEA', '\x33', '\x49', '\xE8', '\x16', '\x19', '\xCB', '\x06', '\xF2', '\x00', '\x50', '\xC7', '\x59', '\x09', '\xD4', '\x19', '\x85'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - tabs->scrollBar->SetButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xB96B77B7255F8569ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x9F', '\xD6', '\x61', '\x1D', '\x31', '\x03', '\x9A', '\x4A', '\x99', '\x9D', '\x61', '\x2B', '\x4C', '\x77', '\x03', '\xC6', '\x3B', '\x0F', '\xC4', + '\x89', '\x85', '\xB8', '\x2D', '\xE2', '\x18', '\x0C', '\xC8', '\x83', '\x94', '\x91', '\x2C', '\xE4', '\x2D', '\x16', '\xCD', '\x8B', '\xAE', '\xAC', + '\x2D', '\xF5', '\x30', '\x0E', '\xFE', '\x83', '\x9E', '\xBA', '\x31', '\xA9', '\x3D', '\x14', '\xD1', '\xE7'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x875FCDF1E7A1795FULL> name(source); + return name.Text(); + }())); } { CUIListBox* tabs = this->tabs; - const char scrollBackgroundSource[] = { + tabs->scrollBar->SetBackground(std::string([]() { + constexpr char bytes[] = { '\x9B', '\x32', '\xE5', '\xD7', '\x47', '\xE3', '\xE8', '\xCA', '\x9D', '\x79', '\xE5', '\xE1', '\x3A', '\x97', '\x71', '\x46', '\x3F', '\xEB', '\x40', '\x43', '\xF3', '\x58', '\x5F', '\x62', '\x1C', '\xE8', '\x4C', '\x49', '\xE2', '\x71', '\x5E', '\x64', '\x29', '\xF2', '\x49', '\x41', '\xD8', '\x4F', '\x4A', '\x58', '\x36', '\xF4', '\x41', '\x03', '\xE5', '\x40', '\x5D', '\x07'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - tabs->scrollBar->SetBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x072D2D872D259D5BULL> name(source); + return name.Text(); + }())); } { CUIListBox* tabs = this->tabs; - const char thumbBottomSource[] = { - '\x97', '\x40', '\x11', '\x4F', '\x6B', '\xB1', '\x38', '\x92', '\x91', '\x0B', '\x11', '\x79', '\x16', '\xC5', '\xA1', '\x1E', '\x33', '\x99', '\xB4', - '\xDB', '\xDF', '\x0A', '\x8F', '\x3A', '\x10', '\x9A', '\xB8', '\xD1', '\xCE', '\x23', '\x8E', '\x3C', '\x25', '\x80', '\xBD', '\xD9', '\xF4', '\x0B', - '\x95', '\x2A', '\x3A', '\x8D', '\x8E', '\xD1', '\xC4', '\x08', '\x93', '\x71', '\x35', '\x82', '\xA1', '\xB5'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\x11', '\xCE', '\x31', '\x73', '\xAF', '\x9F', '\x20', '\x1E', '\x17', '\x85', '\x31', '\x45', '\xD2', '\xEB', '\xB9', '\x92', '\xB5', '\x17', '\x94', - '\xE7', '\x1B', '\x24', '\x97', '\xB6', '\x96', '\x14', '\x98', '\xED', '\x0A', '\x0D', '\x96', '\xB0', '\xA3', '\x0E', '\x9D', '\xE5', '\x30', '\x25', - '\x8D', '\xA6', '\xBC', '\x03', '\xAE', '\xE4', '\x06', '\x35', '\xCB', '\xB1', '\xBC', '\x11', '\xF1'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + tabs->scrollBar->SetThumbImages(std::string([]() { + constexpr char bytes[] = { '\x4D', '\xBC', '\xBF', '\xE9', '\xA1', '\x2B', '\xF0', '\x38', '\x4B', '\xF7', '\xBF', '\xDF', '\xDC', '\x5F', '\x69', '\xB4', '\xE9', '\x65', '\x1A', '\x7D', '\x15', '\x90', '\x47', '\x90', '\xCA', '\x66', '\x16', '\x77', '\x04', '\xB9', '\x46', '\x96', '\xFF', '\x7C', '\x13', '\x7F', '\x3E', '\x91', '\x5D', '\x80', '\xE0', '\x71', '\x20', '\x66', '\x11', '\xCB', '\x57', '\x98', '\xFD', '\x13'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - tabs->scrollBar->SetThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xF535E561137F138DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x11', '\xCE', '\x31', '\x73', '\xAF', '\x9F', '\x20', '\x1E', '\x17', '\x85', '\x31', '\x45', '\xD2', '\xEB', '\xB9', '\x92', '\xB5', '\x17', '\x94', + '\xE7', '\x1B', '\x24', '\x97', '\xB6', '\x96', '\x14', '\x98', '\xED', '\x0A', '\x0D', '\x96', '\xB0', '\xA3', '\x0E', '\x9D', '\xE5', '\x30', '\x25', + '\x8D', '\xA6', '\xBC', '\x03', '\xAE', '\xE4', '\x06', '\x35', '\xCB', '\xB1', '\xBC', '\x11', '\xF1'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xD3E5516F89F161D1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x97', '\x40', '\x11', '\x4F', '\x6B', '\xB1', '\x38', '\x92', '\x91', '\x0B', '\x11', '\x79', '\x16', '\xC5', '\xA1', '\x1E', '\x33', '\x99', '\xB4', + '\xDB', '\xDF', '\x0A', '\x8F', '\x3A', '\x10', '\x9A', '\xB8', '\xD1', '\xCE', '\x23', '\x8E', '\x3C', '\x25', '\x80', '\xBD', '\xD9', '\xF4', '\x0B', + '\x95', '\x2A', '\x3A', '\x8D', '\x8E', '\xD1', '\xC4', '\x08', '\x93', '\x71', '\x35', '\x82', '\xA1', '\xB5'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x5FFD7FABB5D1EF57ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->tabs); } @@ -1101,7 +1170,7 @@ void CUICharacterInfo::Slot15(int width, int height) { this->level = new CUIStaticText(); this->level->SetSize(50, 12); this->level->Move(46, 6); - this->level->SetText("", 0); + this->level->SetText(""); this->level->SetFitText(0); this->level->SetAlign(0, 0); const char levelFontSource[] = {'\xFE', '\x70', '\x1B', '\x26', '\x66', '\x1D'}; @@ -1118,7 +1187,7 @@ void CUICharacterInfo::Slot15(int width, int height) { this->jobLevel = new CUIStaticText(); this->jobLevel->SetSize(50, 12); this->jobLevel->Move(97, 6); - this->jobLevel->SetText("", 0); + this->jobLevel->SetText(""); this->jobLevel->SetFitText(0); this->jobLevel->SetAlign(0, 0); const char jobLevelFontSource[] = {'\x70', '\x32', '\xC1', '\x50', '\xD2', '\xE5'}; @@ -1135,7 +1204,7 @@ void CUICharacterInfo::Slot15(int width, int height) { this->name = new CUIStaticText(); this->name->SetSize(100, 12); this->name->Move(45, 22); - this->name->SetText("", 0); + this->name->SetText(""); this->name->SetFitText(1); this->name->SetAlign(0, 0); const char nameFontSource[] = {'\x20', '\xDE', '\xFD', '\xCC', '\xCC', '\x3F'}; @@ -1162,15 +1231,17 @@ void CUIItemInfo::Slot15(int width, int height) { this->nameText = new CUIStaticText(); this->nameText->SetSize(280, 12); this->nameText->Move(165, 13); - this->nameText->SetText("", 0); + this->nameText->SetText(""); this->nameText->SetFitText(0); this->nameText->SetAlign(0, 0); { CUIStaticText* name = this->nameText; - const char nameFontSource[] = {'\xA2', '\x0E', '\x5F', '\x40', '\x20', '\x65'}; - thread_local EncryptedName nameFontName(nameFontSource); - const std::string nameFont(nameFontName.Text()); - name->SetFont(nameFont); + name->SetFont(std::string([]() { + constexpr char bytes[] = {'\xA2', '\x0E', '\x5F', '\x40', '\x20', '\x65'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x192D654D29337BE5ULL> name(source); + return name.Text(); + }())); } this->nameText->SetFontHeight(12); this->nameText->SetBold(1); @@ -1185,10 +1256,12 @@ void CUIItemInfo::Slot15(int width, int height) { description->Move(165, 26); description->SetTextOffset(0, 6); { - const char descriptionFontSource[] = {'\xA4', '\xA0', '\x3F', '\x9E', '\xC8', '\x07'}; - thread_local EncryptedName descriptionFontName(descriptionFontSource); - const std::string descriptionFont(descriptionFontName.Text()); - description->SetFont(descriptionFont); + description->SetFont(std::string([]() { + constexpr char bytes[] = {'\xA4', '\xA0', '\x3F', '\x9E', '\xC8', '\x07'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB3E307A5F753D5E3ULL> name(source); + return name.Text(); + }())); } description->SetFontHeight(12); description->SetBold(0); @@ -1200,49 +1273,61 @@ void CUIItemInfo::Slot15(int width, int height) { description->SetScrollBarSize(8, 97); description->SetScrollStep(20); { - const char downImageSource[] = { - '\x3F', '\x4C', '\x9D', '\xF9', '\x67', '\x61', '\x66', '\xF2', '\x39', '\x07', '\x9D', '\xCF', '\x1A', '\x15', '\xFF', '\x7E', '\x9B', '\x95', '\x38', - '\x6D', '\xD3', '\xDA', '\xD1', '\x5A', '\xB8', '\x96', '\x34', '\x67', '\xC2', '\xF3', '\xD0', '\x5C', '\x8D', '\x8C', '\x31', '\x6F', '\xF8', '\xCE', - '\xD1', '\x4D', '\x90', '\x94', '\x02', '\x67', '\xC8', '\xD8', '\xCD', '\x11', '\x9D', '\x8E', '\x2D', '\x03'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + description->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\x99', '\x28', '\xC3', '\x87', '\x95', '\x05', '\xE2', '\x16', '\x9F', '\x63', '\xC3', '\xB1', '\xE8', '\x71', '\x7B', '\x9A', '\x3D', '\xF1', '\x66', '\x13', '\x21', '\xBE', '\x55', '\xBE', '\x1E', '\xF2', '\x6A', '\x19', '\x30', '\x97', '\x54', '\xB8', '\x2B', '\xE8', '\x6F', '\x11', '\x0A', '\xAA', '\x55', '\xA9', '\x36', '\xF0', '\x5C', '\x08', '\x25', '\xE5', '\x45', '\xB6', '\x29', '\x87'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - description->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xDB27CB557D038759ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x3F', '\x4C', '\x9D', '\xF9', '\x67', '\x61', '\x66', '\xF2', '\x39', '\x07', '\x9D', '\xCF', '\x1A', '\x15', '\xFF', '\x7E', '\x9B', '\x95', '\x38', + '\x6D', '\xD3', '\xDA', '\xD1', '\x5A', '\xB8', '\x96', '\x34', '\x67', '\xC2', '\xF3', '\xD0', '\x5C', '\x8D', '\x8C', '\x31', '\x6F', '\xF8', '\xCE', + '\xD1', '\x4D', '\x90', '\x94', '\x02', '\x67', '\xC8', '\xD8', '\xCD', '\x11', '\x9D', '\x8E', '\x2D', '\x03'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x3FA3AFA7035DE3FFULL> name(source); + return name.Text(); + }())); } { - const char scrollBackgroundSource[] = { + description->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x2F', '\x82', '\x97', '\xF7', '\x05', '\x1F', '\x26', '\x4A', '\x29', '\xC9', '\x97', '\xC1', '\x78', '\x6B', '\xBF', '\xC6', '\x8B', '\x5B', '\x32', '\x63', '\xB1', '\xA4', '\x91', '\xE2', '\xA8', '\x58', '\x3E', '\x69', '\xA0', '\x8D', '\x90', '\xE4', '\x9D', '\x42', '\x3B', '\x61', '\x9A', '\xB3', '\x84', '\xD8', '\x82', '\x44', '\x33', '\x23', '\xA7', '\xBC', '\x93', '\x87'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - description->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x87E3D1C50D572DEFULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\x91', '\x5A', '\x0F', '\xB3', '\x3F', '\xD9', '\x44', '\x12', '\x97', '\x11', '\x0F', '\x85', '\x42', '\xAD', '\xDD', '\x9E', '\x35', '\x83', '\xAA', - '\x27', '\x8B', '\x62', '\xF3', '\xBA', '\x16', '\x80', '\xA6', '\x2D', '\x9A', '\x4B', '\xF2', '\xBC', '\x23', '\x9A', '\xA3', '\x25', '\xA0', '\x63', - '\xE9', '\xAA', '\x3C', '\x97', '\x90', '\x2D', '\x90', '\x60', '\xEF', '\xF1', '\x33', '\x98', '\xBF', '\x49'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xFD', '\xEE', '\x4B', '\x33', '\x39', '\xD5', '\x00', '\x60', '\xFB', '\xA5', '\x4B', '\x05', '\x44', '\xA1', '\x99', '\xEC', '\x59', '\x37', '\xEE', - '\xA7', '\x8D', '\x6E', '\xB7', '\xC8', '\x7A', '\x34', '\xE2', '\xAD', '\x9C', '\x47', '\xB6', '\xCE', '\x4F', '\x2E', '\xE7', '\xA5', '\xA6', '\x6F', - '\xAD', '\xD8', '\x50', '\x23', '\xD4', '\xA4', '\x90', '\x7F', '\xEB', '\xCF', '\x50', '\x31', '\x8B'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + description->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\x4D', '\x12', '\x7B', '\x99', '\x77', '\xF7', '\x7E', '\x9C', '\x4B', '\x59', '\x7B', '\xAF', '\x0A', '\x83', '\xE7', '\x10', '\xE9', '\xCB', '\xDE', '\x0D', '\xC3', '\x4C', '\xC9', '\x34', '\xCA', '\xC8', '\xD2', '\x07', '\xD2', '\x65', '\xC8', '\x32', '\xFF', '\xD2', '\xD7', '\x0F', '\xE8', '\x4D', '\xD3', '\x24', '\xE0', '\xDF', '\xE4', '\x16', '\xC7', '\x17', '\xD9', '\x3C', '\xFD', '\xBD'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - description->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x51BB39B763BBBD8DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xFD', '\xEE', '\x4B', '\x33', '\x39', '\xD5', '\x00', '\x60', '\xFB', '\xA5', '\x4B', '\x05', '\x44', '\xA1', '\x99', '\xEC', '\x59', '\x37', '\xEE', + '\xA7', '\x8D', '\x6E', '\xB7', '\xC8', '\x7A', '\x34', '\xE2', '\xAD', '\x9C', '\x47', '\xB6', '\xCE', '\x4F', '\x2E', '\xE7', '\xA5', '\xA6', '\x6F', + '\xAD', '\xD8', '\x50', '\x23', '\xD4', '\xA4', '\x90', '\x7F', '\xEB', '\xCF', '\x50', '\x31', '\x8B'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xADC51BF9C98B413DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x91', '\x5A', '\x0F', '\xB3', '\x3F', '\xD9', '\x44', '\x12', '\x97', '\x11', '\x0F', '\x85', '\x42', '\xAD', '\xDD', '\x9E', '\x35', '\x83', '\xAA', + '\x27', '\x8B', '\x62', '\xF3', '\xBA', '\x16', '\x80', '\xA6', '\x2D', '\x9A', '\x4B', '\xF2', '\xBC', '\x23', '\x9A', '\xA3', '\x25', '\xA0', '\x63', + '\xE9', '\xAA', '\x3C', '\x97', '\x90', '\x2D', '\x90', '\x60', '\xEF', '\xF1', '\x33', '\x98', '\xBF', '\x49'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xDF8117FF49CFF551ULL> name(source); + return name.Text(); + }())); } this->AddChild(description); @@ -1252,10 +1337,12 @@ void CUIItemInfo::Slot15(int width, int height) { options->Move(338, 26); options->SetTextOffset(0, 8); { - const char optionFontSource[] = {'\x0E', '\x18', '\x13', '\x8A', '\xAA', '\x01'}; - thread_local EncryptedName optionFontName(optionFontSource); - const std::string optionFont(optionFontName.Text()); - options->SetFont(optionFont); + options->SetFont(std::string([]() { + constexpr char bytes[] = {'\x0E', '\x18', '\x13', '\x8A', '\xAA', '\x01'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x114901C7E37F6D49ULL> name(source); + return name.Text(); + }())); } options->SetFontHeight(12); options->SetBold(0); @@ -1267,49 +1354,61 @@ void CUIItemInfo::Slot15(int width, int height) { options->SetScrollBarSize(8, 90); options->SetScrollStep(20); { - const char downImageSource[] = { - '\x9B', '\x18', '\xA1', '\xA3', '\x8F', '\x9F', '\xD0', '\x3A', '\x9D', '\x53', '\xA1', '\x95', '\xF2', '\xEB', '\x49', '\xB6', '\x3F', '\xC1', '\x04', - '\x37', '\x3B', '\x24', '\x67', '\x92', '\x1C', '\xC2', '\x08', '\x3D', '\x2A', '\x0D', '\x66', '\x94', '\x29', '\xD8', '\x0D', '\x35', '\x10', '\x30', - '\x67', '\x85', '\x34', '\xC0', '\x3E', '\x3D', '\x20', '\x26', '\x7B', '\xD9', '\x39', '\xDA', '\x11', '\x59'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + options->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\xB1', '\x2C', '\xAB', '\xF1', '\xD1', '\xC1', '\x98', '\xB0', '\xB7', '\x67', '\xAB', '\xC7', '\xAC', '\xB5', '\x01', '\x3C', '\x15', '\xF5', '\x0E', '\x65', '\x65', '\x7A', '\x2F', '\x18', '\x36', '\xF6', '\x02', '\x6F', '\x74', '\x53', '\x2E', '\x1E', '\x03', '\xEC', '\x07', '\x67', '\x4E', '\x6E', '\x2F', '\x0F', '\x1E', '\xF4', '\x34', '\x7E', '\x61', '\x21', '\x3F', '\x10', '\x01', '\x83'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - options->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x7D5D0F110B6B8371ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x9B', '\x18', '\xA1', '\xA3', '\x8F', '\x9F', '\xD0', '\x3A', '\x9D', '\x53', '\xA1', '\x95', '\xF2', '\xEB', '\x49', '\xB6', '\x3F', '\xC1', '\x04', + '\x37', '\x3B', '\x24', '\x67', '\x92', '\x1C', '\xC2', '\x08', '\x3D', '\x2A', '\x0D', '\x66', '\x94', '\x29', '\xD8', '\x0D', '\x35', '\x10', '\x30', + '\x67', '\x85', '\x34', '\xC0', '\x3E', '\x3D', '\x20', '\x26', '\x7B', '\xD9', '\x39', '\xDA', '\x11', '\x59'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xF715514F5961B75BULL> name(source); + return name.Text(); + }())); } { - const char scrollBackgroundSource[] = { + options->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x59', '\x96', '\x3D', '\xCB', '\x95', '\x75', '\x54', '\x8C', '\x5F', '\xDD', '\x3D', '\xFD', '\xE8', '\x01', '\xCD', '\x00', '\xFD', '\x4F', '\x98', '\x5F', '\x21', '\xCE', '\xE3', '\x24', '\xDE', '\x4C', '\x94', '\x55', '\x30', '\xE7', '\xE2', '\x22', '\xEB', '\x56', '\x91', '\x5D', '\x0A', '\xD9', '\xF6', '\x1E', '\xF4', '\x50', '\x99', '\x1F', '\x37', '\xD6', '\xE1', '\x41'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - options->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x4191BB5531FD3999ULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\xAD', '\x10', '\x15', '\xDD', '\x2B', '\x87', '\x62', '\x1A', '\xAB', '\x5B', '\x15', '\xEB', '\x56', '\xF3', '\xFB', '\x96', '\x09', '\xC9', '\xB0', - '\x49', '\x9F', '\x3C', '\xD5', '\xB2', '\x2A', '\xCA', '\xBC', '\x43', '\x8E', '\x15', '\xD4', '\xB4', '\x1F', '\xD0', '\xB9', '\x4B', '\xB4', '\x3D', - '\xCF', '\xA2', '\x00', '\xDD', '\x8A', '\x43', '\x84', '\x3E', '\xC9', '\xF9', '\x0F', '\xD2', '\xA5', '\x27'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\x6F', '\xA6', '\xC9', '\x1D', '\x07', '\x07', '\xAC', '\x58', '\x69', '\xED', '\xC9', '\x2B', '\x7A', '\x73', '\x35', '\xD4', '\xCB', '\x7F', '\x6C', - '\x89', '\xB3', '\xBC', '\x1B', '\xF0', '\xE8', '\x7C', '\x60', '\x83', '\xA2', '\x95', '\x1A', '\xF6', '\xDD', '\x66', '\x65', '\x8B', '\x98', '\xBD', - '\x01', '\xE0', '\xC2', '\x6B', '\x56', '\x8A', '\xAE', '\xAD', '\x47', '\xF7', '\xC2', '\x79', '\x09'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + options->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\x13', '\x96', '\xAF', '\xEB', '\x69', '\xD1', '\x58', '\x7C', '\x15', '\xDD', '\xAF', '\xDD', '\x14', '\xA5', '\xC1', '\xF0', '\xB7', '\x4F', '\x0A', '\x7F', '\xDD', '\x6A', '\xEF', '\xD4', '\x94', '\x4C', '\x06', '\x75', '\xCC', '\x43', '\xEE', '\xD2', '\xA1', '\x56', '\x03', '\x7D', '\xF6', '\x6B', '\xF5', '\xC4', '\xBE', '\x5B', '\x30', '\x64', '\xD9', '\x31', '\xFF', '\xDC', '\xA3', '\x39'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - options->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xB19D1FA9116F39D3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x6F', '\xA6', '\xC9', '\x1D', '\x07', '\x07', '\xAC', '\x58', '\x69', '\xED', '\xC9', '\x2B', '\x7A', '\x73', '\x35', '\xD4', '\xCB', '\x7F', '\x6C', + '\x89', '\xB3', '\xBC', '\x1B', '\xF0', '\xE8', '\x7C', '\x60', '\x83', '\xA2', '\x95', '\x1A', '\xF6', '\xDD', '\x66', '\x65', '\x8B', '\x98', '\xBD', + '\x01', '\xE0', '\xC2', '\x6B', '\x56', '\x8A', '\xAE', '\xAD', '\x47', '\xF7', '\xC2', '\x79', '\x09'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x9569C9C7E70909AFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xAD', '\x10', '\x15', '\xDD', '\x2B', '\x87', '\x62', '\x1A', '\xAB', '\x5B', '\x15', '\xEB', '\x56', '\xF3', '\xFB', '\x96', '\x09', '\xC9', '\xB0', + '\x49', '\x9F', '\x3C', '\xD5', '\xB2', '\x2A', '\xCA', '\xBC', '\x43', '\x8E', '\x15', '\xD4', '\xB4', '\x1F', '\xD0', '\xB9', '\x4B', '\xB4', '\x3D', + '\xCF', '\xA2', '\x00', '\xDD', '\x8A', '\x43', '\x84', '\x3E', '\xC9', '\xF9', '\x0F', '\xD2', '\xA5', '\x27'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xD7A749EB27D5BF6DULL> name(source); + return name.Text(); + }())); } this->AddChild(options); @@ -1319,10 +1418,12 @@ void CUIItemInfo::Slot15(int width, int height) { sources->Move(480, 5); sources->SetTextOffset(0, 6); { - const char sourceFontSource[] = {'\x1E', '\x78', '\xA7', '\xC6', '\x10', '\x63'}; - thread_local EncryptedName sourceFontName(sourceFontSource); - const std::string sourceFont(sourceFontName.Text()); - sources->SetFont(sourceFont); + sources->SetFont(std::string([]() { + constexpr char bytes[] = {'\x1E', '\x78', '\xA7', '\xC6', '\x10', '\x63'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB195637DAFCB0D59ULL> name(source); + return name.Text(); + }())); } sources->SetFontHeight(12); sources->SetBold(0); @@ -1334,49 +1435,61 @@ void CUIItemInfo::Slot15(int width, int height) { sources->SetScrollBarSize(8, 118); sources->SetScrollStep(20); { - const char downImageSource[] = { - '\x01', '\x36', '\x0D', '\x1F', '\x41', '\xE3', '\x80', '\x14', '\x07', '\x7D', '\x0D', '\x29', '\x3C', '\x97', '\x19', '\x98', '\xA5', '\xEF', '\xA8', - '\x8B', '\xF5', '\x58', '\x37', '\xBC', '\x86', '\xEC', '\xA4', '\x81', '\xE4', '\x71', '\x36', '\xBA', '\xB3', '\xF6', '\xA1', '\x89', '\xDE', '\x4C', - '\x37', '\xAB', '\xAE', '\xEE', '\x92', '\x81', '\xEE', '\x5A', '\x2B', '\xF7', '\xA3', '\xF4', '\xBD', '\xE5'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + sources->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\x95', '\x94', '\x41', '\x0D', '\x8D', '\x25', '\x68', '\x60', '\x93', '\xDF', '\x41', '\x3B', '\xF0', '\x51', '\xF1', '\xEC', '\x31', '\x4D', '\xE4', '\x99', '\x39', '\x9E', '\xDF', '\xC8', '\x12', '\x4E', '\xE8', '\x93', '\x28', '\xB7', '\xDE', '\xCE', '\x27', '\x54', '\xED', '\x9B', '\x12', '\x8A', '\xDF', '\xDF', '\x3A', '\x4C', '\xDE', '\x82', '\x3D', '\xC5', '\xCF', '\xC0', '\x25', '\x3B'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - sources->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xADADEB4DF7813B55ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x01', '\x36', '\x0D', '\x1F', '\x41', '\xE3', '\x80', '\x14', '\x07', '\x7D', '\x0D', '\x29', '\x3C', '\x97', '\x19', '\x98', '\xA5', '\xEF', '\xA8', + '\x8B', '\xF5', '\x58', '\x37', '\xBC', '\x86', '\xEC', '\xA4', '\x81', '\xE4', '\x71', '\x36', '\xBA', '\xB3', '\xF6', '\xA1', '\x89', '\xDE', '\x4C', + '\x37', '\xAB', '\xAE', '\xEE', '\x92', '\x81', '\xEE', '\x5A', '\x2B', '\xF7', '\xA3', '\xF4', '\xBD', '\xE5'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xD9452D81E5CD99C1ULL> name(source); + return name.Text(); + }())); } { - const char scrollBackgroundSource[] = { + sources->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x4D', '\x2E', '\xD1', '\x09', '\x73', '\x67', '\xAC', '\x30', '\x4B', '\x65', '\xD1', '\x3F', '\x0E', '\x13', '\x35', '\xBC', '\xE9', '\xF7', '\x74', '\x9D', '\xC7', '\xDC', '\x1B', '\x98', '\xCA', '\xF4', '\x78', '\x97', '\xD6', '\xF5', '\x1A', '\x9E', '\xFF', '\xEE', '\x7D', '\x9F', '\xEC', '\xCB', '\x0E', '\xA2', '\xE0', '\xE8', '\x75', '\xDD', '\xD1', '\xC4', '\x19', '\xFD'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - sources->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xFD69A9B3F311818DULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\x53', '\xDA', '\x1F', '\x15', '\x8D', '\xED', '\xCA', '\x56', '\x55', '\x91', '\x1F', '\x23', '\xF0', '\x99', '\x53', '\xDA', '\xF7', '\x03', '\xBA', - '\x81', '\x39', '\x56', '\x7D', '\xFE', '\xD4', '\x00', '\xB6', '\x8B', '\x28', '\x7F', '\x7C', '\xF8', '\xE1', '\x1A', '\xB3', '\x83', '\x12', '\x57', - '\x67', '\xEE', '\xFE', '\x17', '\x80', '\x8B', '\x22', '\x54', '\x61', '\xB5', '\xF1', '\x18', '\xAF', '\xEF'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xCD', '\xCC', '\x4D', '\xF3', '\x85', '\x9D', '\x4A', '\x14', '\xCB', '\x87', '\x4D', '\xC5', '\xF8', '\xE9', '\xD3', '\x98', '\x69', '\x15', '\xE8', - '\x67', '\x31', '\x26', '\xFD', '\xBC', '\x4A', '\x16', '\xE4', '\x6D', '\x20', '\x0F', '\xFC', '\xBA', '\x7F', '\x0C', '\xE1', '\x65', '\x1A', '\x27', - '\xE7', '\xAC', '\x60', '\x01', '\xD2', '\x64', '\x2C', '\x37', '\xA1', '\xBB', '\x60', '\x13', '\x8D'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + sources->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\xEB', '\xB0', '\x29', '\x51', '\x01', '\x31', '\xE8', '\xB2', '\xED', '\xFB', '\x29', '\x67', '\x7C', '\x45', '\x71', '\x3E', '\x4F', '\x69', '\x8C', '\xC5', '\xB5', '\x8A', '\x5F', '\x1A', '\x6C', '\x6A', '\x80', '\xCF', '\xA4', '\xA3', '\x5E', '\x1C', '\x59', '\x70', '\x85', '\xC7', '\x9E', '\x8B', '\x45', '\x0A', '\x46', '\x7D', '\xB6', '\xDE', '\xB1', '\xD1', '\x4F', '\x12', '\x5B', '\x1F'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - sources->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x7F2DFFC1ABE91F2BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xCD', '\xCC', '\x4D', '\xF3', '\x85', '\x9D', '\x4A', '\x14', '\xCB', '\x87', '\x4D', '\xC5', '\xF8', '\xE9', '\xD3', '\x98', '\x69', '\x15', '\xE8', + '\x67', '\x31', '\x26', '\xFD', '\xBC', '\x4A', '\x16', '\xE4', '\x6D', '\x20', '\x0F', '\xFC', '\xBA', '\x7F', '\x0C', '\xE1', '\x65', '\x1A', '\x27', + '\xE7', '\xAC', '\x60', '\x01', '\xD2', '\x64', '\x2C', '\x37', '\xA1', '\xBB', '\x60', '\x13', '\x8D'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xD98F5345098D630DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x53', '\xDA', '\x1F', '\x15', '\x8D', '\xED', '\xCA', '\x56', '\x55', '\x91', '\x1F', '\x23', '\xF0', '\x99', '\x53', '\xDA', '\xF7', '\x03', '\xBA', + '\x81', '\x39', '\x56', '\x7D', '\xFE', '\xD4', '\x00', '\xB6', '\x8B', '\x28', '\x7F', '\x7C', '\xF8', '\xE1', '\x1A', '\xB3', '\x83', '\x12', '\x57', + '\x67', '\xEE', '\xFE', '\x17', '\x80', '\x8B', '\x22', '\x54', '\x61', '\xB5', '\xF1', '\x18', '\xAF', '\xEF'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x9B0F234DEFDF7593ULL> name(source); + return name.Text(); + }())); } this->AddChild(sources); } @@ -1387,15 +1500,17 @@ void CUIMonsterInfo::Slot15(int width, int height) { this->unknown_00E8 = new CUIStaticText(); this->unknown_00E8->SetSize(280, 12); this->unknown_00E8->Move(165, 19); - this->unknown_00E8->SetText("", 0); + this->unknown_00E8->SetText(""); this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(0, 0); { CUIStaticText* name = this->unknown_00E8; - const char nameFontSource[] = {'\x82', '\x58', '\x47', '\x56', '\xE4', '\x1D'}; - thread_local EncryptedName nameFontName(nameFontSource); - const std::string nameFont(nameFontName.Text()); - name->SetFont(nameFont); + name->SetFont(std::string([]() { + constexpr char bytes[] = {'\x82', '\x58', '\x47', '\x56', '\xE4', '\x1D'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xEF6D1D893F2B2DC5ULL> name(source); + return name.Text(); + }())); } this->unknown_00E8->SetFontHeight(12); this->unknown_00E8->SetBold(0); @@ -1410,10 +1525,12 @@ void CUIMonsterInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00EC)->SetTextOffset(0, 6); { CUITextViewer* details = reinterpret_cast(this->unknown_00EC); - const char detailsFontSource[] = {'\x1C', '\x26', '\x33', '\xB4', '\xEA', '\x9F'}; - thread_local EncryptedName detailsFontName(detailsFontSource); - const std::string detailsFont(detailsFontName.Text()); - details->SetFont(detailsFont); + details->SetFont(std::string([]() { + constexpr char bytes[] = {'\x1C', '\x26', '\x33', '\xB4', '\xEA', '\x9F'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x39A39F87DD5F535BULL> name(source); + return name.Text(); + }())); } reinterpret_cast(this->unknown_00EC)->SetFontHeight(12); reinterpret_cast(this->unknown_00EC)->SetBold(0); @@ -1426,51 +1543,63 @@ void CUIMonsterInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00EC)->SetScrollStep(20); { CUITextViewer* details = reinterpret_cast(this->unknown_00EC); - const char downImageSource[] = { - '\x0D', '\xAC', '\x0D', '\x81', '\x57', '\xF5', '\xD6', '\xFE', '\x0B', '\xE7', '\x0D', '\xB7', '\x2A', '\x81', '\x4F', '\x72', '\xA9', '\x75', '\xA8', - '\x15', '\xE3', '\x4E', '\x61', '\x56', '\x8A', '\x76', '\xA4', '\x1F', '\xF2', '\x67', '\x60', '\x50', '\xBF', '\x6C', '\xA1', '\x17', '\xC8', '\x5A', - '\x61', '\x41', '\xA2', '\x74', '\x92', '\x1F', '\xF8', '\x4C', '\x7D', '\x1D', '\xAF', '\x6E', '\xBD', '\x7B'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + details->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\xB7', '\x38', '\x47', '\xE7', '\xE3', '\x9D', '\x24', '\xA2', '\xB1', '\x73', '\x47', '\xD1', '\x9E', '\xE9', '\xBD', '\x2E', '\x13', '\xE1', '\xE2', '\x73', '\x57', '\x26', '\x93', '\x0A', '\x30', '\xE2', '\xEE', '\x79', '\x46', '\x0F', '\x92', '\x0C', '\x05', '\xF8', '\xEB', '\x71', '\x7C', '\x32', '\x93', '\x1D', '\x18', '\xE0', '\xD8', '\x68', '\x53', '\x7D', '\x83', '\x02', '\x07', '\x97'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - details->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x6FE153231D879777ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x0D', '\xAC', '\x0D', '\x81', '\x57', '\xF5', '\xD6', '\xFE', '\x0B', '\xE7', '\x0D', '\xB7', '\x2A', '\x81', '\x4F', '\x72', '\xA9', '\x75', '\xA8', + '\x15', '\xE3', '\x4E', '\x61', '\x56', '\x8A', '\x76', '\xA4', '\x1F', '\xF2', '\x67', '\x60', '\x50', '\xBF', '\x6C', '\xA1', '\x17', '\xC8', '\x5A', + '\x61', '\x41', '\xA2', '\x74', '\x92', '\x1F', '\xF8', '\x4C', '\x7D', '\x1D', '\xAF', '\x6E', '\xBD', '\x7B'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x33133B977BCD03CDULL> name(source); + return name.Text(); + }())); } { CUITextViewer* details = reinterpret_cast(this->unknown_00EC); - const char scrollBackgroundSource[] = { + details->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x11', '\xF4', '\x57', '\x1F', '\xF9', '\x49', '\x2E', '\xE2', '\x17', '\xBF', '\x57', '\x29', '\x84', '\x3D', '\xB7', '\x6E', '\xB5', '\x2D', '\xF2', '\x8B', '\x4D', '\xF2', '\x99', '\x4A', '\x96', '\x2E', '\xFE', '\x81', '\x5C', '\xDB', '\x98', '\x4C', '\xA3', '\x34', '\xFB', '\x89', '\x66', '\xE5', '\x8C', '\x70', '\xBC', '\x32', '\xF3', '\xCB', '\x5B', '\xEA', '\x9B', '\x2F'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - details->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x2FEB8739E5975BD1ULL> name(source); + return name.Text(); + }())); } { CUITextViewer* details = reinterpret_cast(this->unknown_00EC); - const char thumbBottomSource[] = { - '\xD7', '\xFE', '\x21', '\xBB', '\xF9', '\x0D', '\x46', '\x4A', '\xD1', '\xB5', '\x21', '\x8D', '\x84', '\x79', '\xDF', '\xC6', '\x73', '\x27', '\x84', - '\x2F', '\x4D', '\xB6', '\xF1', '\xE2', '\x50', '\x24', '\x88', '\x25', '\x5C', '\x9F', '\xF0', '\xE4', '\x65', '\x3E', '\x8D', '\x2D', '\x66', '\xB7', - '\xEB', '\xF2', '\x7A', '\x33', '\xBE', '\x25', '\x56', '\xB4', '\xED', '\xA9', '\x75', '\x3C', '\x91', '\x41'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xEF', '\x78', '\x85', '\xDF', '\xF9', '\x65', '\xE8', '\x6C', '\xE9', '\x33', '\x85', '\xE9', '\x84', '\x11', '\x71', '\xE0', '\x4B', '\xA1', '\x20', - '\x4B', '\x4D', '\xDE', '\x5F', '\xC4', '\x68', '\xA2', '\x2C', '\x41', '\x5C', '\xF7', '\x5E', '\xC2', '\x5D', '\xB8', '\x29', '\x49', '\x66', '\xDF', - '\x45', '\xD4', '\x42', '\xB5', '\x1A', '\x48', '\x50', '\xCF', '\x03', '\xC3', '\x42', '\xA7', '\x45'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + details->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\xB5', '\x94', '\xC3', '\xD5', '\xD3', '\x0F', '\x64', '\xA6', '\xB3', '\xDF', '\xC3', '\xE3', '\xAE', '\x7B', '\xFD', '\x2A', '\x11', '\x4D', '\x66', '\x41', '\x67', '\xB4', '\xD3', '\x0E', '\x32', '\x4E', '\x6A', '\x4B', '\x76', '\x9D', '\xD2', '\x08', '\x07', '\x54', '\x6F', '\x43', '\x4C', '\xB5', '\xC9', '\x1E', '\x18', '\x59', '\x5C', '\x5A', '\x63', '\xEF', '\xC3', '\x06', '\x05', '\x3B'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - details->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x6BA1C1132F033B75ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xEF', '\x78', '\x85', '\xDF', '\xF9', '\x65', '\xE8', '\x6C', '\xE9', '\x33', '\x85', '\xE9', '\x84', '\x11', '\x71', '\xE0', '\x4B', '\xA1', '\x20', + '\x4B', '\x4D', '\xDE', '\x5F', '\xC4', '\x68', '\xA2', '\x2C', '\x41', '\x5C', '\xF7', '\x5E', '\xC2', '\x5D', '\xB8', '\x29', '\x49', '\x66', '\xDF', + '\x45', '\xD4', '\x42', '\xB5', '\x1A', '\x48', '\x50', '\xCF', '\x03', '\xC3', '\x42', '\xA7', '\x45'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xA12DAB392545D72FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xD7', '\xFE', '\x21', '\xBB', '\xF9', '\x0D', '\x46', '\x4A', '\xD1', '\xB5', '\x21', '\x8D', '\x84', '\x79', '\xDF', '\xC6', '\x73', '\x27', '\x84', + '\x2F', '\x4D', '\xB6', '\xF1', '\xE2', '\x50', '\x24', '\x88', '\x25', '\x5C', '\x9F', '\xF0', '\xE4', '\x65', '\x3E', '\x8D', '\x2D', '\x66', '\xB7', + '\xEB', '\xF2', '\x7A', '\x33', '\xBE', '\x25', '\x56', '\xB4', '\xED', '\xA9', '\x75', '\x3C', '\x91', '\x41'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x8783C33941E15117ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00EC); @@ -1480,10 +1609,12 @@ void CUIMonsterInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00F0)->SetTextOffset(0, 6); { CUITextViewer* values = reinterpret_cast(this->unknown_00F0); - const char valuesFontSource[] = {'\xD8', '\xA8', '\xEF', '\x76', '\x1A', '\x45'}; - thread_local EncryptedName valuesFontName(valuesFontSource); - const std::string valuesFont(valuesFontName.Text()); - values->SetFont(valuesFont); + values->SetFont(std::string([]() { + constexpr char bytes[] = {'\xD8', '\xA8', '\xEF', '\x76', '\x1A', '\x45'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x271B45771F83DD9FULL> name(source); + return name.Text(); + }())); } reinterpret_cast(this->unknown_00F0)->SetFontHeight(12); reinterpret_cast(this->unknown_00F0)->SetBold(0); @@ -1496,51 +1627,63 @@ void CUIMonsterInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00F0)->SetScrollStep(20); { CUITextViewer* values = reinterpret_cast(this->unknown_00F0); - const char downImageSource[] = { - '\x17', '\x3A', '\xDF', '\x61', '\x91', '\x8B', '\x42', '\xC6', '\x11', '\x71', '\xDF', '\x57', '\xEC', '\xFF', '\xDB', '\x4A', '\xB3', '\xE3', '\x7A', - '\xF5', '\x25', '\x30', '\xF5', '\x6E', '\x90', '\xE0', '\x76', '\xFF', '\x34', '\x19', '\xF4', '\x68', '\xA5', '\xFA', '\x73', '\xF7', '\x0E', '\x24', - '\xF5', '\x79', '\xB8', '\xE2', '\x40', '\xFF', '\x3E', '\x32', '\xE9', '\x25', '\xB5', '\xF8', '\x6F', '\x9B'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + values->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\x4F', '\xF6', '\xA1', '\x11', '\x75', '\xD7', '\xC6', '\x0A', '\x49', '\xBD', '\xA1', '\x27', '\x08', '\xA3', '\x5F', '\x86', '\xEB', '\x2F', '\x04', '\x85', '\xC1', '\x6C', '\x71', '\xA2', '\xC8', '\x2C', '\x08', '\x8F', '\xD0', '\x45', '\x70', '\xA4', '\xFD', '\x36', '\x0D', '\x87', '\xEA', '\x78', '\x71', '\xB5', '\xE0', '\x2E', '\x3E', '\x9E', '\xC5', '\x37', '\x61', '\xAA', '\xFF', '\x59'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - values->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xC70319B5EB61598FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x17', '\x3A', '\xDF', '\x61', '\x91', '\x8B', '\x42', '\xC6', '\x11', '\x71', '\xDF', '\x57', '\xEC', '\xFF', '\xDB', '\x4A', '\xB3', '\xE3', '\x7A', + '\xF5', '\x25', '\x30', '\xF5', '\x6E', '\x90', '\xE0', '\x76', '\xFF', '\x34', '\x19', '\xF4', '\x68', '\xA5', '\xFA', '\x73', '\xF7', '\x0E', '\x24', + '\xF5', '\x79', '\xB8', '\xE2', '\x40', '\xFF', '\x3E', '\x32', '\xE9', '\x25', '\xB5', '\xF8', '\x6F', '\x9B'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x0B8745519B1F95D7ULL> name(source); + return name.Text(); + }())); } { CUITextViewer* values = reinterpret_cast(this->unknown_00F0); - const char scrollBackgroundSource[] = { + values->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x15', '\x96', '\xEB', '\xB3', '\x27', '\x69', '\x52', '\x68', '\x13', '\xDD', '\xEB', '\x85', '\x5A', '\x1D', '\xCB', '\xE4', '\xB1', '\x4F', '\x4E', '\x27', '\x93', '\xD2', '\xE5', '\xC0', '\x92', '\x4C', '\x42', '\x2D', '\x82', '\xFB', '\xE4', '\xC6', '\xA7', '\x56', '\x47', '\x25', '\xB8', '\xC5', '\xF0', '\xFA', '\xB8', '\x50', '\x4F', '\x67', '\x85', '\xCA', '\xE7', '\xA5'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - values->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xA597A7E7492B39D5ULL> name(source); + return name.Text(); + }())); } { CUITextViewer* values = reinterpret_cast(this->unknown_00F0); - const char thumbBottomSource[] = { - '\x6B', '\x00', '\x4D', '\x77', '\x73', '\x43', '\x62', '\x18', '\x6D', '\x4B', '\x4D', '\x41', '\x0E', '\x37', '\xFB', '\x94', '\xCF', '\xD9', '\xE8', - '\xE3', '\xC7', '\xF8', '\xD5', '\xB0', '\xEC', '\xDA', '\xE4', '\xE9', '\xD6', '\xD1', '\xD4', '\xB6', '\xD9', '\xC0', '\xE1', '\xE1', '\xEC', '\xF9', - '\xCF', '\xA0', '\xC6', '\xCD', '\xD2', '\xE9', '\xDC', '\xFA', '\xC9', '\xFB', '\xC9', '\xC2', '\xFD', '\x8D'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xCF', '\xE0', '\x85', '\x55', '\x5D', '\x8B', '\x5C', '\xCE', '\xC9', '\xAB', '\x85', '\x63', '\x20', '\xFF', '\xC5', '\x42', '\x6B', '\x39', '\x20', - '\xC1', '\xE9', '\x30', '\xEB', '\x66', '\x48', '\x3A', '\x2C', '\xCB', '\xF8', '\x19', '\xEA', '\x60', '\x7D', '\x20', '\x29', '\xC3', '\xC2', '\x31', - '\xF1', '\x76', '\x62', '\x2D', '\x1A', '\xC2', '\xF4', '\x21', '\xB7', '\x61', '\x62', '\x3F', '\x45'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + values->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\xB3', '\x40', '\x7B', '\x2B', '\x15', '\x2D', '\x6E', '\x32', '\xB5', '\x0B', '\x7B', '\x1D', '\x68', '\x59', '\xF7', '\xBE', '\x17', '\x99', '\xDE', '\xBF', '\xA1', '\x96', '\xD9', '\x9A', '\x34', '\x9A', '\xD2', '\xB5', '\xB0', '\xBF', '\xD8', '\x9C', '\x01', '\x80', '\xD7', '\xBD', '\x8A', '\x97', '\xC3', '\x8A', '\x1E', '\x8D', '\xE4', '\xA4', '\xA5', '\xCD', '\xC9', '\x92', '\x03', '\xEF'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - values->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xFFABE3D5D1BBEF73ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xCF', '\xE0', '\x85', '\x55', '\x5D', '\x8B', '\x5C', '\xCE', '\xC9', '\xAB', '\x85', '\x63', '\x20', '\xFF', '\xC5', '\x42', '\x6B', '\x39', '\x20', + '\xC1', '\xE9', '\x30', '\xEB', '\x66', '\x48', '\x3A', '\x2C', '\xCB', '\xF8', '\x19', '\xEA', '\x60', '\x7D', '\x20', '\x29', '\xC3', '\xC2', '\x31', + '\xF1', '\x76', '\x62', '\x2D', '\x1A', '\xC2', '\xF4', '\x21', '\xB7', '\x61', '\x62', '\x3F', '\x45'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x0399459DAF454F0FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x6B', '\x00', '\x4D', '\x77', '\x73', '\x43', '\x62', '\x18', '\x6D', '\x4B', '\x4D', '\x41', '\x0E', '\x37', '\xFB', '\x94', '\xCF', '\xD9', '\xE8', + '\xE3', '\xC7', '\xF8', '\xD5', '\xB0', '\xEC', '\xDA', '\xE4', '\xE9', '\xD6', '\xD1', '\xD4', '\xB6', '\xD9', '\xC0', '\xE1', '\xE1', '\xEC', '\xF9', + '\xCF', '\xA0', '\xC6', '\xCD', '\xD2', '\xE9', '\xDC', '\xFA', '\xC9', '\xFB', '\xC9', '\xC2', '\xFD', '\x8D'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xD5A78DB38D8DAFABULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00F0); } @@ -1553,13 +1696,15 @@ void CUIQuestInfo::Slot15(int width, int height) { this->unknown_00E8->Move(250, 10); { CUIStaticImage* stamp = static_cast(this->unknown_00E8); - const char stampImageSource[] = { + stamp->SetImage(std::string([]() { + constexpr char bytes[] = { '\x31', '\x68', '\xF9', '\xF3', '\xD7', '\xB7', '\x8A', '\x3C', '\x37', '\x23', '\xF9', '\xC5', '\xAA', '\xC3', '\x13', '\xB0', '\x95', '\xB1', '\x5C', '\x67', '\x63', '\x0C', '\x3D', '\x94', '\xB6', '\xB2', '\x50', '\x6D', '\x72', '\x25', '\x3C', '\x85', '\x90', '\xAA', '\x49', '\x56', '\x74', '\x16', '\x22', '\x81', '\x9D', '\xA2', '\x4D', '\x6C', '\x73', '\x57', '\x2D', '\x9C', '\x81', '\xC7'}; - thread_local EncryptedName stampImageName(stampImageSource); - const std::string stampImage(stampImageName.Text()); - stamp->SetImage(stampImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xF14F79170939C7F1ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00E8); @@ -1569,10 +1714,12 @@ void CUIQuestInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00EC)->SetTextOffset(0, 0); { CUITextViewer* title = reinterpret_cast(this->unknown_00EC); - const char titleFontSource[] = {'\x32', '\xB8', '\x81', '\x34', '\x06', '\x65'}; - thread_local EncryptedName titleFontName(titleFontSource); - const std::string titleFont(titleFontName.Text()); - title->SetFont(titleFont); + title->SetFont(std::string([]() { + constexpr char bytes[] = {'\x32', '\xB8', '\x81', '\x34', '\x06', '\x65'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x35E5656B5DEDCD75ULL> name(source); + return name.Text(); + }())); } reinterpret_cast(this->unknown_00EC)->SetFontHeight(12); reinterpret_cast(this->unknown_00EC)->SetBold(1); @@ -1585,51 +1732,63 @@ void CUIQuestInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00EC)->SetScrollStep(20); { CUITextViewer* title = reinterpret_cast(this->unknown_00EC); - const char downImageSource[] = { - '\x3D', '\x78', '\x8D', '\x53', '\x75', '\x41', '\x52', '\x2A', '\x3B', '\x33', '\x8D', '\x65', '\x08', '\x35', '\xCB', '\xA6', '\x99', '\xA1', '\x28', - '\xC7', '\xC1', '\xFA', '\xE5', '\x82', '\xBA', '\xA2', '\x24', '\xCD', '\xD0', '\xD3', '\xE4', '\x84', '\x8F', '\xB8', '\x21', '\xC5', '\xEA', '\xEE', - '\xE5', '\x95', '\x92', '\xA0', '\x12', '\xCD', '\xDA', '\xF8', '\xF9', '\xC9', '\x9F', '\xBA', '\x3D', '\xA9'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + title->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\x3D', '\x16', '\x7B', '\xDB', '\x5F', '\x33', '\x84', '\x84', '\x3B', '\x5D', '\x7B', '\xED', '\x22', '\x47', '\x1D', '\x08', '\x99', '\xCF', '\xDE', '\x4F', '\xEB', '\x88', '\x33', '\x2C', '\xBA', '\xCC', '\xD2', '\x45', '\xFA', '\xA1', '\x32', '\x2A', '\x8F', '\xD6', '\xD7', '\x4D', '\xC0', '\x9C', '\x33', '\x3B', '\x92', '\xCE', '\xE4', '\x54', '\xEF', '\xD3', '\x23', '\x24', '\x8D', '\xB9'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - title->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x4941FD9F21BBB9FDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x3D', '\x78', '\x8D', '\x53', '\x75', '\x41', '\x52', '\x2A', '\x3B', '\x33', '\x8D', '\x65', '\x08', '\x35', '\xCB', '\xA6', '\x99', '\xA1', '\x28', + '\xC7', '\xC1', '\xFA', '\xE5', '\x82', '\xBA', '\xA2', '\x24', '\xCD', '\xD0', '\xD3', '\xE4', '\x84', '\x8F', '\xB8', '\x21', '\xC5', '\xEA', '\xEE', + '\xE5', '\x95', '\x92', '\xA0', '\x12', '\xCD', '\xDA', '\xF8', '\xF9', '\xC9', '\x9F', '\xBA', '\x3D', '\xA9'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xE7978FB5A94DD7FDULL> name(source); + return name.Text(); + }())); } { CUITextViewer* title = reinterpret_cast(this->unknown_00EC); - const char scrollBackgroundSource[] = { + title->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\xAB', '\x16', '\x07', '\xF5', '\xA7', '\x41', '\x38', '\x7A', '\xAD', '\x5D', '\x07', '\xC3', '\xDA', '\x35', '\xA1', '\xF6', '\x0F', '\xCF', '\xA2', '\x61', '\x13', '\xFA', '\x8F', '\xD2', '\x2C', '\xCC', '\xAE', '\x6B', '\x02', '\xD3', '\x8E', '\xD4', '\x19', '\xD6', '\xAB', '\x63', '\x38', '\xED', '\x9A', '\xE8', '\x06', '\xD0', '\xA3', '\x21', '\x05', '\xE2', '\x8D', '\xB7'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - title->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xB7FD8F670FC7B96BULL> name(source); + return name.Text(); + }())); } { CUITextViewer* title = reinterpret_cast(this->unknown_00EC); - const char thumbBottomSource[] = { - '\x0D', '\x5E', '\x59', '\x4F', '\x4D', '\x95', '\xC2', '\x60', '\x0B', '\x15', '\x59', '\x79', '\x30', '\xE1', '\x5B', '\xEC', '\xA9', '\x87', '\xFC', - '\xDB', '\xF9', '\x2E', '\x75', '\xC8', '\x8A', '\x84', '\xF0', '\xD1', '\xE8', '\x07', '\x74', '\xCE', '\xBF', '\x9E', '\xF5', '\xD9', '\xD2', '\x2F', - '\x6F', '\xD8', '\xA0', '\x93', '\xC6', '\xD1', '\xE2', '\x2C', '\x69', '\x83', '\xAF', '\x9C', '\xE9', '\xB5'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\x57', '\x5E', '\x21', '\x27', '\x11', '\x5D', '\x2C', '\xE2', '\x51', '\x15', '\x21', '\x11', '\x6C', '\x29', '\xB5', '\x6E', '\xF3', '\x87', '\x84', - '\xB3', '\xA5', '\xE6', '\x9B', '\x4A', '\xD0', '\x84', '\x88', '\xB9', '\xB4', '\xCF', '\x9A', '\x4C', '\xE5', '\x9E', '\x8D', '\xB1', '\x8E', '\xE7', - '\x81', '\x5A', '\xFA', '\x93', '\xBE', '\xB0', '\xB8', '\xF7', '\xC7', '\x4D', '\xFA', '\x81', '\xE1'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + title->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\x4F', '\x36', '\x2B', '\xF7', '\x75', '\xB1', '\x3A', '\xF4', '\x49', '\x7D', '\x2B', '\xC1', '\x08', '\xC5', '\xA3', '\x78', '\xEB', '\xEF', '\x8E', '\x63', '\xC1', '\x0A', '\x8D', '\x5C', '\xC8', '\xEC', '\x82', '\x69', '\xD0', '\x23', '\x8C', '\x5A', '\xFD', '\xF6', '\x87', '\x61', '\xEA', '\x0B', '\x97', '\x4C', '\xE2', '\xFB', '\xB4', '\x78', '\xC5', '\x51', '\x9D', '\x54', '\xFF', '\x99'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - title->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x39FF7FB50DEB998FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x57', '\x5E', '\x21', '\x27', '\x11', '\x5D', '\x2C', '\xE2', '\x51', '\x15', '\x21', '\x11', '\x6C', '\x29', '\xB5', '\x6E', '\xF3', '\x87', '\x84', + '\xB3', '\xA5', '\xE6', '\x9B', '\x4A', '\xD0', '\x84', '\x88', '\xB9', '\xB4', '\xCF', '\x9A', '\x4C', '\xE5', '\x9E', '\x8D', '\xB1', '\x8E', '\xE7', + '\x81', '\x5A', '\xFA', '\x93', '\xBE', '\xB0', '\xB8', '\xF7', '\xC7', '\x4D', '\xFA', '\x81', '\xE1'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x2FE993D1DDE1F197ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x0D', '\x5E', '\x59', '\x4F', '\x4D', '\x95', '\xC2', '\x60', '\x0B', '\x15', '\x59', '\x79', '\x30', '\xE1', '\x5B', '\xEC', '\xA9', '\x87', '\xFC', + '\xDB', '\xF9', '\x2E', '\x75', '\xC8', '\x8A', '\x84', '\xF0', '\xD1', '\xE8', '\x07', '\x74', '\xCE', '\xBF', '\x9E', '\xF5', '\xD9', '\xD2', '\x2F', + '\x6F', '\xD8', '\xA0', '\x93', '\xC6', '\xD1', '\xE2', '\x2C', '\x69', '\x83', '\xAF', '\x9C', '\xE9', '\xB5'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xAD075B8DB599F1CDULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00EC); @@ -1639,10 +1798,12 @@ void CUIQuestInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00F0)->SetTextOffset(0, 6); { CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); - const char linesFontSource[] = {'\x38', '\x60', '\xE1', '\x78', '\x5A', '\x0F'}; - thread_local EncryptedName linesFontName(linesFontSource); - const std::string linesFont(linesFontName.Text()); - lines->SetFont(linesFont); + lines->SetFont(std::string([]() { + constexpr char bytes[] = {'\x38', '\x60', '\xE1', '\x78', '\x5A', '\x0F'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x2F8B0F37118D157FULL> name(source); + return name.Text(); + }())); } reinterpret_cast(this->unknown_00F0)->SetFontHeight(12); reinterpret_cast(this->unknown_00F0)->SetBold(1); @@ -1655,51 +1816,63 @@ void CUIQuestInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00F0)->SetScrollStep(20); { CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); - const char downImageSource[] = { - '\xE3', '\x5E', '\x17', '\xED', '\x17', '\x87', '\x26', '\xB0', '\xE5', '\x15', '\x17', '\xDB', '\x6A', '\xF3', '\xBF', '\x3C', '\x47', '\x87', '\xB2', - '\x79', '\xA3', '\x3C', '\x91', '\x18', '\x64', '\x84', '\xBE', '\x73', '\xB2', '\x15', '\x90', '\x1E', '\x51', '\x9E', '\xBB', '\x7B', '\x88', '\x28', - '\x91', '\x0F', '\x4C', '\x86', '\x88', '\x73', '\xB8', '\x3E', '\x8D', '\x53', '\x41', '\x9C', '\xA7', '\x17'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + lines->SetScrollBarButtonImages(std::string([]() { + constexpr char bytes[] = { '\xBF', '\x7A', '\x6F', '\xA1', '\xAB', '\x7F', '\xD0', '\xC2', '\xB9', '\x31', '\x6F', '\x97', '\xD6', '\x0B', '\x49', '\x4E', '\x1B', '\xA3', '\xCA', '\x35', '\x1F', '\xC4', '\x67', '\x6A', '\x38', '\xA0', '\xC6', '\x3F', '\x0E', '\xED', '\x66', '\x6C', '\x0D', '\xBA', '\xC3', '\x37', '\x34', '\xD0', '\x67', '\x7D', '\x10', '\xA2', '\xF0', '\x2E', '\x1B', '\x9F', '\x77', '\x62', '\x0F', '\xD5'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - lines->SetScrollBarButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x0F15B16B5BAFD57FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xE3', '\x5E', '\x17', '\xED', '\x17', '\x87', '\x26', '\xB0', '\xE5', '\x15', '\x17', '\xDB', '\x6A', '\xF3', '\xBF', '\x3C', '\x47', '\x87', '\xB2', + '\x79', '\xA3', '\x3C', '\x91', '\x18', '\x64', '\x84', '\xBE', '\x73', '\xB2', '\x15', '\x90', '\x1E', '\x51', '\x9E', '\xBB', '\x7B', '\x88', '\x28', + '\x91', '\x0F', '\x4C', '\x86', '\x88', '\x73', '\xB8', '\x3E', '\x8D', '\x53', '\x41', '\x9C', '\xA7', '\x17'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x7DE349D717D7F123ULL> name(source); + return name.Text(); + }())); } { CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); - const char scrollBackgroundSource[] = { + lines->SetScrollBarBackground(std::string([]() { + constexpr char bytes[] = { '\x21', '\x36', '\x47', '\xB5', '\x41', '\x0D', '\xE4', '\xBE', '\x27', '\x7D', '\x47', '\x83', '\x3C', '\x79', '\x7D', '\x32', '\x85', '\xEF', '\xE2', '\x21', '\xF5', '\xB6', '\x53', '\x16', '\xA6', '\xEC', '\xEE', '\x2B', '\xE4', '\x9F', '\x52', '\x10', '\x93', '\xF6', '\xEB', '\x23', '\xDE', '\xA1', '\x46', '\x2C', '\x8C', '\xF0', '\xE3', '\x61', '\xE3', '\xAE', '\x51', '\x73'}; - thread_local EncryptedName scrollBackgroundName(scrollBackgroundSource); - const std::string scrollBackground(scrollBackgroundName.Text()); - lines->SetScrollBarBackground(scrollBackground); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x7321C3814F8799E1ULL> name(source); + return name.Text(); + }())); } { CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); - const char thumbBottomSource[] = { - '\x09', '\xBC', '\x39', '\x89', '\x39', '\x17', '\xD0', '\xBC', '\x0F', '\xF7', '\x39', '\xBF', '\x44', '\x63', '\x49', '\x30', '\xAD', '\x65', '\x9C', - '\x1D', '\x8D', '\xAC', '\x67', '\x14', '\x8E', '\x66', '\x90', '\x17', '\x9C', '\x85', '\x66', '\x12', '\xBB', '\x7C', '\x95', '\x1F', '\xA6', '\xAD', - '\x7D', '\x04', '\xA4', '\x71', '\xA6', '\x17', '\x96', '\xAE', '\x7B', '\x5F', '\xAB', '\x7E', '\x89', '\x73'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xA3', '\x5A', '\x21', '\x85', '\xFB', '\xEB', '\xD8', '\x06', '\xA5', '\x11', '\x21', '\xB3', '\x86', '\x9F', '\x41', '\x8A', '\x07', '\x83', '\x84', - '\x11', '\x4F', '\x50', '\x6F', '\xAE', '\x24', '\x80', '\x88', '\x1B', '\x5E', '\x79', '\x6E', '\xA8', '\x11', '\x9A', '\x8D', '\x13', '\x64', '\x51', - '\x75', '\xBE', '\x0E', '\x97', '\xBE', '\x12', '\x52', '\x41', '\x33', '\xA9', '\x0E', '\x85', '\xE1'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + lines->SetScrollBarThumbImages(std::string([]() { + constexpr char bytes[] = { '\x8F', '\x0E', '\x0F', '\xCF', '\xA3', '\x19', '\x84', '\xB4', '\x89', '\x45', '\x0F', '\xF9', '\xDE', '\x6D', '\x1D', '\x38', '\x2B', '\xD7', '\xAA', '\x5B', '\x17', '\xA2', '\x33', '\x1C', '\x08', '\xD4', '\xA6', '\x51', '\x06', '\x8B', '\x32', '\x1A', '\x3D', '\xCE', '\xA3', '\x59', '\x3C', '\xA3', '\x29', '\x0C', '\x22', '\xC3', '\x90', '\x40', '\x13', '\xF9', '\x23', '\x14', '\x3F', '\xA1'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - lines->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x7941D76335CFA14FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xA3', '\x5A', '\x21', '\x85', '\xFB', '\xEB', '\xD8', '\x06', '\xA5', '\x11', '\x21', '\xB3', '\x86', '\x9F', '\x41', '\x8A', '\x07', '\x83', '\x84', + '\x11', '\x4F', '\x50', '\x6F', '\xAE', '\x24', '\x80', '\x88', '\x1B', '\x5E', '\x79', '\x6E', '\xA8', '\x11', '\x9A', '\x8D', '\x13', '\x64', '\x51', + '\x75', '\xBE', '\x0E', '\x97', '\xBE', '\x12', '\x52', '\x41', '\x33', '\xA9', '\x0E', '\x85', '\xE1'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xCB1D253B7FE1F563ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x09', '\xBC', '\x39', '\x89', '\x39', '\x17', '\xD0', '\xBC', '\x0F', '\xF7', '\x39', '\xBF', '\x44', '\x63', '\x49', '\x30', '\xAD', '\x65', '\x9C', + '\x1D', '\x8D', '\xAC', '\x67', '\x14', '\x8E', '\x66', '\x90', '\x17', '\x9C', '\x85', '\x66', '\x12', '\xBB', '\x7C', '\x95', '\x1F', '\xA6', '\xAD', + '\x7D', '\x04', '\xA4', '\x71', '\xA6', '\x17', '\x96', '\xAE', '\x7B', '\x5F', '\xAB', '\x7E', '\x89', '\x73'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x7115D9F973F913C9ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00F0); @@ -1709,10 +1882,12 @@ void CUIQuestInfo::Slot15(int width, int height) { reinterpret_cast(this->unknown_00F4)->SetTextOffset(0, 0); { CUITextViewer* status = reinterpret_cast(this->unknown_00F4); - const char statusFontSource[] = {'\x5A', '\x70', '\xFF', '\x40', '\x1C', '\x23'}; - thread_local EncryptedName statusFontName(statusFontSource); - const std::string statusFont(statusFontName.Text()); - status->SetFont(statusFont); + status->SetFont(std::string([]() { + constexpr char bytes[] = {'\x5A', '\x70', '\xFF', '\x40', '\x1C', '\x23'}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xE55723712993051DULL> name(source); + return name.Text(); + }())); } reinterpret_cast(this->unknown_00F4)->SetFontHeight(12); reinterpret_cast(this->unknown_00F4)->SetBold(0); @@ -1733,8 +1908,10 @@ void CUIQuestInfo::Slot15(int width, int height) { // FUNCTION: fn_14330 void CUICharacterInfo::Slot16() { this->jobIcon->SetImage(std::format("유저인터페이스\\renewalparty\\icon_jobs_{}.bmp", g_session.m_job)); - this->level->SetText(std::format("Lv. {}", g_session.m_level)); - this->jobLevel->SetText(std::format("Jv. {}", g_session.m_jobLevel)); + const int level = g_session.m_level; + this->level->SetText(std::format("Lv. {}", level)); + const int jobLevel = g_session.m_jobLevel; + this->jobLevel->SetText(std::format("Jv. {}", jobLevel)); this->name->SetText(g_session.DecodePlayerName()); } @@ -1906,31 +2083,39 @@ CUIListBox* CUITab::CreateSubTabList() { CUIListBox* list = this->subTabs; { - const char disabledImageSource[] = { - '\x97', '\x50', '\x2D', '\xB5', '\x6F', '\x7B', '\x12', '\x78', '\x91', '\x1B', '\x2D', '\x83', '\x12', '\x0F', '\x8B', '\xF4', '\x33', '\x89', '\x88', - '\x21', '\xDB', '\xC0', '\xA5', '\xD0', '\x10', '\x8A', '\x84', '\x2B', '\xCA', '\xE9', '\xA3', '\xD4', '\x35', '\xA0', '\x8F', '\x3B', '\xC1', '\xEA', - '\xA4', '\xC0', '\x35', '\xA0', '\x83', '\x20', '\xDD', '\xD8', '\xB6', '\xD9', '\x79', '\x9D', '\x80', '\x3F', '\xAF'}; - thread_local EncryptedName disabledImageName(disabledImageSource); - const std::string disabledImage(disabledImageName.Text()); - const char pressedImageSource[] = { - '\x11', '\x76', '\xD9', '\xE3', '\x6B', '\x95', '\x18', '\xAA', '\x17', '\x3D', '\xD9', '\xD5', '\x16', '\xE1', '\x81', '\x26', '\xB5', '\xAF', '\x7C', - '\x77', '\xDF', '\x2E', '\xAF', '\x02', '\x96', '\xAC', '\x70', '\x7D', '\xCE', '\x07', '\xA9', '\x06', '\xB3', '\x86', '\x7B', '\x6D', '\xC5', '\x04', - '\xAE', '\x12', '\xB3', '\x86', '\x76', '\x6F', '\xCE', '\x29', '\xF3', '\x05', '\xBC', '\xA9', '\x19'}; - thread_local EncryptedName pressedImageName(pressedImageSource); - const std::string pressedImage(pressedImageName.Text()); - const char hoverImageSource[] = { - '\x33', '\xBA', '\xB3', '\xD9', '\xB9', '\x39', '\x36', '\x78', '\x35', '\xF1', '\xB3', '\xEF', '\xC4', '\x4D', '\xAF', '\xF4', '\x97', '\x63', '\x16', - '\x4D', '\x0D', '\x82', '\x81', '\xD0', '\xB4', '\x60', '\x1A', '\x47', '\x1C', '\xAB', '\x87', '\xD4', '\x91', '\x4A', '\x11', '\x57', '\x17', '\xA8', - '\x80', '\xC0', '\x91', '\x4A', '\x03', '\x51', '\x1C', '\x84', '\x80', '\x9B', '\x91', '\x78', '\x03', '\x23'}; - thread_local EncryptedName hoverImageName(hoverImageSource); - const std::string hoverImage(hoverImageName.Text()); - const char normalImageSource[] = { + list->SetImages(std::string([]() { + constexpr char bytes[] = { '\xC3', '\x9A', '\x59', '\x4F', '\x73', '\xB9', '\x0C', '\xA6', '\xC5', '\xD1', '\x59', '\x79', '\x0E', '\xCD', '\x95', '\x2A', '\x67', '\x43', '\xFC', '\xDB', '\xC7', '\x02', '\xBB', '\x0E', '\x44', '\x40', '\xF0', '\xD1', '\xD6', '\x2B', '\xBD', '\x0A', '\x61', '\x6A', '\xFB', '\xC1', '\xDD', '\x28', '\xBA', '\x1E', '\x61', '\x6A', '\xF7', '\xDA', '\xC1', '\x1A', '\xA8', '\x07', '\x2D', '\x57', '\xF4', '\xC5', '\xB3'}; - thread_local EncryptedName normalImageName(normalImageSource); - const std::string normalImage(normalImageName.Text()); - list->SetImages(normalImage, hoverImage, pressedImage, disabledImage); + constexpr EncryptedSource<53> source(bytes); + thread_local EncryptedName<53, 0x6BC977B3B5993503ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x33', '\xBA', '\xB3', '\xD9', '\xB9', '\x39', '\x36', '\x78', '\x35', '\xF1', '\xB3', '\xEF', '\xC4', '\x4D', '\xAF', '\xF4', '\x97', '\x63', '\x16', + '\x4D', '\x0D', '\x82', '\x81', '\xD0', '\xB4', '\x60', '\x1A', '\x47', '\x1C', '\xAB', '\x87', '\xD4', '\x91', '\x4A', '\x11', '\x57', '\x17', '\xA8', + '\x80', '\xC0', '\x91', '\x4A', '\x03', '\x51', '\x1C', '\x84', '\x80', '\x9B', '\x91', '\x78', '\x03', '\x23'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xB5F3F779237315F3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x11', '\x76', '\xD9', '\xE3', '\x6B', '\x95', '\x18', '\xAA', '\x17', '\x3D', '\xD9', '\xD5', '\x16', '\xE1', '\x81', '\x26', '\xB5', '\xAF', '\x7C', + '\x77', '\xDF', '\x2E', '\xAF', '\x02', '\x96', '\xAC', '\x70', '\x7D', '\xCE', '\x07', '\xA9', '\x06', '\xB3', '\x86', '\x7B', '\x6D', '\xC5', '\x04', + '\xAE', '\x12', '\xB3', '\x86', '\x76', '\x6F', '\xCE', '\x29', '\xF3', '\x05', '\xBC', '\xA9', '\x19'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x67DD5BAB1919D9D1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x97', '\x50', '\x2D', '\xB5', '\x6F', '\x7B', '\x12', '\x78', '\x91', '\x1B', '\x2D', '\x83', '\x12', '\x0F', '\x8B', '\xF4', '\x33', '\x89', '\x88', + '\x21', '\xDB', '\xC0', '\xA5', '\xD0', '\x10', '\x8A', '\x84', '\x2B', '\xCA', '\xE9', '\xA3', '\xD4', '\x35', '\xA0', '\x8F', '\x3B', '\xC1', '\xEA', + '\xA4', '\xC0', '\x35', '\xA0', '\x83', '\x20', '\xDD', '\xD8', '\xB6', '\xD9', '\x79', '\x9D', '\x80', '\x3F', '\xAF'}; + constexpr EncryptedSource<53> source(bytes); + thread_local EncryptedName<53, 0xB5D7B5AF4FEDFF57ULL> name(source); + return name.Text(); + }())); } this->subTabs->itemWidth = 98; @@ -1941,49 +2126,61 @@ CUIListBox* CUITab::CreateSubTabList() { this->subTabs->scrollBar->Move(89, 0); this->subTabs->scrollBar->step = 20; { - const char downImageSource[] = { - '\x77', '\x9C', '\xE5', '\xF3', '\x7B', '\xFB', '\x40', '\xCE', '\x71', '\xD7', '\xE5', '\xC5', '\x06', '\x8F', '\xD9', '\x42', '\xD3', '\x45', '\x40', - '\x67', '\xCF', '\x40', '\xF7', '\x66', '\xF0', '\x46', '\x4C', '\x6D', '\xDE', '\x69', '\xF6', '\x60', '\xC5', '\x5C', '\x49', '\x65', '\xE4', '\x54', - '\xF7', '\x71', '\xD8', '\x44', '\x7A', '\x6D', '\xD4', '\x42', '\xEB', '\x2D', '\xD5', '\x5E', '\x55', '\x09'}; - thread_local EncryptedName downImageName(downImageSource); - const std::string downImage(downImageName.Text()); - const char upImageSource[] = { + this->subTabs->scrollBar->SetButtonImages(std::string([]() { + constexpr char bytes[] = { '\xB9', '\x58', '\xD5', '\xCF', '\x6D', '\x9F', '\x58', '\x56', '\xBF', '\x13', '\xD5', '\xF9', '\x10', '\xEB', '\xC1', '\xDA', '\x1D', '\x81', '\x70', '\x5B', '\xD9', '\x24', '\xEF', '\xFE', '\x3E', '\x82', '\x7C', '\x51', '\xC8', '\x0D', '\xEE', '\xF8', '\x0B', '\x98', '\x79', '\x59', '\xF2', '\x30', '\xEF', '\xE9', '\x16', '\x80', '\x4A', '\x40', '\xDD', '\x7F', '\xFF', '\xF6', '\x09', '\xF7'}; - thread_local EncryptedName upImageName(upImageSource); - const std::string upImage(upImageName.Text()); - this->subTabs->scrollBar->SetButtonImages(upImage, downImage); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x9B9D51AD3515F779ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x77', '\x9C', '\xE5', '\xF3', '\x7B', '\xFB', '\x40', '\xCE', '\x71', '\xD7', '\xE5', '\xC5', '\x06', '\x8F', '\xD9', '\x42', '\xD3', '\x45', '\x40', + '\x67', '\xCF', '\x40', '\xF7', '\x66', '\xF0', '\x46', '\x4C', '\x6D', '\xDE', '\x69', '\xF6', '\x60', '\xC5', '\x5C', '\x49', '\x65', '\xE4', '\x54', + '\xF7', '\x71', '\xD8', '\x44', '\x7A', '\x6D', '\xD4', '\x42', '\xEB', '\x2D', '\xD5', '\x5E', '\x55', '\x09'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x038535BB092533B7ULL> name(source); + return name.Text(); + }())); } { - const char backgroundImageSource[] = { + this->subTabs->scrollBar->SetBackground(std::string([]() { + constexpr char bytes[] = { '\x13', '\xD8', '\x27', '\x93', '\x97', '\x09', '\xEE', '\x36', '\x15', '\x93', '\x27', '\xA5', '\xEA', '\x7D', '\x77', '\xBA', '\xB7', '\x01', '\x82', '\x07', '\x23', '\xB2', '\x59', '\x9E', '\x94', '\x02', '\x8E', '\x0D', '\x32', '\x9B', '\x58', '\x98', '\xA1', '\x18', '\x8B', '\x05', '\x08', '\xA5', '\x4C', '\xA4', '\xBE', '\x1E', '\x83', '\x47', '\x35', '\xAA', '\x5B', '\xFB'}; - thread_local EncryptedName backgroundImageName(backgroundImageSource); - const std::string backgroundImage(backgroundImageName.Text()); - this->subTabs->scrollBar->SetBackground(backgroundImage); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xFB2BC75769E777D3ULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\xB3', '\x8E', '\x27', '\xBD', '\xEB', '\xB7', '\x7A', '\x46', '\xB5', '\xC5', '\x27', '\x8B', '\x96', '\xC3', '\xE3', '\xCA', '\x17', '\x57', '\x82', - '\x29', '\x5F', '\x0C', '\xCD', '\xEE', '\x34', '\x54', '\x8E', '\x23', '\x4E', '\x25', '\xCC', '\xE8', '\x01', '\x4E', '\x8B', '\x2B', '\x74', '\x0D', - '\xD7', '\xFE', '\x1E', '\x43', '\xB8', '\x23', '\x44', '\x0E', '\xD1', '\xA5', '\x11', '\x4C', '\x97', '\x47'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xBD', '\xFC', '\x4F', '\x5B', '\x3F', '\x23', '\xAC', '\x10', '\xBB', '\xB7', '\x4F', '\x6D', '\x42', '\x57', '\x35', '\x9C', '\x19', '\x25', '\xEA', - '\xCF', '\x8B', '\x98', '\x1B', '\xB8', '\x3A', '\x26', '\xE6', '\xC5', '\x9A', '\xB1', '\x1A', '\xBE', '\x0F', '\x3C', '\xE3', '\xCD', '\xA0', '\x99', - '\x01', '\xA8', '\x10', '\x31', '\xD0', '\xCC', '\x96', '\x89', '\x47', '\xBF', '\x10', '\x23', '\x8F'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + this->subTabs->scrollBar->SetThumbImages(std::string([]() { + constexpr char bytes[] = { '\x51', '\x86', '\xB9', '\xB9', '\x1B', '\xC7', '\x60', '\xBC', '\x57', '\xCD', '\xB9', '\x8F', '\x66', '\xB3', '\xF9', '\x30', '\xF5', '\x5F', '\x1C', '\x2D', '\xAF', '\x7C', '\xD7', '\x14', '\xD6', '\x5C', '\x10', '\x27', '\xBE', '\x55', '\xD6', '\x12', '\xE3', '\x46', '\x15', '\x2F', '\x84', '\x7D', '\xCD', '\x04', '\xFC', '\x4B', '\x26', '\x36', '\xAB', '\x27', '\xC7', '\x1C', '\xE1', '\x29'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - this->subTabs->scrollBar->SetThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x71A509DB43792991ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xBD', '\xFC', '\x4F', '\x5B', '\x3F', '\x23', '\xAC', '\x10', '\xBB', '\xB7', '\x4F', '\x6D', '\x42', '\x57', '\x35', '\x9C', '\x19', '\x25', '\xEA', + '\xCF', '\x8B', '\x98', '\x1B', '\xB8', '\x3A', '\x26', '\xE6', '\xC5', '\x9A', '\xB1', '\x1A', '\xBE', '\x0F', '\x3C', '\xE3', '\xCD', '\xA0', '\x99', + '\x01', '\xA8', '\x10', '\x31', '\xD0', '\xCC', '\x96', '\x89', '\x47', '\xBF', '\x10', '\x23', '\x8F'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xDD69EDFFA18F537DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xB3', '\x8E', '\x27', '\xBD', '\xEB', '\xB7', '\x7A', '\x46', '\xB5', '\xC5', '\x27', '\x8B', '\x96', '\xC3', '\xE3', '\xCA', '\x17', '\x57', '\x82', + '\x29', '\x5F', '\x0C', '\xCD', '\xEE', '\x34', '\x54', '\x8E', '\x23', '\x4E', '\x25', '\xCC', '\xE8', '\x01', '\x4E', '\x8B', '\x2B', '\x74', '\x0D', + '\xD7', '\xFE', '\x1E', '\x43', '\xB8', '\x23', '\x44', '\x0E', '\xD1', '\xA5', '\x11', '\x4C', '\x97', '\x47'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x8BBF792B47E72173ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->subTabs); @@ -2148,12 +2345,15 @@ void CUIIntro::Slot15(int width, int height) { this->banner->SetSize(630, 216); this->banner->Move(0, 0); { - const char bannerSource[] = { + const std::string banner([]() { + constexpr char bytes[] = { '\xAD', '\x14', '\x55', '\xD7', '\x53', '\x35', '\xD2', '\x08', '\xAB', '\x5F', '\x55', '\xE1', '\x2E', '\x41', '\x4B', '\x84', '\x09', '\xCD', '\xF0', '\x43', '\xE7', '\x8E', '\x65', '\xA0', '\x2A', '\xCE', '\xFC', '\x49', '\xF6', '\xA7', '\x75', '\xA2', '\x32', '\xD9', '\xF4', '\x43', '\xFD', '\x9E', '\x65', '\xEB', '\x0F', '\xD6', '\xE5', '\x2D'}; - thread_local EncryptedName bannerName(bannerSource); - const std::string banner(bannerName.Text()); + constexpr EncryptedSource<44> source(bytes); + thread_local EncryptedName<44, 0xC517FB932D95BB6DULL> name(source); + return name.Text(); + }()); this->banner->SetImage(banner); } this->AddChild(this->banner); @@ -2169,34 +2369,42 @@ void CUIIntro::Slot15(int width, int height) { this->contents->rowHeight = 44; this->contents->SetSize(603, 166); this->contents->Move(10, 207); - this->contents->onSelect = [this](CUITabInfo* item, const Guide_Intro::Contents& contents) { this->OnSelectContents(item, contents); }; - this->contents->binder = [this](CUITabInfo* item, const Guide_Intro::Contents& contents) { this->BindContents(item, contents); }; + this->contents->SetOnSelect([this](CUITabInfo* item, const Guide_Intro::Contents& contents) { this->OnSelectContents(item, contents); }); + this->contents->SetBinder([this](CUITabInfo* item, const Guide_Intro::Contents& contents) { this->BindContents(item, contents); }); { - const char disabledSource[] = { - '\x5B', '\xF8', '\xC3', '\x63', '\xA7', '\xCB', '\xC0', '\xC8', '\x5D', '\xB3', '\xC3', '\x55', '\xDA', '\xBF', '\x59', '\x44', '\xFF', '\x21', '\x66', - '\xF7', '\x13', '\x70', '\x77', '\x60', '\xDC', '\x22', '\x6A', '\xFD', '\x02', '\x59', '\x69', '\x6C', '\xE8', '\x23', '\x5C', '\xA8', '\x49', '\x67', - '\x68', '\x75', '\x9B'}; - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const char pressedSource[] = { - '\x65', '\x32', '\xAD', '\x03', '\xA3', '\xE9', '\xB2', '\xCE', '\x63', '\x79', '\xAD', '\x35', '\xDE', '\x9D', '\x2B', '\x42', '\xC1', '\xEB', '\x08', - '\x97', '\x17', '\x52', '\x05', '\x66', '\xE2', '\xE8', '\x04', '\x9D', '\x06', '\x7B', '\x1B', '\x6A', '\xD6', '\xE9', '\x32', '\xC8', '\x4D', '\x45', - '\x1A', '\x73', '\xA5'}; - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const char hoverSource[] = { - '\x47', '\xBC', '\xAB', '\x85', '\xF9', '\xC7', '\xB4', '\xC6', '\x41', '\xF7', '\xAB', '\xB3', '\x84', '\xB3', '\x2D', '\x4A', '\xE3', '\x65', '\x0E', - '\x11', '\x4D', '\x7C', '\x03', '\x6E', '\xC0', '\x66', '\x02', '\x1B', '\x5C', '\x55', '\x1D', '\x62', '\xF4', '\x67', '\x34', '\x4E', '\x17', '\x6B', - '\x1C', '\x7B', '\x87'}; - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const char normalSource[] = { + this->contents->SetImages(std::string([]() { + constexpr char bytes[] = { '\x09', '\x5A', '\x9F', '\x71', '\x4F', '\x1B', '\x7E', '\xEE', '\x0F', '\x11', '\x9F', '\x47', '\x32', '\x6F', '\xE7', '\x62', '\xAD', '\x83', '\x3A', '\xE5', '\xFB', '\xA0', '\xC9', '\x46', '\x8E', '\x80', '\x36', '\xEF', '\xEA', '\x89', '\xD7', '\x4A', '\xBA', '\x81', '\x00', '\xBA', '\xA1', '\xB7', '\xD6', '\x53', '\xC9'}; - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - this->contents->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<41> source(bytes); + thread_local EncryptedName<41, 0x23BBD58F8B5FF5C9ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x47', '\xBC', '\xAB', '\x85', '\xF9', '\xC7', '\xB4', '\xC6', '\x41', '\xF7', '\xAB', '\xB3', '\x84', '\xB3', '\x2D', '\x4A', '\xE3', '\x65', '\x0E', + '\x11', '\x4D', '\x7C', '\x03', '\x6E', '\xC0', '\x66', '\x02', '\x1B', '\x5C', '\x55', '\x1D', '\x62', '\xF4', '\x67', '\x34', '\x4E', '\x17', '\x6B', + '\x1C', '\x7B', '\x87'}; + constexpr EncryptedSource<41> source(bytes); + thread_local EncryptedName<41, 0x0B7109397F6B1387ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x65', '\x32', '\xAD', '\x03', '\xA3', '\xE9', '\xB2', '\xCE', '\x63', '\x79', '\xAD', '\x35', '\xDE', '\x9D', '\x2B', '\x42', '\xC1', '\xEB', '\x08', + '\x97', '\x17', '\x52', '\x05', '\x66', '\xE2', '\xE8', '\x04', '\x9D', '\x06', '\x7B', '\x1B', '\x6A', '\xD6', '\xE9', '\x32', '\xC8', '\x4D', '\x45', + '\x1A', '\x73', '\xA5'}; + constexpr EncryptedSource<41> source(bytes); + thread_local EncryptedName<41, 0x03772763F96D9DA5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x5B', '\xF8', '\xC3', '\x63', '\xA7', '\xCB', '\xC0', '\xC8', '\x5D', '\xB3', '\xC3', '\x55', '\xDA', '\xBF', '\x59', '\x44', '\xFF', '\x21', '\x66', + '\xF7', '\x13', '\x70', '\x77', '\x60', '\xDC', '\x22', '\x6A', '\xFD', '\x02', '\x59', '\x69', '\x6C', '\xE8', '\x23', '\x5C', '\xA8', '\x49', '\x67', + '\x68', '\x75', '\x9B'}; + constexpr EncryptedSource<41> source(bytes); + thread_local EncryptedName<41, 0x050505679903579BULL> name(source); + return name.Text(); + }())); } this->contents->itemX = 0; this->contents->itemY = 0; @@ -2204,49 +2412,61 @@ void CUIIntro::Slot15(int width, int height) { this->contents->scrollBar->Move(595, 0); this->contents->scrollBar->step = 44; { - const char downSource[] = { - '\x67', '\x5A', '\xBF', '\xC3', '\xF1', '\x85', '\xEE', '\x72', '\x61', '\x11', '\xBF', '\xF5', '\x8C', '\xF1', '\x77', '\xFE', '\xC3', '\x83', '\x1A', - '\x57', '\x45', '\x3E', '\x59', '\xDA', '\xE0', '\x80', '\x16', '\x5D', '\x54', '\x17', '\x58', '\xDC', '\xD5', '\x9A', '\x13', '\x55', '\x6E', '\x2A', - '\x59', '\xCD', '\xC8', '\x82', '\x20', '\x5D', '\x5E', '\x3C', '\x45', '\x91', '\xC5', '\x98', '\x0F', '\x39'}; - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const char upSource[] = { + this->contents->scrollBar->SetButtonImages(std::string([]() { + constexpr char bytes[] = { '\x21', '\xD4', '\x39', '\x2D', '\x15', '\xDD', '\xFC', '\x10', '\x27', '\x9F', '\x39', '\x1B', '\x68', '\xA9', '\x65', '\x9C', '\x85', '\x0D', '\x9C', '\xB9', '\xA1', '\x66', '\x4B', '\xB8', '\xA6', '\x0E', '\x90', '\xB3', '\xB0', '\x4F', '\x4A', '\xBE', '\x93', '\x14', '\x95', '\xBB', '\x8A', '\x72', '\x4B', '\xAF', '\x8E', '\x0C', '\xA6', '\xA2', '\xA5', '\x3D', '\x5B', '\xB0', '\x91', '\x7B'}; - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->contents->scrollBar->SetButtonImages(up, down); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xDD3913D5D7F97BE1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x67', '\x5A', '\xBF', '\xC3', '\xF1', '\x85', '\xEE', '\x72', '\x61', '\x11', '\xBF', '\xF5', '\x8C', '\xF1', '\x77', '\xFE', '\xC3', '\x83', '\x1A', + '\x57', '\x45', '\x3E', '\x59', '\xDA', '\xE0', '\x80', '\x16', '\x5D', '\x54', '\x17', '\x58', '\xDC', '\xD5', '\x9A', '\x13', '\x55', '\x6E', '\x2A', + '\x59', '\xCD', '\xC8', '\x82', '\x20', '\x5D', '\x5E', '\x3C', '\x45', '\x91', '\xC5', '\x98', '\x0F', '\x39'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xBF2B4B31397FF5A7ULL> name(source); + return name.Text(); + }())); } { - const char backgroundSource[] = { + this->contents->scrollBar->SetBackground(std::string([]() { + constexpr char bytes[] = { '\x7D', '\x12', '\x2D', '\xCD', '\x7B', '\x71', '\x2A', '\x4E', '\x7B', '\x59', '\x2D', '\xFB', '\x06', '\x05', '\xB3', '\xC2', '\xD9', '\xCB', '\x88', '\x59', '\xCF', '\xCA', '\x9D', '\xE6', '\xFA', '\xC8', '\x84', '\x53', '\xDE', '\xE3', '\x9C', '\xE0', '\xCF', '\xD2', '\x81', '\x5B', '\xE4', '\xDD', '\x88', '\xDC', '\xD0', '\xD4', '\x89', '\x19', '\xD9', '\xD2', '\x9F', '\x83'}; - thread_local EncryptedName backgroundName(backgroundSource); - const std::string background(backgroundName.Text()); - this->contents->scrollBar->SetBackground(background); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x83EFBFBB37EDBDBDULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\x5F', '\x6A', '\xAD', '\x51', '\x17', '\xE7', '\x38', '\x68', '\x59', '\x21', '\xAD', '\x67', '\x6A', '\x93', '\xA1', '\xE4', '\xFB', '\xB3', '\x08', - '\xC5', '\xA3', '\x5C', '\x8F', '\xC0', '\xD8', '\xB0', '\x04', '\xCF', '\xB2', '\x75', '\x8E', '\xC6', '\xED', '\xAA', '\x01', '\xC7', '\x88', '\x5D', - '\x95', '\xD0', '\xF2', '\xA7', '\x32', '\xCF', '\xB8', '\x5E', '\x93', '\x8B', '\xFD', '\xA8', '\x1D', '\xAB'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xC9', '\x88', '\xEF', '\x41', '\x7D', '\x93', '\xB8', '\x14', '\xCF', '\xC3', '\xEF', '\x77', '\x00', '\xE7', '\x21', '\x98', '\x6D', '\x51', '\x4A', - '\xD5', '\xC9', '\x28', '\x0F', '\xBC', '\x4E', '\x52', '\x46', '\xDF', '\xD8', '\x01', '\x0E', '\xBA', '\x7B', '\x48', '\x43', '\xD7', '\xE2', '\x29', - '\x15', '\xAC', '\x64', '\x45', '\x70', '\xD6', '\xD4', '\x39', '\x53', '\xBB', '\x64', '\x57', '\x2F'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + this->contents->scrollBar->SetThumbImages(std::string([]() { + constexpr char bytes[] = { '\xBF', '\xBC', '\x1F', '\x2B', '\x45', '\xA9', '\xBC', '\x20', '\xB9', '\xF7', '\x1F', '\x1D', '\x38', '\xDD', '\x25', '\xAC', '\x1B', '\x65', '\xBA', '\xBF', '\xF1', '\x12', '\x0B', '\x88', '\x38', '\x66', '\xB6', '\xB5', '\xE0', '\x3B', '\x0A', '\x8E', '\x0D', '\x7C', '\xB3', '\xBD', '\xDA', '\x13', '\x11', '\x98', '\x12', '\x71', '\x80', '\xA4', '\xF5', '\x49', '\x1B', '\x80', '\x0F', '\x13'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - this->contents->scrollBar->SetThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xED796785D1DF137FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xC9', '\x88', '\xEF', '\x41', '\x7D', '\x93', '\xB8', '\x14', '\xCF', '\xC3', '\xEF', '\x77', '\x00', '\xE7', '\x21', '\x98', '\x6D', '\x51', '\x4A', + '\xD5', '\xC9', '\x28', '\x0F', '\xBC', '\x4E', '\x52', '\x46', '\xDF', '\xD8', '\x01', '\x0E', '\xBA', '\x7B', '\x48', '\x43', '\xD7', '\xE2', '\x29', + '\x15', '\xAC', '\x64', '\x45', '\x70', '\xD6', '\xD4', '\x39', '\x53', '\xBB', '\x64', '\x57', '\x2F'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xD97D5DBDBB2F2709ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x5F', '\x6A', '\xAD', '\x51', '\x17', '\xE7', '\x38', '\x68', '\x59', '\x21', '\xAD', '\x67', '\x6A', '\x93', '\xA1', '\xE4', '\xFB', '\xB3', '\x08', + '\xC5', '\xA3', '\x5C', '\x8F', '\xC0', '\xD8', '\xB0', '\x04', '\xCF', '\xB2', '\x75', '\x8E', '\xC6', '\xED', '\xAA', '\x01', '\xC7', '\x88', '\x5D', + '\x95', '\xD0', '\xF2', '\xA7', '\x32', '\xCF', '\xB8', '\x5E', '\x93', '\x8B', '\xFD', '\xA8', '\x1D', '\xAB'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xA5FD29D7AB6DC59FULL> name(source); + return name.Text(); + }())); } this->contents->AddNewItem(); this->AddChild(this->contents); @@ -2585,34 +2805,42 @@ void CUIMonster::Slot15(int width, int height) { this->monsterList->rowHeight = 128; this->monsterList->SetSize(627, 355); this->monsterList->Move(0, 0); - this->monsterList->onSelect = [this](CUIMonsterInfo* item, const CMonsterData& data) { this->OnSelectMonster(item, data); }; - this->monsterList->binder = [this](CUIMonsterInfo* item, const CMonsterData& data) { this->BindMonster(item, data); }; + this->monsterList->onSelect = std::function([this](CUIMonsterInfo* item, const CMonsterData& data) { this->OnSelectMonster(item, data); }); + this->monsterList->binder = std::function([this](CUIMonsterInfo* item, const CMonsterData& data) { this->BindMonster(item, data); }); { - const char listDisabledSource[] = { - '\xF3', '\xCC', '\x95', '\x0B', '\xE9', '\xFB', '\x16', '\x84', '\xF5', '\x87', '\x95', '\x3D', '\x94', '\x8F', '\x8F', '\x08', '\x57', '\x15', '\x30', - '\x9F', '\x5D', '\x40', '\xA1', '\x2C', '\x74', '\x16', '\x3C', '\x95', '\x4C', '\x69', '\xBF', '\x20', '\x40', '\x17', '\x0A', '\xC2', '\x76', '\x5B', - '\xBC', '\x3B', '\x5E', '\x02', '\x39', '\xDF', '\x4B', '\x58', '\xA3', '\x49'}; - thread_local EncryptedName listDisabledName(listDisabledSource); - const std::string listDisabled(listDisabledName.Text()); - const char listOverSource[] = { - '\x75', '\x20', '\x81', '\xDF', '\xD3', '\x33', '\xEA', '\xB4', '\x73', '\x6B', '\x81', '\xE9', '\xAE', '\x47', '\x73', '\x38', '\xD1', '\xF9', '\x24', - '\x4B', '\x67', '\x88', '\x5D', '\x1C', '\xF2', '\xFA', '\x28', '\x41', '\x76', '\xA1', '\x43', '\x10', '\xC6', '\xFB', '\x1E', '\x16', '\x4C', '\x92', - '\x59', '\x1C', '\xC7', '\xA1', '\x23', '\x48', '\x63', '\xFD'}; - thread_local EncryptedName listOverName(listOverSource); - const std::string listOver(listOverName.Text()); - const char listPressSource[] = { - '\x7F', '\xC6', '\x23', '\x37', '\x45', '\x49', '\x9A', '\x3C', '\x79', '\x8D', '\x23', '\x01', '\x38', '\x3D', '\x03', '\xB0', '\xDB', '\x1F', '\x86', - '\xA3', '\xF1', '\xF2', '\x2D', '\x94', '\xF8', '\x1C', '\x8A', '\xA9', '\xE0', '\xDB', '\x33', '\x98', '\xCC', '\x1D', '\xBC', '\xFE', '\xDA', '\xF7', - '\x2D', '\x94', '\xCC', '\x1A', '\xCD', '\xAF', '\xE8', '\xF7', '\x5F'}; - thread_local EncryptedName listPressName(listPressSource); - const std::string listPress(listPressName.Text()); - const char listNormalSource[] = { + this->monsterList->SetImages(std::string([]() { + constexpr char bytes[] = { '\x99', '\x2A', '\x47', '\x83', '\x37', '\xE1', '\xFA', '\x2E', '\x9F', '\x61', '\x47', '\xB5', '\x4A', '\x95', '\x63', '\xA2', '\x3D', '\xF3', '\xE2', '\x17', '\x83', '\x5A', '\x4D', '\x86', '\x1E', '\xF0', '\xEE', '\x1D', '\x92', '\x73', '\x53', '\x8A', '\x2A', '\xF1', '\xD8', '\x4A', '\xA8', '\x41', '\x50', '\x91', '\x34', '\xE4', '\xEB', '\x57', '\x95', '\x42', '\x4F', '\xE3'}; - thread_local EncryptedName listNormalName(listNormalSource); - const std::string listNormal(listNormalName.Text()); - this->monsterList->SetImages(listNormal, listPress, listOver, listDisabled); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xE33F2FF779878559ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x7F', '\xC6', '\x23', '\x37', '\x45', '\x49', '\x9A', '\x3C', '\x79', '\x8D', '\x23', '\x01', '\x38', '\x3D', '\x03', '\xB0', '\xDB', '\x1F', '\x86', + '\xA3', '\xF1', '\xF2', '\x2D', '\x94', '\xF8', '\x1C', '\x8A', '\xA9', '\xE0', '\xDB', '\x33', '\x98', '\xCC', '\x1D', '\xBC', '\xFE', '\xDA', '\xF7', + '\x2D', '\x94', '\xCC', '\x1A', '\xCD', '\xAF', '\xE8', '\xF7', '\x5F'}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0xF15F8785CDE369BFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x75', '\x20', '\x81', '\xDF', '\xD3', '\x33', '\xEA', '\xB4', '\x73', '\x6B', '\x81', '\xE9', '\xAE', '\x47', '\x73', '\x38', '\xD1', '\xF9', '\x24', + '\x4B', '\x67', '\x88', '\x5D', '\x1C', '\xF2', '\xFA', '\x28', '\x41', '\x76', '\xA1', '\x43', '\x10', '\xC6', '\xFB', '\x1E', '\x16', '\x4C', '\x92', + '\x59', '\x1C', '\xC7', '\xA1', '\x23', '\x48', '\x63', '\xFD'}; + constexpr EncryptedSource<46> source(bytes); + thread_local EncryptedName<46, 0x792FFD1325418FB5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xF3', '\xCC', '\x95', '\x0B', '\xE9', '\xFB', '\x16', '\x84', '\xF5', '\x87', '\x95', '\x3D', '\x94', '\x8F', '\x8F', '\x08', '\x57', '\x15', '\x30', + '\x9F', '\x5D', '\x40', '\xA1', '\x2C', '\x74', '\x16', '\x3C', '\x95', '\x4C', '\x69', '\xBF', '\x20', '\x40', '\x17', '\x0A', '\xC2', '\x76', '\x5B', + '\xBC', '\x3B', '\x5E', '\x02', '\x39', '\xDF', '\x4B', '\x58', '\xA3', '\x49'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x49D33529F1556333ULL> name(source); + return name.Text(); + }())); } this->monsterList->itemX = 0; this->monsterList->itemY = 0; @@ -2620,49 +2848,61 @@ void CUIMonster::Slot15(int width, int height) { this->monsterList->scrollBar->Move(619, 0); this->monsterList->scrollBar->step = 20; { - const char downSource[] = { - '\x57', '\x66', '\x09', '\x61', '\x0D', '\x75', '\x74', '\x08', '\x51', '\x2D', '\x09', '\x57', '\x70', '\x01', '\xED', '\x84', '\xF3', '\xBF', '\xAC', - '\xF5', '\xB9', '\xCE', '\xC3', '\xA0', '\xD0', '\xBC', '\xA0', '\xFF', '\xA8', '\xE7', '\xC2', '\xA6', '\xE5', '\xA6', '\xA5', '\xF7', '\x92', '\xDA', - '\xC3', '\xB7', '\xF8', '\xBE', '\x96', '\xFF', '\xA2', '\xCC', '\xDF', '\xEB', '\xF5', '\xA4', '\xB9', '\x9B'}; - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const char upSource[] = { + this->monsterList->scrollBar->SetButtonImages(std::string([]() { + constexpr char bytes[] = { '\xF1', '\x56', '\x13', '\x03', '\xDD', '\x81', '\x0E', '\xCC', '\xF7', '\x1D', '\x13', '\x35', '\xA0', '\xF5', '\x97', '\x40', '\x55', '\x8F', '\xB6', '\x97', '\x69', '\x3A', '\xB9', '\x64', '\x76', '\x8C', '\xBA', '\x9D', '\x78', '\x13', '\xB8', '\x62', '\x43', '\x96', '\xBF', '\x95', '\x42', '\x2E', '\xB9', '\x73', '\x5E', '\x8E', '\x8C', '\x8C', '\x6D', '\x61', '\xA9', '\x6C', '\x41', '\xF9'}; - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->monsterList->scrollBar->SetButtonImages(up, down); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x01CB4F1DF9D3F931ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x57', '\x66', '\x09', '\x61', '\x0D', '\x75', '\x74', '\x08', '\x51', '\x2D', '\x09', '\x57', '\x70', '\x01', '\xED', '\x84', '\xF3', '\xBF', '\xAC', + '\xF5', '\xB9', '\xCE', '\xC3', '\xA0', '\xD0', '\xBC', '\xA0', '\xFF', '\xA8', '\xE7', '\xC2', '\xA6', '\xE5', '\xA6', '\xA5', '\xF7', '\x92', '\xDA', + '\xC3', '\xB7', '\xF8', '\xBE', '\x96', '\xFF', '\xA2', '\xCC', '\xDF', '\xEB', '\xF5', '\xA4', '\xB9', '\x9B'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0xC5B1BBCD9BC9C997ULL> name(source); + return name.Text(); + }())); } { - const char backgroundSource[] = { + this->monsterList->scrollBar->SetBackground(std::string([]() { + constexpr char bytes[] = { '\x21', '\x2C', '\x11', '\x17', '\xD1', '\x4F', '\x7E', '\x0C', '\x27', '\x67', '\x11', '\x21', '\xAC', '\x3B', '\xE7', '\x80', '\x85', '\xF5', '\xB4', '\x83', '\x65', '\xF4', '\xC9', '\xA4', '\xA6', '\xF6', '\xB8', '\x89', '\x74', '\xDD', '\xC8', '\xA2', '\x93', '\xEC', '\xBD', '\x81', '\x4E', '\xE3', '\xDC', '\x9E', '\x8C', '\xEA', '\xB5', '\xC3', '\x73', '\xEC', '\xCB', '\xC1'}; - thread_local EncryptedName backgroundName(backgroundSource); - const std::string background(backgroundName.Text()); - this->monsterList->scrollBar->SetBackground(background); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xC1BB8111EDD183E1ULL> name(source); + return name.Text(); + }())); } { - const char thumbBottomSource[] = { - '\x0F', '\x74', '\x11', '\xEF', '\x59', '\xE1', '\xAA', '\xDE', '\x09', '\x3F', '\x11', '\xD9', '\x24', '\x95', '\x33', '\x52', '\xAB', '\xAD', '\xB4', - '\x7B', '\xED', '\x5A', '\x1D', '\x76', '\x88', '\xAE', '\xB8', '\x71', '\xFC', '\x73', '\x1C', '\x70', '\xBD', '\xB4', '\xBD', '\x79', '\xC6', '\x5B', - '\x07', '\x66', '\xA2', '\xB9', '\x8E', '\x71', '\xF6', '\x58', '\x01', '\x3D', '\xAD', '\xB6', '\xA1', '\x15'}; - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const char thumbMiddleSource[] = { - '\xEB', '\x78', '\x89', '\xD5', '\xCF', '\x1F', '\xE6', '\xC6', '\xED', '\x33', '\x89', '\xE3', '\xB2', '\x6B', '\x7F', '\x4A', '\x4F', '\xA1', '\x2C', - '\x41', '\x7B', '\xA4', '\x51', '\x6E', '\x6C', '\xA2', '\x20', '\x4B', '\x6A', '\x8D', '\x50', '\x68', '\x59', '\xB8', '\x25', '\x43', '\x50', '\xA5', - '\x4B', '\x7E', '\x46', '\xB5', '\x16', '\x42', '\x66', '\xB5', '\x0D', '\x69', '\x46', '\xA7', '\x49'}; - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const char thumbTopSource[] = { + this->monsterList->scrollBar->SetThumbImages(std::string([]() { + constexpr char bytes[] = { '\x4B', '\x32', '\xB7', '\x77', '\x21', '\x13', '\xA2', '\xDA', '\x4D', '\x79', '\xB7', '\x41', '\x5C', '\x67', '\x3B', '\x56', '\xEF', '\xEB', '\x12', '\xE3', '\x95', '\xA8', '\x15', '\x72', '\xCC', '\xE8', '\x1E', '\xE9', '\x84', '\x81', '\x14', '\x74', '\xF9', '\xF2', '\x1B', '\xE1', '\xBE', '\xA9', '\x0F', '\x62', '\xE6', '\xFF', '\x28', '\xF8', '\x91', '\xF3', '\x05', '\x7A', '\xFB', '\x9D'}; - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - this->monsterList->scrollBar->SetThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x1767DDE18D779D8BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xEB', '\x78', '\x89', '\xD5', '\xCF', '\x1F', '\xE6', '\xC6', '\xED', '\x33', '\x89', '\xE3', '\xB2', '\x6B', '\x7F', '\x4A', '\x4F', '\xA1', '\x2C', + '\x41', '\x7B', '\xA4', '\x51', '\x6E', '\x6C', '\xA2', '\x20', '\x4B', '\x6A', '\x8D', '\x50', '\x68', '\x59', '\xB8', '\x25', '\x43', '\x50', '\xA5', + '\x4B', '\x7E', '\x46', '\xB5', '\x16', '\x42', '\x66', '\xB5', '\x0D', '\x69', '\x46', '\xA7', '\x49'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x0B23D10F2F49D72BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x0F', '\x74', '\x11', '\xEF', '\x59', '\xE1', '\xAA', '\xDE', '\x09', '\x3F', '\x11', '\xD9', '\x24', '\x95', '\x33', '\x52', '\xAB', '\xAD', '\xB4', + '\x7B', '\xED', '\x5A', '\x1D', '\x76', '\x88', '\xAE', '\xB8', '\x71', '\xFC', '\x73', '\x1C', '\x70', '\xBD', '\xB4', '\xBD', '\x79', '\xC6', '\x5B', + '\x07', '\x66', '\xA2', '\xB9', '\x8E', '\x71', '\xF6', '\x58', '\x01', '\x3D', '\xAD', '\xB6', '\xA1', '\x15'}; + constexpr EncryptedSource<52> source(bytes); + thread_local EncryptedName<52, 0x136F2F9915D1DBCFULL> name(source); + return name.Text(); + }())); } this->monsterList->AddNewItem(); this->AddChild(this->monsterList); @@ -2674,31 +2914,39 @@ void CUIMonster::Slot15(int width, int height) { this->unknown_0084->disabled = 0; this->unknown_0084->Invalidate(); { - const char naviDisableSource[] = { - '\xC1', '\xDA', '\x3D', '\x23', '\xEF', '\x73', '\x6A', '\x7A', '\xC7', '\x91', '\x3D', '\x15', '\x92', '\x07', '\xF3', '\xF6', '\x65', '\x03', '\x98', - '\xB7', '\x5B', '\xC8', '\xDD', '\xD2', '\x46', '\x00', '\x94', '\xBD', '\x4A', '\xE1', '\xCD', '\xC3', '\x6F', '\x2A', '\x93', '\xB8', '\x59', '\xD4', - '\xF0', '\xD3', '\x68', '\x06', '\x9F', '\xB8', '\x43', '\xD8', '\x81', '\xD5', '\x6C', '\x05', '\xFD'}; - thread_local EncryptedName naviDisableName(naviDisableSource); - const std::string naviDisable(naviDisableName.Text()); - const char naviOverSource[] = { - '\x1D', '\xFA', '\xAF', '\x55', '\x29', '\xDB', '\x2C', '\xB4', '\x1B', '\xB1', '\xAF', '\x63', '\x54', '\xAF', '\xB5', '\x38', '\xB9', '\x23', '\x0A', - '\xC1', '\x9D', '\x60', '\x9B', '\x1C', '\x9A', '\x20', '\x06', '\xCB', '\x8C', '\x49', '\x8B', '\x0D', '\xB3', '\x0A', '\x01', '\xCE', '\x9F', '\x7C', - '\xB6', '\x16', '\xAB', '\x30', '\x1D', '\x81', '\x8B', '\x78', '\x99', '\x79'}; - thread_local EncryptedName naviOverName(naviOverSource); - const std::string naviOver(naviOverName.Text()); - const char naviPressSource[] = { - '\x81', '\x92', '\x97', '\x8F', '\xF9', '\x51', '\x88', '\xAA', '\x87', '\xD9', '\x97', '\xB9', '\x84', '\x25', '\x11', '\x26', '\x25', '\x4B', '\x32', - '\x1B', '\x4D', '\xEA', '\x3F', '\x02', '\x06', '\x48', '\x3E', '\x11', '\x5C', '\xC3', '\x2F', '\x13', '\x2F', '\x62', '\x39', '\x14', '\x4F', '\xF6', - '\x12', '\x17', '\x33', '\x58', '\x24', '\x06', '\x17', '\xFD', '\x20', '\x17', '\x41'}; - thread_local EncryptedName naviPressName(naviPressSource); - const std::string naviPress(naviPressName.Text()); - const char naviNormalSource[] = { + this->unknown_0084->SetImages(std::string([]() { + constexpr char bytes[] = { '\x91', '\x02', '\x3D', '\xD1', '\x8F', '\xFD', '\x1A', '\xA6', '\x97', '\x49', '\x3D', '\xE7', '\xF2', '\x89', '\x83', '\x2A', '\x35', '\xDB', '\x98', '\x45', '\x3B', '\x46', '\xAD', '\x0E', '\x16', '\xD8', '\x94', '\x4F', '\x2A', '\x6F', '\xBD', '\x1F', '\x3F', '\xF2', '\x93', '\x4A', '\x39', '\x5A', '\x80', '\x05', '\x3E', '\xDF', '\x90', '\x4A', '\x23', '\x1D', '\xBD', '\x06', '\x21', '\xAD'}; - thread_local EncryptedName naviNormalName(naviNormalSource); - const std::string naviNormal(naviNormalName.Text()); - this->unknown_0084->SetImages(naviNormal, naviPress, naviOver, naviDisable); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x6BDF334F2BFDAD51ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x81', '\x92', '\x97', '\x8F', '\xF9', '\x51', '\x88', '\xAA', '\x87', '\xD9', '\x97', '\xB9', '\x84', '\x25', '\x11', '\x26', '\x25', '\x4B', '\x32', + '\x1B', '\x4D', '\xEA', '\x3F', '\x02', '\x06', '\x48', '\x3E', '\x11', '\x5C', '\xC3', '\x2F', '\x13', '\x2F', '\x62', '\x39', '\x14', '\x4F', '\xF6', + '\x12', '\x17', '\x33', '\x58', '\x24', '\x06', '\x17', '\xFD', '\x20', '\x17', '\x41'}; + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x674D9F3975573D41ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\x1D', '\xFA', '\xAF', '\x55', '\x29', '\xDB', '\x2C', '\xB4', '\x1B', '\xB1', '\xAF', '\x63', '\x54', '\xAF', '\xB5', '\x38', '\xB9', '\x23', '\x0A', + '\xC1', '\x9D', '\x60', '\x9B', '\x1C', '\x9A', '\x20', '\x06', '\xCB', '\x8C', '\x49', '\x8B', '\x0D', '\xB3', '\x0A', '\x01', '\xCE', '\x9F', '\x7C', + '\xB6', '\x16', '\xAB', '\x30', '\x1D', '\x81', '\x8B', '\x78', '\x99', '\x79'}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x79E915E9AF6F55DDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr char bytes[] = { + '\xC1', '\xDA', '\x3D', '\x23', '\xEF', '\x73', '\x6A', '\x7A', '\xC7', '\x91', '\x3D', '\x15', '\x92', '\x07', '\xF3', '\xF6', '\x65', '\x03', '\x98', + '\xB7', '\x5B', '\xC8', '\xDD', '\xD2', '\x46', '\x00', '\x94', '\xBD', '\x4A', '\xE1', '\xCD', '\xC3', '\x6F', '\x2A', '\x93', '\xB8', '\x59', '\xD4', + '\xF0', '\xD3', '\x68', '\x06', '\x9F', '\xB8', '\x43', '\xD8', '\x81', '\xD5', '\x6C', '\x05', '\xFD'}; + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0xB7AFBD2FD9FD7501ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_0084); } diff --git a/Source/UI/Enchant/UIEnchantUI.cpp b/Source/UI/Enchant/UIEnchantUI.cpp index 941e9d0a5..57f00fdca 100644 --- a/Source/UI/Enchant/UIEnchantUI.cpp +++ b/Source/UI/Enchant/UIEnchantUI.cpp @@ -17,9 +17,30 @@ namespace { +template +class EncryptedSource { +public: + // INLINED + template + constexpr explicit EncryptedSource(const Byte (&source)[Length]) : data{} { + for (std::size_t index = 0; index < Length; ++index) { + this->data[index] = static_cast(source[index]); + } + } + + char data[Length]; +}; + template class EncryptedName { public: + // INLINED + explicit EncryptedName(const EncryptedSource& source) : m_encrypted(true) { + for (std::uint64_t index = 0; index < Length; ++index) { + this->m_text[index] = static_cast(source.data[index]); + } + } + explicit EncryptedName(const std::uint8_t (&source)[Length]) : m_encrypted(true) { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = source[index]; @@ -345,15 +366,17 @@ void CUIEnchantItem::Slot15(int width, int height) { this->name = new CUIStaticText(); this->name->SetSize(101, 12); this->name->Move(28, 9); - this->name->SetText("", 0); + this->name->SetText(""); this->name->SetFitText(1); this->name->SetAlign(0, 6); { - const std::uint8_t fontSource[] = {0xC8, 0xEC, 0x87, 0x64, 0xD8, 0x7F}; - // GLOBAL: gl_25222 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->name->SetFont(font); + this->name->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xC8, 0xEC, 0x87, 0x64, 0xD8, 0x7F}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25222 + thread_local EncryptedName<6, 0x39FF7FB50DEB998FULL> name(source); + return name.Text(); + }())); } this->name->SetFontHeight(12); this->name->SetBold(1); @@ -378,15 +401,17 @@ void CUITargetItem::Slot15(int width, int height) { this->unknown_00EC->SetSize(12, 12); this->unknown_00EC->Move(166, 7); { - const std::uint8_t gradeIconSource[] = { + this->unknown_00EC->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x4F, 0x12, 0x2F, 0x7D, 0xBD, 0x0B, 0x68, 0xB8, 0x49, 0x59, 0x2F, 0x4B, 0xC0, 0x7F, 0xF1, 0x12, 0xFD, 0xDC, 0x8B, 0xE2, 0x22, 0xA0, 0xC3, 0x16, 0xE7, 0xDC, 0x81, 0xF3, 0x21, 0xA2, 0xDF, 0x14, 0xEB, 0xD8, 0xB0, 0xEE, 0x1E, 0xAA, 0xC3, 0x44, 0xA1, 0xDF, 0x82, 0xF7, 0x7D }; - // GLOBAL: gl_25223 - thread_local EncryptedName gradeIconName(gradeIconSource); - const std::string gradeIcon(gradeIconName.Text()); - this->unknown_00EC->SetImage(gradeIcon); + constexpr EncryptedSource<45> source(bytes); + // GLOBAL: gl_25223 + thread_local EncryptedName<45, 0x75ADC57D87EFBD8FULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_00EC); @@ -397,11 +422,13 @@ void CUITargetItem::Slot15(int width, int height) { this->unknown_00F0->SetFitText(1); this->unknown_00F0->SetAlign(0, 0); { - const std::uint8_t fontSource[] = {0x2A, 0xCE, 0xF9, 0x44, 0xFE, 0xFB}; - // GLOBAL: gl_25224 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->unknown_00F0->SetFont(font); + this->unknown_00F0->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2A, 0xCE, 0xF9, 0x44, 0xFE, 0xFB}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25224 + thread_local EncryptedName<6, 0xC517FB932D95BB6DULL> name(source); + return name.Text(); + }())); } this->unknown_00F0->SetFontHeight(12); this->unknown_00F0->SetBold(1); @@ -433,15 +460,17 @@ void CUIIngredient::Slot15(int width, int height) { this->unknown_0080->SetSize(70, 50); this->unknown_0080->Move(0, 0); { - const std::uint8_t offImageSource[] = { + this->unknown_0080->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x5B, 0xF8, 0xC3, 0x63, 0xA7, 0xCB, 0xC0, 0xC8, 0x5D, 0xB3, 0xC3, 0x55, 0xDA, 0xBF, 0x59, 0x40, 0xF5, 0x34, 0x6B, 0xF8, 0x09, 0x71, 0x50, 0x4C, 0xC7, 0x35, 0x64, 0xC6, 0x02, 0x6B, 0x66, 0x5A, 0xF4, 0x31, 0x65, 0xB7, 0x05, 0x68, 0x75, 0x05 }; - // GLOBAL: gl_25225 - thread_local EncryptedName offImageName(offImageSource); - const std::string offImage(offImageName.Text()); - this->unknown_0080->SetImage(offImage); + constexpr EncryptedSource<40> source(bytes); + // GLOBAL: gl_25225 + thread_local EncryptedName<40, 0x050505679903579BULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_0080); @@ -449,15 +478,17 @@ void CUIIngredient::Slot15(int width, int height) { this->unknown_0084->SetSize(70, 50); this->unknown_0084->Move(0, 0); { - const std::uint8_t onImageSource[] = { + this->unknown_0084->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x21, 0xD4, 0x39, 0x2D, 0x15, 0xDD, 0xFC, 0x10, 0x27, 0x9F, 0x39, 0x1B, 0x68, 0xA9, 0x65, 0x98, 0x8F, 0x18, 0x91, 0xB6, 0xBB, 0x67, 0x6C, 0x94, 0xBD, 0x19, 0x9E, 0x88, 0xB0, 0x7D, 0x5A, 0x82, 0x8E, 0x15, 0xD7, 0xB5, 0xB8, 0x63, 0x39 }; - // GLOBAL: gl_25226 - thread_local EncryptedName onImageName(onImageSource); - const std::string onImage(onImageName.Text()); - this->unknown_0084->SetImage(onImage); + constexpr EncryptedSource<39> source(bytes); + // GLOBAL: gl_25226 + thread_local EncryptedName<39, 0xDD3913D5D7F97BE1ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->unknown_0084); @@ -476,11 +507,13 @@ void CUIIngredient::Slot15(int width, int height) { this->ownedText->SetFitText(0); this->ownedText->SetAlign(6, 6); { - const std::uint8_t fontSource[] = {0xE0, 0x80, 0x13, 0x50, 0x5C, 0x4B}; - // GLOBAL: gl_25227 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->ownedText->SetFont(font); + this->ownedText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xE0, 0x80, 0x13, 0x50, 0x5C, 0x4B}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25227 + thread_local EncryptedName<6, 0xBF2B4B31397FF5A7ULL> name(source); + return name.Text(); + }())); } this->ownedText->SetFontHeight(12); this->ownedText->SetBold(1); @@ -496,11 +529,13 @@ void CUIIngredient::Slot15(int width, int height) { this->requiredText->SetFitText(0); this->requiredText->SetAlign(6, 6); { - const std::uint8_t fontSource[] = {0xFA, 0xC8, 0x81, 0x5E, 0xD6, 0xBF}; - // GLOBAL: gl_25228 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->requiredText->SetFont(font); + this->requiredText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xFA, 0xC8, 0x81, 0x5E, 0xD6, 0xBF}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25228 + thread_local EncryptedName<6, 0x83EFBFBB37EDBDBDULL> name(source); + return name.Text(); + }())); } this->requiredText->SetFontHeight(12); this->requiredText->SetBold(1); @@ -694,41 +729,50 @@ void CUINormal::Slot15(int width, int height) { firstButton->disabled = 0; firstButton->Invalidate(); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0xA5, 0xFA, 0x09, 0x85, 0xCD, 0x21, 0xEA, 0x88, 0xA3, 0xB1, 0x09, 0xB3, 0xB0, 0x55, 0x73, 0x00, 0x0B, 0x36, 0xA1, 0x1E, 0x63, 0x9B, 0x7A, 0x0C, 0x39, 0x21, 0xA8, 0x1D, 0x52, 0x8A, 0x41, 0x26, 0x3A, 0x27, 0xA8, 0x11, 0x69, 0x80, 0x42, 0x1A, 0x01, 0x3C, 0xBA, 0x1E, 0x6F, 0x83, 0x4A, 0x6B, 0x07, 0x38, 0xB9, 0x7F }; - // GLOBAL: gl_25230 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x9D, 0xA2, 0x89, 0x73, 0x61, 0xB3, 0x28, 0x52, 0x9B, 0xE9, 0x89, 0x45, 0x1C, 0xC7, 0xB1, 0xDA, - 0x33, 0x6E, 0x21, 0xE8, 0xCF, 0x09, 0xB8, 0xD6, 0x01, 0x79, 0x28, 0xEB, 0xFE, 0x18, 0x83, 0xFC, - 0x02, 0x7F, 0x28, 0xE7, 0xC5, 0x12, 0x80, 0xC0, 0x32, 0x78, 0x3D, 0xA7, 0xC3, 0x10, 0x9D, 0x9F + constexpr EncryptedSource<52> source(bytes); + // GLOBAL: gl_25230 + thread_local EncryptedName<52, 0x452FEF0D7FC95565ULL> name(source); + return name.Text(); + }()); + firstButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xAD, 0xB4, 0x67, 0xEB, 0xB7, 0xA1, 0x0E, 0x3E, 0xAB, 0xFF, 0x67, 0xDD, 0xCA, 0xD5, 0x97, 0xB6, + 0x03, 0x78, 0xCF, 0x70, 0x19, 0x1B, 0x9E, 0xBA, 0x31, 0x6F, 0xC6, 0x73, 0x28, 0x0A, 0xA5, 0x90, + 0x32, 0x69, 0xC6, 0x7F, 0x13, 0x00, 0xA6, 0xAC, 0x02, 0x6E, 0xD3, 0x3F, 0x15, 0x02, 0xBB, 0xF3 }; - // GLOBAL: gl_25231 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25233 + thread_local EncryptedName<48, 0xF3CB6F7711A71B6DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { 0x73, 0xC8, 0x99, 0x75, 0x1F, 0xE9, 0x5E, 0x4E, 0x75, 0x83, 0x99, 0x43, 0x62, 0x9D, 0xC7, 0xC6, 0xDD, 0x04, 0x31, 0xEE, 0xB1, 0x53, 0xCE, 0xCA, 0xEF, 0x13, 0x38, 0xED, 0x80, 0x42, 0xF5, 0xE0, 0xEC, 0x15, 0x38, 0xE1, 0xBB, 0x48, 0xF6, 0xDC, 0xC3, 0x15, 0x3C, 0xFC, 0xAC, 0x42, 0xFF, 0xAD, 0xD1, 0x0A, 0x29, 0x8F }; - // GLOBAL: gl_25232 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { - 0xAD, 0xB4, 0x67, 0xEB, 0xB7, 0xA1, 0x0E, 0x3E, 0xAB, 0xFF, 0x67, 0xDD, 0xCA, 0xD5, 0x97, 0xB6, - 0x03, 0x78, 0xCF, 0x70, 0x19, 0x1B, 0x9E, 0xBA, 0x31, 0x6F, 0xC6, 0x73, 0x28, 0x0A, 0xA5, 0x90, - 0x32, 0x69, 0xC6, 0x7F, 0x13, 0x00, 0xA6, 0xAC, 0x02, 0x6E, 0xD3, 0x3F, 0x15, 0x02, 0xBB, 0xF3 + constexpr EncryptedSource<52> source(bytes); + // GLOBAL: gl_25232 + thread_local EncryptedName<52, 0x839B27DF8F5967B3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x9D, 0xA2, 0x89, 0x73, 0x61, 0xB3, 0x28, 0x52, 0x9B, 0xE9, 0x89, 0x45, 0x1C, 0xC7, 0xB1, 0xDA, + 0x33, 0x6E, 0x21, 0xE8, 0xCF, 0x09, 0xB8, 0xD6, 0x01, 0x79, 0x28, 0xEB, 0xFE, 0x18, 0x83, 0xFC, + 0x02, 0x7F, 0x28, 0xE7, 0xC5, 0x12, 0x80, 0xC0, 0x32, 0x78, 0x3D, 0xA7, 0xC3, 0x10, 0x9D, 0x9F }; - // GLOBAL: gl_25233 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - firstButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25231 + thread_local EncryptedName<48, 0x9FED7DA189490D5DULL> name(source); + return name.Text(); + }()), disabled); } this->tab->AddChild(firstButton); @@ -738,43 +782,51 @@ void CUINormal::Slot15(int width, int height) { secondButton->disabled = 0; secondButton->Invalidate(); { - const std::uint8_t disabledSource[] = { - 0x2D, 0xDA, 0xA1, 0xD9, 0x77, 0x2D, 0x94, 0xE0, 0x2B, 0x91, 0xA1, 0xEF, 0x0A, 0x59, 0x0D, 0x68, - 0x83, 0x16, 0x09, 0x42, 0xD9, 0x97, 0x04, 0x64, 0xB1, 0x01, 0x00, 0x41, 0xE8, 0x86, 0x3F, 0x4E, - 0xB2, 0x16, 0x0E, 0x4D, 0xD1, 0x8A, 0x23, 0x40, 0xB2, 0x11, 0x08, 0x50, 0xD6, 0x81, 0x3D, 0x48, - 0xC3, 0x17, 0x0C, 0x53, 0xB7 - }; - // GLOBAL: gl_25234 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0xD7, 0xB4, 0xED, 0x59, 0x7D, 0x25, 0x84, 0xC2, 0xD1, 0xFF, 0xED, 0x6F, 0x00, 0x51, 0x1D, 0x4A, - 0x79, 0x78, 0x45, 0xC2, 0xD3, 0x9F, 0x14, 0x46, 0x4B, 0x6F, 0x4C, 0xC1, 0xE2, 0x8E, 0x2F, 0x6C, - 0x48, 0x78, 0x42, 0xCD, 0xDB, 0x82, 0x33, 0x62, 0x48, 0x74, 0x58, 0xD7, 0x93, 0x89, 0x2C, 0x7F, - 0x17 - }; - // GLOBAL: gl_25235 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0x01, 0xE8, 0x05, 0xED, 0x21, 0x57, 0x10, 0x36, 0x07, 0xA3, 0x05, 0xDB, 0x5C, 0x23, 0x89, 0xBE, - 0xAF, 0x24, 0xAD, 0x76, 0x8F, 0xED, 0x80, 0xB2, 0x9D, 0x33, 0xA4, 0x75, 0xBE, 0xFC, 0xBB, 0x98, - 0x9E, 0x24, 0xAA, 0x79, 0x87, 0xF0, 0xA7, 0x96, 0x9E, 0x37, 0xB7, 0x72, 0x92, 0xEA, 0xB0, 0x9F, - 0xEF, 0x25, 0xA8, 0x67, 0xE1 - }; - // GLOBAL: gl_25236 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + secondButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xA5, 0x5C, 0x17, 0xA7, 0x4D, 0xDD, 0xAA, 0xDA, 0xA3, 0x17, 0x17, 0x91, 0x30, 0xA9, 0x33, 0x52, 0x0B, 0x90, 0xBF, 0x3C, 0xE3, 0x67, 0x3A, 0x5E, 0x39, 0x87, 0xB6, 0x3F, 0xD2, 0x76, 0x01, 0x74, 0x3A, 0x90, 0xB8, 0x33, 0xEB, 0x7A, 0x1D, 0x7A, 0x3A, 0x9C, 0xA2, 0x29, 0xA3, 0x71, 0x02, 0x67, 0x65 }; - // GLOBAL: gl_25237 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - secondButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25237 + thread_local EncryptedName<49, 0x176F138D5DD7F365ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x01, 0xE8, 0x05, 0xED, 0x21, 0x57, 0x10, 0x36, 0x07, 0xA3, 0x05, 0xDB, 0x5C, 0x23, 0x89, 0xBE, + 0xAF, 0x24, 0xAD, 0x76, 0x8F, 0xED, 0x80, 0xB2, 0x9D, 0x33, 0xA4, 0x75, 0xBE, 0xFC, 0xBB, 0x98, + 0x9E, 0x24, 0xAA, 0x79, 0x87, 0xF0, 0xA7, 0x96, 0x9E, 0x37, 0xB7, 0x72, 0x92, 0xEA, 0xB0, 0x9F, + 0xEF, 0x25, 0xA8, 0x67, 0xE1 + }; + constexpr EncryptedSource<53> source(bytes); + // GLOBAL: gl_25236 + thread_local EncryptedName<53, 0xFBD599E117C547C1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xD7, 0xB4, 0xED, 0x59, 0x7D, 0x25, 0x84, 0xC2, 0xD1, 0xFF, 0xED, 0x6F, 0x00, 0x51, 0x1D, 0x4A, + 0x79, 0x78, 0x45, 0xC2, 0xD3, 0x9F, 0x14, 0x46, 0x4B, 0x6F, 0x4C, 0xC1, 0xE2, 0x8E, 0x2F, 0x6C, + 0x48, 0x78, 0x42, 0xCD, 0xDB, 0x82, 0x33, 0x62, 0x48, 0x74, 0x58, 0xD7, 0x93, 0x89, 0x2C, 0x7F, + 0x17 + }; + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25235 + thread_local EncryptedName<49, 0x0F41EBBDA32D1B17ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x2D, 0xDA, 0xA1, 0xD9, 0x77, 0x2D, 0x94, 0xE0, 0x2B, 0x91, 0xA1, 0xEF, 0x0A, 0x59, 0x0D, 0x68, + 0x83, 0x16, 0x09, 0x42, 0xD9, 0x97, 0x04, 0x64, 0xB1, 0x01, 0x00, 0x41, 0xE8, 0x86, 0x3F, 0x4E, + 0xB2, 0x16, 0x0E, 0x4D, 0xD1, 0x8A, 0x23, 0x40, 0xB2, 0x11, 0x08, 0x50, 0xD6, 0x81, 0x3D, 0x48, + 0xC3, 0x17, 0x0C, 0x53, 0xB7 + }; + constexpr EncryptedSource<53> source(bytes); + // GLOBAL: gl_25234 + thread_local EncryptedName<53, 0x2D51E3B7236175EDULL> name(source); + return name.Text(); + }())); } this->tab->AddChild(secondButton); @@ -793,39 +845,47 @@ void CUISlot::Slot15(int width, int height) { this->radioButton->disabled = 0; this->radioButton->Invalidate(); { - const std::uint8_t disabledSource[] = { - 0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x52, - 0x59, 0x24, 0xC5, 0x58, 0xD1, 0x91, 0xFC, 0x5E, 0x6B, 0x25, 0xD9, 0x57, 0xE0, 0x96, 0xC6, 0x74, - 0x5C, 0x22, 0xD9, 0x66, 0xD0, 0x90, 0xDD, 0x39, 0x55, 0x2A, 0xDD, 0x39 - }; - // GLOBAL: gl_25189 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x65, 0x32, 0xAD, 0x03, 0xA3, 0xE9, 0xB2, 0xCE, 0x63, 0x79, 0xAD, 0x35, 0xDE, 0x9D, 0x2B, 0x46, - 0xCB, 0xFE, 0x05, 0x98, 0x0D, 0x53, 0x22, 0x4A, 0xF9, 0xFF, 0x19, 0x97, 0x3C, 0x54, 0x18, 0x60, - 0xCE, 0xF8, 0x19, 0xA6, 0x0C, 0x51, 0x12, 0x71, 0x8B, 0xFF, 0x00, 0x89, 0x63 - }; - // GLOBAL: gl_25190 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0x47, 0xBC, 0xAB, 0x85, 0xF9, 0xC7, 0xB4, 0xC6, 0x41, 0xF7, 0xAB, 0xB3, 0x84, 0xB3, 0x2D, 0x4E, - 0xE9, 0x70, 0x03, 0x1E, 0x57, 0x7D, 0x24, 0x42, 0xDB, 0x71, 0x1F, 0x11, 0x66, 0x7A, 0x1E, 0x68, - 0xEC, 0x76, 0x1F, 0x20, 0x4A, 0x6C, 0x1D, 0x6E, 0xE4, 0x67, 0x45, 0x1D, 0x54, 0x79, 0x71 - }; - // GLOBAL: gl_25191 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + this->radioButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x09, 0x5A, 0x9F, 0x71, 0x4F, 0x1B, 0x7E, 0xEE, 0x0F, 0x11, 0x9F, 0x47, 0x32, 0x6F, 0xE7, 0x66, 0xA7, 0x96, 0x37, 0xEA, 0xE1, 0xA1, 0xEE, 0x6A, 0x95, 0x97, 0x2B, 0xE5, 0xD0, 0xA6, 0xD4, 0x40, 0xA2, 0x90, 0x2B, 0xD4, 0xE0, 0xA0, 0xCF, 0x0D, 0xAB, 0x98, 0x2F, 0x8B }; - // GLOBAL: gl_25192 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - this->radioButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<44> source(bytes); + // GLOBAL: gl_25192 + thread_local EncryptedName<44, 0x23BBD58F8B5FF5C9ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x47, 0xBC, 0xAB, 0x85, 0xF9, 0xC7, 0xB4, 0xC6, 0x41, 0xF7, 0xAB, 0xB3, 0x84, 0xB3, 0x2D, 0x4E, + 0xE9, 0x70, 0x03, 0x1E, 0x57, 0x7D, 0x24, 0x42, 0xDB, 0x71, 0x1F, 0x11, 0x66, 0x7A, 0x1E, 0x68, + 0xEC, 0x76, 0x1F, 0x20, 0x4A, 0x6C, 0x1D, 0x6E, 0xE4, 0x67, 0x45, 0x1D, 0x54, 0x79, 0x71 + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25191 + thread_local EncryptedName<47, 0x0B7109397F6B1387ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x65, 0x32, 0xAD, 0x03, 0xA3, 0xE9, 0xB2, 0xCE, 0x63, 0x79, 0xAD, 0x35, 0xDE, 0x9D, 0x2B, 0x46, + 0xCB, 0xFE, 0x05, 0x98, 0x0D, 0x53, 0x22, 0x4A, 0xF9, 0xFF, 0x19, 0x97, 0x3C, 0x54, 0x18, 0x60, + 0xCE, 0xF8, 0x19, 0xA6, 0x0C, 0x51, 0x12, 0x71, 0x8B, 0xFF, 0x00, 0x89, 0x63 + }; + constexpr EncryptedSource<45> source(bytes); + // GLOBAL: gl_25190 + thread_local EncryptedName<45, 0x03772763F96D9DA5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x52, + 0x59, 0x24, 0xC5, 0x58, 0xD1, 0x91, 0xFC, 0x5E, 0x6B, 0x25, 0xD9, 0x57, 0xE0, 0x96, 0xC6, 0x74, + 0x5C, 0x22, 0xD9, 0x66, 0xD0, 0x90, 0xDD, 0x39, 0x55, 0x2A, 0xDD, 0x39 + }; + constexpr EncryptedSource<44> source(bytes); + // GLOBAL: gl_25189 + thread_local EncryptedName<44, 0x17A9E5BF39AD4737ULL> name(source); + return name.Text(); + }())); } this->radioButton->checked = false; this->radioButton->Invalidate(); @@ -844,11 +904,13 @@ void CUISlot::Slot15(int width, int height) { this->description->Move(0, 44); this->description->SetTextOffset(2, 0); { - const std::uint8_t fontSource[] = {0x20, 0xDE, 0xFD, 0xCC, 0xCC, 0x3F}; - // GLOBAL: gl_25193 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->description->SetFont(font); + this->description->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x20, 0xDE, 0xFD, 0xCC, 0xCC, 0x3F}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25193 + thread_local EncryptedName<6, 0x13E33FA1A591AB67ULL> name(source); + return name.Text(); + }())); } this->description->SetFontHeight(12); this->description->SetBold(true); @@ -860,58 +922,70 @@ void CUISlot::Slot15(int width, int height) { this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); { - const std::uint8_t downSource[] = { - 0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEA, - 0x20, 0x5B, 0x3C, 0x4B, 0xB9, 0x8F, 0x2D, 0xF6, 0x34, 0x47, 0x7D, 0x45, 0xB8, 0xCF, 0x49 - }; - // GLOBAL: gl_25194 - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const std::uint8_t upSource[] = { + this->description->SetScrollBarButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xAF, 0xD2, 0x3B, 0xD9, 0xB1, 0xC9, 0x4A, 0x00, 0xA9, 0x99, 0x3B, 0xEF, 0xCC, 0xBD, 0xD3, 0xBE, 0x0C, 0x0F, 0x94, 0x4F, 0x1D, 0x37, 0xFA, 0xBD, 0x41, 0x1F, 0x96, 0x53, 0x71 }; - // GLOBAL: gl_25195 - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->description->SetScrollBarButtonImages(up, down); + constexpr EncryptedSource<29> source(bytes); + // GLOBAL: gl_25195 + thread_local EncryptedName<29, 0xCD8F077123FB7D6FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEA, + 0x20, 0x5B, 0x3C, 0x4B, 0xB9, 0x8F, 0x2D, 0xF6, 0x34, 0x47, 0x7D, 0x45, 0xB8, 0xCF, 0x49 + }; + constexpr EncryptedSource<31> source(bytes); + // GLOBAL: gl_25194 + thread_local EncryptedName<31, 0x9949BFD527532943ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t backgroundSource[] = { + this->description->SetScrollBarBackground(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xBF, 0xBC, 0x1F, 0x2B, 0x45, 0xA9, 0xBC, 0x20, 0xB9, 0xF7, 0x1F, 0x1D, 0x38, 0xDD, 0x25, 0x9E, 0x1C, 0x61, 0xB0, 0xBD, 0xE9, 0x57, 0x14, 0x84, 0x1B, 0x3D, 0xBD, 0xBC, 0xF5, 0x67 }; - // GLOBAL: gl_25196 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string background(backgroundName.Text()); - this->description->SetScrollBarBackground(background); + constexpr EncryptedSource<30> source(bytes); + // GLOBAL: gl_25196 + thread_local EncryptedName<30, 0xED796785D1DF137FULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t thumbBottomSource[] = { - 0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x82, - 0x92, 0xB5, 0x56, 0x65, 0x7B, 0x49, 0x2D, 0x90, 0x83, 0x98, 0x5D, 0x66, 0x60, 0x17, 0x61, 0x93, - 0x9C, 0xB7, 0x39 - }; - // GLOBAL: gl_25197 - thread_local EncryptedName thumbBottomName(thumbBottomSource); - const std::string thumbBottom(thumbBottomName.Text()); - const std::uint8_t thumbMiddleSource[] = { - 0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD6, - 0xFC, 0xB7, 0x02, 0xC7, 0xBB, 0x19, 0x9F, 0xC4, 0xED, 0x9A, 0x00, 0xC2, 0xB3, 0x07, 0x9F, 0xC8, - 0xEF, 0xC5 - }; - // GLOBAL: gl_25198 - thread_local EncryptedName thumbMiddleName(thumbMiddleSource); - const std::string thumbMiddle(thumbMiddleName.Text()); - const std::uint8_t thumbTopSource[] = { + this->description->SetScrollBarThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xC9, 0x88, 0xEF, 0x41, 0x7D, 0x93, 0xB8, 0x14, 0xCF, 0xC3, 0xEF, 0x77, 0x00, 0xE7, 0x21, 0xAA, 0x6A, 0x55, 0x40, 0xD7, 0xD1, 0x6D, 0x1F, 0xB8, 0x7B, 0x78, 0x5A, 0xCB, 0x93, 0x3F, 0x10, 0xA9, 0x09 }; - // GLOBAL: gl_25199 - thread_local EncryptedName thumbTopName(thumbTopSource); - const std::string thumbTop(thumbTopName.Text()); - this->description->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + constexpr EncryptedSource<33> source(bytes); + // GLOBAL: gl_25199 + thread_local EncryptedName<33, 0xD97D5DBDBB2F2709ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD6, + 0xFC, 0xB7, 0x02, 0xC7, 0xBB, 0x19, 0x9F, 0xC4, 0xED, 0x9A, 0x00, 0xC2, 0xB3, 0x07, 0x9F, 0xC8, + 0xEF, 0xC5 + }; + constexpr EncryptedSource<34> source(bytes); + // GLOBAL: gl_25198 + thread_local EncryptedName<34, 0xA5FD29D7AB6DC59FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x82, + 0x92, 0xB5, 0x56, 0x65, 0x7B, 0x49, 0x2D, 0x90, 0x83, 0x98, 0x5D, 0x66, 0x60, 0x17, 0x61, 0x93, + 0x9C, 0xB7, 0x39 + }; + constexpr EncryptedSource<35> source(bytes); + // GLOBAL: gl_25197 + thread_local EncryptedName<35, 0xF14F79170939C7F1ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->description); } @@ -940,41 +1014,50 @@ void CUIUpgrade::Slot15(int width, int height) { firstButton->disabled = 0; firstButton->Invalidate(); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0xE5, 0xDE, 0x6F, 0x31, 0xCD, 0x3D, 0xE8, 0x28, 0xE3, 0x95, 0x6F, 0x07, 0xB0, 0x49, 0x71, 0xA0, 0x4B, 0x12, 0xC7, 0xAA, 0x63, 0x87, 0x78, 0xAC, 0x79, 0x05, 0xCE, 0xA9, 0x52, 0x96, 0x43, 0x86, 0x7A, 0x03, 0xCE, 0xA5, 0x69, 0x9C, 0x40, 0xBA, 0x41, 0x18, 0xDC, 0xAA, 0x6F, 0x9F, 0x48, 0xCB, 0x47, 0x1C, 0xDF, 0xCB }; - // GLOBAL: gl_25240 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x9F, 0x9A, 0x6F, 0x6F, 0x5D, 0x47, 0x36, 0x02, 0x99, 0xD1, 0x6F, 0x59, 0x20, 0x33, 0xAF, 0x8A, - 0x31, 0x56, 0xC7, 0xF4, 0xF3, 0xFD, 0xA6, 0x86, 0x03, 0x41, 0xCE, 0xF7, 0xC2, 0xEC, 0x9D, 0xAC, - 0x00, 0x47, 0xCE, 0xFB, 0xF9, 0xE6, 0x9E, 0x90, 0x30, 0x40, 0xDB, 0xBB, 0xFF, 0xE4, 0x83, 0xCF + constexpr EncryptedSource<52> source(bytes); + // GLOBAL: gl_25240 + thread_local EncryptedName<52, 0xE52DF30DCBAF7125ULL> name(source); + return name.Text(); + }()); + firstButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x77, 0x9E, 0x2F, 0x39, 0xC3, 0x11, 0x5C, 0x82, 0x71, 0xD5, 0x2F, 0x0F, 0xBE, 0x65, 0xC5, 0x0A, + 0xD9, 0x52, 0x87, 0xA2, 0x6D, 0xAB, 0xCC, 0x06, 0xEB, 0x45, 0x8E, 0xA1, 0x5C, 0xBA, 0xF7, 0x2C, + 0xE8, 0x43, 0x8E, 0xAD, 0x67, 0xB0, 0xF4, 0x10, 0xD8, 0x44, 0x9B, 0xED, 0x61, 0xB2, 0xE9, 0x4F }; - // GLOBAL: gl_25241 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25243 + thread_local EncryptedName<48, 0x4F99DF03C3EF31B7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { 0x37, 0x66, 0xA3, 0x93, 0xBD, 0x57, 0xB4, 0x5C, 0x31, 0x2D, 0xA3, 0xA5, 0xC0, 0x23, 0x2D, 0xD4, 0x99, 0xAA, 0x0B, 0x08, 0x13, 0xED, 0x24, 0xD8, 0xAB, 0xBD, 0x02, 0x0B, 0x22, 0xFC, 0x1F, 0xF2, 0xA8, 0xBB, 0x02, 0x07, 0x19, 0xF6, 0x1C, 0xCE, 0x87, 0xBB, 0x06, 0x1A, 0x0E, 0xFC, 0x15, 0xBF, 0x95, 0xA4, 0x13, 0x69 }; - // GLOBAL: gl_25242 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { - 0x77, 0x9E, 0x2F, 0x39, 0xC3, 0x11, 0x5C, 0x82, 0x71, 0xD5, 0x2F, 0x0F, 0xBE, 0x65, 0xC5, 0x0A, - 0xD9, 0x52, 0x87, 0xA2, 0x6D, 0xAB, 0xCC, 0x06, 0xEB, 0x45, 0x8E, 0xA1, 0x5C, 0xBA, 0xF7, 0x2C, - 0xE8, 0x43, 0x8E, 0xAD, 0x67, 0xB0, 0xF4, 0x10, 0xD8, 0x44, 0x9B, 0xED, 0x61, 0xB2, 0xE9, 0x4F + constexpr EncryptedSource<52> source(bytes); + // GLOBAL: gl_25242 + thread_local EncryptedName<52, 0x9171997D6963C9F7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x9F, 0x9A, 0x6F, 0x6F, 0x5D, 0x47, 0x36, 0x02, 0x99, 0xD1, 0x6F, 0x59, 0x20, 0x33, 0xAF, 0x8A, + 0x31, 0x56, 0xC7, 0xF4, 0xF3, 0xFD, 0xA6, 0x86, 0x03, 0x41, 0xCE, 0xF7, 0xC2, 0xEC, 0x9D, 0xAC, + 0x00, 0x47, 0xCE, 0xFB, 0xF9, 0xE6, 0x9E, 0x90, 0x30, 0x40, 0xDB, 0xBB, 0xFF, 0xE4, 0x83, 0xCF }; - // GLOBAL: gl_25243 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - firstButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25241 + thread_local EncryptedName<48, 0xCFF3899D95AF355FULL> name(source); + return name.Text(); + }()), disabled); } this->tab->AddChild(firstButton); @@ -984,43 +1067,51 @@ void CUIUpgrade::Slot15(int width, int height) { secondButton->disabled = 0; secondButton->Invalidate(); { - const std::uint8_t disabledSource[] = { - 0x37, 0xBC, 0xEB, 0x55, 0x31, 0xC1, 0xD8, 0x40, 0x31, 0xF7, 0xEB, 0x63, 0x4C, 0xB5, 0x41, 0xC8, - 0x99, 0x70, 0x43, 0xCE, 0x9F, 0x7B, 0x48, 0xC4, 0xAB, 0x67, 0x4A, 0xCD, 0xAE, 0x6A, 0x73, 0xEE, - 0xA8, 0x70, 0x44, 0xC1, 0x97, 0x66, 0x6F, 0xE0, 0xA8, 0x77, 0x42, 0xDC, 0x90, 0x6D, 0x71, 0xE8, - 0xD9, 0x71, 0x46, 0xDF, 0xF1 - }; - // GLOBAL: gl_25244 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x4D, 0x14, 0x0F, 0x81, 0x51, 0x69, 0x5A, 0x7E, 0x4B, 0x5F, 0x0F, 0xB7, 0x2C, 0x1D, 0xC3, 0xF6, - 0xE3, 0xD8, 0xA7, 0x1A, 0xFF, 0xD3, 0xCA, 0xFA, 0xD1, 0xCF, 0xAE, 0x19, 0xCE, 0xC2, 0xF1, 0xD0, - 0xD2, 0xD8, 0xA0, 0x15, 0xF7, 0xCE, 0xED, 0xDE, 0xD2, 0xD4, 0xBA, 0x0F, 0xBF, 0xC5, 0xF2, 0xC3, - 0x8D - }; - // GLOBAL: gl_25245 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0x6B, 0x6E, 0x8D, 0xC3, 0xA7, 0xBB, 0x0E, 0xE0, 0x6D, 0x25, 0x8D, 0xF5, 0xDA, 0xCF, 0x97, 0x68, - 0xC5, 0xA2, 0x25, 0x58, 0x09, 0x01, 0x9E, 0x64, 0xF7, 0xB5, 0x2C, 0x5B, 0x38, 0x10, 0xA5, 0x4E, - 0xF4, 0xA2, 0x22, 0x57, 0x01, 0x1C, 0xB9, 0x40, 0xF4, 0xB1, 0x3F, 0x5C, 0x14, 0x06, 0xAE, 0x49, - 0x85, 0xA3, 0x20, 0x49, 0x67 - }; - // GLOBAL: gl_25246 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + secondButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x99, 0x18, 0xC7, 0xE9, 0x05, 0xB3, 0xA6, 0x82, 0x9F, 0x53, 0xC7, 0xDF, 0x78, 0xC7, 0x3F, 0x0A, 0x37, 0xD4, 0x6F, 0x72, 0xAB, 0x09, 0x36, 0x06, 0x05, 0xC3, 0x66, 0x71, 0x9A, 0x18, 0x0D, 0x2C, 0x06, 0xD4, 0x68, 0x7D, 0xA3, 0x14, 0x11, 0x22, 0x06, 0xD8, 0x72, 0x67, 0xEB, 0x1F, 0x0E, 0x3F, 0x59 }; - // GLOBAL: gl_25247 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - secondButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25247 + thread_local EncryptedName<49, 0x4F637DC51307B759ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x6B, 0x6E, 0x8D, 0xC3, 0xA7, 0xBB, 0x0E, 0xE0, 0x6D, 0x25, 0x8D, 0xF5, 0xDA, 0xCF, 0x97, 0x68, + 0xC5, 0xA2, 0x25, 0x58, 0x09, 0x01, 0x9E, 0x64, 0xF7, 0xB5, 0x2C, 0x5B, 0x38, 0x10, 0xA5, 0x4E, + 0xF4, 0xA2, 0x22, 0x57, 0x01, 0x1C, 0xB9, 0x40, 0xF4, 0xB1, 0x3F, 0x5C, 0x14, 0x06, 0xAE, 0x49, + 0x85, 0xA3, 0x20, 0x49, 0x67 + }; + constexpr EncryptedSource<53> source(bytes); + // GLOBAL: gl_25246 + thread_local EncryptedName<53, 0x2DCB7567394DC1ABULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x4D, 0x14, 0x0F, 0x81, 0x51, 0x69, 0x5A, 0x7E, 0x4B, 0x5F, 0x0F, 0xB7, 0x2C, 0x1D, 0xC3, 0xF6, + 0xE3, 0xD8, 0xA7, 0x1A, 0xFF, 0xD3, 0xCA, 0xFA, 0xD1, 0xCF, 0xAE, 0x19, 0xCE, 0xC2, 0xF1, 0xD0, + 0xD2, 0xD8, 0xA0, 0x15, 0xF7, 0xCE, 0xED, 0xDE, 0xD2, 0xD4, 0xBA, 0x0F, 0xBF, 0xC5, 0xF2, 0xC3, + 0x8D + }; + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25245 + thread_local EncryptedName<49, 0xB39FA7917BCFBB8DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x37, 0xBC, 0xEB, 0x55, 0x31, 0xC1, 0xD8, 0x40, 0x31, 0xF7, 0xEB, 0x63, 0x4C, 0xB5, 0x41, 0xC8, + 0x99, 0x70, 0x43, 0xCE, 0x9F, 0x7B, 0x48, 0xC4, 0xAB, 0x67, 0x4A, 0xCD, 0xAE, 0x6A, 0x73, 0xEE, + 0xA8, 0x70, 0x44, 0xC1, 0x97, 0x66, 0x6F, 0xE0, 0xA8, 0x77, 0x42, 0xDC, 0x90, 0x6D, 0x71, 0xE8, + 0xD9, 0x71, 0x46, 0xDF, 0xF1 + }; + constexpr EncryptedSource<53> source(bytes); + // GLOBAL: gl_25244 + thread_local EncryptedName<53, 0x8D1D0FF1AF2B13F7ULL> name(source); + return name.Text(); + }())); } this->tab->AddChild(secondButton); @@ -1817,15 +1908,17 @@ void CUIEnchantPage::Slot15(int width, int height) { this->background->SetSize(470, 377); this->background->Move(0, 0); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x57, 0x5E, 0x21, 0x27, 0x11, 0x5D, 0x2C, 0xE2, 0x51, 0x15, 0x21, 0x11, 0x6C, 0x29, 0xB5, 0x6A, 0xF9, 0x92, 0x89, 0xBC, 0xBF, 0xE7, 0xBC, 0x66, 0xCB, 0x93, 0x86, 0x82, 0xA2, 0xE6, 0x8B, 0x5F, 0xF6, 0x96, 0x84, 0xF3, 0xB3, 0xFE, 0x99, 0x2F }; - // GLOBAL: gl_25259 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<40> source(bytes); + // GLOBAL: gl_25259 + thread_local EncryptedName<40, 0x2FE993D1DDE1F197ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->background); @@ -1869,39 +1962,48 @@ void CUIEnchantPage::Slot15(int width, int height) { this->enchantList->onSelect = [this](CUIEnchantItem* item, const CEnchantItemData& data) { this->Slot54(item, data); }; this->enchantList->binder = [this](CUIEnchantItem* item, const CEnchantItemData& data) { UpdateEnchantItem(item, &data); }; { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0x3D, 0x16, 0x7B, 0xDB, 0x5F, 0x33, 0x84, 0x84, 0x3B, 0x5D, 0x7B, 0xED, 0x22, 0x47, 0x1D, 0x0C, 0x93, 0xDA, 0xD3, 0x40, 0xF1, 0x89, 0x14, 0x00, 0xA1, 0xDB, 0xCF, 0x4F, 0xC0, 0x98, 0x2F, 0x2A, 0xA2, 0xD0, 0xCF, 0x44, 0xF2, 0xD3, 0x23, 0x24, 0x8D, 0xB9 }; - // GLOBAL: gl_25260 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0xB5, 0x62, 0x2D, 0xA7, 0xAB, 0xAB, 0x20, 0xF8, 0xB3, 0x29, 0x2D, 0x91, 0xD6, 0xDF, 0xB9, 0x70, - 0x1B, 0xAE, 0x85, 0x3C, 0x05, 0x11, 0xB0, 0x7C, 0x29, 0xAF, 0x99, 0x33, 0x34, 0x00, 0x8B, 0x56, - 0x2A, 0xA4, 0x99, 0x38, 0x06, 0x3A, 0x8A, 0x43, 0x10, 0xBF, 0xC3, 0x3F, 0x06, 0x15, 0xE5 - }; - // GLOBAL: gl_25261 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0xBF, 0xBA, 0x4D, 0xEB, 0xF7, 0xC1, 0x4E, 0xE2, 0xB9, 0xF1, 0x4D, 0xDD, 0x8A, 0xB5, 0xD7, 0x6A, - 0x11, 0x76, 0xE5, 0x70, 0x59, 0x7B, 0xDE, 0x66, 0x23, 0x77, 0xF9, 0x7F, 0x68, 0x6A, 0xE5, 0x4C, - 0x20, 0x7C, 0xF9, 0x74, 0x5A, 0x50, 0xFB, 0x5D, 0x1A, 0x66, 0xFE, 0x3F, 0x55, 0x62, 0xFB, 0x2F - }; - // GLOBAL: gl_25262 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + constexpr EncryptedSource<42> source(bytes); + // GLOBAL: gl_25260 + thread_local EncryptedName<42, 0x4941FD9F21BBB9FDULL> name(source); + return name.Text(); + }()); + this->enchantList->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x0D, 0x5E, 0x59, 0x4F, 0x4D, 0x95, 0xC2, 0x60, 0x0B, 0x15, 0x59, 0x79, 0x30, 0xE1, 0x5B, 0xE8, 0xA3, 0x92, 0xF1, 0xD4, 0xE3, 0x2F, 0x52, 0xE4, 0x91, 0x93, 0xED, 0xDB, 0xD2, 0x3E, 0x69, 0xCE, 0x92, 0x98, 0xED, 0xD0, 0xE0, 0x75, 0x65, 0xC0, 0xBD, 0xF1 }; - // GLOBAL: gl_25263 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - this->enchantList->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<42> source(bytes); + // GLOBAL: gl_25263 + thread_local EncryptedName<42, 0xAD075B8DB599F1CDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xBF, 0xBA, 0x4D, 0xEB, 0xF7, 0xC1, 0x4E, 0xE2, 0xB9, 0xF1, 0x4D, 0xDD, 0x8A, 0xB5, 0xD7, 0x6A, + 0x11, 0x76, 0xE5, 0x70, 0x59, 0x7B, 0xDE, 0x66, 0x23, 0x77, 0xF9, 0x7F, 0x68, 0x6A, 0xE5, 0x4C, + 0x20, 0x7C, 0xF9, 0x74, 0x5A, 0x50, 0xFB, 0x5D, 0x1A, 0x66, 0xFE, 0x3F, 0x55, 0x62, 0xFB, 0x2F + }; + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25262 + thread_local EncryptedName<48, 0x2F8B0F37118D157FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB5, 0x62, 0x2D, 0xA7, 0xAB, 0xAB, 0x20, 0xF8, 0xB3, 0x29, 0x2D, 0x91, 0xD6, 0xDF, 0xB9, 0x70, + 0x1B, 0xAE, 0x85, 0x3C, 0x05, 0x11, 0xB0, 0x7C, 0x29, 0xAF, 0x99, 0x33, 0x34, 0x00, 0x8B, 0x56, + 0x2A, 0xA4, 0x99, 0x38, 0x06, 0x3A, 0x8A, 0x43, 0x10, 0xBF, 0xC3, 0x3F, 0x06, 0x15, 0xE5 + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25261 + thread_local EncryptedName<47, 0x35E5656B5DEDCD75ULL> name(source); + return name.Text(); + }()), disabled); } this->enchantList->itemX = 3; this->enchantList->itemY = 0; @@ -1909,45 +2011,53 @@ void CUIEnchantPage::Slot15(int width, int height) { this->enchantList->scrollBar->Move(153, 0); this->enchantList->scrollBar->step = 30; { - const std::uint8_t downSource[] = { - 0xAB, 0x16, 0x07, 0xF5, 0xA7, 0x41, 0x38, 0x7A, 0xAD, 0x5D, 0x07, 0xC3, 0xDA, 0x35, 0xA1, 0xF2, - 0x05, 0xDA, 0xAF, 0x6E, 0x09, 0xFB, 0xA8, 0xFE, 0x37, 0xCA, 0xA4, 0x7D, 0x08, 0xE3, 0x91, 0xE8, - 0x0A, 0xCB, 0xB5, 0x60, 0x10, 0xD0, 0x99, 0xD8, 0x1C, 0xD4, 0xE9, 0x6D, 0x0A, 0xFF, 0xFD - }; - // GLOBAL: gl_25264 - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const std::uint8_t upSource[] = { + this->enchantList->scrollBar->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x3D, 0x78, 0x8D, 0x53, 0x75, 0x41, 0x52, 0x2A, 0x3B, 0x33, 0x8D, 0x65, 0x08, 0x35, 0xCB, 0xA2, 0x93, 0xB4, 0x25, 0xC8, 0xDB, 0xFB, 0xC2, 0xAE, 0xA1, 0xA4, 0x2E, 0xDB, 0xDA, 0xE3, 0xFB, 0xB8, 0x9C, 0xA5, 0x3F, 0xC6, 0xC2, 0xD0, 0xE2, 0x97, 0xD3, 0xB5, 0x20, 0xD9, 0xB5 }; - // GLOBAL: gl_25265 - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->enchantList->scrollBar->SetButtonImages(up, down); + constexpr EncryptedSource<45> source(bytes); + // GLOBAL: gl_25265 + thread_local EncryptedName<45, 0xE7978FB5A94DD7FDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xAB, 0x16, 0x07, 0xF5, 0xA7, 0x41, 0x38, 0x7A, 0xAD, 0x5D, 0x07, 0xC3, 0xDA, 0x35, 0xA1, 0xF2, + 0x05, 0xDA, 0xAF, 0x6E, 0x09, 0xFB, 0xA8, 0xFE, 0x37, 0xCA, 0xA4, 0x7D, 0x08, 0xE3, 0x91, 0xE8, + 0x0A, 0xCB, 0xB5, 0x60, 0x10, 0xD0, 0x99, 0xD8, 0x1C, 0xD4, 0xE9, 0x6D, 0x0A, 0xFF, 0xFD + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25264 + thread_local EncryptedName<47, 0xB7FD8F670FC7B96BULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t backgroundSource[] = { + this->enchantList->scrollBar->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xA3, 0x5A, 0x21, 0x85, 0xFB, 0xEB, 0xD8, 0x06, 0xA5, 0x11, 0x21, 0xB3, 0x86, 0x9F, 0x41, 0x8E, 0x0D, 0x96, 0x89, 0x1E, 0x55, 0x51, 0x48, 0x82, 0x3F, 0x86, 0x82, 0x0D, 0x54, 0x49, 0x71, 0x94, 0x01, 0x92, 0xCF, 0x1D, 0x56, 0x55, 0x1D }; - // GLOBAL: gl_25266 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->enchantList->scrollBar->SetBackground(image); + constexpr EncryptedSource<39> source(bytes); + // GLOBAL: gl_25266 + thread_local EncryptedName<39, 0xCB1D253B7FE1F563ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t thumbSource[] = { + this->enchantList->scrollBar->SetThumbImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x09, 0xBC, 0x39, 0x89, 0x39, 0x17, 0xD0, 0xBC, 0x0F, 0xF7, 0x39, 0xBF, 0x44, 0x63, 0x49, 0x34, 0xA7, 0x70, 0x91, 0x12, 0x97, 0xAD, 0x40, 0x38, 0x95, 0x60, 0x9A, 0x01, 0x96, 0xB5, 0x79, 0x2E, 0xAB, 0x67, 0x97, 0x5D, 0x9B, 0xB4, 0x65, 0x71 }; - // GLOBAL: gl_25267 - thread_local EncryptedName thumbName(thumbSource); - const std::string image(thumbName.Text()); - this->enchantList->scrollBar->SetThumbImage(image); + constexpr EncryptedSource<40> source(bytes); + // GLOBAL: gl_25267 + thread_local EncryptedName<40, 0x7115D9F973F913C9ULL> name(source); + return name.Text(); + }())); } this->enchantList->AddNewItem(); this->AddChild(this->enchantList); @@ -1955,15 +2065,17 @@ void CUIEnchantPage::Slot15(int width, int height) { this->unknown_009C = new CUIStaticText(); this->unknown_009C->SetSize(100, 15); this->unknown_009C->Move(150, 309); - this->unknown_009C->SetText("", 0); + this->unknown_009C->SetText(""); this->unknown_009C->SetFitText(0); this->unknown_009C->SetAlign(2, 6); { - const std::uint8_t fontSource[] = {0x5A, 0x70, 0xFF, 0x40, 0x1C, 0x23}; - // GLOBAL: gl_25268 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->unknown_009C->SetFont(font); + this->unknown_009C->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x5A, 0x70, 0xFF, 0x40, 0x1C, 0x23}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25268 + thread_local EncryptedName<6, 0xE55723712993051DULL> name(source); + return name.Text(); + }())); } this->unknown_009C->SetFontHeight(14); this->unknown_009C->SetBold(1); @@ -1990,15 +2102,17 @@ void CUIEnchantPage::Slot15(int width, int height) { void CUINormalPerfect::Slot15(int width, int height) { CUIEnchantPage::Slot15(width, height); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xBF, 0x7A, 0x6F, 0xA1, 0xAB, 0x7F, 0xD0, 0xC2, 0xB9, 0x31, 0x6F, 0x97, 0xD6, 0x0B, 0x49, 0x4A, 0x11, 0xB6, 0xC7, 0x3A, 0x05, 0xC5, 0x40, 0x46, 0x23, 0xB7, 0xC8, 0x04, 0x18, 0xC4, 0x77, 0x7F, 0x1E, 0xB2, 0xCA, 0x02, 0x45, 0xD3, 0x78, 0x7F, 0x7F }; - // GLOBAL: gl_25269 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25269 + thread_local EncryptedName<41, 0x0F15B16B5BAFD57FULL> name(source); + return name.Text(); + }())); } } @@ -2007,15 +2121,17 @@ void CUINormalPerfect::Slot15(int width, int height) { void CUINormalRandom::Slot15(int width, int height) { CUIEnchantPage::Slot15(width, height); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x8F, 0xC8, 0x2D, 0x7F, 0xC9, 0xF9, 0xFA, 0xB4, 0x89, 0x83, 0x2D, 0x49, 0xB4, 0x8D, 0x63, 0x3C, 0x21, 0x04, 0x85, 0xE4, 0x67, 0x43, 0x6A, 0x30, 0x13, 0x05, 0x8A, 0xDA, 0x7A, 0x42, 0x5D, 0x09, 0x2E, 0x00, 0x88, 0xC7, 0x27, 0x55, 0x52, 0x09, 0x4F }; - // GLOBAL: gl_25270 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25270 + thread_local EncryptedName<41, 0x793F370985ED674FULL> name(source); + return name.Text(); + }())); } } @@ -2024,15 +2140,17 @@ void CUINormalRandom::Slot15(int width, int height) { void CUIReset::Slot15(int width, int height) { CUIEnchantPage::Slot15(width, height); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x8F, 0x0E, 0x0F, 0xCF, 0xA3, 0x19, 0x84, 0xB4, 0x89, 0x45, 0x0F, 0xF9, 0xDE, 0x6D, 0x1D, 0x3C, 0x21, 0xC2, 0xA7, 0x54, 0x0D, 0xA3, 0x14, 0x30, 0x13, 0xC3, 0xA8, 0x6A, 0x10, 0xA2, 0x23, 0x09, 0x2E, 0xC6, 0xAA, 0x1B, 0x01, 0xBA, 0x31, 0x79 }; - // GLOBAL: gl_25271 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<40> source(bytes); + // GLOBAL: gl_25271 + thread_local EncryptedName<40, 0x7941D76335CFA14FULL> name(source); + return name.Text(); + }())); } } @@ -2041,15 +2159,17 @@ void CUIReset::Slot15(int width, int height) { void CUIUpgradePerfect::Slot15(int width, int height) { CUIUpgradeEnchantPage::Slot15(width, height); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x21, 0x36, 0x47, 0xB5, 0x41, 0x0D, 0xE4, 0xBE, 0x27, 0x7D, 0x47, 0x83, 0x3C, 0x79, 0x7D, 0x36, 0x8F, 0xFA, 0xEF, 0x2E, 0xEF, 0xB7, 0x74, 0x3A, 0xBD, 0xFB, 0xE0, 0x10, 0xF2, 0xB6, 0x43, 0x03, 0x80, 0xFE, 0xE2, 0x16, 0xAF, 0xA1, 0x4C, 0x03, 0xE1 }; - // GLOBAL: gl_25272 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25272 + thread_local EncryptedName<41, 0x7321C3814F8799E1ULL> name(source); + return name.Text(); + }())); } } @@ -2058,15 +2178,17 @@ void CUIUpgradePerfect::Slot15(int width, int height) { void CUIUpgradeRandom::Slot15(int width, int height) { CUIUpgradeEnchantPage::Slot15(width, height); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xE3, 0x5E, 0x17, 0xED, 0x17, 0x87, 0x26, 0xB0, 0xE5, 0x15, 0x17, 0xDB, 0x6A, 0xF3, 0xBF, 0x38, 0x4D, 0x92, 0xBF, 0x76, 0xB9, 0x3D, 0xB6, 0x34, 0x7F, 0x93, 0xB0, 0x48, 0xA4, 0x3C, 0x81, 0x0D, 0x42, 0x96, 0xB2, 0x55, 0xF9, 0x2B, 0x8E, 0x0D, 0x23 }; - // GLOBAL: gl_25273 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25273 + thread_local EncryptedName<41, 0x7DE349D717D7F123ULL> name(source); + return name.Text(); + }())); } } } @@ -2078,15 +2200,17 @@ void CUIEnchantUI::Slot15(int width, int height) { this->background->SetSize(690, 470); this->background->Move(0, 0); { - const std::uint8_t backgroundSource[] = { + this->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x0D, 0xAC, 0x0D, 0x81, 0x57, 0xF5, 0xD6, 0xFE, 0x0B, 0xE7, 0x0D, 0xB7, 0x2A, 0x81, 0x4F, 0x76, 0xA3, 0x60, 0xA5, 0x1A, 0xF9, 0x4F, 0x46, 0x7A, 0x91, 0x61, 0xAA, 0x24, 0xF2, 0x55, 0x70, 0x5B, 0xAC, 0x6D, 0xB9, 0x2E, 0xDE, 0x15, 0x71, 0x5E, 0xBD, 0x03 }; - // GLOBAL: gl_25281 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->background->SetImage(image); + constexpr EncryptedSource<42> source(bytes); + // GLOBAL: gl_25281 + thread_local EncryptedName<42, 0x33133B977BCD03CDULL> name(source); + return name.Text(); + }())); } this->AddChild(this->background); @@ -2094,47 +2218,56 @@ void CUIEnchantUI::Slot15(int width, int height) { this->titleBar->SetSize(690, 17); this->titleBar->Move(0, 0); { - const std::uint8_t rightSource[] = { - 0xEF, 0x78, 0x85, 0xDF, 0xF9, 0x65, 0xE8, 0x6C, 0xE9, 0x33, 0x85, 0xE9, 0x84, 0x11, 0x71, 0xC3, - 0x4E, 0xA4, 0x2C, 0x46, 0x66, 0xC2, 0x43, 0xD5, 0x4A, 0xA5, 0x23, 0x44, 0x5A, 0xCE, 0x71, 0xD5, - 0x46, 0xA3, 0x29, 0x40, 0x5B, 0xCA, 0x5F, 0xFE, 0x5D, 0xBE, 0x22, 0x4D, 0x4D, 0x85, 0x4F, 0xCC, - 0x5F, 0xD7 - }; - // GLOBAL: gl_25282 - thread_local EncryptedName rightName(rightSource); - const std::string right(rightName.Text()); - const std::uint8_t middleSource[] = { - 0xB5, 0x94, 0xC3, 0xD5, 0xD3, 0x0F, 0x64, 0xA6, 0xB3, 0xDF, 0xC3, 0xE3, 0xAE, 0x7B, 0xFD, 0x09, - 0x14, 0x48, 0x6A, 0x4C, 0x4C, 0xA8, 0xCF, 0x1F, 0x10, 0x49, 0x65, 0x4E, 0x70, 0xA4, 0xFD, 0x1F, - 0x1C, 0x4F, 0x6F, 0x4A, 0x71, 0xA0, 0xD3, 0x34, 0x18, 0x52, 0x67, 0x01, 0x71, 0xAC, 0xD1, 0x6B - }; - // GLOBAL: gl_25283 - thread_local EncryptedName middleName(middleSource); - const std::string middle(middleName.Text()); - const std::uint8_t leftSource[] = { + this->titleBar->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x11, 0xF4, 0x57, 0x1F, 0xF9, 0x49, 0x2E, 0xE2, 0x17, 0xBF, 0x57, 0x29, 0x84, 0x3D, 0xB7, 0x4D, 0xB0, 0x28, 0xFE, 0x86, 0x66, 0xEE, 0x85, 0x5B, 0xB4, 0x29, 0xF1, 0x84, 0x5A, 0xE2, 0xB7, 0x5B, 0xB8, 0x2F, 0xFB, 0x80, 0x5B, 0xE6, 0x99, 0x70, 0xBD, 0x3E, 0xF1, 0x91, 0x17, 0xE5, 0x86, 0x5F, 0xD1 }; - // GLOBAL: gl_25284 - thread_local EncryptedName leftName(leftSource); - const std::string left(leftName.Text()); - this->titleBar->SetImages(left, middle, right); + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25284 + thread_local EncryptedName<49, 0x2FEB8739E5975BD1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB5, 0x94, 0xC3, 0xD5, 0xD3, 0x0F, 0x64, 0xA6, 0xB3, 0xDF, 0xC3, 0xE3, 0xAE, 0x7B, 0xFD, 0x09, + 0x14, 0x48, 0x6A, 0x4C, 0x4C, 0xA8, 0xCF, 0x1F, 0x10, 0x49, 0x65, 0x4E, 0x70, 0xA4, 0xFD, 0x1F, + 0x1C, 0x4F, 0x6F, 0x4A, 0x71, 0xA0, 0xD3, 0x34, 0x18, 0x52, 0x67, 0x01, 0x71, 0xAC, 0xD1, 0x6B + }; + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25283 + thread_local EncryptedName<48, 0x6BA1C1132F033B75ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xEF, 0x78, 0x85, 0xDF, 0xF9, 0x65, 0xE8, 0x6C, 0xE9, 0x33, 0x85, 0xE9, 0x84, 0x11, 0x71, 0xC3, + 0x4E, 0xA4, 0x2C, 0x46, 0x66, 0xC2, 0x43, 0xD5, 0x4A, 0xA5, 0x23, 0x44, 0x5A, 0xCE, 0x71, 0xD5, + 0x46, 0xA3, 0x29, 0x40, 0x5B, 0xCA, 0x5F, 0xFE, 0x5D, 0xBE, 0x22, 0x4D, 0x4D, 0x85, 0x4F, 0xCC, + 0x5F, 0xD7 + }; + constexpr EncryptedSource<50> source(bytes); + // GLOBAL: gl_25282 + thread_local EncryptedName<50, 0xA12DAB392545D72FULL> name(source); + return name.Text(); + }())); } this->AddChild(this->titleBar); CUIStaticText* title = new CUIStaticText(); title->SetSize(100, 17); title->Move(18, 0); - title->SetText("", 0); + title->SetText(""); title->SetFitText(0); title->SetAlign(0, 6); { - const std::uint8_t titleFontSource[] = {0x5A, 0xB2, 0x27, 0xDC, 0xB0, 0x77}; - // GLOBAL: gl_25285 - thread_local EncryptedName titleFontName(titleFontSource); - title->SetFont(std::string(titleFontName.Text())); + title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x5A, 0xB2, 0x27, 0xDC, 0xB0, 0x77}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25285 + thread_local EncryptedName<6, 0x234977DDB54BC71DULL> name(source); + return name.Text(); + }())); } title->SetFontHeight(12); title->SetBold(0); @@ -2151,41 +2284,50 @@ void CUIEnchantUI::Slot15(int width, int height) { closeButton->disabled = 0; closeButton->Invalidate(); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0x15, 0x96, 0xEB, 0xB3, 0x27, 0x69, 0x52, 0x68, 0x13, 0xDD, 0xEB, 0x85, 0x5A, 0x1D, 0xCB, 0xC7, 0xB4, 0x4A, 0x42, 0x2A, 0xB8, 0xCE, 0xF9, 0xD1, 0xB0, 0x4B, 0x4D, 0x28, 0x84, 0xC2, 0xCB, 0xD6, 0xAC, 0x4A, 0x74, 0x2A, 0x8B, 0xC8, 0xE4, 0xC0, 0x8A, 0x56, 0x4D, 0x2F, 0xC9, 0xC5, 0xFA, 0xD5, 0xD5 }; - // GLOBAL: gl_25286 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0xB7, 0x38, 0x47, 0xE7, 0xE3, 0x9D, 0x24, 0xA2, 0xB1, 0x73, 0x47, 0xD1, 0x9E, 0xE9, 0xBD, 0x0D, - 0x16, 0xE4, 0xEE, 0x7E, 0x7C, 0x3A, 0x8F, 0x1B, 0x12, 0xE5, 0xE1, 0x7C, 0x40, 0x36, 0xBD, 0x1C, - 0x0E, 0xE4, 0xD8, 0x7E, 0x4F, 0x3C, 0x92, 0x0A, 0x28, 0xF8, 0xE9, 0x33, 0x41, 0x3E, 0x91, 0x6F - }; - // GLOBAL: gl_25287 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0x9B, 0xFC, 0x9F, 0x27, 0x47, 0x51, 0x66, 0xF4, 0x9D, 0xB7, 0x9F, 0x11, 0x3A, 0x25, 0xFF, 0x5B, - 0x3A, 0x20, 0x36, 0xBE, 0xD8, 0xF6, 0xCD, 0x4D, 0x3E, 0x21, 0x39, 0xBC, 0xE4, 0xFA, 0xFF, 0x4A, - 0x22, 0x20, 0x00, 0xBE, 0xEB, 0xF0, 0xD0, 0x5C, 0x04, 0x3C, 0x31, 0xF3, 0xE5, 0xF2, 0xD3, 0x39 - }; - // GLOBAL: gl_25288 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25286 + thread_local EncryptedName<49, 0xA597A7E7492B39D5ULL> name(source); + return name.Text(); + }()); + closeButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x05, 0x82, 0xEB, 0xC5, 0x49, 0xD3, 0xA8, 0x22, 0x03, 0xC9, 0xEB, 0xF3, 0x34, 0xA7, 0x31, 0x8D, 0xA4, 0x5E, 0x42, 0x5C, 0xD6, 0x74, 0x03, 0x9B, 0xA0, 0x5F, 0x4D, 0x5E, 0xEA, 0x78, 0x31, 0x9C, 0xBC, 0x5E, 0x74, 0x5C, 0xE5, 0x72, 0x1E, 0x8A, 0x9A, 0x42, 0x4D, 0x59, 0xA7, 0x7F, 0x00, 0x9F, 0xC5 }; - // GLOBAL: gl_25289 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - closeButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25289 + thread_local EncryptedName<49, 0xEF6D1D893F2B2DC5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x9B, 0xFC, 0x9F, 0x27, 0x47, 0x51, 0x66, 0xF4, 0x9D, 0xB7, 0x9F, 0x11, 0x3A, 0x25, 0xFF, 0x5B, + 0x3A, 0x20, 0x36, 0xBE, 0xD8, 0xF6, 0xCD, 0x4D, 0x3E, 0x21, 0x39, 0xBC, 0xE4, 0xFA, 0xFF, 0x4A, + 0x22, 0x20, 0x00, 0xBE, 0xEB, 0xF0, 0xD0, 0x5C, 0x04, 0x3C, 0x31, 0xF3, 0xE5, 0xF2, 0xD3, 0x39 + }; + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25288 + thread_local EncryptedName<48, 0x39A39F87DD5F535BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB7, 0x38, 0x47, 0xE7, 0xE3, 0x9D, 0x24, 0xA2, 0xB1, 0x73, 0x47, 0xD1, 0x9E, 0xE9, 0xBD, 0x0D, + 0x16, 0xE4, 0xEE, 0x7E, 0x7C, 0x3A, 0x8F, 0x1B, 0x12, 0xE5, 0xE1, 0x7C, 0x40, 0x36, 0xBD, 0x1C, + 0x0E, 0xE4, 0xD8, 0x7E, 0x4F, 0x3C, 0x92, 0x0A, 0x28, 0xF8, 0xE9, 0x33, 0x41, 0x3E, 0x91, 0x6F + }; + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25287 + thread_local EncryptedName<48, 0x6FE153231D879777ULL> name(source); + return name.Text(); + }()), disabled); } this->titleBar->SetSecondButton(closeButton); @@ -2197,39 +2339,48 @@ void CUIEnchantUI::Slot15(int width, int height) { this->targetList->SetOnSelect([this](EnchantUI::CUITargetItem* item, const ITEM_INFO& info) { this->OnSelectTarget(item, info); }); this->targetList->SetBinder([this](EnchantUI::CUITargetItem* item, const ITEM_INFO& info) { EnchantUI::UpdateTargetItem(item, const_cast(&info)); }); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0xD7, 0xFE, 0x21, 0xBB, 0xF9, 0x0D, 0x46, 0x4A, 0xD1, 0xB5, 0x21, 0x8D, 0x84, 0x79, 0xDF, 0xC2, 0x79, 0x32, 0x89, 0x20, 0x57, 0xB7, 0xD6, 0xCE, 0x4B, 0x33, 0x86, 0x1E, 0x5C, 0xAD, 0xE0, 0xD8, 0x70, 0x34, 0x80, 0x33, 0x17, 0xA1, 0xEE, 0xF7, 0x17 }; - // GLOBAL: gl_25290 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x90, - 0xC5, 0xCC, 0xE5, 0xEC, 0xDD, 0xF9, 0xF2, 0x9C, 0xF7, 0xCD, 0xEA, 0xD2, 0xD6, 0xE3, 0xC4, 0x8A, - 0xCC, 0xCA, 0xEC, 0xFF, 0xEC, 0xE2, 0xD1, 0xB0, 0xD9, 0x81, 0xEF, 0xE0, 0xC3, 0x8D - }; - // GLOBAL: gl_25291 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { - 0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x46, - 0x61, 0x2C, 0x2D, 0xCE, 0xF3, 0x31, 0xCC, 0x4A, 0x53, 0x2D, 0x22, 0xF0, 0xF8, 0x2B, 0xFA, 0x5C, - 0x68, 0x2A, 0x24, 0xDD, 0xC2, 0x35, 0xEB, 0x66, 0x7C, 0x3C, 0x6B, 0xCD, 0xF0, 0x35, 0x99 - }; - // GLOBAL: gl_25292 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25290 + thread_local EncryptedName<41, 0x8783C33941E15117ULL> name(source); + return name.Text(); + }()); + this->targetList->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xB3, 0x40, 0x7B, 0x2B, 0x15, 0x2D, 0x6E, 0x32, 0xB5, 0x0B, 0x7B, 0x1D, 0x68, 0x59, 0xF7, 0xBA, 0x1D, 0x8C, 0xD3, 0xB0, 0xBB, 0x97, 0xFE, 0xB6, 0x2F, 0x8D, 0xDC, 0x8E, 0xB0, 0x8D, 0xC8, 0xA0, 0x14, 0x8A, 0xDA, 0xA3, 0xFB, 0x81, 0xC6, 0x8F, 0x73 }; - // GLOBAL: gl_25293 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - this->targetList->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25293 + thread_local EncryptedName<41, 0xFFABE3D5D1BBEF73ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x46, + 0x61, 0x2C, 0x2D, 0xCE, 0xF3, 0x31, 0xCC, 0x4A, 0x53, 0x2D, 0x22, 0xF0, 0xF8, 0x2B, 0xFA, 0x5C, + 0x68, 0x2A, 0x24, 0xDD, 0xC2, 0x35, 0xEB, 0x66, 0x7C, 0x3C, 0x6B, 0xCD, 0xF0, 0x35, 0x99 + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25292 + thread_local EncryptedName<47, 0x0399459DAF454F0FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x90, + 0xC5, 0xCC, 0xE5, 0xEC, 0xDD, 0xF9, 0xF2, 0x9C, 0xF7, 0xCD, 0xEA, 0xD2, 0xD6, 0xE3, 0xC4, 0x8A, + 0xCC, 0xCA, 0xEC, 0xFF, 0xEC, 0xE2, 0xD1, 0xB0, 0xD9, 0x81, 0xEF, 0xE0, 0xC3, 0x8D + }; + constexpr EncryptedSource<46> source(bytes); + // GLOBAL: gl_25291 + thread_local EncryptedName<46, 0xD5A78DB38D8DAFABULL> name(source); + return name.Text(); + }()), disabled); } this->targetList->itemX = 4; this->targetList->itemY = 0; @@ -2237,45 +2388,53 @@ void CUIEnchantUI::Slot15(int width, int height) { this->targetList->scrollBar->Move(204, 0); this->targetList->scrollBar->step = 50; { - const std::uint8_t downSource[] = { - 0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x82, - 0xE1, 0x3A, 0x09, 0x8A, 0xDB, 0x6D, 0x56, 0x8E, 0xD3, 0x2A, 0x02, 0x99, 0xDA, 0x75, 0x6F, 0x98, - 0xEE, 0x2B, 0x13, 0x84, 0xC2, 0x46, 0x67, 0xA8, 0xF8, 0x34, 0x4F, 0x89, 0xD8, 0x69, 0x03 - }; - // GLOBAL: gl_25294 - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const std::uint8_t upSource[] = { + this->targetList->scrollBar->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x5F, 0x72, 0x43, 0xE5, 0xB7, 0x8B, 0xDE, 0xEA, 0x59, 0x39, 0x43, 0xD3, 0xCA, 0xFF, 0x47, 0x62, 0xF1, 0xBE, 0xEB, 0x7E, 0x19, 0x31, 0x4E, 0x6E, 0xC3, 0xAE, 0xE0, 0x6D, 0x18, 0x29, 0x77, 0x78, 0xFE, 0xAF, 0xF1, 0x70, 0x00, 0x1A, 0x6E, 0x57, 0xB1, 0xBF, 0xEE, 0x6F, 0x77 }; - // GLOBAL: gl_25295 - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->targetList->scrollBar->SetButtonImages(up, down); + constexpr EncryptedSource<45> source(bytes); + // GLOBAL: gl_25295 + thread_local EncryptedName<45, 0x271B45771F83DD9FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x82, + 0xE1, 0x3A, 0x09, 0x8A, 0xDB, 0x6D, 0x56, 0x8E, 0xD3, 0x2A, 0x02, 0x99, 0xDA, 0x75, 0x6F, 0x98, + 0xEE, 0x2B, 0x13, 0x84, 0xC2, 0x46, 0x67, 0xA8, 0xF8, 0x34, 0x4F, 0x89, 0xD8, 0x69, 0x03 + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25294 + thread_local EncryptedName<47, 0xC70319B5EB61598FULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t backgroundSource[] = { + this->targetList->scrollBar->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x17, 0x3A, 0xDF, 0x61, 0x91, 0x8B, 0x42, 0xC6, 0x11, 0x71, 0xDF, 0x57, 0xEC, 0xFF, 0xDB, 0x4E, 0xB9, 0xF6, 0x77, 0xFA, 0x3F, 0x31, 0xD2, 0x42, 0x8B, 0xE6, 0x7C, 0xE9, 0x3E, 0x29, 0xEB, 0x54, 0xB5, 0xF2, 0x31, 0xF9, 0x3C, 0x35, 0x87 }; - // GLOBAL: gl_25296 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->targetList->scrollBar->SetBackground(image); + constexpr EncryptedSource<39> source(bytes); + // GLOBAL: gl_25296 + thread_local EncryptedName<39, 0x0B8745519B1F95D7ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t thumbSource[] = { + this->targetList->scrollBar->SetThumbImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xF1, 0x56, 0x13, 0x03, 0xDD, 0x81, 0x0E, 0xCC, 0xF7, 0x1D, 0x13, 0x35, 0xA0, 0xF5, 0x97, 0x44, 0x5F, 0x9A, 0xBB, 0x98, 0x73, 0x3B, 0x9E, 0x48, 0x6D, 0x8A, 0xB0, 0x8B, 0x72, 0x23, 0xA7, 0x5E, 0x53, 0x8D, 0xBD, 0xD7, 0x7F, 0x22, 0xBB, 0x01 }; - // GLOBAL: gl_25297 - thread_local EncryptedName thumbName(thumbSource); - const std::string image(thumbName.Text()); - this->targetList->scrollBar->SetThumbImage(image); + constexpr EncryptedSource<40> source(bytes); + // GLOBAL: gl_25297 + thread_local EncryptedName<40, 0x01CB4F1DF9D3F931ULL> name(source); + return name.Text(); + }())); } this->targetList->AddNewItem(); this->AddChild(this->targetList); @@ -2291,40 +2450,49 @@ void CUIEnchantUI::Slot15(int width, int height) { normalButton->disabled = 0; normalButton->Invalidate(); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0x99, 0x2A, 0x47, 0x83, 0x37, 0xE1, 0xFA, 0x2E, 0x9F, 0x61, 0x47, 0xB5, 0x4A, 0x95, 0x63, 0xA6, 0x37, 0xE6, 0xEF, 0x18, 0x99, 0x5B, 0x6A, 0xAA, 0x05, 0xF1, 0xE6, 0x1B, 0xA8, 0x4A, 0x51, 0x80, 0x06, 0xE6, 0xE8, 0x14, 0x9A, 0x40, 0x51, 0xBC, 0x36, 0xF0, 0xF3, 0x57, 0x95, 0x42, 0x4F, 0xE3 }; - // GLOBAL: gl_25298 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x4B, 0x32, 0xB7, 0x77, 0x21, 0x13, 0xA2, 0xDA, 0x4D, 0x79, 0xB7, 0x41, 0x5C, 0x67, 0x3B, 0x52, - 0xE5, 0xFE, 0x1F, 0xEC, 0x8F, 0xA9, 0x32, 0x5E, 0xD7, 0xE9, 0x16, 0xEF, 0xBE, 0xB8, 0x09, 0x74, - 0xD4, 0xFE, 0x18, 0xE0, 0x8C, 0xB2, 0x09, 0x48, 0xE4, 0xE8, 0x03, 0xA3, 0x83, 0xB0, 0x17, 0x17 + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25298 + thread_local EncryptedName<48, 0xE33F2FF779878559ULL> name(source); + return name.Text(); + }()); + normalButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x57, 0x66, 0x09, 0x61, 0x0D, 0x75, 0x74, 0x08, 0x51, 0x2D, 0x09, 0x57, 0x70, 0x01, 0xED, 0x80, + 0xF9, 0xAA, 0xA1, 0xFA, 0xA3, 0xCF, 0xE4, 0x8C, 0xCB, 0xBD, 0xA8, 0xF9, 0x92, 0xDE, 0xDF, 0xA6, + 0xC8, 0xAA, 0xA6, 0xF6, 0xA0, 0xD4, 0xDF, 0x9A, 0xF8, 0xBC, 0xBD, 0xB5, 0xAF, 0xD6, 0xC1, 0xC5 }; - // GLOBAL: gl_25299 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25301 + thread_local EncryptedName<48, 0xC5B1BBCD9BC9C997ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { 0x21, 0x2C, 0x11, 0x17, 0xD1, 0x4F, 0x7E, 0x0C, 0x27, 0x67, 0x11, 0x21, 0xAC, 0x3B, 0xE7, 0x84, 0x8F, 0xE0, 0xB9, 0x8C, 0x7F, 0xF5, 0xEE, 0x88, 0xBD, 0xF7, 0xB0, 0x8F, 0x4E, 0xE4, 0xD5, 0xA2, 0xBE, 0xE0, 0xBE, 0x80, 0x7C, 0xEE, 0xD5, 0x9E, 0x92, 0xE6, 0xBD, 0x88, 0x72, 0xF5, 0x95, 0xA3, 0x8C, 0xF3, 0xD1 }; - // GLOBAL: gl_25300 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { - 0x57, 0x66, 0x09, 0x61, 0x0D, 0x75, 0x74, 0x08, 0x51, 0x2D, 0x09, 0x57, 0x70, 0x01, 0xED, 0x80, - 0xF9, 0xAA, 0xA1, 0xFA, 0xA3, 0xCF, 0xE4, 0x8C, 0xCB, 0xBD, 0xA8, 0xF9, 0x92, 0xDE, 0xDF, 0xA6, - 0xC8, 0xAA, 0xA6, 0xF6, 0xA0, 0xD4, 0xDF, 0x9A, 0xF8, 0xBC, 0xBD, 0xB5, 0xAF, 0xD6, 0xC1, 0xC5 + constexpr EncryptedSource<51> source(bytes); + // GLOBAL: gl_25300 + thread_local EncryptedName<51, 0xC1BB8111EDD183E1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x4B, 0x32, 0xB7, 0x77, 0x21, 0x13, 0xA2, 0xDA, 0x4D, 0x79, 0xB7, 0x41, 0x5C, 0x67, 0x3B, 0x52, + 0xE5, 0xFE, 0x1F, 0xEC, 0x8F, 0xA9, 0x32, 0x5E, 0xD7, 0xE9, 0x16, 0xEF, 0xBE, 0xB8, 0x09, 0x74, + 0xD4, 0xFE, 0x18, 0xE0, 0x8C, 0xB2, 0x09, 0x48, 0xE4, 0xE8, 0x03, 0xA3, 0x83, 0xB0, 0x17, 0x17 }; - // GLOBAL: gl_25301 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - normalButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<48> source(bytes); + // GLOBAL: gl_25299 + thread_local EncryptedName<48, 0x1767DDE18D779D8BULL> name(source); + return name.Text(); + }()), disabled); } this->tab->AddChild(normalButton); @@ -2334,40 +2502,49 @@ void CUIEnchantUI::Slot15(int width, int height) { upgradeButton->disabled = 0; upgradeButton->Invalidate(); { - const std::uint8_t disabledSource[] = { + const std::string disabled([]() { + constexpr std::uint8_t bytes[] = { 0x1D, 0xFA, 0xAF, 0x55, 0x29, 0xDB, 0x2C, 0xB4, 0x1B, 0xB1, 0xAF, 0x63, 0x54, 0xAF, 0xB5, 0x3C, 0xB3, 0x36, 0x07, 0xCE, 0x87, 0x61, 0xBC, 0x30, 0x81, 0x21, 0x0E, 0xCD, 0xB6, 0x70, 0x87, 0x1A, 0x82, 0x32, 0x1D, 0xC0, 0x9E, 0x4A, 0x86, 0x0C, 0xA9, 0x7B, 0x0D, 0xC2, 0x99, 0x15 }; - // GLOBAL: gl_25302 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0xF3, 0xCC, 0x95, 0x0B, 0xE9, 0xFB, 0x16, 0x84, 0xF5, 0x87, 0x95, 0x3D, 0x94, 0x8F, 0x8F, 0x0C, - 0x5D, 0x00, 0x3D, 0x90, 0x47, 0x41, 0x86, 0x00, 0x6F, 0x17, 0x34, 0x93, 0x76, 0x50, 0xBD, 0x2A, - 0x6C, 0x04, 0x27, 0x9E, 0x5E, 0x6A, 0xBC, 0x3C, 0x47, 0x4D, 0x37, 0x9C, 0x59, 0x35 + constexpr EncryptedSource<46> source(bytes); + // GLOBAL: gl_25302 + thread_local EncryptedName<46, 0x79E915E9AF6F55DDULL> name(source); + return name.Text(); + }()); + upgradeButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x7F, 0xC6, 0x23, 0x37, 0x45, 0x49, 0x9A, 0x3C, 0x79, 0x8D, 0x23, 0x01, 0x38, 0x3D, 0x03, 0xB4, + 0xD1, 0x0A, 0x8B, 0xAC, 0xEB, 0xF3, 0x0A, 0xB8, 0xE3, 0x1D, 0x82, 0xAF, 0xDA, 0xE2, 0x31, 0x92, + 0xE0, 0x0E, 0x91, 0xA2, 0xF2, 0xD8, 0x30, 0x84, 0xCB, 0x47, 0x81, 0xA0, 0xF5, 0x87 }; - // GLOBAL: gl_25303 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { + constexpr EncryptedSource<46> source(bytes); + // GLOBAL: gl_25305 + thread_local EncryptedName<46, 0xF15F8785CDE369BFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { 0x75, 0x20, 0x81, 0xDF, 0xD3, 0x33, 0xEA, 0xB4, 0x73, 0x6B, 0x81, 0xE9, 0xAE, 0x47, 0x73, 0x3C, 0xDB, 0xEC, 0x29, 0x44, 0x7D, 0x89, 0x7A, 0x30, 0xE9, 0xFB, 0x20, 0x47, 0x4C, 0x98, 0x41, 0x1A, 0xEA, 0xE8, 0x33, 0x4A, 0x64, 0xA2, 0x5C, 0x1C, 0xD9, 0xEA, 0x22, 0x51, 0x3D, 0x9F, 0x42, 0x09, 0xB5 }; - // GLOBAL: gl_25304 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { - 0x7F, 0xC6, 0x23, 0x37, 0x45, 0x49, 0x9A, 0x3C, 0x79, 0x8D, 0x23, 0x01, 0x38, 0x3D, 0x03, 0xB4, - 0xD1, 0x0A, 0x8B, 0xAC, 0xEB, 0xF3, 0x0A, 0xB8, 0xE3, 0x1D, 0x82, 0xAF, 0xDA, 0xE2, 0x31, 0x92, - 0xE0, 0x0E, 0x91, 0xA2, 0xF2, 0xD8, 0x30, 0x84, 0xCB, 0x47, 0x81, 0xA0, 0xF5, 0x87 + constexpr EncryptedSource<49> source(bytes); + // GLOBAL: gl_25304 + thread_local EncryptedName<49, 0x792FFD1325418FB5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xF3, 0xCC, 0x95, 0x0B, 0xE9, 0xFB, 0x16, 0x84, 0xF5, 0x87, 0x95, 0x3D, 0x94, 0x8F, 0x8F, 0x0C, + 0x5D, 0x00, 0x3D, 0x90, 0x47, 0x41, 0x86, 0x00, 0x6F, 0x17, 0x34, 0x93, 0x76, 0x50, 0xBD, 0x2A, + 0x6C, 0x04, 0x27, 0x9E, 0x5E, 0x6A, 0xBC, 0x3C, 0x47, 0x4D, 0x37, 0x9C, 0x59, 0x35 }; - // GLOBAL: gl_25305 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - upgradeButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<46> source(bytes); + // GLOBAL: gl_25303 + thread_local EncryptedName<46, 0x49D33529F1556333ULL> name(source); + return name.Text(); + }()), disabled); } this->tab->AddChild(upgradeButton); @@ -2377,40 +2554,48 @@ void CUIEnchantUI::Slot15(int width, int height) { resetButton->disabled = 0; resetButton->Invalidate(); { - const std::uint8_t disabledSource[] = { - 0xEB, 0x78, 0x89, 0xD5, 0xCF, 0x1F, 0xE6, 0xC6, 0xED, 0x33, 0x89, 0xE3, 0xB2, 0x6B, 0x7F, 0x4E, - 0x45, 0xB4, 0x21, 0x4E, 0x61, 0xA5, 0x76, 0x42, 0x77, 0xA3, 0x28, 0x4D, 0x50, 0xB4, 0x4D, 0x68, - 0x74, 0xA5, 0x2C, 0x5C, 0x6A, 0xA5, 0x7C, 0x64, 0x5E, 0xA3, 0x67, 0x4D, 0x62, 0xA1, 0x23 + resetButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xC1, 0xDA, 0x3D, 0x23, 0xEF, 0x73, 0x6A, 0x7A, 0xC7, 0x91, 0x3D, 0x15, 0x92, 0x07, 0xF3, 0xF2, + 0x6F, 0x16, 0x95, 0xB8, 0x41, 0xC9, 0xFA, 0xFE, 0x5D, 0x01, 0x9C, 0xBB, 0x70, 0xD8, 0xC1, 0xD4, + 0x5E, 0x07, 0x98, 0xAA, 0x4A, 0xC9, 0xF0, 0xD8, 0x74, 0x01, 0xD3, 0xBB, 0x42, 0xCD, 0xAF }; - // GLOBAL: gl_25306 - thread_local EncryptedName disabledName(disabledSource); - const std::string disabled(disabledName.Text()); - const std::uint8_t pressedSource[] = { - 0x23, 0x7A, 0x93, 0x0D, 0x65, 0xC9, 0x26, 0x7E, 0x25, 0x31, 0x93, 0x3B, 0x18, 0xBD, 0xBF, 0xF6, - 0x8D, 0xB6, 0x3B, 0x96, 0xCB, 0x73, 0xB6, 0xFA, 0xBF, 0xA1, 0x32, 0x95, 0xFA, 0x62, 0x8D, 0xD0, - 0xBC, 0xA7, 0x36, 0x84, 0xC0, 0x73, 0xBC, 0xDC, 0x96, 0xA1, 0x7D, 0x95, 0xC8, 0x77, 0xE3 - }; - // GLOBAL: gl_25307 - thread_local EncryptedName pressedName(pressedSource); - const std::string pressed(pressedName.Text()); - const std::uint8_t hoverSource[] = { + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25309 + thread_local EncryptedName<47, 0xB7AFBD2FD9FD7501ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { 0x25, 0xD4, 0xF3, 0xD3, 0x8D, 0xAB, 0xE8, 0xD4, 0x23, 0x9F, 0xF3, 0xE5, 0xF0, 0xDF, 0x71, 0x5C, 0x8B, 0x18, 0x5B, 0x48, 0x23, 0x11, 0x78, 0x50, 0xB9, 0x0F, 0x52, 0x4B, 0x12, 0x00, 0x43, 0x7A, 0xBA, 0x09, 0x56, 0x5A, 0x28, 0x11, 0x72, 0x6A, 0x80, 0x17, 0x56, 0x4A, 0x39, 0x4B, 0x4F, 0x74, 0x95, 0x7B }; - // GLOBAL: gl_25308 - thread_local EncryptedName hoverName(hoverSource); - const std::string hover(hoverName.Text()); - const std::uint8_t normalSource[] = { - 0xC1, 0xDA, 0x3D, 0x23, 0xEF, 0x73, 0x6A, 0x7A, 0xC7, 0x91, 0x3D, 0x15, 0x92, 0x07, 0xF3, 0xF2, - 0x6F, 0x16, 0x95, 0xB8, 0x41, 0xC9, 0xFA, 0xFE, 0x5D, 0x01, 0x9C, 0xBB, 0x70, 0xD8, 0xC1, 0xD4, - 0x5E, 0x07, 0x98, 0xAA, 0x4A, 0xC9, 0xF0, 0xD8, 0x74, 0x01, 0xD3, 0xBB, 0x42, 0xCD, 0xAF + constexpr EncryptedSource<50> source(bytes); + // GLOBAL: gl_25308 + thread_local EncryptedName<50, 0x192D654D29337BE5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x23, 0x7A, 0x93, 0x0D, 0x65, 0xC9, 0x26, 0x7E, 0x25, 0x31, 0x93, 0x3B, 0x18, 0xBD, 0xBF, 0xF6, + 0x8D, 0xB6, 0x3B, 0x96, 0xCB, 0x73, 0xB6, 0xFA, 0xBF, 0xA1, 0x32, 0x95, 0xFA, 0x62, 0x8D, 0xD0, + 0xBC, 0xA7, 0x36, 0x84, 0xC0, 0x73, 0xBC, 0xDC, 0x96, 0xA1, 0x7D, 0x95, 0xC8, 0x77, 0xE3 }; - // GLOBAL: gl_25309 - thread_local EncryptedName normalName(normalSource); - const std::string normal(normalName.Text()); - resetButton->SetImages(normal, hover, pressed, disabled); + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25307 + thread_local EncryptedName<47, 0xB3E307A5F753D5E3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xEB, 0x78, 0x89, 0xD5, 0xCF, 0x1F, 0xE6, 0xC6, 0xED, 0x33, 0x89, 0xE3, 0xB2, 0x6B, 0x7F, 0x4E, + 0x45, 0xB4, 0x21, 0x4E, 0x61, 0xA5, 0x76, 0x42, 0x77, 0xA3, 0x28, 0x4D, 0x50, 0xB4, 0x4D, 0x68, + 0x74, 0xA5, 0x2C, 0x5C, 0x6A, 0xA5, 0x7C, 0x64, 0x5E, 0xA3, 0x67, 0x4D, 0x62, 0xA1, 0x23 + }; + constexpr EncryptedSource<47> source(bytes); + // GLOBAL: gl_25306 + thread_local EncryptedName<47, 0x0B23D10F2F49D72BULL> name(source); + return name.Text(); + }())); } this->tab->AddChild(resetButton); @@ -2419,26 +2604,30 @@ void CUIEnchantUI::Slot15(int width, int height) { this->normalPage->Move(220, 40); this->AddChild(this->normalPage); { - const std::uint8_t firstBackgroundSource[] = { + this->normalPage->firstPage->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x0F, 0x74, 0x11, 0xEF, 0x59, 0xE1, 0xAA, 0xDE, 0x09, 0x3F, 0x11, 0xD9, 0x24, 0x95, 0x33, 0x56, 0xA1, 0xB8, 0xB9, 0x74, 0xF7, 0x5B, 0x3A, 0x5A, 0x93, 0xB9, 0xB6, 0x4A, 0xEA, 0x5A, 0x0D, 0x63, 0xAE, 0xBC, 0xB4, 0x57, 0xB7, 0x4D, 0x02, 0x63, 0xCF }; - // GLOBAL: gl_25310 - thread_local EncryptedName firstBackgroundName(firstBackgroundSource); - const std::string image(firstBackgroundName.Text()); - this->normalPage->firstPage->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25310 + thread_local EncryptedName<41, 0x136F2F9915D1DBCFULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t secondBackgroundSource[] = { + this->normalPage->secondPage->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x91, 0x02, 0x3D, 0xD1, 0x8F, 0xFD, 0x1A, 0xA6, 0x97, 0x49, 0x3D, 0xE7, 0xF2, 0x89, 0x83, 0x2E, 0x3F, 0xCE, 0x95, 0x4A, 0x21, 0x47, 0x8A, 0x22, 0x0D, 0xCF, 0x9A, 0x74, 0x3C, 0x46, 0xBD, 0x1B, 0x30, 0xCA, 0x98, 0x72, 0x61, 0x51, 0xB2, 0x1B, 0x51 }; - // GLOBAL: gl_25311 - thread_local EncryptedName secondBackgroundName(secondBackgroundSource); - const std::string image(secondBackgroundName.Text()); - this->normalPage->secondPage->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25311 + thread_local EncryptedName<41, 0x6BDF334F2BFDAD51ULL> name(source); + return name.Text(); + }())); } this->upgradePage = new EnchantUI::CUIUpgrade(); @@ -2446,26 +2635,30 @@ void CUIEnchantUI::Slot15(int width, int height) { this->upgradePage->Move(220, 40); this->AddChild(this->upgradePage); { - const std::uint8_t firstBackgroundSource[] = { + this->upgradePage->firstPage->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x81, 0x92, 0x97, 0x8F, 0xF9, 0x51, 0x88, 0xAA, 0x87, 0xD9, 0x97, 0xB9, 0x84, 0x25, 0x11, 0x22, 0x2F, 0x5E, 0x3F, 0x14, 0x57, 0xEB, 0x18, 0x2E, 0x1D, 0x5F, 0x30, 0x2A, 0x4A, 0xEA, 0x2F, 0x17, 0x20, 0x5A, 0x32, 0x37, 0x17, 0xFD, 0x20, 0x17, 0x41 }; - // GLOBAL: gl_25312 - thread_local EncryptedName firstBackgroundName(firstBackgroundSource); - const std::string image(firstBackgroundName.Text()); - this->upgradePage->firstPage->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25312 + thread_local EncryptedName<41, 0x674D9F3975573D41ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t secondBackgroundSource[] = { + this->upgradePage->secondPage->background->SetImage(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xFD, 0xEE, 0x4B, 0x33, 0x39, 0xD5, 0x00, 0x60, 0xFB, 0xA5, 0x4B, 0x05, 0x44, 0xA1, 0x99, 0xE8, 0x53, 0x22, 0xE3, 0xA8, 0x97, 0x6F, 0x90, 0xE4, 0x61, 0x23, 0xEC, 0x96, 0x8A, 0x6E, 0xA7, 0xDD, 0x5C, 0x26, 0xEE, 0x90, 0xD7, 0x79, 0xA8, 0xDD, 0x3D }; - // GLOBAL: gl_25313 - thread_local EncryptedName secondBackgroundName(secondBackgroundSource); - const std::string image(secondBackgroundName.Text()); - this->upgradePage->secondPage->background->SetImage(image); + constexpr EncryptedSource<41> source(bytes); + // GLOBAL: gl_25313 + thread_local EncryptedName<41, 0xADC51BF9C98B413DULL> name(source); + return name.Text(); + }())); } this->resetPage = new EnchantUI::CUIReset(); @@ -2478,11 +2671,13 @@ void CUIEnchantUI::Slot15(int width, int height) { this->textViewer->Move(10, 421); this->textViewer->SetTextOffset(0, 0); { - const std::uint8_t fontSource[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; - // GLOBAL: gl_25314 - thread_local EncryptedName fontName(fontSource); - const std::string font(fontName.Text()); - this->textViewer->SetFont(font); + this->textViewer->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25314 + thread_local EncryptedName<6, 0xDF8117FF49CFF551ULL> name(source); + return name.Text(); + }())); } this->textViewer->SetFontHeight(12); this->textViewer->SetBold(1); @@ -2494,58 +2689,70 @@ void CUIEnchantUI::Slot15(int width, int height) { this->textViewer->SetScrollBarSize(13, 47); this->textViewer->SetScrollStep(13); { - const std::uint8_t downSource[] = { - 0xB1, 0x2C, 0xAB, 0xF1, 0xD1, 0xC1, 0x98, 0xB0, 0xB7, 0x67, 0xAB, 0xC7, 0xAC, 0xB5, 0x01, 0x0E, - 0x12, 0xF1, 0x04, 0x67, 0x7D, 0x3F, 0x39, 0x12, 0x06, 0xED, 0x45, 0x69, 0x7C, 0x7F, 0x5D - }; - // GLOBAL: gl_25315 - thread_local EncryptedName downName(downSource); - const std::string down(downName.Text()); - const std::uint8_t upSource[] = { + this->textViewer->SetScrollBarButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x89, 0xC2, 0xBF, 0x19, 0x07, 0xCF, 0x8C, 0xDC, 0x8F, 0x89, 0xBF, 0x2F, 0x7A, 0xBB, 0x15, 0x62, 0x2A, 0x1F, 0x10, 0x8F, 0xAB, 0x31, 0x3C, 0x61, 0x67, 0x0F, 0x12, 0x93, 0xC7 }; - // GLOBAL: gl_25316 - thread_local EncryptedName upName(upSource); - const std::string up(upName.Text()); - this->textViewer->SetScrollBarButtonImages(up, down); + constexpr EncryptedSource<29> source(bytes); + // GLOBAL: gl_25316 + thread_local EncryptedName<29, 0x114901C7E37F6D49ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB1, 0x2C, 0xAB, 0xF1, 0xD1, 0xC1, 0x98, 0xB0, 0xB7, 0x67, 0xAB, 0xC7, 0xAC, 0xB5, 0x01, 0x0E, + 0x12, 0xF1, 0x04, 0x67, 0x7D, 0x3F, 0x39, 0x12, 0x06, 0xED, 0x45, 0x69, 0x7C, 0x7F, 0x5D + }; + constexpr EncryptedSource<31> source(bytes); + // GLOBAL: gl_25315 + thread_local EncryptedName<31, 0x7D5D0F110B6B8371ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t backgroundSource[] = { + this->textViewer->SetScrollBarBackground(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x99, 0x28, 0xC3, 0x87, 0x95, 0x05, 0xE2, 0x16, 0x9F, 0x63, 0xC3, 0xB1, 0xE8, 0x71, 0x7B, 0xA8, 0x3A, 0xF5, 0x6C, 0x11, 0x39, 0xFB, 0x4A, 0xB2, 0x3D, 0xA9, 0x61, 0x10, 0x25, 0xCB }; - // GLOBAL: gl_25317 - thread_local EncryptedName backgroundName(backgroundSource); - const std::string image(backgroundName.Text()); - this->textViewer->SetScrollBarBackground(image); + constexpr EncryptedSource<30> source(bytes); + // GLOBAL: gl_25317 + thread_local EncryptedName<30, 0xDB27CB557D038759ULL> name(source); + return name.Text(); + }())); } { - const std::uint8_t bottomSource[] = { - 0x4D, 0x12, 0x7B, 0x99, 0x77, 0xF7, 0x7E, 0x9C, 0x4B, 0x59, 0x7B, 0xAF, 0x0A, 0x83, 0xE7, 0x22, - 0xEE, 0xCF, 0xD4, 0x0F, 0xDB, 0x09, 0xD9, 0x30, 0xFF, 0xE2, 0xDF, 0x0C, 0xC0, 0x57, 0x95, 0x33, - 0xE0, 0xCD, 0xBB - }; - // GLOBAL: gl_25318 - thread_local EncryptedName bottomName(bottomSource); - const std::string bottom(bottomName.Text()); - const std::uint8_t middleSource[] = { - 0x2F, 0x82, 0x97, 0xF7, 0x05, 0x1F, 0x26, 0x4A, 0x29, 0xC9, 0x97, 0xC1, 0x78, 0x6B, 0xBF, 0xF4, - 0x8C, 0x5F, 0x38, 0x61, 0xA9, 0xE1, 0x81, 0xE6, 0x9D, 0x72, 0x3A, 0x64, 0xA1, 0xFF, 0x81, 0xEA, - 0x9F, 0x2D - }; - // GLOBAL: gl_25319 - thread_local EncryptedName middleName(middleSource); - const std::string middle(middleName.Text()); - const std::uint8_t topSource[] = { + this->textViewer->SetScrollBarThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x3F, 0x4C, 0x9D, 0xF9, 0x67, 0x61, 0x66, 0xF2, 0x39, 0x07, 0x9D, 0xCF, 0x1A, 0x15, 0xFF, 0x4C, 0x9C, 0x91, 0x32, 0x6F, 0xCB, 0x9F, 0xC1, 0x5E, 0x8D, 0xBC, 0x28, 0x73, 0x89, 0xCD, 0xCE, 0x4F, 0xFF }; - // GLOBAL: gl_25320 - thread_local EncryptedName topName(topSource); - const std::string top(topName.Text()); - this->textViewer->SetScrollBarThumbImages(top, middle, bottom); + constexpr EncryptedSource<33> source(bytes); + // GLOBAL: gl_25320 + thread_local EncryptedName<33, 0x3FA3AFA7035DE3FFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x2F, 0x82, 0x97, 0xF7, 0x05, 0x1F, 0x26, 0x4A, 0x29, 0xC9, 0x97, 0xC1, 0x78, 0x6B, 0xBF, 0xF4, + 0x8C, 0x5F, 0x38, 0x61, 0xA9, 0xE1, 0x81, 0xE6, 0x9D, 0x72, 0x3A, 0x64, 0xA1, 0xFF, 0x81, 0xEA, + 0x9F, 0x2D + }; + constexpr EncryptedSource<34> source(bytes); + // GLOBAL: gl_25319 + thread_local EncryptedName<34, 0x87E3D1C50D572DEFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x4D, 0x12, 0x7B, 0x99, 0x77, 0xF7, 0x7E, 0x9C, 0x4B, 0x59, 0x7B, 0xAF, 0x0A, 0x83, 0xE7, 0x22, + 0xEE, 0xCF, 0xD4, 0x0F, 0xDB, 0x09, 0xD9, 0x30, 0xFF, 0xE2, 0xDF, 0x0C, 0xC0, 0x57, 0x95, 0x33, + 0xE0, 0xCD, 0xBB + }; + constexpr EncryptedSource<35> source(bytes); + // GLOBAL: gl_25318 + thread_local EncryptedName<35, 0x51BB39B763BBBD8DULL> name(source); + return name.Text(); + }())); } this->AddChild(this->textViewer); diff --git a/Source/UI/Exchange/UIExchangeUI.cpp b/Source/UI/Exchange/UIExchangeUI.cpp index 60792f4ac..84d8fc41d 100644 --- a/Source/UI/Exchange/UIExchangeUI.cpp +++ b/Source/UI/Exchange/UIExchangeUI.cpp @@ -642,7 +642,7 @@ void ExchangeUI::CUIItem::Slot15(int width, int height) { this->unknown_00F0 = new CUIStaticText(); this->unknown_00F0->SetSize(100, 13); this->unknown_00F0->Move(25, 15); - this->unknown_00F0->SetText("", 0); + this->unknown_00F0->SetText(""); this->unknown_00F0->SetFitText(0); this->unknown_00F0->SetAlign(0, 6); const char nameFontSource[] = {'\x2A', '\xCE', '\xF9', '\x44', '\xFE', '\xFB'}; @@ -658,7 +658,7 @@ void ExchangeUI::CUIItem::Slot15(int width, int height) { this->unknown_00F4 = new CUIStaticText(); this->unknown_00F4->SetSize(215, 30); this->unknown_00F4->Move(45, 0); - this->unknown_00F4->SetText("", 0); + this->unknown_00F4->SetText(""); this->unknown_00F4->SetFitText(1); this->unknown_00F4->SetAlign(0, 6); const char countFontSource[] = {'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}; @@ -713,7 +713,7 @@ void CUIExchangeUI::Slot15(int width, int height) { CUIStaticText* title = new CUIStaticText(); title->SetSize(100, 17); title->Move(12, 0); - title->SetText("", 0); + title->SetText(""); title->SetFitText(0); title->SetAlign(0, 6); { @@ -735,7 +735,7 @@ void CUIExchangeUI::Slot15(int width, int height) { this->unknown_00DC = new CUIStaticText(); this->unknown_00DC->SetSize(495, 17); this->unknown_00DC->Move(62, 0); - this->unknown_00DC->SetText("", 0); + this->unknown_00DC->SetText(""); this->unknown_00DC->SetFitText(1); this->unknown_00DC->SetAlign(0, 6); { @@ -848,8 +848,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25406 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_00E8->SetText(zeny, std::strlen(zeny)); + this->unknown_00E8->SetText(zenyName.Text()); } this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(2, 6); @@ -878,8 +877,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25408 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_00EC->SetText(zeny, std::strlen(zeny)); + this->unknown_00EC->SetText(zenyName.Text()); } this->unknown_00EC->SetFitText(0); this->unknown_00EC->SetAlign(2, 6); @@ -908,8 +906,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25410 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_00F0->SetText(zeny, std::strlen(zeny)); + this->unknown_00F0->SetText(zenyName.Text()); } this->unknown_00F0->SetFitText(0); this->unknown_00F0->SetAlign(2, 6); @@ -1022,8 +1019,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25418 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_00FC->SetText(zeny, std::strlen(zeny)); + this->unknown_00FC->SetText(zenyName.Text()); } this->unknown_00FC->SetFitText(0); this->unknown_00FC->SetAlign(2, 6); @@ -1052,8 +1048,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25420 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_0100->SetText(zeny, std::strlen(zeny)); + this->unknown_0100->SetText(zenyName.Text()); } this->unknown_0100->SetFitText(0); this->unknown_0100->SetAlign(2, 6); @@ -1082,8 +1077,7 @@ void CUIExchangeUI::Slot15(int width, int height) { }; // GLOBAL: gl_25422 thread_local EncryptedName zenyName(zenySource); - const char* zeny = zenyName.Text(); - this->unknown_0104->SetText(zeny, std::strlen(zeny)); + this->unknown_0104->SetText(zenyName.Text()); } this->unknown_0104->SetFitText(0); this->unknown_0104->SetAlign(2, 6); @@ -1147,7 +1141,7 @@ void CUIExchangeUI::Slot15(int width, int height) { this->unknown_010C = new CUIStaticText(); this->unknown_010C->SetSize(135, 14); this->unknown_010C->Move(123, 356); - this->unknown_010C->SetText("", 0); + this->unknown_010C->SetText(""); this->unknown_010C->SetFitText(0); this->unknown_010C->SetAlign(0, 6); { diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 25df7396f..12a7eee69 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -41,12 +41,26 @@ #include namespace { +template +class EncryptedSource { +public: + // INLINED + constexpr explicit EncryptedSource(const std::uint8_t (&source)[Length]) : data{} { + for (std::size_t index = 0; index < Length; ++index) { + this->data[index] = static_cast(source[index]); + } + } + + char data[Length]; +}; + template class EncryptedName { public: - explicit EncryptedName(const std::uint8_t (&source)[Length]) : m_encrypted(true) { + // INLINED + explicit EncryptedName(const EncryptedSource& source) : m_encrypted(true) { for (std::uint64_t index = 0; index < Length; ++index) { - this->m_text[index] = source[index]; + this->m_text[index] = static_cast(source.data[index]); } } @@ -149,15 +163,20 @@ void GameSettingsUI::CUIGroupSkin::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(75, 13); this->m_title->Move(19, 12); - const std::uint8_t titleSource[] = {0x60, 0xEF, 0xAA, 0x1D, 0xE9}; - thread_local EncryptedName titleText(titleSource); - const char* title = titleText.Text(); - this->m_title->SetText(title, std::strlen(title)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0x60, 0xEF, 0xAA, 0x1D, 0xE9}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x79E915E9AF6F55DDULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t fontSource[] = {0x46, 0x00, 0x91, 0xB0, 0x42, 0xBD}; - thread_local EncryptedName fontText(fontSource); - this->m_title->SetFont(std::string(fontText.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x46, 0x00, 0x91, 0xB0, 0x42, 0xBD}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB7AFBD2FD9FD7501ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -168,47 +187,33 @@ void GameSettingsUI::CUIGroupSkin::Slot15(int width, int height) { this->m_combo = new CUIComboBox(); this->m_combo->Create(162, 16, 5); CUIComboBox* combo = this->m_combo; - const std::uint8_t disabledSource[] = {0x0F, 0x74, 0x11, 0xEF, 0x59, 0xE1, 0xAA, 0xDE, 0x09, 0x3F, 0x11, 0xD9, 0x24, 0x95, 0x33, 0x71, 0xAE, 0xA8, 0xB8, 0x76, 0xC6, 0x46, 0x01, 0x67, 0xAA, 0xA9, 0xB7, 0x74, 0xFA, 0x4A, 0x33, 0x67, 0xB7, 0xAF, 0xB3, 0x7A, 0xE1, 0x70, 0x0D, 0x67, 0xA1, 0x84, 0xB0, 0x3B, 0xFB, 0x42, 0x1F, 0x13}; - thread_local EncryptedName disabledImage(disabledSource); - const std::string disabledName(disabledImage.Text()); - const std::uint8_t pressedSource[] = {0xEB, 0x78, 0x89, 0xD5, 0xCF, 0x1F, 0xE6, 0xC6, 0xED, 0x33, 0x89, 0xE3, 0xB2, 0x6B, 0x7F, 0x69, 0x4A, 0xA4, 0x20, 0x4C, 0x50, 0xB8, 0x4D, 0x7F, 0x4E, 0xA5, 0x2F, 0x4E, 0x6C, 0xB4, 0x7F, 0x7F, 0x53, 0xA3, 0x2B, 0x40, 0x77, 0x8E, 0x41, 0x7F, 0x45, 0x88, 0x28, 0x01, 0x6D, 0xBC, 0x53, 0x0B}; - thread_local EncryptedName pressedImage(pressedSource); - const std::string pressedName(pressedImage.Text()); - const std::uint8_t hoverSource[] = {0x23, 0x7A, 0x93, 0x0D, 0x65, 0xC9, 0x26, 0x7E, 0x25, 0x31, 0x93, 0x3B, 0x18, 0xBD, 0xBF, 0xD1, 0x82, 0xA6, 0x3A, 0x94, 0xFA, 0x6E, 0x8D, 0xC7, 0x86, 0xA7, 0x35, 0x96, 0xC6, 0x62, 0xBF, 0xC7, 0x9B, 0xA1, 0x31, 0x98, 0xDD, 0x58, 0x81, 0xC7, 0x8D, 0x8A, 0x32, 0xD9, 0xC7, 0x6A, 0x93, 0xB3}; - thread_local EncryptedName hoverImage(hoverSource); - const std::string hoverName(hoverImage.Text()); - const std::uint8_t normalSource[] = {0x25, 0xD4, 0xF3, 0xD3, 0x8D, 0xAB, 0xE8, 0xD4, 0x23, 0x9F, 0xF3, 0xE5, 0xF0, 0xDF, 0x71, 0x7B, 0x84, 0x08, 0x5A, 0x4A, 0x12, 0x0C, 0x43, 0x6D, 0x80, 0x09, 0x55, 0x48, 0x2E, 0x00, 0x71, 0x6D, 0x9D, 0x0F, 0x51, 0x46, 0x35, 0x3A, 0x4F, 0x6D, 0x8B, 0x24, 0x52, 0x07, 0x2F, 0x08, 0x5D, 0x19}; - thread_local EncryptedName normalImage(normalSource); - const std::string normalName(normalImage.Text()); - if (combo->unknown_0088 != nullptr) { - combo->RemoveChild(combo->unknown_0088, 1); - combo->unknown_0088 = nullptr; - combo->Resize(combo->geometry.width - 18, combo->geometry.height); - } - if (combo->unknown_0088 == nullptr) { - combo->Resize(combo->geometry.width + 18, combo->geometry.height); - combo->unknown_0088 = new CUIImageButton(); - combo->unknown_0088->SetSize(18, 18); - combo->unknown_0088->Move(combo->geometry.width - 18, 0); - combo->unknown_0088->SetImages(normalName, hoverName, pressedName, disabledName); - combo->unknown_0088->SetOnClick([combo]() { - if (!g_windowMgr.CloseDropDown()) { - int x = 0; - int y = combo->geometry.height - 1; - combo->ToScreen(x, y); - g_windowMgr.ShowDropDown(combo, combo->listBox, x, y); - } - }); - combo->AddChild(combo->unknown_0088); - } - + combo->SetButton(std::string([]() { + constexpr std::uint8_t bytes[] = {0x25, 0xD4, 0xF3, 0xD3, 0x8D, 0xAB, 0xE8, 0xD4, 0x23, 0x9F, 0xF3, 0xE5, 0xF0, 0xDF, 0x71, 0x7B, 0x84, 0x08, 0x5A, 0x4A, 0x12, 0x0C, 0x43, 0x6D, 0x80, 0x09, 0x55, 0x48, 0x2E, 0x00, 0x71, 0x6D, 0x9D, 0x0F, 0x51, 0x46, 0x35, 0x3A, 0x4F, 0x6D, 0x8B, 0x24, 0x52, 0x07, 0x2F, 0x08, 0x5D, 0x19}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x192D654D29337BE5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x23, 0x7A, 0x93, 0x0D, 0x65, 0xC9, 0x26, 0x7E, 0x25, 0x31, 0x93, 0x3B, 0x18, 0xBD, 0xBF, 0xD1, 0x82, 0xA6, 0x3A, 0x94, 0xFA, 0x6E, 0x8D, 0xC7, 0x86, 0xA7, 0x35, 0x96, 0xC6, 0x62, 0xBF, 0xC7, 0x9B, 0xA1, 0x31, 0x98, 0xDD, 0x58, 0x81, 0xC7, 0x8D, 0x8A, 0x32, 0xD9, 0xC7, 0x6A, 0x93, 0xB3}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xB3E307A5F753D5E3ULL> name(source); + return name.Text(); + }()), + std::string([]() { + constexpr std::uint8_t bytes[] = {0xEB, 0x78, 0x89, 0xD5, 0xCF, 0x1F, 0xE6, 0xC6, 0xED, 0x33, 0x89, 0xE3, 0xB2, 0x6B, 0x7F, 0x69, 0x4A, 0xA4, 0x20, 0x4C, 0x50, 0xB8, 0x4D, 0x7F, 0x4E, 0xA5, 0x2F, 0x4E, 0x6C, 0xB4, 0x7F, 0x7F, 0x53, 0xA3, 0x2B, 0x40, 0x77, 0x8E, 0x41, 0x7F, 0x45, 0x88, 0x28, 0x01, 0x6D, 0xBC, 0x53, 0x0B}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x0B23D10F2F49D72BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x0F, 0x74, 0x11, 0xEF, 0x59, 0xE1, 0xAA, 0xDE, 0x09, 0x3F, 0x11, 0xD9, 0x24, 0x95, 0x33, 0x71, 0xAE, 0xA8, 0xB8, 0x76, 0xC6, 0x46, 0x01, 0x67, 0xAA, 0xA9, 0xB7, 0x74, 0xFA, 0x4A, 0x33, 0x67, 0xB7, 0xAF, 0xB3, 0x7A, 0xE1, 0x70, 0x0D, 0x67, 0xA1, 0x84, 0xB0, 0x3B, 0xFB, 0x42, 0x1F, 0x13}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x136F2F9915D1DBCFULL> name(source); + return name.Text(); + }())); combo->Move(110, 9); combo->onSelect = [this](CUIComboItem* item, const std::string& name) { this->OnSelect(item, name); }; - const std::function binder = [this](CUIComboItem* item, const std::string& name) { + combo->SetItemBinder([this](CUIComboItem* item, const std::string& name) { SetComboItemSkinText(item, name); - }; - combo->onChange = binder; - combo->listBox->SetBinder(binder); + }); this->AddChild(this->m_combo); } @@ -333,29 +338,47 @@ template void CUIComboBox::Create(int width, int itemHe this->listBox->scrollBar->step = this->itemHeight; CUIVScrollBar* scrollBar = this->listBox->scrollBar; - const std::uint8_t downSource[] = {0x21, 0x2C, 0x11, 0x17, 0xD1, 0x4F, 0x7E, 0x0C, 0x27, 0x67, 0x11, 0x21, 0xAC, 0x3B, 0xE7, 0xB2, - 0x82, 0xF1, 0xBE, 0x81, 0x7D, 0xB1, 0xDF, 0xAE, 0x96, 0xED, 0xFF, 0x8F, 0x7C, 0xF1, 0xBB}; - thread_local EncryptedName downImage(downSource); - const std::uint8_t upSource[] = {0x57, 0x66, 0x09, 0x61, 0x0D, 0x75, 0x74, 0x08, 0x51, 0x2D, 0x09, 0x57, 0x70, 0x01, 0xED, + scrollBar->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x57, 0x66, 0x09, 0x61, 0x0D, 0x75, 0x74, 0x08, 0x51, 0x2D, 0x09, 0x57, 0x70, 0x01, 0xED, 0xB6, 0xF4, 0xBB, 0xA6, 0xF7, 0xA1, 0x8B, 0xC4, 0xB5, 0xB9, 0xAB, 0xA4, 0xEB, 0xCD}; - thread_local EncryptedName upImage(upSource); - scrollBar->SetButtonImages(std::string(upImage.Text()), std::string(downImage.Text())); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0xC5B1BBCD9BC9C997ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x21, 0x2C, 0x11, 0x17, 0xD1, 0x4F, 0x7E, 0x0C, 0x27, 0x67, 0x11, 0x21, 0xAC, 0x3B, 0xE7, 0xB2, + 0x82, 0xF1, 0xBE, 0x81, 0x7D, 0xB1, 0xDF, 0xAE, 0x96, 0xED, 0xFF, 0x8F, 0x7C, 0xF1, 0xBB}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xC1BB8111EDD183E1ULL> name(source); + return name.Text(); + }())); - const std::uint8_t backgroundSource[] = {0x4B, 0x32, 0xB7, 0x77, 0x21, 0x13, 0xA2, 0xDA, 0x4D, 0x79, 0xB7, 0x41, 0x5C, 0x67, 0x3B, + scrollBar->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x4B, 0x32, 0xB7, 0x77, 0x21, 0x13, 0xA2, 0xDA, 0x4D, 0x79, 0xB7, 0x41, 0x5C, 0x67, 0x3B, 0x64, 0xE8, 0xEF, 0x18, 0xE1, 0x8D, 0xED, 0x0A, 0x7E, 0xEF, 0xB3, 0x15, 0xE0, 0x91, 0xDD}; - thread_local EncryptedName backgroundImage(backgroundSource); - scrollBar->SetBackground(std::string(backgroundImage.Text())); + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x1767DDE18D779D8BULL> name(source); + return name.Text(); + }())); - const std::uint8_t barDownSource[] = {0x75, 0x20, 0x81, 0xDF, 0xD3, 0x33, 0xEA, 0xB4, 0x73, 0x6B, 0x81, 0xE9, 0xAE, 0x47, 0x73, 0x0A, 0xD6, 0xFD, - 0x2E, 0x49, 0x7F, 0xCD, 0x4D, 0x18, 0xC7, 0xD0, 0x25, 0x4A, 0x64, 0x93, 0x01, 0x1B, 0xD8, 0xFF, 0x41}; - thread_local EncryptedName barDownImage(barDownSource); - const std::uint8_t barMidSource[] = {0x7F, 0xC6, 0x23, 0x37, 0x45, 0x49, 0x9A, 0x3C, 0x79, 0x8D, 0x23, 0x01, 0x38, 0x3D, 0x03, 0x82, 0xDC, - 0x1B, 0x8C, 0xA1, 0xE9, 0xB7, 0x3D, 0x90, 0xCD, 0x36, 0x8E, 0xA4, 0xE1, 0xA9, 0x3D, 0x9C, 0xCF, 0x69}; - thread_local EncryptedName barMidImage(barMidSource); - const std::uint8_t barUpSource[] = {0x99, 0x2A, 0x47, 0x83, 0x37, 0xE1, 0xFA, 0x2E, 0x9F, 0x61, 0x47, 0xB5, 0x4A, 0x95, 0x63, 0x90, 0x3A, + scrollBar->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x99, 0x2A, 0x47, 0x83, 0x37, 0xE1, 0xFA, 0x2E, 0x9F, 0x61, 0x47, 0xB5, 0x4A, 0x95, 0x63, 0x90, 0x3A, 0xF7, 0xE8, 0x15, 0x9B, 0x1F, 0x5D, 0x82, 0x2B, 0xDA, 0xF2, 0x09, 0xD9, 0x4D, 0x52, 0x93, 0x59}; - thread_local EncryptedName barUpImage(barUpSource); - scrollBar->SetThumbImages(std::string(barUpImage.Text()), std::string(barMidImage.Text()), std::string(barDownImage.Text())); + constexpr EncryptedSource<33> source(bytes); + thread_local EncryptedName<33, 0xE33F2FF779878559ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x7F, 0xC6, 0x23, 0x37, 0x45, 0x49, 0x9A, 0x3C, 0x79, 0x8D, 0x23, 0x01, 0x38, 0x3D, 0x03, 0x82, 0xDC, + 0x1B, 0x8C, 0xA1, 0xE9, 0xB7, 0x3D, 0x90, 0xCD, 0x36, 0x8E, 0xA4, 0xE1, 0xA9, 0x3D, 0x9C, 0xCF, 0x69}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0xF15F8785CDE369BFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x75, 0x20, 0x81, 0xDF, 0xD3, 0x33, 0xEA, 0xB4, 0x73, 0x6B, 0x81, 0xE9, 0xAE, 0x47, 0x73, 0x0A, 0xD6, 0xFD, + 0x2E, 0x49, 0x7F, 0xCD, 0x4D, 0x18, 0xC7, 0xD0, 0x25, 0x4A, 0x64, 0x93, 0x01, 0x1B, 0xD8, 0xFF, 0x41}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x792FFD1325418FB5ULL> name(source); + return name.Text(); + }())); this->listBox->AddNewItem(); } @@ -364,6 +387,13 @@ template void CUIComboBox::Create(int template void CUIComboBox::Create(int width, int itemHeight, int visibleItems); template void CUIComboBox::Create(int width, int itemHeight, int visibleItems); +// INLINED +template +void CUIComboBox::SetItemBinder(const std::function& binder) { + this->onChange = binder; + this->listBox->SetBinder(binder); +} + // INLINED template void CUIComboBox::SetButton(const std::string& normal, const std::string& hover, const std::string& pressed, const std::string& disabled) { @@ -1370,12 +1400,8 @@ void CUIGroupLogInOut::Apply() { // OFFSET: 0x00A404F0 // FUNCTION: fn_15974 void CUIGroupRodexSpam::Apply() { - RodexSpamOptionPacket packet; - packet.id = 0x0B93; - packet.option = 1; - packet.value = 1; - CRagConnection& connection = GetRagConnection(); - connection.Send(g_packetLengths.FixedLength(packet.id), &packet); + RodexSpamOptionPacket packet = {0x0B93, 1, 1}; + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } // OFFSET: 0x00A40550 @@ -1737,12 +1763,8 @@ void CUIGroupProcessPriority::OnSelect(CUIRadioButton* button) { // OFFSET: 0x00A41F30 // FUNCTION: fn_16007 void CUIGroupRodexSpam::OnSelect(CUIRadioButton* button) { - RodexSpamOptionPacket packet; - packet.id = 0x0B93; - packet.option = 1; - packet.value = button != this->m_offButton; - CRagConnection& connection = GetRagConnection(); - connection.Send(g_packetLengths.FixedLength(packet.id), &packet); + RodexSpamOptionPacket packet = {0x0B93, 1, button != this->m_offButton}; + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } // OFFSET: 0x00A42FE0 @@ -2081,15 +2103,13 @@ void SetComboItemSkinText(GameSettingsUI::CUIComboItem* item, const std::string& // OFFSET: 0x00A41C60 // FUNCTION: fn_15996 void GameSettingsUI::CUIGroupSpriteDetailLevel::Slot16() { - const char* text = LookupMessage(0x144); - this->m_title->SetText(text, std::strlen(text)); + this->m_title->SetText(LookupMessage(0x144)); } // OFFSET: 0x00A41CA0 // FUNCTION: fn_15997 void GameSettingsUI::CUIGroupTextureDetailLevel::Slot16() { - const char* text = LookupMessage(0x145); - this->m_title->SetText(text, std::strlen(text)); + this->m_title->SetText(LookupMessage(0x145)); } // OFFSET: 0x00AA2760 @@ -2230,32 +2250,24 @@ __declspec(noinline) void CUIGameSettingsUI::RefreshOption(int id) { // OFFSET: 0x00A41120 // FUNCTION: fn_15987 void GameSettingsUI::CUIGroupEmblem::Slot16() { - const char* title = LookupMessage(0x1032); - this->m_title->SetText(title, std::strlen(title)); - const char* onText = LookupMessage(0x1035); - this->m_onText->SetText(onText, std::strlen(onText)); - const char* offText = LookupMessage(0x1036); - this->m_offText->SetText(offText, std::strlen(offText)); + this->m_title->SetText(LookupMessage(0x1032)); + this->m_onText->SetText(LookupMessage(0x1035)); + this->m_offText->SetText(LookupMessage(0x1036)); } // OFFSET: 0x00A411C0 // FUNCTION: fn_15988 void GameSettingsUI::CUIGroupFullscreen::Slot16() { - const char* title = LookupMessage(0x1057); - this->m_title->SetText(title, std::strlen(title)); - const char* onText = LookupMessage(0x1058); - this->m_onText->SetText(onText, std::strlen(onText)); - const char* offText = LookupMessage(0x1059); - this->m_offText->SetText(offText, std::strlen(offText)); + this->m_title->SetText(LookupMessage(0x1057)); + this->m_onText->SetText(LookupMessage(0x1058)); + this->m_offText->SetText(LookupMessage(0x1059)); } // OFFSET: 0x00A41260 // FUNCTION: fn_15989 void GameSettingsUI::CUIGroupGraphics::Slot16() { - const char* title = LookupMessage(0xc6d); - this->m_title->SetText(title, std::strlen(title)); - const char* modeText = LookupMessage(0xc6e); - this->m_modeText->SetText(modeText, std::strlen(modeText)); + this->m_title->SetText(LookupMessage(0xc6d)); + this->m_modeText->SetText(LookupMessage(0xc6e)); GetRenderSystemHolder(); this->m_pendingAdapter = SelectedRenderAdapter(); this->m_adapter = this->m_pendingAdapter; @@ -2270,8 +2282,7 @@ void GameSettingsUI::CUIGroupGraphics::Slot16() { // OFFSET: 0x00A41510 // FUNCTION: fn_15990 void GameSettingsUI::CUIGroupGraphicsAPI::Slot16() { - const char* text = LookupMessage(0x1001); - this->m_title->SetText(text, std::strlen(text)); + this->m_title->SetText(LookupMessage(0x1001)); const int backend = GetRenderSystemHolder()->Backend(); this->m_pendingBackend = backend; this->m_backend = backend; @@ -2280,18 +2291,14 @@ void GameSettingsUI::CUIGroupGraphicsAPI::Slot16() { // OFFSET: 0x00A41710 // FUNCTION: fn_15992 void GameSettingsUI::CUIGroupProcessPriority::Slot16() { - const char* title = LookupMessage(0x1039); - this->m_title->SetText(title, std::strlen(title)); - const char* highText = LookupMessage(0x103A); - this->m_highText->SetText(highText, std::strlen(highText)); + this->m_title->SetText(LookupMessage(0x1039)); + this->m_highText->SetText(LookupMessage(0x103A)); const char* highTooltip = LookupMessage(0x103B); this->m_highText->SetTooltip(highTooltip, std::strlen(highTooltip)); - const char* normalText = LookupMessage(0x103C); - this->m_normalText->SetText(normalText, std::strlen(normalText)); + this->m_normalText->SetText(LookupMessage(0x103C)); const char* normalTooltip = LookupMessage(0x103D); this->m_normalText->SetTooltip(normalTooltip, std::strlen(normalTooltip)); - const char* idleText = LookupMessage(0x103E); - this->m_idleText->SetText(idleText, std::strlen(idleText)); + this->m_idleText->SetText(LookupMessage(0x103E)); const char* idleTooltip = LookupMessage(0x103F); this->m_idleText->SetTooltip(idleTooltip, std::strlen(idleTooltip)); } @@ -2299,23 +2306,17 @@ void GameSettingsUI::CUIGroupProcessPriority::Slot16() { // OFFSET: 0x00A41870 // FUNCTION: fn_15993 void GameSettingsUI::CUIGroupRodexSpam::Slot16() { - const char* title = LookupMessage(0xC40); - this->m_title->SetText(title, std::strlen(title)); - const char* onText = LookupMessage(0x1038); - this->m_onText->SetText(onText, std::strlen(onText)); - const char* offText = LookupMessage(0x1037); - this->m_offText->SetText(offText, std::strlen(offText)); + this->m_title->SetText(LookupMessage(0xC40)); + this->m_onText->SetText(LookupMessage(0x1038)); + this->m_offText->SetText(LookupMessage(0x1037)); } // OFFSET: 0x00A41CE0 // FUNCTION: fn_15998 void GameSettingsUI::CUIGroupTrilinear::Slot16() { - const char* title = LookupMessage(0x105A); - this->m_title->SetText(title, std::strlen(title)); - const char* onText = LookupMessage(0x1033); - this->m_onText->SetText(onText, std::strlen(onText)); - const char* offText = LookupMessage(0x1034); - this->m_offText->SetText(offText, std::strlen(offText)); + this->m_title->SetText(LookupMessage(0x105A)); + this->m_onText->SetText(LookupMessage(0x1033)); + this->m_offText->SetText(LookupMessage(0x1034)); } // OFFSET: 0x00A193A0 @@ -2361,30 +2362,25 @@ __declspec(noinline) CUIListBoxEx::CUIL // OFFSET: 0x00A41B60 // FUNCTION: fn_15995 void GameSettingsUI::CUIGroupSound::Slot16() { - const char* title = LookupMessage(0x5CD); - this->m_title->SetText(title, std::strlen(title)); - const char* bgmText = LookupMessage(0x5D7); - this->m_bgmText->SetText(bgmText, std::strlen(bgmText)); - const char* bgmOffText = LookupMessage(0x1034); - this->unknown_0090->SetText(bgmOffText, std::strlen(bgmOffText)); - const char* effectText = LookupMessage(0x5D8); - this->m_effectText->SetText(effectText, std::strlen(effectText)); - const char* effectOffText = LookupMessage(0x1034); - this->unknown_00A0->SetText(effectOffText, std::strlen(effectOffText)); + this->m_title->SetText(LookupMessage(0x5CD)); + this->m_bgmText->SetText(LookupMessage(0x5D7)); + this->unknown_0090->SetText(LookupMessage(0x1034)); + this->m_effectText->SetText(LookupMessage(0x5D8)); + this->unknown_00A0->SetText(LookupMessage(0x1034)); } // OFFSET: 0x00A41560 // FUNCTION: fn_15991 void GameSettingsUI::CUIGroupLogInOut::Slot16() { - const char* title = LookupMessage(0x107D); - this->m_title->SetText(title, std::strlen(title)); - const char* onText = LookupMessage(0x1033); - this->m_onText->SetText(onText, std::strlen(onText)); - const char* offText = LookupMessage(0x1034); - this->m_offText->SetText(offText, std::strlen(offText)); - const std::uint8_t source[] = {0x8A, 0xF1, 0x02, 0x9E, 0x0A, 0x49, 0x18, 0x76, 0xD1, 0x97, 0x42, 0x95, 0x0A, 0x27}; - thread_local EncryptedName tooltip(source); - const char* tooltipText = tooltip.Text(); + this->m_title->SetText(LookupMessage(0x107D)); + this->m_onText->SetText(LookupMessage(0x1033)); + this->m_offText->SetText(LookupMessage(0x1034)); + const char* tooltipText = []() { + constexpr std::uint8_t bytes[] = {0x8A, 0xF1, 0x02, 0x9E, 0x0A, 0x49, 0x18, 0x76, 0xD1, 0x97, 0x42, 0x95, 0x0A, 0x27}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0x03772763F96D9DA5ULL> name(source); + return name.Text(); + }(); this->m_title->SetTooltip(tooltipText, std::strlen(tooltipText)); } @@ -2397,9 +2393,12 @@ void GameSettingsUI::CUIComboItem::Slot15(int width, int height) { this->m_text->SetText("", 0); this->m_text->SetFitText(1); this->m_text->SetAlign(0, 6); - const std::uint8_t fontSource[] = {0x74, 0x16, 0x39, 0x98, 0x44, 0x35}; - thread_local EncryptedName fontText(fontSource); - this->m_text->SetFont(std::string(fontText.Text())); + this->m_text->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x74, 0x16, 0x39, 0x98, 0x44, 0x35}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x49D33529F1556333ULL> name(source); + return name.Text(); + }())); this->m_text->SetFontHeight(12); this->m_text->SetBold(0); this->m_text->SetColor(0); @@ -2426,8 +2425,7 @@ void GameSettingsUI::CUIGroupGraphics::OnModeSelect(CUIComboItem* item, const Di // OFFSET: 0x00A41910 // FUNCTION: fn_15994 void GameSettingsUI::CUIGroupSkin::Slot16() { - const char* title = LookupMessage(0x5D9); - this->m_title->SetText(title, std::strlen(title)); + this->m_title->SetText(LookupMessage(0x5D9)); this->m_combo->AddItem(std::string(LookupMessage(0xC12)), false); for (int index = 0; index < static_cast(g_skinInfo.prefixes.size()); ++index) { this->m_combo->AddItem(std::string(g_skinInfo.Name(index)), false); @@ -2438,18 +2436,30 @@ void GameSettingsUI::CUIGroupSkin::Slot16() { // OFFSET: 0x00A40560 // FUNCTION: fn_15976 void GameSettingsUI::CUIGroupSound::Apply() { - const std::uint8_t bgmVolumeSource[] = {0xCD, 0xDA, 0x82, 0xD8, 0x2B, 0xAA, 0xC1, 0x00, 0xE2, 0xD8, 0xEF}; - thread_local EncryptedName bgmVolumeName(bgmVolumeSource); - this->SetBgmVolume(g_session.GetDefaultOptionValue(bgmVolumeName.Text(), 100)); - const std::uint8_t bgmSource[] = {0x42, 0xD9, 0xF2, 0x40, 0x93}; - thread_local EncryptedName bgmName(bgmSource); - this->SetBgmEnabled(g_session.GetDefaultOptionValue(bgmName.Text(), 1) != 0); - const std::uint8_t effectVolumeSource[] = {0x8C, 0x93, 0x39, 0xEE, 0xEC, 0xA1, 0xE4, 0x75, 0xA6, 0x99, 0x2A, 0xE6, 0xEA, 0xD5}; - thread_local EncryptedName effectVolumeName(effectVolumeSource); - this->SetEffectVolume(g_session.GetDefaultOptionValue(effectVolumeName.Text(), 100)); - const std::uint8_t effectSource[] = {0xA8, 0x60, 0x04, 0x0A, 0x57, 0x6D, 0x71}; - thread_local EncryptedName effectName(effectSource); - const int effect = g_session.GetDefaultOptionValue(effectName.Text(), 1); + this->SetBgmVolume(g_session.GetDefaultOptionValue([]() { + constexpr std::uint8_t bytes[] = {0xCD, 0xDA, 0x82, 0xD8, 0x2B, 0xAA, 0xC1, 0x00, 0xE2, 0xD8, 0xEF}; + constexpr EncryptedSource<11> source(bytes); + thread_local EncryptedName<11, 0x75ADC57D87EFBD8FULL> name(source); + return name.Text(); + }(), 100)); + this->SetBgmEnabled(g_session.GetDefaultOptionValue([]() { + constexpr std::uint8_t bytes[] = {0x42, 0xD9, 0xF2, 0x40, 0x93}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xC517FB932D95BB6DULL> name(source); + return name.Text(); + }(), 1) != 0); + this->SetEffectVolume(g_session.GetDefaultOptionValue([]() { + constexpr std::uint8_t bytes[] = {0x8C, 0x93, 0x39, 0xEE, 0xEC, 0xA1, 0xE4, 0x75, 0xA6, 0x99, 0x2A, 0xE6, 0xEA, 0xD5}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0x23BBD58F8B5FF5C9ULL> name(source); + return name.Text(); + }(), 100)); + const int effect = g_session.GetDefaultOptionValue([]() { + constexpr std::uint8_t bytes[] = {0xA8, 0x60, 0x04, 0x0A, 0x57, 0x6D, 0x71}; + constexpr EncryptedSource<7> source(bytes); + thread_local EncryptedName<7, 0x0B7109397F6B1387ULL> name(source); + return name.Text(); + }(), 1); const bool muted = effect == 0; this->m_effectSlider->SetTransparent(muted); this->m_effectSlider->dragging = muted; @@ -2464,7 +2474,7 @@ inline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), // OFFSET: 0x00A19D30 // FUNCTION: fn_15347 -CUIRadioButton::CUIRadioButton() : CUICheckBox(), onSelect() { +__declspec(noinline) CUIRadioButton::CUIRadioButton() : CUICheckBox(), onSelect() { } // OFFSET: 0x00A3C390 @@ -2590,30 +2600,45 @@ void GameSettingsUI::CUIListPage::Slot15(int width, int height) { this->m_optionList->scrollBar->SetSize(13, 286); this->m_optionList->scrollBar->Move(387, 0); this->m_optionList->scrollBar->step = 26; - const std::uint8_t downSource[] = {0xB1, 0x2C, 0xAB, 0xF1, 0xD1, 0xC1, 0x98, 0xB0, 0xB7, 0x67, 0xAB, 0xC7, 0xAC, 0xB5, 0x01, 0x0E, - 0x12, 0xF1, 0x04, 0x67, 0x7D, 0x3F, 0x39, 0x12, 0x06, 0xED, 0x45, 0x69, 0x7C, 0x7F, 0x5D}; - thread_local EncryptedName downImage(downSource); - const std::string downName(downImage.Text()); - const std::uint8_t upSource[] = {0x89, 0xC2, 0xBF, 0x19, 0x07, 0xCF, 0x8C, 0xDC, 0x8F, 0x89, 0xBF, 0x2F, 0x7A, 0xBB, 0x15, + this->m_optionList->scrollBar->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x89, 0xC2, 0xBF, 0x19, 0x07, 0xCF, 0x8C, 0xDC, 0x8F, 0x89, 0xBF, 0x2F, 0x7A, 0xBB, 0x15, 0x62, 0x2A, 0x1F, 0x10, 0x8F, 0xAB, 0x31, 0x3C, 0x61, 0x67, 0x0F, 0x12, 0x93, 0xC7}; - thread_local EncryptedName upImage(upSource); - this->m_optionList->scrollBar->SetButtonImages(std::string(upImage.Text()), downName); - const std::uint8_t backgroundSource[] = {0x99, 0x28, 0xC3, 0x87, 0x95, 0x05, 0xE2, 0x16, 0x9F, 0x63, 0xC3, 0xB1, 0xE8, 0x71, 0x7B, + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x114901C7E37F6D49ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xB1, 0x2C, 0xAB, 0xF1, 0xD1, 0xC1, 0x98, 0xB0, 0xB7, 0x67, 0xAB, 0xC7, 0xAC, 0xB5, 0x01, 0x0E, + 0x12, 0xF1, 0x04, 0x67, 0x7D, 0x3F, 0x39, 0x12, 0x06, 0xED, 0x45, 0x69, 0x7C, 0x7F, 0x5D}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x7D5D0F110B6B8371ULL> name(source); + return name.Text(); + }())); + this->m_optionList->scrollBar->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x99, 0x28, 0xC3, 0x87, 0x95, 0x05, 0xE2, 0x16, 0x9F, 0x63, 0xC3, 0xB1, 0xE8, 0x71, 0x7B, 0xA8, 0x3A, 0xF5, 0x6C, 0x11, 0x39, 0xFB, 0x4A, 0xB2, 0x3D, 0xA9, 0x61, 0x10, 0x25, 0xCB}; - thread_local EncryptedName backgroundImage(backgroundSource); - this->m_optionList->scrollBar->SetBackground(std::string(backgroundImage.Text())); - const std::uint8_t bottomSource[] = {0x4D, 0x12, 0x7B, 0x99, 0x77, 0xF7, 0x7E, 0x9C, 0x4B, 0x59, 0x7B, 0xAF, 0x0A, 0x83, 0xE7, 0x22, 0xEE, 0xCF, - 0xD4, 0x0F, 0xDB, 0x09, 0xD9, 0x30, 0xFF, 0xE2, 0xDF, 0x0C, 0xC0, 0x57, 0x95, 0x33, 0xE0, 0xCD, 0xBB}; - thread_local EncryptedName bottomImage(bottomSource); - const std::string bottomName(bottomImage.Text()); - const std::uint8_t middleSource[] = {0x2F, 0x82, 0x97, 0xF7, 0x05, 0x1F, 0x26, 0x4A, 0x29, 0xC9, 0x97, 0xC1, 0x78, 0x6B, 0xBF, 0xF4, 0x8C, - 0x5F, 0x38, 0x61, 0xA9, 0xE1, 0x81, 0xE6, 0x9D, 0x72, 0x3A, 0x64, 0xA1, 0xFF, 0x81, 0xEA, 0x9F, 0x2D}; - thread_local EncryptedName middleImage(middleSource); - const std::string middleName(middleImage.Text()); - const std::uint8_t topSource[] = {0x3F, 0x4C, 0x9D, 0xF9, 0x67, 0x61, 0x66, 0xF2, 0x39, 0x07, 0x9D, 0xCF, 0x1A, 0x15, 0xFF, 0x4C, 0x9C, + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xDB27CB557D038759ULL> name(source); + return name.Text(); + }())); + this->m_optionList->scrollBar->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x3F, 0x4C, 0x9D, 0xF9, 0x67, 0x61, 0x66, 0xF2, 0x39, 0x07, 0x9D, 0xCF, 0x1A, 0x15, 0xFF, 0x4C, 0x9C, 0x91, 0x32, 0x6F, 0xCB, 0x9F, 0xC1, 0x5E, 0x8D, 0xBC, 0x28, 0x73, 0x89, 0xCD, 0xCE, 0x4F, 0xFF}; - thread_local EncryptedName topImage(topSource); - this->m_optionList->scrollBar->SetThumbImages(std::string(topImage.Text()), middleName, bottomName); + constexpr EncryptedSource<33> source(bytes); + thread_local EncryptedName<33, 0x3FA3AFA7035DE3FFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x2F, 0x82, 0x97, 0xF7, 0x05, 0x1F, 0x26, 0x4A, 0x29, 0xC9, 0x97, 0xC1, 0x78, 0x6B, 0xBF, 0xF4, 0x8C, + 0x5F, 0x38, 0x61, 0xA9, 0xE1, 0x81, 0xE6, 0x9D, 0x72, 0x3A, 0x64, 0xA1, 0xFF, 0x81, 0xEA, 0x9F, 0x2D}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0x87E3D1C50D572DEFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x4D, 0x12, 0x7B, 0x99, 0x77, 0xF7, 0x7E, 0x9C, 0x4B, 0x59, 0x7B, 0xAF, 0x0A, 0x83, 0xE7, 0x22, 0xEE, 0xCF, + 0xD4, 0x0F, 0xDB, 0x09, 0xD9, 0x30, 0xFF, 0xE2, 0xDF, 0x0C, 0xC0, 0x57, 0x95, 0x33, 0xE0, 0xCD, 0xBB}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x51BB39B763BBBD8DULL> name(source); + return name.Text(); + }())); this->m_optionList->AddNewItem(); this->AddChild(this->m_optionList); @@ -2663,15 +2688,20 @@ void GameSettingsUI::CUIGroupEmblem::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(85, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0x54, 0xFA, 0xB3, 0xDE, 0xC8, 0x1C, 0x11, 0x86, 0x3C, 0xEA, 0xC7, 0x8B, 0xD1, 0xA1}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0x54, 0xFA, 0xB3, 0xDE, 0xC8, 0x1C, 0x11, 0x86, 0x3C, 0xEA, 0xC7, 0x8B, 0xD1, 0xA1}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0x4331A17F33095FEBULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x34, 0x52, 0x21, 0x24, 0x94, 0x6F}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x34, 0x52, 0x21, 0x24, 0x94, 0x6F}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xD1056FF94D4D2773ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -2684,30 +2714,47 @@ void GameSettingsUI::CUIGroupEmblem::Slot15(int width, int height) { this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); - const std::uint8_t onButtonNormalSource[] = {0xD7, 0x76, 0xF3, 0x53, 0xB9, 0x29, 0x52, 0xC2, 0xD1, 0x3D, 0xF3, 0x65, 0xC4, 0x5D, 0xCB, 0x7D, 0x76, 0xBD, 0x5A, 0xC6, 0x1B, 0x93, 0xF9, 0x50, 0x78, 0xBF, 0x55, 0x87, 0x1B, 0x8A, 0xE7, 0x0F}; - thread_local EncryptedName onButtonNormal(onButtonNormalSource); - const std::uint8_t onButtonHoverSource[] = {0x81, 0x7E, 0x21, 0x19, 0xAB, 0x87, 0x4C, 0xFA, 0x87, 0x35, 0x21, 0x2F, 0xD6, 0xF3, 0xD5, 0x45, 0x20, 0xB5, 0x88, 0x8C, 0x09, 0x3D, 0xE7, 0x68, 0x2E, 0xBF, 0xCF, 0x81, 0x06, 0x39, 0x89}; - thread_local EncryptedName onButtonHover(onButtonHoverSource); - const std::uint8_t onButtonPressedSource[] = {0xAD, 0x14, 0x55, 0xD7, 0x53, 0x35, 0xD2, 0x08, 0xAB, 0x5F, 0x55, 0xE1, 0x2E, 0x41, 0x4B, 0xB7, 0x0C, 0xDF, 0xFC, 0x42, 0xF1, 0x8F, 0x79, 0x9A, 0x02, 0xDD, 0xF3, 0x03, 0xF1, 0x96, 0x67, 0xC5}; - thread_local EncryptedName onButtonPressed(onButtonPressedSource); - const std::uint8_t onButtonDisabledSource[] = {0x09, 0x5A, 0x9F, 0x71, 0x4F, 0x1B, 0x7E, 0xEE, 0x0F, 0x11, 0x9F, 0x47, 0x32, 0x6F, 0xE7, 0x51, 0xA8, 0x91, 0x36, 0xE4, 0xED, 0xA1, 0xD5, 0x7C, 0xA6, 0x93, 0x39, 0xA5, 0xED, 0xB8, 0xCB, 0x23}; - thread_local EncryptedName onButtonDisabled(onButtonDisabledSource); - this->m_onButton->SetImages(std::string(onButtonNormal.Text()), std::string(onButtonHover.Text()), std::string(onButtonPressed.Text()), std::string(onButtonDisabled.Text())); + this->m_onButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xD7, 0x76, 0xF3, 0x53, 0xB9, 0x29, 0x52, 0xC2, 0xD1, 0x3D, 0xF3, 0x65, 0xC4, 0x5D, 0xCB, 0x7D, 0x76, 0xBD, 0x5A, 0xC6, 0x1B, 0x93, 0xF9, 0x50, 0x78, 0xBF, 0x55, 0x87, 0x1B, 0x8A, 0xE7, 0x0F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x0F97E779A933D917ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x81, 0x7E, 0x21, 0x19, 0xAB, 0x87, 0x4C, 0xFA, 0x87, 0x35, 0x21, 0x2F, 0xD6, 0xF3, 0xD5, 0x45, 0x20, 0xB5, 0x88, 0x8C, 0x09, 0x3D, 0xE7, 0x68, 0x2E, 0xBF, 0xCF, 0x81, 0x06, 0x39, 0x89}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x3789496BE3E1D141ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xAD, 0x14, 0x55, 0xD7, 0x53, 0x35, 0xD2, 0x08, 0xAB, 0x5F, 0x55, 0xE1, 0x2E, 0x41, 0x4B, 0xB7, 0x0C, 0xDF, 0xFC, 0x42, 0xF1, 0x8F, 0x79, 0x9A, 0x02, 0xDD, 0xF3, 0x03, 0xF1, 0x96, 0x67, 0xC5}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xC517FB932D95BB6DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x09, 0x5A, 0x9F, 0x71, 0x4F, 0x1B, 0x7E, 0xEE, 0x0F, 0x11, 0x9F, 0x47, 0x32, 0x6F, 0xE7, 0x51, 0xA8, 0x91, 0x36, 0xE4, 0xED, 0xA1, 0xD5, 0x7C, 0xA6, 0x93, 0x39, 0xA5, 0xED, 0xB8, 0xCB, 0x23}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x23BBD58F8B5FF5C9ULL> name(source); + return name.Text(); + }())); this->m_onButton->checked = false; this->m_onButton->Invalidate(); this->AddChild(this->m_onButton); this->m_onText = new CUIStaticText(); this->m_onText->SetSize(50, 13); this->m_onText->Move(127, 12); - const std::uint8_t onLabelNameSource[] = {0x3D, 0xAB, 0xAB, 0xB3, 0x88, 0xEB, 0x71}; - thread_local EncryptedName onLabelName(onLabelNameSource); - const char* onLabelText = onLabelName.Text(); - this->m_onText->SetText(onLabelText, std::strlen(onLabelText)); + this->m_onText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x3D, 0xAB, 0xAB, 0xB3, 0x88, 0xEB, 0x71}; + constexpr EncryptedSource<7> source(bytes); + thread_local EncryptedName<7, 0x0B7109397F6B1387ULL> name(source); + return name.Text(); + }()); this->m_onText->SetFitText(0); this->m_onText->SetAlign(0, 0); - const std::uint8_t onLabelFontSource[] = {0xE2, 0xE8, 0x01, 0x90, 0x0E, 0x27}; - thread_local EncryptedName onLabelFont(onLabelFontSource); - this->m_onText->SetFont(std::string(onLabelFont.Text())); + this->m_onText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xE2, 0xE8, 0x01, 0x90, 0x0E, 0x27}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x03772763F96D9DA5ULL> name(source); + return name.Text(); + }())); this->m_onText->SetFontHeight(12); this->m_onText->SetBold(0); this->m_onText->SetColor(0); @@ -2720,30 +2767,47 @@ void GameSettingsUI::CUIGroupEmblem::Slot15(int width, int height) { this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); - const std::uint8_t offButtonNormalSource[] = {0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x65, 0x56, 0x23, 0xC4, 0x56, 0xDD, 0x91, 0xC7, 0x48, 0x58, 0x21, 0xCB, 0x17, 0xDD, 0x88, 0xD9, 0x17}; - thread_local EncryptedName offButtonNormal(offButtonNormalSource); - const std::uint8_t offButtonHoverSource[] = {0xA7, 0x04, 0x51, 0x5F, 0x61, 0xF1, 0x26, 0xDE, 0xA1, 0x4F, 0x51, 0x69, 0x1C, 0x85, 0xBF, 0x61, 0x06, 0xCF, 0xF8, 0xCA, 0xC3, 0x4B, 0x8D, 0x4C, 0x08, 0xC5, 0xBF, 0xC7, 0xCC, 0x4F, 0xE3}; - thread_local EncryptedName offButtonHover(offButtonHoverSource); - const std::uint8_t offButtonPressedSource[] = {0xAF, 0xD2, 0x3B, 0xD9, 0xB1, 0xC9, 0x4A, 0x00, 0xA9, 0x99, 0x3B, 0xEF, 0xCC, 0xBD, 0xD3, 0xBF, 0x0E, 0x19, 0x92, 0x4C, 0x13, 0x73, 0xE1, 0x92, 0x00, 0x1B, 0x9D, 0x0D, 0x13, 0x6A, 0xFF, 0xCD}; - thread_local EncryptedName offButtonPressed(offButtonPressedSource); - const std::uint8_t offButtonDisabledSource[] = {0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEB, 0x22, 0x4D, 0x3A, 0x48, 0xB7, 0xCB, 0x27, 0xC6, 0x2C, 0x4F, 0x35, 0x09, 0xB7, 0xD2, 0x39, 0x99}; - thread_local EncryptedName offButtonDisabled(offButtonDisabledSource); - this->m_offButton->SetImages(std::string(offButtonNormal.Text()), std::string(offButtonHover.Text()), std::string(offButtonPressed.Text()), std::string(offButtonDisabled.Text())); + this->m_offButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x65, 0x56, 0x23, 0xC4, 0x56, 0xDD, 0x91, 0xC7, 0x48, 0x58, 0x21, 0xCB, 0x17, 0xDD, 0x88, 0xD9, 0x17}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x17A9E5BF39AD4737ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xA7, 0x04, 0x51, 0x5F, 0x61, 0xF1, 0x26, 0xDE, 0xA1, 0x4F, 0x51, 0x69, 0x1C, 0x85, 0xBF, 0x61, 0x06, 0xCF, 0xF8, 0xCA, 0xC3, 0x4B, 0x8D, 0x4C, 0x08, 0xC5, 0xBF, 0xC7, 0xCC, 0x4F, 0xE3}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x13E33FA1A591AB67ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xAF, 0xD2, 0x3B, 0xD9, 0xB1, 0xC9, 0x4A, 0x00, 0xA9, 0x99, 0x3B, 0xEF, 0xCC, 0xBD, 0xD3, 0xBF, 0x0E, 0x19, 0x92, 0x4C, 0x13, 0x73, 0xE1, 0x92, 0x00, 0x1B, 0x9D, 0x0D, 0x13, 0x6A, 0xFF, 0xCD}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xCD8F077123FB7D6FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEB, 0x22, 0x4D, 0x3A, 0x48, 0xB7, 0xCB, 0x27, 0xC6, 0x2C, 0x4F, 0x35, 0x09, 0xB7, 0xD2, 0x39, 0x99}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x9949BFD527532943ULL> name(source); + return name.Text(); + }())); this->m_offButton->checked = false; this->m_offButton->Invalidate(); this->AddChild(this->m_offButton); this->m_offText = new CUIStaticText(); this->m_offText->SetSize(100, 13); this->m_offText->Move(222, 12); - const std::uint8_t offLabelNameSource[] = {0xED, 0x70, 0x7C, 0xE3, 0x0A, 0xDF, 0x41}; - thread_local EncryptedName offLabelName(offLabelNameSource); - const char* offLabelText = offLabelName.Text(); - this->m_offText->SetText(offLabelText, std::strlen(offLabelText)); + this->m_offText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xED, 0x70, 0x7C, 0xE3, 0x0A, 0xDF, 0x41}; + constexpr EncryptedSource<7> source(bytes); + thread_local EncryptedName<7, 0xD1413DBB01CD8B51ULL> name(source); + return name.Text(); + }()); this->m_offText->SetFitText(0); this->m_offText->SetAlign(0, 0); - const std::uint8_t offLabelFontSource[] = {0x2E, 0x6A, 0x1B, 0x3C, 0xF0, 0x95}; - thread_local EncryptedName offLabelFont(offLabelFontSource); - this->m_offText->SetFont(std::string(offLabelFont.Text())); + this->m_offText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2E, 0x6A, 0x1B, 0x3C, 0xF0, 0x95}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x637B959D55771F69ULL> name(source); + return name.Text(); + }())); this->m_offText->SetFontHeight(12); this->m_offText->SetBold(0); this->m_offText->SetColor(0); @@ -2758,15 +2822,20 @@ void GameSettingsUI::CUIGroupFullscreen::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xC3, 0x18, 0x31, 0xFC, 0x29, 0x0F, 0x69, 0x76, 0xEE, 0xB5}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xC3, 0x18, 0x31, 0xFC, 0x29, 0x0F, 0x69, 0x76, 0xEE, 0xB5}; + constexpr EncryptedSource<10> source(bytes); + thread_local EncryptedName<10, 0xC399B7091589B50BULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x28, 0xD8, 0x4D, 0x80, 0x52, 0x07}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x28, 0xD8, 0x4D, 0x80, 0x52, 0x07}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB739073FE921AD6FULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -2779,30 +2848,47 @@ void GameSettingsUI::CUIGroupFullscreen::Slot15(int width, int height) { this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { OnFullscreenOptionChanged(reinterpret_cast(button)); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); - const std::uint8_t onButtonNormalSource[] = {0x8F, 0xE4, 0x73, 0x75, 0xED, 0xDB, 0x84, 0x4A, 0x89, 0xAF, 0x73, 0x43, 0x90, 0xAF, 0x1D, 0xF5, 0x2E, 0x2F, 0xDA, 0xE0, 0x4F, 0x61, 0x2F, 0xD8, 0x20, 0x2D, 0xD5, 0xA1, 0x4F, 0x78, 0x31, 0x87}; - thread_local EncryptedName onButtonNormal(onButtonNormalSource); - const std::uint8_t onButtonHoverSource[] = {0xC7, 0x14, 0x29, 0xB7, 0x39, 0x83, 0x98, 0x58, 0xC1, 0x5F, 0x29, 0x81, 0x44, 0xF7, 0x01, 0xE7, 0x66, 0xDF, 0x80, 0x22, 0x9B, 0x39, 0x33, 0xCA, 0x68, 0xD5, 0xC7, 0x2F, 0x94, 0x3D, 0x5D}; - thread_local EncryptedName onButtonHover(onButtonHoverSource); - const std::uint8_t onButtonPressedSource[] = {0xD7, 0x56, 0x8F, 0x43, 0x3B, 0x7B, 0xEA, 0x08, 0xD1, 0x1D, 0x8F, 0x75, 0x46, 0x0F, 0x73, 0xB7, 0x76, 0x9D, 0x26, 0xD6, 0x99, 0xC1, 0x41, 0x9A, 0x78, 0x9F, 0x29, 0x97, 0x99, 0xD8, 0x5F, 0xC5}; - thread_local EncryptedName onButtonPressed(onButtonPressedSource); - const std::uint8_t onButtonDisabledSource[] = {0x05, 0x62, 0x47, 0x0F, 0x61, 0x6D, 0x22, 0x5E, 0x03, 0x29, 0x47, 0x39, 0x1C, 0x19, 0xBB, 0xE1, 0xA4, 0xA9, 0xEE, 0x9A, 0xC3, 0xD7, 0x89, 0xCC, 0xAA, 0xAB, 0xE1, 0xDB, 0xC3, 0xCE, 0x97, 0x93}; - thread_local EncryptedName onButtonDisabled(onButtonDisabledSource); - this->m_onButton->SetImages(std::string(onButtonNormal.Text()), std::string(onButtonHover.Text()), std::string(onButtonPressed.Text()), std::string(onButtonDisabled.Text())); + this->m_onButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x8F, 0xE4, 0x73, 0x75, 0xED, 0xDB, 0x84, 0x4A, 0x89, 0xAF, 0x73, 0x43, 0x90, 0xAF, 0x1D, 0xF5, 0x2E, 0x2F, 0xDA, 0xE0, 0x4F, 0x61, 0x2F, 0xD8, 0x20, 0x2D, 0xD5, 0xA1, 0x4F, 0x78, 0x31, 0x87}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x8741152D8FB34B4FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xC7, 0x14, 0x29, 0xB7, 0x39, 0x83, 0x98, 0x58, 0xC1, 0x5F, 0x29, 0x81, 0x44, 0xF7, 0x01, 0xE7, 0x66, 0xDF, 0x80, 0x22, 0x9B, 0x39, 0x33, 0xCA, 0x68, 0xD5, 0xC7, 0x2F, 0x94, 0x3D, 0x5D}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x955D4DF94DE9BB07ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xD7, 0x56, 0x8F, 0x43, 0x3B, 0x7B, 0xEA, 0x08, 0xD1, 0x1D, 0x8F, 0x75, 0x46, 0x0F, 0x73, 0xB7, 0x76, 0x9D, 0x26, 0xD6, 0x99, 0xC1, 0x41, 0x9A, 0x78, 0x9F, 0x29, 0x97, 0x99, 0xD8, 0x5F, 0xC5}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xC52FB5FBB94FF917ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x05, 0x62, 0x47, 0x0F, 0x61, 0x6D, 0x22, 0x5E, 0x03, 0x29, 0x47, 0x39, 0x1C, 0x19, 0xBB, 0xE1, 0xA4, 0xA9, 0xEE, 0x9A, 0xC3, 0xD7, 0x89, 0xCC, 0xAA, 0xAB, 0xE1, 0xDB, 0xC3, 0xCE, 0x97, 0x93}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x93E7A3A1F587CDC5ULL> name(source); + return name.Text(); + }())); this->m_onButton->checked = false; this->m_onButton->Invalidate(); this->AddChild(this->m_onButton); this->m_onText = new CUIStaticText(); this->m_onText->SetSize(150, 13); this->m_onText->Move(167, 12); - const std::uint8_t onLabelNameSource[] = {0xE7, 0xFD, 0xC4, 0xD1, 0xCB, 0x68, 0x4B, 0xC6, 0x07, 0xB9, 0xF7, 0xD8, 0xE6, 0xC5}; - thread_local EncryptedName onLabelName(onLabelNameSource); - const char* onLabelText = onLabelName.Text(); - this->m_onText->SetText(onLabelText, std::strlen(onLabelText)); + this->m_onText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xE7, 0xFD, 0xC4, 0xD1, 0xCB, 0x68, 0x4B, 0xC6, 0x07, 0xB9, 0xF7, 0xD8, 0xE6, 0xC5}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0x2FF3C5036D070127ULL> name(source); + return name.Text(); + }()); this->m_onText->SetFitText(0); this->m_onText->SetAlign(0, 0); - const std::uint8_t onLabelFontSource[] = {0xF4, 0x12, 0xAF, 0x3A, 0x94, 0x9B}; - thread_local EncryptedName onLabelFont(onLabelFontSource); - this->m_onText->SetFont(std::string(onLabelFont.Text())); + this->m_onText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xF4, 0x12, 0xAF, 0x3A, 0x94, 0x9B}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x17359BF953C367B3ULL> name(source); + return name.Text(); + }())); this->m_onText->SetFontHeight(12); this->m_onText->SetBold(0); this->m_onText->SetColor(0); @@ -2815,30 +2901,47 @@ void GameSettingsUI::CUIGroupFullscreen::Slot15(int width, int height) { this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { OnFullscreenOptionChanged(reinterpret_cast(button)); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); - const std::uint8_t offButtonNormalSource[] = {0x95, 0x52, 0x75, 0x21, 0x07, 0x7F, 0xB0, 0xFE, 0x93, 0x19, 0x75, 0x17, 0x7A, 0x0B, 0x29, 0x41, 0x34, 0x99, 0xDC, 0xB4, 0xA5, 0xC5, 0x1B, 0x6C, 0x3A, 0x9B, 0xD3, 0xF5, 0xA5, 0xDC, 0x05, 0x33}; - thread_local EncryptedName offButtonNormal(offButtonNormalSource); - const std::uint8_t offButtonHoverSource[] = {0xDF, 0x9E, 0x0D, 0x1D, 0x2D, 0xBB, 0xA8, 0xD0, 0xD9, 0xD5, 0x0D, 0x2B, 0x50, 0xCF, 0x31, 0x6F, 0x7E, 0x55, 0xA4, 0x88, 0x8F, 0x01, 0x03, 0x42, 0x70, 0x5F, 0xE3, 0x85, 0x80, 0x05, 0x6D}; - thread_local EncryptedName offButtonHover(offButtonHoverSource); - const std::uint8_t offButtonPressedSource[] = {0x61, 0x92, 0x5F, 0x2D, 0xA3, 0x41, 0xE2, 0x94, 0x67, 0xD9, 0x5F, 0x1B, 0xDE, 0x35, 0x7B, 0x2B, 0xC0, 0x59, 0xF6, 0xB8, 0x01, 0xFB, 0x49, 0x06, 0xCE, 0x5B, 0xF9, 0xF9, 0x01, 0xE2, 0x57, 0x59}; - thread_local EncryptedName offButtonPressed(offButtonPressedSource); - const std::uint8_t offButtonDisabledSource[] = {0x77, 0xA8, 0x97, 0x37, 0xEB, 0x29, 0xEE, 0x4C, 0x71, 0xE3, 0x97, 0x01, 0x96, 0x5D, 0x77, 0xF3, 0xD6, 0x63, 0x3E, 0xA2, 0x49, 0x93, 0x45, 0xDE, 0xD8, 0x61, 0x31, 0xE3, 0x49, 0x8A, 0x5B, 0x81}; - thread_local EncryptedName offButtonDisabled(offButtonDisabledSource); - this->m_offButton->SetImages(std::string(offButtonNormal.Text()), std::string(offButtonHover.Text()), std::string(offButtonPressed.Text()), std::string(offButtonDisabled.Text())); + this->m_offButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x95, 0x52, 0x75, 0x21, 0x07, 0x7F, 0xB0, 0xFE, 0x93, 0x19, 0x75, 0x17, 0x7A, 0x0B, 0x29, 0x41, 0x34, 0x99, 0xDC, 0xB4, 0xA5, 0xC5, 0x1B, 0x6C, 0x3A, 0x9B, 0xD3, 0xF5, 0xA5, 0xDC, 0x05, 0x33}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x3375B1C7DBB5FD55ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xDF, 0x9E, 0x0D, 0x1D, 0x2D, 0xBB, 0xA8, 0xD0, 0xD9, 0xD5, 0x0D, 0x2B, 0x50, 0xCF, 0x31, 0x6F, 0x7E, 0x55, 0xA4, 0x88, 0x8F, 0x01, 0x03, 0x42, 0x70, 0x5F, 0xE3, 0x85, 0x80, 0x05, 0x6D}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x1D6D75EDE7CD311FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x61, 0x92, 0x5F, 0x2D, 0xA3, 0x41, 0xE2, 0x94, 0x67, 0xD9, 0x5F, 0x1B, 0xDE, 0x35, 0x7B, 0x2B, 0xC0, 0x59, 0xF6, 0xB8, 0x01, 0xFB, 0x49, 0x06, 0xCE, 0x5B, 0xF9, 0xF9, 0x01, 0xE2, 0x57, 0x59}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x59278F63D79F3DA1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x77, 0xA8, 0x97, 0x37, 0xEB, 0x29, 0xEE, 0x4C, 0x71, 0xE3, 0x97, 0x01, 0x96, 0x5D, 0x77, 0xF3, 0xD6, 0x63, 0x3E, 0xA2, 0x49, 0x93, 0x45, 0xDE, 0xD8, 0x61, 0x31, 0xE3, 0x49, 0x8A, 0x5B, 0x81}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x812BE72BCD5707B7ULL> name(source); + return name.Text(); + }())); this->m_offButton->checked = false; this->m_offButton->Invalidate(); this->AddChild(this->m_offButton); this->m_offText = new CUIStaticText(); this->m_offText->SetSize(100, 13); this->m_offText->Move(287, 12); - const std::uint8_t offLabelNameSource[] = {0xCA, 0x0B, 0x8F, 0xF2, 0x61, 0xB4, 0x55, 0x6B, 0xF9, 0x1C, 0xA2, 0x5F}; - thread_local EncryptedName offLabelName(offLabelNameSource); - const char* offLabelText = offLabelName.Text(); - this->m_offText->SetText(offLabelText, std::strlen(offLabelText)); + this->m_offText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xCA, 0x0B, 0x8F, 0xF2, 0x61, 0xB4, 0x55, 0x6B, 0xF9, 0x1C, 0xA2, 0x5F}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0xD3755DD95F47A909ULL> name(source); + return name.Text(); + }()); this->m_offText->SetFitText(0); this->m_offText->SetAlign(0, 0); - const std::uint8_t offLabelFontSource[] = {0x2A, 0x96, 0x29, 0xCA, 0x80, 0xC1}; - thread_local EncryptedName offLabelFont(offLabelFontSource); - this->m_offText->SetFont(std::string(offLabelFont.Text())); + this->m_offText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2A, 0x96, 0x29, 0xCA, 0x80, 0xC1}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x31D7C1EDA345E36DULL> name(source); + return name.Text(); + }())); this->m_offText->SetFontHeight(12); this->m_offText->SetBold(0); this->m_offText->SetColor(0); @@ -2853,15 +2956,20 @@ void GameSettingsUI::CUIGroupGraphics::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleTextSource[] = {0x92, 0x54, 0x6C, 0x22, 0x86, 0x75, 0x1F, 0x0B, 0xC6, 0x47, 0x7A, 0xA3, 0xFD, 0x0E, 0xFE, 0x6F, 0x23}; - thread_local EncryptedName titleText(titleTextSource); - const char* titleTextValue = titleText.Text(); - this->m_title->SetText(titleTextValue, std::strlen(titleTextValue)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0x92, 0x54, 0x6C, 0x22, 0x86, 0x75, 0x1F, 0x0B, 0xC6, 0x47, 0x7A, 0xA3, 0xFD, 0x0E, 0xFE, 0x6F, 0x23}; + constexpr EncryptedSource<17> source(bytes); + thread_local EncryptedName<17, 0xCB3FBD4183DB8323ULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x0A, 0xA4, 0xA7, 0xAE, 0x94, 0x77}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x0A, 0xA4, 0xA7, 0xAE, 0x94, 0x77}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x7FCD77F9C7CBD14DULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -2871,16 +2979,28 @@ void GameSettingsUI::CUIGroupGraphics::Slot15(int width, int height) { this->m_adapterCombo = new CUIComboBox(); this->m_adapterCombo->Create(162, 16, 5); - const std::uint8_t adapterDisabledSource[] = {0xAD, 0xF0, 0x39, 0xC9, 0x23, 0xB5, 0x90, 0xF2, 0xAB, 0xBB, 0x39, 0xFF, 0x5E, 0xC1, 0x09, 0x5D, 0x0C, 0x2C, 0x90, 0x50, 0xBC, 0x12, 0x3B, 0x4B, 0x08, 0x2D, 0x9F, 0x52, 0x80, 0x1E, 0x09, 0x4B, 0x15, 0x2B, 0x9B, 0x5C, 0x9B, 0x24, 0x37, 0x4B, 0x03, 0x00, 0x98, 0x1D, 0x81, 0x16, 0x25, 0x3F}; - thread_local EncryptedName adapterDisabled(adapterDisabledSource); - const std::uint8_t adapterPressedSource[] = {0x97, 0x2C, 0x29, 0x2F, 0x41, 0x0B, 0x88, 0x8A, 0x91, 0x67, 0x29, 0x19, 0x3C, 0x7F, 0x11, 0x25, 0x36, 0xF0, 0x80, 0xB6, 0xDE, 0xAC, 0x23, 0x33, 0x32, 0xF1, 0x8F, 0xB4, 0xE2, 0xA0, 0x11, 0x33, 0x2F, 0xF7, 0x8B, 0xBA, 0xF9, 0x9A, 0x2F, 0x33, 0x39, 0xDC, 0x88, 0xFB, 0xE3, 0xA8, 0x3D, 0x47}; - thread_local EncryptedName adapterPressed(adapterPressedSource); - const std::uint8_t adapterHoverSource[] = {0xD9, 0xC2, 0x0F, 0x05, 0x9D, 0xCF, 0x04, 0xB2, 0xDF, 0x89, 0x0F, 0x33, 0xE0, 0xBB, 0x9D, 0x1D, 0x78, 0x1E, 0xA6, 0x9C, 0x02, 0x68, 0xAF, 0x0B, 0x7C, 0x1F, 0xA9, 0x9E, 0x3E, 0x64, 0x9D, 0x0B, 0x61, 0x19, 0xAD, 0x90, 0x25, 0x5E, 0xA3, 0x0B, 0x77, 0x32, 0xAE, 0xD1, 0x3F, 0x6C, 0xB1, 0x7F}; - thread_local EncryptedName adapterHover(adapterHoverSource); - const std::uint8_t adapterNormalSource[] = {0xF9, 0x4E, 0x69, 0x15, 0x21, 0x69, 0x96, 0xCA, 0xFF, 0x05, 0x69, 0x23, 0x5C, 0x1D, 0x0F, 0x65, 0x58, 0x92, 0xC0, 0x8C, 0xBE, 0xCE, 0x3D, 0x73, 0x5C, 0x93, 0xCF, 0x8E, 0x82, 0xC2, 0x0F, 0x73, 0x41, 0x95, 0xCB, 0x80, 0x99, 0xF8, 0x31, 0x73, 0x57, 0xBE, 0xC8, 0xC1, 0x83, 0xCA, 0x23, 0x07}; - thread_local EncryptedName adapterNormal(adapterNormalSource); - this->m_adapterCombo->SetButton(std::string(adapterNormal.Text()), std::string(adapterHover.Text()), - std::string(adapterPressed.Text()), std::string(adapterDisabled.Text())); + this->m_adapterCombo->SetButton(std::string([]() { + constexpr std::uint8_t bytes[] = {0xF9, 0x4E, 0x69, 0x15, 0x21, 0x69, 0x96, 0xCA, 0xFF, 0x05, 0x69, 0x23, 0x5C, 0x1D, 0x0F, 0x65, 0x58, 0x92, 0xC0, 0x8C, 0xBE, 0xCE, 0x3D, 0x73, 0x5C, 0x93, 0xCF, 0x8E, 0x82, 0xC2, 0x0F, 0x73, 0x41, 0x95, 0xCB, 0x80, 0x99, 0xF8, 0x31, 0x73, 0x57, 0xBE, 0xC8, 0xC1, 0x83, 0xCA, 0x23, 0x07}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x0753A7E1EFA9E139ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xD9, 0xC2, 0x0F, 0x05, 0x9D, 0xCF, 0x04, 0xB2, 0xDF, 0x89, 0x0F, 0x33, 0xE0, 0xBB, 0x9D, 0x1D, 0x78, 0x1E, 0xA6, 0x9C, 0x02, 0x68, 0xAF, 0x0B, 0x7C, 0x1F, 0xA9, 0x9E, 0x3E, 0x64, 0x9D, 0x0B, 0x61, 0x19, 0xAD, 0x90, 0x25, 0x5E, 0xA3, 0x0B, 0x77, 0x32, 0xAE, 0xD1, 0x3F, 0x6C, 0xB1, 0x7F}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x7FC1015DFFCF6D19ULL> name(source); + return name.Text(); + }()), + std::string([]() { + constexpr std::uint8_t bytes[] = {0x97, 0x2C, 0x29, 0x2F, 0x41, 0x0B, 0x88, 0x8A, 0x91, 0x67, 0x29, 0x19, 0x3C, 0x7F, 0x11, 0x25, 0x36, 0xF0, 0x80, 0xB6, 0xDE, 0xAC, 0x23, 0x33, 0x32, 0xF1, 0x8F, 0xB4, 0xE2, 0xA0, 0x11, 0x33, 0x2F, 0xF7, 0x8B, 0xBA, 0xF9, 0x9A, 0x2F, 0x33, 0x39, 0xDC, 0x88, 0xFB, 0xE3, 0xA8, 0x3D, 0x47}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x474DC581D5E98357ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xAD, 0xF0, 0x39, 0xC9, 0x23, 0xB5, 0x90, 0xF2, 0xAB, 0xBB, 0x39, 0xFF, 0x5E, 0xC1, 0x09, 0x5D, 0x0C, 0x2C, 0x90, 0x50, 0xBC, 0x12, 0x3B, 0x4B, 0x08, 0x2D, 0x9F, 0x52, 0x80, 0x1E, 0x09, 0x4B, 0x15, 0x2B, 0x9B, 0x5C, 0x9B, 0x24, 0x37, 0x4B, 0x03, 0x00, 0x98, 0x1D, 0x81, 0x16, 0x25, 0x3F}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x3F557BE333F95F6DULL> name(source); + return name.Text(); + }())); this->m_adapterCombo->Move(150, 9); this->m_adapterCombo->onSelect = [this](CUIComboItem* item, const RenderAdapter& adapter) { this->OnAdapterSelect(item, adapter); }; const std::function adapterBinder = [this](CUIComboItem* item, const RenderAdapter& adapter) { @@ -2893,15 +3013,20 @@ void GameSettingsUI::CUIGroupGraphics::Slot15(int width, int height) { this->m_modeText = new CUIStaticText(); this->m_modeText->SetSize(130, 13); this->m_modeText->Move(19, 44); - const std::uint8_t modeTextSource[] = {0xAA, 0xDA, 0x8E, 0xA8, 0x68, 0x81, 0xAF, 0x9C, 0xC3, 0xB6, 0xCA, 0xBC, 0x1A, 0x69, 0x33, 0xE8, 0xDA, 0xA9, 0x39}; - thread_local EncryptedName modeText(modeTextSource); - const char* modeTextValue = modeText.Text(); - this->m_modeText->SetText(modeTextValue, std::strlen(modeTextValue)); + this->m_modeText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xAA, 0xDA, 0x8E, 0xA8, 0x68, 0x81, 0xAF, 0x9C, 0xC3, 0xB6, 0xCA, 0xBC, 0x1A, 0x69, 0x33, 0xE8, 0xDA, 0xA9, 0x39}; + constexpr EncryptedSource<19> source(bytes); + thread_local EncryptedName<19, 0x5B8F49AF09390D1BULL> name(source); + return name.Text(); + }()); this->m_modeText->SetFitText(0); this->m_modeText->SetAlign(0, 0); - const std::uint8_t modeFontSource[] = {0xA8, 0x56, 0xB9, 0x86, 0x74, 0x51}; - thread_local EncryptedName modeFont(modeFontSource); - this->m_modeText->SetFont(std::string(modeFont.Text())); + this->m_modeText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xA8, 0x56, 0xB9, 0x86, 0x74, 0x51}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x3B915119EFD523EFULL> name(source); + return name.Text(); + }())); this->m_modeText->SetFontHeight(12); this->m_modeText->SetBold(1); this->m_modeText->SetColor(0); @@ -2911,16 +3036,28 @@ void GameSettingsUI::CUIGroupGraphics::Slot15(int width, int height) { this->m_modeCombo = new CUIComboBox(); this->m_modeCombo->Create(162, 16, 5); - const std::uint8_t modeDisabledSource[] = {0x1F, 0x76, 0x9D, 0x93, 0xD3, 0x5D, 0x3A, 0xCC, 0x19, 0x3D, 0x9D, 0xA5, 0xAE, 0x29, 0xA3, 0x63, 0xBE, 0xAA, 0x34, 0x0A, 0x4C, 0xFA, 0x91, 0x75, 0xBA, 0xAB, 0x3B, 0x08, 0x70, 0xF6, 0xA3, 0x75, 0xA7, 0xAD, 0x3F, 0x06, 0x6B, 0xCC, 0x9D, 0x75, 0xB1, 0x86, 0x3C, 0x47, 0x71, 0xFE, 0x8F, 0x01}; - thread_local EncryptedName modeDisabled(modeDisabledSource); - const std::uint8_t modePressedSource[] = {0x3D, 0x52, 0xBD, 0x09, 0x21, 0xDB, 0x3C, 0xD6, 0x3B, 0x19, 0xBD, 0x3F, 0x5C, 0xAF, 0xA5, 0x79, 0x9C, 0x8E, 0x14, 0x90, 0xBE, 0x7C, 0x97, 0x6F, 0x98, 0x8F, 0x1B, 0x92, 0x82, 0x70, 0xA5, 0x6F, 0x85, 0x89, 0x1F, 0x9C, 0x99, 0x4A, 0x9B, 0x6F, 0x93, 0xA2, 0x1C, 0xDD, 0x83, 0x78, 0x89, 0x1B}; - thread_local EncryptedName modePressed(modePressedSource); - const std::uint8_t modeHoverSource[] = {0x01, 0x7C, 0x1B, 0x8D, 0x5B, 0xBB, 0x06, 0x84, 0x07, 0x37, 0x1B, 0xBB, 0x26, 0xCF, 0x9F, 0x2B, 0xA0, 0xA0, 0xB2, 0x14, 0xC4, 0x1C, 0xAD, 0x3D, 0xA4, 0xA1, 0xBD, 0x16, 0xF8, 0x10, 0x9F, 0x3D, 0xB9, 0xA7, 0xB9, 0x18, 0xE3, 0x2A, 0xA1, 0x3D, 0xAF, 0x8C, 0xBA, 0x59, 0xF9, 0x18, 0xB3, 0x49}; - thread_local EncryptedName modeHover(modeHoverSource); - const std::uint8_t modeNormalSource[] = {0x5B, 0x02, 0xB5, 0x35, 0x11, 0xF3, 0x28, 0xA0, 0x5D, 0x49, 0xB5, 0x03, 0x6C, 0x87, 0xB1, 0x0F, 0xFA, 0xDE, 0x1C, 0xAC, 0x8E, 0x54, 0x83, 0x19, 0xFE, 0xDF, 0x13, 0xAE, 0xB2, 0x58, 0xB1, 0x19, 0xE3, 0xD9, 0x17, 0xA0, 0xA9, 0x62, 0x8F, 0x19, 0xF5, 0xF2, 0x14, 0xE1, 0xB3, 0x50, 0x9D, 0x6D}; - thread_local EncryptedName modeNormal(modeNormalSource); - this->m_modeCombo->SetButton(std::string(modeNormal.Text()), std::string(modeHover.Text()), - std::string(modePressed.Text()), std::string(modeDisabled.Text())); + this->m_modeCombo->SetButton(std::string([]() { + constexpr std::uint8_t bytes[] = {0x5B, 0x02, 0xB5, 0x35, 0x11, 0xF3, 0x28, 0xA0, 0x5D, 0x49, 0xB5, 0x03, 0x6C, 0x87, 0xB1, 0x0F, 0xFA, 0xDE, 0x1C, 0xAC, 0x8E, 0x54, 0x83, 0x19, 0xFE, 0xDF, 0x13, 0xAE, 0xB2, 0x58, 0xB1, 0x19, 0xE3, 0xD9, 0x17, 0xA0, 0xA9, 0x62, 0x8F, 0x19, 0xF5, 0xF2, 0x14, 0xE1, 0xB3, 0x50, 0x9D, 0x6D}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x6DED3DD1CF75AD9BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x01, 0x7C, 0x1B, 0x8D, 0x5B, 0xBB, 0x06, 0x84, 0x07, 0x37, 0x1B, 0xBB, 0x26, 0xCF, 0x9F, 0x2B, 0xA0, 0xA0, 0xB2, 0x14, 0xC4, 0x1C, 0xAD, 0x3D, 0xA4, 0xA1, 0xBD, 0x16, 0xF8, 0x10, 0x9F, 0x3D, 0xB9, 0xA7, 0xB9, 0x18, 0xE3, 0x2A, 0xA1, 0x3D, 0xAF, 0x8C, 0xBA, 0x59, 0xF9, 0x18, 0xB3, 0x49}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x49C3759B77DBD3C1ULL> name(source); + return name.Text(); + }()), + std::string([]() { + constexpr std::uint8_t bytes[] = {0x3D, 0x52, 0xBD, 0x09, 0x21, 0xDB, 0x3C, 0xD6, 0x3B, 0x19, 0xBD, 0x3F, 0x5C, 0xAF, 0xA5, 0x79, 0x9C, 0x8E, 0x14, 0x90, 0xBE, 0x7C, 0x97, 0x6F, 0x98, 0x8F, 0x1B, 0x92, 0x82, 0x70, 0xA5, 0x6F, 0x85, 0x89, 0x1F, 0x9C, 0x99, 0x4A, 0x9B, 0x6F, 0x93, 0xA2, 0x1C, 0xDD, 0x83, 0x78, 0x89, 0x1B}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x1BF915E1F37DFDFDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x1F, 0x76, 0x9D, 0x93, 0xD3, 0x5D, 0x3A, 0xCC, 0x19, 0x3D, 0x9D, 0xA5, 0xAE, 0x29, 0xA3, 0x63, 0xBE, 0xAA, 0x34, 0x0A, 0x4C, 0xFA, 0x91, 0x75, 0xBA, 0xAB, 0x3B, 0x08, 0x70, 0xF6, 0xA3, 0x75, 0xA7, 0xAD, 0x3F, 0x06, 0x6B, 0xCC, 0x9D, 0x75, 0xB1, 0x86, 0x3C, 0x47, 0x71, 0xFE, 0x8F, 0x01}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x01FF9313695DD9DFULL> name(source); + return name.Text(); + }())); this->m_modeCombo->Move(150, 41); this->m_modeCombo->onSelect = [this](CUIComboItem* item, const DisplayMode& mode) { this->OnModeSelect(item, mode); }; const std::function modeBinder = [this](CUIComboItem* item, const DisplayMode& mode) { @@ -2937,15 +3074,20 @@ void GameSettingsUI::CUIGroupGraphicsAPI::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleSource[] = {0xEE, 0xE2, 0x18, 0x34, 0x5A, 0x41, 0xD3, 0x8E, 0x0F, 0x7C, 0xAF}; - thread_local EncryptedName titleText(titleSource); - const char* title = titleText.Text(); - this->m_title->SetText(title, std::strlen(title)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xEE, 0xE2, 0x18, 0x34, 0x5A, 0x41, 0xD3, 0x8E, 0x0F, 0x7C, 0xAF}; + constexpr EncryptedSource<11> source(bytes); + thread_local EncryptedName<11, 0xCFF3899D95AF355FULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t fontSource[] = {0x62, 0x04, 0xC3, 0xA2, 0x60, 0xF3}; - thread_local EncryptedName fontText(fontSource); - this->m_title->SetFont(std::string(fontText.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x62, 0x04, 0xC3, 0xA2, 0x60, 0xF3}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xE52DF30DCBAF7125ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -2955,23 +3097,33 @@ void GameSettingsUI::CUIGroupGraphicsAPI::Slot15(int width, int height) { this->m_combo = new CUIComboBox(); this->m_combo->Create(162, 16, 5); - const std::uint8_t disabledSource[] = {0x37, 0xBC, 0xEB, 0x55, 0x31, 0xC1, 0xD8, 0x40, 0x31, 0xF7, 0xEB, 0x63, 0x4C, 0xB5, 0x41, 0xEF, 0x96, 0x60, 0x42, 0xCC, 0xAE, 0x66, 0x73, 0xF9, 0x92, 0x61, 0x4D, 0xCE, 0x92, 0x6A, 0x41, 0xF9, 0x8F, 0x67, 0x49, 0xC0, 0x89, 0x50, 0x7F, 0xF9, 0x99, 0x4C, 0x4A, 0x81, 0x93, 0x62, 0x6D, 0x8D}; - thread_local EncryptedName disabledImage(disabledSource); - const std::uint8_t pressedSource[] = {0x4D, 0x14, 0x0F, 0x81, 0x51, 0x69, 0x5A, 0x7E, 0x4B, 0x5F, 0x0F, 0xB7, 0x2C, 0x1D, 0xC3, 0xD1, 0xEC, 0xC8, 0xA6, 0x18, 0xCE, 0xCE, 0xF1, 0xC7, 0xE8, 0xC9, 0xA9, 0x1A, 0xF2, 0xC2, 0xC3, 0xC7, 0xF5, 0xCF, 0xAD, 0x14, 0xE9, 0xF8, 0xFD, 0xC7, 0xE3, 0xE4, 0xAE, 0x55, 0xF3, 0xCA, 0xEF, 0xB3}; - thread_local EncryptedName pressedImage(pressedSource); - const std::uint8_t hoverSource[] = {0x6B, 0x6E, 0x8D, 0xC3, 0xA7, 0xBB, 0x0E, 0xE0, 0x6D, 0x25, 0x8D, 0xF5, 0xDA, 0xCF, 0x97, 0x4F, 0xCA, 0xB2, 0x24, 0x5A, 0x38, 0x1C, 0xA5, 0x59, 0xCE, 0xB3, 0x2B, 0x58, 0x04, 0x10, 0x97, 0x59, 0xD3, 0xB5, 0x2F, 0x56, 0x1F, 0x2A, 0xA9, 0x59, 0xC5, 0x9E, 0x2C, 0x17, 0x05, 0x18, 0xBB, 0x2D}; - thread_local EncryptedName hoverImage(hoverSource); - const std::uint8_t normalSource[] = {0x99, 0x18, 0xC7, 0xE9, 0x05, 0xB3, 0xA6, 0x82, 0x9F, 0x53, 0xC7, 0xDF, 0x78, 0xC7, 0x3F, 0x2D, 0x38, 0xC4, 0x6E, 0x70, 0x9A, 0x14, 0x0D, 0x3B, 0x3C, 0xC5, 0x61, 0x72, 0xA6, 0x18, 0x3F, 0x3B, 0x21, 0xC3, 0x65, 0x7C, 0xBD, 0x22, 0x01, 0x3B, 0x37, 0xE8, 0x66, 0x3D, 0xA7, 0x10, 0x13, 0x4F}; - thread_local EncryptedName normalImage(normalSource); - this->m_combo->SetButton(std::string(normalImage.Text()), std::string(hoverImage.Text()), - std::string(pressedImage.Text()), std::string(disabledImage.Text())); + this->m_combo->SetButton(std::string([]() { + constexpr std::uint8_t bytes[] = {0x99, 0x18, 0xC7, 0xE9, 0x05, 0xB3, 0xA6, 0x82, 0x9F, 0x53, 0xC7, 0xDF, 0x78, 0xC7, 0x3F, 0x2D, 0x38, 0xC4, 0x6E, 0x70, 0x9A, 0x14, 0x0D, 0x3B, 0x3C, 0xC5, 0x61, 0x72, 0xA6, 0x18, 0x3F, 0x3B, 0x21, 0xC3, 0x65, 0x7C, 0xBD, 0x22, 0x01, 0x3B, 0x37, 0xE8, 0x66, 0x3D, 0xA7, 0x10, 0x13, 0x4F}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x4F637DC51307B759ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x6B, 0x6E, 0x8D, 0xC3, 0xA7, 0xBB, 0x0E, 0xE0, 0x6D, 0x25, 0x8D, 0xF5, 0xDA, 0xCF, 0x97, 0x4F, 0xCA, 0xB2, 0x24, 0x5A, 0x38, 0x1C, 0xA5, 0x59, 0xCE, 0xB3, 0x2B, 0x58, 0x04, 0x10, 0x97, 0x59, 0xD3, 0xB5, 0x2F, 0x56, 0x1F, 0x2A, 0xA9, 0x59, 0xC5, 0x9E, 0x2C, 0x17, 0x05, 0x18, 0xBB, 0x2D}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x2DCB7567394DC1ABULL> name(source); + return name.Text(); + }()), + std::string([]() { + constexpr std::uint8_t bytes[] = {0x4D, 0x14, 0x0F, 0x81, 0x51, 0x69, 0x5A, 0x7E, 0x4B, 0x5F, 0x0F, 0xB7, 0x2C, 0x1D, 0xC3, 0xD1, 0xEC, 0xC8, 0xA6, 0x18, 0xCE, 0xCE, 0xF1, 0xC7, 0xE8, 0xC9, 0xA9, 0x1A, 0xF2, 0xC2, 0xC3, 0xC7, 0xF5, 0xCF, 0xAD, 0x14, 0xE9, 0xF8, 0xFD, 0xC7, 0xE3, 0xE4, 0xAE, 0x55, 0xF3, 0xCA, 0xEF, 0xB3}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xB39FA7917BCFBB8DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x37, 0xBC, 0xEB, 0x55, 0x31, 0xC1, 0xD8, 0x40, 0x31, 0xF7, 0xEB, 0x63, 0x4C, 0xB5, 0x41, 0xEF, 0x96, 0x60, 0x42, 0xCC, 0xAE, 0x66, 0x73, 0xF9, 0x92, 0x61, 0x4D, 0xCE, 0x92, 0x6A, 0x41, 0xF9, 0x8F, 0x67, 0x49, 0xC0, 0x89, 0x50, 0x7F, 0xF9, 0x99, 0x4C, 0x4A, 0x81, 0x93, 0x62, 0x6D, 0x8D}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x8D1D0FF1AF2B13F7ULL> name(source); + return name.Text(); + }())); this->m_combo->Move(150, 9); this->m_combo->onSelect = [this](CUIComboItem* item, const RenderBackend& backend) { this->OnSelect(item, backend); }; - const std::function binder = [this](CUIComboItem* item, const RenderBackend& backend) { + this->m_combo->SetItemBinder([this](CUIComboItem* item, const RenderBackend& backend) { SetComboItemBackendText(item, backend); - }; - this->m_combo->onChange = binder; - this->m_combo->listBox->SetBinder(binder); + }); this->AddChild(this->m_combo); } @@ -2981,15 +3133,20 @@ void GameSettingsUI::CUIGroupLogInOut::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(100, 12); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xC8, 0x1B, 0x1E, 0x8C, 0xAB, 0x7F, 0x35, 0xB1, 0xB4, 0x6D, 0x1D, 0x5B}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xC8, 0x1B, 0x1E, 0x8C, 0xAB, 0x7F, 0x35, 0xB1, 0xB4, 0x6D, 0x1D, 0x5B}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0x0F15B16B5BAFD57FULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x64, 0x84, 0xBB, 0x7E, 0xBA, 0x49}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x64, 0x84, 0xBB, 0x7E, 0xBA, 0x49}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x7DE349D717D7F123ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3002,30 +3159,47 @@ void GameSettingsUI::CUIGroupLogInOut::Slot15(int width, int height) { this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); - const std::uint8_t onButtonNormalSource[] = {0x21, 0x36, 0x47, 0xB5, 0x41, 0x0D, 0xE4, 0xBE, 0x27, 0x7D, 0x47, 0x83, 0x3C, 0x79, 0x7D, 0x01, 0x80, 0xFD, 0xEE, 0x20, 0xE3, 0xB7, 0x4F, 0x2C, 0x8E, 0xFF, 0xE1, 0x61, 0xE3, 0xAE, 0x51, 0x73}; - thread_local EncryptedName onButtonNormal(onButtonNormalSource); - const std::uint8_t onButtonHoverSource[] = {0x8F, 0x0E, 0x0F, 0xCF, 0xA3, 0x19, 0x84, 0xB4, 0x89, 0x45, 0x0F, 0xF9, 0xDE, 0x6D, 0x1D, 0x0B, 0x2E, 0xC5, 0xA6, 0x5A, 0x01, 0xA3, 0x2F, 0x26, 0x20, 0xCF, 0xE1, 0x57, 0x0E, 0xA7, 0x41}; - thread_local EncryptedName onButtonHover(onButtonHoverSource); - const std::uint8_t onButtonPressedSource[] = {0x0D, 0xAC, 0x0D, 0x81, 0x57, 0xF5, 0xD6, 0xFE, 0x0B, 0xE7, 0x0D, 0xB7, 0x2A, 0x81, 0x4F, 0x41, 0xAC, 0x67, 0xA4, 0x14, 0xF5, 0x4F, 0x7D, 0x6C, 0xA2, 0x65, 0xAB, 0x55, 0xF5, 0x56, 0x63, 0x33}; - thread_local EncryptedName onButtonPressed(onButtonPressedSource); - const std::uint8_t onButtonDisabledSource[] = {0x11, 0xF4, 0x57, 0x1F, 0xF9, 0x49, 0x2E, 0xE2, 0x17, 0xBF, 0x57, 0x29, 0x84, 0x3D, 0xB7, 0x5D, 0xB0, 0x3F, 0xFE, 0x8A, 0x5B, 0xF3, 0x85, 0x70, 0xBE, 0x3D, 0xF1, 0xCB, 0x5B, 0xEA, 0x9B, 0x2F}; - thread_local EncryptedName onButtonDisabled(onButtonDisabledSource); - this->m_onButton->SetImages(std::string(onButtonNormal.Text()), std::string(onButtonHover.Text()), std::string(onButtonPressed.Text()), std::string(onButtonDisabled.Text())); + this->m_onButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x21, 0x36, 0x47, 0xB5, 0x41, 0x0D, 0xE4, 0xBE, 0x27, 0x7D, 0x47, 0x83, 0x3C, 0x79, 0x7D, 0x01, 0x80, 0xFD, 0xEE, 0x20, 0xE3, 0xB7, 0x4F, 0x2C, 0x8E, 0xFF, 0xE1, 0x61, 0xE3, 0xAE, 0x51, 0x73}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x7321C3814F8799E1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x8F, 0x0E, 0x0F, 0xCF, 0xA3, 0x19, 0x84, 0xB4, 0x89, 0x45, 0x0F, 0xF9, 0xDE, 0x6D, 0x1D, 0x0B, 0x2E, 0xC5, 0xA6, 0x5A, 0x01, 0xA3, 0x2F, 0x26, 0x20, 0xCF, 0xE1, 0x57, 0x0E, 0xA7, 0x41}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x7941D76335CFA14FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x0D, 0xAC, 0x0D, 0x81, 0x57, 0xF5, 0xD6, 0xFE, 0x0B, 0xE7, 0x0D, 0xB7, 0x2A, 0x81, 0x4F, 0x41, 0xAC, 0x67, 0xA4, 0x14, 0xF5, 0x4F, 0x7D, 0x6C, 0xA2, 0x65, 0xAB, 0x55, 0xF5, 0x56, 0x63, 0x33}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x33133B977BCD03CDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x11, 0xF4, 0x57, 0x1F, 0xF9, 0x49, 0x2E, 0xE2, 0x17, 0xBF, 0x57, 0x29, 0x84, 0x3D, 0xB7, 0x5D, 0xB0, 0x3F, 0xFE, 0x8A, 0x5B, 0xF3, 0x85, 0x70, 0xBE, 0x3D, 0xF1, 0xCB, 0x5B, 0xEA, 0x9B, 0x2F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x2FEB8739E5975BD1ULL> name(source); + return name.Text(); + }())); this->m_onButton->checked = false; this->m_onButton->Invalidate(); this->AddChild(this->m_onButton); this->m_onText = new CUIStaticText(); this->m_onText->SetSize(100, 12); this->m_onText->Move(127, 12); - const std::uint8_t onLabelNameSource[] = {0xB1, 0xEA, 0xB2, 0xCD, 0x13}; - thread_local EncryptedName onLabelName(onLabelNameSource); - const char* onLabelText = onLabelName.Text(); - this->m_onText->SetText(onLabelText, std::strlen(onLabelText)); + this->m_onText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xB1, 0xEA, 0xB2, 0xCD, 0x13}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x6BA1C1132F033B75ULL> name(source); + return name.Text(); + }()); this->m_onText->SetFitText(0); this->m_onText->SetAlign(0, 0); - const std::uint8_t onLabelFontSource[] = {0x68, 0xA2, 0x29, 0x4C, 0x54, 0xAB}; - thread_local EncryptedName onLabelFont(onLabelFontSource); - this->m_onText->SetFont(std::string(onLabelFont.Text())); + this->m_onText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x68, 0xA2, 0x29, 0x4C, 0x54, 0xAB}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xA12DAB392545D72FULL> name(source); + return name.Text(); + }())); this->m_onText->SetFontHeight(12); this->m_onText->SetBold(0); this->m_onText->SetColor(0); @@ -3038,30 +3212,47 @@ void GameSettingsUI::CUIGroupLogInOut::Slot15(int width, int height) { this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); - const std::uint8_t offButtonNormalSource[] = {0xDD, 0x68, 0x8B, 0x4F, 0x1D, 0xB9, 0x8C, 0xEE, 0xDB, 0x23, 0x8B, 0x79, 0x60, 0xCD, 0x15, 0x51, 0x7C, 0xA3, 0x22, 0xDA, 0xBF, 0x03, 0x27, 0x7C, 0x72, 0xA1, 0x2D, 0x9B, 0xBF, 0x1A, 0x39, 0x23}; - thread_local EncryptedName offButtonNormal(offButtonNormalSource); - const std::uint8_t offButtonHoverSource[] = {0x05, 0x82, 0xEB, 0xC5, 0x49, 0xD3, 0xA8, 0x22, 0x03, 0xC9, 0xEB, 0xF3, 0x34, 0xA7, 0x31, 0x9D, 0xA4, 0x49, 0x42, 0x50, 0xEB, 0x69, 0x03, 0xB0, 0xAA, 0x43, 0x05, 0x5D, 0xE4, 0x6D, 0x6D}; - thread_local EncryptedName offButtonHover(offButtonHoverSource); - const std::uint8_t offButtonPressedSource[] = {0x9B, 0xFC, 0x9F, 0x27, 0x47, 0x51, 0x66, 0xF4, 0x9D, 0xB7, 0x9F, 0x11, 0x3A, 0x25, 0xFF, 0x4B, 0x3A, 0x37, 0x36, 0xB2, 0xE5, 0xEB, 0xCD, 0x66, 0x34, 0x35, 0x39, 0xF3, 0xE5, 0xF2, 0xD3, 0x39}; - thread_local EncryptedName offButtonPressed(offButtonPressedSource); - const std::uint8_t offButtonDisabledSource[] = {0xB7, 0x38, 0x47, 0xE7, 0xE3, 0x9D, 0x24, 0xA2, 0xB1, 0x73, 0x47, 0xD1, 0x9E, 0xE9, 0xBD, 0x1D, 0x16, 0xF3, 0xEE, 0x72, 0x41, 0x27, 0x8F, 0x30, 0x18, 0xF1, 0xE1, 0x33, 0x41, 0x3E, 0x91, 0x6F}; - thread_local EncryptedName offButtonDisabled(offButtonDisabledSource); - this->m_offButton->SetImages(std::string(offButtonNormal.Text()), std::string(offButtonHover.Text()), std::string(offButtonPressed.Text()), std::string(offButtonDisabled.Text())); + this->m_offButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xDD, 0x68, 0x8B, 0x4F, 0x1D, 0xB9, 0x8C, 0xEE, 0xDB, 0x23, 0x8B, 0x79, 0x60, 0xCD, 0x15, 0x51, 0x7C, 0xA3, 0x22, 0xDA, 0xBF, 0x03, 0x27, 0x7C, 0x72, 0xA1, 0x2D, 0x9B, 0xBF, 0x1A, 0x39, 0x23}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x234977DDB54BC71DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x05, 0x82, 0xEB, 0xC5, 0x49, 0xD3, 0xA8, 0x22, 0x03, 0xC9, 0xEB, 0xF3, 0x34, 0xA7, 0x31, 0x9D, 0xA4, 0x49, 0x42, 0x50, 0xEB, 0x69, 0x03, 0xB0, 0xAA, 0x43, 0x05, 0x5D, 0xE4, 0x6D, 0x6D}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xEF6D1D893F2B2DC5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x9B, 0xFC, 0x9F, 0x27, 0x47, 0x51, 0x66, 0xF4, 0x9D, 0xB7, 0x9F, 0x11, 0x3A, 0x25, 0xFF, 0x4B, 0x3A, 0x37, 0x36, 0xB2, 0xE5, 0xEB, 0xCD, 0x66, 0x34, 0x35, 0x39, 0xF3, 0xE5, 0xF2, 0xD3, 0x39}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x39A39F87DD5F535BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xB7, 0x38, 0x47, 0xE7, 0xE3, 0x9D, 0x24, 0xA2, 0xB1, 0x73, 0x47, 0xD1, 0x9E, 0xE9, 0xBD, 0x1D, 0x16, 0xF3, 0xEE, 0x72, 0x41, 0x27, 0x8F, 0x30, 0x18, 0xF1, 0xE1, 0x33, 0x41, 0x3E, 0x91, 0x6F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x6FE153231D879777ULL> name(source); + return name.Text(); + }())); this->m_offButton->checked = false; this->m_offButton->Invalidate(); this->AddChild(this->m_offButton); this->m_offText = new CUIStaticText(); this->m_offText->SetSize(100, 12); this->m_offText->Move(222, 12); - const std::uint8_t offLabelNameSource[] = {0x05, 0xC5, 0x5E, 0x21, 0x03}; - thread_local EncryptedName offLabelName(offLabelNameSource); - const char* offLabelText = offLabelName.Text(); - this->m_offText->SetText(offLabelText, std::strlen(offLabelText)); + this->m_offText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x05, 0xC5, 0x5E, 0x21, 0x03}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x4F99DF03C3EF31B7ULL> name(source); + return name.Text(); + }()); this->m_offText->SetFitText(0); this->m_offText->SetAlign(0, 0); - const std::uint8_t offLabelFontSource[] = {0xB0, 0xBC, 0x0F, 0x00, 0x10, 0x99}; - thread_local EncryptedName offLabelFont(offLabelFontSource); - this->m_offText->SetFont(std::string(offLabelFont.Text())); + this->m_offText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xB0, 0xBC, 0x0F, 0x00, 0x10, 0x99}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x9171997D6963C9F7ULL> name(source); + return name.Text(); + }())); this->m_offText->SetFontHeight(12); this->m_offText->SetBold(0); this->m_offText->SetColor(0); @@ -3076,15 +3267,20 @@ void GameSettingsUI::CUIGroupProcessPriority::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(100, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xCE, 0xF1, 0x65, 0x6A, 0xA5, 0xD8, 0x95, 0x51, 0xCE, 0xAF, 0x27, 0x11, 0x22, 0x67}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xCE, 0xF1, 0x65, 0x6A, 0xA5, 0xD8, 0x95, 0x51, 0xCE, 0xAF, 0x27, 0x11, 0x22, 0x67}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0xED796785D1DF137FULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x4E, 0x52, 0x43, 0xD2, 0xD0, 0x5D}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x4E, 0x52, 0x43, 0xD2, 0xD0, 0x5D}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xD97D5DBDBB2F2709ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3097,30 +3293,47 @@ void GameSettingsUI::CUIGroupProcessPriority::Slot15(int width, int height) { this->m_highButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_highButton->disabled = 0; this->m_highButton->Invalidate(); - const std::uint8_t highButtonNormalSource[] = {0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD7, 0xFE, 0xA1, 0x04, 0xC4, 0xB5, 0x5D, 0x93, 0xFA, 0xF0, 0xA3, 0x0B, 0x85, 0xB5, 0x44, 0x8D, 0xA5}; - thread_local EncryptedName highButtonNormal(highButtonNormalSource); - const std::uint8_t highButtonHoverSource[] = {0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x83, 0x90, 0xA3, 0x50, 0x66, 0x75, 0x0D, 0x21, 0xAE, 0x9E, 0xA9, 0x17, 0x6B, 0x7A, 0x09, 0x4F}; - thread_local EncryptedName highButtonHover(highButtonHoverSource); - const std::uint8_t highButtonPressedSource[] = {0x5B, 0xF8, 0xC3, 0x63, 0xA7, 0xCB, 0xC0, 0xC8, 0x5D, 0xB3, 0xC3, 0x55, 0xDA, 0xBF, 0x59, 0x77, 0xFA, 0x33, 0x6A, 0xF6, 0x05, 0x71, 0x6B, 0x5A, 0xF4, 0x31, 0x65, 0xB7, 0x05, 0x68, 0x75, 0x05}; - thread_local EncryptedName highButtonPressed(highButtonPressedSource); - const std::uint8_t highButtonDisabledSource[] = {0x21, 0xD4, 0x39, 0x2D, 0x15, 0xDD, 0xFC, 0x10, 0x27, 0x9F, 0x39, 0x1B, 0x68, 0xA9, 0x65, 0xAF, 0x80, 0x1F, 0x90, 0xB8, 0xB7, 0x67, 0x57, 0x82, 0x8E, 0x1D, 0x9F, 0xF9, 0xB7, 0x7E, 0x49, 0xDD}; - thread_local EncryptedName highButtonDisabled(highButtonDisabledSource); - this->m_highButton->SetImages(std::string(highButtonNormal.Text()), std::string(highButtonHover.Text()), std::string(highButtonPressed.Text()), std::string(highButtonDisabled.Text())); + this->m_highButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD7, 0xFE, 0xA1, 0x04, 0xC4, 0xB5, 0x5D, 0x93, 0xFA, 0xF0, 0xA3, 0x0B, 0x85, 0xB5, 0x44, 0x8D, 0xA5}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xA5FD29D7AB6DC59FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x83, 0x90, 0xA3, 0x50, 0x66, 0x75, 0x0D, 0x21, 0xAE, 0x9E, 0xA9, 0x17, 0x6B, 0x7A, 0x09, 0x4F}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xF14F79170939C7F1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x5B, 0xF8, 0xC3, 0x63, 0xA7, 0xCB, 0xC0, 0xC8, 0x5D, 0xB3, 0xC3, 0x55, 0xDA, 0xBF, 0x59, 0x77, 0xFA, 0x33, 0x6A, 0xF6, 0x05, 0x71, 0x6B, 0x5A, 0xF4, 0x31, 0x65, 0xB7, 0x05, 0x68, 0x75, 0x05}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x050505679903579BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x21, 0xD4, 0x39, 0x2D, 0x15, 0xDD, 0xFC, 0x10, 0x27, 0x9F, 0x39, 0x1B, 0x68, 0xA9, 0x65, 0xAF, 0x80, 0x1F, 0x90, 0xB8, 0xB7, 0x67, 0x57, 0x82, 0x8E, 0x1D, 0x9F, 0xF9, 0xB7, 0x7E, 0x49, 0xDD}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xDD3913D5D7F97BE1ULL> name(source); + return name.Text(); + }())); this->m_highButton->checked = true; this->m_highButton->Invalidate(); this->AddChild(this->m_highButton); this->m_highText = new CUIStaticText(); this->m_highText->SetSize(100, 13); this->m_highText->Move(127, 12); - const std::uint8_t highLabelNameSource[] = {0x14, 0x01, 0xBF, 0x84, 0x31}; - thread_local EncryptedName highLabelName(highLabelNameSource); - const char* highLabelText = highLabelName.Text(); - this->m_highText->SetText(highLabelText, std::strlen(highLabelText)); + this->m_highText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x14, 0x01, 0xBF, 0x84, 0x31}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xBF2B4B31397FF5A7ULL> name(source); + return name.Text(); + }()); this->m_highText->SetFitText(0); this->m_highText->SetAlign(0, 0); - const std::uint8_t highLabelFontSource[] = {0xFA, 0xC8, 0x81, 0x5E, 0xD6, 0xBF}; - thread_local EncryptedName highLabelFont(highLabelFontSource); - this->m_highText->SetFont(std::string(highLabelFont.Text())); + this->m_highText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xFA, 0xC8, 0x81, 0x5E, 0xD6, 0xBF}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x83EFBFBB37EDBDBDULL> name(source); + return name.Text(); + }())); this->m_highText->SetFontHeight(12); this->m_highText->SetBold(0); this->m_highText->SetColor(0); @@ -3133,30 +3346,47 @@ void GameSettingsUI::CUIGroupProcessPriority::Slot15(int width, int height) { this->m_normalButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_normalButton->disabled = 0; this->m_normalButton->Invalidate(); - const std::uint8_t normalButtonNormalSource[] = {0xAD, 0xB4, 0x67, 0xEB, 0xB7, 0xA1, 0x0E, 0x3E, 0xAB, 0xFF, 0x67, 0xDD, 0xCA, 0xD5, 0x97, 0x81, 0x0C, 0x7F, 0xCE, 0x7E, 0x15, 0x1B, 0xA5, 0xAC, 0x02, 0x7D, 0xC1, 0x3F, 0x15, 0x02, 0xBB, 0xF3}; - thread_local EncryptedName normalButtonNormal(normalButtonNormalSource); - const std::uint8_t normalButtonHoverSource[] = {0x73, 0xC8, 0x99, 0x75, 0x1F, 0xE9, 0x5E, 0x4E, 0x75, 0x83, 0x99, 0x43, 0x62, 0x9D, 0xC7, 0xF1, 0xD2, 0x03, 0x30, 0xE0, 0xBD, 0x53, 0xF5, 0xDC, 0xDC, 0x09, 0x77, 0xED, 0xB2, 0x57, 0x9B}; - thread_local EncryptedName normalButtonHover(normalButtonHoverSource); - const std::uint8_t normalButtonPressedSource[] = {0x9D, 0xA2, 0x89, 0x73, 0x61, 0xB3, 0x28, 0x52, 0x9B, 0xE9, 0x89, 0x45, 0x1C, 0xC7, 0xB1, 0xED, 0x3C, 0x69, 0x20, 0xE6, 0xC3, 0x09, 0x83, 0xC0, 0x32, 0x6B, 0x2F, 0xA7, 0xC3, 0x10, 0x9D, 0x9F}; - thread_local EncryptedName normalButtonPressed(normalButtonPressedSource); - const std::uint8_t normalButtonDisabledSource[] = {0xA5, 0xFA, 0x09, 0x85, 0xCD, 0x21, 0xEA, 0x88, 0xA3, 0xB1, 0x09, 0xB3, 0xB0, 0x55, 0x73, 0x37, 0x04, 0x31, 0xA0, 0x10, 0x6F, 0x9B, 0x41, 0x1A, 0x0A, 0x33, 0xAF, 0x51, 0x6F, 0x82, 0x5F, 0x45}; - thread_local EncryptedName normalButtonDisabled(normalButtonDisabledSource); - this->m_normalButton->SetImages(std::string(normalButtonNormal.Text()), std::string(normalButtonHover.Text()), std::string(normalButtonPressed.Text()), std::string(normalButtonDisabled.Text())); + this->m_normalButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xAD, 0xB4, 0x67, 0xEB, 0xB7, 0xA1, 0x0E, 0x3E, 0xAB, 0xFF, 0x67, 0xDD, 0xCA, 0xD5, 0x97, 0x81, 0x0C, 0x7F, 0xCE, 0x7E, 0x15, 0x1B, 0xA5, 0xAC, 0x02, 0x7D, 0xC1, 0x3F, 0x15, 0x02, 0xBB, 0xF3}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xF3CB6F7711A71B6DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x73, 0xC8, 0x99, 0x75, 0x1F, 0xE9, 0x5E, 0x4E, 0x75, 0x83, 0x99, 0x43, 0x62, 0x9D, 0xC7, 0xF1, 0xD2, 0x03, 0x30, 0xE0, 0xBD, 0x53, 0xF5, 0xDC, 0xDC, 0x09, 0x77, 0xED, 0xB2, 0x57, 0x9B}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x839B27DF8F5967B3ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x9D, 0xA2, 0x89, 0x73, 0x61, 0xB3, 0x28, 0x52, 0x9B, 0xE9, 0x89, 0x45, 0x1C, 0xC7, 0xB1, 0xED, 0x3C, 0x69, 0x20, 0xE6, 0xC3, 0x09, 0x83, 0xC0, 0x32, 0x6B, 0x2F, 0xA7, 0xC3, 0x10, 0x9D, 0x9F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x9FED7DA189490D5DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xA5, 0xFA, 0x09, 0x85, 0xCD, 0x21, 0xEA, 0x88, 0xA3, 0xB1, 0x09, 0xB3, 0xB0, 0x55, 0x73, 0x37, 0x04, 0x31, 0xA0, 0x10, 0x6F, 0x9B, 0x41, 0x1A, 0x0A, 0x33, 0xAF, 0x51, 0x6F, 0x82, 0x5F, 0x45}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x452FEF0D7FC95565ULL> name(source); + return name.Text(); + }())); this->m_normalButton->checked = false; this->m_normalButton->Invalidate(); this->AddChild(this->m_normalButton); this->m_normalText = new CUIStaticText(); this->m_normalText->SetSize(100, 13); this->m_normalText->Move(222, 12); - const std::uint8_t normalLabelNameSource[] = {0xDF, 0x4B, 0x12, 0xB6, 0x8D}; - thread_local EncryptedName normalLabelName(normalLabelNameSource); - const char* normalLabelText = normalLabelName.Text(); - this->m_normalText->SetText(normalLabelText, std::strlen(normalLabelText)); + this->m_normalText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xDF, 0x4B, 0x12, 0xB6, 0x8D}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x176F138D5DD7F365ULL> name(source); + return name.Text(); + }()); this->m_normalText->SetFitText(0); this->m_normalText->SetAlign(0, 0); - const std::uint8_t normalLabelFontSource[] = {0x86, 0x32, 0xA9, 0x7E, 0x8C, 0x99}; - thread_local EncryptedName normalLabelFont(normalLabelFontSource); - this->m_normalText->SetFont(std::string(normalLabelFont.Text())); + this->m_normalText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x86, 0x32, 0xA9, 0x7E, 0x8C, 0x99}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xFBD599E117C547C1ULL> name(source); + return name.Text(); + }())); this->m_normalText->SetFontHeight(12); this->m_normalText->SetBold(0); this->m_normalText->SetColor(0); @@ -3169,30 +3399,47 @@ void GameSettingsUI::CUIGroupProcessPriority::Slot15(int width, int height) { this->m_idleButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_idleButton->disabled = 0; this->m_idleButton->Invalidate(); - const std::uint8_t idleButtonNormalSource[] = {0xD7, 0xB4, 0xED, 0x59, 0x7D, 0x25, 0x84, 0xC2, 0xD1, 0xFF, 0xED, 0x6F, 0x00, 0x51, 0x1D, 0x7D, 0x76, 0x7F, 0x44, 0xCC, 0xDF, 0x9F, 0x2F, 0x50, 0x78, 0x7D, 0x4B, 0x8D, 0xDF, 0x86, 0x31, 0x0F}; - thread_local EncryptedName idleButtonNormal(idleButtonNormalSource); - const std::uint8_t idleButtonHoverSource[] = {0x2D, 0xDA, 0xA1, 0xD9, 0x77, 0x2D, 0x94, 0xE0, 0x2B, 0x91, 0xA1, 0xEF, 0x0A, 0x59, 0x0D, 0x5F, 0x8C, 0x11, 0x08, 0x4C, 0xD5, 0x97, 0x3F, 0x72, 0x82, 0x1B, 0x4F, 0x41, 0xDA, 0x93, 0x51}; - thread_local EncryptedName idleButtonHover(idleButtonHoverSource); - const std::uint8_t idleButtonPressedSource[] = {0xA3, 0x5A, 0x21, 0x85, 0xFB, 0xEB, 0xD8, 0x06, 0xA5, 0x11, 0x21, 0xB3, 0x86, 0x9F, 0x41, 0xB9, 0x02, 0x91, 0x88, 0x10, 0x59, 0x51, 0x73, 0x94, 0x0C, 0x93, 0x87, 0x51, 0x59, 0x48, 0x6D, 0xCB}; - thread_local EncryptedName idleButtonPressed(idleButtonPressedSource); - const std::uint8_t idleButtonDisabledSource[] = {0x09, 0xBC, 0x39, 0x89, 0x39, 0x17, 0xD0, 0xBC, 0x0F, 0xF7, 0x39, 0xBF, 0x44, 0x63, 0x49, 0x03, 0xA8, 0x77, 0x90, 0x1C, 0x9B, 0xAD, 0x7B, 0x2E, 0xA6, 0x75, 0x9F, 0x5D, 0x9B, 0xB4, 0x65, 0x71}; - thread_local EncryptedName idleButtonDisabled(idleButtonDisabledSource); - this->m_idleButton->SetImages(std::string(idleButtonNormal.Text()), std::string(idleButtonHover.Text()), std::string(idleButtonPressed.Text()), std::string(idleButtonDisabled.Text())); + this->m_idleButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xD7, 0xB4, 0xED, 0x59, 0x7D, 0x25, 0x84, 0xC2, 0xD1, 0xFF, 0xED, 0x6F, 0x00, 0x51, 0x1D, 0x7D, 0x76, 0x7F, 0x44, 0xCC, 0xDF, 0x9F, 0x2F, 0x50, 0x78, 0x7D, 0x4B, 0x8D, 0xDF, 0x86, 0x31, 0x0F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x0F41EBBDA32D1B17ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x2D, 0xDA, 0xA1, 0xD9, 0x77, 0x2D, 0x94, 0xE0, 0x2B, 0x91, 0xA1, 0xEF, 0x0A, 0x59, 0x0D, 0x5F, 0x8C, 0x11, 0x08, 0x4C, 0xD5, 0x97, 0x3F, 0x72, 0x82, 0x1B, 0x4F, 0x41, 0xDA, 0x93, 0x51}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x2D51E3B7236175EDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xA3, 0x5A, 0x21, 0x85, 0xFB, 0xEB, 0xD8, 0x06, 0xA5, 0x11, 0x21, 0xB3, 0x86, 0x9F, 0x41, 0xB9, 0x02, 0x91, 0x88, 0x10, 0x59, 0x51, 0x73, 0x94, 0x0C, 0x93, 0x87, 0x51, 0x59, 0x48, 0x6D, 0xCB}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xCB1D253B7FE1F563ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x09, 0xBC, 0x39, 0x89, 0x39, 0x17, 0xD0, 0xBC, 0x0F, 0xF7, 0x39, 0xBF, 0x44, 0x63, 0x49, 0x03, 0xA8, 0x77, 0x90, 0x1C, 0x9B, 0xAD, 0x7B, 0x2E, 0xA6, 0x75, 0x9F, 0x5D, 0x9B, 0xB4, 0x65, 0x71}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x7115D9F973F913C9ULL> name(source); + return name.Text(); + }())); this->m_idleButton->checked = false; this->m_idleButton->Invalidate(); this->AddChild(this->m_idleButton); this->m_idleText = new CUIStaticText(); this->m_idleText->SetSize(100, 13); this->m_idleText->Move(317, 12); - const std::uint8_t idleLabelNameSource[] = {0xAE, 0xB2, 0x53, 0x94, 0x71}; - thread_local EncryptedName idleLabelName(idleLabelNameSource); - const char* idleLabelText = idleLabelName.Text(); - this->m_idleText->SetText(idleLabelText, std::strlen(idleLabelText)); + this->m_idleText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xAE, 0xB2, 0x53, 0x94, 0x71}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xE55723712993051DULL> name(source); + return name.Text(); + }()); this->m_idleText->SetFitText(0); this->m_idleText->SetAlign(0, 0); - const std::uint8_t idleLabelFontSource[] = {0x08, 0x12, 0x81, 0xEC, 0x64, 0x37}; - thread_local EncryptedName idleLabelFont(idleLabelFontSource); - this->m_idleText->SetFont(std::string(idleLabelFont.Text())); + this->m_idleText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x08, 0x12, 0x81, 0xEC, 0x64, 0x37}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x793F370985ED674FULL> name(source); + return name.Text(); + }())); this->m_idleText->SetFontHeight(12); this->m_idleText->SetBold(0); this->m_idleText->SetColor(0); @@ -3207,15 +3454,20 @@ void GameSettingsUI::CUIGroupRodexSpam::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(70, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xDA, 0xF5, 0x83, 0xE4, 0x2D}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xDA, 0xF5, 0x83, 0xE4, 0x2D}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x891B232D09451965ULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0xFE, 0x70, 0x1B, 0x26, 0x66, 0x1D}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xFE, 0x70, 0x1B, 0x26, 0x66, 0x1D}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x758F1D0B4F7705B9ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3228,30 +3480,47 @@ void GameSettingsUI::CUIGroupRodexSpam::Slot15(int width, int height) { this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); - const std::uint8_t onButtonNormalSource[] = {0x2F, 0xDE, 0x1F, 0xE9, 0xAD, 0x81, 0x02, 0x20, 0x29, 0x95, 0x1F, 0xDF, 0xD0, 0xF5, 0x9B, 0x9F, 0x8E, 0x15, 0xB6, 0x7C, 0x0F, 0x3B, 0xA9, 0xB2, 0x80, 0x17, 0xB9, 0x3D, 0x0F, 0x22, 0xB7, 0xED}; - thread_local EncryptedName onButtonNormal(onButtonNormalSource); - const std::uint8_t onButtonHoverSource[] = {0x55, 0x20, 0x21, 0xF7, 0x9D, 0xC7, 0xA4, 0x3C, 0x53, 0x6B, 0x21, 0xC1, 0xE0, 0xB3, 0x3D, 0x83, 0xF4, 0xEB, 0x88, 0x62, 0x3F, 0x7D, 0x0F, 0xAE, 0xFA, 0xE1, 0xCF, 0x6F, 0x30, 0x79, 0x61}; - thread_local EncryptedName onButtonHover(onButtonHoverSource); - const std::uint8_t onButtonPressedSource[] = {0x19, 0x56, 0x21, 0x19, 0xAD, 0xDB, 0x68, 0xE6, 0x1F, 0x1D, 0x21, 0x2F, 0xD0, 0xAF, 0xF1, 0x59, 0xB8, 0x9D, 0x88, 0x8C, 0x0F, 0x61, 0xC3, 0x74, 0xB6, 0x9F, 0x87, 0xCD, 0x0F, 0x78, 0xDD, 0x2B}; - thread_local EncryptedName onButtonPressed(onButtonPressedSource); - const std::uint8_t onButtonDisabledSource[] = {0x4F, 0x12, 0x2F, 0x7D, 0xBD, 0x0B, 0x68, 0xB8, 0x49, 0x59, 0x2F, 0x4B, 0xC0, 0x7F, 0xF1, 0x07, 0xEE, 0xD9, 0x86, 0xE8, 0x1F, 0xB1, 0xC3, 0x2A, 0xE0, 0xDB, 0x89, 0xA9, 0x1F, 0xA8, 0xDD, 0x75}; - thread_local EncryptedName onButtonDisabled(onButtonDisabledSource); - this->m_onButton->SetImages(std::string(onButtonNormal.Text()), std::string(onButtonHover.Text()), std::string(onButtonPressed.Text()), std::string(onButtonDisabled.Text())); + this->m_onButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2F, 0xDE, 0x1F, 0xE9, 0xAD, 0x81, 0x02, 0x20, 0x29, 0x95, 0x1F, 0xDF, 0xD0, 0xF5, 0x9B, 0x9F, 0x8E, 0x15, 0xB6, 0x7C, 0x0F, 0x3B, 0xA9, 0xB2, 0x80, 0x17, 0xB9, 0x3D, 0x0F, 0x22, 0xB7, 0xED}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xEDC74F6D13DF71EFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x55, 0x20, 0x21, 0xF7, 0x9D, 0xC7, 0xA4, 0x3C, 0x53, 0x6B, 0x21, 0xC1, 0xE0, 0xB3, 0x3D, 0x83, 0xF4, 0xEB, 0x88, 0x62, 0x3F, 0x7D, 0x0F, 0xAE, 0xFA, 0xE1, 0xCF, 0x6F, 0x30, 0x79, 0x61}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xF161095D0DE18F95ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x19, 0x56, 0x21, 0x19, 0xAD, 0xDB, 0x68, 0xE6, 0x1F, 0x1D, 0x21, 0x2F, 0xD0, 0xAF, 0xF1, 0x59, 0xB8, 0x9D, 0x88, 0x8C, 0x0F, 0x61, 0xC3, 0x74, 0xB6, 0x9F, 0x87, 0xCD, 0x0F, 0x78, 0xDD, 0x2B}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x2BAD156DE3E1F9D9ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x4F, 0x12, 0x2F, 0x7D, 0xBD, 0x0B, 0x68, 0xB8, 0x49, 0x59, 0x2F, 0x4B, 0xC0, 0x7F, 0xF1, 0x07, 0xEE, 0xD9, 0x86, 0xE8, 0x1F, 0xB1, 0xC3, 0x2A, 0xE0, 0xDB, 0x89, 0xA9, 0x1F, 0xA8, 0xDD, 0x75}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x75ADC57D87EFBD8FULL> name(source); + return name.Text(); + }())); this->m_onButton->checked = false; this->m_onButton->Invalidate(); this->AddChild(this->m_onButton); this->m_onText = new CUIStaticText(); this->m_onText->SetSize(100, 13); this->m_onText->Move(127, 12); - const std::uint8_t onLabelNameSource[] = {0x37, 0x69, 0x5E, 0xEA, 0x95, 0xBF, 0x50, 0xF9, 0x75, 0xB9, 0x57, 0xFB, 0x08, 0xBA, 0xFF}; - thread_local EncryptedName onLabelName(onLabelNameSource); - const char* onLabelText = onLabelName.Text(); - this->m_onText->SetText(onLabelText, std::strlen(onLabelText)); + this->m_onText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x37, 0x69, 0x5E, 0xEA, 0x95, 0xBF, 0x50, 0xF9, 0x75, 0xB9, 0x57, 0xFB, 0x08, 0xBA, 0xFF}; + constexpr EncryptedSource<15> source(bytes); + thread_local EncryptedName<15, 0x39FF7FB50DEB998FULL> name(source); + return name.Text(); + }()); this->m_onText->SetFitText(0); this->m_onText->SetAlign(0, 0); - const std::uint8_t onLabelFontSource[] = {0xD0, 0x84, 0x8D, 0xB4, 0xBC, 0x93}; - thread_local EncryptedName onLabelFont(onLabelFontSource); - this->m_onText->SetFont(std::string(onLabelFont.Text())); + this->m_onText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xD0, 0x84, 0x8D, 0xB4, 0xBC, 0x93}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x2FE993D1DDE1F197ULL> name(source); + return name.Text(); + }())); this->m_onText->SetFontHeight(12); this->m_onText->SetBold(0); this->m_onText->SetColor(0); @@ -3264,30 +3533,47 @@ void GameSettingsUI::CUIGroupRodexSpam::Slot15(int width, int height) { this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { this->OnSelect(button); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); - const std::uint8_t offButtonNormalSource[] = {0x0D, 0x5E, 0x59, 0x4F, 0x4D, 0x95, 0xC2, 0x60, 0x0B, 0x15, 0x59, 0x79, 0x30, 0xE1, 0x5B, 0xDF, 0xAC, 0x95, 0xF0, 0xDA, 0xEF, 0x2F, 0x69, 0xF2, 0xA2, 0x97, 0xFF, 0x9B, 0xEF, 0x36, 0x77, 0xAD}; - thread_local EncryptedName offButtonNormal(offButtonNormalSource); - const std::uint8_t offButtonHoverSource[] = {0xBF, 0xBA, 0x4D, 0xEB, 0xF7, 0xC1, 0x4E, 0xE2, 0xB9, 0xF1, 0x4D, 0xDD, 0x8A, 0xB5, 0xD7, 0x5D, 0x1E, 0x71, 0xE4, 0x7E, 0x55, 0x7B, 0xE5, 0x70, 0x10, 0x7B, 0xA3, 0x73, 0x5A, 0x7F, 0x8B}; - thread_local EncryptedName offButtonHover(offButtonHoverSource); - const std::uint8_t offButtonPressedSource[] = {0xB5, 0x62, 0x2D, 0xA7, 0xAB, 0xAB, 0x20, 0xF8, 0xB3, 0x29, 0x2D, 0x91, 0xD6, 0xDF, 0xB9, 0x47, 0x14, 0xA9, 0x84, 0x32, 0x09, 0x11, 0x8B, 0x6A, 0x1A, 0xAB, 0x8B, 0x73, 0x09, 0x08, 0x95, 0x35}; - thread_local EncryptedName offButtonPressed(offButtonPressedSource); - const std::uint8_t offButtonDisabledSource[] = {0x3D, 0x16, 0x7B, 0xDB, 0x5F, 0x33, 0x84, 0x84, 0x3B, 0x5D, 0x7B, 0xED, 0x22, 0x47, 0x1D, 0x3B, 0x9C, 0xDD, 0xD2, 0x4E, 0xFD, 0x89, 0x2F, 0x16, 0x92, 0xDF, 0xDD, 0x0F, 0xFD, 0x90, 0x31, 0x49}; - thread_local EncryptedName offButtonDisabled(offButtonDisabledSource); - this->m_offButton->SetImages(std::string(offButtonNormal.Text()), std::string(offButtonHover.Text()), std::string(offButtonPressed.Text()), std::string(offButtonDisabled.Text())); + this->m_offButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x0D, 0x5E, 0x59, 0x4F, 0x4D, 0x95, 0xC2, 0x60, 0x0B, 0x15, 0x59, 0x79, 0x30, 0xE1, 0x5B, 0xDF, 0xAC, 0x95, 0xF0, 0xDA, 0xEF, 0x2F, 0x69, 0xF2, 0xA2, 0x97, 0xFF, 0x9B, 0xEF, 0x36, 0x77, 0xAD}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xAD075B8DB599F1CDULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xBF, 0xBA, 0x4D, 0xEB, 0xF7, 0xC1, 0x4E, 0xE2, 0xB9, 0xF1, 0x4D, 0xDD, 0x8A, 0xB5, 0xD7, 0x5D, 0x1E, 0x71, 0xE4, 0x7E, 0x55, 0x7B, 0xE5, 0x70, 0x10, 0x7B, 0xA3, 0x73, 0x5A, 0x7F, 0x8B}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x2F8B0F37118D157FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xB5, 0x62, 0x2D, 0xA7, 0xAB, 0xAB, 0x20, 0xF8, 0xB3, 0x29, 0x2D, 0x91, 0xD6, 0xDF, 0xB9, 0x47, 0x14, 0xA9, 0x84, 0x32, 0x09, 0x11, 0x8B, 0x6A, 0x1A, 0xAB, 0x8B, 0x73, 0x09, 0x08, 0x95, 0x35}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x35E5656B5DEDCD75ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x3D, 0x16, 0x7B, 0xDB, 0x5F, 0x33, 0x84, 0x84, 0x3B, 0x5D, 0x7B, 0xED, 0x22, 0x47, 0x1D, 0x3B, 0x9C, 0xDD, 0xD2, 0x4E, 0xFD, 0x89, 0x2F, 0x16, 0x92, 0xDF, 0xDD, 0x0F, 0xFD, 0x90, 0x31, 0x49}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x4941FD9F21BBB9FDULL> name(source); + return name.Text(); + }())); this->m_offButton->checked = false; this->m_offButton->Invalidate(); this->AddChild(this->m_offButton); this->m_offText = new CUIStaticText(); this->m_offText->SetSize(130, 13); this->m_offText->Move(127, 36); - const std::uint8_t offLabelNameSource[] = {0x3D, 0x04, 0x8D, 0x6E, 0x95, 0x4F, 0x38, 0x27, 0x07, 0xF7, 0xF1, 0x5F, 0x08, 0x4A, 0xB7, 0x57, 0x38, 0x6D, 0x83, 0xA9}; - thread_local EncryptedName offLabelName(offLabelNameSource); - const char* offLabelText = offLabelName.Text(); - this->m_offText->SetText(offLabelText, std::strlen(offLabelText)); + this->m_offText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x3D, 0x04, 0x8D, 0x6E, 0x95, 0x4F, 0x38, 0x27, 0x07, 0xF7, 0xF1, 0x5F, 0x08, 0x4A, 0xB7, 0x57, 0x38, 0x6D, 0x83, 0xA9}; + constexpr EncryptedSource<20> source(bytes); + thread_local EncryptedName<20, 0xE7978FB5A94DD7FDULL> name(source); + return name.Text(); + }()); this->m_offText->SetFitText(0); this->m_offText->SetAlign(0, 0); - const std::uint8_t offLabelFontSource[] = {0x2C, 0xCC, 0xAB, 0x66, 0x0A, 0x8F}; - thread_local EncryptedName offLabelFont(offLabelFontSource); - this->m_offText->SetFont(std::string(offLabelFont.Text())); + this->m_offText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2C, 0xCC, 0xAB, 0x66, 0x0A, 0x8F}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB7FD8F670FC7B96BULL> name(source); + return name.Text(); + }())); this->m_offText->SetFontHeight(12); this->m_offText->SetBold(0); this->m_offText->SetColor(0); @@ -3302,15 +3588,20 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(75, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xEA, 0x4A, 0x42, 0xC5, 0xFA, 0xD6, 0xFF, 0xD7, 0xE2, 0x6C, 0x59, 0x2B}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xEA, 0x4A, 0x42, 0xC5, 0xFA, 0xD6, 0xFF, 0xD7, 0xE2, 0x6C, 0x59, 0x2B}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0x6BDF334F2BFDAD51ULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x06, 0x48, 0x3B, 0x1C, 0x54, 0x9F}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x06, 0x48, 0x3B, 0x1C, 0x54, 0x9F}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x674D9F3975573D41ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3320,15 +3611,20 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_bgmText = new CUIStaticText(); this->m_bgmText->SetSize(50, 13); this->m_bgmText->Move(110, 12); - const std::uint8_t bgmLabelNameSource[] = {0xFA, 0xD1, 0xEB, 0x8D, 0xA7, 0x90, 0x71}; - thread_local EncryptedName bgmLabelName(bgmLabelNameSource); - const char* bgmLabelText = bgmLabelName.Text(); - this->m_bgmText->SetText(bgmLabelText, std::strlen(bgmLabelText)); + this->m_bgmText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xFA, 0xD1, 0xEB, 0x8D, 0xA7, 0x90, 0x71}; + constexpr EncryptedSource<7> source(bytes); + thread_local EncryptedName<7, 0xC9712D676B5B3943ULL> name(source); + return name.Text(); + }()); this->m_bgmText->SetFitText(0); this->m_bgmText->SetAlign(0, 0); - const std::uint8_t bgmLabelFontSource[] = {0xFE, 0x58, 0x51, 0x5A, 0xE0, 0x93}; - thread_local EncryptedName bgmLabelFont(bgmLabelFontSource); - this->m_bgmText->SetFont(std::string(bgmLabelFont.Text())); + this->m_bgmText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xFE, 0x58, 0x51, 0x5A, 0xE0, 0x93}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xED15938D333D2DB9ULL> name(source); + return name.Text(); + }())); this->m_bgmText->SetFontHeight(12); this->m_bgmText->SetBold(0); this->m_bgmText->SetColor(0); @@ -3342,21 +3638,39 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_bgmSlider->SetTotal(128); this->m_bgmSlider->SetVisible(128); this->m_bgmSlider->step = 1; - const std::uint8_t bgmSliderLeftSource[] = {0xFB, 0x48, 0xC1, 0xE1, 0x01, 0x6F, 0xEE, 0x70, 0xFD, 0x03, 0xC1, 0xD7, 0x7C, 0x1B, 0x77, 0xCE, 0x58, 0x95, 0x6E, 0x77, 0xAD, 0x90, 0x47, 0xD8, 0x5D, 0x93, 0x2F, 0x79, 0xAC, 0xD1, 0x2B}; - thread_local EncryptedName bgmSliderLeft(bgmSliderLeftSource); - const std::uint8_t bgmSliderRightSource[] = {0xD1, 0x4C, 0x93, 0x63, 0x71, 0x93, 0xB0, 0x86, 0xD7, 0x07, 0x93, 0x55, 0x0C, 0xE7, 0x29, 0x38, 0x72, 0x91, 0x3C, 0xF5, 0xDD, 0x6C, 0x07, 0x22, 0x76, 0x8B, 0x27, 0xB7, 0xD3, 0x30, 0x05, 0x4B}; - thread_local EncryptedName bgmSliderRight(bgmSliderRightSource); - static_cast(this->m_bgmSlider)->SetButtonImages(std::string(bgmSliderLeft.Text()), std::string(bgmSliderRight.Text())); - const std::uint8_t bgmSliderBackgroundSource[] = {0x4D, 0x2E, 0xD1, 0x09, 0x73, 0x67, 0xAC, 0x30, 0x4B, 0x65, 0xD1, 0x3F, 0x0E, 0x13, 0x35, 0x8E, 0xEE, 0xF3, 0x7E, 0x9F, 0xDF, 0x98, 0x04, 0x94, 0xE9, 0xAF, 0x73, 0x9E, 0xC3, 0xA9}; - thread_local EncryptedName bgmSliderBackground(bgmSliderBackgroundSource); - this->m_bgmSlider->SetBackground(std::string(bgmSliderBackground.Text())); - const std::uint8_t bgmSliderThumbLeftSource[] = {0xEB, 0xB0, 0x29, 0x51, 0x01, 0x31, 0xE8, 0xB2, 0xED, 0xFB, 0x29, 0x67, 0x7C, 0x45, 0x71, 0x0C, 0x48, 0x6D, 0x86, 0xC7, 0xAD, 0xCE, 0x4F, 0x1E, 0x59, 0x40, 0x85, 0xCE, 0xA7, 0x8B, 0x03, 0x1D, 0x46, 0x6F, 0xE9}; - thread_local EncryptedName bgmSliderThumbLeft(bgmSliderThumbLeftSource); - const std::uint8_t bgmSliderThumbMiddleSource[] = {0xCD, 0xCC, 0x4D, 0xF3, 0x85, 0x9D, 0x4A, 0x14, 0xCB, 0x87, 0x4D, 0xC5, 0xF8, 0xE9, 0xD3, 0xAA, 0x6E, 0x11, 0xE2, 0x65, 0x29, 0x62, 0xED, 0xB8, 0x7F, 0x3C, 0xE0, 0x60, 0x21, 0x7D, 0xED, 0xB4, 0x7D, 0x63}; - thread_local EncryptedName bgmSliderThumbMiddle(bgmSliderThumbMiddleSource); - const std::uint8_t bgmSliderThumbRightSource[] = {0x53, 0xDA, 0x1F, 0x15, 0x8D, 0xED, 0xCA, 0x56, 0x55, 0x91, 0x1F, 0x23, 0xF0, 0x99, 0x53, 0xE8, 0xF0, 0x07, 0xB0, 0x83, 0x21, 0x12, 0x6D, 0xFA, 0xE1, 0x2A, 0xAD, 0x86, 0x2A, 0x4B, 0x7B, 0xB5, 0xF1, 0x18, 0xAF, 0xEF}; - thread_local EncryptedName bgmSliderThumbRight(bgmSliderThumbRightSource); - static_cast(this->m_bgmSlider)->SetThumbImages(std::string(bgmSliderThumbLeft.Text()), std::string(bgmSliderThumbMiddle.Text()), std::string(bgmSliderThumbRight.Text())); + static_cast(this->m_bgmSlider)->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xFB, 0x48, 0xC1, 0xE1, 0x01, 0x6F, 0xEE, 0x70, 0xFD, 0x03, 0xC1, 0xD7, 0x7C, 0x1B, 0x77, 0xCE, 0x58, 0x95, 0x6E, 0x77, 0xAD, 0x90, 0x47, 0xD8, 0x5D, 0x93, 0x2F, 0x79, 0xAC, 0xD1, 0x2B}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xBD2BA1C11B01E73BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xD1, 0x4C, 0x93, 0x63, 0x71, 0x93, 0xB0, 0x86, 0xD7, 0x07, 0x93, 0x55, 0x0C, 0xE7, 0x29, 0x38, 0x72, 0x91, 0x3C, 0xF5, 0xDD, 0x6C, 0x07, 0x22, 0x76, 0x8B, 0x27, 0xB7, 0xD3, 0x30, 0x05, 0x4B}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x4B755DB19953E311ULL> name(source); + return name.Text(); + }())); + this->m_bgmSlider->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x4D, 0x2E, 0xD1, 0x09, 0x73, 0x67, 0xAC, 0x30, 0x4B, 0x65, 0xD1, 0x3F, 0x0E, 0x13, 0x35, 0x8E, 0xEE, 0xF3, 0x7E, 0x9F, 0xDF, 0x98, 0x04, 0x94, 0xE9, 0xAF, 0x73, 0x9E, 0xC3, 0xA9}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xFD69A9B3F311818DULL> name(source); + return name.Text(); + }())); + static_cast(this->m_bgmSlider)->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xEB, 0xB0, 0x29, 0x51, 0x01, 0x31, 0xE8, 0xB2, 0xED, 0xFB, 0x29, 0x67, 0x7C, 0x45, 0x71, 0x0C, 0x48, 0x6D, 0x86, 0xC7, 0xAD, 0xCE, 0x4F, 0x1E, 0x59, 0x40, 0x85, 0xCE, 0xA7, 0x8B, 0x03, 0x1D, 0x46, 0x6F, 0xE9}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x7F2DFFC1ABE91F2BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xCD, 0xCC, 0x4D, 0xF3, 0x85, 0x9D, 0x4A, 0x14, 0xCB, 0x87, 0x4D, 0xC5, 0xF8, 0xE9, 0xD3, 0xAA, 0x6E, 0x11, 0xE2, 0x65, 0x29, 0x62, 0xED, 0xB8, 0x7F, 0x3C, 0xE0, 0x60, 0x21, 0x7D, 0xED, 0xB4, 0x7D, 0x63}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0xD98F5345098D630DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x53, 0xDA, 0x1F, 0x15, 0x8D, 0xED, 0xCA, 0x56, 0x55, 0x91, 0x1F, 0x23, 0xF0, 0x99, 0x53, 0xE8, 0xF0, 0x07, 0xB0, 0x83, 0x21, 0x12, 0x6D, 0xFA, 0xE1, 0x2A, 0xAD, 0x86, 0x2A, 0x4B, 0x7B, 0xB5, 0xF1, 0x18, 0xAF, 0xEF}; + constexpr EncryptedSource<36> source(bytes); + thread_local EncryptedName<36, 0x9B0F234DEFDF7593ULL> name(source); + return name.Text(); + }())); this->AddChild(this->m_bgmSlider); this->m_bgmMute = new CUICheckBox(); this->m_bgmMute->SetSize(10, 10); @@ -3364,30 +3678,47 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_bgmMute->SetOnCheck([this](bool checked) { this->OnBgmMute(checked); }); this->m_bgmMute->disabled = 0; this->m_bgmMute->Invalidate(); - const std::uint8_t bgmMuteNormalSource[] = {0xAD, 0x10, 0x15, 0xDD, 0x2B, 0x87, 0x62, 0x1A, 0xAB, 0x5B, 0x15, 0xEB, 0x56, 0xF3, 0xFB, 0xB4, 0x05, 0xDA, 0xB6, 0x4C, 0x89, 0x26, 0xDF, 0x88, 0x5D, 0x91, 0xB7, 0x4A, 0x9B, 0x49}; - thread_local EncryptedName bgmMuteNormal(bgmMuteNormalSource); - const std::uint8_t bgmMuteHoverSource[] = {0x99, 0xA2, 0x0B, 0x55, 0xBD, 0xAD, 0x50, 0x7C, 0x9F, 0xE9, 0x0B, 0x63, 0xC0, 0xD9, 0xC9, 0xD2, 0x31, 0x68, 0xA8, 0xC4, 0x1F, 0x0C, 0xED, 0xEE, 0x68, 0x23, 0xA9, 0xC2, 0x0D, 0x63}; - thread_local EncryptedName bgmMuteHover(bgmMuteHoverSource); - const std::uint8_t bgmMutePressedSource[] = {0x95, 0x94, 0x41, 0x0D, 0x8D, 0x25, 0x68, 0x60, 0x93, 0xDF, 0x41, 0x3B, 0xF0, 0x51, 0xF1, 0xCE, 0x3D, 0x5E, 0xE2, 0x9C, 0x2F, 0x84, 0xD5, 0xF2, 0x65, 0x15, 0xE3, 0x9A, 0x3D, 0xEB}; - thread_local EncryptedName bgmMutePressed(bgmMutePressedSource); - const std::uint8_t bgmMuteDisabledSource[] = {0x01, 0x36, 0x0D, 0x1F, 0x41, 0xE3, 0x80, 0x14, 0x07, 0x7D, 0x0D, 0x29, 0x3C, 0x97, 0x19, 0xBA, 0xA9, 0xFC, 0xAE, 0x8E, 0xE3, 0x42, 0x3D, 0x86, 0xF1, 0xB7, 0xAF, 0x88, 0xF1, 0x2D}; - thread_local EncryptedName bgmMuteDisabled(bgmMuteDisabledSource); - this->m_bgmMute->SetImages(std::string(bgmMuteNormal.Text()), std::string(bgmMuteHover.Text()), std::string(bgmMutePressed.Text()), std::string(bgmMuteDisabled.Text())); + this->m_bgmMute->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xAD, 0x10, 0x15, 0xDD, 0x2B, 0x87, 0x62, 0x1A, 0xAB, 0x5B, 0x15, 0xEB, 0x56, 0xF3, 0xFB, 0xB4, 0x05, 0xDA, 0xB6, 0x4C, 0x89, 0x26, 0xDF, 0x88, 0x5D, 0x91, 0xB7, 0x4A, 0x9B, 0x49}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xD7A749EB27D5BF6DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x99, 0xA2, 0x0B, 0x55, 0xBD, 0xAD, 0x50, 0x7C, 0x9F, 0xE9, 0x0B, 0x63, 0xC0, 0xD9, 0xC9, 0xD2, 0x31, 0x68, 0xA8, 0xC4, 0x1F, 0x0C, 0xED, 0xEE, 0x68, 0x23, 0xA9, 0xC2, 0x0D, 0x63}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xB195637DAFCB0D59ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x95, 0x94, 0x41, 0x0D, 0x8D, 0x25, 0x68, 0x60, 0x93, 0xDF, 0x41, 0x3B, 0xF0, 0x51, 0xF1, 0xCE, 0x3D, 0x5E, 0xE2, 0x9C, 0x2F, 0x84, 0xD5, 0xF2, 0x65, 0x15, 0xE3, 0x9A, 0x3D, 0xEB}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xADADEB4DF7813B55ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x01, 0x36, 0x0D, 0x1F, 0x41, 0xE3, 0x80, 0x14, 0x07, 0x7D, 0x0D, 0x29, 0x3C, 0x97, 0x19, 0xBA, 0xA9, 0xFC, 0xAE, 0x8E, 0xE3, 0x42, 0x3D, 0x86, 0xF1, 0xB7, 0xAF, 0x88, 0xF1, 0x2D}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xD9452D81E5CD99C1ULL> name(source); + return name.Text(); + }())); this->m_bgmMute->checked = false; this->m_bgmMute->Invalidate(); this->AddChild(this->m_bgmMute); this->unknown_0090 = new CUIStaticText(); this->unknown_0090->SetSize(50, 13); this->unknown_0090->Move(348, 12); - const std::uint8_t bgmMuteLabelNameSource[] = {0xE9, 0x43, 0xD0, 0xBB, 0x4F}; - thread_local EncryptedName bgmMuteLabelName(bgmMuteLabelNameSource); - const char* bgmMuteLabelText = bgmMuteLabelName.Text(); - this->unknown_0090->SetText(bgmMuteLabelText, std::strlen(bgmMuteLabelText)); + this->unknown_0090->SetText([]() { + constexpr std::uint8_t bytes[] = {0xE9, 0x43, 0xD0, 0xBB, 0x4F}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xF715514F5961B75BULL> name(source); + return name.Text(); + }()); this->unknown_0090->SetFitText(0); this->unknown_0090->SetAlign(0, 0); - const std::uint8_t bgmMuteLabelFontSource[] = {0xDE, 0x4C, 0x91, 0x58, 0x38, 0xBB}; - thread_local EncryptedName bgmMuteLabelFont(bgmMuteLabelFontSource); - this->unknown_0090->SetFont(std::string(bgmMuteLabelFont.Text())); + this->unknown_0090->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xDE, 0x4C, 0x91, 0x58, 0x38, 0xBB}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x4191BB5531FD3999ULL> name(source); + return name.Text(); + }())); this->unknown_0090->SetFontHeight(12); this->unknown_0090->SetBold(0); this->unknown_0090->SetColor(0); @@ -3397,15 +3728,20 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_effectText = new CUIStaticText(); this->m_effectText->SetSize(50, 13); this->m_effectText->Move(110, 36); - const std::uint8_t effectLabelNameSource[] = {0x1B, 0x86, 0xDF, 0xEB, 0x69, 0xA2, 0x9D}; - thread_local EncryptedName effectLabelName(effectLabelNameSource); - const char* effectLabelText = effectLabelName.Text(); - this->m_effectText->SetText(effectLabelText, std::strlen(effectLabelText)); + this->m_effectText->SetText([]() { + constexpr std::uint8_t bytes[] = {0x1B, 0x86, 0xDF, 0xEB, 0x69, 0xA2, 0x9D}; + constexpr EncryptedSource<7> source(bytes); + thread_local EncryptedName<7, 0xB19D1FA9116F39D3ULL> name(source); + return name.Text(); + }()); this->m_effectText->SetFitText(0); this->m_effectText->SetAlign(0, 0); - const std::uint8_t effectLabelFontSource[] = {0xE8, 0x7C, 0x65, 0x8E, 0xAA, 0xC9}; - thread_local EncryptedName effectLabelFont(effectLabelFontSource); - this->m_effectText->SetFont(std::string(effectLabelFont.Text())); + this->m_effectText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xE8, 0x7C, 0x65, 0x8E, 0xAA, 0xC9}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x9569C9C7E70909AFULL> name(source); + return name.Text(); + }())); this->m_effectText->SetFontHeight(12); this->m_effectText->SetBold(0); this->m_effectText->SetColor(0); @@ -3419,21 +3755,39 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_effectSlider->SetTotal(128); this->m_effectSlider->SetVisible(128); this->m_effectSlider->step = 1; - const std::uint8_t effectSliderLeftSource[] = {0xAB, 0xE4, 0x7B, 0xFB, 0x47, 0xA1, 0x6C, 0x7A, 0xAD, 0xAF, 0x7B, 0xCD, 0x3A, 0xD5, 0xF5, 0xC4, 0x08, 0x39, 0xD4, 0x6D, 0xEB, 0x5E, 0xC5, 0xD2, 0x0D, 0x3F, 0x95, 0x63, 0xEA, 0x1F, 0xA9}; - thread_local EncryptedName effectSliderLeft(effectSliderLeftSource); - const std::uint8_t effectSliderRightSource[] = {0x09, 0xAE, 0x2D, 0x15, 0x27, 0xA7, 0xDA, 0x6E, 0x0F, 0xE5, 0x2D, 0x23, 0x5A, 0xD3, 0x43, 0xD0, 0xAA, 0x73, 0x82, 0x83, 0x8B, 0x58, 0x6D, 0xCA, 0xAE, 0x69, 0x99, 0xC1, 0x85, 0x04, 0x6F, 0xA3}; - thread_local EncryptedName effectSliderRight(effectSliderRightSource); - static_cast(this->m_effectSlider)->SetButtonImages(std::string(effectSliderLeft.Text()), std::string(effectSliderRight.Text())); - const std::uint8_t effectSliderBackgroundSource[] = {0x91, 0x58, 0x9B, 0x8D, 0x5D, 0x6F, 0xE2, 0x7C, 0x97, 0x13, 0x9B, 0xBB, 0x20, 0x1B, 0x7B, 0xC2, 0x32, 0x85, 0x34, 0x1B, 0xF1, 0x90, 0x4A, 0xD8, 0x35, 0xD9, 0x39, 0x1A, 0xED, 0xA1}; - thread_local EncryptedName effectSliderBackground(effectSliderBackgroundSource); - this->m_effectSlider->SetBackground(std::string(effectSliderBackground.Text())); - const std::uint8_t effectSliderThumbLeftSource[] = {0x9D, 0x44, 0xB3, 0xB3, 0x5B, 0x87, 0xA4, 0xC2, 0x9B, 0x0F, 0xB3, 0x85, 0x26, 0xF3, 0x3D, 0x7C, 0x3E, 0x99, 0x1C, 0x25, 0xF7, 0x78, 0x03, 0x6E, 0x2F, 0xB4, 0x1F, 0x2C, 0xFD, 0x3D, 0x4F, 0x6D, 0x30, 0x9B, 0x73}; - thread_local EncryptedName effectSliderThumbLeft(effectSliderThumbLeftSource); - const std::uint8_t effectSliderThumbMiddleSource[] = {0xBF, 0xF4, 0xB5, 0x5F, 0x67, 0x3B, 0x24, 0x48, 0xB9, 0xBF, 0xB5, 0x69, 0x1A, 0x4F, 0xBD, 0xF6, 0x1C, 0x29, 0x1A, 0xC9, 0xCB, 0xC4, 0x83, 0xE4, 0x0D, 0x04, 0x18, 0xCC, 0xC3, 0xDB, 0x83, 0xE8, 0x0F, 0x5B}; - thread_local EncryptedName effectSliderThumbMiddle(effectSliderThumbMiddleSource); - const std::uint8_t effectSliderThumbRightSource[] = {0xE7, 0x0A, 0x53, 0x65, 0xC1, 0x9D, 0xA4, 0x60, 0xE1, 0x41, 0x53, 0x53, 0xBC, 0xE9, 0x3D, 0xDE, 0x44, 0xD7, 0xFC, 0xF3, 0x6D, 0x62, 0x03, 0xCC, 0x55, 0xFA, 0xE1, 0xF6, 0x66, 0x3B, 0x15, 0x83, 0x45, 0xC8, 0xE3, 0x9F}; - thread_local EncryptedName effectSliderThumbRight(effectSliderThumbRightSource); - static_cast(this->m_effectSlider)->SetThumbImages(std::string(effectSliderThumbLeft.Text()), std::string(effectSliderThumbMiddle.Text()), std::string(effectSliderThumbRight.Text())); + static_cast(this->m_effectSlider)->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xAB, 0xE4, 0x7B, 0xFB, 0x47, 0xA1, 0x6C, 0x7A, 0xAD, 0xAF, 0x7B, 0xCD, 0x3A, 0xD5, 0xF5, 0xC4, 0x08, 0x39, 0xD4, 0x6D, 0xEB, 0x5E, 0xC5, 0xD2, 0x0D, 0x3F, 0x95, 0x63, 0xEA, 0x1F, 0xA9}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xB7A96F8701BB4B6BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x09, 0xAE, 0x2D, 0x15, 0x27, 0xA7, 0xDA, 0x6E, 0x0F, 0xE5, 0x2D, 0x23, 0x5A, 0xD3, 0x43, 0xD0, 0xAA, 0x73, 0x82, 0x83, 0x8B, 0x58, 0x6D, 0xCA, 0xAE, 0x69, 0x99, 0xC1, 0x85, 0x04, 0x6F, 0xA3}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xA31F69E7EFED01C9ULL> name(source); + return name.Text(); + }())); + this->m_effectSlider->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x91, 0x58, 0x9B, 0x8D, 0x5D, 0x6F, 0xE2, 0x7C, 0x97, 0x13, 0x9B, 0xBB, 0x20, 0x1B, 0x7B, 0xC2, 0x32, 0x85, 0x34, 0x1B, 0xF1, 0x90, 0x4A, 0xD8, 0x35, 0xD9, 0x39, 0x1A, 0xED, 0xA1}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xB127A19D775BF751ULL> name(source); + return name.Text(); + }())); + static_cast(this->m_effectSlider)->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x9D, 0x44, 0xB3, 0xB3, 0x5B, 0x87, 0xA4, 0xC2, 0x9B, 0x0F, 0xB3, 0x85, 0x26, 0xF3, 0x3D, 0x7C, 0x3E, 0x99, 0x1C, 0x25, 0xF7, 0x78, 0x03, 0x6E, 0x2F, 0xB4, 0x1F, 0x2C, 0xFD, 0x3D, 0x4F, 0x6D, 0x30, 0x9B, 0x73}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x0F61499B4973EB5DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xBF, 0xF4, 0xB5, 0x5F, 0x67, 0x3B, 0x24, 0x48, 0xB9, 0xBF, 0xB5, 0x69, 0x1A, 0x4F, 0xBD, 0xF6, 0x1C, 0x29, 0x1A, 0xC9, 0xCB, 0xC4, 0x83, 0xE4, 0x0D, 0x04, 0x18, 0xCC, 0xC3, 0xDB, 0x83, 0xE8, 0x0F, 0x5B}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0x85E1F5A7A5755B7FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xE7, 0x0A, 0x53, 0x65, 0xC1, 0x9D, 0xA4, 0x60, 0xE1, 0x41, 0x53, 0x53, 0xBC, 0xE9, 0x3D, 0xDE, 0x44, 0xD7, 0xFC, 0xF3, 0x6D, 0x62, 0x03, 0xCC, 0x55, 0xFA, 0xE1, 0xF6, 0x66, 0x3B, 0x15, 0x83, 0x45, 0xC8, 0xE3, 0x9F}; + constexpr EncryptedSource<36> source(bytes); + thread_local EncryptedName<36, 0xAD6153019F93A527ULL> name(source); + return name.Text(); + }())); this->AddChild(this->m_effectSlider); this->m_effectMute = new CUICheckBox(); this->m_effectMute->SetSize(10, 10); @@ -3441,30 +3795,47 @@ void GameSettingsUI::CUIGroupSound::Slot15(int width, int height) { this->m_effectMute->SetOnCheck([this](bool checked) { this->OnEffectMute(checked); }); this->m_effectMute->disabled = 0; this->m_effectMute->Invalidate(); - const std::uint8_t effectMuteNormalSource[] = {0x99, 0xD0, 0x67, 0x5B, 0xD7, 0x0B, 0x30, 0x72, 0x9F, 0x9B, 0x67, 0x6D, 0xAA, 0x7F, 0xA9, 0xDC, 0x31, 0x1A, 0xC4, 0xCA, 0x75, 0xAA, 0x8D, 0xE0, 0x69, 0x51, 0xC5, 0xCC, 0x67, 0xC5}; - thread_local EncryptedName effectMuteNormal(effectMuteNormalSource); - const std::uint8_t effectMuteHoverSource[] = {0xFD, 0xD2, 0x95, 0xDB, 0x01, 0xBB, 0x5C, 0xA8, 0xFB, 0x99, 0x95, 0xED, 0x7C, 0xCF, 0xC5, 0x06, 0x55, 0x18, 0x36, 0x4A, 0xA3, 0x1A, 0xE1, 0x3A, 0x0C, 0x53, 0x37, 0x4C, 0xB1, 0x75}; - thread_local EncryptedName effectMuteHover(effectMuteHoverSource); - const std::uint8_t effectMutePressedSource[] = {0x51, 0xC4, 0xAB, 0xE5, 0x43, 0x05, 0x0A, 0x8C, 0x57, 0x8F, 0xAB, 0xD3, 0x3E, 0x71, 0x93, 0x22, 0xF9, 0x0E, 0x08, 0x74, 0xE1, 0xA4, 0xB7, 0x1E, 0xA1, 0x45, 0x09, 0x72, 0xF3, 0xCB}; - thread_local EncryptedName effectMutePressed(effectMutePressedSource); - const std::uint8_t effectMuteDisabledSource[] = {0xB5, 0x90, 0xA1, 0x51, 0xEF, 0xBF, 0x22, 0x90, 0xB3, 0xDB, 0xA1, 0x67, 0x92, 0xCB, 0xBB, 0x3E, 0x1D, 0x5A, 0x02, 0xC0, 0x4D, 0x1E, 0x9F, 0x02, 0x45, 0x11, 0x03, 0xC6, 0x5F, 0x71}; - thread_local EncryptedName effectMuteDisabled(effectMuteDisabledSource); - this->m_effectMute->SetImages(std::string(effectMuteNormal.Text()), std::string(effectMuteHover.Text()), std::string(effectMutePressed.Text()), std::string(effectMuteDisabled.Text())); + this->m_effectMute->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x99, 0xD0, 0x67, 0x5B, 0xD7, 0x0B, 0x30, 0x72, 0x9F, 0x9B, 0x67, 0x6D, 0xAA, 0x7F, 0xA9, 0xDC, 0x31, 0x1A, 0xC4, 0xCA, 0x75, 0xAA, 0x8D, 0xE0, 0x69, 0x51, 0xC5, 0xCC, 0x67, 0xC5}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xBFF5C517A1A77F59ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xFD, 0xD2, 0x95, 0xDB, 0x01, 0xBB, 0x5C, 0xA8, 0xFB, 0x99, 0x95, 0xED, 0x7C, 0xCF, 0xC5, 0x06, 0x55, 0x18, 0x36, 0x4A, 0xA3, 0x1A, 0xE1, 0x3A, 0x0C, 0x53, 0x37, 0x4C, 0xB1, 0x75}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x659975C121557D3DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x51, 0xC4, 0xAB, 0xE5, 0x43, 0x05, 0x0A, 0x8C, 0x57, 0x8F, 0xAB, 0xD3, 0x3E, 0x71, 0x93, 0x22, 0xF9, 0x0E, 0x08, 0x74, 0xE1, 0xA4, 0xB7, 0x1E, 0xA1, 0x45, 0x09, 0x72, 0xF3, 0xCB}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x41CFCB831F6B6B91ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xB5, 0x90, 0xA1, 0x51, 0xEF, 0xBF, 0x22, 0x90, 0xB3, 0xDB, 0xA1, 0x67, 0x92, 0xCB, 0xBB, 0x3E, 0x1D, 0x5A, 0x02, 0xC0, 0x4D, 0x1E, 0x9F, 0x02, 0x45, 0x11, 0x03, 0xC6, 0x5F, 0x71}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x5DE7712FAB613F75ULL> name(source); + return name.Text(); + }())); this->m_effectMute->checked = false; this->m_effectMute->Invalidate(); this->AddChild(this->m_effectMute); this->unknown_00A0 = new CUIStaticText(); this->unknown_00A0->SetSize(50, 13); this->unknown_00A0->Move(348, 36); - const std::uint8_t effectMuteLabelNameSource[] = {0xB3, 0xF9, 0xF6, 0xBF, 0xED}; - thread_local EncryptedName effectMuteLabelName(effectMuteLabelNameSource); - const char* effectMuteLabelText = effectMuteLabelName.Text(); - this->unknown_00A0->SetText(effectMuteLabelText, std::strlen(effectMuteLabelText)); + this->unknown_00A0->SetText([]() { + constexpr std::uint8_t bytes[] = {0xB3, 0xF9, 0xF6, 0xBF, 0xED}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x81F58DED5D470D01ULL> name(source); + return name.Text(); + }()); this->unknown_00A0->SetFitText(0); this->unknown_00A0->SetAlign(0, 0); - const std::uint8_t effectMuteLabelFontSource[] = {0x8C, 0x98, 0xDF, 0x42, 0xEA, 0x31}; - thread_local EncryptedName effectMuteLabelFont(effectMuteLabelFontSource); - this->unknown_00A0->SetFont(std::string(effectMuteLabelFont.Text())); + this->unknown_00A0->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x8C, 0x98, 0xDF, 0x42, 0xEA, 0x31}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x454D31872BB3EDCBULL> name(source); + return name.Text(); + }())); this->unknown_00A0->SetFontHeight(12); this->unknown_00A0->SetBold(0); this->unknown_00A0->SetColor(0); @@ -3479,15 +3850,20 @@ void GameSettingsUI::CUIGroupSpriteDetailLevel::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xAE, 0x7D, 0xC4, 0xD4, 0x4D, 0x62, 0xD7, 0x83, 0xD5, 0x69, 0x23, 0xD2, 0x23, 0x2A, 0xE4, 0xFA, 0xA6, 0xC7}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xAE, 0x7D, 0xC4, 0xD4, 0x4D, 0x62, 0xD7, 0x83, 0xD5, 0x69, 0x23, 0xD2, 0x23, 0x2A, 0xE4, 0xFA, 0xA6, 0xC7}; + constexpr EncryptedSource<18> source(bytes); + thread_local EncryptedName<18, 0x4F1791FB1503C713ULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x94, 0x98, 0xFB, 0x7C, 0x20, 0x5B}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x94, 0x98, 0xFB, 0x7C, 0x20, 0x5B}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xA1A55B4D1597EDD3ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3501,21 +3877,39 @@ void GameSettingsUI::CUIGroupSpriteDetailLevel::Slot15(int width, int height) { this->m_slider->SetTotal(128); this->m_slider->SetVisible(128); this->m_slider->step = 1; - const std::uint8_t sliderLeftSource[] = {0xC1, 0xF8, 0x57, 0x25, 0xD3, 0x4B, 0x96, 0x1C, 0xC7, 0xB3, 0x57, 0x13, 0xAE, 0x3F, 0x0F, 0xA2, 0x62, 0x25, 0xF8, 0xB3, 0x7F, 0xB4, 0x3F, 0xB4, 0x67, 0x23, 0xB9, 0xBD, 0x7E, 0xF5, 0x53}; - thread_local EncryptedName sliderLeft(sliderLeftSource); - const std::uint8_t sliderRightSource[] = {0x5F, 0x6C, 0x87, 0x47, 0x2B, 0x89, 0x24, 0x5C, 0x59, 0x27, 0x87, 0x71, 0x56, 0xFD, 0xBD, 0xE2, 0xFC, 0xB1, 0x28, 0xD1, 0x87, 0x76, 0x93, 0xF8, 0xF8, 0xAB, 0x33, 0x93, 0x89, 0x2A, 0x91, 0x91}; - thread_local EncryptedName sliderRight(sliderRightSource); - static_cast(this->m_slider)->SetButtonImages(std::string(sliderLeft.Text()), std::string(sliderRight.Text())); - const std::uint8_t sliderBackgroundSource[] = {0x45, 0xCE, 0x4B, 0xED, 0xBF, 0xAF, 0x60, 0x62, 0x43, 0x85, 0x4B, 0xDB, 0xC2, 0xDB, 0xF9, 0xDC, 0xE6, 0x13, 0xE4, 0x7B, 0x13, 0x50, 0xC8, 0xC6, 0xE1, 0x4F, 0xE9, 0x7A, 0x0F, 0x61}; - thread_local EncryptedName sliderBackground(sliderBackgroundSource); - this->m_slider->SetBackground(std::string(sliderBackground.Text())); - const std::uint8_t sliderThumbLeftSource[] = {0x8D, 0x8A, 0x59, 0xB3, 0x93, 0x8D, 0x44, 0xCA, 0x8B, 0xC1, 0x59, 0x85, 0xEE, 0xF9, 0xDD, 0x74, 0x2E, 0x57, 0xF6, 0x25, 0x3F, 0x72, 0xE3, 0x66, 0x3F, 0x7A, 0xF5, 0x2C, 0x35, 0x37, 0xAF, 0x65, 0x20, 0x55, 0x99}; - thread_local EncryptedName sliderThumbLeft(sliderThumbLeftSource); - const std::uint8_t sliderThumbMiddleSource[] = {0xA1, 0x00, 0x4F, 0xC3, 0x4B, 0x07, 0x3A, 0xDA, 0xA7, 0x4B, 0x4F, 0xF5, 0x36, 0x73, 0xA3, 0x64, 0x02, 0xDD, 0xE0, 0x55, 0xE7, 0xF8, 0x9D, 0x76, 0x13, 0xF0, 0xE2, 0x50, 0xEF, 0xE7, 0x9D, 0x7A, 0x11, 0xAF}; - thread_local EncryptedName sliderThumbMiddle(sliderThumbMiddleSource); - const std::uint8_t sliderThumbRightSource[] = {0xF3, 0x3C, 0x8D, 0x6F, 0x5B, 0x5B, 0x9E, 0x56, 0xF5, 0x77, 0x8D, 0x59, 0x26, 0x2F, 0x07, 0xE8, 0x50, 0xE1, 0x22, 0xF9, 0xF7, 0xA4, 0x39, 0xFA, 0x41, 0xCC, 0x3F, 0xFC, 0xFC, 0xFD, 0x2F, 0xB5, 0x51, 0xFE, 0x3D, 0x95}; - thread_local EncryptedName sliderThumbRight(sliderThumbRightSource); - static_cast(this->m_slider)->SetThumbImages(std::string(sliderThumbLeft.Text()), std::string(sliderThumbMiddle.Text()), std::string(sliderThumbRight.Text())); + static_cast(this->m_slider)->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xC1, 0xF8, 0x57, 0x25, 0xD3, 0x4B, 0x96, 0x1C, 0xC7, 0xB3, 0x57, 0x13, 0xAE, 0x3F, 0x0F, 0xA2, 0x62, 0x25, 0xF8, 0xB3, 0x7F, 0xB4, 0x3F, 0xB4, 0x67, 0x23, 0xB9, 0xBD, 0x7E, 0xF5, 0x53}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xD1538513DF975701ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x5F, 0x6C, 0x87, 0x47, 0x2B, 0x89, 0x24, 0x5C, 0x59, 0x27, 0x87, 0x71, 0x56, 0xFD, 0xBD, 0xE2, 0xFC, 0xB1, 0x28, 0xD1, 0x87, 0x76, 0x93, 0xF8, 0xF8, 0xAB, 0x33, 0x93, 0x89, 0x2A, 0x91, 0x91}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x91E147EBBD47C39FULL> name(source); + return name.Text(); + }())); + this->m_slider->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x45, 0xCE, 0x4B, 0xED, 0xBF, 0xAF, 0x60, 0x62, 0x43, 0x85, 0x4B, 0xDB, 0xC2, 0xDB, 0xF9, 0xDC, 0xE6, 0x13, 0xE4, 0x7B, 0x13, 0x50, 0xC8, 0xC6, 0xE1, 0x4F, 0xE9, 0x7A, 0x0F, 0x61}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xAFA5617F178B6185ULL> name(source); + return name.Text(); + }())); + static_cast(this->m_slider)->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x8D, 0x8A, 0x59, 0xB3, 0x93, 0x8D, 0x44, 0xCA, 0x8B, 0xC1, 0x59, 0x85, 0xEE, 0xF9, 0xDD, 0x74, 0x2E, 0x57, 0xF6, 0x25, 0x3F, 0x72, 0xE3, 0x66, 0x3F, 0x7A, 0xF5, 0x2C, 0x35, 0x37, 0xAF, 0x65, 0x20, 0x55, 0x99}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x078143534999254DULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xA1, 0x00, 0x4F, 0xC3, 0x4B, 0x07, 0x3A, 0xDA, 0xA7, 0x4B, 0x4F, 0xF5, 0x36, 0x73, 0xA3, 0x64, 0x02, 0xDD, 0xE0, 0x55, 0xE7, 0xF8, 0x9D, 0x76, 0x13, 0xF0, 0xE2, 0x50, 0xEF, 0xE7, 0x9D, 0x7A, 0x11, 0xAF}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0x17FFC98B398FAF61ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xF3, 0x3C, 0x8D, 0x6F, 0x5B, 0x5B, 0x9E, 0x56, 0xF5, 0x77, 0x8D, 0x59, 0x26, 0x2F, 0x07, 0xE8, 0x50, 0xE1, 0x22, 0xF9, 0xF7, 0xA4, 0x39, 0xFA, 0x41, 0xCC, 0x3F, 0xFC, 0xFC, 0xFD, 0x2F, 0xB5, 0x51, 0xFE, 0x3D, 0x95}; + constexpr EncryptedSource<36> source(bytes); + thread_local EncryptedName<36, 0x9B5B959B954D9333ULL> name(source); + return name.Text(); + }())); this->AddChild(this->m_slider); } @@ -3525,15 +3919,20 @@ void GameSettingsUI::CUIGroupTextureDetailLevel::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0x34, 0x1B, 0x54, 0x07, 0x6E, 0xC9, 0x55, 0xBA, 0x29, 0x78, 0x1A, 0x08, 0x18, 0x0D}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0x34, 0x1B, 0x54, 0x07, 0x6E, 0xC9, 0x55, 0xBA, 0x29, 0x78, 0x1A, 0x08, 0x18, 0x0D}; + constexpr EncryptedSource<14> source(bytes); + thread_local EncryptedName<14, 0x7D750DADBDE9C3F1ULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0xF8, 0xC8, 0xB3, 0x56, 0x20, 0x2D}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xF8, 0xC8, 0xB3, 0x56, 0x20, 0x2D}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x33832D4D3FDFBDBFULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3547,21 +3946,39 @@ void GameSettingsUI::CUIGroupTextureDetailLevel::Slot15(int width, int height) { this->m_slider->SetTotal(128); this->m_slider->SetVisible(128); this->m_slider->step = 1; - const std::uint8_t sliderLeftSource[] = {0x6F, 0xE0, 0xEB, 0x19, 0x1F, 0xDB, 0x96, 0xF2, 0x69, 0xAB, 0xEB, 0x2F, 0x62, 0xAF, 0x0F, 0x4C, 0xCC, 0x3D, 0x44, 0x8F, 0xB3, 0x24, 0x3F, 0x5A, 0xC9, 0x3B, 0x05, 0x81, 0xB2, 0x65, 0x53}; - thread_local EncryptedName sliderLeft(sliderLeftSource); - const std::uint8_t sliderRightSource[] = {0x29, 0x7C, 0xFD, 0xFD, 0xF5, 0xE7, 0xCE, 0x28, 0x2F, 0x37, 0xFD, 0xCB, 0x88, 0x93, 0x57, 0x96, 0x8A, 0xA1, 0x52, 0x6B, 0x59, 0x18, 0x79, 0x8C, 0x8E, 0xBB, 0x49, 0x29, 0x57, 0x44, 0x7B, 0xE5}; - thread_local EncryptedName sliderRight(sliderRightSource); - static_cast(this->m_slider)->SetButtonImages(std::string(sliderLeft.Text()), std::string(sliderRight.Text())); - const std::uint8_t sliderBackgroundSource[] = {0x51, 0x6C, 0x7D, 0x9B, 0xA5, 0x5F, 0xF8, 0xF4, 0x57, 0x27, 0x7D, 0xAD, 0xD8, 0x2B, 0x61, 0x4A, 0xF2, 0xB1, 0xD2, 0x0D, 0x09, 0xA0, 0x50, 0x50, 0xF5, 0xED, 0xDF, 0x0C, 0x15, 0x91}; - thread_local EncryptedName sliderBackground(sliderBackgroundSource); - this->m_slider->SetBackground(std::string(sliderBackground.Text())); - const std::uint8_t sliderThumbLeftSource[] = {0x55, 0x52, 0xD1, 0x49, 0x91, 0xAB, 0x50, 0xFC, 0x53, 0x19, 0xD1, 0x7F, 0xEC, 0xDF, 0xC9, 0x42, 0xF6, 0x8F, 0x7E, 0xDF, 0x3D, 0x54, 0xF7, 0x50, 0xE7, 0xA2, 0x7D, 0xD6, 0x37, 0x11, 0xBB, 0x53, 0xF8, 0x8D, 0x11}; - thread_local EncryptedName sliderThumbLeft(sliderThumbLeftSource); - const std::uint8_t sliderThumbMiddleSource[] = {0x19, 0x96, 0xD3, 0x83, 0x0B, 0x4D, 0xB8, 0x32, 0x1F, 0xDD, 0xD3, 0xB5, 0x76, 0x39, 0x21, 0x8C, 0xBA, 0x4B, 0x7C, 0x15, 0xA7, 0xB2, 0x1F, 0x9E, 0xAB, 0x66, 0x7E, 0x10, 0xAF, 0xAD, 0x1F, 0x92, 0xA9, 0x39}; - thread_local EncryptedName sliderThumbMiddle(sliderThumbMiddleSource); - const std::uint8_t sliderThumbRightSource[] = {0xD5, 0x3C, 0x73, 0x3B, 0x27, 0x8D, 0x94, 0x20, 0xD3, 0x77, 0x73, 0x0D, 0x5A, 0xF9, 0x0D, 0x9E, 0x76, 0xE1, 0xDC, 0xAD, 0x8B, 0x72, 0x33, 0x8C, 0x67, 0xCC, 0xC1, 0xA8, 0x80, 0x2B, 0x25, 0xC3, 0x77, 0xFE, 0xC3, 0xC1}; - thread_local EncryptedName sliderThumbRight(sliderThumbRightSource); - static_cast(this->m_slider)->SetThumbImages(std::string(sliderThumbLeft.Text()), std::string(sliderThumbMiddle.Text()), std::string(sliderThumbRight.Text())); + static_cast(this->m_slider)->SetButtonImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x6F, 0xE0, 0xEB, 0x19, 0x1F, 0xDB, 0x96, 0xF2, 0x69, 0xAB, 0xEB, 0x2F, 0x62, 0xAF, 0x0F, 0x4C, 0xCC, 0x3D, 0x44, 0x8F, 0xB3, 0x24, 0x3F, 0x5A, 0xC9, 0x3B, 0x05, 0x81, 0xB2, 0x65, 0x53}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x3F5315DFE32B4FAFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x29, 0x7C, 0xFD, 0xFD, 0xF5, 0xE7, 0xCE, 0x28, 0x2F, 0x37, 0xFD, 0xCB, 0x88, 0x93, 0x57, 0x96, 0x8A, 0xA1, 0x52, 0x6B, 0x59, 0x18, 0x79, 0x8C, 0x8E, 0xBB, 0x49, 0x29, 0x57, 0x44, 0x7B, 0xE5}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0xE50B2935073DD3E9ULL> name(source); + return name.Text(); + }())); + this->m_slider->SetBackground(std::string([]() { + constexpr std::uint8_t bytes[] = {0x51, 0x6C, 0x7D, 0x9B, 0xA5, 0x5F, 0xF8, 0xF4, 0x57, 0x27, 0x7D, 0xAD, 0xD8, 0x2B, 0x61, 0x4A, 0xF2, 0xB1, 0xD2, 0x0D, 0x09, 0xA0, 0x50, 0x50, 0xF5, 0xED, 0xDF, 0x0C, 0x15, 0x91}; + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x393D916561BDC391ULL> name(source); + return name.Text(); + }())); + static_cast(this->m_slider)->SetThumbImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x55, 0x52, 0xD1, 0x49, 0x91, 0xAB, 0x50, 0xFC, 0x53, 0x19, 0xD1, 0x7F, 0xEC, 0xDF, 0xC9, 0x42, 0xF6, 0x8F, 0x7E, 0xDF, 0x3D, 0x54, 0xF7, 0x50, 0xE7, 0xA2, 0x7D, 0xD6, 0x37, 0x11, 0xBB, 0x53, 0xF8, 0x8D, 0x11}; + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x31956551B311FD95ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x19, 0x96, 0xD3, 0x83, 0x0B, 0x4D, 0xB8, 0x32, 0x1F, 0xDD, 0xD3, 0xB5, 0x76, 0x39, 0x21, 0x8C, 0xBA, 0x4B, 0x7C, 0x15, 0xA7, 0xB2, 0x1F, 0x9E, 0xAB, 0x66, 0x7E, 0x10, 0xAF, 0xAD, 0x1F, 0x92, 0xA9, 0x39}; + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0xFF7D83CB791339D9ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xD5, 0x3C, 0x73, 0x3B, 0x27, 0x8D, 0x94, 0x20, 0xD3, 0x77, 0x73, 0x0D, 0x5A, 0xF9, 0x0D, 0x9E, 0x76, 0xE1, 0xDC, 0xAD, 0x8B, 0x72, 0x33, 0x8C, 0x67, 0xCC, 0xC1, 0xA8, 0x80, 0x2B, 0x25, 0xC3, 0x77, 0xFE, 0xC3, 0xC1}; + constexpr EncryptedSource<36> source(bytes); + thread_local EncryptedName<36, 0xED5143E7C1B39315ULL> name(source); + return name.Text(); + }())); this->AddChild(this->m_slider); } @@ -3571,15 +3988,20 @@ void GameSettingsUI::CUIGroupTrilinear::Slot15(int width, int height) { this->m_title = new CUIStaticText(); this->m_title->SetSize(130, 13); this->m_title->Move(19, 12); - const std::uint8_t titleNameSource[] = {0xAB, 0xCD, 0x83, 0xDE, 0x65, 0xCF, 0x3B, 0x16, 0xD3, 0x8D, 0x15, 0xEA, 0x6F, 0xC6, 0x42, 0x61, 0xD8, 0x63}; - thread_local EncryptedName titleName(titleNameSource); - const char* titleText = titleName.Text(); - this->m_title->SetText(titleText, std::strlen(titleText)); + this->m_title->SetText([]() { + constexpr std::uint8_t bytes[] = {0xAB, 0xCD, 0x83, 0xDE, 0x65, 0xCF, 0x3B, 0x16, 0xD3, 0x8D, 0x15, 0xEA, 0x6F, 0xC6, 0x42, 0x61, 0xD8, 0x63}; + constexpr EncryptedSource<18> source(bytes); + thread_local EncryptedName<18, 0xD98F03A52D35636DULL> name(source); + return name.Text(); + }()); this->m_title->SetFitText(0); this->m_title->SetAlign(0, 0); - const std::uint8_t titleFontSource[] = {0x96, 0x6C, 0xF1, 0xE6, 0x06, 0x8B}; - thread_local EncryptedName titleFont(titleFontSource); - this->m_title->SetFont(std::string(titleFont.Text())); + this->m_title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x96, 0x6C, 0xF1, 0xE6, 0x06, 0x8B}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x0F0F8B6B8F9D19D1ULL> name(source); + return name.Text(); + }())); this->m_title->SetFontHeight(12); this->m_title->SetBold(1); this->m_title->SetColor(0); @@ -3592,30 +4014,47 @@ void GameSettingsUI::CUIGroupTrilinear::Slot15(int width, int height) { this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { OnTrilinearOptionChanged(reinterpret_cast(button)); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); - const std::uint8_t onButtonNormalSource[] = {0xB1, 0x56, 0x99, 0x0F, 0x41, 0xD3, 0xA0, 0x5C, 0xB7, 0x1D, 0x99, 0x39, 0x3C, 0xA7, 0x39, 0xE3, 0x10, 0x9D, 0x30, 0x9A, 0xE3, 0x69, 0x0B, 0xCE, 0x1E, 0x9F, 0x3F, 0xDB, 0xE3, 0x70, 0x15, 0x91}; - thread_local EncryptedName onButtonNormal(onButtonNormalSource); - const std::uint8_t onButtonHoverSource[] = {0xCB, 0xD4, 0x1F, 0x9B, 0x8B, 0xA9, 0x14, 0xBE, 0xCD, 0x9F, 0x1F, 0xAD, 0xF6, 0xDD, 0x8D, 0x01, 0x6A, 0x1F, 0xB6, 0x0E, 0x29, 0x13, 0xBF, 0x2C, 0x64, 0x15, 0xF1, 0x03, 0x26, 0x17, 0xD1}; - thread_local EncryptedName onButtonHover(onButtonHoverSource); - const std::uint8_t onButtonPressedSource[] = {0x17, 0xE0, 0xC3, 0x6F, 0x19, 0x4B, 0x6A, 0xF2, 0x11, 0xAB, 0xC3, 0x59, 0x64, 0x3F, 0xF3, 0x4D, 0xB6, 0x2B, 0x6A, 0xFA, 0xBB, 0xF1, 0xC1, 0x60, 0xB8, 0x29, 0x65, 0xBB, 0xBB, 0xE8, 0xDF, 0x3F}; - thread_local EncryptedName onButtonPressed(onButtonPressedSource); - const std::uint8_t onButtonDisabledSource[] = {0x79, 0xA2, 0xEF, 0x5B, 0x83, 0x35, 0xCA, 0x84, 0x7F, 0xE9, 0xEF, 0x6D, 0xFE, 0x41, 0x53, 0x3B, 0xD8, 0x69, 0x46, 0xCE, 0x21, 0x8F, 0x61, 0x16, 0xD6, 0x6B, 0x49, 0x8F, 0x21, 0x96, 0x7F, 0x49}; - thread_local EncryptedName onButtonDisabled(onButtonDisabledSource); - this->m_onButton->SetImages(std::string(onButtonNormal.Text()), std::string(onButtonHover.Text()), std::string(onButtonPressed.Text()), std::string(onButtonDisabled.Text())); + this->m_onButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xB1, 0x56, 0x99, 0x0F, 0x41, 0xD3, 0xA0, 0x5C, 0xB7, 0x1D, 0x99, 0x39, 0x3C, 0xA7, 0x39, 0xE3, 0x10, 0x9D, 0x30, 0x9A, 0xE3, 0x69, 0x0B, 0xCE, 0x1E, 0x9F, 0x3F, 0xDB, 0xE3, 0x70, 0x15, 0x91}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x91651D81F559F971ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xCB, 0xD4, 0x1F, 0x9B, 0x8B, 0xA9, 0x14, 0xBE, 0xCD, 0x9F, 0x1F, 0xAD, 0xF6, 0xDD, 0x8D, 0x01, 0x6A, 0x1F, 0xB6, 0x0E, 0x29, 0x13, 0xBF, 0x2C, 0x64, 0x15, 0xF1, 0x03, 0x26, 0x17, 0xD1}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x73D1674B61DF7B0BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x17, 0xE0, 0xC3, 0x6F, 0x19, 0x4B, 0x6A, 0xF2, 0x11, 0xAB, 0xC3, 0x59, 0x64, 0x3F, 0xF3, 0x4D, 0xB6, 0x2B, 0x6A, 0xFA, 0xBB, 0xF1, 0xC1, 0x60, 0xB8, 0x29, 0x65, 0xBB, 0xBB, 0xE8, 0xDF, 0x3F}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x3FAF85D995034FD7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x79, 0xA2, 0xEF, 0x5B, 0x83, 0x35, 0xCA, 0x84, 0x7F, 0xE9, 0xEF, 0x6D, 0xFE, 0x41, 0x53, 0x3B, 0xD8, 0x69, 0x46, 0xCE, 0x21, 0x8F, 0x61, 0x16, 0xD6, 0x6B, 0x49, 0x8F, 0x21, 0x96, 0x7F, 0x49}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x490FFB43A12F0DB9ULL> name(source); + return name.Text(); + }())); this->m_onButton->checked = false; this->m_onButton->Invalidate(); this->AddChild(this->m_onButton); this->m_onText = new CUIStaticText(); this->m_onText->SetSize(150, 13); this->m_onText->Move(167, 12); - const std::uint8_t onLabelNameSource[] = {0xF7, 0xF6, 0x82, 0xED, 0xBD}; - thread_local EncryptedName onLabelName(onLabelNameSource); - const char* onLabelText = onLabelName.Text(); - this->m_onText->SetText(onLabelText, std::strlen(onLabelText)); + this->m_onText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xF7, 0xF6, 0x82, 0xED, 0xBD}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0x2D394DBD0F332733ULL> name(source); + return name.Text(); + }()); this->m_onText->SetFitText(0); this->m_onText->SetAlign(0, 0); - const std::uint8_t onLabelFontSource[] = {0x00, 0x54, 0xD7, 0x82, 0x86, 0x77}; - thread_local EncryptedName onLabelFont(onLabelFontSource); - this->m_onText->SetFont(std::string(onLabelFont.Text())); + this->m_onText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x00, 0x54, 0xD7, 0x82, 0x86, 0x77}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x151F77EBEBBB2147ULL> name(source); + return name.Text(); + }())); this->m_onText->SetFontHeight(12); this->m_onText->SetBold(0); this->m_onText->SetColor(0); @@ -3628,30 +4067,47 @@ void GameSettingsUI::CUIGroupTrilinear::Slot15(int width, int height) { this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { OnTrilinearOptionChanged(reinterpret_cast(button)); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); - const std::uint8_t offButtonNormalSource[] = {0x21, 0x34, 0x33, 0x81, 0x2D, 0x49, 0x3A, 0xAC, 0x27, 0x7F, 0x33, 0xB7, 0x50, 0x3D, 0xA3, 0x13, 0x80, 0xFF, 0x9A, 0x14, 0x8F, 0xF3, 0x91, 0x3E, 0x8E, 0xFD, 0x95, 0x55, 0x8F, 0xEA, 0x8F, 0x61}; - thread_local EncryptedName offButtonNormal(offButtonNormalSource); - const std::uint8_t offButtonHoverSource[] = {0x3F, 0x2A, 0xE7, 0xF7, 0xA5, 0xF1, 0x5C, 0xB0, 0x39, 0x61, 0xE7, 0xC1, 0xD8, 0x85, 0xC5, 0x0F, 0x9E, 0xE1, 0x4E, 0x62, 0x07, 0x4B, 0xF7, 0x22, 0x90, 0xEB, 0x09, 0x6F, 0x08, 0x4F, 0x99}; - thread_local EncryptedName offButtonHover(offButtonHoverSource); - const std::uint8_t offButtonPressedSource[] = {0xEF, 0x30, 0x73, 0x21, 0x2F, 0x07, 0xD2, 0x56, 0xE9, 0x7B, 0x73, 0x17, 0x52, 0x73, 0x4B, 0xE9, 0x4E, 0xFB, 0xDA, 0xB4, 0x8D, 0xBD, 0x79, 0xC4, 0x40, 0xF9, 0xD5, 0xF5, 0x8D, 0xA4, 0x67, 0x9B}; - thread_local EncryptedName offButtonPressed(offButtonPressedSource); - const std::uint8_t offButtonDisabledSource[] = {0x1D, 0x7A, 0x89, 0xBB, 0xB7, 0xDB, 0xFE, 0xE0, 0x1B, 0x31, 0x89, 0x8D, 0xCA, 0xAF, 0x67, 0x5F, 0xBC, 0xB1, 0x20, 0x2E, 0x15, 0x61, 0x55, 0x72, 0xB2, 0xB3, 0x2F, 0x6F, 0x15, 0x78, 0x4B, 0x2D}; - thread_local EncryptedName offButtonDisabled(offButtonDisabledSource); - this->m_offButton->SetImages(std::string(offButtonNormal.Text()), std::string(offButtonHover.Text()), std::string(offButtonPressed.Text()), std::string(offButtonDisabled.Text())); + this->m_offButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x21, 0x34, 0x33, 0x81, 0x2D, 0x49, 0x3A, 0xAC, 0x27, 0x7F, 0x33, 0xB7, 0x50, 0x3D, 0xA3, 0x13, 0x80, 0xFF, 0x9A, 0x14, 0x8F, 0xF3, 0x91, 0x3E, 0x8E, 0xFD, 0x95, 0x55, 0x8F, 0xEA, 0x8F, 0x61}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x61FF87ED7BF39BE1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x3F, 0x2A, 0xE7, 0xF7, 0xA5, 0xF1, 0x5C, 0xB0, 0x39, 0x61, 0xE7, 0xC1, 0xD8, 0x85, 0xC5, 0x0F, 0x9E, 0xE1, 0x4E, 0x62, 0x07, 0x4B, 0xF7, 0x22, 0x90, 0xEB, 0x09, 0x6F, 0x08, 0x4F, 0x99}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x7D993F650D2785FFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xEF, 0x30, 0x73, 0x21, 0x2F, 0x07, 0xD2, 0x56, 0xE9, 0x7B, 0x73, 0x17, 0x52, 0x73, 0x4B, 0xE9, 0x4E, 0xFB, 0xDA, 0xB4, 0x8D, 0xBD, 0x79, 0xC4, 0x40, 0xF9, 0xD5, 0xF5, 0x8D, 0xA4, 0x67, 0x9B}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x9B17C9EFDBB39F2FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x1D, 0x7A, 0x89, 0xBB, 0xB7, 0xDB, 0xFE, 0xE0, 0x1B, 0x31, 0x89, 0x8D, 0xCA, 0xAF, 0x67, 0x5F, 0xBC, 0xB1, 0x20, 0x2E, 0x15, 0x61, 0x55, 0x72, 0xB2, 0xB3, 0x2F, 0x6F, 0x15, 0x78, 0x4B, 0x2D}; + constexpr EncryptedSource<32> source(bytes); + thread_local EncryptedName<32, 0x2D3B15774149D5DDULL> name(source); + return name.Text(); + }())); this->m_offButton->checked = false; this->m_offButton->Invalidate(); this->AddChild(this->m_offButton); this->m_offText = new CUIStaticText(); this->m_offText->SetSize(100, 13); this->m_offText->Move(287, 12); - const std::uint8_t offLabelNameSource[] = {0xC3, 0xEF, 0x42, 0x1D, 0x87}; - thread_local EncryptedName offLabelName(offLabelNameSource); - const char* offLabelText = offLabelName.Text(); - this->m_offText->SetText(offLabelText, std::strlen(offLabelText)); + this->m_offText->SetText([]() { + constexpr std::uint8_t bytes[] = {0xC3, 0xEF, 0x42, 0x1D, 0x87}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xC7912587FFF31B71ULL> name(source); + return name.Text(); + }()); this->m_offText->SetFitText(0); this->m_offText->SetAlign(0, 0); - const std::uint8_t offLabelFontSource[] = {0x2A, 0x46, 0x63, 0xFC, 0xB6, 0x45}; - thread_local EncryptedName offLabelFont(offLabelFontSource); - this->m_offText->SetFont(std::string(offLabelFont.Text())); + this->m_offText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x2A, 0x46, 0x63, 0xFC, 0xB6, 0x45}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x69D345DB950F336DULL> name(source); + return name.Text(); + }())); this->m_offText->SetFontHeight(12); this->m_offText->SetBold(0); this->m_offText->SetColor(0); @@ -3955,24 +4411,30 @@ void CUIGameSettingsUI::Slot15(int width, int height) { this->m_titleBar->Move(0, 0); { CUITitleBar* titleBar = this->m_titleBar; - const std::uint8_t titleRightSource[] = { - 0x03, 0x6C, 0x15, 0x71, 0x9B, 0x25, 0xFA, 0x46, 0x05, 0x27, 0x15, 0x47, 0xE6, 0x51, 0x63, 0xE9, 0xA2, 0xB0, 0xBC, 0xE8, 0x04, 0x82, 0x51, 0xFF, - 0xA6, 0xB1, 0xB3, 0xEA, 0x38, 0x8E, 0x63, 0xFF, 0xAA, 0xB7, 0xB9, 0xEE, 0x39, 0x8A, 0x4D, 0xD4, 0xB1, 0xAA, 0xB2, 0xE3, 0x2F, 0xC5, 0x5D, 0xE6, - 0xB3, 0xC3}; - thread_local EncryptedName titleRightName(titleRightSource); - const std::string titleRight(titleRightName.Text()); - const std::uint8_t titleMiddleSource[] = { - 0x75, 0xDA, 0xA1, 0xA5, 0x3D, 0x95, 0xDE, 0x42, 0x73, 0x91, 0xA1, 0x93, 0x40, 0xE1, 0x47, 0xED, 0xD4, 0x06, 0x08, 0x3C, 0xA2, 0x32, 0x75, 0xFB, - 0xD0, 0x07, 0x07, 0x3E, 0x9E, 0x3E, 0x47, 0xFB, 0xDC, 0x01, 0x0D, 0x3A, 0x9F, 0x3A, 0x69, 0xD0, 0xD8, 0x1C, 0x05, 0x71, 0x9F, 0x36, 0x6B, 0x8F}; - thread_local EncryptedName titleMiddleName(titleMiddleSource); - const std::string titleMiddle(titleMiddleName.Text()); - const std::uint8_t titleLeftSource[] = { + titleBar->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x09, 0x18, 0xE5, 0x6D, 0x7B, 0xFD, 0x46, 0xCA, 0x0F, 0x53, 0xE5, 0x5B, 0x06, 0x89, 0xDF, 0x65, 0xA8, 0xC4, 0x4C, 0xF4, 0xE4, 0x5A, 0xED, 0x73, 0xAC, 0xC5, 0x43, 0xF6, 0xD8, 0x56, 0xDF, 0x73, 0xA0, 0xC3, 0x49, 0xF2, 0xD9, 0x52, 0xF1, 0x58, 0xA5, 0xD2, 0x43, 0xE3, 0x95, 0x51, 0xEE, 0x77, 0xC9}; - thread_local EncryptedName titleLeftName(titleLeftSource); - const std::string titleLeft(titleLeftName.Text()); - titleBar->SetImages(titleLeft, titleMiddle, titleRight); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x078333BB9725B7C9ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x75, 0xDA, 0xA1, 0xA5, 0x3D, 0x95, 0xDE, 0x42, 0x73, 0x91, 0xA1, 0x93, 0x40, 0xE1, 0x47, 0xED, 0xD4, 0x06, 0x08, 0x3C, 0xA2, 0x32, 0x75, 0xFB, + 0xD0, 0x07, 0x07, 0x3E, 0x9E, 0x3E, 0x47, 0xFB, 0xDC, 0x01, 0x0D, 0x3A, 0x9F, 0x3A, 0x69, 0xD0, 0xD8, 0x1C, 0x05, 0x71, 0x9F, 0x36, 0x6B, 0x8F}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x8F1B5BFD5F6175B5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x03, 0x6C, 0x15, 0x71, 0x9B, 0x25, 0xFA, 0x46, 0x05, 0x27, 0x15, 0x47, 0xE6, 0x51, 0x63, 0xE9, 0xA2, 0xB0, 0xBC, 0xE8, 0x04, 0x82, 0x51, 0xFF, + 0xA6, 0xB1, 0xB3, 0xEA, 0x38, 0x8E, 0x63, 0xFF, 0xAA, 0xB7, 0xB9, 0xEE, 0x39, 0x8A, 0x4D, 0xD4, 0xB1, 0xAA, 0xB2, 0xE3, 0x2F, 0xC5, 0x5D, 0xE6, + 0xB3, 0xC3}; + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0x8B3FEB5B8BD5C3C3ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->m_titleBar); @@ -3980,17 +4442,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { title->SetSize(100, 17); title->Move(18, 0); { - const std::uint8_t titleTextSource[] = {0x17, 0x67, 0xC5, 0x1A, 0x85, 0xDF, 0x58, 0xCA, 0x03, 0xB3}; - thread_local EncryptedName titleTextName(titleTextSource); - const char* value = titleTextName.Text(); - title->SetText(value, std::strlen(value)); + title->SetText([]() { + constexpr std::uint8_t bytes[] = {0x17, 0x67, 0xC5, 0x1A, 0x85, 0xDF, 0x58, 0xCA, 0x03, 0xB3}; + constexpr EncryptedSource<10> source(bytes); + thread_local EncryptedName<10, 0x0BEB63A5C905B3A7ULL> name(source); + return name.Text(); + }()); } title->SetFitText(0); title->SetAlign(0, 6); { - const std::uint8_t titleFontSource[] = {0x76, 0x2C, 0x47, 0x68, 0x0C, 0xCD}; - thread_local EncryptedName titleFontName(titleFontSource); - title->SetFont(std::string(titleFontName.Text())); + title->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x76, 0x2C, 0x47, 0x68, 0x0C, 0xCD}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x8B65CD61012B5931ULL> name(source); + return name.Text(); + }())); } title->SetFontHeight(12); title->SetBold(0); @@ -4007,27 +4474,35 @@ void CUIGameSettingsUI::Slot15(int width, int height) { baseButton->disabled = 0; baseButton->Invalidate(); { - const std::uint8_t baseDisabledSource[] = { - 0x23, 0xF8, 0xD5, 0xA7, 0xD7, 0x4F, 0x1E, 0xD2, 0x25, 0xB3, 0xD5, 0x91, 0xAA, 0x3B, 0x87, 0x7D, 0x82, 0x24, 0x7C, 0x3E, 0x48, 0xE8, 0xB5, 0x6B, - 0x86, 0x25, 0x73, 0x3C, 0x74, 0xE4, 0x87, 0x6C, 0x9A, 0x24, 0x4A, 0x3F, 0x76, 0xF2, 0xBE, 0x40, 0x8C, 0x31, 0x73, 0x73, 0x75, 0xEC, 0xAB, 0x1F}; - thread_local EncryptedName baseDisabledName(baseDisabledSource); - const std::string baseDisabled(baseDisabledName.Text()); - const std::uint8_t basePressedSource[] = { - 0x07, 0x62, 0x25, 0xC7, 0xDF, 0xB3, 0xA0, 0x38, 0x01, 0x29, 0x25, 0xF1, 0xA2, 0xC7, 0x39, 0x97, 0xA6, 0xBE, 0x8C, 0x5E, 0x40, 0x14, 0x0B, 0x81, - 0xA2, 0xBF, 0x83, 0x5C, 0x7C, 0x18, 0x39, 0x86, 0xBE, 0xBE, 0xBA, 0x5F, 0x7E, 0x0E, 0x00, 0xAA, 0xA8, 0xA3, 0xCB, 0x5F, 0x72, 0x0D, 0x65}; - thread_local EncryptedName basePressedName(basePressedSource); - const std::string basePressed(basePressedName.Text()); - const std::uint8_t baseHoverSource[] = { - 0x01, 0x60, 0x13, 0xC9, 0x57, 0xD3, 0x38, 0xA4, 0x07, 0x2B, 0x13, 0xFF, 0x2A, 0xA7, 0xA1, 0x0B, 0xA0, 0xBC, 0xBA, 0x50, 0xC8, 0x74, 0x93, 0x1D, - 0xA4, 0xBD, 0xB5, 0x52, 0xF4, 0x78, 0xA1, 0x1A, 0xB8, 0xBC, 0x8C, 0x51, 0xF6, 0x6E, 0x98, 0x36, 0xAE, 0xA1, 0xFD, 0x51, 0xFA, 0x6D, 0xFD}; - thread_local EncryptedName baseHoverName(baseHoverSource); - const std::string baseHover(baseHoverName.Text()); - const std::uint8_t baseNormalSource[] = { + baseButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x25, 0x20, 0x8D, 0xEF, 0xF7, 0xCF, 0x96, 0x3A, 0x23, 0x6B, 0x8D, 0xD9, 0x8A, 0xBB, 0x0F, 0x95, 0x84, 0xFC, 0x24, 0x76, 0x68, 0x68, 0x3D, 0x83, 0x80, 0xFD, 0x2B, 0x74, 0x54, 0x64, 0x0F, 0x84, 0x9C, 0xFC, 0x12, 0x77, 0x56, 0x72, 0x36, 0xA8, 0x8A, 0xE9, 0x2B, 0x3B, 0x55, 0x6C, 0x23, 0xF7}; - thread_local EncryptedName baseNormalName(baseNormalSource); - const std::string baseNormal(baseNormalName.Text()); - baseButton->SetImages(baseNormal, baseHover, basePressed, baseDisabled); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xF7530137154D8FE5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x01, 0x60, 0x13, 0xC9, 0x57, 0xD3, 0x38, 0xA4, 0x07, 0x2B, 0x13, 0xFF, 0x2A, 0xA7, 0xA1, 0x0B, 0xA0, 0xBC, 0xBA, 0x50, 0xC8, 0x74, 0x93, 0x1D, + 0xA4, 0xBD, 0xB5, 0x52, 0xF4, 0x78, 0xA1, 0x1A, 0xB8, 0xBC, 0x8C, 0x51, 0xF6, 0x6E, 0x98, 0x36, 0xAE, 0xA1, 0xFD, 0x51, 0xFA, 0x6D, 0xFD}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0x69FD1D9733D3CFC1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x07, 0x62, 0x25, 0xC7, 0xDF, 0xB3, 0xA0, 0x38, 0x01, 0x29, 0x25, 0xF1, 0xA2, 0xC7, 0x39, 0x97, 0xA6, 0xBE, 0x8C, 0x5E, 0x40, 0x14, 0x0B, 0x81, + 0xA2, 0xBF, 0x83, 0x5C, 0x7C, 0x18, 0x39, 0x86, 0xBE, 0xBE, 0xBA, 0x5F, 0x7E, 0x0E, 0x00, 0xAA, 0xA8, 0xA3, 0xCB, 0x5F, 0x72, 0x0D, 0x65}; + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0xF5657D1F3DE5CDC7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x23, 0xF8, 0xD5, 0xA7, 0xD7, 0x4F, 0x1E, 0xD2, 0x25, 0xB3, 0xD5, 0x91, 0xAA, 0x3B, 0x87, 0x7D, 0x82, 0x24, 0x7C, 0x3E, 0x48, 0xE8, 0xB5, 0x6B, + 0x86, 0x25, 0x73, 0x3C, 0x74, 0xE4, 0x87, 0x6C, 0x9A, 0x24, 0x4A, 0x3F, 0x76, 0xF2, 0xBE, 0x40, 0x8C, 0x31, 0x73, 0x73, 0x75, 0xEC, 0xAB, 0x1F}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x1FDB81175D1557E3ULL> name(source); + return name.Text(); + }())); } this->m_titleBar->AddChild(baseButton); @@ -4038,29 +4513,37 @@ void CUIGameSettingsUI::Slot15(int width, int height) { closeButton->disabled = 0; closeButton->Invalidate(); { - const std::uint8_t closeDisabledSource[] = { - 0x51, 0x86, 0xB9, 0xB9, 0x1B, 0xC7, 0x60, 0xBC, 0x57, 0xCD, 0xB9, 0x8F, 0x66, 0xB3, 0xF9, 0x13, 0xF0, 0x5A, 0x10, 0x20, 0x84, 0x60, 0xCB, 0x05, - 0xF4, 0x5B, 0x1F, 0x22, 0xB8, 0x6C, 0xF9, 0x02, 0xE8, 0x5A, 0x26, 0x20, 0xB7, 0x66, 0xD6, 0x14, 0xCE, 0x46, 0x1F, 0x25, 0xF5, 0x6B, 0xC8, 0x01, - 0x91}; - thread_local EncryptedName closeDisabledName(closeDisabledSource); - const std::string closeDisabled(closeDisabledName.Text()); - const std::uint8_t closePressedSource[] = { - 0x17, 0xE8, 0x3D, 0x99, 0xCD, 0xF7, 0xEE, 0xBE, 0x11, 0xA3, 0x3D, 0xAF, 0xB0, 0x83, 0x77, 0x11, 0xB6, 0x34, 0x94, 0x00, 0x52, 0x50, 0x45, 0x07, - 0xB2, 0x35, 0x9B, 0x02, 0x6E, 0x5C, 0x77, 0x00, 0xAE, 0x34, 0xA2, 0x00, 0x61, 0x56, 0x58, 0x16, 0x88, 0x28, 0x93, 0x4D, 0x6F, 0x54, 0x5B, 0x73}; - thread_local EncryptedName closePressedName(closePressedSource); - const std::string closePressed(closePressedName.Text()); - const std::uint8_t closeHoverSource[] = { - 0x5F, 0x56, 0x81, 0x37, 0x39, 0xA5, 0x62, 0x7A, 0x59, 0x1D, 0x81, 0x01, 0x44, 0xD1, 0xFB, 0xD5, 0xFE, 0x8A, 0x28, 0xAE, 0xA6, 0x02, 0xC9, 0xC3, - 0xFA, 0x8B, 0x27, 0xAC, 0x9A, 0x0E, 0xFB, 0xC4, 0xE6, 0x8A, 0x1E, 0xAE, 0x95, 0x04, 0xD4, 0xD2, 0xC0, 0x96, 0x2F, 0xE3, 0x9B, 0x06, 0xD7, 0xB7}; - thread_local EncryptedName closeHoverName(closeHoverSource); - const std::string closeHover(closeHoverName.Text()); - const std::uint8_t closeNormalSource[] = { + closeButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x7F, 0x2A, 0xE7, 0x87, 0x93, 0xED, 0x3E, 0x2E, 0x79, 0x61, 0xE7, 0xB1, 0xEE, 0x99, 0xA7, 0x81, 0xDE, 0xF6, 0x4E, 0x1E, 0x0C, 0x4A, 0x95, 0x97, 0xDA, 0xF7, 0x41, 0x1C, 0x30, 0x46, 0xA7, 0x90, 0xC6, 0xF6, 0x78, 0x1E, 0x3F, 0x4C, 0x88, 0x86, 0xE0, 0xEA, 0x41, 0x1B, 0x7D, 0x41, 0x96, 0x93, 0xBF}; - thread_local EncryptedName closeNormalName(closeNormalSource); - const std::string closeNormal(closeNormalName.Text()); - closeButton->SetImages(closeNormal, closeHover, closePressed, closeDisabled); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0xE3FB23537D2785BFULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x5F, 0x56, 0x81, 0x37, 0x39, 0xA5, 0x62, 0x7A, 0x59, 0x1D, 0x81, 0x01, 0x44, 0xD1, 0xFB, 0xD5, 0xFE, 0x8A, 0x28, 0xAE, 0xA6, 0x02, 0xC9, 0xC3, + 0xFA, 0x8B, 0x27, 0xAC, 0x9A, 0x0E, 0xFB, 0xC4, 0xE6, 0x8A, 0x1E, 0xAE, 0x95, 0x04, 0xD4, 0xD2, 0xC0, 0x96, 0x2F, 0xE3, 0x9B, 0x06, 0xD7, 0xB7}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xB7A76BF9CD41F99FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x17, 0xE8, 0x3D, 0x99, 0xCD, 0xF7, 0xEE, 0xBE, 0x11, 0xA3, 0x3D, 0xAF, 0xB0, 0x83, 0x77, 0x11, 0xB6, 0x34, 0x94, 0x00, 0x52, 0x50, 0x45, 0x07, + 0xB2, 0x35, 0x9B, 0x02, 0x6E, 0x5C, 0x77, 0x00, 0xAE, 0x34, 0xA2, 0x00, 0x61, 0x56, 0x58, 0x16, 0x88, 0x28, 0x93, 0x4D, 0x6F, 0x54, 0x5B, 0x73}; + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x732B390D63FD47D7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x51, 0x86, 0xB9, 0xB9, 0x1B, 0xC7, 0x60, 0xBC, 0x57, 0xCD, 0xB9, 0x8F, 0x66, 0xB3, 0xF9, 0x13, 0xF0, 0x5A, 0x10, 0x20, 0x84, 0x60, 0xCB, 0x05, + 0xF4, 0x5B, 0x1F, 0x22, 0xB8, 0x6C, 0xF9, 0x02, 0xE8, 0x5A, 0x26, 0x20, 0xB7, 0x66, 0xD6, 0x14, 0xCE, 0x46, 0x1F, 0x25, 0xF5, 0x6B, 0xC8, 0x01, + 0x91}; + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x71A509DB43792991ULL> name(source); + return name.Text(); + }())); } this->m_titleBar->SetSecondButton(closeButton); @@ -4098,16 +4581,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { basicButton->Invalidate(); basicButton->SetId(0); { - const std::uint8_t basicLabelSource[] = {0xCC, 0xB1, 0x35, 0x1A, 0xDF, 0x51, 0xDA, 0x1C, 0xD9, 0x53}; - thread_local EncryptedName basicLabelName(basicLabelSource); - basicButton->SetText(std::string(basicLabelName.Text())); + basicButton->SetText(std::string([]() { + constexpr std::uint8_t bytes[] = {0xCC, 0xB1, 0x35, 0x1A, 0xDF, 0x51, 0xDA, 0x1C, 0xD9, 0x53}; + constexpr EncryptedSource<10> source(bytes); + thread_local EncryptedName<10, 0xDD69EDFFA18F537DULL> name(source); + return name.Text(); + }())); } basicButton->SetFitText(0); basicButton->SetAlign(6, 6); { - const std::uint8_t basicFontSource[] = {0x34, 0x54, 0x8B, 0x2E, 0x46, 0x79}; - thread_local EncryptedName basicFontName(basicFontSource); - basicButton->SetFont(std::string(basicFontName.Text())); + basicButton->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x34, 0x54, 0x8B, 0x2E, 0x46, 0x79}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x8BBF792B47E72173ULL> name(source); + return name.Text(); + }())); } basicButton->SetFontHeight(12); basicButton->SetBold(0); @@ -4125,16 +4614,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { effectButton->Invalidate(); effectButton->SetId(1); { - const std::uint8_t effectLabelSource[] = {0x49, 0x17, 0xA5, 0x9C, 0x2D, 0x35, 0xEF, 0x0F, 0x3A, 0x1A, 0xC7, 0x79}; - thread_local EncryptedName effectLabelName(effectLabelSource); - effectButton->SetText(std::string(effectLabelName.Text())); + effectButton->SetText(std::string([]() { + constexpr std::uint8_t bytes[] = {0x49, 0x17, 0xA5, 0x9C, 0x2D, 0x35, 0xEF, 0x0F, 0x3A, 0x1A, 0xC7, 0x79}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0xB3CF9BEB7963DB89ULL> name(source); + return name.Text(); + }())); } effectButton->SetFitText(0); effectButton->SetAlign(6, 6); { - const std::uint8_t effectFontSource[] = {0x10, 0x8A, 0x81, 0x26, 0xC2, 0xB5}; - thread_local EncryptedName effectFontName(effectFontSource); - effectButton->SetFont(std::string(effectFontName.Text())); + effectButton->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x10, 0x8A, 0x81, 0x26, 0xC2, 0xB5}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB5D7B5AF4FEDFF57ULL> name(source); + return name.Text(); + }())); } effectButton->SetFontHeight(12); effectButton->SetBold(0); @@ -4152,16 +4647,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { controlButton->Invalidate(); controlButton->SetId(2); { - const std::uint8_t controlLabelSource[] = {0xBD, 0x36, 0xD3, 0x9B, 0x1A, 0x80, 0xBD, 0x27, 0xCA, 0x36, 0xB1, 0x35}; - thread_local EncryptedName controlLabelName(controlLabelSource); - controlButton->SetText(std::string(controlLabelName.Text())); + controlButton->SetText(std::string([]() { + constexpr std::uint8_t bytes[] = {0xBD, 0x36, 0xD3, 0x9B, 0x1A, 0x80, 0xBD, 0x27, 0xCA, 0x36, 0xB1, 0x35}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0x9B9D51AD3515F779ULL> name(source); + return name.Text(); + }())); } controlButton->SetFitText(0); controlButton->SetAlign(6, 6); { - const std::uint8_t controlFontSource[] = {0xF0, 0x46, 0x49, 0x60, 0xD6, 0x35}; - thread_local EncryptedName controlFontName(controlFontSource); - controlButton->SetFont(std::string(controlFontName.Text())); + controlButton->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xF0, 0x46, 0x49, 0x60, 0xD6, 0x35}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x038535BB092533B7ULL> name(source); + return name.Text(); + }())); } controlButton->SetFontHeight(12); controlButton->SetBold(0); @@ -4179,16 +4680,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { graphicsButton->Invalidate(); graphicsButton->SetId(3); { - const std::uint8_t graphicsLabelSource[] = {0x62, 0xA0, 0x50, 0xC8, 0x90, 0x0F, 0x0B, 0x47, 0x60, 0xB6, 0x43, 0x69}; - thread_local EncryptedName graphicsLabelName(graphicsLabelSource); - graphicsButton->SetText(std::string(graphicsLabelName.Text())); + graphicsButton->SetText(std::string([]() { + constexpr std::uint8_t bytes[] = {0x62, 0xA0, 0x50, 0xC8, 0x90, 0x0F, 0x0B, 0x47, 0x60, 0xB6, 0x43, 0x69}; + constexpr EncryptedSource<12> source(bytes); + thread_local EncryptedName<12, 0xFB2BC75769E777D3ULL> name(source); + return name.Text(); + }())); } graphicsButton->SetFitText(0); graphicsButton->SetAlign(6, 6); { - const std::uint8_t graphicsFontSource[] = {0xBA, 0xC0, 0x5F, 0x86, 0x3C, 0x37}; - thread_local EncryptedName graphicsFontName(graphicsFontSource); - graphicsButton->SetFont(std::string(graphicsFontName.Text())); + graphicsButton->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xBA, 0xC0, 0x5F, 0x86, 0x3C, 0x37}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x91493751EF33B5FDULL> name(source); + return name.Text(); + }())); } graphicsButton->SetFontHeight(12); graphicsButton->SetBold(0); @@ -4206,16 +4713,22 @@ void CUIGameSettingsUI::Slot15(int width, int height) { etcButton->Invalidate(); etcButton->SetId(4); { - const std::uint8_t etcLabelSource[] = {0xB2, 0xD7, 0x5C, 0x0D, 0x93, 0xCB, 0x7A, 0xAA, 0xA7, 0x35}; - thread_local EncryptedName etcLabelName(etcLabelSource); - etcButton->SetText(std::string(etcLabelName.Text())); + etcButton->SetText(std::string([]() { + constexpr std::uint8_t bytes[] = {0xB2, 0xD7, 0x5C, 0x0D, 0x93, 0xCB, 0x7A, 0xAA, 0xA7, 0x35}; + constexpr EncryptedSource<10> source(bytes); + thread_local EncryptedName<10, 0x6BC977B3B5993503ULL> name(source); + return name.Text(); + }())); } etcButton->SetFitText(0); etcButton->SetAlign(6, 6); { - const std::uint8_t etcFontSource[] = {0xB4, 0x60, 0x1F, 0x4A, 0x14, 0xF7}; - thread_local EncryptedName etcFontName(etcFontSource); - etcButton->SetFont(std::string(etcFontName.Text())); + etcButton->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xB4, 0x60, 0x1F, 0x4A, 0x14, 0xF7}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xB5F3F779237315F3ULL> name(source); + return name.Text(); + }())); } etcButton->SetFontHeight(12); etcButton->SetBold(0); @@ -4233,27 +4746,35 @@ void CUIGameSettingsUI::Slot15(int width, int height) { this->m_pageContainer->Invalidate(); { CUIImageButton* button = this->m_pageContainer; - const std::uint8_t resetDisabledSource[] = { - 0x9F, 0xD6, 0x61, 0x1D, 0x31, 0x03, 0x9A, 0x4A, 0x99, 0x9D, 0x61, 0x2B, 0x4C, 0x77, 0x03, 0xE5, 0x2B, 0x17, 0xFE, 0x95, 0x94, 0xBE, 0x3A, 0xF3, - 0x71, 0x1B, 0xCC, 0x97, 0xF1}; - thread_local EncryptedName resetDisabledName(resetDisabledSource); - const std::string resetDisabled(resetDisabledName.Text()); - const std::uint8_t resetPressedSource[] = { - 0xA9, 0x2A, 0x9F, 0xDF, 0x77, 0xB9, 0xAE, 0x74, 0xAF, 0x61, 0x9F, 0xE9, 0x0A, 0xCD, 0x37, 0xDB, 0x1D, 0xEB, 0x00, 0x57, 0xD2, 0x04, 0x0E, 0xCD, - 0x36, 0xE4, 0x71, 0x47, 0xDA, 0x07, 0x6B}; - thread_local EncryptedName resetPressedName(resetPressedSource); - const std::string resetPressed(resetPressedName.Text()); - const std::uint8_t resetHoverSource[] = { - 0xB9, 0x02, 0x47, 0x89, 0xB3, 0x21, 0x26, 0x56, 0xBF, 0x49, 0x47, 0xBF, 0xCE, 0x55, 0xBF, 0xF9, 0x0D, 0xC3, 0xD8, 0x01, 0x16, 0x9C, 0x86, 0xEF, - 0x26, 0xCF, 0xA9, 0x11, 0x1E, 0x9F, 0xE3}; - thread_local EncryptedName resetHoverName(resetHoverSource); - const std::string resetHover(resetHoverName.Text()); - const std::uint8_t resetNormalSource[] = { + button->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x11, 0x76, 0xD9, 0xE3, 0x6B, 0x95, 0x18, 0xAA, 0x17, 0x3D, 0xD9, 0xD5, 0x16, 0xE1, 0x81, 0x05, 0xA5, 0xB7, 0x46, 0x6B, 0xCE, 0x28, 0xB8, 0x13, 0xFF, 0xBB, 0x74, 0x69, 0xAB}; - thread_local EncryptedName resetNormalName(resetNormalSource); - const std::string resetNormal(resetNormalName.Text()); - button->SetImages(resetNormal, resetHover, resetPressed, resetDisabled); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x67DD5BAB1919D9D1ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB9, 0x02, 0x47, 0x89, 0xB3, 0x21, 0x26, 0x56, 0xBF, 0x49, 0x47, 0xBF, 0xCE, 0x55, 0xBF, 0xF9, 0x0D, 0xC3, 0xD8, 0x01, 0x16, 0x9C, 0x86, 0xEF, + 0x26, 0xCF, 0xA9, 0x11, 0x1E, 0x9F, 0xE3}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x9BE3EF737387AD79ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xA9, 0x2A, 0x9F, 0xDF, 0x77, 0xB9, 0xAE, 0x74, 0xAF, 0x61, 0x9F, 0xE9, 0x0A, 0xCD, 0x37, 0xDB, 0x1D, 0xEB, 0x00, 0x57, 0xD2, 0x04, 0x0E, 0xCD, + 0x36, 0xE4, 0x71, 0x47, 0xDA, 0x07, 0x6B}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0xB96B77B7255F8569ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x9F, 0xD6, 0x61, 0x1D, 0x31, 0x03, 0x9A, 0x4A, 0x99, 0x9D, 0x61, 0x2B, 0x4C, 0x77, 0x03, 0xE5, 0x2B, 0x17, 0xFE, 0x95, 0x94, 0xBE, 0x3A, 0xF3, + 0x71, 0x1B, 0xCC, 0x97, 0xF1}; + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x875FCDF1E7A1795FULL> name(source); + return name.Text(); + }())); } this->AddChild(this->m_pageContainer); @@ -4265,27 +4786,35 @@ void CUIGameSettingsUI::Slot15(int width, int height) { this->m_applyButton->Invalidate(); { CUIImageButton* button = this->m_applyButton; - const std::uint8_t applyDisabledSource[] = { - 0xC7, 0x72, 0xB7, 0x99, 0xA3, 0xFB, 0x0E, 0xDC, 0xC1, 0x39, 0xB7, 0xAF, 0xDE, 0x8F, 0x97, 0x73, 0x73, 0xB3, 0x28, 0x02, 0x13, 0x45, 0xA7, 0x68, - 0x29, 0xBF, 0x1A, 0x13, 0x63}; - thread_local EncryptedName applyDisabledName(applyDisabledSource); - const std::string applyDisabled(applyDisabledName.Text()); - const std::uint8_t applyPressedSource[] = { - 0xB5, 0xCA, 0xA1, 0x23, 0x8D, 0xC7, 0x1A, 0xB4, 0xB3, 0x81, 0xA1, 0x15, 0xF0, 0xB3, 0x83, 0x1B, 0x01, 0x0B, 0x3E, 0xB8, 0x3D, 0x79, 0xB3, 0x00, - 0x2A, 0x04, 0x4F, 0xBB, 0x20, 0x79, 0xDF}; - thread_local EncryptedName applyPressedName(applyPressedSource); - const std::string applyPressed(applyPressedName.Text()); - const std::uint8_t applyHoverSource[] = { - 0x77, 0xCE, 0x3D, 0x45, 0xF7, 0xE3, 0x4A, 0x50, 0x71, 0x85, 0x3D, 0x73, 0x8A, 0x97, 0xD3, 0xFF, 0xC3, 0x0F, 0xA2, 0xDE, 0x47, 0x5D, 0xE3, 0xE4, - 0xE8, 0x03, 0xD3, 0xDD, 0x5A, 0x5D, 0x8F}; - thread_local EncryptedName applyHoverName(applyHoverSource); - const std::string applyHover(applyHoverName.Text()); - const std::uint8_t applyNormalSource[] = { + button->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0x9B, 0x32, 0xE5, 0xD7, 0x47, 0xE3, 0xE8, 0xCA, 0x9D, 0x79, 0xE5, 0xE1, 0x3A, 0x97, 0x71, 0x65, 0x2F, 0xF3, 0x7A, 0x4C, 0xF7, 0x5D, 0x41, 0x7E, 0x75, 0xFF, 0x48, 0x5D, 0x87}; - thread_local EncryptedName applyNormalName(applyNormalSource); - const std::string applyNormal(applyNormalName.Text()); - button->SetImages(applyNormal, applyHover, applyPressed, applyDisabled); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x072D2D872D259D5BULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x77, 0xCE, 0x3D, 0x45, 0xF7, 0xE3, 0x4A, 0x50, 0x71, 0x85, 0x3D, 0x73, 0x8A, 0x97, 0xD3, 0xFF, 0xC3, 0x0F, 0xA2, 0xDE, 0x47, 0x5D, 0xE3, 0xE4, + 0xE8, 0x03, 0xD3, 0xDD, 0x5A, 0x5D, 0x8F}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x9D8F2D37BFFD61B7ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xB5, 0xCA, 0xA1, 0x23, 0x8D, 0xC7, 0x1A, 0xB4, 0xB3, 0x81, 0xA1, 0x15, 0xF0, 0xB3, 0x83, 0x1B, 0x01, 0x0B, 0x3E, 0xB8, 0x3D, 0x79, 0xB3, 0x00, + 0x2A, 0x04, 0x4F, 0xBB, 0x20, 0x79, 0xDF}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x79DF094DD9616575ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xC7, 0x72, 0xB7, 0x99, 0xA3, 0xFB, 0x0E, 0xDC, 0xC1, 0x39, 0xB7, 0xAF, 0xDE, 0x8F, 0x97, 0x73, 0x73, 0xB3, 0x28, 0x02, 0x13, 0x45, 0xA7, 0x68, + 0x29, 0xBF, 0x1A, 0x13, 0x63}; + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x11CB35636377DD07ULL> name(source); + return name.Text(); + }())); } this->AddChild(this->m_applyButton); @@ -4297,27 +4826,35 @@ void CUIGameSettingsUI::Slot15(int width, int height) { this->m_closeButton->Invalidate(); { CUIImageButton* button = this->m_closeButton; - const std::uint8_t closeButtonDisabledSource[] = { - 0x3D, 0x6E, 0xB3, 0xB9, 0xE7, 0x9F, 0xD8, 0xD2, 0x3B, 0x25, 0xB3, 0x8F, 0x9A, 0xEB, 0x41, 0x7D, 0x89, 0xAF, 0x2C, 0x20, 0x4B, 0x3E, 0x6E, 0x7A, - 0xD3, 0xA3, 0x1E, 0x33, 0x27}; - thread_local EncryptedName closeButtonDisabledName(closeButtonDisabledSource); - const std::string closeButtonDisabled(closeButtonDisabledName.Text()); - const std::uint8_t closeButtonPressedSource[] = { - 0xE7, 0x3C, 0xBF, 0xF5, 0x9B, 0xD1, 0xF2, 0xF0, 0xE1, 0x77, 0xBF, 0xC3, 0xE6, 0xA5, 0x6B, 0x5F, 0x53, 0xFD, 0x20, 0x6C, 0x37, 0x70, 0x44, 0x58, - 0x78, 0xF2, 0x51, 0x6D, 0x36, 0x6F, 0x37}; - thread_local EncryptedName closeButtonPressedName(closeButtonPressedSource); - const std::string closeButtonPressed(closeButtonPressedName.Text()); - const std::uint8_t closeButtonHoverSource[] = { - 0xE9, 0x60, 0xE9, 0xFD, 0x23, 0xE7, 0x32, 0xA6, 0xEF, 0x2B, 0xE9, 0xCB, 0x5E, 0x93, 0xAB, 0x09, 0x5D, 0xA1, 0x76, 0x64, 0x8F, 0x46, 0x84, 0x0E, - 0x76, 0xAD, 0x07, 0x65, 0x8E, 0x59, 0xF7}; - thread_local EncryptedName closeButtonHoverName(closeButtonHoverSource); - const std::string closeButtonHover(closeButtonHoverName.Text()); - const std::uint8_t closeButtonNormalSource[] = { + button->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = { 0xF7, 0x52, 0xB5, 0xAF, 0xF5, 0x0F, 0x90, 0x8A, 0xF1, 0x19, 0xB5, 0x99, 0x88, 0x7B, 0x09, 0x25, 0x43, 0x93, 0x2A, 0x36, 0x59, 0xAE, 0x26, 0x22, 0x19, 0x9F, 0x18, 0x25, 0x35}; - thread_local EncryptedName closeButtonNormalName(closeButtonNormalSource); - const std::string closeButtonNormal(closeButtonNormalName.Text()); - button->SetImages(closeButtonNormal, closeButtonHover, closeButtonPressed, closeButtonDisabled); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x4755C1355575FD37ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xE9, 0x60, 0xE9, 0xFD, 0x23, 0xE7, 0x32, 0xA6, 0xEF, 0x2B, 0xE9, 0xCB, 0x5E, 0x93, 0xAB, 0x09, 0x5D, 0xA1, 0x76, 0x64, 0x8F, 0x46, 0x84, 0x0E, + 0x76, 0xAD, 0x07, 0x65, 0x8E, 0x59, 0xF7}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x6BF729E30729CF29ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0xE7, 0x3C, 0xBF, 0xF5, 0x9B, 0xD1, 0xF2, 0xF0, 0xE1, 0x77, 0xBF, 0xC3, 0xE6, 0xA5, 0x6B, 0x5F, 0x53, 0xFD, 0x20, 0x6C, 0x37, 0x70, 0x44, 0x58, + 0x78, 0xF2, 0x51, 0x6D, 0x36, 0x6F, 0x37}; + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x3D371F5B0F7F9327ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = { + 0x3D, 0x6E, 0xB3, 0xB9, 0xE7, 0x9F, 0xD8, 0xD2, 0x3B, 0x25, 0xB3, 0x8F, 0x9A, 0xEB, 0x41, 0x7D, 0x89, 0xAF, 0x2C, 0x20, 0x4B, 0x3E, 0x6E, 0x7A, + 0xD3, 0xA3, 0x1E, 0x33, 0x27}; + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x1F1D51274373C1FDULL> name(source); + return name.Text(); + }())); } this->AddChild(this->m_closeButton); @@ -4333,8 +4870,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { // FUNCTION: fn_15986 void CUIGameSettingsUI::Slot16() { this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); - const char* title = LookupMessage(0x946); - static_cast(this->m_titleBar)->SetTitle(title, std::strlen(title)); + static_cast(this->m_titleBar)->SetTitle(LookupMessage(0x946)); static_cast(this->m_tab->FindChildById(0))->SetText(LookupMessage(0x102E)); static_cast(this->m_tab->FindChildById(1))->SetText(LookupMessage(0x102F)); static_cast(this->m_tab->FindChildById(2))->SetText(LookupMessage(0x1030)); @@ -4361,15 +4897,27 @@ void GameSettingsUI::CUIOptionItem::Slot15(int width, int height) { this->m_check->SetOnCheck([this](bool checked) { this->OnCheck(checked); }); this->m_check->disabled = 0; this->m_check->Invalidate(); - const std::uint8_t checkInactiveSource[] = {0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x92, 0xCA, 0xC2, 0xE8, 0xDE, 0xD6, 0xF9, 0xD3, 0xBC, 0xC5, 0xC8, 0xFE, 0xD8, 0xFA, 0xD1, 0xD3, 0xBA, 0xCC, 0xC8, 0xE1, 0xE8, 0xEC, 0xE2, 0xC1, 0xB3, 0x85, 0xCD, 0xE0, 0xFD, 0xB3}; - thread_local EncryptedName checkInactive(checkInactiveSource); - const std::uint8_t checkPressedSource[] = {0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x44, 0x6E, 0x22, 0x20, 0xFC, 0xF8, 0x31, 0xED, 0x6A, 0x61, 0x28, 0x36, 0xFA, 0xD4, 0x19, 0xED, 0x6C, 0x68, 0x28, 0x29, 0xCA, 0xC2, 0x2A, 0xFF, 0x65, 0x21, 0x2D, 0x28, 0xDF, 0x9D}; - thread_local EncryptedName checkPressed(checkPressedSource); - const std::uint8_t checkHoverSource[] = {0xB3, 0x40, 0x7B, 0x2B, 0x15, 0x2D, 0x6E, 0x32, 0xB5, 0x0B, 0x7B, 0x1D, 0x68, 0x59, 0xF7, 0xB8, 0x12, 0x82, 0xDE, 0x82, 0xB0, 0x97, 0xDF, 0x96, 0x1D, 0x88, 0xC8, 0x84, 0x9C, 0xBF, 0xDF, 0x90, 0x14, 0x88, 0xD7, 0xB4, 0x8A, 0x8C, 0xC5, 0xD1, 0x11, 0x82, 0xCB, 0xD1}; - thread_local EncryptedName checkHover(checkHoverSource); - const std::uint8_t checkNormalSource[] = {0x15, 0x96, 0xEB, 0xB3, 0x27, 0x69, 0x52, 0x68, 0x13, 0xDD, 0xEB, 0x85, 0x5A, 0x1D, 0xCB, 0xE2, 0xB4, 0x54, 0x4E, 0x1A, 0x82, 0xD3, 0xE3, 0xCC, 0xBB, 0x5E, 0x58, 0x1C, 0xAE, 0xFB, 0xE3, 0xCA, 0xB2, 0x5E, 0x47, 0x2C, 0xB8, 0xC8, 0xF1, 0xC3, 0xFB, 0x5B, 0x46, 0x39, 0xE7}; - thread_local EncryptedName checkNormal(checkNormalSource); - this->m_check->SetImages(std::string(checkNormal.Text()), std::string(checkHover.Text()), std::string(checkPressed.Text()), std::string(checkInactive.Text())); + this->m_check->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0x15, 0x96, 0xEB, 0xB3, 0x27, 0x69, 0x52, 0x68, 0x13, 0xDD, 0xEB, 0x85, 0x5A, 0x1D, 0xCB, 0xE2, 0xB4, 0x54, 0x4E, 0x1A, 0x82, 0xD3, 0xE3, 0xCC, 0xBB, 0x5E, 0x58, 0x1C, 0xAE, 0xFB, 0xE3, 0xCA, 0xB2, 0x5E, 0x47, 0x2C, 0xB8, 0xC8, 0xF1, 0xC3, 0xFB, 0x5B, 0x46, 0x39, 0xE7}; + constexpr EncryptedSource<45> source(bytes); + thread_local EncryptedName<45, 0xA597A7E7492B39D5ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xB3, 0x40, 0x7B, 0x2B, 0x15, 0x2D, 0x6E, 0x32, 0xB5, 0x0B, 0x7B, 0x1D, 0x68, 0x59, 0xF7, 0xB8, 0x12, 0x82, 0xDE, 0x82, 0xB0, 0x97, 0xDF, 0x96, 0x1D, 0x88, 0xC8, 0x84, 0x9C, 0xBF, 0xDF, 0x90, 0x14, 0x88, 0xD7, 0xB4, 0x8A, 0x8C, 0xC5, 0xD1, 0x11, 0x82, 0xCB, 0xD1}; + constexpr EncryptedSource<44> source(bytes); + thread_local EncryptedName<44, 0xFFABE3D5D1BBEF73ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x44, 0x6E, 0x22, 0x20, 0xFC, 0xF8, 0x31, 0xED, 0x6A, 0x61, 0x28, 0x36, 0xFA, 0xD4, 0x19, 0xED, 0x6C, 0x68, 0x28, 0x29, 0xCA, 0xC2, 0x2A, 0xFF, 0x65, 0x21, 0x2D, 0x28, 0xDF, 0x9D}; + constexpr EncryptedSource<45> source(bytes); + thread_local EncryptedName<45, 0x0399459DAF454F0FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x92, 0xCA, 0xC2, 0xE8, 0xDE, 0xD6, 0xF9, 0xD3, 0xBC, 0xC5, 0xC8, 0xFE, 0xD8, 0xFA, 0xD1, 0xD3, 0xBA, 0xCC, 0xC8, 0xE1, 0xE8, 0xEC, 0xE2, 0xC1, 0xB3, 0x85, 0xCD, 0xE0, 0xFD, 0xB3}; + constexpr EncryptedSource<45> source(bytes); + thread_local EncryptedName<45, 0xD5A78DB38D8DAFABULL> name(source); + return name.Text(); + }())); this->m_check->checked = false; this->m_check->Invalidate(); this->AddChild(this->m_check); @@ -4381,15 +4929,27 @@ void GameSettingsUI::CUIOptionItem::Slot15(int width, int height) { runButton->SetOnClick([this]() { this->RunFunction(); }); runButton->disabled = 0; runButton->Invalidate(); - const std::uint8_t applyDisabledSource[] = {0x17, 0x3A, 0xDF, 0x61, 0x91, 0x8B, 0x42, 0xC6, 0x11, 0x71, 0xDF, 0x57, 0xEC, 0xFF, 0xDB, 0x4C, 0xB6, 0xF8, 0x7A, 0xC8, 0x34, 0x31, 0xF3, 0x62, 0xB9, 0xF2, 0x6C, 0xCE, 0x18, 0x19, 0xE5, 0x7F, 0xB9, 0xCA, 0x70, 0xEB, 0x25, 0x2C, 0xE8, 0x65, 0xB6, 0xE5, 0x6F, 0xF7, 0x28, 0x1A, 0xE3, 0x62, 0xA4, 0xF4, 0x7D, 0xF7, 0x34, 0x6B, 0xE5, 0x66, 0xA7, 0x95}; - thread_local EncryptedName applyDisabled(applyDisabledSource); - const std::uint8_t applyOverSource[] = {0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x80, 0xEE, 0x34, 0x04, 0xB8, 0xD0, 0x6D, 0x77, 0xAE, 0xE1, 0x3E, 0x12, 0xBE, 0xFC, 0x45, 0x61, 0xB3, 0xE1, 0x06, 0x0E, 0x9B, 0xC1, 0x70, 0x6C, 0xA9, 0xEE, 0x29, 0x11, 0x87, 0xCC, 0x46, 0x6C, 0xB1, 0xEA, 0x2B, 0x4F, 0x89, 0xD8, 0x69, 0x03}; - thread_local EncryptedName applyOver(applyOverSource); - const std::uint8_t applyPressedSource[] = {0x5F, 0x72, 0x43, 0xE5, 0xB7, 0x8B, 0xDE, 0xEA, 0x59, 0x39, 0x43, 0xD3, 0xCA, 0xFF, 0x47, 0x60, 0xFE, 0xB0, 0xE6, 0x4C, 0x12, 0x31, 0x6F, 0x4E, 0xF1, 0xBA, 0xF0, 0x4A, 0x3E, 0x19, 0x79, 0x53, 0xF1, 0x82, 0xEC, 0x6F, 0x03, 0x2C, 0x74, 0x49, 0xFE, 0xAD, 0xF3, 0x73, 0x0E, 0x1A, 0x6B, 0x55, 0xFA, 0xAE, 0xF0, 0x31, 0x15, 0x28, 0x6B, 0x27}; - thread_local EncryptedName applyPressed(applyPressedSource); - const std::uint8_t applyNormalSource[] = {0xD7, 0xFE, 0x21, 0xBB, 0xF9, 0x0D, 0x46, 0x4A, 0xD1, 0xB5, 0x21, 0x8D, 0x84, 0x79, 0xDF, 0xC0, 0x76, 0x3C, 0x84, 0x12, 0x5C, 0xB7, 0xF7, 0xEE, 0x79, 0x36, 0x92, 0x14, 0x70, 0x9F, 0xE1, 0xF3, 0x79, 0x0E, 0x8E, 0x31, 0x4D, 0xAA, 0xEC, 0xE9, 0x76, 0x21, 0x91, 0x2D, 0x40, 0x9C, 0xEC, 0xF2, 0x63, 0x7F, 0x83, 0x2C, 0x49, 0xC3}; - thread_local EncryptedName applyNormal(applyNormalSource); - runButton->SetImages(std::string(applyNormal.Text()), std::string(applyPressed.Text()), std::string(applyOver.Text()), std::string(applyDisabled.Text())); + runButton->SetImages(std::string([]() { + constexpr std::uint8_t bytes[] = {0xD7, 0xFE, 0x21, 0xBB, 0xF9, 0x0D, 0x46, 0x4A, 0xD1, 0xB5, 0x21, 0x8D, 0x84, 0x79, 0xDF, 0xC0, 0x76, 0x3C, 0x84, 0x12, 0x5C, 0xB7, 0xF7, 0xEE, 0x79, 0x36, 0x92, 0x14, 0x70, 0x9F, 0xE1, 0xF3, 0x79, 0x0E, 0x8E, 0x31, 0x4D, 0xAA, 0xEC, 0xE9, 0x76, 0x21, 0x91, 0x2D, 0x40, 0x9C, 0xEC, 0xF2, 0x63, 0x7F, 0x83, 0x2C, 0x49, 0xC3}; + constexpr EncryptedSource<54> source(bytes); + thread_local EncryptedName<54, 0x8783C33941E15117ULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x5F, 0x72, 0x43, 0xE5, 0xB7, 0x8B, 0xDE, 0xEA, 0x59, 0x39, 0x43, 0xD3, 0xCA, 0xFF, 0x47, 0x60, 0xFE, 0xB0, 0xE6, 0x4C, 0x12, 0x31, 0x6F, 0x4E, 0xF1, 0xBA, 0xF0, 0x4A, 0x3E, 0x19, 0x79, 0x53, 0xF1, 0x82, 0xEC, 0x6F, 0x03, 0x2C, 0x74, 0x49, 0xFE, 0xAD, 0xF3, 0x73, 0x0E, 0x1A, 0x6B, 0x55, 0xFA, 0xAE, 0xF0, 0x31, 0x15, 0x28, 0x6B, 0x27}; + constexpr EncryptedSource<56> source(bytes); + thread_local EncryptedName<56, 0x271B45771F83DD9FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x80, 0xEE, 0x34, 0x04, 0xB8, 0xD0, 0x6D, 0x77, 0xAE, 0xE1, 0x3E, 0x12, 0xBE, 0xFC, 0x45, 0x61, 0xB3, 0xE1, 0x06, 0x0E, 0x9B, 0xC1, 0x70, 0x6C, 0xA9, 0xEE, 0x29, 0x11, 0x87, 0xCC, 0x46, 0x6C, 0xB1, 0xEA, 0x2B, 0x4F, 0x89, 0xD8, 0x69, 0x03}; + constexpr EncryptedSource<55> source(bytes); + thread_local EncryptedName<55, 0xC70319B5EB61598FULL> name(source); + return name.Text(); + }()), std::string([]() { + constexpr std::uint8_t bytes[] = {0x17, 0x3A, 0xDF, 0x61, 0x91, 0x8B, 0x42, 0xC6, 0x11, 0x71, 0xDF, 0x57, 0xEC, 0xFF, 0xDB, 0x4C, 0xB6, 0xF8, 0x7A, 0xC8, 0x34, 0x31, 0xF3, 0x62, 0xB9, 0xF2, 0x6C, 0xCE, 0x18, 0x19, 0xE5, 0x7F, 0xB9, 0xCA, 0x70, 0xEB, 0x25, 0x2C, 0xE8, 0x65, 0xB6, 0xE5, 0x6F, 0xF7, 0x28, 0x1A, 0xE3, 0x62, 0xA4, 0xF4, 0x7D, 0xF7, 0x34, 0x6B, 0xE5, 0x66, 0xA7, 0x95}; + constexpr EncryptedSource<58> source(bytes); + thread_local EncryptedName<58, 0x0B8745519B1F95D7ULL> name(source); + return name.Text(); + }())); this->AddChild(this->unknown_00EC); this->m_label = new CUITextButton(); @@ -4407,9 +4967,12 @@ void GameSettingsUI::CUIOptionItem::Slot15(int width, int height) { this->m_label->SetText(std::string()); this->m_label->SetFitText(true); this->m_label->SetAlign(0, 0); - const std::uint8_t labelFontSource[] = {0x7A, 0x34, 0xE7, 0xA0, 0x94, 0x1B}; - thread_local EncryptedName labelFont(labelFontSource); - this->m_label->SetFont(std::string(labelFont.Text())); + this->m_label->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x7A, 0x34, 0xE7, 0xA0, 0x94, 0x1B}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xADC51BF9C98B413DULL> name(source); + return name.Text(); + }())); this->m_label->SetFontHeight(12); this->m_label->SetBold(1); this->m_label->SetTextColors(0, 0, 0, 0); @@ -4423,9 +4986,12 @@ void GameSettingsUI::CUIOptionItem::Slot15(int width, int height) { this->m_description->SetText("", 0); this->m_description->SetFitText(1); this->m_description->SetAlign(0, 0); - const std::uint8_t descriptionFontSource[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; - thread_local EncryptedName descriptionFont(descriptionFontSource); - this->m_description->SetFont(std::string(descriptionFont.Text())); + this->m_description->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0xDF8117FF49CFF551ULL> name(source); + return name.Text(); + }())); this->m_description->SetFontHeight(12); this->m_description->SetBold(0); this->m_description->SetColor(0); diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index d2883e205..468164b97 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -44,6 +44,7 @@ public: unsigned int Selected() const; __declspec(noinline) void UpdateListHeight(); void Create(int width, int itemHeight, int visibleItems); + void SetItemBinder(const std::function& binder); void SetButton(const std::string& normal, const std::string& hover, const std::string& pressed, const std::string& disabled); /* 0080 */ T* display; diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp index 59a850ea9..5ee1895d7 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp @@ -333,8 +333,7 @@ void CUIEquipmentPropertiesWnd::Slot15(int width, int height) { CUIStaticText* title = new CUIStaticText(); title->SetSize(100, 18); title->Move(18, 0); - const char* titleText = LookupMessage(4029); - title->SetText(titleText, std::strlen(titleText)); + title->SetText(LookupMessage(4029)); title->SetFitText(0); title->SetAlign(0, 6); { @@ -783,7 +782,7 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::Slot15(int width, i this->unknown_00E8 = new CUIStaticText(); this->unknown_00E8->SetSize(44, 12); this->unknown_00E8->Move(0, 4); - this->unknown_00E8->SetText("", 0); + this->unknown_00E8->SetText(""); this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(6, 0); const char titleFontSource[] = {'\x9E', '\x8C', '\x8D', '\x8A', '\x00', '\x15'}; @@ -800,7 +799,7 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::Slot15(int width, i this->unknown_00EC = new CUIStaticText(); this->unknown_00EC->SetSize(216, 12); this->unknown_00EC->Move(49, 4); - this->unknown_00EC->SetText("", 0); + this->unknown_00EC->SetText(""); this->unknown_00EC->SetFitText(1); this->unknown_00EC->SetAlign(0, 0); const char textFontSource[] = {'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}; @@ -886,7 +885,7 @@ void CUIEquipmentPropertiesWnd::BindLine(EquipmentPropertiesWnd::CUIItemEquipmen } line->unknown_00EC->SetText(parts[1].c_str(), parts[1].size()); } else { - line->unknown_00E8->SetText("", 0); + line->unknown_00E8->SetText(""); line->unknown_00EC->SetText(parts[0].c_str(), parts[0].size()); } } diff --git a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp index 65beaa109..837c383c2 100644 --- a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp +++ b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp @@ -533,10 +533,8 @@ void CUIProbabilityTable::Slot16() { const char* title = LookupMessage(0x1017); this->m_titleBar->SetTitle(title, std::strlen(title)); - const char* name = LookupMessage(0x1018); - this->m_nameHeader->SetText(name, std::strlen(name)); - const char* probability = LookupMessage(0x1019); - this->m_probabilityHeader->SetText(probability, std::strlen(probability)); + this->m_nameHeader->SetText(LookupMessage(0x1018)); + this->m_probabilityHeader->SetText(LookupMessage(0x1019)); } // OFFSET: 0x00A4E030 @@ -585,8 +583,7 @@ void CUIProbabilityTable::Slot15(int width, int height) { title->SetSize(310, 17); title->Move(18, 0); const char titleTextSource[] = {'\x8B', '\x87', '\xE4', '\xDB', '\xF5', '\x0F', '\xB1', '\x29', '\xF0', '\x29'}; - const char* titleText = DecryptName<0x9949BFD527532943ULL>(titleTextSource); - title->SetText(titleText, std::strlen(titleText)); + title->SetText(DecryptName<0x9949BFD527532943ULL>(titleTextSource)); title->SetFitText(0); title->SetAlign(0, 6); const char titleFont[] = {'\x28', '\x08', '\x97', '\x4A', '\x1C', '\x07'}; @@ -669,8 +666,7 @@ void CUIProbabilityTable::Slot15(int width, int height) { this->m_nameHeader->SetSize(160, 18); this->m_nameHeader->Move(10, 30); const char nameHeaderSource[] = {'\x50', '\xC3', '\x45', '\x6D', '\x12', '\xA3', '\x19', '\x6D', '\x2A', '\xC0', '\x0F', '\xD7'}; - const char* nameHeaderText = DecryptName<0xDD3913D5D7F97BE1ULL>(nameHeaderSource); - this->m_nameHeader->SetText(nameHeaderText, std::strlen(nameHeaderText)); + this->m_nameHeader->SetText(DecryptName<0xDD3913D5D7F97BE1ULL>(nameHeaderSource)); this->m_nameHeader->SetFitText(0); this->m_nameHeader->SetAlign(2, 6); const char nameHeaderFont[] = {'\xDC', '\x22', '\x6F', '\xF0', '\x0A', '\x05'}; @@ -736,7 +732,7 @@ void CUIProbabilityTable::Slot15(int width, int height) { this->m_itemName = new CUIStaticText(); this->m_itemName->SetSize(220, 24); this->m_itemName->Move(16, 61); - this->m_itemName->SetText("", 0); + this->m_itemName->SetText(""); this->m_itemName->SetFitText(1); this->m_itemName->SetAlign(6, 6); const char itemNameFont[] = {'\x2C', '\xCC', '\xAB', '\x66', '\x0A', '\x8F'}; @@ -752,8 +748,7 @@ void CUIProbabilityTable::Slot15(int width, int height) { this->m_probabilityHeader->SetSize(68, 24); this->m_probabilityHeader->Move(248, 61); const char probabilityHeaderSource[] = {'\x35', '\x79', '\xFA', '\x55', '\xB5'}; - const char* probabilityHeaderText = DecryptName<0xE7978FB5A94DD7FDULL>(probabilityHeaderSource); - this->m_probabilityHeader->SetText(probabilityHeaderText, std::strlen(probabilityHeaderText)); + this->m_probabilityHeader->SetText(DecryptName<0xE7978FB5A94DD7FDULL>(probabilityHeaderSource)); this->m_probabilityHeader->SetFitText(1); this->m_probabilityHeader->SetAlign(6, 6); const char probabilityHeaderFont[] = {'\xBA', '\xCC', '\xD7', '\x48', '\xF2', '\xFD'}; diff --git a/Source/UI/Quest/UIOngoingQuestInfo.cpp b/Source/UI/Quest/UIOngoingQuestInfo.cpp index 473494602..eb426975e 100644 --- a/Source/UI/Quest/UIOngoingQuestInfo.cpp +++ b/Source/UI/Quest/UIOngoingQuestInfo.cpp @@ -318,12 +318,9 @@ void CUIScrollWindow::Slot16() { this->firstContents->EnableClip(); this->secondContents->EnableClip(); this->rewards->EnableClip(); - const char* first = LookupMessage(0xD49); - this->firstContents->title->SetText(first, std::strlen(first)); - const char* second = LookupMessage(0xD4A); - this->secondContents->title->SetText(second, std::strlen(second)); - const char* reward = LookupMessage(0xD4B); - this->rewards->title->SetText(reward, std::strlen(reward)); + this->firstContents->title->SetText(LookupMessage(0xD49)); + this->secondContents->title->SetText(LookupMessage(0xD4A)); + this->rewards->title->SetText(LookupMessage(0xD4B)); } } @@ -333,12 +330,9 @@ namespace OngoingQuestInfo { // OFFSET: 0x00A55950 // FUNCTION: fn_16310 void CUIRewards::Slot16() { - const char* first = LookupMessage(0xD4C); - this->firstLabel->SetText(first, std::strlen(first)); - const char* second = LookupMessage(0xD4D); - this->secondLabel->SetText(second, std::strlen(second)); - const char* third = LookupMessage(0xD4E); - this->thirdLabel->SetText(third, std::strlen(third)); + this->firstLabel->SetText(LookupMessage(0xD4C)); + this->secondLabel->SetText(LookupMessage(0xD4D)); + this->thirdLabel->SetText(LookupMessage(0xD4E)); this->rewardList->unknown_00C4 = 1; this->rewardList->Invalidate(); this->npcSprite = new UINpcSprWnd(); @@ -485,7 +479,7 @@ void CUIOngoingQuestInfo::Slot15(int width, int height) { this->titleText = new CUIStaticText(); this->titleText->SetSize(342, 12); this->titleText->Move(0, 39); - this->titleText->SetText("", 0); + this->titleText->SetText(""); this->titleText->SetFitText(1); this->titleText->SetAlign(6, 0); this->titleText->SetFont("Gulim"); @@ -504,7 +498,7 @@ void CUIOngoingQuestInfo::Slot15(int width, int height) { this->dateText = new CUIStaticText(); this->dateText->SetSize(270, 12); this->dateText->Move(13, 393); - this->dateText->SetText("", 0); + this->dateText->SetText(""); this->dateText->SetFitText(0); this->dateText->SetAlign(0, 0); this->dateText->SetFont("Gulim"); @@ -597,7 +591,7 @@ void CUIRewardItem::Slot15(int width, int height) { this->nameText = new CUIStaticText(); this->nameText->SetSize(170, 12); this->nameText->Move(46, 5); - this->nameText->SetText("", 0); + this->nameText->SetText(""); this->nameText->SetFitText(0); this->nameText->SetAlign(0, 0); this->nameText->SetFont("Gulim"); @@ -611,7 +605,7 @@ void CUIRewardItem::Slot15(int width, int height) { this->countText = new CUIStaticText(); this->countText->SetSize(170, 12); this->countText->Move(46, 20); - this->countText->SetText("", 0); + this->countText->SetText(""); this->countText->SetFitText(0); this->countText->SetAlign(0, 0); this->countText->SetFont("Gulim"); @@ -818,7 +812,7 @@ void CUIRewards::Slot15(int width, int height) { this->title = new CUIStaticText(); this->title->SetSize(50, 12); this->title->Move(25, 9); - this->title->SetText("", 0); + this->title->SetText(""); this->title->SetFitText(0); this->title->SetAlign(0, 0); this->title->SetFont("Gulim"); @@ -832,7 +826,7 @@ void CUIRewards::Slot15(int width, int height) { this->firstLabel = new CUIStaticText(); this->firstLabel->SetSize(50, 12); this->firstLabel->Move(32, 30); - this->firstLabel->SetText("", 0); + this->firstLabel->SetText(""); this->firstLabel->SetFitText(0); this->firstLabel->SetAlign(0, 0); this->firstLabel->SetFont("Gulim"); @@ -846,7 +840,7 @@ void CUIRewards::Slot15(int width, int height) { this->firstText = new CUIStaticText(); this->firstText->SetSize(150, 12); this->firstText->Move(110, 30); - this->firstText->SetText("", 0); + this->firstText->SetText(""); this->firstText->SetFitText(0); this->firstText->SetAlign(0, 0); this->firstText->SetFont("Gulim"); @@ -860,7 +854,7 @@ void CUIRewards::Slot15(int width, int height) { this->secondLabel = new CUIStaticText(); this->secondLabel->SetSize(100, 12); this->secondLabel->Move(32, 51); - this->secondLabel->SetText("", 0); + this->secondLabel->SetText(""); this->secondLabel->SetFitText(0); this->secondLabel->SetAlign(0, 0); this->secondLabel->SetFont("Gulim"); @@ -874,7 +868,7 @@ void CUIRewards::Slot15(int width, int height) { this->secondText = new CUIStaticText(); this->secondText->SetSize(150, 12); this->secondText->Move(110, 51); - this->secondText->SetText("", 0); + this->secondText->SetText(""); this->secondText->SetFitText(0); this->secondText->SetAlign(0, 0); this->secondText->SetFont("Gulim"); @@ -888,7 +882,7 @@ void CUIRewards::Slot15(int width, int height) { this->thirdLabel = new CUIStaticText(); this->thirdLabel->SetSize(100, 12); this->thirdLabel->Move(32, 72); - this->thirdLabel->SetText("", 0); + this->thirdLabel->SetText(""); this->thirdLabel->SetFitText(0); this->thirdLabel->SetAlign(0, 0); this->thirdLabel->SetFont("Gulim"); diff --git a/Source/UI/Quest/UIRecommendedQuestInfo.cpp b/Source/UI/Quest/UIRecommendedQuestInfo.cpp index d894d6b34..4e83a2e2e 100644 --- a/Source/UI/Quest/UIRecommendedQuestInfo.cpp +++ b/Source/UI/Quest/UIRecommendedQuestInfo.cpp @@ -70,7 +70,7 @@ void CUIRecommendedQuestInfo::Slot15(int width, int height) { this->titleText = new CUIStaticText(); this->titleText->SetSize(342, 12); this->titleText->Move(0, 39); - this->titleText->SetText("", 0); + this->titleText->SetText(""); this->titleText->SetFitText(0); this->titleText->SetAlign(6, 0); this->titleText->SetFont(std::string("Gulim")); diff --git a/Source/UI/Quest/UIRenewQuestUI.cpp b/Source/UI/Quest/UIRenewQuestUI.cpp index 82b622028..adee469c6 100644 --- a/Source/UI/Quest/UIRenewQuestUI.cpp +++ b/Source/UI/Quest/UIRenewQuestUI.cpp @@ -1311,7 +1311,7 @@ void RenewQuestUI::CUIQuestItem::Slot15(int width, int height) { this->unknown_00EC = new CUIStaticText(); this->unknown_00EC->SetSize(260, 12); this->unknown_00EC->Move(42, 6); - this->unknown_00EC->SetText("", 0); + this->unknown_00EC->SetText(""); this->unknown_00EC->SetFitText(1); this->unknown_00EC->SetAlign(0, 0); this->unknown_00EC->SetFont(std::string(DecryptName<0xAD075B8DB599F1CDULL>({'\x8A', '\x84', '\xF5', '\xDC', '\xE0', '\x5B'}))); @@ -1325,7 +1325,7 @@ void RenewQuestUI::CUIQuestItem::Slot15(int width, int height) { this->unknown_00F0 = new CUIStaticText(); this->unknown_00F0->SetSize(260, 12); this->unknown_00F0->Move(42, 24); - this->unknown_00F0->SetText("", 0); + this->unknown_00F0->SetText(""); this->unknown_00F0->SetFitText(1); this->unknown_00F0->SetAlign(0, 0); this->unknown_00F0->SetFont(std::string(DecryptName<0xDD3913D5D7F97BE1ULL>({'\xA6', '\x0E', '\x95', '\xBE', '\xB8', '\x13'}))); @@ -1521,8 +1521,7 @@ void CUIRenewQuestUI::Slot15(int width, int height) { CUIStaticText* title = new CUIStaticText(); title->SetSize(100, 17); title->Move(18, 0); - const char* questText = DecryptName<0xD1413DBB01CD8B51ULL>({'\x00', '\xDE', '\x88', '\x52', '\xEF', '\x3D'}); - title->SetText(questText, std::strlen(questText)); + title->SetText(DecryptName<0xD1413DBB01CD8B51ULL>({'\x00', '\xDE', '\x88', '\x52', '\xEF', '\x3D'})); title->SetFitText(0); title->SetAlign(0, 6); title->SetFont(std::string(DecryptName<0x758F1D0B4F7705B9ULL>({'\xFE', '\x70', '\x1B', '\x26', '\x66', '\x1D'}))); @@ -1778,7 +1777,7 @@ void CUIRenewQuestUI::Slot15(int width, int height) { this->filterLabel = new CUIStaticText(); this->filterLabel->SetSize(100, 12); this->filterLabel->Move(52, 447); - this->filterLabel->SetText("", 0); + this->filterLabel->SetText(""); this->filterLabel->SetFitText(0); this->filterLabel->SetAlign(0, 0); this->filterLabel->SetFont(std::string(DecryptName<0x7115D9F973F913C9ULL>({'\x8E', '\x66', '\x95', '\x1A', '\x94', '\xD9'}))); @@ -2215,8 +2214,7 @@ void CUIRenewQuestUI::Slot16() { const char* title = LookupMessage(0xD48); this->titleBar->SetTitle(title, std::strlen(title)); - const char* label = LookupMessage(0x7E3); - this->filterLabel->SetText(label, std::strlen(label)); + this->filterLabel->SetText(LookupMessage(0x7E3)); bool visible = false; if (UIWindow* window = g_windowMgr.LookupWindow(0xCC)) { diff --git a/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp b/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp index 87211c716..b64b2ef9d 100644 --- a/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp +++ b/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp @@ -686,9 +686,30 @@ void CUISelectPackageItemBox::OnSelectTab(SelectPackageItemBox::CUITabInfo*, con namespace { +template +class EncryptedSource { +public: + // INLINED + template + constexpr explicit EncryptedSource(const Byte (&source)[Length]) : data{} { + for (std::size_t index = 0; index < Length; ++index) { + this->data[index] = static_cast(source[index]); + } + } + + char data[Length]; +}; + template class EncryptedName { public: + // INLINED + explicit EncryptedName(const EncryptedSource& source) : m_encrypted(true) { + for (std::uint64_t index = 0; index < Length; ++index) { + this->m_text[index] = static_cast(source.data[index]); + } + } + // INLINED template explicit EncryptedName(const Byte (&source)[Length]) : m_encrypted(true) { @@ -732,13 +753,15 @@ void SelectPackageItemBox::CUIItemInfo::Slot15(int width, int height) { this->image = new CUIStaticImage(); this->image->SetSize(200, 34); this->image->Move(0, 0); - const char imageSource[] = {'\xC9', '\x88', '\xEF', '\x41', '\x7D', '\x93', '\xB8', '\x14', '\xCF', '\xC3', '\xEF', '\x77', '\x00', '\xE7', '\x21', + this->image->SetImage(std::string([]() { + constexpr char bytes[] = {'\xC9', '\x88', '\xEF', '\x41', '\x7D', '\x93', '\xB8', '\x14', '\xCF', '\xC3', '\xEF', '\x77', '\x00', '\xE7', '\x21', '\xAA', '\x6C', '\x4B', '\x4A', '\xD8', '\xC9', '\x2D', '\x1C', '\xBA', '\x62', '\x46', '\x48', '\xDE', '\xE1', '\x34', '\x09', '\xBC', '\x64', '\x78', '\x43', '\xD2', '\xCE', '\x29', '\x53', '\xBB', '\x64', '\x57', '\x2F'}; - // GLOBAL: gl_25124 - thread_local EncryptedName imageName(imageSource); - std::string background(imageName.Text()); - this->image->SetImage(background); + constexpr EncryptedSource<43> source(bytes); + // GLOBAL: gl_25124 + thread_local EncryptedName<43, 0xD97D5DBDBB2F2709ULL> name(source); + return name.Text(); + }())); this->AddChild(this->image); this->gameItem = new CUIGameItem(); @@ -752,13 +775,16 @@ void SelectPackageItemBox::CUIItemInfo::Slot15(int width, int height) { this->nameText = new CUIStaticText(); this->nameText->SetSize(148, 24); this->nameText->Move(45, 5); - this->nameText->SetText("", 0); + this->nameText->SetText(""); this->nameText->SetFitText(1); this->nameText->SetAlign(0, 6); - const std::uint8_t nameFontSource[] = {0x38, 0x66, 0xB3, 0xB8, 0xE8, 0x67}; - // GLOBAL: gl_25125 - thread_local EncryptedName nameFont(nameFontSource); - this->nameText->SetFont(std::string(nameFont.Text())); + this->nameText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xBA, 0xA2, 0x21, 0xC0, 0xD8, 0x8F}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25123 + thread_local EncryptedName<6, 0xE7978FB5A94DD7FDULL> name(source); + return name.Text(); + }())); this->nameText->SetFontHeight(12); this->nameText->SetBold(0); this->nameText->SetColor(0); @@ -775,32 +801,35 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->title->Move(0, 0); this->title->SetImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x31', '\x68', '\xF9', '\xF3', '\xD7', '\xB7', '\x8A', '\x3C', '\x37', '\x23', '\xF9', '\xC5', '\xAA', '\xC3', '\x13', '\x93', '\x90', '\xB4', '\x50', '\x6A', '\x48', '\x10', '\x21', '\x85', '\x94', '\xB5', '\x5F', '\x68', '\x74', '\x1C', '\x13', '\x85', '\x98', '\xB3', '\x55', '\x6C', '\x75', '\x18', '\x3D', '\xAE', '\x9D', '\xA2', '\x5F', '\x7D', '\x39', '\x1B', '\x22', '\x81', '\xF1' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0xF14F79170939C7F1ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x5F', '\x6A', '\xAD', '\x51', '\x17', '\xE7', '\x38', '\x68', '\x59', '\x21', '\xAD', '\x67', '\x6A', '\x93', '\xA1', '\xC7', '\xFE', '\xB6', '\x04', '\xC8', '\x88', '\x40', '\x93', '\xD1', '\xFA', '\xB7', '\x0B', '\xCA', '\xB4', '\x4C', '\xA1', '\xD1', '\xF6', '\xB1', '\x01', '\xCE', '\xB5', '\x48', '\x8F', '\xFA', '\xF2', '\xAC', '\x09', '\x85', '\xB5', '\x44', '\x8D', '\xA5' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xA5FD29D7AB6DC59FULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x21', '\xD4', '\x39', '\x2D', '\x15', '\xDD', '\xFC', '\x10', '\x27', '\x9F', '\x39', '\x1B', '\x68', '\xA9', '\x65', '\xBF', '\x80', '\x08', '\x90', '\xB4', '\x8A', '\x7A', '\x57', '\xA9', '\x84', '\x09', '\x9F', '\xB6', '\xB6', '\x76', '\x65', '\xA9', '\x88', '\x0F', '\x95', '\xB2', '\xB7', '\x72', '\x4B', '\x82', '\x93', '\x12', '\x9E', '\xBF', '\xA1', '\x3D', '\x5B', '\xB0', '\x91', '\x7B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<50> source(bytes); + thread_local EncryptedName<50, 0xDD3913D5D7F97BE1ULL> name(source); return name.Text(); }()) ); @@ -809,13 +838,14 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { CUIStaticText* titleText = new CUIStaticText(); titleText->SetSize(250, 17); titleText->Move(18, 0); - titleText->SetText("", 0); + titleText->SetText(""); titleText->SetFitText(0); titleText->SetAlign(0, 6); titleText->SetFont( std::string([] { - const std::uint8_t source[] = {0xDC, 0x22, 0x6F, 0xF0, 0x0A, 0x05}; - thread_local EncryptedName name(source); + constexpr std::uint8_t bytes[] = {0xDC, 0x22, 0x6F, 0xF0, 0x0A, 0x05}; + constexpr EncryptedSource<6> source(bytes); + thread_local EncryptedName<6, 0x050505679903579BULL> name(source); return name.Text(); }()) ); @@ -835,39 +865,43 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { systemButton->Invalidate(); systemButton->SetImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x7D', '\x12', '\x2D', '\xCD', '\x7B', '\x71', '\x2A', '\x4E', '\x7B', '\x59', '\x2D', '\xFB', '\x06', '\x05', '\xB3', '\xE1', '\xDC', '\xCE', '\x84', '\x54', '\xE4', '\xD6', '\x81', '\xF7', '\xD8', '\xCF', '\x8B', '\x56', '\xD8', '\xDA', '\xB3', '\xF0', '\xC4', '\xCE', '\xB2', '\x55', '\xDA', '\xCC', '\x8A', '\xDC', '\xD2', '\xDB', '\x8B', '\x19', '\xD9', '\xD2', '\x9F', '\x83' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x83EFBFBB37EDBDBDULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x67', '\x5A', '\xBF', '\xC3', '\xF1', '\x85', '\xEE', '\x72', '\x61', '\x11', '\xBF', '\xF5', '\x8C', '\xF1', '\x77', '\xDD', '\xC6', '\x86', '\x16', '\x5A', '\x6E', '\x22', '\x45', '\xCB', '\xC2', '\x87', '\x19', '\x58', '\x52', '\x2E', '\x77', '\xCC', '\xDE', '\x86', '\x20', '\x5B', '\x50', '\x38', '\x4E', '\xE0', '\xC8', '\x9B', '\x51', '\x5B', '\x5C', '\x3B', '\x2B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0xBF2B4B31397FF5A7ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x09', '\x5A', '\x9F', '\x71', '\x4F', '\x1B', '\x7E', '\xEE', '\x0F', '\x11', '\x9F', '\x47', '\x32', '\x6F', '\xE7', '\x41', '\xA8', '\x86', '\x36', '\xE8', '\xD0', '\xBC', '\xD5', '\x57', '\xAC', '\x87', '\x39', '\xEA', '\xEC', '\xB0', '\xE7', '\x50', '\xB0', '\x86', '\x00', '\xE9', '\xEE', '\xA6', '\xDE', '\x7C', '\xA6', '\x9B', '\x71', '\xE9', '\xE2', '\xA5', '\xBB' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0x23BBD58F8B5FF5C9ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xAD', '\x14', '\x55', '\xD7', '\x53', '\x35', '\xD2', '\x08', '\xAB', '\x5F', '\x55', '\xE1', '\x2E', '\x41', '\x4B', '\xA7', '\x0C', '\xC8', '\xFC', '\x4E', '\xCC', '\x92', '\x79', '\xB1', '\x08', '\xC9', '\xF3', '\x4C', '\xF0', '\x9E', '\x4B', '\xB6', '\x14', '\xC8', '\xCA', '\x4F', '\xF2', '\x88', '\x72', '\x9A', '\x02', '\xDD', '\xF3', '\x03', '\xF1', '\x96', '\x67', '\xC5' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0xC517FB932D95BB6DULL> name(source); return name.Text(); }()) ); @@ -881,41 +915,45 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { closeButton->Invalidate(); closeButton->SetImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x65', '\x32', '\xAD', '\x03', '\xA3', '\xE9', '\xB2', '\xCE', '\x63', '\x79', '\xAD', '\x35', '\xDE', '\x9D', '\x2B', '\x61', '\xC4', '\xEE', '\x04', '\x9A', '\x3C', '\x4E', '\x19', '\x77', '\xC0', '\xEF', '\x0B', '\x98', '\x00', '\x42', '\x2B', '\x70', '\xDC', '\xEE', '\x32', '\x9A', '\x0F', '\x48', '\x04', '\x66', '\xFA', '\xF2', '\x0B', '\x9F', '\x4D', '\x45', '\x1A', '\x73', '\xA5' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x03772763F96D9DA5ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x47', '\xBC', '\xAB', '\x85', '\xF9', '\xC7', '\xB4', '\xC6', '\x41', '\xF7', '\xAB', '\xB3', '\x84', '\xB3', '\x2D', '\x69', '\xE6', '\x60', '\x02', '\x1C', '\x66', '\x60', '\x1F', '\x7F', '\xE2', '\x61', '\x0D', '\x1E', '\x5A', '\x6C', '\x2D', '\x78', '\xFE', '\x60', '\x34', '\x1C', '\x55', '\x66', '\x02', '\x6E', '\xD8', '\x7C', '\x05', '\x51', '\x5B', '\x64', '\x01', '\x0B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x0B7109397F6B1387ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xA7', '\x04', '\x51', '\x5F', '\x61', '\xF1', '\x26', '\xDE', '\xA1', '\x4F', '\x51', '\x69', '\x1C', '\x85', '\xBF', '\x71', '\x06', '\xD8', '\xF8', '\xC6', '\xFE', '\x56', '\x8D', '\x67', '\x02', '\xD9', '\xF7', '\xC4', '\xC2', '\x5A', '\xBF', '\x60', '\x1E', '\xD8', '\xCE', '\xC6', '\xCD', '\x50', '\x90', '\x76', '\x38', '\xC4', '\xFF', '\x8B', '\xC3', '\x52', '\x93', '\x13' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x13E33FA1A591AB67ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xF7', '\xE8', '\x6D', '\xC3', '\x7F', '\x2B', '\x6C', '\xDA', '\xF1', '\xA3', '\x6D', '\xF5', '\x02', '\x5F', '\xF5', '\x75', '\x56', '\x34', '\xC4', '\x5A', '\xE0', '\x8C', '\xC7', '\x63', '\x52', '\x35', '\xCB', '\x58', '\xDC', '\x80', '\xF5', '\x64', '\x4E', '\x34', '\xF2', '\x5A', '\xD3', '\x8A', '\xDA', '\x72', '\x68', '\x28', '\xCB', '\x5F', '\x91', '\x87', '\xC4', '\x67', '\x37' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0x17A9E5BF39AD4737ULL> name(source); return name.Text(); }()) ); @@ -930,39 +968,43 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->tabList->SetBinder([this](SelectPackageItemBox::CUITabInfo* tab, const SelectPackageItemBox::CTabInfoData& data) { this->BindTab(tab, data); }); this->tabList->SetImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x83', '\x86', '\x93', '\xDD', '\x15', '\x71', '\x8C', '\x54', '\x85', '\xCD', '\x93', '\xEB', '\x68', '\x05', '\x15', '\xEA', '\x26', '\x45', '\x36', '\x44', '\xA1', '\xCF', '\x28', '\xFA', '\x28', '\x48', '\x34', '\x42', '\x89', '\xDD', '\x3D', '\xF7', '\x1C', '\x5A', '\x36', '\x53', '\x8A', '\xD3', '\x20', '\xEA', '\x37', '\x07', '\x31', '\x4A', '\xA5', '\xBF' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<46> source(bytes); + thread_local EncryptedName<46, 0x9949BFD527532943ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xAF', '\xD2', '\x3B', '\xD9', '\xB1', '\xC9', '\x4A', '\x00', '\xA9', '\x99', '\x3B', '\xEF', '\xCC', '\xBD', '\xD3', '\xBE', '\x0A', '\x11', '\x9E', '\x40', '\x05', '\x77', '\xEE', '\xAE', '\x04', '\x1C', '\x9C', '\x46', '\x2D', '\x65', '\xFB', '\xA3', '\x30', '\x0E', '\x9E', '\x57', '\x2E', '\x77', '\xFD', '\xA8', '\x1C', '\x0E', '\xD5', '\x41', '\x1C', '\x77', '\x8F' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<47> source(bytes); + thread_local EncryptedName<47, 0xCD8F077123FB7D6FULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xA9', '\xB0', '\xB7', '\xAF', '\x5D', '\x5B', '\xBE', '\xAE', '\xAF', '\xFB', '\xB7', '\x99', '\x20', '\x2F', '\x27', '\x10', '\x0C', '\x73', '\x12', '\x36', '\xE9', '\xE5', '\x1A', '\x00', '\x02', '\x7E', '\x10', '\x30', '\xC1', '\xF7', '\x0F', '\x0D', '\x36', '\x6C', '\x12', '\x21', '\xC2', '\xF9', '\x12', '\x10', '\x1D', '\x31', '\x15', '\x38', '\xED', '\x95' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<46> source(bytes); + thread_local EncryptedName<46, 0x637B959D55771F69ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x91', '\x24', '\x0D', '\xFB', '\x7B', '\xF3', '\x84', '\x1C', '\x97', '\x6F', '\x0D', '\xCD', '\x06', '\x87', '\x1D', '\xA2', '\x34', '\xE7', '\xA8', '\x62', '\xCF', '\x4D', '\x20', '\xB2', '\x3A', '\xEA', '\xAA', '\x64', '\xE7', '\x5F', '\x35', '\xBF', '\x0E', '\xF8', '\xA8', '\x75', '\xE4', '\x51', '\x28', '\xA2', '\x25', '\xA5', '\xAF', '\x6C', '\xCB', '\x3D' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<46> source(bytes); + thread_local EncryptedName<46, 0xD1413DBB01CD8B51ULL> name(source); return name.Text(); }()) ); @@ -973,58 +1015,64 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->tabList->scrollBar->step = 34; this->tabList->scrollBar->SetButtonImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x79', '\xAA', '\xB7', '\xB5', '\xCB', '\xD3', '\x4A', '\xB8', '\x7F', '\xE1', '\xB7', '\x83', '\xB6', '\xA7', '\xD3', '\x06', '\xDA', '\x77', '\x18', '\x23', '\x67', '\x2D', '\xFA', '\x05', '\x97', '\x67', '\x1A', '\x3F', '\x0B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0x758F1D0B4F7705B9ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xA5', '\xB6', '\x85', '\xF3', '\xED', '\xED', '\xDE', '\x44', '\xA3', '\xFD', '\x85', '\xC5', '\x90', '\x99', '\x47', '\xFA', '\x06', '\x6B', '\x2A', '\x65', '\x41', '\x13', '\x7F', '\xE6', '\x12', '\x77', '\x6B', '\x6B', '\x40', '\x53', '\x1B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x891B232D09451965ULL> name(source); return name.Text(); }()) ); this->tabList->scrollBar->SetBackground( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x55', '\x20', '\x21', '\xF7', '\x9D', '\xC7', '\xA4', '\x3C', '\x53', '\x6B', '\x21', '\xC1', '\xE0', '\xB3', '\x3D', '\x82', '\xF6', '\xFD', '\x8E', '\x61', '\x31', '\x39', '\x0C', '\x98', '\xF1', '\xA1', '\x83', '\x60', '\x2D', '\x09' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0xF161095D0DE18F95ULL> name(source); return name.Text(); }()) ); this->tabList->scrollBar->SetThumbImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x2F', '\xDE', '\x1F', '\xE9', '\xAD', '\x81', '\x02', '\x20', '\x29', '\x95', '\x1F', '\xDF', '\xD0', '\xF5', '\x9B', '\x9E', '\x8C', '\x03', '\xB0', '\x7F', '\x01', '\x7F', '\xA5', '\x8C', '\x9D', '\x2E', '\xAA', '\x63', '\x43', '\x2D', '\xAA', '\x9D', '\xEF' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<33> source(bytes); + thread_local EncryptedName<33, 0xEDC74F6D13DF71EFULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x4F', '\x12', '\x2F', '\x7D', '\xBD', '\x0B', '\x68', '\xB8', '\x49', '\x59', '\x2F', '\x4B', '\xC0', '\x7F', '\xF1', '\x06', '\xEC', '\xCF', '\x80', '\xEB', '\x11', '\xF5', '\xCF', '\x14', '\xFD', '\xE2', '\x82', '\xEE', '\x19', '\xEB', '\xCF', '\x18', '\xFF', '\xBD' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0x75ADC57D87EFBD8FULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x19', '\x56', '\x21', '\x19', '\xAD', '\xDB', '\x68', '\xE6', '\x1F', '\x1D', '\x21', '\x2F', '\xD0', '\xAF', '\xF1', '\x58', '\xBA', '\x8B', '\x8E', '\x8F', '\x01', '\x25', '\xCF', '\x4A', '\xAB', '\xA6', '\x85', '\x8C', '\x1A', '\x7B', '\x83', '\x49', '\xB4', '\x89', '\xE1' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x2BAD156DE3E1F9D9ULL> name(source); return name.Text(); }()) ); @@ -1040,39 +1088,43 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->itemList->SetBinder([this](SelectPackageItemBox::CUIItemInfo* item, const ITEM_INFO& data) { this->BindItem(item, data); }); this->itemList->SetImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x11', '\xF4', '\x57', '\x1F', '\xF9', '\x49', '\x2E', '\xE2', '\x17', '\xBF', '\x57', '\x29', '\x84', '\x3D', '\xB7', '\x5C', '\xB4', '\x37', '\xF2', '\x86', '\x4D', '\xF7', '\x8A', '\x4C', '\xBA', '\x3A', '\xF0', '\x80', '\x65', '\xEE', '\x9F', '\x4A', '\xBC', '\x04', '\xFB', '\x8C', '\x4A', '\xF3', '\xC5', '\x4D', '\xBC', '\x2B', '\x97' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0x2FEB8739E5975BD1ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x0D', '\xAC', '\x0D', '\x81', '\x57', '\xF5', '\xD6', '\xFE', '\x0B', '\xE7', '\x0D', '\xB7', '\x2A', '\x81', '\x4F', '\x40', '\xA8', '\x6F', '\xA8', '\x18', '\xE3', '\x4B', '\x72', '\x50', '\xA6', '\x62', '\xAA', '\x1E', '\xCB', '\x52', '\x67', '\x56', '\xA0', '\x5C', '\xA1', '\x12', '\xE4', '\x4F', '\x3D', '\x51', '\xA0', '\x73', '\xCD' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0x33133B977BCD03CDULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xEF', '\x78', '\x85', '\xDF', '\xF9', '\x65', '\xE8', '\x6C', '\xE9', '\x33', '\x85', '\xE9', '\x84', '\x11', '\x71', '\xD2', '\x4A', '\xBB', '\x20', '\x46', '\x4D', '\xDB', '\x4C', '\xC2', '\x44', '\xB6', '\x22', '\x40', '\x65', '\xC2', '\x59', '\xC4', '\x42', '\x88', '\x29', '\x4C', '\x4A', '\xDF', '\x03', '\xC3', '\x42', '\xA7', '\x45' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0xA12DAB392545D72FULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xB5', '\x94', '\xC3', '\xD5', '\xD3', '\x0F', '\x64', '\xA6', '\xB3', '\xDF', '\xC3', '\xE3', '\xAE', '\x7B', '\xFD', '\x18', '\x10', '\x57', '\x66', '\x4C', '\x67', '\xB1', '\xC0', '\x08', '\x1E', '\x5A', '\x64', '\x4A', '\x4F', '\xA8', '\xD5', '\x0E', '\x18', '\x64', '\x6F', '\x46', '\x60', '\xB5', '\x8F', '\x09', '\x18', '\x4B', '\x03' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0x6BA1C1132F033B75ULL> name(source); return name.Text(); }()) ); @@ -1083,58 +1135,64 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->itemList->scrollBar->step = 34; this->itemList->scrollBar->SetButtonImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x05', '\x82', '\xEB', '\xC5', '\x49', '\xD3', '\xA8', '\x22', '\x03', '\xC9', '\xEB', '\xF3', '\x34', '\xA7', '\x31', '\x9C', '\xA6', '\x5F', '\x44', '\x53', '\xE5', '\x2D', '\x18', '\x9F', '\xEB', '\x4F', '\x46', '\x4F', '\x89' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<29> source(bytes); + thread_local EncryptedName<29, 0xEF6D1D893F2B2DC5ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xDD', '\x68', '\x8B', '\x4F', '\x1D', '\xB9', '\x8C', '\xEE', '\xDB', '\x23', '\x8B', '\x79', '\x60', '\xCD', '\x15', '\x50', '\x7E', '\xB5', '\x24', '\xD9', '\xB1', '\x47', '\x2D', '\x4C', '\x6A', '\xA9', '\x65', '\xD7', '\xB0', '\x07', '\x49' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<31> source(bytes); + thread_local EncryptedName<31, 0x234977DDB54BC71DULL> name(source); return name.Text(); }()) ); this->itemList->scrollBar->SetBackground( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\xB7', '\x38', '\x47', '\xE7', '\xE3', '\x9D', '\x24', '\xA2', '\xB1', '\x73', '\x47', '\xD1', '\x9E', '\xE9', '\xBD', '\x1C', '\x14', '\xE5', '\xE8', '\x71', '\x4F', '\x63', '\x8C', '\x06', '\x13', '\xB9', '\xE5', '\x70', '\x53', '\x53' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<30> source(bytes); + thread_local EncryptedName<30, 0x6FE153231D879777ULL> name(source); return name.Text(); }()) ); this->itemList->scrollBar->SetThumbImages( std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x9B', '\xFC', '\x9F', '\x27', '\x47', '\x51', '\x66', '\xF4', '\x9D', '\xB7', '\x9F', '\x11', '\x3A', '\x25', '\xFF', '\x4A', '\x38', '\x21', '\x30', '\xB1', '\xEB', '\xAF', '\xC1', '\x58', '\x29', '\x0C', '\x2A', '\xAD', '\xA9', '\xFD', '\xCE', '\x49', '\x5B' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<33> source(bytes); + thread_local EncryptedName<33, 0x39A39F87DD5F535BULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x37', '\x66', '\xA3', '\x93', '\xBD', '\x57', '\xB4', '\x5C', '\x31', '\x2D', '\xA3', '\xA5', '\xC0', '\x23', '\x2D', '\xE2', '\x94', '\xBB', '\x0C', '\x05', '\x11', '\xA9', '\x13', '\xF0', '\x85', '\x96', '\x0E', '\x00', '\x19', '\xB7', '\x13', '\xFC', '\x87', '\xC9' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<34> source(bytes); + thread_local EncryptedName<34, 0x9171997D6963C9F7ULL> name(source); return name.Text(); }()), std::string([] { - const char source[] = { + constexpr char bytes[] = { '\x77', '\x9E', '\x2F', '\x39', '\xC3', '\x11', '\x5C', '\x82', '\x71', '\xD5', '\x2F', '\x0F', '\xBE', '\x65', '\xC5', '\x3C', '\xD4', '\x43', '\x80', '\xAF', '\x6F', '\xEF', '\xFB', '\x2E', '\xC5', '\x6E', '\x8B', '\xAC', '\x74', '\xB1', '\xB7', '\x2D', '\xDA', '\x41', '\xEF' }; - thread_local EncryptedName name(source); + constexpr EncryptedSource<35> source(bytes); + thread_local EncryptedName<35, 0x4F99DF03C3EF31B7ULL> name(source); return name.Text(); }()) ); @@ -1149,8 +1207,9 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->okButton->Invalidate(); this->okButton->SetText( std::string([] { - const std::uint8_t source[] = {0xED, 0xDF, 0x6F, 0x05, 0x0D}; - thread_local EncryptedName name(source); + constexpr std::uint8_t bytes[] = {0xED, 0xDF, 0x6F, 0x05, 0x0D}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xE52DF30DCBAF7125ULL> name(source); return name.Text(); }()) ); @@ -1165,8 +1224,9 @@ void CUISelectPackageItemBox::Slot15(int width, int height) { this->cancelButton->Invalidate(); this->cancelButton->SetText( std::string([] { - const std::uint8_t source[] = {0xEB, 0xE8, 0x1E, 0x77, 0x9D}; - thread_local EncryptedName name(source); + constexpr std::uint8_t bytes[] = {0xEB, 0xE8, 0x1E, 0x77, 0x9D}; + constexpr EncryptedSource<5> source(bytes); + thread_local EncryptedName<5, 0xCFF3899D95AF355FULL> name(source); return name.Text(); }()) ); @@ -1180,13 +1240,16 @@ void SelectPackageItemBox::CUITabInfo::Slot15(int width, int height) { this->nameText = new CUIStaticText(); this->nameText->SetSize(148, 34); this->nameText->Move(11, 0); - this->nameText->SetText("", 0); + this->nameText->SetText(""); this->nameText->SetFitText(0); this->nameText->SetAlign(0, 6); - const std::uint8_t nameFontSource[] = {0xBA, 0xA2, 0x21, 0xC0, 0xD8, 0x8F}; - // GLOBAL: gl_25123 - thread_local EncryptedName nameFont(nameFontSource); - this->nameText->SetFont(std::string(nameFont.Text())); + this->nameText->SetFont(std::string([]() { + constexpr std::uint8_t bytes[] = {0xBA, 0xA2, 0x21, 0xC0, 0xD8, 0x8F}; + constexpr EncryptedSource<6> source(bytes); + // GLOBAL: gl_25123 + thread_local EncryptedName<6, 0xE7978FB5A94DD7FDULL> name(source); + return name.Text(); + }())); this->nameText->SetFontHeight(12); this->nameText->SetBold(0); this->nameText->SetColor(0); @@ -1198,32 +1261,44 @@ void SelectPackageItemBox::CUITabInfo::Slot15(int width, int height) { // OFFSET: 0x00A6FE20 // FUNCTION: fn_16783 void CUISelectPackageItemBox::BindItem(SelectPackageItemBox::CUIItemInfo* item, const ITEM_INFO& data) { - const std::uint8_t listSource[] = {0x6F, 0xE0, 0xEB, 0x19, 0x1F, 0xDB, 0x96, 0xF2, 0x69, 0xAB, 0xEB, 0x2F, 0x62, 0xAF, 0x0F, + std::string image([]() { + constexpr std::uint8_t bytes[] = {0x6F, 0xE0, 0xEB, 0x19, 0x1F, 0xDB, 0x96, 0xF2, 0x69, 0xAB, 0xEB, 0x2F, 0x62, 0xAF, 0x0F, 0x4C, 0xCA, 0x23, 0x4E, 0x80, 0xAB, 0x65, 0x32, 0x5C, 0xC4, 0x2E, 0x4C, 0x86, 0x83, 0x7C, 0x27, 0x5A, 0xC2, 0x10, 0x47, 0x8A, 0xAC, 0x61, 0x7D, 0x5D, 0xC2, 0x3F, 0x2B}; - thread_local EncryptedName defaultImage(listSource); - std::string image(defaultImage.Text()); + constexpr EncryptedSource<43> source(bytes); + thread_local EncryptedName<43, 0x3F5315DFE32B4FAFULL> name(source); + return name.Text(); + }()); if (data.unknown_0068 > 0) { if (data.unknown_0098 > 0) { - const std::uint8_t timeRandomSource[] = {0x55, 0x52, 0xD1, 0x49, 0x91, 0xAB, 0x50, 0xFC, 0x53, 0x19, 0xD1, 0x7F, 0xEC, + image = std::string([]() { + constexpr std::uint8_t bytes[] = {0x55, 0x52, 0xD1, 0x49, 0x91, 0xAB, 0x50, 0xFC, 0x53, 0x19, 0xD1, 0x7F, 0xEC, 0xDF, 0xC9, 0x42, 0xF0, 0x91, 0x74, 0xD0, 0x25, 0x15, 0xF4, 0x52, 0xFE, 0x9C, 0x76, 0xD6, 0x0D, 0x0C, 0xE1, 0x54, 0xF8, 0xA2, 0x7D, 0xDA, 0x22, 0x11, 0xCA, 0x45, 0xFC, 0x90, 0x74, 0xC1, 0x30, 0x0B, 0xBB, 0x53, 0xF8, 0x8D, 0x11}; - thread_local EncryptedName timeRandom(timeRandomSource); - image = std::string(timeRandom.Text()); + constexpr EncryptedSource<51> source(bytes); + thread_local EncryptedName<51, 0x31956551B311FD95ULL> name(source); + return name.Text(); + }()); } else { - const std::uint8_t timeSource[] = {0x51, 0x6C, 0x7D, 0x9B, 0xA5, 0x5F, 0xF8, 0xF4, 0x57, 0x27, 0x7D, 0xAD, 0xD8, 0x2B, 0x61, 0x4A, + image = std::string([]() { + constexpr std::uint8_t bytes[] = {0x51, 0x6C, 0x7D, 0x9B, 0xA5, 0x5F, 0xF8, 0xF4, 0x57, 0x27, 0x7D, 0xAD, 0xD8, 0x2B, 0x61, 0x4A, 0xF4, 0xAF, 0xD8, 0x02, 0x11, 0xE1, 0x5C, 0x5A, 0xFA, 0xA2, 0xDA, 0x04, 0x39, 0xF8, 0x49, 0x5C, 0xFC, 0x9C, 0xD1, 0x08, 0x16, 0xE5, 0x62, 0x4D, 0xF8, 0xAE, 0xD8, 0x4F, 0x07, 0xFC, 0x4D, 0x39}; - thread_local EncryptedName timeLimited(timeSource); - image = std::string(timeLimited.Text()); + constexpr EncryptedSource<48> source(bytes); + thread_local EncryptedName<48, 0x393D916561BDC391ULL> name(source); + return name.Text(); + }()); } } else if (data.unknown_0098 > 0) { - const std::uint8_t randomSource[] = {0xD5, 0x3C, 0x73, 0x3B, 0x27, 0x8D, 0x94, 0x20, 0xD3, 0x77, 0x73, 0x0D, 0x5A, 0xF9, 0x0D, 0x9E, 0x70, + image = std::string([]() { + constexpr std::uint8_t bytes[] = {0xD5, 0x3C, 0x73, 0x3B, 0x27, 0x8D, 0x94, 0x20, 0xD3, 0x77, 0x73, 0x0D, 0x5A, 0xF9, 0x0D, 0x9E, 0x70, 0xFF, 0xD6, 0xA2, 0x93, 0x33, 0x30, 0x8E, 0x7E, 0xF2, 0xD4, 0xA4, 0xBB, 0x2A, 0x25, 0x88, 0x78, 0xCC, 0xDF, 0xA8, 0x94, 0x37, 0x0E, 0x9F, 0x74, 0xFD, 0xDC, 0xB1, 0xC9, 0x21, 0x3C, 0x9D, 0x15}; - thread_local EncryptedName randomOption(randomSource); - image = std::string(randomOption.Text()); + constexpr EncryptedSource<49> source(bytes); + thread_local EncryptedName<49, 0xED5143E7C1B39315ULL> name(source); + return name.Text(); + }()); } item->image->SetImage(image); diff --git a/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp index cd0770463..837740e15 100644 --- a/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp +++ b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp @@ -143,7 +143,7 @@ void CUIDelayItem::Slot15(int width, int height) { this->level = new CUIStaticText(); this->level->SetSize(44, 21); this->level->Move(0, 0); - this->level->SetText("", 0); + this->level->SetText(""); this->level->SetFitText(0); this->level->SetAlign(6, 6); const std::uint8_t levelFontSource[] = {0x1E, 0xF0, 0xEB, 0x10, 0x9A, 0x2F}; @@ -176,7 +176,7 @@ void CUITime::Slot15(int width, int height) { this->text = new CUIStaticText(); this->text->SetSize(60, 21); this->text->Move(5, 0); - this->text->SetText("", 0); + this->text->SetText(""); this->text->SetFitText(0); this->text->SetAlign(6, 6); const std::uint8_t textFontSource[] = {0xEC, 0xDA, 0xE1, 0xE4, 0xDE, 0x8D}; @@ -648,8 +648,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char titleTextSource[] = { '\xF5', '\x4A', '\x6E', '\x43', '\xDB', '\x8C', '\xEB', '\xC0', '\x95', '\x43', '\x6B', '\xF9'}; thread_local EncryptedName titleTextName(titleTextSource); - const char* titleText = titleTextName.Text(); - title->SetText(titleText, std::strlen(titleText)); + title->SetText(titleTextName.Text()); } title->SetFitText(0); title->SetAlign(0, 6); @@ -735,7 +734,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { this->unknown_00DC = new CUIStaticText(); this->unknown_00DC->SetSize(325, 25); this->unknown_00DC->Move(10, 27); - this->unknown_00DC->SetText("", 0); + this->unknown_00DC->SetText(""); this->unknown_00DC->SetFitText(1); this->unknown_00DC->SetAlign(6, 6); { @@ -759,8 +758,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char castingTextSource[] = { '\x27', '\x66', '\xEE', '\x4D', '\x63', '\xC4', '\xE3'}; thread_local EncryptedName castingTextName(castingTextSource); - const char* castingText = castingTextName.Text(); - this->labels[0]->SetText(castingText, std::strlen(castingText)); + this->labels[0]->SetText(castingTextName.Text()); } this->labels[0]->SetFitText(0); this->labels[0]->SetAlign(6, 6); @@ -785,8 +783,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char cooldownTextSource[] = { '\x3B', '\x13', '\x98', '\xBB', '\x67', '\x7C', '\xA3'}; thread_local EncryptedName cooldownTextName(cooldownTextSource); - const char* cooldownText = cooldownTextName.Text(); - this->labels[1]->SetText(cooldownText, std::strlen(cooldownText)); + this->labels[1]->SetText(cooldownTextName.Text()); } this->labels[1]->SetFitText(0); this->labels[1]->SetAlign(6, 6); @@ -811,8 +808,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char levelTextSource[] = { '\x3A', '\x04', '\x01', '\xC4', '\xB7'}; thread_local EncryptedName levelTextName(levelTextSource); - const char* levelText = levelTextName.Text(); - this->labels[2]->SetText(levelText, std::strlen(levelText)); + this->labels[2]->SetText(levelTextName.Text()); } this->labels[2]->SetFitText(1); this->labels[2]->SetAlign(6, 6); @@ -837,8 +833,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char fixedTextSource[] = { '\xE1', '\x18', '\x0E', '\xED', '\xFF'}; thread_local EncryptedName fixedTextName(fixedTextSource); - const char* fixedText = fixedTextName.Text(); - this->columns[0]->SetText(fixedText, std::strlen(fixedText)); + this->columns[0]->SetText(fixedTextName.Text()); } this->columns[0]->SetFitText(1); this->columns[0]->SetAlign(6, 6); @@ -863,8 +858,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char variableTextSource[] = { '\xCB', '\x2C', '\xDE', '\xB4', '\x11'}; thread_local EncryptedName variableTextName(variableTextSource); - const char* variableText = variableTextName.Text(); - this->columns[1]->SetText(variableText, std::strlen(variableText)); + this->columns[1]->SetText(variableTextName.Text()); } this->columns[1]->SetFitText(1); this->columns[1]->SetAlign(6, 6); @@ -889,8 +883,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char globalTextSource[] = { '\x28', '\xE2', '\x4A', '\xFF', '\xEC', '\x41', '\x91'}; thread_local EncryptedName globalTextName(globalTextSource); - const char* globalText = globalTextName.Text(); - this->columns[2]->SetText(globalText, std::strlen(globalText)); + this->columns[2]->SetText(globalTextName.Text()); } this->columns[2]->SetFitText(1); this->columns[2]->SetAlign(6, 6); @@ -915,8 +908,7 @@ void CUISkillDelayInfo::Slot15(int width, int height) { const char skillTextSource[] = { '\x12', '\xB3', '\xCC', '\x54', '\xC7'}; thread_local EncryptedName skillTextName(skillTextSource); - const char* skillText = skillTextName.Text(); - this->columns[3]->SetText(skillText, std::strlen(skillText)); + this->columns[3]->SetText(skillTextName.Text()); } this->columns[3]->SetFitText(1); this->columns[3]->SetAlign(6, 6); diff --git a/Source/UI/Text/UIStaticTextControl.h b/Source/UI/Text/UIStaticTextControl.h index cbd4c4e82..54cd75c81 100644 --- a/Source/UI/Text/UIStaticTextControl.h +++ b/Source/UI/Text/UIStaticTextControl.h @@ -25,10 +25,10 @@ public: void SetFont(const std::string& name); void SetOutline(bool enabled, std::uint32_t color); void SetShadow(bool enabled, std::uint32_t color); - __declspec(noinline) void SetText(const char* value, std::size_t length); + __declspec(noinline) void SetText(std::string_view value); // INLINED - void SetText(std::string_view value) { - this->SetText(value.data(), value.size()); + void SetText(const char* value, std::size_t length) { + this->SetText(std::string_view(value, length)); } void SetTooltip(const char* value, std::size_t length); diff --git a/Source/UI/UIMacroReport.cpp b/Source/UI/UIMacroReport.cpp index 162b9b5a5..faf931b04 100644 --- a/Source/UI/UIMacroReport.cpp +++ b/Source/UI/UIMacroReport.cpp @@ -194,8 +194,7 @@ void CUIMacroReport::Slot15(int width, int height) { { const char titleTextSource[] = { '\x47', '\xBC', '\xAB', '\x85', '\x19', '\xB4', '\xB4', '\xBB', '\x6A', '\x13'}; - const char* value = DecryptName<0x0B7109397F6B1387ULL>(titleTextSource); - title->SetText(value, std::strlen(value)); + title->SetText(DecryptName<0x0B7109397F6B1387ULL>(titleTextSource)); } title->SetFitText(0); title->SetAlign(0, 6); @@ -296,8 +295,7 @@ void CUIMacroReport::Slot15(int width, int height) { CUIStaticText* text = this->unknown_00E4; const char firstTypeSource[] = { '\x07', '\x6F', '\x54', '\xCA', '\x9B', '\x78', '\x2E', '\x34', '\x73', '\x0C', '\x3A', '\x80', '\x1E', '\x9F', '\x2F', '\x44', '\x00', '\x74', '\xCD', '\x8A', '\x7E', '\x0F', '\x02', '\x83'}; - const char* value = DecryptName<0x83EFBFBB37EDBDBDULL>(firstTypeSource); - text->SetText(value, std::strlen(value)); + text->SetText(DecryptName<0x83EFBFBB37EDBDBDULL>(firstTypeSource)); } this->unknown_00E4->SetFitText(0); this->unknown_00E4->SetAlign(0, 0); @@ -321,8 +319,7 @@ void CUIMacroReport::Slot15(int width, int height) { CUIStaticText* text = this->unknown_00E8; const char secondTypeSource[] = { '\x2E', '\x07', '\x50', '\x0A', '\xF1', '\x2A', '\x3E', '\x0F', '\x2A', '\x32', '\x5C', '\x67', '\x14', '\x48', '\xC9', '\x91', '\x50', '\x4E', '\x0A', '\xDD'}; - const char* value = DecryptName<0x2FE993D1DDE1F197ULL>(secondTypeSource); - text->SetText(value, std::strlen(value)); + text->SetText(DecryptName<0x2FE993D1DDE1F197ULL>(secondTypeSource)); } this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(0, 0); @@ -463,8 +460,7 @@ void CUIMacroReport::Slot15(int width, int height) { const char warningSource[] = { '\xD4', '\xB7', '\x7D', '\xB6', '\x2D', '\x51', '\xE8', '\xFA', '\x8E', '\x75', '\x74', '\xBC', '\x2D', '\x2E', '\x89', '\x85', '\x82', '\xED', '\x6F', '\x5F', '\xB4', '\x31', '\xEF', '\xFE', '\x45', '\xE9', '\x3F', '\x5F', '\xCD', '\x39', '\x92', '\x85', '\xD1', '\x9A', '\x7D', '\xA6', '\x23', '\xEF'}; - const char* value = DecryptName<0x452FEF0D7FC95565ULL>(warningSource); - text->SetText(value, std::strlen(value)); + text->SetText(DecryptName<0x452FEF0D7FC95565ULL>(warningSource)); } this->unknown_00FC->SetFitText(0); this->unknown_00FC->SetAlign(0, 0); diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index aca232630..785e6ae05 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -227,10 +227,6 @@ CBitmapRes* CUIControl::LoadBitmapResource(const std::string& name, bool resolve return static_cast(resources.Load(name)); } -// INLINED -CUIControl::CUIControl() : UIWindow(0), hitEnabled(1) { -} - // INLINED __forceinline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), unknown_00C4(nullptr), unknown_00EC(nullptr) { } @@ -2935,8 +2931,8 @@ void CUIStaticText::SetFont(const std::string& name) { // OFFSET: 0x009F0E50 // FUNCTION: fn_14680 -void CUIStaticText::SetText(const char* value, std::size_t length) { - this->text.assign(value, length); +void CUIStaticText::SetText(std::string_view value) { + this->text.assign(value.data(), value.size()); this->UpdateText(); } @@ -2948,9 +2944,9 @@ void CUIStaticText::SetTooltip(const char* value, std::size_t length) { // OFFSET: 0x009F1D20 // FUNCTION: fn_14702 -void CUITitleBar::SetTitle(const char* title, std::size_t length) { +void CUITitleBar::SetTitle(std::string_view title) { if (this->titleText) { - this->titleText->SetText(title, length); + this->titleText->SetText(title); } } diff --git a/Source/UI/Window/UIControl.h b/Source/UI/Window/UIControl.h index 1a06eb08e..2d9c32131 100644 --- a/Source/UI/Window/UIControl.h +++ b/Source/UI/Window/UIControl.h @@ -58,7 +58,9 @@ class CUIControl : public UIWindow { public: __declspec(noinline) CBitmapRes* LoadBitmapResource(const std::string& name, bool resolveSkin); - CUIControl(); + // INLINED + CUIControl() : UIWindow(0), hitEnabled(1) { + } ~CUIControl() override; bool CanHitTest() override; void Slot10(int x, int y, std::intptr_t value) override; @@ -284,7 +286,11 @@ public: void SetImages(const std::string& left, const std::string& middle, const std::string& right); void SetSecondButton(CUIButton* button); - void SetTitle(const char* title, std::size_t length); + void SetTitle(std::string_view title); + // INLINED + void SetTitle(const char* title, std::size_t length) { + this->SetTitle(std::string_view(title, length)); + } /* 0080 */ unsigned char resizable; /* 0084 */ CResPtr left; diff --git a/Source/UI/Window/UILocaleTextWnd.cpp b/Source/UI/Window/UILocaleTextWnd.cpp index 64448746b..2d0e37716 100644 --- a/Source/UI/Window/UILocaleTextWnd.cpp +++ b/Source/UI/Window/UILocaleTextWnd.cpp @@ -49,7 +49,7 @@ void CUISubTab::Slot15(int width, int height) { this->unknown_00E8 = new CUIStaticText(); this->unknown_00E8->SetSize(98, 26); this->unknown_00E8->Move(0, 0); - this->unknown_00E8->SetText("", 0); + this->unknown_00E8->SetText(""); this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(6, 6); { @@ -85,7 +85,7 @@ void CUITab::Slot15(int width, int height) { this->unknown_00E8 = new CUIStaticText(); this->unknown_00E8->SetSize(98, 40); this->unknown_00E8->Move(0, 0); - this->unknown_00E8->SetText("", 0); + this->unknown_00E8->SetText(""); this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(6, 6); { @@ -108,7 +108,7 @@ void CUITabInfo::Slot15(int width, int height) { this->unknown_00E8 = new CUIStaticText(); this->unknown_00E8->SetSize(90, 44); this->unknown_00E8->Move(32, 0); - this->unknown_00E8->SetText("", 0); + this->unknown_00E8->SetText(""); this->unknown_00E8->SetFitText(0); this->unknown_00E8->SetAlign(0, 6); { @@ -127,7 +127,7 @@ void CUITabInfo::Slot15(int width, int height) { this->unknown_00EC = new CUIStaticText(); this->unknown_00EC->SetSize(442, 44); this->unknown_00EC->Move(140, 0); - this->unknown_00EC->SetText("", 0); + this->unknown_00EC->SetText(""); this->unknown_00EC->SetFitText(1); this->unknown_00EC->SetAlign(0, 6); {