diff options
author | Martin Kiewitz | 2015-06-12 11:59:33 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-12 11:59:33 +0200 |
commit | 6c2c0cdfefa7941b7b27d2567be7dd0d14b02dee (patch) | |
tree | 7715797d297673a6600440fe6c660220ccac9a02 /engines/sherlock/surface.cpp | |
parent | a08b0b9e59edb25eb8870582cd161640b2b2f8bc (diff) | |
download | scummvm-rg350-6c2c0cdfefa7941b7b27d2567be7dd0d14b02dee.tar.gz scummvm-rg350-6c2c0cdfefa7941b7b27d2567be7dd0d14b02dee.tar.bz2 scummvm-rg350-6c2c0cdfefa7941b7b27d2567be7dd0d14b02dee.zip |
SHERLOCK: surface setPixels get pixelformat
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r-- | engines/sherlock/surface.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp index d67e958219..8f3690b108 100644 --- a/engines/sherlock/surface.cpp +++ b/engines/sherlock/surface.cpp @@ -52,6 +52,10 @@ void Surface::create(uint16 width, uint16 height, Common::Platform platform) { _freePixels = true; } +Graphics::PixelFormat Surface::getPixelFormat() { + return _surface.format; +} + void Surface::blitFrom(const Surface &src) { blitFrom(src, Common::Point(0, 0)); } @@ -264,8 +268,8 @@ void Surface::free() { } } -void Surface::setPixels(byte *pixels, int width, int height) { - _surface.format = Graphics::PixelFormat::createFormatCLUT8(); +void Surface::setPixels(byte *pixels, int width, int height, Graphics::PixelFormat pixelFormat) { + _surface.format = pixelFormat; _surface.w = _surface.pitch = width; _surface.h = height; _surface.setPixels(pixels); |