rodecomp/Source/UI/Text/TextMarkup.h
ragnarok-clanker 3a66ea587a Maintenance: B3': the Display*TextTag wrappers, DisplayTextTag, ExpandTextEscapes and ItemLink's Number are __stdcall in the original
Batch #18201 by ragnarok-clanker: forced by an admin (9 lower score(s), 20 changed function(s)); checked with 11 compiled unit(s), including every includer of Source/UI/Text/TextMarkup.h.
2026-11-12 11:45:24 +00:00

39 lines
1.7 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_TEXT_TEXTMARKUP_H
#define RAGNAROK_SOURCE_UI_TEXT_TEXTMARKUP_H
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
struct TextLink {
/* 0000 */ std::uint32_t position;
/* 0004 */ std::byte padding_0004[8];
/* 000C */ std::string display;
/* 0024 */ std::string metadata;
};
bool HasTextLinks(const std::string& text);
std::string __stdcall ExpandTextEscapes(const std::string& text);
std::string RemoveTextColors(const char* text);
const std::string __stdcall DisplayTextTag(const std::string& source, const std::string& begin, const std::string& end);
const std::string __stdcall DisplayItemTextTag(const std::string& text);
const std::string __stdcall DisplayNavigationTextTag(const std::string& text);
const std::string __stdcall DisplayQuestTextTag(const std::string& text);
const std::string __stdcall DisplayTipBoxTextTag(const std::string& text);
const std::string __stdcall DisplayUrlTextTag(const std::string& text);
const std::string RemoveTextLinkInfo(const std::string& source);
void __stdcall ExtractTextLinks(const std::string& source, const std::string& begin, const std::string& end, std::vector<TextLink>& links);
void __stdcall ExtractNavigationTextLinks(const std::string& text, std::vector<TextLink>& links);
void ExtractTipBoxTextLinks(const std::string& text, std::vector<TextLink>& links);
void ExtractUrlTextLinks(const std::string& text, std::vector<TextLink>& links);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(TextLink) == 60);
static_assert(offsetof(TextLink, position) == 0x0);
static_assert(offsetof(TextLink, padding_0004) == 0x4);
static_assert(offsetof(TextLink, display) == 0xC);
static_assert(offsetof(TextLink, metadata) == 0x24);
#endif
#endif