src/text.c

changeset 25
601b3f4e17a2
parent 24
7183b4ae9b20
child 26
139dac8ef9ee
--- a/src/text.c	Thu Jan 18 21:58:58 2024 +0100
+++ b/src/text.c	Sun Jan 21 13:31:51 2024 +0100
@@ -32,8 +32,8 @@
 
 #include <GL/glew.h>
 
-AscTextNode *asc_text(int x, int y, char const *text) {
-    AscTextNode *node = calloc(1, sizeof(AscTextNode));
+AscText *asc_text(int x, int y, char const *text) {
+    AscText *node = calloc(1, sizeof(AscText));
     if (node == NULL) {
         asc_error("Out of memory.");
         return NULL;
@@ -49,7 +49,7 @@
     return node;
 }
 
-void asc_text_update(AscTextNode *node) {
+void asc_text_update(AscText *node) {
     // short circuit if fully transparent or hidden, we don't need anything
     if (node->color.alpha == 0 || node->hidden) {
         return;
@@ -93,7 +93,7 @@
     SDL_FreeSurface(surface);
 }
 
-void asc_text_draw(AscTextNode *node) {
+void asc_text_draw(AscText *node) {
     if (node->color.alpha == 0 || node->hidden) {
         return;
     }
@@ -128,7 +128,7 @@
     asc_primitives_draw_plane();
 }
 
-void asc_text_free(AscTextNode *node) {
+void asc_text_free(AscText *node) {
     asc_dprintf("Release text node texture: %u", node->internal.tex_id);
     glDeleteTextures(1, &node->internal.tex_id);
     free(node->text);

mercurial