aboutsummaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-11-05 00:07:55 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-11-05 00:07:55 -0600
commit451887dabd71b6b9b8cdf2587fee31ec59c3675b (patch)
tree0129a76d755c222dd62cd418f184ed1c7254aa79 /src/game.c
parentf45d32ca36a0ae85410b3eee61120fa97bf9bd25 (diff)
Started working on cool stars
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
index 7973807..764e2fa 100644
--- a/src/game.c
+++ b/src/game.c
@@ -4,6 +4,8 @@ void initGame(Game * game) {
// Window.
InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Killa Facsista");
+ SetWindowState(FLAG_WINDOW_RESIZABLE);
+
// Settings.
initSettings(&game->settings);
applySettings(&game->settings);
@@ -64,6 +66,10 @@ void closeGame(Game * game) {
CloseWindow();
}
+void gameResize(Game * game) {
+ resizeGameScreen(game, &game->gameScreen);
+}
+
void updateGame(Game * game) {
BeginDrawing();
@@ -81,5 +87,8 @@ void updateGame(Game * game) {
if (game->settings.drawFps)
DrawFPS(5, 5);
+ if (IsWindowResized())
+ gameResize(game);
+
EndDrawing();
}