fix: layering

This commit is contained in:
orangerot 2025-10-15 16:25:55 +02:00
parent 4dc761dbce
commit 17666c232a

4
game.c
View file

@ -271,6 +271,8 @@ void render(struct image canvas) {
draw(canvas, white_and_blue_dominoes[active.back.val][active.front.val], camera_x + preview[i].front.x * EYE_SIZE, camera_y + preview[i].front.y * EYE_SIZE, active.front.vertical);
}
draw_glyph(canvas, (uint32_t) 0b00011000111001100010000100011100, camera_x + goal_x * EYE_SIZE + 3, camera_y + goal_y * EYE_SIZE + 3, (struct color) {255, 255, 0, 255});
// hand
for (size_t i = 0; i < hand_count; i++) {
struct brick *b = &hand[i];
@ -279,8 +281,6 @@ void render(struct image canvas) {
draw(canvas, red_and_peach_dominoes[b->back.val][b->front.val], b->front.x, b->front.y, b->front.vertical);
}
draw_glyph(canvas, (uint32_t) 0b00011000111001100010000100011100, camera_x + goal_x * EYE_SIZE + 3, camera_y + goal_y * EYE_SIZE + 3, (struct color) {255, 255, 0, 255});
// active
if (has_active) {
draw(canvas, red_and_peach_dominoes[active.back.val][active.front.val], mouse_x + active.front.x, mouse_y + active.front.y, active.front.vertical);