now initializing, ticking and cleaning physics world from program_run
This commit is contained in:
parent
25e4fa652c
commit
c1e99e5038
|
@ -1,5 +1,6 @@
|
|||
#include "program.h"
|
||||
#include "camera.h"
|
||||
#include "physics_world.h"
|
||||
#include "sprite.h"
|
||||
#include "time.h"
|
||||
#include "assets.h"
|
||||
|
@ -53,6 +54,7 @@ int program_run(const struct ProgramSettings* settings) {
|
|||
assets_init();
|
||||
camera_init();
|
||||
input_init();
|
||||
physics_world_init();
|
||||
|
||||
LOG_INFO("settings->on_play");
|
||||
settings->on_play();
|
||||
|
@ -72,6 +74,7 @@ int program_run(const struct ProgramSettings* settings) {
|
|||
|
||||
settings->on_tick();
|
||||
settings->on_draw();
|
||||
physics_world_tick();
|
||||
}
|
||||
|
||||
LOG_ERROR("Failed to exit");
|
||||
|
@ -82,6 +85,7 @@ void program_quit() {
|
|||
assets_clean();
|
||||
render_clean();
|
||||
input_clean();
|
||||
physics_world_clean();
|
||||
SDL_DestroyWindow(g_window);
|
||||
SDL_Quit();
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in a new issue