aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
authorMatthew Hoops2014-01-13 19:05:07 -0500
committerMatthew Hoops2014-06-01 22:08:28 -0400
commit5d4fd2e1540ae9ced60b68c3253d3b5b04254403 (patch)
treefbf76760dc3ad4b6c95d4ef946cac3fb3f2c61cc /engines/groovie
parent72e7d55d629ecb38ad0dc1cabcd6911c7c3d9ebd (diff)
downloadscummvm-rg350-5d4fd2e1540ae9ced60b68c3253d3b5b04254403.tar.gz
scummvm-rg350-5d4fd2e1540ae9ced60b68c3253d3b5b04254403.tar.bz2
scummvm-rg350-5d4fd2e1540ae9ced60b68c3253d3b5b04254403.zip
GROOVIE: Remove groovie2 8bpp mode
It didn't work properly, it's not what the original did, and spooky mode needs to be implemented completely differently
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/configure.engine2
-rw-r--r--engines/groovie/groovie.cpp11
-rw-r--r--engines/groovie/groovie.h2
-rw-r--r--engines/groovie/roq.cpp30
4 files changed, 15 insertions, 30 deletions
diff --git a/engines/groovie/configure.engine b/engines/groovie/configure.engine
index 84e95a70df..212a49bec8 100644
--- a/engines/groovie/configure.engine
+++ b/engines/groovie/configure.engine
@@ -1,4 +1,4 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
add_engine groovie "Groovie" yes "groovie2" "7th Guest"
-add_engine groovie2 "Groovie 2 games" no "" "" "jpeg"
+add_engine groovie2 "Groovie 2 games" no "" "" "jpeg 16bit"
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index e65031ec38..f2801881f1 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -50,7 +50,8 @@ namespace Groovie {
GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
Engine(syst), _gameDescription(gd), _debugger(NULL), _script(NULL),
_resMan(NULL), _grvCursorMan(NULL), _videoPlayer(NULL), _musicPlayer(NULL),
- _graphicsMan(NULL), _macResFork(NULL), _waitingForInput(false), _font(NULL) {
+ _graphicsMan(NULL), _macResFork(NULL), _waitingForInput(false), _font(NULL),
+ _spookyMode(false) {
// Adding the default directories
const Common::FSNode gameDataDir(ConfMan.get("path"));
@@ -107,9 +108,13 @@ Common::Error GroovieEngine::run() {
// Request the mode with the highest precision available
initGraphics(640, 480, true, NULL);
- // Save the enabled mode as it can be both an RGB mode or CLUT8
+ // Save the enabled mode
_pixelFormat = _system->getScreenFormat();
- _mode8bit = (_pixelFormat == Graphics::PixelFormat::createFormatCLUT8());
+
+ // TODO: Eventually drop 16bpp mode
+ if (_pixelFormat.bytesPerPixel == 1)
+ return Common::kUnsupportedColorMode;
+
break;
case kGroovieT7G:
initGraphics(640, 480, true);
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index c3d3146cca..9fe6b0c2f5 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -110,7 +110,7 @@ public:
void waitForInput();
Graphics::PixelFormat _pixelFormat;
- bool _mode8bit;
+ bool _spookyMode;
Script *_script;
ResMan *_resMan;
GrvCursorMan *_grvCursorMan;
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 2776a0455d..5eebc6a6bb 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -50,19 +50,6 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) :
// Create the work surfaces
_currBuf = new Graphics::Surface();
_prevBuf = new Graphics::Surface();
-
- if (_vm->_mode8bit) {
- byte pal[256 * 3];
-
- // Set a grayscale palette
- for (int i = 0; i < 256; i++) {
- pal[(i * 3) + 0] = i;
- pal[(i * 3) + 1] = i;
- pal[(i * 3) + 2] = i;
- }
-
- _syst->getPaletteManager()->setPalette(pal, 0, 256);
- }
}
ROQPlayer::~ROQPlayer() {
@@ -118,18 +105,11 @@ void ROQPlayer::buildShowBuf() {
byte *out = (byte *)_bg->getBasePtr(0, line);
byte *in = (byte *)_currBuf->getBasePtr(0, line / _scaleY);
for (int x = 0; x < _bg->w; x++) {
- if (_vm->_mode8bit) {
- // Just use the luminancy component
- *out = *in;
-#ifdef USE_RGB_COLOR
- } else {
- // Do the format conversion (YUV -> RGB -> Screen format)
- byte r, g, b;
- Graphics::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b);
- // FIXME: this is fixed to 16bit
- *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b);
-#endif // USE_RGB_COLOR
- }
+ // Do the format conversion (YUV -> RGB -> Screen format)
+ byte r, g, b;
+ Graphics::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b);
+ // FIXME: this is fixed to 16bit
+ *(uint16 *)out = _vm->_pixelFormat.RGBToColor(r, g, b);
// Skip to the next pixel
out += _vm->_pixelFormat.bytesPerPixel;