mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 07:52:37 +00:00
New compact texture type for OGL/D3D: RGB565
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2225 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
57c4620902
commit
e557e090dd
5 changed files with 31 additions and 11 deletions
|
@ -436,14 +436,17 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
|
|||
}
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
case GX_TF_RGB565:
|
||||
{
|
||||
for (int y = 0; y < height; y += 4)
|
||||
for (int x = 0; x < width; x += 4)
|
||||
for (int iy = 0; iy < 4; iy++, src += 8)
|
||||
//decodebytesRGB565((u32*)dst+(y+iy)*width+x, (u16*)src, 4);
|
||||
decodebytesRGB565((u32*)dst+(y+iy)*width+x, (u16*)src);
|
||||
}
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
{
|
||||
for (int y = 0; y < height; y += 4)
|
||||
for (int x = 0; x < width; x += 4)
|
||||
for (int iy = 0; iy < 4; iy++, src += 8) {
|
||||
u16 *ptr = (u16 *)dst+(y+iy)*width+x;
|
||||
u16 *s = (u16 *)src;
|
||||
for(int j = 0; j < 4; j++)
|
||||
*ptr++ = Common::swap16(*s++);
|
||||
}
|
||||
}
|
||||
return PC_TEX_FMT_RGB565;
|
||||
case GX_TF_RGB5A3:
|
||||
{
|
||||
for (int y = 0; y < height; y += 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue