diff options
author | md5 | 2011-02-26 19:07:31 +0200 |
---|---|---|
committer | md5 | 2011-02-26 19:07:31 +0200 |
commit | fe04339909ad9a78cd49a057d3188cc5f54aa713 (patch) | |
tree | 977e0a59501256ccc586af5253fe3d78acf64b3c /engines/sci/console.cpp | |
parent | ab256842e4a23acf8de28ea5e74344d47677d029 (diff) | |
download | scummvm-rg350-fe04339909ad9a78cd49a057d3188cc5f54aa713.tar.gz scummvm-rg350-fe04339909ad9a78cd49a057d3188cc5f54aa713.tar.bz2 scummvm-rg350-fe04339909ad9a78cd49a057d3188cc5f54aa713.zip |
SCI: Removed the SCI32 version of kernelDrawCel() and placed its code inside the debug function cmdDrawCel, as it was hacked together to be used specifically in that command (thanks to salty-horse for spotting this)
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r-- | engines/sci/console.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index d77ac858c8..f63f0cb3b1 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -40,12 +40,14 @@ #include "sci/sound/music.h" #include "sci/sound/drivers/mididriver.h" #include "sci/sound/drivers/map-mt32-to-gm.h" +#include "sci/graphics/cache.h" #include "sci/graphics/cursor.h" #include "sci/graphics/screen.h" #include "sci/graphics/paint.h" #include "sci/graphics/paint16.h" #include "sci/graphics/paint32.h" #include "sci/graphics/palette.h" +#include "sci/graphics/view.h" #include "sci/parser/vocabulary.h" @@ -1503,7 +1505,17 @@ bool Console::cmdDrawCel(int argc, const char **argv) { uint16 loopNo = atoi(argv[2]); uint16 celNo = atoi(argv[3]); - _engine->_gfxPaint->kernelDrawCel(resourceId, loopNo, celNo, 50, 50, 0, 0, false, NULL_REG); + if (_engine->_gfxPaint16) { + _engine->_gfxPaint16->kernelDrawCel(resourceId, loopNo, celNo, 50, 50, 0, 0, 128, 128, false, NULL_REG); + } else { + GfxView *view = _engine->_gfxCache->getView(resourceId); + Common::Rect celRect(50, 50, 50, 50); + Common::Rect translatedRect; + celRect.bottom += view->getHeight(loopNo, celNo); + celRect.right += view->getWidth(loopNo, celNo); + view->draw(celRect, celRect, celRect, loopNo, celNo, 255, 0, false); + _engine->_gfxScreen->copyRectToScreen(celRect); + } return true; } |