diff options
author | Paul Gilbert | 2016-11-26 10:53:47 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-26 15:25:20 -0500 |
commit | 63ec47e62f23e310786168cd596667015b2d2523 (patch) | |
tree | 0b5aca8f248a3d2c9e81a3411192dbd3ecc9894c /engines/titanic/support/direct_draw.cpp | |
parent | 4e06799122c0b763d2a44f0ce46d2ab186bdab5d (diff) | |
download | scummvm-rg350-63ec47e62f23e310786168cd596667015b2d2523.tar.gz scummvm-rg350-63ec47e62f23e310786168cd596667015b2d2523.tar.bz2 scummvm-rg350-63ec47e62f23e310786168cd596667015b2d2523.zip |
TITANIC: Add support for 32-bit surfaces
Some of the game videos have alpha levels, which are lost if the surfaces
are converted to 16-bit. This adds better support for creating 32-bit
video surfaces, so the information won't be lost
Diffstat (limited to 'engines/titanic/support/direct_draw.cpp')
-rw-r--r-- | engines/titanic/support/direct_draw.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp index 8e510861ae..faed140ea7 100644 --- a/engines/titanic/support/direct_draw.cpp +++ b/engines/titanic/support/direct_draw.cpp @@ -47,7 +47,7 @@ void DirectDraw::diagnostics() { DirectDrawSurface *DirectDraw::createSurfaceFromDesc(const DDSurfaceDesc &desc) { DirectDrawSurface *surface = new DirectDrawSurface(); - surface->create(desc._w, desc._h); + surface->create(desc._w, desc._h, desc._bpp); return surface; } @@ -82,15 +82,15 @@ void DirectDrawManager::initFullScreen() { _mainSurface = new DirectDrawSurface(); _mainSurface->create(g_vm->_screen); _backSurfaces[0] = new DirectDrawSurface(); - _backSurfaces[0]->create(_directDraw._width, _directDraw._height); + _backSurfaces[0]->create(_directDraw._width, _directDraw._height, 32); } -DirectDrawSurface *DirectDrawManager::createSurface(int w, int h, int surfaceNum) { +DirectDrawSurface *DirectDrawManager::createSurface(int w, int h, int bpp, int surfaceNum) { if (surfaceNum) return nullptr; assert(_mainSurface); - return _directDraw.createSurfaceFromDesc(DDSurfaceDesc(w, h)); + return _directDraw.createSurfaceFromDesc(DDSurfaceDesc(w, h, bpp)); } } // End of namespace Titanic |