mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 23:01:42 +00:00
MADE: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
This commit is contained in:
parent
7b9b568148
commit
b6fc71b0c5
@ -169,7 +169,7 @@ bool PmvPlayer::play(const char *filename) {
|
||||
|
||||
if (!_surface) {
|
||||
_surface = new Graphics::Surface();
|
||||
_surface->create(width, height, 1);
|
||||
_surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
|
||||
}
|
||||
|
||||
decompressMovieImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize);
|
||||
|
@ -95,7 +95,7 @@ void PictureResource::loadRaw(byte *source, int size) {
|
||||
}
|
||||
|
||||
_picture = new Graphics::Surface();
|
||||
_picture->create(width, height, 1);
|
||||
_picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
|
||||
|
||||
@ -171,7 +171,7 @@ void PictureResource::loadChunked(byte *source, int size) {
|
||||
}
|
||||
|
||||
_picture = new Graphics::Surface();
|
||||
_picture->create(width, height, 1);
|
||||
_picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
|
||||
|
||||
@ -227,7 +227,7 @@ void AnimationResource::load(byte *source, int size) {
|
||||
uint16 lineSize = sourceS->readUint16LE();
|
||||
|
||||
Graphics::Surface *frame = new Graphics::Surface();
|
||||
frame->create(frameWidth, frameHeight, 1);
|
||||
frame->create(frameWidth, frameHeight, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, 0, 0, 0, _flags & 1);
|
||||
|
||||
|
@ -36,10 +36,10 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
|
||||
_newPalette = new byte[768];
|
||||
|
||||
_backgroundScreen = new Graphics::Surface();
|
||||
_backgroundScreen->create(320, 200, 1);
|
||||
_backgroundScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
_workScreen = new Graphics::Surface();
|
||||
_workScreen->create(320, 200, 1);
|
||||
_workScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
_backgroundScreenDrawCtx.clipRect = Common::Rect(320, 200);
|
||||
_workScreenDrawCtx.clipRect = Common::Rect(320, 200);
|
||||
@ -51,7 +51,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
|
||||
// Screen mask is only needed in v2 games
|
||||
if (_vm->getGameID() != GID_RTZ) {
|
||||
_screenMask = new Graphics::Surface();
|
||||
_screenMask->create(320, 200, 1);
|
||||
_screenMask->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
|
||||
_maskDrawCtx.clipRect = Common::Rect(320, 200);
|
||||
_maskDrawCtx.destSurface = _screenMask;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user