Match CTextParser::ParseTag, thanks Cuyler

This commit is contained in:
2025-05-13 20:57:29 -07:00
parent 03165e3e54
commit c4a0f92b44
11 changed files with 98 additions and 41 deletions

View File

@@ -6,6 +6,7 @@
#include <Kyoto/Text/CTextColor.hpp>
#include <Kyoto/TToken.hpp>
#include "Kyoto/Text/CFontImageDef.hpp"
class IObjectStore;
class CRasterFont;
@@ -14,17 +15,17 @@ class CTextExecuteBuffer;
class CTextParser {
public:
CTextParser(IObjectStore& store);
void ParseText(CTextExecuteBuffer&, const wchar_t* str, int len);
void ParseText(CTextExecuteBuffer&, const wchar_t* str, int len, rstl::vector<rstl::pair<int, int> >& vec);
uint GetAssetIdFromString(const rstl::string& str);
TToken< CRasterFont > GetFont(const wchar_t* str, int len);
uint GetImage(const wchar_t* str, int len);
CFontImageDef GetImage(const wchar_t* str, int len, rstl::vector<rstl::pair<int, int> >& vec);
uint HandleUserTag(CTextExecuteBuffer& buffer, const wchar_t* str, int len);
void ParseTag(CTextExecuteBuffer&, const wchar_t* str, int len);
void ParseTag(CTextExecuteBuffer&, const wchar_t* str, int len, rstl::vector<rstl::pair<int, int> >& vec);
static bool BeginsWith(const wchar_t* str1, int len, const wchar_t* str2);
static bool Equals(const wchar_t* str1, int len, const wchar_t* str2);
static uint ParseInt(const wchar_t* str, int len, bool);
static uint FromHex(wchar_t c);
static uint GetColorValue(const wchar_t* str);
static int ParseInt(const wchar_t* str, int len, bool);
static int FromHex(wchar_t c);
static int GetColorValue(const wchar_t* str);
CTextColor ParseColor(const wchar_t* str, int len);
private: