rodecomp/Source/Contents/MessageTable.h
ragnarok-clanker b15e8b4199 Confirm 3 functions in Source/Contents/MessageTable.cpp, Source/Contents/MessageTable.h
Batch #10617 by kyoshi: 0 byte-identical, 3 confirmed by peer review.

- fn_18376 LookupMessage: logic confirmed by peer review (already on main)
- fn_18374 ImportMessageTable: logic confirmed by peer review (already on main)
- fn_18377 GetMessageString: logic confirmed by peer review (already on main)

Peer-reviewed-by: Tanke, cremane, StrawberrysherbetIX
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-04 16:51:01 +00:00

30 lines
738 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>
enum MessageId : int {
MSI_FAILED_ADD_TAB = 1578
};
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