summaryrefslogtreecommitdiff
path: root/src/libs/txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/txt')
-rw-r--r--src/libs/txt/txt.c8
-rw-r--r--src/libs/txt/txt.h4
2 files changed, 6 insertions, 6 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;
diff --git a/src/libs/txt/txt.h b/src/libs/txt/txt.h
index 8c68e30..a924b25 100644
--- a/src/libs/txt/txt.h
+++ b/src/libs/txt/txt.h
@@ -3,7 +3,7 @@
#include <stdint.h>
-typedef struct fb_fragment_t fb_fragment_t;
+typedef struct til_fb_fragment_t til_fb_fragment_t;
typedef struct txt_t txt_t;
typedef enum txt_halign_t {
@@ -28,6 +28,6 @@ typedef struct txt_align_t {
txt_t * txt_new(const char *str);
txt_t * txt_newf(const char *fmt, ...);
txt_t * txt_free(txt_t *txt);
-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);
#endif
© All Rights Reserved