summaryrefslogtreecommitdiff
path: root/src/Font.c
diff options
context:
space:
mode:
authorXavi Del Campo <xavi.dcr@tutanota.com>2020-03-03 20:07:27 +0100
committerXavi Del Campo <xavi.dcr@tutanota.com>2020-03-05 18:38:04 +0100
commite32281cf6b01800f95d7640a127811c79234fe6f (patch)
treef34d870bfdfa425600aead8cbf9aadcbc71d4fbc /src/Font.c
parent792e22676786a577b2edc0ed0ed78e51c5b38245 (diff)
downloadopensend-e32281cf6b01800f95d7640a127811c79234fe6f.tar.gz
Work on SIO IRQ
Diffstat (limited to 'src/Font.c')
-rw-r--r--src/Font.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/Font.c b/src/Font.c
index d8d1e9e..d70125c 100644
--- a/src/Font.c
+++ b/src/Font.c
@@ -3,6 +3,12 @@
* *************************************/
#include "Font.h"
+#include "Gfx.h"
+#include <psxgpu.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
/* *************************************
* Defines
@@ -21,7 +27,7 @@
static char _internal_text[FONT_INTERNAL_TEXT_BUFFER_MAX_SIZE];
static unsigned char _blend_effect_lum;
-bool FontLoadImage(char *path, struct font *font)
+bool FontLoadImage(const char *const path, struct font *const font)
{
if (GfxSpriteFromFile(path, &font->spr) == false)
{
@@ -55,8 +61,6 @@ bool FontLoadImage(char *path, struct font *font)
font->init_ch = FONT_DEFAULT_INIT_CHAR;
- dprintf("Sprite CX = %d, sprite CY = %d\n",font->spr.cx, font->spr.cy);
-
return true;
}
@@ -168,14 +172,6 @@ void FontPrintText(struct font *font, short x, short y, char* str, ...)
font->spr.g = NORMAL_LUMINANCE;
font->spr.b = NORMAL_LUMINANCE;
}
- /*dprintf("char_w = %d, char_h = %d, char_per_row = %d, init_ch: %c\n",
- font->char_w,
- font->char_h,
- font->char_per_row,
- font->init_ch);
- dprintf("Char: %c, spr.u = %d, spr.v = %d\n",str[i],font->spr.u, font->spr.v);
- dprintf("Sprite CX = %d, sprite CY = %d\n",font->spr.cx, font->spr.cy);*/
- /* dprintf("Sprite rgb={%d,%d,%d}\n",font->spr.r, font->spr.g, font->spr.b); */
GfxSortSprite(&font->spr);
x += font->char_spacing;