diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index 8d03fea049..f693ccbfcb 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -460,13 +460,13 @@ void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center) #ifdef OVERLAY_TEXFMT extern const char* texfmt[]; extern const unsigned char sfont_map[]; -extern const unsigned char sfont_raw[]; +extern const unsigned char sfont_raw[][9*10]; PC_TexFormat TexDecoder_Decode(u8 *dst, u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt) { PC_TexFormat retval = TexDecoder_Decode_real(dst,src,width,height,texformat,tlutaddr,tlutfmt); - if((!TexFmt_Overlay_Enable)/*||(retval==PC_TEX_FMT_NONE)*/) + if((!TexFmt_Overlay_Enable)||(retval==PC_TEX_FMT_NONE)) return retval; // assume ABGR/ARGB (32bit) @@ -490,21 +490,21 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, u8 *src, int width, int height, int texf int xcnt = 0; int nchar = sfont_map[*fmt]; - const unsigned char *ptr = sfont_raw + (nchar * 10 * 9); // each char is up to 9x10 + const unsigned char *ptr = sfont_raw[nchar]; // each char is up to 9x10 + for(int x=0;x<9;x++) + { + if(ptr[x]==0x78) + break; + xcnt++; + } for(int y=0;y<10;y++) { - for(int x=0;x<9;x++) + for(int x=0;x