Batch #3380 by eAthena: 0 byte-identical, 3 confirmed by peer review. - fn_16618 RenewQuestUI::CUIQuestItem::Move: logic confirmed by peer review - fn_16625 RenewQuestUI::CUIQuestItem::Slot25: logic confirmed by peer review - fn_16626 RenewQuestUI::CUIQuestItem::Slot31: logic confirmed by peer review Peer-reviewed-by: Yommy, meitogi, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
454 lines
11 KiB
C++
454 lines
11 KiB
C++
#include "UI/Quest/UIRenewQuestUI.h"
|
|
#include "Utility/Cipher/XorBytes.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
template <std::size_t Length, std::uint64_t Key>
|
|
class EncryptedName {
|
|
public:
|
|
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];
|
|
}
|
|
}
|
|
|
|
~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;
|
|
};
|
|
|
|
// OFFSET: 0x00A59FE0
|
|
// FUNCTION: fn_16371
|
|
template <>
|
|
const char* EncryptedName<6, 0xE33F2FF779878559ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 6, 0xE33F2FF779878559ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A010
|
|
// FUNCTION: fn_16372
|
|
template <>
|
|
const char* EncryptedName<6, 0xC70319B5EB61598FULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 6, 0xC70319B5EB61598FULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A040
|
|
// FUNCTION: fn_16373
|
|
template <>
|
|
const char* EncryptedName<6, 0xB7AFBD2FD9FD7501ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 6, 0xB7AFBD2FD9FD7501ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A070
|
|
// FUNCTION: fn_16374
|
|
template <>
|
|
const char* EncryptedName<6, 0x114901C7E37F6D49ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 6, 0x114901C7E37F6D49ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A0A0
|
|
// FUNCTION: fn_16375
|
|
template <>
|
|
const char* EncryptedName<6, 0x1767DDE18D779D8BULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 6, 0x1767DDE18D779D8BULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A0D0
|
|
// FUNCTION: fn_16376
|
|
template <>
|
|
const char* EncryptedName<44, 0xB3E307A5F753D5E3ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 44, 0xB3E307A5F753D5E3ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A100
|
|
// FUNCTION: fn_16377
|
|
template <>
|
|
const char* EncryptedName<44, 0xA597A7E7492B39D5ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 44, 0xA597A7E7492B39D5ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A130
|
|
// FUNCTION: fn_16378
|
|
template <>
|
|
const char* EncryptedName<45, 0xD5A78DB38D8DAFABULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0xD5A78DB38D8DAFABULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A160
|
|
// FUNCTION: fn_16379
|
|
template <>
|
|
const char* EncryptedName<45, 0xFFABE3D5D1BBEF73ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0xFFABE3D5D1BBEF73ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A190
|
|
// FUNCTION: fn_16380
|
|
template <>
|
|
const char* EncryptedName<45, 0xF15F8785CDE369BFULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0xF15F8785CDE369BFULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A1C0
|
|
// FUNCTION: fn_16381
|
|
template <>
|
|
const char* EncryptedName<45, 0x192D654D29337BE5ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0x192D654D29337BE5ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A1F0
|
|
// FUNCTION: fn_16382
|
|
template <>
|
|
const char* EncryptedName<45, 0x0399459DAF454F0FULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0x0399459DAF454F0FULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A220
|
|
// FUNCTION: fn_16383
|
|
template <>
|
|
const char* EncryptedName<45, 0x79E915E9AF6F55DDULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 45, 0x79E915E9AF6F55DDULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A250
|
|
// FUNCTION: fn_16384
|
|
template <>
|
|
const char* EncryptedName<46, 0x271B45771F83DD9FULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 46, 0x271B45771F83DD9FULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A280
|
|
// FUNCTION: fn_16385
|
|
template <>
|
|
const char* EncryptedName<46, 0x792FFD1325418FB5ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 46, 0x792FFD1325418FB5ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A2B0
|
|
// FUNCTION: fn_16386
|
|
template <>
|
|
const char* EncryptedName<47, 0xC5B1BBCD9BC9C997ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0xC5B1BBCD9BC9C997ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A2E0
|
|
// FUNCTION: fn_16387
|
|
template <>
|
|
const char* EncryptedName<47, 0xC1BB8111EDD183E1ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0xC1BB8111EDD183E1ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A310
|
|
// FUNCTION: fn_16388
|
|
template <>
|
|
const char* EncryptedName<47, 0x8783C33941E15117ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0x8783C33941E15117ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A340
|
|
// FUNCTION: fn_16389
|
|
template <>
|
|
const char* EncryptedName<47, 0x01CB4F1DF9D3F931ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0x01CB4F1DF9D3F931ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A370
|
|
// FUNCTION: fn_16390
|
|
template <>
|
|
const char* EncryptedName<47, 0x49D33529F1556333ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0x49D33529F1556333ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A3A0
|
|
// FUNCTION: fn_16391
|
|
template <>
|
|
const char* EncryptedName<47, 0x0B23D10F2F49D72BULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0x0B23D10F2F49D72BULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A3D0
|
|
// FUNCTION: fn_16392
|
|
template <>
|
|
const char* EncryptedName<47, 0x0B8745519B1F95D7ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 47, 0x0B8745519B1F95D7ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A400
|
|
// FUNCTION: fn_16393
|
|
template <>
|
|
const char* EncryptedName<48, 0x136F2F9915D1DBCFULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 48, 0x136F2F9915D1DBCFULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A430
|
|
// FUNCTION: fn_16394
|
|
template <>
|
|
const char* EncryptedName<48, 0x674D9F3975573D41ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 48, 0x674D9F3975573D41ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A460
|
|
// FUNCTION: fn_16395
|
|
template <>
|
|
const char* EncryptedName<48, 0x6BDF334F2BFDAD51ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 48, 0x6BDF334F2BFDAD51ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A490
|
|
// FUNCTION: fn_16396
|
|
template <>
|
|
const char* EncryptedName<49, 0x659975C121557D3DULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 49, 0x659975C121557D3DULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A4C0
|
|
// FUNCTION: fn_16397
|
|
template <>
|
|
const char* EncryptedName<50, 0x85E1F5A7A5755B7FULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 50, 0x85E1F5A7A5755B7FULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A4F0
|
|
// FUNCTION: fn_16398
|
|
template <>
|
|
const char* EncryptedName<51, 0xAD6153019F93A527ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 51, 0xAD6153019F93A527ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A520
|
|
// FUNCTION: fn_16399
|
|
template <>
|
|
const char* EncryptedName<52, 0xBFF5C517A1A77F59ULL>::Text() {
|
|
if (this->m_encrypted) {
|
|
utility::XorBytes(this->m_text, 52, 0xBFF5C517A1A77F59ULL);
|
|
this->m_encrypted = false;
|
|
}
|
|
|
|
return reinterpret_cast<const char*>(this->m_text);
|
|
}
|
|
|
|
// OFFSET: 0x00A5A550
|
|
|
|
// OFFSET: 0x00A5A620
|
|
|
|
// OFFSET: 0x00A5A700
|
|
|
|
// OFFSET: 0x00A5A7F0
|
|
|
|
// OFFSET: 0x00A5A8D0
|
|
|
|
// OFFSET: 0x00A5A9B0
|
|
|
|
// OFFSET: 0x00A5AA80
|
|
|
|
// OFFSET: 0x00A5AB70
|
|
|
|
// OFFSET: 0x00A5AC50
|
|
|
|
// OFFSET: 0x00A5AD40
|
|
|
|
// OFFSET: 0x00A5AE30
|
|
|
|
// OFFSET: 0x00A5AF00
|
|
|
|
// OFFSET: 0x00A5AFF0
|
|
|
|
// OFFSET: 0x00A66BE0
|
|
// FUNCTION: fn_16618
|
|
void RenewQuestUI::CUIQuestItem::Move(int x, int y) {
|
|
UIWindow::Move(x, y);
|
|
this->baseY = y;
|
|
this->baseX = x;
|
|
}
|
|
|
|
// OFFSET: 0x00A66C50
|
|
// FUNCTION: fn_16620
|
|
void RenewQuestUI::CUIQuestList::Paint() {
|
|
this->ClearSurface(0xFFFF00FF);
|
|
}
|
|
|
|
// OFFSET: 0x00A66C60
|
|
// FUNCTION: fn_16621
|
|
void CUIRenewQuestUI::Paint() {
|
|
this->ClearSurface(0xFFFF00FF);
|
|
}
|
|
|
|
// OFFSET: 0x00A66F40
|
|
// FUNCTION: fn_16625
|
|
void RenewQuestUI::CUIQuestItem::Slot25(int x, int y) {
|
|
CUIListItem::Slot25(x, y);
|
|
this->pressed = 1;
|
|
UIWindow::Move(this->baseX, this->baseY + 1);
|
|
this->Invalidate();
|
|
}
|
|
|
|
// OFFSET: 0x00A66F80
|
|
// FUNCTION: fn_16626
|
|
void RenewQuestUI::CUIQuestItem::Slot31(int x, int y) {
|
|
CUIListItem::Slot31(x, y);
|
|
this->pressed = 0;
|
|
UIWindow::Move(this->baseX, this->baseY);
|
|
this->Invalidate();
|
|
}
|
|
|
|
// OFFSET: 0x00A66FC0
|
|
// FUNCTION: fn_16627
|
|
void RenewQuestUI::CUIQuestItem::Slot48() {
|
|
this->pressed = 0;
|
|
UIWindow::Move(this->baseX, this->baseY);
|
|
this->Invalidate();
|
|
}
|