test/snake/snake.c

changeset 186
e9bb4d4f88a8
parent 183
48fbd9e497f2
--- a/test/snake/snake.c	Sun Jul 06 18:49:08 2025 +0200
+++ b/test/snake/snake.c	Sun Jul 06 18:49:44 2025 +0200
@@ -130,7 +130,7 @@
     // TODO: return something
 }
 
-static asc_recti update_viewport_for_window_resize(asc_vec2u window_size) {
+static asc_rect update_viewport_for_window_resize(asc_vec2u window_size) {
     // Compute scaling and offsets
     unsigned viewport_size, offset_x = 0, offset_y = 0;
     if (window_size.width > window_size.height) {
@@ -144,7 +144,7 @@
     }
 
     // Set the viewport to the scaled and centered region
-    return ASC_RECTI(offset_x, offset_y, viewport_size, viewport_size);
+    return ASC_RECT(offset_x, offset_y, viewport_size, viewport_size);
 }
 
 int main(void) {
@@ -179,7 +179,7 @@
     asc_ink_rgb(0, 128, 90);
     asc_scene_init(MAIN_SCENE,
         .type = ASC_CAMERA_ORTHO,
-        .ortho.rect = ASC_RECTI(0, 0, game_field_size, game_field_size),
+        .ortho.rect = ASC_RECT(0, 0, game_field_size, game_field_size),
         .viewport_clear = true,
         .viewport_update_func = update_viewport_for_window_resize
     );

mercurial