summaryrefslogtreecommitdiff
path: root/src/main/game/game.c
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-22 12:34:20 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-22 12:34:20 +0200
commit0c7a2228b73f48ce58159af77fdf55cf9c682422 (patch)
tree1c3dd7b2e01768b43a3463607d1bd4bd978ba7ca /src/main/game/game.c
parent4c3cee6bf51ecba1cd03c457e3facc1947e9fedc (diff)
downloadtris-0c7a2228b73f48ce58159af77fdf55cf9c682422.tar.gz
tris-0c7a2228b73f48ce58159af77fdf55cf9c682422.zip
Add some default background
Diffstat (limited to 'src/main/game/game.c')
-rw-r--r--src/main/game/game.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/game/game.c b/src/main/game/game.c
index ee35f7d..788b5b2 100644
--- a/src/main/game/game.c
+++ b/src/main/game/game.c
@@ -73,7 +73,7 @@ check_win(TrisGame *game)
if (game->cells[i0]->sign != '\0'
&& game->cells[i0]->sign == game->cells[i1]->sign
&& game->cells[i1]->sign == game->cells[i2]->sign) {
- engine_set_rendering_background(game->engine, 0.0f, 0.5f, 0.0f, 1.0f);
+ engine_set_rendering_background_c(game->engine, game->board->wining_color);
}
}
}
@@ -136,6 +136,7 @@ game_init(int width, int height)
game->sign = SIGN_CIRCLE;
game->moves = 0;
game->engine = engine_new(width, height);
+ game->board = board_new();
ui_set_title("Tris Game");
engine_set_mouse_button_listener(game_mouse_button_pressed, game);