diff options
author | Willem Jan Palenstijn | 2013-04-18 23:34:29 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:39:44 +0200 |
commit | 01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6 (patch) | |
tree | 544b07f3aa41abe7907bcd2040cdad11ebc324bb /engines/groovie | |
parent | 9cf2c83e5e5a35816ab153bf8443dac691829ea8 (diff) | |
parent | a41d72a44a660c72fdadbc3a8ef580e5e03cb890 (diff) | |
download | scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.gz scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.bz2 scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.zip |
Merge branch 'master'
Diffstat (limited to 'engines/groovie')
-rw-r--r-- | engines/groovie/detection.cpp | 30 | ||||
-rw-r--r-- | engines/groovie/groovie.cpp | 3 | ||||
-rw-r--r-- | engines/groovie/music.cpp | 5 | ||||
-rw-r--r-- | engines/groovie/music.h | 2 | ||||
-rw-r--r-- | engines/groovie/roq.cpp | 51 | ||||
-rw-r--r-- | engines/groovie/roq.h | 11 | ||||
-rw-r--r-- | engines/groovie/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/groovie/script.cpp | 9 |
8 files changed, 30 insertions, 85 deletions
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp index 62887bac1e..f8414ac455 100644 --- a/engines/groovie/detection.cpp +++ b/engines/groovie/detection.cpp @@ -52,7 +52,7 @@ static const GroovieGameDescription gameDescriptions[] = { "t7g", "", AD_ENTRY1s("script.grv", "d1b8033b40aa67c076039881eccce90d", 16659), Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieT7G, 0 }, @@ -63,7 +63,7 @@ static const GroovieGameDescription gameDescriptions[] = { "t7g", "", AD_ENTRY1s("T7GMac", "acdc4a58dd3f007f65e99b99d78e0bce", 1814029), Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieT7G, 0 }, @@ -79,7 +79,7 @@ static const GroovieGameDescription gameDescriptions[] = { "t7g", "", AD_ENTRY1s("T7GMac", "6bdee8d0f9eef6d58d02fcd7deec3fb2", 1830783), Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieT7G, 0 }, @@ -90,7 +90,7 @@ static const GroovieGameDescription gameDescriptions[] = { "t7g", "", AD_ENTRY1s("T7GMac", "0d595d4b44ae1814082938d051e5174e", 1830783), Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieT7G, 0 }, @@ -106,7 +106,7 @@ static const GroovieGameDescription gameDescriptions[] = { { NULL, 0, NULL, 0} }, Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieT7G, 0 }, @@ -120,7 +120,7 @@ static const GroovieGameDescription gameDescriptions[] = { { NULL, 0, NULL, 0} }, Common::EN_ANY, Common::kPlatformIOS, ADGF_NO_FLAGS, - Common::GUIO_NOMIDI + GUIO1(GUIO_NOMIDI) }, kGroovieT7G, 0 }, @@ -132,7 +132,7 @@ static const GroovieGameDescription gameDescriptions[] = { "11h", "", AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227), Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + GUIO3(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieV2, 1 }, @@ -142,8 +142,8 @@ static const GroovieGameDescription gameDescriptions[] = { { "11h", "Demo", AD_ENTRY1s("disk.1", "aacb32ce07e0df2894bd83a3dee40c12", 70), - Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, Common::GUIO_NOLAUNCHLOAD | - Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM + Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, + GUIO4(GUIO_NOLAUNCHLOAD, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM) }, kGroovieV2, 1 }, @@ -153,7 +153,7 @@ static const GroovieGameDescription gameDescriptions[] = { { "11h", "Making Of", AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227), - Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD + Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD) }, kGroovieV2, 2 }, @@ -163,7 +163,7 @@ static const GroovieGameDescription gameDescriptions[] = { { "clandestiny", "Trailer", AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227), - Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD + Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD) }, kGroovieV2, 3 }, @@ -173,7 +173,7 @@ static const GroovieGameDescription gameDescriptions[] = { { "clandestiny", "", AD_ENTRY1s("disk.1", "f79fc1515174540fef6a34132efc4c53", 76), - Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI + Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, kGroovieV2, 1 }, @@ -183,7 +183,7 @@ static const GroovieGameDescription gameDescriptions[] = { { "unclehenry", "", AD_ENTRY1s("disk.1", "0e1b1d3cecc4fc7efa62a968844d1f7a", 72), - Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI + Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, kGroovieV2, 1 }, @@ -193,7 +193,7 @@ static const GroovieGameDescription gameDescriptions[] = { { "tlc", "", AD_ENTRY1s("disk.1", "32a1afa68478f1f9d2b25eeea427f2e3", 84), - Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI + Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, kGroovieV2, 1 }, @@ -216,7 +216,7 @@ public: // to the detection entries. In the latter case, this TODO should be // replaced with an according explanation. _flags = kADFlagUseExtraAsHint; - _guioptions = Common::GUIO_NOSUBTITLES | Common::GUIO_NOSFX; + _guioptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOSFX); } const char *getName() const { diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 5f95de649a..f5f02b5cdd 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -20,6 +20,9 @@ * */ +#include "audio/mididrv.h" +#include "audio/mixer.h" + #include "groovie/groovie.h" #include "groovie/cursor.h" #include "groovie/detection.h" diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index c6e990dfcf..af929d439b 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -20,6 +20,9 @@ * */ +#include "audio/mididrv.h" +#include "audio/mixer.h" + #include "groovie/music.h" #include "groovie/groovie.h" #include "groovie/resource.h" @@ -766,7 +769,7 @@ Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadS } MusicPlayerIOS::MusicPlayerIOS(GroovieEngine *vm) : MusicPlayer(vm) { - vm->getTimerManager()->installTimerProc(&onTimer, 50 * 1000, this); + vm->getTimerManager()->installTimerProc(&onTimer, 50 * 1000, this, "groovieMusic"); } MusicPlayerIOS::~MusicPlayerIOS() { diff --git a/engines/groovie/music.h b/engines/groovie/music.h index 7af482e45d..cc852aa8dc 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -25,8 +25,6 @@ #include "common/array.h" #include "common/mutex.h" -#include "audio/mididrv.h" -#include "audio/mixer.h" class MidiParser; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 7f477c41fa..ca896a8d21 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -43,9 +43,6 @@ namespace Groovie { ROQPlayer::ROQPlayer(GroovieEngine *vm) : -#ifdef DITHER - _dither(NULL), -#endif VideoPlayer(vm), _codingTypeCount(0), _fg(&_vm->_graphicsMan->_foreground), _bg(&_vm->_graphicsMan->_background) { @@ -55,38 +52,13 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : if (_vm->_mode8bit) { byte pal[256 * 3]; -#ifdef DITHER - // Initialize to a black palette - memset(pal, 0, 256 * 3); - - // Build a basic color palette - for (int r = 0; r < 4; r++) { - for (int g = 0; g < 4; g++) { - for (int b = 0; b < 4; b++) { - byte col = (r << 4) | (g << 2) | (b << 0); - pal[3 * col + 0] = r << 6; - pal[3 * col + 1] = g << 6; - pal[3 * col + 2] = b << 6; - } - } - } - - // Initialize the dithering algorithm - _paletteLookup = new Graphics::PaletteLUT(8, Graphics::PaletteLUT::kPaletteYUV); - _paletteLookup->setPalette(pal, Graphics::PaletteLUT::kPaletteRGB, 8); - for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { - debug("Groovie::ROQ: Building palette table: %02d/63", i); - _paletteLookup->buildNext(); - } -#else // !DITHER // 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; } -#endif // DITHER _syst->getPaletteManager()->setPalette(pal, 0, 256); } @@ -98,12 +70,6 @@ ROQPlayer::~ROQPlayer() { delete _currBuf; _prevBuf->free(); delete _prevBuf; - -#ifdef DITHER - // Free the dithering algorithm - delete _dither; - delete _paletteLookup; -#endif } uint16 ROQPlayer::loadInternal() { @@ -147,22 +113,13 @@ uint16 ROQPlayer::loadInternal() { } void ROQPlayer::buildShowBuf() { -#ifdef DITHER - // Start a new frame dithering - _dither->newFrame(); -#endif - for (int line = 0; line < _bg->h; line++) { 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) { -#ifdef DITHER - *out = _dither->dither(*in, *(in + 1), *(in + 2), x); -#else // Just use the luminancy component *out = *in; -#endif // DITHER #ifdef USE_RGB_COLOR } else { // Do the format conversion (YUV -> RGB -> Screen format) @@ -178,9 +135,6 @@ void ROQPlayer::buildShowBuf() { if (!(x % _scaleX)) in += _currBuf->format.bytesPerPixel; } -#ifdef DITHER - _dither->nextLine(); -#endif } // Swap buffers @@ -349,11 +303,6 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) { *ptr2++ = 128; } -#ifdef DITHER - // Reset the dithering algorithm with the new width - delete _dither; - _dither = new Graphics::SierraLight(width * _scaleX, _paletteLookup); -#endif } return true; diff --git a/engines/groovie/roq.h b/engines/groovie/roq.h index ddb307065c..c5d3f255d3 100644 --- a/engines/groovie/roq.h +++ b/engines/groovie/roq.h @@ -25,12 +25,6 @@ #include "groovie/player.h" -//#define DITHER - -#ifdef DITHER -#include "graphics/dither.h" -#endif - namespace Groovie { class GroovieEngine; @@ -89,11 +83,6 @@ private: bool _dirty; byte _alpha; -#ifdef DITHER - // Dithering - Graphics::PaletteLUT *_paletteLookup; - Graphics::SierraLight *_dither; -#endif }; } // End of Groovie namespace diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp index a0463db0be..14e7a09cb2 100644 --- a/engines/groovie/saveload.cpp +++ b/engines/groovie/saveload.cpp @@ -102,7 +102,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s // Fill the SaveStateDescriptor if it was provided if (descriptor) { // Initialize the SaveStateDescriptor - descriptor->setVal("save_slot", Common::String('0' + slot)); + descriptor->setSaveSlot(slot); descriptor->setDeletableFlag(true); descriptor->setWriteProtectedFlag(false); @@ -132,7 +132,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s description += c; } } - descriptor->setVal("description", description); + descriptor->setDescription(description); } // Return a substream, skipping the metadata diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index f87e6bb91b..9003a58ab8 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -20,6 +20,9 @@ * */ +#include "audio/mididrv.h" +#include "audio/mixer.h" + #include "groovie/script.h" #include "groovie/cell.h" #include "groovie/cursor.h" @@ -1350,15 +1353,15 @@ void Script::o_checkvalidsaves() { uint count = 0; SaveStateList::iterator it = list.begin(); while (it != list.end()) { - int8 slot = it->getVal("save_slot").lastChar() - '0'; + int8 slot = it->getSaveSlot(); if (SaveLoad::isSlotValid(slot)) { - debugScript(2, true, " Found valid savegame: %s", it->getVal("description").c_str()); + debugScript(2, true, " Found valid savegame: %s", it->getDescription().c_str()); // Mark this slot as used setVariable(slot, 1); // Cache this slot's description - _saveNames[slot] = it->getVal("description"); + _saveNames[slot] = it->getDescription(); count++; } it++; |