pawengine/main.c
2025-04-07 23:24:42 +02:00

42 lines
995 B
C

#include "src/comp.h"
#include "src/paw_object.h"
#include "src/register.h"
#include "trig.c"
/* #include "src/lang/ast.h" */
/* #include "src/lang/ast_disc.h" */
/* #include "src/lang/parser.h" */
#include <stdbool.h>
int main() {
/* struct PawAST *comp_ast = ast_read("out.paw.bin"); */
/* ast_call(comp_ast, "ready"); */
/* ast_call(comp_ast, "tick"); */
/* ast_call(comp_ast, "free"); */
/* return 0; */
struct Vk *vk;
cat_Comp *state = cat_comp_init("meooow", 500, 500, &vk);
struct Register *reg = make_register();
reg_attatch_type(reg, "trig", OBJ_MAKE make_trig, OBJ_FREE free_trig,
OBJ_TICK trig_tick);
struct PawScene *scene = paw_scene_make(vk, reg);
paw_scene_queue_insert(scene, "trig", trig_make_args(scene));
while (!cat_comp_should_close(state)) {
paw_scene_tick(scene);
cat_comp_draw(state);
}
paw_scene_free(scene);
free_register(reg);
cat_comp_uninit(state);
state = NULL;
reg = NULL;
scene = NULL;
}