diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-08-10 15:04:29 -0400 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-09-04 18:36:56 -0700 |
| commit | fcd4ecc94265cc95bf939e517f378447c47df703 (patch) | |
| tree | 58453af5f57e78d37d8a792a1fa1c3155524667d /Source/Core/VideoCommon/TextureDecoder_Common.cpp | |
| parent | 32da01edec04f2fdedb8270cf260d0ae61dac4d7 (diff) | |
TextureDecoder: Add an enum for the TLUT formats
Quick code cleanup. The enum names and values come from libogc.
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_Common.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp index 63e6dc672e..4cb8167104 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp @@ -242,7 +242,7 @@ static void TexDecoder_DrawOverlay(u8 *dst, int width, int height, int texformat } } -PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt) +PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, TlutFormat tlutfmt) { PC_TexFormat pc_texformat = _TexDecoder_DecodeImpl((u32*)dst, src, width, height, texformat, tlutaddr, tlutfmt); @@ -301,7 +301,7 @@ struct DXTBlock u8 lines[4]; }; -void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, int tlutfmt) +void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, TlutFormat tlutfmt) { /* General formula for computing texture offset // @@ -334,13 +334,13 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth switch (tlutfmt) { - case 0: + case GX_TL_IA8: *((u32*)dst) = decodeIA8Swapped(tlut[val]); break; - case 1: + case GX_TL_RGB565: *((u32*)dst) = decode565RGBA(Common::swap16(tlut[val])); break; - case 2: + case GX_TL_RGB5A3: *((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val])); break; } @@ -399,13 +399,13 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth switch (tlutfmt) { - case 0: + case GX_TL_IA8: *((u32*)dst) = decodeIA8Swapped(tlut[val]); break; - case 1: + case GX_TL_RGB565: *((u32*)dst) = decode565RGBA(Common::swap16(tlut[val])); break; - case 2: + case GX_TL_RGB5A3: *((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val])); break; } @@ -464,13 +464,13 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth switch (tlutfmt) { - case 0: + case GX_TL_IA8: *((u32*)dst) = decodeIA8Swapped(tlut[val]); break; - case 1: + case GX_TL_RGB565: *((u32*)dst) = decode565RGBA(Common::swap16(tlut[val])); break; - case 2: + case GX_TL_RGB5A3: *((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val])); break; } |
