rodecomp/Source/Client/Input/InputCharset.h
ragnarok-clanker af33e341bd Decompile fn_17811 (InitializeLanguage)
Batch #9151 by KWDev: 0 byte-identical, 1 confirmed by peer review.

- fn_17811 InitializeLanguage: logic confirmed by peer review

Peer-reviewed-by: youko, superintelligence
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 03:05:46 +00:00

58 lines
1.4 KiB
C++

#ifndef RAGNAROK_SOURCE_CLIENT_INPUT_INPUTCHARSET_H
#define RAGNAROK_SOURCE_CLIENT_INPUT_INPUTCHARSET_H
#include <cstddef>
#include <cstdint>
#include <string>
struct InputCharset {
/* 0000 */ unsigned char unknown_0000[0x8E];
/* 008E */ std::uint16_t language;
/* 0090 */ unsigned char unknown_0090[0xC];
/* 009C */ std::string servicePrefix;
/* 00B4 */ std::uint16_t alternateLanguage;
const char* Prefix(bool alternate) const;
const char* ServiceName(const char* name);
unsigned CodePage(unsigned fallback) const;
void SetServicePrefix(std::string prefix);
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(InputCharset, language) == 0x8E);
static_assert(offsetof(InputCharset, servicePrefix) == 0x9C);
static_assert(offsetof(InputCharset, alternateLanguage) == 0xB4);
#endif
struct DefaultInputCharset : InputCharset {
DefaultInputCharset();
~DefaultInputCharset();
};
struct TraditionalChineseInputCharset : InputCharset {
/* 00B8 */ unsigned char unknown_00B8[0x40C];
TraditionalChineseInputCharset();
~TraditionalChineseInputCharset();
};
struct ThaiInputCharset : InputCharset {
/* 00B8 */ bool unknown_00B8;
ThaiInputCharset();
~ThaiInputCharset();
};
struct ArabicInputCharset : InputCharset {
/* 00B8 */ bool unknown_00B8;
ArabicInputCharset();
~ArabicInputCharset();
};
extern InputCharset* g_serverLanguage;
#endif