program now integrates game world
This commit is contained in:
parent
29e7b34b3f
commit
8275732530
|
@ -1,5 +1,6 @@
|
|||
#include "program.h"
|
||||
#include "camera.h"
|
||||
#include "game_world.h"
|
||||
#include "physics_world.h"
|
||||
#include "sprite.h"
|
||||
#include "time.h"
|
||||
|
@ -58,6 +59,7 @@ int program_run(const struct ProgramSettings* settings) {
|
|||
camera_init();
|
||||
input_init();
|
||||
physics_world_init();
|
||||
game_world_init();
|
||||
|
||||
LOG_INFO("settings->on_play");
|
||||
settings->on_play();
|
||||
|
@ -74,6 +76,7 @@ int program_run(const struct ProgramSettings* settings) {
|
|||
while(_delta_time > _target_delta_time) {
|
||||
_delta_time -= _target_delta_time;
|
||||
settings->on_tick();
|
||||
game_world_update();
|
||||
physics_world_tick();
|
||||
}
|
||||
settings->on_draw();
|
||||
|
@ -89,6 +92,7 @@ void program_quit() {
|
|||
render_clean();
|
||||
input_clean();
|
||||
physics_world_clean();
|
||||
game_world_close();
|
||||
SDL_DestroyWindow(g_window);
|
||||
SDL_Quit();
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in a new issue