src/text.c

changeset 175
e5544920377e
parent 162
d3598c834f9b
--- a/src/text.c	Wed Jul 02 23:21:17 2025 +0200
+++ b/src/text.c	Wed Jul 02 23:55:50 2025 +0200
@@ -68,9 +68,9 @@
     if (text->dimension.x != (unsigned)surface->w || text->dimension.y != (unsigned)surface->h) {
         text->dimension.x = surface->w;
         text->dimension.y = surface->h;
-        const asc_vec2f uv_scale = asc_texture_calculate_uv_scale(sprite->texture, text->dimension, asc_vec2f_one);
+        const asc_vec2f uv_scale = asc_texture_calculate_uv_scale(sprite->texture, text->dimension, ASC_VEC2F_1);
         asc_mesh_plane_2d(&text->base.mesh,
-            .size = asc_vec2f_new(surface->w, surface->h),
+            .size = ASC_VEC2F(surface->w, surface->h),
             .uv_scale = uv_scale
         );
     }
@@ -102,8 +102,8 @@
     node->destroy_func = asc_text_destroy;
     node->update_func = asc_text_update;
     node->draw_func = asc_sprite_draw;
-    node->position = asc_vec3f_new(args.x, args.y, ASC_SCENE_2D_DEPTH_OFFSET);
-    node->scale = asc_vec3f_one;
+    node->position = ASC_VEC3F(args.x, args.y, ASC_SCENE_2D_DEPTH_OFFSET);
+    node->scale = ASC_VEC3F_1;
 
     // text properties
     node->flags = args.alignment; // use flags variable to save some space

mercurial