diff options
-rw-r--r-- | engines/sci/console.cpp | 14 | ||||
-rw-r--r-- | engines/sci/graphics/paint.cpp | 3 | ||||
-rw-r--r-- | engines/sci/graphics/paint.h | 1 | ||||
-rw-r--r-- | engines/sci/graphics/paint32.cpp | 11 | ||||
-rw-r--r-- | engines/sci/graphics/paint32.h | 1 |
5 files changed, 13 insertions, 17 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; } diff --git a/engines/sci/graphics/paint.cpp b/engines/sci/graphics/paint.cpp index 50b0534ba7..c347da3c0f 100644 --- a/engines/sci/graphics/paint.cpp +++ b/engines/sci/graphics/paint.cpp @@ -43,9 +43,6 @@ GfxPaint::~GfxPaint() { void GfxPaint::kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo) { } -void GfxPaint::kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle) { -} - void GfxPaint::kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control) { } diff --git a/engines/sci/graphics/paint.h b/engines/sci/graphics/paint.h index 994bc4e5e9..a79e8993c2 100644 --- a/engines/sci/graphics/paint.h +++ b/engines/sci/graphics/paint.h @@ -36,7 +36,6 @@ public: virtual ~GfxPaint(); virtual void kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo); - virtual void kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle); virtual void kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control); }; diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp index aa3bf8dfb3..69a278eb8b 100644 --- a/engines/sci/graphics/paint32.cpp +++ b/engines/sci/graphics/paint32.cpp @@ -65,17 +65,6 @@ void GfxPaint32::kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, b delete picture; } -// This is "hacked" together, because its only used by debug command -void GfxPaint32::kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle) { - GfxView *view = _cache->getView(viewId); - 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); - _screen->copyRectToScreen(celRect); -} - void GfxPaint32::kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control) { _screen->drawLine(startPoint.x, startPoint.y, endPoint.x, endPoint.y, color, priority, control); } diff --git a/engines/sci/graphics/paint32.h b/engines/sci/graphics/paint32.h index 3fa9d11d9b..e412bdf1c4 100644 --- a/engines/sci/graphics/paint32.h +++ b/engines/sci/graphics/paint32.h @@ -45,7 +45,6 @@ public: void fillRect(Common::Rect rect, byte color); void kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo); - void kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle); void kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control); private: |