From 4b1c6b526dbfa8d084fbd2475b4d4caa173e442c Mon Sep 17 00:00:00 2001 From: Henry Bush Date: Sun, 5 Jul 2009 22:57:58 +0000 Subject: Groovie: get hotspots working correctly in 11H RGB svn-id: r42158 --- engines/groovie/graphics.cpp | 4 ++-- engines/groovie/groovie.cpp | 1 + engines/groovie/script.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/groovie') diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp index 647eaa913b..1e54f0e79b 100644 --- a/engines/groovie/graphics.cpp +++ b/engines/groovie/graphics.cpp @@ -31,8 +31,8 @@ namespace Groovie { GraphicsMan::GraphicsMan(GroovieEngine *vm) : _vm(vm), _changed(false), _fading(0) { // Create the game surfaces - _foreground.create(640, 320, 1); - _background.create(640, 320, 1); + _foreground.create(640, 320, _vm->_pixelFormat.bytesPerPixel); + _background.create(640, 320, _vm->_pixelFormat.bytesPerPixel); } GraphicsMan::~GraphicsMan() { diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index f5db99dd4a..24f47351a3 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -82,6 +82,7 @@ Common::Error GroovieEngine::run() { break; case kGroovieT7G: initGraphics(640, 480, true); + _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); break; } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index eb53842b91..934400fb15 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -354,7 +354,7 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) { Common::isDebugChannelEnabled(kGroovieDebugAll)) { rect.translate(0, -80); _vm->_graphicsMan->_foreground.frameRect(rect, 250); - _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), 640, 0, 80, 640, 320); + _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320); _vm->_system->updateScreen(); } -- cgit v1.2.3