diff options
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(); } |