diff options
author | Marisa-Chan | 2014-11-12 14:36:30 +0600 |
---|---|---|
committer | Marisa-Chan | 2014-11-12 14:36:30 +0600 |
commit | 7d92b44e09809f559db96ec029a6258d23d84fd0 (patch) | |
tree | 1e7d978b0b9c57f767c04f09efe00860a8f79de3 /engines/zvision | |
parent | 6f6d5fc24eb66b893f9871e773b9bd2632ab5ca5 (diff) | |
download | scummvm-rg350-7d92b44e09809f559db96ec029a6258d23d84fd0.tar.gz scummvm-rg350-7d92b44e09809f559db96ec029a6258d23d84fd0.tar.bz2 scummvm-rg350-7d92b44e09809f559db96ec029a6258d23d84fd0.zip |
ZVISION: Nemesis and GI has difference in set_partial_screen color mask
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/graphics/render_manager.cpp | 10 | ||||
-rw-r--r-- | engines/zvision/graphics/render_manager.h | 2 | ||||
-rw-r--r-- | engines/zvision/scripting/actions.cpp | 18 |
3 files changed, 26 insertions, 4 deletions
diff --git a/engines/zvision/graphics/render_manager.cpp b/engines/zvision/graphics/render_manager.cpp index 8411f190a7..3e146939e3 100644 --- a/engines/zvision/graphics/render_manager.cpp +++ b/engines/zvision/graphics/render_manager.cpp @@ -149,6 +149,16 @@ void RenderManager::renderImageToBackground(const Common::String &fileName, int1 surface.free(); } +void RenderManager::renderImageToBackground(const Common::String &fileName, int16 destX, int16 destY, int16 keyX, int16 keyY) { + Graphics::Surface surface; + readImageToSurface(fileName, surface); + + uint16 keycolor = *(uint16 *)surface.getBasePtr(keyX, keyY); + + blitSurfaceToBkg(surface, destX, destY, keycolor); + surface.free(); +} + void RenderManager::readImageToSurface(const Common::String &fileName, Graphics::Surface &destination) { Common::File file; diff --git a/engines/zvision/graphics/render_manager.h b/engines/zvision/graphics/render_manager.h index ae24ce4f58..d34ecf8ce0 100644 --- a/engines/zvision/graphics/render_manager.h +++ b/engines/zvision/graphics/render_manager.h @@ -185,6 +185,8 @@ public: */ void renderImageToBackground(const Common::String &fileName, int16 destX, int16 destY, uint32 colorkey); + void renderImageToBackground(const Common::String &fileName, int16 destX, int16 destY, int16 keyX, int16 keyY); + /** * Sets the current background image to be used by the RenderManager and immediately * blits it to the screen. (It won't show up until the end of the frame) diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index eb6b09308b..31f68d7953 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -815,10 +815,20 @@ ActionSetPartialScreen::ActionSetPartialScreen(ZVision *engine, int32 slotkey, c bool ActionSetPartialScreen::execute() { RenderManager *renderManager = _engine->getRenderManager(); - if (_backgroundColor >= 0) - renderManager->renderImageToBackground(_fileName, _x, _y, _backgroundColor); - else - renderManager->renderImageToBackground(_fileName, _x, _y); + + if (_engine->getGameId() == GID_NEMESIS) { + if (_backgroundColor) + renderManager->renderImageToBackground(_fileName, _x, _y, 0, 0); + else + renderManager->renderImageToBackground(_fileName, _x, _y); + } else { + if (_backgroundColor >= 0) + renderManager->renderImageToBackground(_fileName, _x, _y, _backgroundColor); + else if (_backgroundColor == -2) + renderManager->renderImageToBackground(_fileName, _x, _y, 0, 0); + else + renderManager->renderImageToBackground(_fileName, _x, _y); + } return true; } |