summaryrefslogtreecommitdiff
path: root/src/libs/txt/txt.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-10-01 16:35:08 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-10-01 16:35:08 -0700
commitb686b405c6a22b26e9b8082c92ed91513608bea3 (patch)
tree0000f671501863a8ee9b536ba869221d0f6710f9 /src/libs/txt/txt.c
parentd1da5500261e96efe0ede06fbebb32f0e191f3c1 (diff)
*: librototiller->libtil
Largely mechanical rename of librototiller -> libtil, but introducing a til_ prefix to all librototiller (now libtil) functions and types where a rototiller prefix was absent. This is just a step towards a more libized librototiller, and til is just a nicer to type/read prefix than rototiller_.
Diffstat (limited to 'src/libs/txt/txt.c')
-rw-r--r--src/libs/txt/txt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/txt/txt.c b/src/libs/txt/txt.c
index e42d8c2..02b753f 100644
--- a/src/libs/txt/txt.c
+++ b/src/libs/txt/txt.c
@@ -2,7 +2,7 @@
#include <stdarg.h>
#include <stdlib.h>
-#include "fb.h"
+#include "til_fb.h"
#include "ascii/ascii.h"
#include "txt.h"
@@ -153,19 +153,19 @@ static int overlaps(int x1, int y1, unsigned w1, unsigned h1, int x2, int y2, un
}
-static inline void draw_char(fb_fragment_t *fragment, uint32_t color, int x, int y, char c)
+static inline void draw_char(til_fb_fragment_t *fragment, uint32_t color, int x, int y, char c)
{
/* TODO: this could be optimized to skip characters with no overlap */
for (int i = 0; i < ASCII_HEIGHT; i++) {
for (int j = 0; j < ASCII_WIDTH; j++) {
if (ascii_chars[c][i * ASCII_WIDTH + j])
- fb_fragment_put_pixel_checked(fragment, x + j, y + i, color);
+ til_fb_fragment_put_pixel_checked(fragment, x + j, y + i, color);
}
}
}
-void txt_render_fragment(txt_t *txt, fb_fragment_t *fragment, uint32_t color, int x, int y, txt_align_t alignment)
+void txt_render_fragment(txt_t *txt, til_fb_fragment_t *fragment, uint32_t color, int x, int y, txt_align_t alignment)
{
int jx, jy, col, row;
char c, *str;
© All Rights Reserved