Commit ab6aa7913c2f7dc85297828773f3cd62c3f8f33f

Thomas de Grivel 2023-11-26T20:07:21

wip toasters

diff --git a/img/flaps.png b/img/flaps.png
index d6fd09b..b7b9be5 100644
Binary files a/img/flaps.png and b/img/flaps.png differ
diff --git a/img/toast.png b/img/toast.png
index 021511b..19c3c90 100644
Binary files a/img/toast.png and b/img/toast.png differ
diff --git a/libc3/window/cairo/demo/toasters.c b/libc3/window/cairo/demo/toasters.c
index ede88c7..f67b3ad 100644
--- a/libc3/window/cairo/demo/toasters.c
+++ b/libc3/window/cairo/demo/toasters.c
@@ -15,7 +15,6 @@
 #include "../cairo_sprite.h"
 #include "toasters.h"
 
-/* static const f64 g_speed_size = 0.001; */
 static const f64 g_speed_x = 40.0;
 static const f64 g_speed_y = -20.0;
 s_cairo_sprite   g_toast_sprite = {0};
@@ -59,7 +58,6 @@ static void toast_render (s_tag *toast, s_window_cairo *window,
     }
     cairo_get_matrix(cr, &matrix);
     cairo_translate(cr, *x, *y);
-    cairo_scale(cr, 0.3, 0.3);
     cairo_sprite_blit(&g_toast_sprite, 0, cr, 0, 0);
     cairo_set_matrix(cr, &matrix);
   }
@@ -68,9 +66,9 @@ static void toast_render (s_tag *toast, s_window_cairo *window,
 static s_tag * toaster_init (s_tag *toaster, f64 y)
 {
   tag_init_map(toaster, 2);
-  tag_init_sym_1(toaster->data.map.keys   + 0, "x");
+  tag_init_sym_1(toaster->data.map.keys + 0, "x");
   tag_init_f64(toaster->data.map.values + 0, -150);
-  tag_init_sym_1(toaster->data.map.keys   + 1, "y");
+  tag_init_sym_1(toaster->data.map.keys + 1, "y");
   tag_init_f64(toaster->data.map.values + 1, y);
   return toaster;
 }
@@ -93,7 +91,6 @@ static void toaster_render (s_tag *toaster, s_window_cairo *window,
     }
     cairo_get_matrix(cr, &matrix);
     cairo_translate(cr, *x, *y);
-    cairo_scale(cr, 0.1, 0.1);
     cairo_sprite_blit(&g_toaster_sprite,
                       (uw) 0 * fmod(seq->t, g_toaster_sprite.frame_count),
                       cr, 0, 0);