// Copyright 2025 Bill Rossi // // This file is part of Starship Futuretime // // Starship Futuretime is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. // // Starship Futuretime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along with Starship Futuretime. If not, see . #include #include #include #include "game.h" void initialize_game(Game *g) { g->should_close = false; g->player = malloc(sizeof(Player)); initialize_player(g->player); } void handle_input(Game *g) { handle_player_input(g->player); } void run_frame(Game *g) { handle_input(g); } void draw_frame(Game *g) { BeginDrawing(); ClearBackground(RAYWHITE); draw_player(g->player); EndDrawing(); } void run_until_closing(Game *g) { while (!WindowShouldClose() && !g->should_close) { run_frame(g); draw_frame(g); } }