Use correct width and height for compressed textures

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3187 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2009-05-08 23:33:23 +00:00
parent b7ba3577be
commit b277102796
3 changed files with 33 additions and 19 deletions

View File

@ -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)
{