rodecomp/Source/Contents/MessageTable.h
ragnarok-clanker 854a0e32fb Maintenance: Name numeric switch case labels with enum constants (identifier-only; no code change). 13,500+ case labels across 70 uni
Batch #14886 by ragnarok-clanker: no function's compiled code changes; checked with 225 compiled unit(s), including every includer of Source/Contents/Combat/CombatTypes.h, Source/Contents/Effects/EffectMessageId.h, Source/Contents/Items/InventoryType.h, Source/Contents/Items/ItemId.h, Source/Contents/Jobs/JobId.h, Source/Contents/MessageTable.h, Source/Contents/Skills/SkillId.h, Source/Contents/Skills/SkillUnitId.h, Source/Network/Packets/ModeResultEnums.h, Source/Network/Packets/NoticeEnums.h, Source/Network/Packets/PacketId.h, Source/UI/GameSettings/TalkType.h, Source/UI/Window/WindowId.h.
2026-11-07 23:58:37 +00:00

26 lines
683 B
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_MESSAGETABLE_H
#define RAGNAROK_SOURCE_CONTENTS_MESSAGETABLE_H
#include <string>
#include <string_view>
#include <unordered_map>
#include <windows.h>
struct MessageIdHash {
std::size_t operator()(int id) const {
return static_cast<std::size_t>(id);
}
};
extern std::unordered_map<int, std::string, MessageIdHash> g_messageStrings;
const char* LookupMessage(int id);
void InsertMessage(int id, const char* text);
int FindMessageId(const char* name);
char* DecodeMessageRot(char* str);
void ImportMessageTable();
bool IsObfuscatedMessage(int id);
const char* GetMessageString(int id);
bool ImportMessageCsv(std::string_view bytes);
#endif