NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ut_TagProcessorBase.h
1#ifndef NW4R_UT_TAG_PROCESSOR_BASE_H
2#define NW4R_UT_TAG_PROCESSOR_BASE_H
3#include <nw4r/types_nw4r.h>
4
5namespace nw4r {
6namespace ut {
7
8// Forward declarations
9struct Rect;
10template <typename T> class TextWriterBase;
11
12/******************************************************************************
13 *
14 * PrintContext
15 *
16 ******************************************************************************/
17template <typename T> struct PrintContext {
18 enum Flags {
19 FLAGS_CHARSPACE = (1 << 0),
20 };
21
22 TextWriterBase<T>* writer; // at 0x0
23 const T* str; // at 0x4
24 f32 x; // at 0x8
25 f32 y; // at 0xC
26 ulong flags; // at 0x10
27};
28
29/******************************************************************************
30 *
31 * TagProcessorBase
32 *
33 ******************************************************************************/
34template <typename T> class TagProcessorBase {
35public:
36 typedef PrintContext<T> ContextType;
37
38 enum Operation {
39 OPERATION_DEFAULT,
40 OPERATION_NO_CHAR_SPACE,
41 OPERATION_CHAR_SPACE,
42 OPERATION_NEXT_LINE,
43 OPERATION_END_DRAW
44 };
45
46public:
47 TagProcessorBase();
48 virtual ~TagProcessorBase(); // at 0x8
49
50 virtual Operation Process(u16 ch, ContextType* pCtx); // at 0xC
51 virtual Operation CalcRect(Rect* pRect, u16 ch,
52 ContextType* pCtx); // at 0x10
53
54private:
55 void ProcessTab(ContextType* pCtx);
56 void ProcessLinefeed(ContextType* pCtx);
57};
58
59} // namespace ut
60} // namespace nw4r
61
62#endif
Debugging library which includes various utilities used by the rest of nw4r.
Definition ut_list.cpp:4