42 lines
1,009 B
C
42 lines
1,009 B
C
#include "src/comp.h"
|
|
#include "src/paw_reg.h"
|
|
#include "src/paw_scene.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 PawReg *reg = paw_reg_make();
|
|
paw_reg_attatch_type(reg, "trig", PAW_OBJ_MAKE make_trig,
|
|
PAW_OBJ_FREE free_trig, PAW_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);
|
|
paw_reg_free(reg);
|
|
|
|
cat_comp_uninit(state);
|
|
|
|
state = NULL;
|
|
reg = NULL;
|
|
scene = NULL;
|
|
}
|