Match pfDrawFonts

This commit is contained in:
gamemasterplc 2023-11-23 18:02:11 -06:00
parent 884ee1a8c5
commit 951c59bacc

View file

@ -144,7 +144,7 @@ void pfDrawFonts(void)
GXSetProjection(proj, GX_ORTHOGRAPHIC); GXSetProjection(proj, GX_ORTHOGRAPHIC);
MTXIdentity(modelview); MTXIdentity(modelview);
GXLoadPosMtxImm(modelview, GX_PNMTX0); GXLoadPosMtxImm(modelview, GX_PNMTX0);
GXSetCurrentMatrix(GX_PNMTX0); GXSetCurrentMtx(GX_PNMTX0);
GXSetViewport(0, 0, RenderMode->fbWidth, RenderMode->efbHeight, 0, 1); GXSetViewport(0, 0, RenderMode->fbWidth, RenderMode->efbHeight, 0, 1);
GXSetScissor(0, 0, RenderMode->fbWidth, RenderMode->efbHeight); GXSetScissor(0, 0, RenderMode->fbWidth, RenderMode->efbHeight);
GXClearVtxDesc(); GXClearVtxDesc();
@ -170,9 +170,8 @@ void pfDrawFonts(void)
GXSetZCompLoc(GX_FALSE); GXSetZCompLoc(GX_FALSE);
GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1); GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1);
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP);
GXSetColorUpdate(GX_TRUE); GXSetAlphaUpdate(GX_TRUE);
for(i=0; i<256; i++) { for(i=0; i<256; i++) {
x = strline[i].x; x = strline[i].x;
y = strline[i].y; y = strline[i].y;
if(strline[i].type == 1) { if(strline[i].type == 1) {
@ -211,13 +210,18 @@ void pfDrawFonts(void)
} else { } else {
if(strline[i].str[0] != '\0') { if(strline[i].str[0] != '\0') {
float shadow_ofs_x, shadow_ofs_y; float shadow_ofs_x, shadow_ofs_y;
float char_w = 8.0f*strline[i].scale; float char_w;
float char_h = char_w; float char_h;
float texcoord_x, texcoord_y; float texcoord_x, texcoord_y;
char *str = strline[i].str; char *str;
u16 color = strline[i].color; u16 color;
s16 shadow_color = -1; s16 shadow_color;
float scale = 1.0f; float scale;
char_w = char_h = 8.0f*strline[i].scale;
str = strline[i].str;
color = strline[i].color;
shadow_color = -1;
scale = 1.0f;
while(*str) { while(*str) {
char c = *str++; char c = *str++;
switch(c) { switch(c) {