summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureDecoder.cpp
diff options
context:
space:
mode:
authorNolan Check <Nolan.Check@gmail.com>2009-05-08 23:33:23 +0000
committerNolan Check <Nolan.Check@gmail.com>2009-05-08 23:33:23 +0000
commitb277102796063ce9b2c3819a199e41fa66bab0d4 (patch)
treed36b1b444e058aa62a0f3e9a7105ec9916d67c13 /Source/Core/VideoCommon/Src/TextureDecoder.cpp
parentb7ba3577be57340770c10737c195473a18ec382d (diff)
Use correct width and height for compressed textures
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3187 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.cpp19
1 files changed, 19 insertions, 0 deletions
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)
{