Commit 092f1ebec0f04dbb32294c43bfb5ead7ce93eb4b

Thomas de Grivel 2023-12-14T05:26:11

sdl2 demo

diff --git a/libc3/window/sdl2/demo/toasters.c b/libc3/window/sdl2/demo/toasters.c
index 47fd8f2..5be170d 100644
--- a/libc3/window/sdl2/demo/toasters.c
+++ b/libc3/window/sdl2/demo/toasters.c
@@ -86,7 +86,7 @@ static void toaster_render (s_tag *toaster, s_window_sdl2 *window,
     y = &toaster->data.map.value[1].data.f64;
     *x += seq->dt * g_speed_x;
     *y += seq->dt * g_speed_y;
-    if (*x > window->w || *y < -200) {
+    if (*x > window->w || *y < -g_sprite_toaster.h) {
       tag_clean(toaster);
       toaster->type = TAG_VOID;
       return;
diff --git a/libc3/window/sdl2/demo/window_sdl2_demo.c b/libc3/window/sdl2/demo/window_sdl2_demo.c
index 051a75e..9f93613 100644
--- a/libc3/window/sdl2/demo/window_sdl2_demo.c
+++ b/libc3/window/sdl2/demo/window_sdl2_demo.c
@@ -168,7 +168,7 @@ bool window_sdl2_demo_load (s_window_sdl2 *window)
     return false;
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-  window_sdl2_sequence_init(window->sequence + 4, 60.0,
+  window_sdl2_sequence_init(window->sequence + 4, 120.0,
                             "05. Earth",
                             earth_load, earth_render);
   window_set_sequence_pos((s_window *) window, 0);