diff options
author | kitty piapiac <kcp@bsd.computer> | 2023-04-21 23:50:06 -0700 |
---|---|---|
committer | kitty piapiac <kcp@bsd.computer> | 2023-04-21 23:50:06 -0700 |
commit | 8f38659932677a2b0e00b7f4abda54ac76a8ecd9 (patch) | |
tree | 705767e858a3fe0c89b7b4bc0440012a084c6921 /scenes.c | |
parent | 599cde356b576759475d34dbfadb5548926c089d (diff) |
SRS-style rotation skeleton
Diffstat (limited to 'scenes.c')
-rw-r--r-- | scenes.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scenes.c b/scenes.c new file mode 100644 index 0000000..bb4202e --- /dev/null +++ b/scenes.c @@ -0,0 +1,25 @@ +#include<cglm/affine.h> +#include<cglm/cglm.h> +#include"mino.h" +#include"graph.h" +#include"scene.h" +#include"input.h" +#include"core.h" + +_ V game_loop(V){/*prelude*/graph_before(),graph_events();InputPoint p;InputButtons b; + /*interlude*/ + input_update(),p=input_point,b=input_buttons; + core_tick(p,b); + /*postlude*/ + graph_after();} + +_ Scene*game_run(V){core_init();WH(1,game_loop());R 0;} +Scene scene_game={"Game",game_run}; + +_ Scene*title_run(V){R&scene_game;} +Scene scene_title={"Title",title_run}; + +I main(I ac,C**av){(V)ac,(V)av; + graph_init(),atexit(graph_deinit); + scene_run(&scene_title); + R 0;} |