summaryrefslogtreecommitdiff
path: root/sources/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sources/main.c')
-rw-r--r--sources/main.c24
1 files changed, 6 insertions, 18 deletions
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 <libguile.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#include <pthread.h>
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();