Small fix for TexDecoder_GetBlockHeightInTexels, but see no noticeable changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3961 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2009-08-11 13:58:35 +00:00
parent 379f690438
commit bcf7b2112b
1 changed files with 26 additions and 27 deletions

View File

@ -108,33 +108,31 @@ int TexDecoder_GetBlockWidthInTexels(int format)
case GX_TF_C8: return 8;
case GX_TF_C14X2: return 4;
case GX_TF_CMPR: return 8;
default: return 8;
default:
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockWidthInTexels)", format);
return 8;
}
}
// FIXME: Use reasonable values for block height
int TexDecoder_GetBlockHeightInTexels(int format)
{
/*switch (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;
}*/
// Omega: I asssume the height would be the same as the width since it says 'block'
// width values look better than 1 anyways
// TODO: Confirm this
return TexDecoder_GetBlockWidthInTexels(format);
case GX_TF_I4: return 8;
case GX_TF_I8: return 4;
case GX_TF_IA4: return 4;
case GX_TF_IA8: return 4;
case GX_TF_RGB565: return 4;
case GX_TF_RGB5A3: return 4;
case GX_TF_RGBA8: return 4;
case GX_TF_C4: return 8;
case GX_TF_C8: return 4;
case GX_TF_C14X2: return 4;
case GX_TF_CMPR: return 4;
default:
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockHeightInTexels)", format);
return 4;
}
}
//returns bytes
@ -580,6 +578,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
break;
xcnt++;
}
for (int y=0; y < 10; y++)
{
for (int x=0; x < xcnt; x++)