From e4584401ad865afb5a0fec8b7cab67794490a10d Mon Sep 17 00:00:00 2001 From: fschildt Date: Mon, 24 Nov 2025 19:55:42 +0100 Subject: rendering: refactor z-based sorting/drawing --- src/games/tetris/Tetromino.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/games/tetris/Tetromino.cpp') diff --git a/src/games/tetris/Tetromino.cpp b/src/games/tetris/Tetromino.cpp index 416a8df..a3ec9dd 100644 --- a/src/games/tetris/Tetromino.cpp +++ b/src/games/tetris/Tetromino.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -218,10 +219,9 @@ Tetromino::Draw(Id id, int32_t ori, V2F32 pos, float scale) V2F32 local_dim = {tetromino_size, tetromino_size}; - V3F32 world_pos = { + V2F32 world_pos = { pos.x + local_pos.x, pos.y + local_pos.y, - 1.0f }; V2F32 world_dim = local_dim; Rectangle world_rect = { @@ -233,7 +233,7 @@ Tetromino::Draw(Id id, int32_t ori, V2F32 pos, float scale) Color color = GetColor(id); - g_renderer.PushRectangle(world_rect, color, world_pos.z); + g_renderer.PushRectangle(world_rect, color, Game::z_layer1); } } } -- cgit v1.2.3