diff options
author | Kari Salminen | 2008-08-14 22:01:56 +0000 |
---|---|---|
committer | Kari Salminen | 2008-08-14 22:01:56 +0000 |
commit | e56359eac0d994c18e79a8a3a19acfcbedc0e0fb (patch) | |
tree | c25e3769b06dc10ba6a51589451061228a2ef864 /engines/cine/gfx.cpp | |
parent | 3f316681a00108d668867261a93e9ae789aa058f (diff) | |
download | scummvm-rg350-e56359eac0d994c18e79a8a3a19acfcbedc0e0fb.tar.gz scummvm-rg350-e56359eac0d994c18e79a8a3a19acfcbedc0e0fb.tar.bz2 scummvm-rg350-e56359eac0d994c18e79a8a3a19acfcbedc0e0fb.zip |
Moved showing of the collision page from Alt-key to F11-key because Alt conflicted with taking screenshots using Alt-s. Great. Hopefully F11 doesn't conflict with anything useful.
svn-id: r33877
Diffstat (limited to 'engines/cine/gfx.cpp')
-rw-r--r-- | engines/cine/gfx.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index b8b3bf38dd..cb900e8850 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -92,7 +92,7 @@ static const byte cursorPalette[] = { */ FWRenderer::FWRenderer() : _background(NULL), _palette(NULL), _cmd(""), _cmdY(0), _messageBg(0), _backBuffer(new byte[_screenSize]), - _activeLowPal(NULL), _changePal(0) { + _activeLowPal(NULL), _changePal(0), _showCollisionPage(false) { assert(_backBuffer); @@ -126,6 +126,7 @@ void FWRenderer::clear() { _cmdY = 0; _messageBg = 0; _changePal = 0; + _showCollisionPage = false; } /*! \brief Draw 1bpp sprite using selected color @@ -512,16 +513,22 @@ void FWRenderer::drawFrame() { blit(); } +/*! + * \brief Turn on or off the showing of the collision page. + * If turned on the blitting routine shows the collision page instead of the back buffer. + * \note Useful for debugging collision page related problems. + */ +void FWRenderer::showCollisionPage(bool state) { + _showCollisionPage = state; +} + /*! \brief Update screen */ void FWRenderer::blit() { - if (g_system->getEventManager()->getModifierState() & Common::KBD_ALT) { - // Show collision page if the Alt key is being pressed - g_system->copyRectToScreen(collisionPage, 320, 0, 0, 320, 200); - } else { - // Normally show the back buffer - g_system->copyRectToScreen(_backBuffer, 320, 0, 0, 320, 200); - } + // Show the back buffer or the collision page. Normally the back + // buffer but showing the collision page is useful for debugging. + byte *source = (_showCollisionPage ? collisionPage : _backBuffer); + g_system->copyRectToScreen(source, 320, 0, 0, 320, 200); } /*! \brief Set player command string |