From 0db78aff4a2fdaa4a5da165e77a64d2d3812a413 Mon Sep 17 00:00:00 2001 From: gamemasterplc Date: Thu, 23 Nov 2023 17:08:50 -0600 Subject: [PATCH] Improve pfDrawFonts --- configure.py | 2 ++ src/game/printfunc.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.py b/configure.py index 5a31f847..436473b1 100755 --- a/configure.py +++ b/configure.py @@ -175,6 +175,7 @@ cflags_rel = [ "-O0,s", "-enum int", "-char unsigned", + "-fp_contract off", "-sdata 0", "-sdata2 0", "-pool off", @@ -186,6 +187,7 @@ cflags_game = [ "-O0,p", "-enum int", "-char unsigned", + "-fp_contract off", ] config.linker_version = "GC/2.6" diff --git a/src/game/printfunc.c b/src/game/printfunc.c index cd8c54eb..11e95e75 100644 --- a/src/game/printfunc.c +++ b/src/game/printfunc.c @@ -222,8 +222,8 @@ void pfDrawFonts(void) case 255: c = *str++; scale = c/16.0f; - char_w = scale*8.0f*strline[i].scale; - char_h = scale*8.0f*strline[i].scale; + char_w = 8.0f*strline[i].scale*scale; + char_h = 8.0f*strline[i].scale*scale; break; case 254: @@ -232,8 +232,8 @@ void pfDrawFonts(void) case 253: shadow_color = (*str++)-1; - shadow_ofs_x = scale*1.33333333f*strline[i].scale; - shadow_ofs_y = scale*1.33333333f*strline[i].scale; + shadow_ofs_x = 1.33333333f*strline[i].scale*scale; + shadow_ofs_y = 1.33333333f*strline[i].scale*scale; break; default: @@ -254,7 +254,7 @@ void pfDrawFonts(void) GXColor1x8(color); GXTexCoord2f32(texcoord_x, texcoord_y+(1/16.0f)); } else { - GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXBegin(GX_QUADS, GX_VTXFMT0, 8); GXPosition3s16(x+shadow_ofs_x, y+shadow_ofs_y, 0); GXColor1x8(shadow_color); GXTexCoord2f32(texcoord_x, texcoord_y);