diff options
Diffstat (limited to 'src/renderer/Renderer.hpp')
| -rw-r--r-- | src/renderer/Renderer.hpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/renderer/Renderer.hpp b/src/renderer/Renderer.hpp index b825681..515e1da 100644 --- a/src/renderer/Renderer.hpp +++ b/src/renderer/Renderer.hpp @@ -22,34 +22,44 @@ enum REntityType : int32_t { REntityType_Rectangle, REntityType_AlphaBitmap, REntityType_Circle, + REntityType_Text, }; + struct REntity_AlphaBitmap { REntityType type; - V3F32 pos; AlphaBitmap& bitmap; + V3F32 pos; Color color; }; struct REntity_Rectangle { REntityType type; Rectangle rect; - float z; Color color; }; struct REntity_Circle { REntityType type; Circle circle; - float z; Color color; }; +struct REntity_Text { + REntityType type; + std::u32string& text; + Font& font; + V3F32 pos; + Color color; +}; + + union REntity { REntityType type; REntity_AlphaBitmap bitmap; REntity_Rectangle rect; REntity_Circle circle; + REntity_Text text; }; struct RSortEntry { @@ -69,9 +79,10 @@ public: void Reset(); void Clear(Color color); - void PushRectangle(Rectangle rect, float z, Color color); void PushAlphaBitmap(AlphaBitmap& bitmap, V3F32 pos, Color color); - void PushCircle(Circle circle, float z, Color color); + void PushRectangle(Rectangle rect, Color color, float z); + void PushCircle(Circle circle, Color color, float z); + void PushText(std::u32string& text, Font& font, V3F32 pos, Color color); /* helper functions */ @@ -98,6 +109,8 @@ public: public: + SDL_Window* m_window; + int32_t m_screen_w; int32_t m_screen_h; |
