aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie/groovie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/groovie/groovie.cpp')
-rw-r--r--engines/groovie/groovie.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 9381b5b47c..039efd2c49 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -70,7 +70,21 @@ GroovieEngine::~GroovieEngine() {
Common::Error GroovieEngine::run() {
// Initialize the graphics
- initGraphics(640, 480, true);
+ switch (_gameDescription->version) {
+ case kGroovieV2:
+ // Request the mode with the highest precision available
+ _pixelFormat = _system->getSupportedFormats().front();
+ initGraphics(640, 480, true, &_pixelFormat);
+
+ // Save the enabled mode as it can be both an RGB mode or CLUT8
+ _pixelFormat = _system->getScreenFormat();
+ _mode8bit = (_pixelFormat == Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0));
+ break;
+ case kGroovieT7G:
+ initGraphics(640, 480, true);
+ _pixelFormat = Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
+ break;
+ }
// Create debugger. It requires GFX to be initialized
_debugger = new Debugger(this);
@@ -204,13 +218,18 @@ Common::Error GroovieEngine::run() {
case Common::EVENT_LBUTTONDOWN:
// Send the event to the scripts
- _script.setMouseClick();
+ _script.setMouseClick(1);
// Continue the script execution to handle
// the click
_waitingForInput = false;
break;
+ case Common::EVENT_RBUTTONDOWN:
+ // Send the event to the scripts (to skip the video)
+ _script.setMouseClick(2);
+ break;
+
case Common::EVENT_QUIT:
quitGame();
break;