mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(PSB): added DXT5 decoder.
This commit is contained in:
parent
11273de4f6
commit
2f2b067272
@ -693,6 +693,8 @@ namespace GameRes.Formats.Emote
|
|||||||
ReadRgba4444 (pixels, stride);
|
ReadRgba4444 (pixels, stride);
|
||||||
else if ("RL" == m_info.TexType)
|
else if ("RL" == m_info.TexType)
|
||||||
ReadRle (pixels, stride);
|
ReadRle (pixels, stride);
|
||||||
|
else if ("DXT5" == m_info.TexType)
|
||||||
|
pixels = ReadDxt5();
|
||||||
else
|
else
|
||||||
throw new NotImplementedException (string.Format ("PSB texture format '{0}' not implemented", m_info.TexType));
|
throw new NotImplementedException (string.Format ("PSB texture format '{0}' not implemented", m_info.TexType));
|
||||||
return ImageData.Create (m_info, PixelFormats.Bgra32, null, pixels, stride);
|
return ImageData.Create (m_info, PixelFormats.Bgra32, null, pixels, stride);
|
||||||
@ -799,5 +801,12 @@ namespace GameRes.Formats.Emote
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte[] ReadDxt5 ()
|
||||||
|
{
|
||||||
|
var packed = m_input.ReadBytes ((int)m_input.Length);
|
||||||
|
var dxt = new DirectDraw.DxtDecoder (packed, m_info);
|
||||||
|
return dxt.UnpackDXT5();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user