aboutsummaryrefslogtreecommitdiff
path: root/src/renderer/Renderer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/Renderer.hpp')
-rw-r--r--src/renderer/Renderer.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/renderer/Renderer.hpp b/src/renderer/Renderer.hpp
index da57e29..8981826 100644
--- a/src/renderer/Renderer.hpp
+++ b/src/renderer/Renderer.hpp
@@ -1,8 +1,10 @@
#pragma once
+#include <games/Game.hpp>
#include <common/math.hpp>
#include <common/Font.hpp>
#include <common/shapes.hpp>
+#include <common/MemoryManager.hpp>
#include <SDL3/SDL.h>
#include <SDL3/SDL_video.h>
@@ -45,9 +47,9 @@ struct REntity_Circle {
Color color;
};
-struct REntity_Text {
+struct REntity_String32 {
REntityType type;
- std::u32string& text;
+ String32Id id;
Font& font;
V2F32 pos;
Color color;
@@ -59,10 +61,10 @@ union REntity {
REntity_AlphaBitmap bitmap;
REntity_Rectangle rect;
REntity_Circle circle;
- REntity_Text text;
+ REntity_String32 string32;
};
-struct RZBuffEntry {
+struct RSortEntry {
uint32_t z;
uint32_t entity_index;
};
@@ -85,7 +87,7 @@ public:
void PushAlphaBitmap(AlphaBitmap& bitmap, V2F32 pos, Color color, uint32_t z);
void PushRectangle(Rectangle rect, Color color, uint32_t z);
void PushCircle(Circle circle, Color color, uint32_t z);
- void PushText(std::u32string& text, Font& font, V2F32 pos, Color color, uint32_t z);
+ void PushString32(String32Id id, Font& font, V2F32 pos, Color color, uint32_t z);
/* helper functions */
@@ -108,7 +110,7 @@ public:
Color m_clear_color {};
std::vector<REntity> m_render_entities;
- std::vector<RZBuffEntry> m_z_buff;
+ std::vector<RSortEntry> m_sort_entries;
std::unique_ptr<RSoftwareBackend> m_backend;
friend class RSoftwareBackend;