mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Bug fixes
This commit is contained in:
parent
939218dcf9
commit
8caeeade67
3 changed files with 10 additions and 10 deletions
|
|
@ -33,7 +33,7 @@ extraCharacters = {
|
|||
[SHIRT] = { r = 0xFF, g = 0x00, b = 0x00 },
|
||||
[GLOVES] = { r = 0xFF, g = 0xFF, b = 0xFF },
|
||||
[SHOES] = { r = 0x68, g = 0x40, b = 0x1B },
|
||||
[HAIR] = { r = 0xFF, g = 0x00, b = 0x00 },
|
||||
[HAIR] = { r = 0x73, g = 0x06, b = 0x00 },
|
||||
[SKIN] = { r = 0xFE, g = 0xD5, b = 0xA1 },
|
||||
[CAP] = { r = 0xF3, g = 0x00, b = 0x80 },
|
||||
[EMBLEM] = { r = 0xF3, g = 0x00, b = 0x80 }
|
||||
|
|
|
|||
|
|
@ -65,16 +65,16 @@ static void djui_text_translate(f32 x, f32 y) {
|
|||
}
|
||||
|
||||
static void djui_text_render_single_char(struct DjuiText* text, char* c) {
|
||||
// struct DjuiBaseRect* comp = &text->base.comp;
|
||||
struct DjuiBaseRect* comp = &text->base.comp;
|
||||
|
||||
// f32 dX = comp->x + sTextRenderX * text->fontScale;
|
||||
// f32 dY = comp->y + sTextRenderY * text->fontScale;
|
||||
// f32 dW = text->font->charWidth * text->fontScale;
|
||||
// f32 dH = text->font->charHeight * text->fontScale;
|
||||
f32 dX = comp->x + sTextRenderX * text->fontScale;
|
||||
f32 dY = comp->y + sTextRenderY * text->fontScale;
|
||||
f32 dW = text->font->charWidth * text->fontScale;
|
||||
f32 dH = text->font->charHeight * text->fontScale;
|
||||
|
||||
// if (djui_gfx_add_clipping_specific(&text->base, dX, dY, dW, dH)) {
|
||||
// return;
|
||||
// }
|
||||
if (djui_gfx_add_clipping_specific(&text->base, dX, dY, dW, dH)) {
|
||||
return;
|
||||
}
|
||||
|
||||
create_dl_translation_matrix(DJUI_MTX_NOPUSH, sTextRenderX - sTextRenderLastX, (sTextRenderY - sTextRenderLastY) * -1.0f, 0);
|
||||
text->font->render_char(c);
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ char djui_unicode_get_base_char(char* text) {
|
|||
if (!sCharMap) { return '?'; }
|
||||
u64 key = convert_unicode_char_to_u64(text);
|
||||
struct SmCodeGlyph* glyph = hmap_get(sCharMap, key);
|
||||
return (glyph != NULL || ((u8)glyph->base < (u8)'!')) ? glyph->base : '?';
|
||||
return (glyph == NULL) ? '?' : glyph->base;
|
||||
}
|
||||
|
||||
void djui_unicode_get_char(char* text, char* output) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue