diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/help.cpp | 2 | ||||
-rw-r--r-- | scumm/imuse_digi.cpp | 4 | ||||
-rw-r--r-- | scumm/resource.cpp | 14 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 34 | ||||
-rw-r--r-- | scumm/scumm.h | 3 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 8 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 3 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 | ||||
-rw-r--r-- | scumm/string.cpp | 2 |
9 files changed, 52 insertions, 20 deletions
diff --git a/scumm/help.cpp b/scumm/help.cpp index c8d46baa1f..fb764c8613 100644 --- a/scumm/help.cpp +++ b/scumm/help.cpp @@ -47,6 +47,7 @@ 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 @@ -215,6 +216,7 @@ 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 74e143ad69..fc5356ba21 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -1066,7 +1066,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) { + } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) { for (l = 0;; l++) { if (_ftStateMusicTable[l].index == -1) { return 1; @@ -1113,7 +1113,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) { + } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) { for (l = 0;; l++) { if (_ftSeqMusicTable[l].index == -1) { return 1; diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 9056466718..a12e7d2ab9 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -87,7 +87,13 @@ void ScummEngine::openRoom(int room) { if (room > 0 && (_version == 8)) VAR(VAR_CURRENTDISK) = res.roomno[rtRoom][room]; sprintf(buf, "%s.la%d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]); - sprintf(buf2, "%s.%.3d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]); + + // FIXME: Now it is not possible to have target file and + // main resource file named differently + if (_gameId == GID_FTDEMO) + sprintf(buf2, "ft.%.3d", 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) sprintf(buf, "%s.he%.1d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]); else { @@ -2069,7 +2075,11 @@ void ScummEngine::readMAXS() { _numCostumes = _fileHandle.readUint16LE(); _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); - _numGlobalScripts = 2000; + + if (_gameId == GID_FTDEMO) + _numGlobalScripts = 300; + else + _numGlobalScripts = 2000; _shadowPaletteSize = NUM_SHADOW_PALETTE * 256; // FIXME better check for the more recent windows based humongous games... diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index deb1ff7291..3d17daa8da 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -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) + if (_gameId == GID_FT || _gameId == GID_FTDEMO) _verbRedraw = true; op = fetchScriptByte(); @@ -2411,8 +2411,18 @@ 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) { - int insaneMode = readArray(233,0,0); + } else if (_gameId == GID_FT || _gameId == GID_FTDEMO) { + int insaneVarNum; + int insaneMode; + + if (_gameId == GID_FTDEMO) + insaneVarNum = 232; + else + insaneVarNum = 233; + + insaneMode = readArray(insaneVarNum,0,0); + + // FIXME: FT Demo has different Insane debug(1, "FT_INSANE Mode: %d", insaneMode); switch (insaneMode) { case 0: @@ -2425,19 +2435,19 @@ void ScummEngine_v6::o6_kernelSetFunctions() { sp->play("tovista1.san", getGameDataPath()); break; case 3: - if (readArray(233,0,50) == 0) { + if (readArray(insaneVarNum,0,50) == 0) { InfoDialog info(this, "Set MineRoad - You can now jump the gorge."); runDialog(info); - writeArray(233, 0, 50, 1); // INSANE callback: Chain - writeArray(233, 0, 51, 1); // INSANE callback: Chainsaw - writeArray(233, 0, 52, 1); // INSANE callback: Mace - writeArray(233, 0, 53, 1); // INSANE callback: 2x4 - writeArray(233, 0, 54, 1); // INSANE callback: Wrench - writeArray(233, 0, 55, 1); // INSANE callback: Dust + writeArray(insaneVarNum, 0, 50, 1); // INSANE callback: Chain + writeArray(insaneVarNum, 0, 51, 1); // INSANE callback: Chainsaw + writeArray(insaneVarNum, 0, 52, 1); // INSANE callback: Mace + writeArray(insaneVarNum, 0, 53, 1); // INSANE callback: 2x4 + writeArray(insaneVarNum, 0, 54, 1); // INSANE callback: Wrench + writeArray(insaneVarNum, 0, 55, 1); // INSANE callback: Dust - writeArray(233, 0, 8, 1); // INSANE callback: Give Googles - writeArray(233, 0, 7, 1); // INSANE callback: Give nitro fuel + writeArray(insaneVarNum, 0, 8, 1); // INSANE callback: Give Googles + writeArray(insaneVarNum, 0, 7, 1); // INSANE callback: Give nitro fuel putState(235, 1); // Cheat and activate Ramp writeVar(142 | 0x8000, 1); // Cheat and activate auto-booster (fan) diff --git a/scumm/scumm.h b/scumm/scumm.h index 7ce022db8d..dd7ddc8659 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -189,7 +189,8 @@ enum ScummGameId { GID_PUTTDEMO, GID_PUTTPUTT, GID_PJSDEMO, - GID_MONKEY_SEGA + GID_MONKEY_SEGA, + GID_FTDEMO }; #define _maxRooms res.num[rtRoom] diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index e6e6a378bc..229efc4e5b 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -188,6 +188,8 @@ static const ScummGameSettings scumm_settings[] = { 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}, {"dig", "The Dig", GID_DIG, 7, MDT_NONE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE}, @@ -1482,7 +1484,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) { + if (_gameId == GID_FT || _gameId == GID_FTDEMO) { drawBlastTexts(); drawBlastObjects(); } else { @@ -2769,6 +2771,10 @@ 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) { + // FIXME: Now it is not possible to have target file and + // main resource file named differently + strcpy(detectName, "ft.000"); } else if (g->version >= 7) { strcat(detectName2, ".la0"); } else diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 2e2e58fcb9..1326d9683f 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -839,6 +839,9 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) { _sf[2] = new SmushFont(true, false); _sf[0]->loadFont("scummfnt.nut", directory); _sf[2]->loadFont("titlfnt.nut", directory); + } else if (_scumm->_gameId == GID_FTDEMO) { + _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); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 32c2fb26be..5f71322d20 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -120,7 +120,7 @@ void Sound::addSoundToQueue(int sound) { _scumm->ensureResourceLoaded(rtSound, sound); addSoundToQueue2(sound); } else { - // WARNING ! This may break something, maybe this sould be put inside if (_gameID == GID_FT) ? + // WARNING ! This may break something, maybe this sould be put inside if (_gameID == GID_FT || _gameID == GID_FTDEMO) ? // But why addSoundToQueue should not queue sound ? _scumm->ensureResourceLoaded(rtSound, sound); addSoundToQueue2(sound); diff --git a/scumm/string.cpp b/scumm/string.cpp index 00b2ad2187..1e614f8d4f 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 && a == 4) + if ((_gameId == GID_FT || _gameId == GID_FTDEMO) && a == 4) _talkDelay = -1; if (!buf[0]) { |