2025-02-25 18:07:03 +01:00
|
|
|
#include "src/comp.h"
|
|
|
|
#include "src/object.h"
|
|
|
|
#include "src/register.h"
|
2025-02-09 18:48:25 +01:00
|
|
|
#include "trig.c"
|
|
|
|
|
2025-03-01 20:47:43 +01:00
|
|
|
#include "src/lang/ast.h"
|
2025-03-23 20:12:34 +01:00
|
|
|
#include "src/lang/ast_disc.h"
|
|
|
|
#include "src/lang/parser.h"
|
2025-03-01 20:47:43 +01:00
|
|
|
|
2025-02-09 18:48:25 +01:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
int main() {
|
2025-04-04 18:52:45 +02:00
|
|
|
/* 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; */
|
2025-03-01 20:47:43 +01:00
|
|
|
|
2025-02-09 18:48:25 +01:00
|
|
|
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 Scene *scene = make_scene(vk, reg);
|
|
|
|
|
|
|
|
scene_queue_insert(scene, "trig", trig_make_args(scene));
|
|
|
|
|
|
|
|
while (!cat_comp_should_close(state)) {
|
|
|
|
scene_tick(scene);
|
|
|
|
cat_comp_draw(state);
|
|
|
|
}
|
|
|
|
|
|
|
|
free_scene(scene);
|
|
|
|
free_register(reg);
|
|
|
|
|
|
|
|
cat_comp_uninit(state);
|
|
|
|
|
|
|
|
state = NULL;
|
|
|
|
reg = NULL;
|
|
|
|
scene = NULL;
|
|
|
|
}
|