From 4e6f31d4c443ff2e69366261e4ff48776011c42a Mon Sep 17 00:00:00 2001 From: Henrique Alves Date: Mon, 22 Apr 2024 19:56:32 +0300 Subject: MVP of bug --- sources/main.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'sources/main.c') diff --git a/sources/main.c b/sources/main.c index b9f702f..d914ed2 100644 --- a/sources/main.c +++ b/sources/main.c @@ -1,17 +1,14 @@ #include "raylib.h" #include "text.h" -#include "texture.h" #include #include #include #include -#include static void* game (void* data) { - //rl_text_define_methods(); - rl_texture_define_methods(); + rl_text_define_methods(); const int screen_width = 800; const int screen_height = 600; @@ -23,27 +20,18 @@ static void* game (void* data) scm_c_primitive_load(filename); - SCM guile_update = scm_variable_ref(scm_c_lookup("update")); SCM guile_draw = scm_variable_ref(scm_c_lookup("draw")); while (!WindowShouldClose()) - { - scm_call_with_blocked_asyncs(guile_update); - //scm_call_0(guile_update); - + { BeginDrawing(); ClearBackground(RAYWHITE); - scm_call_with_blocked_asyncs(guile_draw); - //scm_call_0(guile_draw); + DrawText("a", 200, 80, 20, RED); // <- this line works + + //scm_call_0(guile_draw); // <- this will crash the game + EndDrawing(); - // This doesn't change anything - // SCM_TICK; - - // This line makes memory manageable - until it crashes again (takes more time to crash though) - // scm_run_finalizers(); - // This crashes after just a couple of frames - // scm_gc(); } CloseWindow(); -- cgit v1.2.3