From 0d771384da1ac4cd74bb965866063bfbe4ae35e7 Mon Sep 17 00:00:00 2001 From: Nunuhara Cabbage Date: Sat, 30 Apr 2022 06:33:20 -0700 Subject: [PATCH] Fix SengokuRanceFont.SP_SetTextMetricsClassic This function doesn't overwrite values in the text style that aren't contained in the sact_text_metrics_t object. --- src/hll/SengokuRanceFont.c | 11 ++++------- subprojects/libsys4 | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/hll/SengokuRanceFont.c b/src/hll/SengokuRanceFont.c index 4c5bc7c..6b358c7 100644 --- a/src/hll/SengokuRanceFont.c +++ b/src/hll/SengokuRanceFont.c @@ -286,17 +286,13 @@ static void SengokuRanceFont_SP_SetTextMetricsClassic(int sp_no, struct page *pa ts->color.b = page->values[2].i; ts->color.a = 255; ts->size = page->values[3].i; - //ts->weight = page->values[4].i; - //ts->face = page->values[5].i; + // XXX: weight seems to be ignored (page->values[4].i) + ts->font_type = page->values[5].i; ts->edge_width = max(page->values[6].i, max(page->values[7].i, max(page->values[8].i, page->values[9].i))); ts->edge_color.r = page->values[10].i; ts->edge_color.g = page->values[11].i; ts->edge_color.b = page->values[12].i; ts->edge_color.a = 255; - ts->bold_width = 0; // FIXME: use weight? - ts->scale_x = 1; - ts->space_scale_x = 1; - ts->font_spacing = 1; ts->font_size = NULL; } @@ -357,7 +353,8 @@ static void SengokuRanceFont_SP_TextDrawClassic(int sp_no, struct string *text) } struct sr_text_properties *p = get_sp_properties(sp_no); - int y = p->y - p->ts.size * 0.1875; + //int y = p->y - p->ts.size * 0.1875; + int y = p->y; p->x += sp_text_draw(sp, &p->ts, text, p->x, y); } diff --git a/subprojects/libsys4 b/subprojects/libsys4 index 1d25247..1763ea7 160000 --- a/subprojects/libsys4 +++ b/subprojects/libsys4 @@ -1 +1 @@ -Subproject commit 1d25247558ad7ff480344118395b5e6902f7c441 +Subproject commit 1763ea77afed7a1baa4739d6d053d9282f8b5e5b