diff options
author | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-07-07 00:57:19 -0600 |
---|---|---|
committer | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-07-07 00:57:19 -0600 |
commit | 028cf5d33d99274deea9567159a4eb07c13ef85c (patch) | |
tree | b2d9f0ae8fb640fdbe1a41114c7c8314f9223103 /src/game.c | |
parent | 416a5cbab21c480ae9e85b07fd9424452cbcb611 (diff) |
This fucker is flying
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -1,15 +1,44 @@ #include "game.h" void initGame(Game * game) { + // Window. InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Killa Facsista"); + + // Screen id. + game->screenId = SCREEN_GAME; + + // Camera. + initPlayerCamera(&game->playerCamera); + + // Ship test. + game->ship = createEntity(ENTITY_ANTIFA); + + SetTargetFPS(60); + //DisableCursor(); } void closeGame(Game * game) { + // Close ship test. + closeEntity(&game->ship); + CloseWindow(); } void updateGame(Game * game) { BeginDrawing(); + switch (game->screenId) { + case SCREEN_MAIN_MENU: + updateMainMenu(game); + break; + case SCREEN_GAME: + updateGameScreen(game); + break; + default: + break; + } + + DrawFPS(5, 5); + EndDrawing(); } |