Batch #13796 by eAthena: 46 byte-identical, 9 confirmed by peer review. - fn_14005 AdventureGuide::CUIMonsterInfo::Slot15: logic confirmed by peer review - fn_14007 AdventureGuide::CUIQuestInfo::Slot15: logic confirmed by peer review - fn_14009 AdventureGuide::CUITab::Slot15: byte-identical - fn_14010 AdventureGuide::CUITabInfo::Slot15: logic confirmed by peer review - fn_14680 CUIStaticText::SetText: byte-identical - fn_14702 CUITitleBar::SetTitle: byte-identical - fn_14766 CUIListBoxEx<EnchantUI::CUIEnchantItem,EnchantUI::CEnchantItemData>::CUIListBoxEx<EnchantUI::CUIEnchantItem,EnchantUI::CEnchantItemData>: byte-identical (already on main) - fn_14767 CUIListBoxEx<EnchantUI::CUITargetItem,ITEM_INFO>::CUIListBoxEx<EnchantUI::CUITargetItem,ITEM_INFO>: byte-identical (already on main) - fn_14768 EnchantUI::CUIEnchantPage::CUIEnchantPage: byte-identical (already on main) - fn_14769 CUIGameItem::CUIGameItem: logic confirmed by peer review (already on main) - fn_14770 EnchantUI::CUIMainPage::CUIMainPage: byte-identical (already on main) - fn_14771 CUITab::CUITab: byte-identical (already on main) - fn_14812 EnchantUI::CUIEnchantPage::CreateIngredient: byte-identical (already on main) - fn_14816 EnchantUI::CUIEnchantItem::Slot15: byte-identical - fn_14820 EnchantUI::CUINormalPerfect::Slot15: byte-identical - fn_14821 EnchantUI::CUINormalRandom::Slot15: byte-identical - fn_14822 EnchantUI::CUIReset::Slot15: byte-identical - fn_14830 EnchantUI::CUIUpgradePerfect::Slot15: byte-identical - fn_14831 EnchantUI::CUIUpgradeRandom::Slot15: byte-identical - fn_15164 CUIEquipmentPropertiesWnd::BindLine: logic confirmed by peer review - fn_15180 CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>::CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>: byte-identical (already on main) - fn_15341 CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderAdapter>::CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderAdapter>: byte-identical (already on main) - fn_15342 CUIListBoxEx<GameSettingsUI::CUIComboItem,DisplayMode>::CUIListBoxEx<GameSettingsUI::CUIComboItem,DisplayMode>: byte-identical (already on main) - fn_15343 CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderBackend>::CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderBackend>: byte-identical (already on main) - fn_15344 CUIListBoxEx<GameSettingsUI::CUIComboItem,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::CUIListBoxEx<GameSettingsUI::CUIComboItem,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >: byte-identical (already on main) - fn_15345 CUIListBoxEx<GameSettingsUI::CUIOptionItem,TALKTYPE>::CUIListBoxEx<GameSettingsUI::CUIOptionItem,TALKTYPE>: byte-identical (already on main) - fn_15402 GameSettingsUI::CUIGroupSpriteDetailLevel::Slot15: logic confirmed by peer review - fn_15886 GameSettingsUI::CUIBasicPage::CUIBasicPage: byte-identical (already on main) - fn_15889 GameSettingsUI::CUIGraphicsPage::CUIGraphicsPage: byte-identical (already on main) - fn_15902 GameSettingsUI::CUIListPage::CUIListPage: byte-identical (already on main) - fn_15976 GameSettingsUI::CUIGroupSound::Apply: logic confirmed by peer review - fn_15986 CUIGameSettingsUI::Slot16: byte-identical - fn_15987 GameSettingsUI::CUIGroupEmblem::Slot16: byte-identical - fn_15988 GameSettingsUI::CUIGroupFullscreen::Slot16: byte-identical - fn_15990 GameSettingsUI::CUIGroupGraphicsAPI::Slot16: logic confirmed by peer review - fn_15993 GameSettingsUI::CUIGroupRodexSpam::Slot16: byte-identical - fn_15994 GameSettingsUI::CUIGroupSkin::Slot16: logic confirmed by peer review - fn_15995 GameSettingsUI::CUIGroupSound::Slot16: byte-identical - fn_15996 GameSettingsUI::CUIGroupSpriteDetailLevel::Slot16: byte-identical - fn_15997 GameSettingsUI::CUIGroupTextureDetailLevel::Slot16: byte-identical - fn_15998 GameSettingsUI::CUIGroupTrilinear::Slot16: byte-identical - fn_16108 CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>: byte-identical (already on main) - fn_16217 CUIListBoxEx<OngoingQuestInfo::CUIRewardItem,OngoingQuestInfo::CRewardItemData>::CUIListBoxEx<OngoingQuestInfo::CUIRewardItem,OngoingQuestInfo::CRewardItemData>: byte-identical (already on main) - fn_16289 OngoingQuestInfo::CUIContents::CUIContents: byte-identical (already on main) - fn_16292 OngoingQuestInfo::CUIRewards::CUIRewards: byte-identical (already on main) - fn_16293 OngoingQuestInfo::CUIScrollWindow::CUIScrollWindow: byte-identical (already on main) - fn_16311 OngoingQuestInfo::CUIScrollWindow::Slot16: byte-identical - fn_16339 RecommendedQuestInfo::CUIQuestInfo::CUIQuestInfo: byte-identical (already on main) - fn_16341 RecommendedQuestInfo::CUIScrollWindow::CUIScrollWindow: byte-identical (already on main) - fn_16366 CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>::CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>: byte-identical (already on main) - fn_16367 CUIEditBoxEx::CUIEditBoxEx: byte-identical (already on main) - fn_16598 RenewQuestUI::CUIQuestList::CUIQuestList: byte-identical (already on main) - fn_16665 SelectPackageItemBox::CUITabInfo::Slot15: byte-identical - fn_16799 CUIListBoxEx<SkillDelayInfo::CUIDelayItem,SkillDelayInfo::CDelayItemData>::CUIListBoxEx<SkillDelayInfo::CUIDelayItem,SkillDelayInfo::CDelayItemData>: byte-identical (already on main) - fn_16873 SkillDelayInfo::CUITime::CUITime: byte-identical (already on main) Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
147 lines
5 KiB
C++
147 lines
5 KiB
C++
#include "UI/Lists/UIListBoxTemplate.h"
|
|
#include "UI/Text/UIStaticTextControl.h"
|
|
#include "Utility/Cipher/XorBytes.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace {
|
|
|
|
template <std::size_t Length, std::uint64_t Key>
|
|
class EncryptedName {
|
|
public:
|
|
// INLINED
|
|
template <typename Byte>
|
|
explicit EncryptedName(const Byte (&source)[Length]) : m_encrypted(true) {
|
|
for (std::uint64_t index = 0; index < Length; ++index) {
|
|
this->m_text[index] = source[index];
|
|
}
|
|
}
|
|
|
|
~EncryptedName() {
|
|
for (std::uint64_t index = 0; index < Length; ++index) {
|
|
this->m_text[index] = 0;
|
|
}
|
|
}
|
|
|
|
const char* Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, Length, Key);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
private:
|
|
/* 0000 */ std::uint8_t m_text[Length];
|
|
bool m_encrypted;
|
|
};
|
|
|
|
}
|
|
|
|
namespace AdventureGuide {
|
|
|
|
// OFFSET: 0x009D1830
|
|
// FUNCTION: fn_14008
|
|
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("");
|
|
this->unknown_00E8->SetFitText(0);
|
|
this->unknown_00E8->SetAlign(6, 6);
|
|
{
|
|
CUIStaticText* text = this->unknown_00E8;
|
|
const std::uint8_t fontSource[] = {0x16, 0x82, 0x37, 0x1E, 0xF0, 0xA1};
|
|
thread_local EncryptedName<sizeof(fontSource), 0xB127A19D775BF751ULL> fontName(fontSource);
|
|
text->SetFont(fontName.Text());
|
|
}
|
|
this->unknown_00E8->SetFontHeight(12);
|
|
this->unknown_00E8->SetBold(1);
|
|
this->unknown_00E8->SetColor(0x5F3C2C);
|
|
this->unknown_00E8->SetShadow(0, 0xFFFFFF);
|
|
this->unknown_00E8->SetOutline(0, 0xFFFFFF);
|
|
this->AddChild(this->unknown_00E8);
|
|
|
|
this->unknown_00EC = new CUIStaticImage();
|
|
this->unknown_00EC->SetSize(40, 26);
|
|
this->unknown_00EC->Move(58, 0);
|
|
{
|
|
CUIStaticImage* stamp = this->unknown_00EC;
|
|
const char stampSource[] = {'\x9D', '\x44', '\xB3', '\xB3', '\x5B', '\x87', '\xA4', '\xC2', '\x9B', '\x0F', '\xB3', '\x85', '\x26', '\xF3', '\x3D', '\x4E', '\x39', '\x9D',
|
|
'\x16', '\x27', '\xEF', '\x3C', '\x13', '\x6A', '\x1A', '\x9E', '\x1A', '\x2D', '\xFE', '\x15', '\x12', '\x7B', '\x3C', '\x86', '\x03', '\x16',
|
|
'\xF8', '\x26', '\x0C', '\x7F', '\x31', '\x8E', '\x07', '\x2C', '\xFF', '\x16', '\x12', '\x7A', '\x3F', '\xC5', '\x11', '\x24', '\xEB', '\x49'};
|
|
thread_local EncryptedName<sizeof(stampSource), 0x0F61499B4973EB5DULL> stampName(stampSource);
|
|
stamp->SetImage(stampName.Text());
|
|
}
|
|
this->AddChild(this->unknown_00EC);
|
|
}
|
|
|
|
// OFFSET: 0x009D1C80
|
|
// FUNCTION: fn_14009
|
|
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("");
|
|
this->unknown_00E8->SetFitText(0);
|
|
this->unknown_00E8->SetAlign(6, 6);
|
|
{
|
|
CUIStaticText* text = this->unknown_00E8;
|
|
const std::uint8_t fontSource[] = {0xBA, 0xC0, 0x5F, 0x86, 0x3C, 0x37};
|
|
thread_local EncryptedName<sizeof(fontSource), 0x91493751EF33B5FDULL> fontName(fontSource);
|
|
text->SetFont(fontName.Text());
|
|
}
|
|
this->unknown_00E8->SetFontHeight(12);
|
|
this->unknown_00E8->SetBold(1);
|
|
this->unknown_00E8->SetColor(0x5F3C2C);
|
|
this->unknown_00E8->SetShadow(0, 0xFFFFFF);
|
|
this->unknown_00E8->SetOutline(0, 0xFFFFFF);
|
|
this->AddChild(this->unknown_00E8);
|
|
}
|
|
|
|
// OFFSET: 0x009D1F00
|
|
// FUNCTION: fn_14010
|
|
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("");
|
|
this->unknown_00E8->SetFitText(0);
|
|
this->unknown_00E8->SetAlign(0, 6);
|
|
{
|
|
CUIStaticText* text = this->unknown_00E8;
|
|
const std::uint8_t fontSource[] = {0x28, 0x08, 0x97, 0x4A, 0x1C, 0x07};
|
|
thread_local EncryptedName<sizeof(fontSource), 0xCD8F077123FB7D6FULL> fontName(fontSource);
|
|
text->SetFont(fontName.Text());
|
|
}
|
|
this->unknown_00E8->SetFontHeight(12);
|
|
this->unknown_00E8->SetBold(1);
|
|
this->unknown_00E8->SetColor(0x815A48);
|
|
this->unknown_00E8->SetShadow(0, 0xFFFFFF);
|
|
this->unknown_00E8->SetOutline(0, 0xFFFFFF);
|
|
this->AddChild(this->unknown_00E8);
|
|
|
|
this->unknown_00EC = new CUIStaticText();
|
|
this->unknown_00EC->SetSize(442, 44);
|
|
this->unknown_00EC->Move(140, 0);
|
|
this->unknown_00EC->SetText("");
|
|
this->unknown_00EC->SetFitText(1);
|
|
this->unknown_00EC->SetAlign(0, 6);
|
|
{
|
|
CUIStaticText* text = this->unknown_00EC;
|
|
const std::uint8_t fontSource[] = {0x04, 0x5C, 0x3F, 0x4E, 0xB8, 0xBF};
|
|
thread_local EncryptedName<sizeof(fontSource), 0x9949BFD527532943ULL> fontName(fontSource);
|
|
text->SetFont(fontName.Text());
|
|
}
|
|
this->unknown_00EC->SetFontHeight(12);
|
|
this->unknown_00EC->SetBold(0);
|
|
this->unknown_00EC->SetColor(0x2A435D);
|
|
this->unknown_00EC->SetShadow(0, 0xFFFFFF);
|
|
this->unknown_00EC->SetOutline(0, 0xFFFFFF);
|
|
this->AddChild(this->unknown_00EC);
|
|
}
|
|
|
|
}
|