Decompile fn_16665 (SelectPackageItemBox::CUITabInfo::Slot15)
Batch #7313 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_16665 SelectPackageItemBox::CUITabInfo::Slot15: logic confirmed by peer review Peer-reviewed-by: meitogi, Lumen, aDw Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
0e6533da04
commit
004083a8cf
6 changed files with 99 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "UI/Text/UIStaticTextControl.h"
|
||||
#include "UI/Text/UITextViewerControl.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
|
||||
#include <cstring>
|
||||
|
|
@ -538,8 +539,43 @@ void CUIAdventureGuide::OnSelectTab(AdventureGuide::CUITab* tab) {
|
|||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
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:
|
||||
std::uint8_t m_text[Length];
|
||||
bool m_encrypted;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace AdventureGuide {
|
||||
|
||||
// OFFSET: 0x009C5400
|
||||
|
||||
// OFFSET: 0x009DCE10
|
||||
// FUNCTION: fn_14330
|
||||
void CUICharacterInfo::Slot16() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue