2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 04:27:42 +00:00

CTextParser imps

This commit is contained in:
Jack Andersen
2016-03-20 14:25:53 -10:00
parent 6a2d791269
commit 89daac544f
14 changed files with 548 additions and 87 deletions

View File

@@ -1,11 +1,31 @@
#ifndef __URDE_CTEXTPARSER_HPP__
#define __URDE_CTEXTPARSER_HPP__
#include "CGuiTextSupport.hpp"
namespace urde
{
class CTextExecuteBuffer;
class CFontImageDef;
class CTextParser
{
IObjectStore& x0_store;
static CTextColor ParseColor(const wchar_t* str, int len);
static u8 GetColorValue(const wchar_t* str);
static u32 FromHex(wchar_t ch);
static s32 ParseInt(const wchar_t* str, int len, bool signVal);
static TResId GetAssetIdFromString(const wchar_t* str);
static bool Equals(const wchar_t* str, int len, const wchar_t* other);
static bool BeginsWith(const wchar_t* str, int len, const wchar_t* other);
void ParseTag(CTextExecuteBuffer& out, const wchar_t* str, int len);
CFontImageDef GetImage(const wchar_t* str, int len);
TToken<CRasterFont> GetFont(const wchar_t* str, int len);
public:
CTextParser(IObjectStore& store) : x0_store(store) {}
void ParseText(CTextExecuteBuffer& out, const wchar_t* str, int len);
};
}