mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
IMAGE: Fix 16bpp MS Video1 output
This commit is contained in:
parent
c256f57da1
commit
691b11be64
@ -37,7 +37,7 @@ namespace Image {
|
|||||||
MSVideo1Decoder::MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {
|
MSVideo1Decoder::MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {
|
||||||
_surface = new Graphics::Surface();
|
_surface = new Graphics::Surface();
|
||||||
_surface->create(width, height, (bitsPerPixel == 8) ? Graphics::PixelFormat::createFormatCLUT8() :
|
_surface->create(width, height, (bitsPerPixel == 8) ? Graphics::PixelFormat::createFormatCLUT8() :
|
||||||
Graphics::PixelFormat(2, 5, 5, 5, 0, 0, 5, 10, 0));
|
Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0));
|
||||||
|
|
||||||
_bitsPerPixel = bitsPerPixel;
|
_bitsPerPixel = bitsPerPixel;
|
||||||
}
|
}
|
||||||
@ -216,9 +216,8 @@ void MSVideo1Decoder::decode16(Common::SeekableReadStream &stream) {
|
|||||||
const Graphics::Surface *MSVideo1Decoder::decodeFrame(Common::SeekableReadStream &stream) {
|
const Graphics::Surface *MSVideo1Decoder::decodeFrame(Common::SeekableReadStream &stream) {
|
||||||
if (_bitsPerPixel == 8)
|
if (_bitsPerPixel == 8)
|
||||||
decode8(stream);
|
decode8(stream);
|
||||||
else {
|
else
|
||||||
decode16(stream);
|
decode16(stream);
|
||||||
}
|
|
||||||
|
|
||||||
return _surface;
|
return _surface;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
~MSVideo1Decoder();
|
~MSVideo1Decoder();
|
||||||
|
|
||||||
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
|
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
|
||||||
Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
|
Graphics::PixelFormat getPixelFormat() const { return _surface->format; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
byte _bitsPerPixel;
|
byte _bitsPerPixel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user