2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:47:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -2,34 +2,30 @@
#include "CGuiTextSupport.hpp"
namespace urde
{
namespace urde {
class CTextExecuteBuffer;
class CFontImageDef;
class CTextParser
{
IObjectStore& x0_store;
class CTextParser {
IObjectStore& x0_store;
static CTextColor ParseColor(const char16_t* str, int len);
static u8 GetColorValue(const char16_t* str);
static u32 FromHex(char16_t ch);
static s32 ParseInt(const char16_t* str, int len, bool signVal);
static CAssetId GetAssetIdFromString(const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
static bool Equals(const char16_t* str, int len, const char16_t* other);
static bool BeginsWith(const char16_t* str, int len, const char16_t* other);
void ParseTag(CTextExecuteBuffer& out, const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
CFontImageDef GetImage(const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
TToken<CRasterFont> GetFont(const char16_t* str, int len);
static CTextColor ParseColor(const char16_t* str, int len);
static u8 GetColorValue(const char16_t* str);
static u32 FromHex(char16_t ch);
static s32 ParseInt(const char16_t* str, int len, bool signVal);
static CAssetId GetAssetIdFromString(const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
static bool Equals(const char16_t* str, int len, const char16_t* other);
static bool BeginsWith(const char16_t* str, int len, const char16_t* other);
void ParseTag(CTextExecuteBuffer& out, const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
CFontImageDef GetImage(const char16_t* str, int len, const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
TToken<CRasterFont> GetFont(const char16_t* str, int len);
public:
CTextParser(IObjectStore& store) : x0_store(store) {}
void ParseText(CTextExecuteBuffer& out, const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
CTextParser(IObjectStore& store) : x0_store(store) {}
void ParseText(CTextExecuteBuffer& out, const char16_t* str, int len,
const std::vector<std::pair<CAssetId, CAssetId>>* txtrMap);
};
}
} // namespace urde