From b277102796063ce9b2c3819a199e41fa66bab0d4 Mon Sep 17 00:00:00 2001 From: Nolan Check Date: Fri, 8 May 2009 23:33:23 +0000 Subject: Use correct width and height for compressed textures git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3187 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/TextureDecoder.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index e934997dd7..79f1527f42 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -109,6 +109,25 @@ int TexDecoder_GetBlockWidthInTexels(int format) } } +// FIXME: Use reasonable values for block height +int TexDecoder_GetBlockHeightInTexels(int format) +{ + switch (format) { + case GX_TF_I4: return 1; + case GX_TF_I8: return 1; + case GX_TF_IA4: return 1; + case GX_TF_IA8: return 1; + case GX_TF_RGB565: return 1; + case GX_TF_RGB5A3: return 1; + case GX_TF_RGBA8: return 1; + case GX_TF_C4: return 1; + case GX_TF_C8: return 1; + case GX_TF_C14X2: return 1; + case GX_TF_CMPR: return 8; + default: return 1; + } +} + //returns bytes int TexDecoder_GetPaletteSize(int format) { -- cgit v1.2.3