summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder.h
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2014-09-04 19:37:49 -0700
committershuffle2 <godisgovernment@gmail.com>2014-09-04 19:37:49 -0700
commita9a62709825c7b9dac7d7cf2f1a3fb9ee6678aa5 (patch)
tree3b9e6783cc95b0f49d2956ff21c5097db0840721 /Source/Core/VideoCommon/TextureDecoder.h
parentfb3a668767b37724dede9e5f7eb60b5d0f2b6455 (diff)
parent76b4dbdf2895e36e7bc993728b01f20711d5b111 (diff)
Merge pull request #774 from magcius/texdecode-cleanup
Clean up the TextureDecoder and some related things
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder.h')
-rw-r--r--Source/Core/VideoCommon/TextureDecoder.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/TextureDecoder.h b/Source/Core/VideoCommon/TextureDecoder.h
index 45925f7aaf..be566fcf16 100644
--- a/Source/Core/VideoCommon/TextureDecoder.h
+++ b/Source/Core/VideoCommon/TextureDecoder.h
@@ -52,9 +52,12 @@ enum TextureFormat
GX_CTF_Z16L = 0xC | _GX_TF_ZTF | _GX_TF_CTF,
};
-extern const char* texfmt[];
-extern const unsigned char sfont_map[];
-extern const unsigned char sfont_raw[][9*10];
+enum TlutFormat
+{
+ GX_TL_IA8 = 0x0,
+ GX_TL_RGB565 = 0x1,
+ GX_TL_RGB5A3 = 0x2,
+};
int TexDecoder_GetTexelSizeInNibbles(int format);
int TexDecoder_GetTextureSizeInBytes(int width, int height, int format);
@@ -75,9 +78,12 @@ enum PC_TexFormat
PC_TEX_FMT_DXT1,
};
-PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt,bool rgbaOnly = false);
-PC_TexFormat GetPC_TexFormat(int texformat, int tlutfmt);
-void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, int tlutfmt);
-void TexDecoder_DecodeTexelRGBA8FromTmem(u8 *dst, const u8 *src_ar, const u8* src_gb, int s, int t, int imageWidth);
+PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, const u8* tlut, TlutFormat tlutfmt);
PC_TexFormat TexDecoder_DecodeRGBA8FromTmem(u8* dst, const u8 *src_ar, const u8 *src_gb, int width, int height);
+void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, const u8* tlut, TlutFormat tlutfmt);
+void TexDecoder_DecodeTexelRGBA8FromTmem(u8 *dst, const u8 *src_ar, const u8* src_gb, int s, int t, int imageWidth);
+
void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);
+
+/* Internal method, implemented by TextureDecoder_Generic and TextureDecoder_x64. */
+PC_TexFormat _TexDecoder_DecodeImpl(u32 * dst, const u8 * src, int width, int height, int texformat, const u8* tlut, TlutFormat tlutfmt);