diff options
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_Common.cpp | 80 |
1 files changed, 4 insertions, 76 deletions
diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp index bc2de947ea..51ea0572f2 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp @@ -242,7 +242,7 @@ TextureFormat TexDecoder_GetEFBCopyBaseFormat(EFBCopyFormat format) case EFBCopyFormat::XFB: return TextureFormat::XFB; default: - PanicAlertFmt("Invalid EFB Copy Format ()! (GetEFBCopyBaseFormat)", format); + PanicAlertFmt("Invalid EFB Copy Format {}! (GetEFBCopyBaseFormat)", format); return static_cast<TextureFormat>(format); } } @@ -253,77 +253,6 @@ void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center) TexFmt_Overlay_Center = center; } -static const char* texfmt[] = { - // pixel - "I4", - "I8", - "IA4", - "IA8", - "RGB565", - "RGB5A3", - "RGBA8", - "0x07", - "C4", - "C8", - "C14X2", - "0x0B", - "0x0C", - "0x0D", - "CMPR", - "0x0F", - // Z-buffer - "0x10", - "Z8", - "0x12", - "Z16", - "0x14", - "0x15", - "Z24X8", - "0x17", - "0x18", - "0x19", - "0x1A", - "0x1B", - "0x1C", - "0x1D", - "0x1E", - "0x1F", - // pixel + copy - "CR4", - "0x21", - "CRA4", - "CRA8", - "0x24", - "0x25", - "CYUVA8", - "CA8", - "CR8", - "CG8", - "CB8", - "CRG8", - "CGB8", - "0x2D", - "0x2E", - "XFB", - // Z + copy - "CZ4", - "0x31", - "0x32", - "0x33", - "0x34", - "0x35", - "0x36", - "0x37", - "0x38", - "CZ8M", - "CZ8L", - "0x3B", - "CZ16L", - "0x3D", - "0x3E", - "0x3F", -}; - static void TexDecoder_DrawOverlay(u8* dst, int width, int height, TextureFormat texformat) { int w = std::min(width, 40); @@ -338,11 +267,11 @@ static void TexDecoder_DrawOverlay(u8* dst, int width, int height, TextureFormat yoff = 0; } - const char* fmt = texfmt[static_cast<int>(texformat) & 15]; - while (*fmt) + const auto fmt_str = fmt::to_string(texformat); + for (char ch : fmt_str) { int xcnt = 0; - int nchar = sfont_map[(int)*fmt]; + int nchar = sfont_map[ch]; const unsigned char* ptr = sfont_raw[nchar]; // each char is up to 9x10 @@ -363,7 +292,6 @@ static void TexDecoder_DrawOverlay(u8* dst, int width, int height, TextureFormat ptr += 9; } xoff += xcnt; - fmt++; } } |
