summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder_Common.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-02-22 18:01:39 -0800
committerPokechu22 <Pokechu022@gmail.com>2022-07-15 12:29:40 -0700
commit290e62f179a86328f90aaac3c87d4d640637dec6 (patch)
treec3e21306948d20bb44693e120e7f1f12e82f48f6 /Source/Core/VideoCommon/TextureDecoder_Common.cpp
parent1da24f66feab4d78a21ef795c7bd24b6d76cff8d (diff)
Remove casts to integers for texture and EFB formats
The only remaining casts for these types that I know of are in TextureInfo (where format_name is set to the int version of the format, and since that affects filenames and probably would break resource packs, I'm not changing it) and in TextureDecoder_Common's TexDecoder_DrawOverlay, which will be handled separately.
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_Common.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
index 798496ac6d..bc2de947ea 100644
--- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp
+++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
@@ -50,8 +50,7 @@ int TexDecoder_GetTexelSizeInNibbles(TextureFormat format)
case TextureFormat::XFB:
return 4;
default:
- PanicAlertFmt("Invalid Texture Format ({:#X})! (GetTexelSizeInNibbles)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid Texture Format {}! (GetTexelSizeInNibbles)", format);
return 1;
}
}
@@ -90,8 +89,7 @@ int TexDecoder_GetBlockWidthInTexels(TextureFormat format)
case TextureFormat::XFB:
return 16;
default:
- PanicAlertFmt("Invalid Texture Format ({:#X})! (GetBlockWidthInTexels)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid Texture Format {}! (GetBlockWidthInTexels)", format);
return 8;
}
}
@@ -125,8 +123,7 @@ int TexDecoder_GetBlockHeightInTexels(TextureFormat format)
case TextureFormat::XFB:
return 1;
default:
- PanicAlertFmt("Invalid Texture Format ({:#X})! (GetBlockHeightInTexels)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid Texture Format {}! (GetBlockHeightInTexels)", format);
return 4;
}
}
@@ -160,8 +157,7 @@ int TexDecoder_GetEFBCopyBlockWidthInTexels(EFBCopyFormat format)
case EFBCopyFormat::XFB:
return 16;
default:
- PanicAlertFmt("Invalid EFB Copy Format ({:#X})! (GetEFBCopyBlockWidthInTexels)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid EFB Copy Format {}! (GetEFBCopyBlockWidthInTexels)", format);
return 8;
}
}
@@ -195,8 +191,7 @@ int TexDecoder_GetEFBCopyBlockHeightInTexels(EFBCopyFormat format)
case EFBCopyFormat::XFB:
return 1;
default:
- PanicAlertFmt("Invalid EFB Copy Format ({:#X})! (GetEFBCopyBlockHeightInTexels)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid EFB Copy Format {}! (GetEFBCopyBlockHeightInTexels)", format);
return 4;
}
}
@@ -247,8 +242,7 @@ TextureFormat TexDecoder_GetEFBCopyBaseFormat(EFBCopyFormat format)
case EFBCopyFormat::XFB:
return TextureFormat::XFB;
default:
- PanicAlertFmt("Invalid EFB Copy Format ({:#X})! (GetEFBCopyBaseFormat)",
- static_cast<int>(format));
+ PanicAlertFmt("Invalid EFB Copy Format ()! (GetEFBCopyBaseFormat)", format);
return static_cast<TextureFormat>(format);
}
}