diff options
-rw-r--r-- | scumm/help.cpp | 2 | ||||
-rw-r--r-- | scumm/imuse_digi.cpp | 6 | ||||
-rw-r--r-- | scumm/resource.cpp | 8 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 8 | ||||
-rw-r--r-- | scumm/scumm.h | 7 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 28 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 30 | ||||
-rw-r--r-- | scumm/string.cpp | 2 |
8 files changed, 49 insertions, 42 deletions
diff --git a/scumm/help.cpp b/scumm/help.cpp index fb764c8613..c8d46baa1f 100644 --- a/scumm/help.cpp +++ b/scumm/help.cpp @@ -47,7 +47,6 @@ int ScummHelp::numPages(byte gameId) { case GID_DIG: case GID_FT: case GID_CMI: - case GID_FTDEMO: return 3; break; /* TODO - I don't know the controls for these games @@ -216,7 +215,6 @@ void ScummHelp::updateStrings(byte gameId, byte version, int page, ADD_BIND("b", "Black and White / Color"); break; case GID_FT: - case GID_FTDEMO: ADD_BIND("e", "Eyes"); ADD_BIND("t", "Tongue"); ADD_BIND("i", "Inventory"); diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index 8b65e55863..3f7c9ff57c 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -1047,7 +1047,7 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i return 0; } } - } else if (_scumm->_gameId == GID_CMIDEMO) { + } else if ((_scumm->_gameId == GID_CMI) && (_scumm->_features & GF_DEMO)) { if (b == 1000) { // STATE_NULL _scumm->_sound->stopBundleMusic(); return 0; @@ -1082,7 +1082,7 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i return 0; } } - } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) { + } else if (_scumm->_gameId == GID_FT) { for (l = 0;; l++) { if (_ftStateMusicTable[l].index == -1) { return 1; @@ -1129,7 +1129,7 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i return 0; } } - } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) { + } else if (_scumm->_gameId == GID_FT) { for (l = 0;; l++) { if (_ftSeqMusicTable[l].index == -1) { return 1; diff --git a/scumm/resource.cpp b/scumm/resource.cpp index a12e7d2ab9..b745827cce 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -90,8 +90,12 @@ void ScummEngine::openRoom(int room) { // FIXME: Now it is not possible to have target file and // main resource file named differently - if (_gameId == GID_FTDEMO) + if ((_gameId == GID_FT) && (_features & GF_DEMO)) sprintf(buf2, "ft.%.3d", room == 0 ? 0 : res.roomno[rtRoom][room]); + else if ((_gameId == GID_DIG) && (_features & GF_DEMO)) + sprintf(buf2, "dig.la%d", room == 0 ? 0 : res.roomno[rtRoom][room]); + else if ((_gameId == GID_CMI) && (_features & GF_DEMO)) + sprintf(buf2, "comi.la%d", room == 0 ? 0 : res.roomno[rtRoom][room]); else sprintf(buf2, "%s.%.3d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]); } else if (_features & GF_HUMONGOUS) @@ -2076,7 +2080,7 @@ void ScummEngine::readMAXS() { _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); - if (_gameId == GID_FTDEMO) + if ((_gameId == GID_FT) && (_features & GF_DEMO)) _numGlobalScripts = 300; else _numGlobalScripts = 2000; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index c1a2ea0e95..fdc1401239 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -927,7 +927,7 @@ void ScummEngine_v6::o6_getOwner() { } void ScummEngine_v6::o6_startSound() { - if ((_features & GF_HUMONGOUS) && (_gameId != GID_PUTTDEMO)) + if ((_features & GF_HUMONGOUS) && (_gameId != GID_PUTTPUTT) && (!(_features & GF_DEMO))) pop(); // offset which seems to always be zero _sound->addSoundToQueue(pop()); } @@ -1814,7 +1814,7 @@ void ScummEngine_v6::o6_verbOps() { // Full Throttle implements conversation by creating new verbs, one // for each option, but it never tells when to actually draw them. - if (_gameId == GID_FT || _gameId == GID_FTDEMO) + if (_gameId == GID_FT) _verbRedraw = true; op = fetchScriptByte(); @@ -2411,11 +2411,11 @@ void ScummEngine_v6::o6_kernelSetFunctions() { // INSANE mode 0: SMUSH movie playback if (args[1] == 0) { sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath()); - } else if (_gameId == GID_FT || _gameId == GID_FTDEMO) { + } else if (_gameId == GID_FT) { int insaneVarNum; int insaneMode; - if (_gameId == GID_FTDEMO) + if ((_gameId == GID_FT) && (_features & GF_DEMO)) insaneVarNum = 232; else insaneVarNum = 233; diff --git a/scumm/scumm.h b/scumm/scumm.h index 21440f5cd4..aff1d2ad5c 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -94,6 +94,7 @@ enum GameFeatures { GF_NES = 1 << 18, GF_ATARI_ST = 1 << 19, GF_MACINTOSH = 1 << 20, + GF_DEMO = 1 << 21, GF_EXTERNAL_CHARSET = GF_SMALL_HEADER }; @@ -186,13 +187,9 @@ enum ScummGameId { GID_CMI, GID_MANIAC, GID_ZAK, - GID_PUTTDEMO, GID_PUTTPUTT, GID_PJSDEMO, - GID_MONKEY_SEGA, - GID_FTDEMO, - GID_CMIDEMO, - GID_DIGDEMO + GID_MONKEY_SEGA }; #define _maxRooms res.num[rtRoom] diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 1e3b2ce712..5a5a9c2489 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -152,8 +152,8 @@ static const ScummGameSettings scumm_settings[] = { /* Scumm Version 6 */ {"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_PUTTPUTT, 6, MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES}, - {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, MDT_ADLIB | MDT_NATIVE, - GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS}, + {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTPUTT, 6, MDT_ADLIB | MDT_NATIVE, + GF_DEMO | GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS}, {"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_PUTTPUTT, 6, MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES}, {"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_PUTTPUTT, 6, MDT_ADLIB | MDT_NATIVE, @@ -186,23 +186,21 @@ static const ScummGameSettings scumm_settings[] = { /* Scumm Version 7 */ {"ft", "Full Throttle", GID_FT, 7, MDT_NONE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, - {"ftdemo", "Full Throttle (Mac Demo)", GID_FT, 7, MDT_NONE, - GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, - {"ftpcdemo", "Full Throttle (Demo)", GID_FTDEMO, 7, MDT_NONE, - GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, + {"ftdemo", "Full Throttle (PC Demo)", GID_FT, 7, MDT_NONE, + GF_DEMO | GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, {"dig", "The Dig", GID_DIG, 7, MDT_NONE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, - {"digdemo", "The Dig", GID_DIGDEMO, 7, MDT_NONE, - GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, + {"digdemo", "The Dig (Demo)", GID_DIG, 7, MDT_NONE, + GF_DEMO | GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, #ifndef __PALM_OS__ // these are SVGA games not supported under PalmOS /* Scumm Version 8 */ {"comi", "The Curse of Monkey Island", GID_CMI, 8, MDT_NONE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER}, - {"comidemo", "The Curse of Monkey Island", GID_CMIDEMO, 8, MDT_NONE, - GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER}, - + {"comidemo", "The Curse of Monkey Island (Demo)", GID_CMI, 8, MDT_NONE, + GF_DEMO | GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER}, + /* Note that both full versions of Humongous games and demos were often released for * several interpreter versions... */ /* @@ -1488,7 +1486,7 @@ load_game: // texts have to be drawn before the blast objects. Unless // someone can think of a better way to achieve this effect. - if (_gameId == GID_FT || _gameId == GID_FTDEMO) { + if (_gameId == GID_FT) { drawBlastTexts(); drawBlastObjects(); } else { @@ -2775,10 +2773,14 @@ GameList Engine_SCUMM_detectGames(const FSList &fslist) { strcpy(detectName2, g->gameName); if (g->features & GF_HUMONGOUS) { strcat(detectName2, ".he0"); - } else if (g->id == GID_FTDEMO) { + } else if ((g->id == GID_FT) && (g->features & GF_DEMO)) { // FIXME: Now it is not possible to have target file and // main resource file named differently strcpy(detectName, "ft.000"); + } else if ((g->id == GID_DIG) && (g->features & GF_DEMO)) { + strcpy(detectName, "dig.la0"); + } else if ((g->id == GID_CMI) && (g->features & GF_DEMO)) { + strcpy(detectName, "comi.la0"); } else if (g->version >= 7) { strcat(detectName2, ".la0"); } else diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index a6ad89ba08..6d5878aaa8 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -828,24 +828,30 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) { readString(file, directory); if (_scumm->_gameId == GID_FT) { - _sf[0] = new SmushFont(true, false); - _sf[2] = new SmushFont(true, false); - _sf[0]->loadFont("scummfnt.nut", directory); - _sf[2]->loadFont("titlfnt.nut", directory); - } else if (_scumm->_gameId == GID_FTDEMO) { + if (!(_scumm->_features & GF_DEMO)) { + _sf[0] = new SmushFont(true, false); + _sf[2] = new SmushFont(true, false); + _sf[0]->loadFont("scummfnt.nut", directory); + _sf[2]->loadFont("titlfnt.nut", directory); + } else { _sf[0] = new SmushFont(true, false); _sf[0]->loadFont("scummfnt.nut", directory); + } } else if (_scumm->_gameId == GID_DIG) { - for (i = 0; i < 4; i++) { - sprintf(file_font, "font%d.nut", i); - _sf[i] = new SmushFont(i != 0, false); - _sf[i]->loadFont(file_font, directory); + if (!(_scumm->_features & GF_DEMO)) { + for (i = 0; i < 4; i++) { + sprintf(file_font, "font%d.nut", i); + _sf[i] = new SmushFont(i != 0, false); + _sf[i]->loadFont(file_font, directory); + } } } else if (_scumm->_gameId == GID_CMI) { for (i = 0; i < 5; i++) { - sprintf(file_font, "font%d.nut", i); - _sf[i] = new SmushFont(false, true); - _sf[i]->loadFont(file_font, directory); + if ((!(_scumm->_features & GF_DEMO)) && (i != 5)) { + sprintf(file_font, "font%d.nut", i); + _sf[i] = new SmushFont(false, true); + _sf[i]->loadFont(file_font, directory); + } } } else { error("SmushPlayer::setupAnim() Unknown font setup for game"); diff --git a/scumm/string.cpp b/scumm/string.cpp index ec89b5e6fd..fc55dda3d5 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -401,7 +401,7 @@ void ScummEngine::drawString(int a) { // and never time out. We can't do it blindly for all games, because // it causes problem with the FOA intro. - if ((_gameId == GID_FT || _gameId == GID_FTDEMO) && a == 4) + if ((_gameId == GID_FT) && a == 4) _talkDelay = -1; if (!buf[0]) { |