mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-01-09 00:12:46 +00:00
Update djui_font.c
This commit is contained in:
parent
b9a3c89abe
commit
ab2ad8c189
1 changed files with 18 additions and 9 deletions
|
|
@ -18,13 +18,13 @@ static void djui_font_normal_render_char(char* c) {
|
|||
u32 tx = index % 64;
|
||||
u32 ty = index / 64;
|
||||
extern ALIGNED8 const u8 texture_font_jp[];
|
||||
djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, 32, tx * 8, ty * 16, 8, 16, false);
|
||||
djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, 32, tx * 8, ty * 16, 8, 16, false, true);
|
||||
}
|
||||
else {
|
||||
u32 tx = index % 32;
|
||||
u32 ty = index / 32;
|
||||
extern ALIGNED8 const u8 texture_font_normal[];
|
||||
djui_gfx_render_texture_tile(texture_font_normal, 256, 128, 32, tx * 8, ty * 16, 8, 16, false);
|
||||
djui_gfx_render_texture_tile(texture_font_normal, 256, 128, 32, tx * 8, ty * 16, 8, 16, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -158,13 +158,13 @@ static void djui_font_aliased_render_char(char* c) {
|
|||
u32 tx = index % 64;
|
||||
u32 ty = index / 64;
|
||||
extern ALIGNED8 const u8 texture_font_jp_aliased[];
|
||||
djui_gfx_render_texture_tile(texture_font_jp_aliased, 1024, 2048, 32, tx * 16, ty * 32, 16, 32, false);
|
||||
djui_gfx_render_texture_tile(texture_font_jp_aliased, 1024, 2048, 32, tx * 16, ty * 32, 16, 32, false, true);
|
||||
}
|
||||
else {
|
||||
u32 tx = index % 32;
|
||||
u32 ty = index / 32;
|
||||
extern ALIGNED8 const u8 texture_font_aliased[];
|
||||
djui_gfx_render_texture_tile(texture_font_aliased, 512, 256, 32, tx * 16, ty * 32, 16, 32, false);
|
||||
djui_gfx_render_texture_tile(texture_font_aliased, 512, 256, 32, tx * 16, ty * 32, 16, 32, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,11 +251,20 @@ static void djui_font_special_render_char(char* c) {
|
|||
if (*c == ' ') { return; }
|
||||
|
||||
u32 index = djui_unicode_get_sprite_index(c);
|
||||
u32 tx = index % 32;
|
||||
u32 ty = index / 32;
|
||||
|
||||
extern ALIGNED8 const u8 texture_font_special[];
|
||||
djui_gfx_render_texture_tile(texture_font_special, 256, 128, 32, tx * 8, ty * 16, 8, 16, false, true);
|
||||
|
||||
if (index & 0x010000) {
|
||||
index &= ~0x010000;
|
||||
u32 tx = index % 64;
|
||||
u32 ty = index / 64;
|
||||
extern ALIGNED8 const u8 texture_font_jp[];
|
||||
djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, 32, tx * 8, ty * 16, 8, 16, false, true);
|
||||
}
|
||||
else {
|
||||
u32 tx = index % 32;
|
||||
u32 ty = index / 32;
|
||||
extern ALIGNED8 const u8 texture_font_special[];
|
||||
djui_gfx_render_texture_tile(texture_font_special, 256, 128, 32, tx * 8, ty * 16, 8, 16, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
static f32 djui_font_special_char_width(char* c) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue