2001-10-09 14:30:12 +00:00
/* ScummVM - Scumm Interpreter
* Copyright ( C ) 2001 Ludvig Strigeus
2006-01-18 16:12:44 +00:00
* Copyright ( C ) 2001 - 2006 The ScummVM project
2001-10-09 14:30:12 +00:00
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
2005-10-18 01:30:26 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
2001-10-09 14:30:12 +00:00
*
2006-02-11 09:55:41 +00:00
* $ URL $
* $ Id $
2001-10-09 14:30:12 +00:00
*
*/
2005-06-24 15:23:51 +00:00
# include "common/stdafx.h"
2003-09-11 10:32:15 +00:00
2003-10-17 23:16:53 +00:00
# include "backends/fs/fs.h"
2003-09-17 22:41:01 +00:00
# include "base/gameDetector.h"
2003-09-18 18:23:53 +00:00
# include "base/plugins.h"
2003-10-08 21:59:23 +00:00
# include "common/config-manager.h"
2003-12-13 00:20:01 +00:00
# include "common/md5.h"
2005-01-10 22:06:49 +00:00
# include "common/system.h"
2003-09-11 10:32:15 +00:00
2002-11-30 16:47:16 +00:00
# include "gui/message.h"
2003-09-11 10:32:15 +00:00
# include "gui/newgui.h"
2003-06-05 02:44:18 +00:00
2005-05-14 23:28:22 +00:00
# include "scumm/akos.h"
2003-09-11 10:32:15 +00:00
# include "scumm/charset.h"
# include "scumm/costume.h"
# include "scumm/debugger.h"
# include "scumm/dialogs.h"
2006-02-20 20:57:26 +00:00
# include "scumm/imuse/imuse.h"
2005-05-14 23:28:22 +00:00
# include "scumm/imuse_digi/dimuse.h"
# include "scumm/insane/insane.h"
2003-09-11 10:32:15 +00:00
# include "scumm/intern.h"
2006-02-15 00:57:50 +00:00
# include "scumm/he/intern_he.h"
# include "scumm/he/logic_he.h"
2005-04-07 07:29:19 +00:00
# include "scumm/player_nes.h"
2003-09-11 10:32:15 +00:00
# include "scumm/player_v1.h"
# include "scumm/player_v2.h"
2003-09-24 06:56:30 +00:00
# include "scumm/player_v2a.h"
2003-09-11 10:32:15 +00:00
# include "scumm/player_v3a.h"
2006-02-15 18:48:49 +00:00
# include "scumm/he/resource_he.h"
2003-09-11 10:32:15 +00:00
# include "scumm/scumm.h"
2005-10-22 23:08:14 +00:00
# include "scumm/sound.h"
2006-02-15 00:57:50 +00:00
# include "scumm/he/sprite_he.h"
2005-05-14 22:56:41 +00:00
# include "scumm/util.h"
2005-10-08 21:34:59 +00:00
# ifdef PALMOS_68K
2005-03-11 10:46:28 +00:00
# include "extras/palm-scumm-md5.h"
# else
2003-12-30 16:53:28 +00:00
# include "scumm/scumm-md5.h"
2005-03-11 10:46:28 +00:00
# endif
2003-09-11 10:32:15 +00:00
# include "scumm/verbs.h"
# include "sound/mixer.h"
2003-06-05 02:44:18 +00:00
2003-05-24 22:17:45 +00:00
# ifdef MACOSX
# include <sys/types.h>
# include <sys/stat.h>
# endif
2001-10-09 14:30:12 +00:00
2003-07-21 22:30:15 +00:00
# ifdef _WIN32_WCE
extern bool isSmartphone ( void ) ;
# endif
2005-11-27 02:35:57 +00:00
# if (defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__))
2005-10-08 21:34:59 +00:00
namespace Graphics {
extern void initfonts ( ) ;
}
# endif
2005-05-10 22:56:25 +00:00
using Common : : File ;
2003-10-03 18:33:57 +00:00
namespace Scumm {
2002-08-18 17:48:18 +00:00
// Use g_scumm from error() ONLY
2003-10-02 22:42:03 +00:00
ScummEngine * g_scumm = 0 ;
2002-08-18 17:48:18 +00:00
2006-02-12 20:51:56 +00:00
/**
2006-02-19 18:32:48 +00:00
* This table contains all game IDs supported by the SCUMM engine , and maps
* them to the full humand readable game name .
2006-02-12 20:51:56 +00:00
*/
2006-02-18 11:15:37 +00:00
static const GameSettings gameDescriptions [ ] = {
2006-02-12 20:51:56 +00:00
{ " atlantis " , " Indiana Jones and the Fate of Atlantis " } ,
{ " indy3 " , " Indiana Jones and the Last Crusade " } ,
{ " loom " , " Loom " } ,
{ " maniac " , " Maniac Mansion " } ,
{ " monkey " , " The Secret of Monkey Island " } ,
{ " monkey2 " , " Monkey Island 2: LeChuck's Revenge " } ,
{ " pass " , " Passport to Adventure " } ,
{ " samnmax " , " Sam & Max Hit the Road " } ,
{ " tentacle " , " Day of the Tentacle " } ,
{ " zak " , " Zak McKracken and the Alien Mindbenders " } ,
# ifndef DISABLE_SCUMM_7_8
{ " ft " , " Full Throttle " } ,
{ " dig " , " The Dig " } ,
{ " comi " , " The Curse of Monkey Island " } ,
# endif
2006-02-12 21:41:09 +00:00
{ " fbear " , " Fatty Bear's Birthday Surprise " } ,
{ " fbpack " , " Fatty Bear's Fun Pack " } ,
{ " funpack " , " Putt-Putt's Fun Pack " } ,
{ " puttmoon " , " Putt-Putt Goes to the Moon " } ,
{ " puttputt " , " Putt-Putt Joins the Parade " } ,
2006-02-12 20:51:56 +00:00
# ifndef DISABLE_HE
{ " activity " , " Putt-Putt & Fatty Bear's Activity Pack " } ,
{ " airport " , " Let's Explore the Airport with Buzzy " } ,
{ " artdemo " , " Blue's Art Time Activities (Demo) " } ,
{ " balloon " , " Putt-Putt and Pep's Balloon-O-Rama " } ,
{ " baseball " , " Backyard Baseball " } ,
{ " baseball2001 " , " Backyard Baseball 2001 " } ,
{ " Baseball2003 " , " Backyard Baseball 2003 " } ,
{ " basketball " , " Backyard Basketball " } ,
{ " BluesABCTimeDemo " , " Blue's ABC Time (Demo) " } ,
{ " BluesBirthdayDemo " , " Blue's Birthday Adventure (Demo) " } ,
{ " catalog " , " Humongous Interactive Catalog " } ,
2006-02-14 06:57:42 +00:00
{ " chase " , " SPY Fox in Cheese Chase " } ,
2006-02-12 20:51:56 +00:00
{ " dog " , " Putt-Putt and Pep's Dog on a Stick " } ,
{ " farm " , " Let's Explore the Farm with Buzzy " } ,
{ " football " , " Backyard Football " } ,
{ " freddi " , " Freddi Fish 1: The Case of the Missing Kelp Seeds " } ,
{ " freddi2 " , " Freddi Fish 2: The Case of the Haunted Schoolhouse " } ,
{ " freddi3 " , " Freddi Fish 3: The Case of the Stolen Conch Shell " } ,
{ " freddi4 " , " Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch " } ,
{ " freddicove " , " Freddi Fish 5: The Case of the Creature of Coral Cave " } ,
{ " FreddisFunShop " , " Freddi Fish's One-Stop Fun Shop " } ,
{ " jungle " , " Let's Explore the Jungle with Buzzy " } ,
{ " lost " , " Pajama Sam's Lost & Found " } ,
{ " maze " , " Freddi Fish and Luther's Maze Madness " } ,
2006-02-14 06:57:42 +00:00
{ " mustard " , " SPY Fox in Hold the Mustard " } ,
2006-02-12 20:51:56 +00:00
{ " pajama " , " Pajama Sam 1: No Need to Hide When It's Dark Outside " } ,
{ " pajama2 " , " Pajama Sam 2: Thunder and Lightning Aren't so Frightening " } ,
{ " pajama3 " , " Pajama Sam 3: You Are What You Eat From Your Head to Your Feet " } ,
{ " pjgames " , " Pajama Sam: Games to Play On Any Day " } ,
{ " puttcircus " , " Putt-Putt Joins the Circus " } ,
{ " puttrace " , " Putt-Putt Enters the Race " } ,
{ " PuttsFunShop " , " Putt-Putt's One-Stop Fun Shop " } ,
{ " putttime " , " Putt-Putt Travels Through Time " } ,
{ " puttzoo " , " Putt-Putt Saves the Zoo " } ,
{ " readdemo " , " Blue's Reading Time Activities (Demo) " } ,
{ " SamsFunShop " , " Pajama Sam's One-Stop Fun Shop " } ,
{ " soccer " , " Backyard Soccer " } ,
{ " Soccer2004 " , " Backyard Soccer 2004 " } ,
{ " SoccerMLS " , " Backyard Soccer MLS Edition " } ,
{ " socks " , " Pajama Sam's Sock Works " } ,
2006-02-14 06:57:42 +00:00
{ " spyfox " , " SPY Fox 1: Dry Cereal " } ,
{ " spyfox2 " , " SPY Fox 2: Some Assembly Required " } ,
{ " spyozon " , " SPY Fox 3: Operation Ozone " } ,
2006-02-12 20:51:56 +00:00
{ " thinker1 " , " Big Thinkers First Grade " } ,
{ " thinkerk " , " Big Thinkers Kindergarten " } ,
{ " water " , " Freddi Fish and Luther's Water Worries " } ,
# endif
{ 0 , 0 }
} ;
static const char * findDescriptionFromGameID ( const char * gameid ) {
2006-02-18 11:15:37 +00:00
const GameSettings * g = gameDescriptions ;
2006-02-12 20:51:56 +00:00
while ( g - > gameid ) {
if ( ! strcmp ( g - > gameid , gameid ) ) {
return g - > description ;
}
g + + ;
}
error ( " Unknown gameid encountered in findDescriptionFromGameID " ) ;
}
2006-02-20 16:35:37 +00:00
GameSettings toGameSettings ( const ScummGameSettings & g ) {
GameSettings dummy = { g . gameid , findDescriptionFromGameID ( g . gameid ) } ;
return dummy ;
}
2003-10-28 17:07:25 +00:00
2005-01-05 01:26:57 +00:00
enum {
// We only compute the MD5 of the first megabyte of our data files.
kMD5FileSizeLimit = 1024 * 1024
} ;
2006-02-18 11:15:37 +00:00
struct ObsoleteGameID {
2005-09-04 12:42:19 +00:00
const char * from ;
const char * to ;
2005-10-14 10:27:24 +00:00
Common : : Platform platform ;
2005-09-04 12:42:19 +00:00
} ;
2005-10-14 10:27:24 +00:00
static const Common : : Platform UNK = Common : : kPlatformUnknown ;
/**
2006-01-21 13:01:20 +00:00
* Conversion table mapping old obsolete game IDs to the
* corresponding new game ID and platform combination .
2005-10-14 10:27:24 +00:00
*
* We use an ugly macro ' UNK ' here to make the following table more readable .
*/
2006-02-18 11:15:37 +00:00
static const ObsoleteGameID obsoleteGameIDsTable [ ] = {
2005-10-14 10:27:24 +00:00
{ " comidemo " , " comi " , UNK } ,
{ " digdemo " , " dig " , UNK } ,
{ " digdemoMac " , " dig " , Common : : kPlatformMacintosh } ,
{ " dottdemo " , " tentacle " , UNK } ,
{ " fate " , " atlantis " , UNK } ,
{ " ftMac " , " ft " , Common : : kPlatformMacintosh } ,
{ " ftpcdemo " , " ft " , UNK } ,
{ " ftdemo " , " ft " , Common : : kPlatformMacintosh } ,
{ " game " , " monkey " , UNK } ,
{ " indy3ega " , " indy3 " , UNK } ,
{ " indy3towns " , " indy3 " , Common : : kPlatformFMTowns } ,
{ " indy4 " , " atlantis " , Common : : kPlatformFMTowns } ,
{ " indydemo " , " atlantis " , Common : : kPlatformFMTowns } ,
{ " loomcd " , " loom " , UNK } ,
{ " loomTowns " , " loom " , Common : : kPlatformFMTowns } ,
{ " mi2demo " , " monkey2 " , UNK } ,
{ " monkey1 " , " monkey " , UNK } ,
{ " monkeyEGA " , " monkey " , UNK } ,
{ " monkeyVGA " , " monkey " , UNK } ,
{ " playfate " , " atlantis " , UNK } ,
{ " samnmax-alt " , " samnmax " , UNK } ,
{ " samnmaxMac " , " samnmax " , Common : : kPlatformMacintosh } ,
{ " samdemo " , " samnmax " , UNK } ,
{ " samdemoMac " , " samnmax " , Common : : kPlatformMacintosh } ,
{ " snmdemo " , " samnmax " , UNK } ,
{ " snmidemo " , " samnmax " , UNK } ,
{ " tentacleMac " , " tentacle " , Common : : kPlatformMacintosh } ,
{ " zakTowns " , " zak " , Common : : kPlatformFMTowns } ,
{ NULL , NULL , UNK }
2005-09-04 12:42:19 +00:00
} ;
2003-10-28 17:07:25 +00:00
static const ScummGameSettings scumm_settings [ ] = {
2003-03-01 22:04:48 +00:00
/* Scumm Version 1 */
/* Scumm Version 2 */
2003-06-06 10:47:12 +00:00
2006-02-12 20:51:56 +00:00
{ " maniac " , 0 , GID_MANIAC , 2 , 0 , MDT_PCSPK ,
2005-10-28 11:41:07 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " zak " , 0 , GID_ZAK , 2 , 0 , MDT_PCSPK ,
2005-10-28 11:41:07 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
/* Scumm Version 3 */
2006-02-12 20:51:56 +00:00
{ " indy3 " , 0 , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-10-28 11:41:07 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " loom " , 0 , GID_LOOM , 3 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
/* Scumm Version 4 */
2006-02-12 20:51:56 +00:00
{ " pass " , 0 , GID_PASS , 4 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
2005-04-10 16:54:16 +00:00
/* Scumm version 5, small header -- we treat these as V4 games, since internally
they really are much closer to the V4 games than to all other V5 games . */
2006-02-12 20:51:56 +00:00
{ " monkey " , 0 , GID_MONKEY_VGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_SMALL_HEADER | GF_USE_KEY , Common : : kPlatformPC } ,
2005-04-10 16:54:16 +00:00
/* Scumm version 5 */
2006-02-12 20:51:56 +00:00
{ " monkey2 " , 0 , GID_MONKEY2 , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY , Common : : kPlatformPC } ,
2004-02-07 17:23:31 +00:00
2006-02-12 20:51:56 +00:00
{ " atlantis " , 0 , GID_INDY4 , 5 , 0 , MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
/* Scumm Version 6 */
2006-02-12 20:51:56 +00:00
{ " tentacle " , 0 , GID_TENTACLE , 6 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY , Common : : kPlatformPC } ,
2003-06-15 01:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " samnmax " , 0 , GID_SAMNMAX , 6 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
2005-12-30 14:18:21 +00:00
// {"test", "Test demo game", GID_SAMNMAX, 6, 0, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI, GF_NEW_OPCODES, Common::kPlatformUnknown},
2003-03-01 22:04:48 +00:00
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2003-03-01 22:04:48 +00:00
/* Scumm Version 7 */
2006-02-12 20:51:56 +00:00
{ " ft " , 0 , GID_FT , 7 , 0 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , Common : : kPlatformPC } ,
2003-11-18 02:20:12 +00:00
2006-02-12 20:51:56 +00:00
{ " dig " , 0 , GID_DIG , 7 , 0 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , Common : : kPlatformPC } ,
2003-03-01 22:04:48 +00:00
/* Scumm Version 8 */
2006-02-12 20:51:56 +00:00
{ " comi " , 0 , GID_CMI , 8 , 0 , MDT_NONE ,
2006-02-18 00:12:36 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , Common : : kPlatformWindows } ,
2005-05-14 22:56:41 +00:00
2004-03-23 01:59:02 +00:00
# endif
2003-11-17 21:16:43 +00:00
2004-03-23 03:33:23 +00:00
// Humongous Entertainment Scumm Version 6
2006-02-12 20:51:56 +00:00
{ " puttputt " , 0 , GID_HEGAME , 6 , 61 , MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " puttmoon " , 0 , GID_HEGAME , 6 , 61 , MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " funpack " , 0 , GID_FUNPACK , 6 , 61 , MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " fbpack " , 0 , GID_HEGAME , 6 , 61 , MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " fbear " , 0 , GID_FBEAR , 6 , 61 , MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
2004-03-23 03:33:23 +00:00
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-12 20:51:56 +00:00
{ " activity " , 0 , GID_HEGAME , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-22 00:03:25 +00:00
2005-01-30 01:07:22 +00:00
// Humongous Entertainment Scumm Version 7.1
// The first version to use 640x480 resolution
2005-10-28 06:58:33 +00:00
// There are also 7.1 versions of freddemo, airdemo and farmdemo
2006-02-12 20:51:56 +00:00
{ " catalog " , 0 , GID_HEGAME , 6 , 71 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " freddi " , 0 , GID_HEGAME , 6 , 71 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2004-07-01 11:36:06 +00:00
// Humongous Entertainment Scumm Version 7.2
2006-02-12 20:51:56 +00:00
{ " airport " , 0 , GID_HEGAME , 6 , 72 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " puttzoo " , 0 , GID_HEGAME , 6 , 72 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2003-03-01 22:04:48 +00:00
2006-02-02 05:07:47 +00:00
// Changed o_getResourceSize to cover all resource types
2006-02-12 20:51:56 +00:00
{ " farm " , 0 , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " jungle " , 0 , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-10-28 06:58:33 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-07-30 21:11:48 +00:00
// Humongous Entertainment Scumm Version 8.0 ? Scummsrc.80
2006-02-12 20:51:56 +00:00
{ " freddi2 " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " pajama " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " putttime " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-11-05 22:24:26 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2004-08-31 07:32:53 +00:00
2006-02-12 20:51:56 +00:00
{ " balloon " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " dog " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " maze " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " socks " , 0 , GID_HEGAME , 6 , 80 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " water " , 0 , GID_WATER , 6 , 80 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2003-09-03 10:34:04 +00:00
2003-11-09 23:50:40 +00:00
// Humongous Entertainment Scumm Version 9.0 ? Scummsys.90
2006-02-12 20:51:56 +00:00
{ " baseball " , 0 , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 06:58:33 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " thinkerk " , 0 , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " thinker1 " , 0 , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " freddi3 " , 0 , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " spyfox " , 0 , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2003-09-03 10:34:04 +00:00
2003-11-09 23:50:40 +00:00
// Humongous Entertainment Scumm Version 9.5 ? Scummsys.95
2006-02-12 20:51:56 +00:00
{ " pajama2 " , 0 , GID_HEGAME , 6 , 95 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " chase " , 0 , GID_HEGAME , 6 , 95 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2003-09-28 16:26:06 +00:00
2003-11-09 23:50:40 +00:00
// Humongous Entertainment Scumm Version 9.8 ? Scummsys.98
// these and later games can easily be identified by the .(a) file instead of a .he1
2004-08-26 14:35:38 +00:00
// and INIB chunk in the .he0
2006-02-12 20:51:56 +00:00
{ " lost " , 0 , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " puttrace " , 0 , GID_PUTTRACE , 6 , 98 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " BluesABCTimeDemo " , 0 , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " soccer " , 0 , GID_SOCCER , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2004-03-02 04:05:40 +00:00
2004-09-17 05:43:37 +00:00
// Global scripts increased to 2048
2006-02-12 20:51:56 +00:00
{ " freddi4 " , 0 , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2004-09-17 05:43:37 +00:00
// Humongous Entertainment Scumm Version 9.9 ? Scummsys.99
2006-02-12 20:51:56 +00:00
{ " football " , 0 , GID_FOOTBALL , 6 , 99 , MDT_NONE ,
2005-10-28 06:58:33 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " pajama3 " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2006-02-02 05:07:47 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " puttcircus " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " spyfox2 " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " mustard " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2003-09-03 10:34:04 +00:00
2006-02-02 05:07:47 +00:00
// Added the use of fonts
2006-02-12 20:51:56 +00:00
{ " FreddisFunShop " , 0 , GID_FUNSHOP , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " SamsFunShop " , 0 , GID_FUNSHOP , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " PuttsFunShop " , 0 , GID_FUNSHOP , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED , Common : : kPlatformWindows } ,
2004-09-12 06:09:19 +00:00
2006-02-02 05:07:47 +00:00
// Added 16bit color
2006-02-12 20:51:56 +00:00
{ " baseball2001 " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " SoccerMLS " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2006-01-18 13:55:06 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " freddicove " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2006-02-19 19:21:52 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " spyozon " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2006-02-02 05:07:47 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2005-02-02 00:32:02 +00:00
2006-02-02 05:07:47 +00:00
// Restructured the Scumm engine
2006-02-12 20:51:56 +00:00
{ " pjgames " , 0 , GID_HEGAME , 6 , 100 , MDT_NONE ,
2006-02-02 05:13:39 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
// Uses bink in external files for logos
2006-02-12 20:51:56 +00:00
{ " Baseball2003 " , 0 , GID_HEGAME , 6 , 100 , MDT_NONE ,
2006-02-02 05:07:47 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " basketball " , 0 , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " Soccer2004 " , 0 , GID_HEGAME , 6 , 100 , MDT_NONE ,
2006-02-02 05:07:47 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2004-10-09 14:33:31 +00:00
2006-02-02 05:07:47 +00:00
// Uses smacker in external files, for testing only
2006-02-12 20:51:56 +00:00
{ " BluesBirthdayDemo " , 0 , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " artdemo " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " readdemo " , 0 , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2005-04-26 07:52:37 +00:00
2004-10-09 14:33:31 +00:00
2004-09-12 16:17:14 +00:00
# endif
2005-09-04 15:07:09 +00:00
{ NULL , NULL , 0 , 0 , 0 , MDT_NONE , 0 , Common : : kPlatformUnknown }
2003-03-01 22:04:48 +00:00
} ;
2006-02-19 18:32:48 +00:00
#if 0
// The following table is currently *unused*. It's work in progress for a refined detector;
// the purpose of this particular table is to replace multiple_versions_md5_settings,
// and maybe also scumm_settings.
static const ScummGameSettings extra_versions [ ] = {
2006-02-20 13:26:40 +00:00
// The C64 version of MM is detected via the platform field and hence has no seperate entry in this list
{ " maniac " , " " , GID_MANIAC , 2 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
{ " maniac " , " NES " , GID_MANIAC , 1 , 0 , MDT_NONE , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
{ " maniac " , " V1 " , GID_MANIAC , 1 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformPC } ,
2006-02-19 18:32:48 +00:00
2006-02-20 13:26:40 +00:00
// The C64 version of Zak is detected via the platform field and hence has no seperate entry in this list
{ " zak " , " " , GID_ZAK , 2 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
{ " zak " , " V1 " , GID_ZAK , 1 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformPC } ,
{ " zak " , " FM-TOWNS " , GID_ZAK , 3 , 0 , MDT_TOWNS , GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-19 18:32:48 +00:00
2006-02-20 13:26:40 +00:00
{ " indy3 " , " EGA " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
{ " indy3 " , " No Adlib " , GID_INDY3 , 3 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
2006-02-19 18:32:48 +00:00
{ " indy3 " , " VGA " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB , GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS , Common : : kPlatformPC } ,
{ " indy3 " , " FM-TOWNS " , GID_INDY3 , 3 , 0 , MDT_TOWNS , GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-20 13:26:40 +00:00
{ " loom " , " EGA " , GID_LOOM , 3 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
{ " loom " , " No Adlib " , GID_LOOM , 3 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , UNK } ,
2006-02-19 18:32:48 +00:00
{ " loom " , " FM-TOWNS " , GID_LOOM , 3 , 0 , MDT_TOWNS , GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
{ " loom " , " VGA " , GID_LOOM , 4 , 0 , MDT_NONE , GF_SMALL_HEADER | GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-20 13:26:40 +00:00
{ " pass " , 0 , GID_PASS , 4 , 0 , MDT_PCSPK | MDT_ADLIB , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-19 18:32:48 +00:00
{ " monkey " , " VGA " , GID_MONKEY_VGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI , GF_SMALL_HEADER | GF_USE_KEY , Common : : kPlatformPC } ,
{ " monkey " , " EGA " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
{ " monkey " , " No Adlib " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformAtariST } ,
{ " monkey " , " Demo " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB , GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-20 13:26:40 +00:00
{ " monkey " , " CD " , GID_MONKEY , 5 , 0 , MDT_ADLIB , GF_USE_KEY | GF_AUDIOTRACKS , UNK } ,
{ " monkey " , " CD " , GID_MONKEY , 5 , 0 , MDT_ADLIB , GF_USE_KEY | GF_AUDIOTRACKS , UNK } ,
2006-02-19 18:32:48 +00:00
{ " monkey " , " FM-TOWNS " , GID_MONKEY , 5 , 0 , MDT_ADLIB , GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
{ " monkey " , " SEGA " , GID_MONKEY , 5 , 0 , MDT_NONE , GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformSegaCD } ,
2006-02-20 13:26:40 +00:00
/* Scumm Version 5 */
{ " monkey2 " , 0 , GID_MONKEY2 , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI , GF_USE_KEY , Common : : kPlatformPC } ,
2006-02-19 18:32:48 +00:00
2006-02-20 13:26:40 +00:00
{ " atlantis " , 0 , GID_INDY4 , 5 , 0 , MDT_ADLIB | MDT_MIDI , GF_USE_KEY , Common : : kPlatformPC } ,
/* Scumm Version 6 */
{ " tentacle " , 0 , GID_TENTACLE , 6 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI , GF_USE_KEY , Common : : kPlatformPC } ,
{ " samnmax " , 0 , GID_SAMNMAX , 6 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI , GF_USE_KEY , Common : : kPlatformPC } ,
# ifndef DISABLE_SCUMM_7_8
/* Scumm Version 7 */
{ " ft " , " " , GID_FT , 7 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , UNK } ,
{ " ft " , " Demo " , GID_FT , 7 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , UNK } ,
{ " dig " , " " , GID_DIG , 7 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , UNK } ,
{ " dig " , " Demo " , GID_DIG , 7 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , UNK } ,
/* Scumm Version 8 */
{ " comi " , " " , GID_CMI , 8 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE , Common : : kPlatformWindows } ,
{ " comi " , " Demo " , GID_CMI , 8 , 0 , MDT_NONE , GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformWindows } ,
# endif
// TODO: Maybe the HE games (at least those which are using GID_HEGAME) should
// be using a seperate table: Most of them in the existing scumm_settings table
// could be realized by mapping to one of "HE NNN" entries found at the end
// of this table. This would both slightly reduce the executable's size as
// well as simplify maintanance.
// To do this, we could add an "alias" table that maps a game ID to another
// game/variant ID, but *only* internally (for purposes of setting up the
// version/heversion/features etc). In particular, no auto-upgrading of
// targets and no user visible differences to the current behavior.
2006-02-19 18:32:48 +00:00
2006-02-20 17:01:30 +00:00
{ " fbear " , " HE 61 " , GID_FBEAR , 6 , 61 , MDT_ADLIB | MDT_MIDI , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
{ " fbear " , " HE 70 " , GID_FBEAR , 6 , 70 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-19 18:32:48 +00:00
2006-02-20 13:26:40 +00:00
# ifndef DISABLE_HE
2006-02-19 18:32:48 +00:00
2006-02-20 17:01:30 +00:00
{ " water " , " HE 80 " , GID_WATER , 6 , 80 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
{ " water " , " HE 99 " , GID_WATER , 6 , 99 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-19 18:32:48 +00:00
2006-02-20 14:48:32 +00:00
{ " puttrace " , " HE 98 " , GID_PUTTRACE , 6 , 98 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
{ " puttrace " , " HE 98.5 " , GID_PUTTRACE , 6 , 98 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
{ " puttrace " , " HE 99 " , GID_PUTTRACE , 6 , 99 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-19 18:32:48 +00:00
2006-02-20 17:01:30 +00:00
{ " puttputt " , " HE 61 " , GID_HEGAME , 6 , 61 , MDT_ADLIB | MDT_MIDI , GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformPC } ,
{ " puttputt " , " HE 60 " , GID_HEGAME , 6 , 60 , MDT_ADLIB | MDT_MIDI , GF_USE_KEY , Common : : kPlatformWindows } ,
{ " puttputt " , " Demo " , GID_PUTTDEMO , 6 , 60 , MDT_ADLIB | MDT_MIDI , GF_USE_KEY , UNK } ,
2006-02-19 18:32:48 +00:00
2006-02-19 19:04:22 +00:00
{ " freddi4 " , " Unencrypted Russian " , GID_HEGAME , 6 , 98 , MDT_NONE , GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2006-02-19 18:32:48 +00:00
2006-02-19 19:04:22 +00:00
{ " freddicove " , " Updated Dutch " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } , // FreddiDZZ
{ " freddicove " , " Updated Russian " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
{ " freddicove " , " Unencrypted Russian " , GID_HEGAME , 6 , 99 , MDT_NONE , GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
{ " freddicove " , " Updated Demo " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
{ " freddicove " , " Updated Dutch Demo " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } , // FF5Demo
2006-02-19 18:32:48 +00:00
2006-02-19 19:04:22 +00:00
{ " lost " , " Test " , GID_HEGAME , 6 , 99 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS , Common : : kPlatformWindows } ,
{ " lost " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS , Common : : kPlatformWindows } ,
2006-02-19 18:32:48 +00:00
2006-02-19 19:04:22 +00:00
// The following are meant to be generic HE game variants and as such do not specify a game ID
2006-02-20 13:26:40 +00:00
{ " " , " HE 70 " , GID_HEGAME , 6 , 70 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 71 " , GID_HEGAME , 6 , 71 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 72 " , GID_HEGAME , 6 , 72 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 73 " , GID_HEGAME , 6 , 73 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 80 " , GID_HEGAME , 6 , 80 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 90 " , GID_HEGAME , 6 , 90 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 95 " , GID_HEGAME , 6 , 95 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 98 " , GID_HEGAME , 6 , 98 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 98.5 " , GID_HEGAME , 6 , 98 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , UNK } ,
{ " " , " HE 99 " , GID_HEGAME , 6 , 99 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
{ " " , " HE 100 " , GID_HEGAME , 6 , 100 , MDT_NONE , GF_USE_KEY | GF_NEW_COSTUMES , UNK } ,
2006-02-19 18:32:48 +00:00
# endif
2006-02-20 13:26:40 +00:00
{ NULL , NULL , 0 , 0 , MDT_NONE , 0 , 0 , UNK }
2006-02-19 18:32:48 +00:00
} ;
# endif
2005-10-28 11:41:07 +00:00
// This additional table is used for MD5-based search
2004-06-29 12:10:08 +00:00
//
// Use main table to specify default flags and this table to override defaults.
2005-02-11 04:17:24 +00:00
//
2005-04-11 04:02:48 +00:00
// Please, add new entries sorted alpabetically by string name
2005-02-11 03:45:10 +00:00
static const ScummGameSettings multiple_versions_md5_settings [ ] = {
2005-10-08 21:34:59 +00:00
# ifndef PALMOS_68K
2006-02-12 20:51:56 +00:00
{ " 2e85f7aa054930c692a5b1bed1dfc295 " , " Demo Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformUnknown } , // Football2002
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 037385a953789190298494d92b89b3d0 " , " Updated " , GID_HEGAME , 6 , 72 , MDT_NONE ,
2005-10-28 06:58:33 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 8fec68383202d38c0d25e9e3b757c5df " , " Demo " , GID_CMI , 8 , 0 , MDT_NONE ,
2006-02-18 00:12:36 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformWindows } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 362c1d281fb9899254cda66ad246c66a " , " Demo " , GID_DIG , 7 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " cd9c05e755d7bf8e9b9590ad1ebe273e " , " Demo Mac " , GID_DIG , 7 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformMacintosh } ,
2005-09-04 13:17:51 +00:00
2006-02-12 20:51:56 +00:00
{ " 179879b6e35c1ead0d93aab26db0951b " , " Windows " , GID_FBEAR , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 22c9eb04455440131ffc157aeb8d40a8 " , " Windows Demo " , GID_FBEAR , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " cf8ef3a1fb483c5c4b1c584d1167b2c4 " , " Updated German " , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-11-04 22:31:13 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " df047cc4792150f601290357566d36a6 " , " Updated " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 746e88c172a5b7a1ae89ac0ee3ee681a " , " Updated Russian " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 507bb360688dc4180fdf0d7597352a69 " , " Updated Swedish " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-11-02 15:58:13 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 0855496dde35356b1a9691e22ba84cdc " , " Demo " , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 566165a7338fa11029e7c14d94fa70d0 " , " Demo " , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-12-19 00:47:01 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " cf4ef315214c7d8cdab6302cdb7e50db " , " German Demo " , GID_HEGAME , 6 , 73 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " c8aac5e3e701874e2fa4117896f9e1b1 " , " Macintosh Demo " , GID_HEGAME , 6 , 73 , MDT_NONE ,
2006-02-12 15:40:38 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformMacintosh } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 8ee63cafb1fe9d62aa0d5a23117e70e7 " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // FreddiCHSH
2006-02-12 20:51:56 +00:00
{ " 51305e929e330e24a75a0351c8f9975e " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " e41de1c2a15abbcdbf9977e2d7e8a340 " , " Updated Russian " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // FreddiCHSH
2006-02-12 20:51:56 +00:00
{ " d37c55388294b66e53e7ced3af88fa68 " , " Demo Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // FFHSDemo
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 83cedbe26aa8b58988e984e3d34cac8e " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-07 21:31:44 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 75bff95816b84672b877d22a911ab811 " , " Updated Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " ed2b074bc3166087a747acb2a3c6abb0 " , " Updated German Demo " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2006-01-14 05:06:01 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } , // Fritzi3demo
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 07b810e37be7489263f7bc7627d4765d " , " Unencrypted Russian " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " b5298a5c15ffbe8b381d51ea4e26d35c " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-07 13:03:20 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 78bd5f036ea35a878b74e4f47941f784 " , " Updated Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 16effd200aa6b8abe9c569c3e578814d " , " Updated Dutch Demo " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // ff4demo
2006-02-12 20:51:56 +00:00
{ " 499c958affc394f2a3868f1eb568c3ee " , " Updated Dutch Demo " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // ff4demo
2006-02-12 20:51:56 +00:00
{ " ebd324dcf06a4c49e1ba5c231eee1060 " , " Updated Demo " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " e03ed1474ec14de78359970e0457a820 " , " Updated Demo " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-14 17:00:17 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 688328c5bdc4c8ec4145688dfa077bf2 " , " German Demo " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-19 04:07:47 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // Ff4demo
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " b8955d7d23b4972229060d1592489fef " , " Updated Dutch " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-10-15 11:03:32 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } , // FreddiDZZ
2006-02-12 20:51:56 +00:00
{ " 4ce2d5b355964bbcb5e5ce73236ef868 " , " Updated Russian " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-10-15 11:03:32 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 21abe302e1b1e2b66d6f5c12e241ebfd " , " Unencrypted Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-10-15 11:03:32 +00:00
GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 45082a5c9f42ba14dacfe1fdeeba819d " , " Updated Demo " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-10-15 11:03:32 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 6b257bb2827dd894b8109a50a1a18b5a " , " Updated Dutch Demo " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-10-21 04:42:14 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR , Common : : kPlatformWindows } , // FF5Demo
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 4dbff3787aedcd96b0b325f2d92d7ad9 " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " f1b0e0d587b85052de5534a3847e68fe " , " Updated " , GID_WATER , 6 , 99 , MDT_NONE ,
2005-12-01 22:51:43 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 9d7b67be003fea60be4dcbd193611936 " , " Mac Demo " , GID_FT , 7 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformMacintosh } ,
2006-02-12 20:51:56 +00:00
{ " 32a433dea56b86a55b59e4ff7d755711 " , " PC Demo " , GID_FT , 7 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO , Common : : kPlatformPC } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 157367c3c21e0d03a0cba44361b4cf65 " , " AtariST " , GID_INDY3 , 3 , 0 , MDT_PCSPK ,
2005-09-04 23:08:04 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 0f9c7a76657f0840b8f7ccb5bffeb9f4 " , " AtariST Fr " , GID_INDY3 , 3 , 0 , MDT_PCSPK ,
2005-09-04 23:08:04 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 1dd7aa088e09f96d06818aa9a9deabe0 " , " Macintosh " , GID_INDY3 , 3 , 0 , MDT_PCSPK ,
2005-09-04 23:08:04 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformMacintosh } ,
2006-02-12 20:51:56 +00:00
{ " 1875b90fade138c9253a8e967007031a " , " VGA " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 399b217b0c8d65d0398076da486363a9 " , " VGA De " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 17b5d5e6af4ae89d62631641d66d5a05 " , " VGA It " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 3cce1913a3bc586b51a75c3892ff18dd " , " VGA Ru " , GID_INDY3 , 3 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-11 14:51:36 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS , Common : : kPlatformPC } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 04687cdf7f975a89d2474929f7b80946 " , " FM-TOWNS " , GID_INDY3 , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " 3a0c35f3c147b98a2bdf8d400cfc4ab5 " , " FM-TOWNS Jp " , GID_INDY3 , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 86c9902b7bec1a17926d4dae85beaa45 " , " Demo " , GID_HEGAME , 6 , 71 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-10-28 06:58:33 +00:00
2006-02-12 20:51:56 +00:00
{ " bf8b52fdd9a69c67f34e8e9fec72661c " , " Demo " , GID_HEGAME , 6 , 71 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 8d479e36f35e80257dfc102cf4b8a912 " , " Updated Demo " , GID_HEGAME , 6 , 72 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 0557df19f046a84c2fdc63507c6616cb " , " Updated Dutch Demo " , GID_HEGAME , 6 , 72 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " a0a7dea72003933b8b3f8b99b9f7ddeb " , " AtariST " , GID_LOOM , 3 , 0 , MDT_PCSPK ,
2005-10-05 13:10:59 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " c24c490373aeb48fbd54caa8e7ae376d " , " AtariST De " , GID_LOOM , 3 , 0 , MDT_PCSPK ,
2005-09-04 23:08:04 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 0e9b01430e31d9fcd94071d433bbc6bf " , " AtariST Fr " , GID_LOOM , 3 , 0 , MDT_PCSPK ,
2005-10-05 13:10:59 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 6f0be328c64d689bb606d22a389e1b0f " , " Macintosh " , GID_LOOM , 3 , 0 , MDT_PCSPK ,
2005-09-04 23:08:04 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE , Common : : kPlatformMacintosh } ,
2006-02-12 20:51:56 +00:00
{ " 5d88b9d6a88e6f8e90cded9d01b7f082 " , " 256 color CD version " , GID_LOOM , 4 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " c5d10e190d4b4d59114b824f2fdbd00e " , " FM-TOWNS " , GID_LOOM , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " 31b8fda4c8c7413fa6b39997e776eba4 " , " FM-TOWNS Jp " , GID_LOOM , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 3905799e081b80a61d4460b7b733c206 " , " NES E " , GID_MANIAC , 1 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
2006-02-12 20:51:56 +00:00
{ " 81bbfa181184cb494e7a81dcfa94fbd9 " , " NES F " , GID_MANIAC , 1 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
2006-02-12 20:51:56 +00:00
{ " 257f8c14d8c584f7ddd601bcb00920c7 " , " NES G " , GID_MANIAC , 1 , 0 , MDT_NONE ,
2006-01-18 16:12:44 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
2006-02-12 20:51:56 +00:00
{ " 22d07d6c386c9c25aca5dac2a0c0d94b " , " NES SW " , GID_MANIAC , 1 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
2006-02-12 20:51:56 +00:00
{ " d8d07efcb88f396bee0b402b10c3b1c9 " , " NES U " , GID_MANIAC , 1 , 0 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformNES } ,
2006-02-12 20:51:56 +00:00
{ " 7f45ddd6dbfbf8f80c0c0efea4c295bc " , " v1 " , GID_MANIAC , 1 , 0 , MDT_PCSPK ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformPC } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 898eaa21f79cf8d4f08db856244689ff " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-27 01:32:29 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " a095e33061606d231ff37dca4c64c8ac " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2006-01-14 04:07:24 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // PYJAMA
2006-02-12 20:51:56 +00:00
{ " 37aed3f91c1ef959e0bd265f9b13781f " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // PajamaNHD
2006-02-12 20:51:56 +00:00
{ " d7ab7cd6105546016e6a0d46fb36b964 " , " Updated Demo " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // PJSamDemo
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 30ba1e825d4ad2b448143ae8df18482a " , " Updated Dutch Demo " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } , // Pjs2demo
2006-02-12 20:51:56 +00:00
{ " 32709cbeeb3044b34129950860a83f14 " , " Updated Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // PajamaTAL
2006-02-12 20:51:56 +00:00
{ " c6907d44f1166941d982864cd42cdc89 " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // PyjamaDBMN
2006-02-12 20:51:56 +00:00
{ " 4521138d15d1fd7649c31fb981746231 " , " Updated German Demo " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2006-01-14 05:06:01 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } , // PJP2DEMO
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " a2bb6aa0537402c1b3c2ea899ccef64b " , " Test " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-24 02:06:38 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " a561d2e2413cc1c71d5a1bf87bf493ea " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 055ffe4f47753e47594ac67823220c54 " , " German " , GID_PUTTRACE , 6 , 99 , MDT_NONE ,
2006-02-20 14:44:44 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // ToffRennen
2006-02-12 20:51:56 +00:00
{ " 6af2419fe3db5c2fdb091ae4e5833770 " , " Dutch Demo " , GID_PUTTRACE , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } , // 500demo
2006-02-12 20:51:56 +00:00
{ " aaa587701cde7e74692c68c1024b85eb " , " Updated Dutch Demo " , GID_PUTTRACE , 6 , 99 , MDT_NONE ,
2006-02-20 14:44:44 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 663743c03ae0c007f3d665cf631c0e6b " , " German Demo " , GID_PUTTRACE , 6 , 99 , MDT_NONE ,
2006-02-20 14:44:44 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // Rennen
2006-02-12 20:51:56 +00:00
{ " 7c8100e360e8ef05f88069d4cfa0afd1 " , " UK Demo " , GID_PUTTRACE , 6 , 99 , MDT_NONE ,
2006-02-20 14:44:44 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 9c92eeaf517a31b7221ec2546ab669fd " , " Windows " , GID_HEGAME , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 9c143c5905055d5df7a0f014ab379aee " , " Windows Demo " , GID_HEGAME , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 0b3222aaa7efcf283eb621e0cefd26cc " , " Russian " , GID_HEGAME , 6 , 60 , MDT_ADLIB | MDT_MIDI ,
2005-10-27 06:51:42 +00:00
GF_USE_KEY , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 31aa57f460a3d12429f0552a46a90b39 " , " Demo " , GID_PUTTDEMO , 6 , 60 , MDT_ADLIB | MDT_MIDI ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " f40a7f495f59188ca57a9d1d50301bb6 " , " Macintosh Demo " , GID_PUTTDEMO , 6 , 60 , MDT_ADLIB | MDT_MIDI ,
2006-02-12 15:40:38 +00:00
GF_USE_KEY , Common : : kPlatformMacintosh } ,
2006-02-12 20:51:56 +00:00
{ " 6a30a07f353a75cdc602db27d73e1b42 " , " Windows " , GID_HEGAME , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 37ff1b308999c4cca7319edfcc1280a0 " , " Windows Demo " , GID_HEGAME , 6 , 70 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 92e7727e67f5cd979d8a1070e4eb8cb3 " , " Updated " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 2108d83dcf09f8adb4bc524669c8cf51 " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " d4aac997e2f4e15341f0bfbf905419bd " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 7c980a1b1596a93f26917318884f48f7 " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-22 23:03:31 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " defb8cb9ec4b0f91acfb6b61c6129ad9 " , " Updated Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-11-03 22:38:10 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " a525c1753c1db5011c00417da37887ef " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " fcb78ebecab2757264c590890c319cc5 " , " Updated Dutch " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 4e5867848ee61bc30d157e2c94eee9b4 " , " Demo " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 6b19d0e25cbf720d05822379b8b90ed9 " , " Dutch Demo " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 59d5cfcc5e672a6e07baae01328b918b " , " French Demo " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2005-10-28 11:41:07 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // TEMPDEMO
2006-02-12 20:51:56 +00:00
{ " fbb697d89d2beca87360a145f467bdae " , " Updated German Demo " , GID_HEGAME , 6 , 90 , MDT_NONE ,
2006-01-17 12:43:25 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // ZEITDEMO
2006-02-12 20:51:56 +00:00
{ " 0ab19be9e2a3f6938226638b2a3744fe " , " Updated Demo " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-11-04 22:31:13 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " d7b247c26bf1f01f8f7daf142be84de3 " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 8e3241ddd6c8dadf64305e8740d45e13 " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-11-16 03:57:17 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " d4b8ee426b1afd3e53bc0cf020418cf6 " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 1d05cd189e4908f79b57e78a4402f292 " , " EGA " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 49210e124e4c2b30f1290a9ef6306301 " , " EGA " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " e98b982ceaf9d253d730bde8903233d6 " , " EGA De " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-11-07 07:00:52 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " fc6b6148e80d67939d9a18697c0f626a " , " EGA De " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " ce6a4cef315b20fef58a95bc40a2d8d3 " , " EGA Fr " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " aa7a07d94ae853f6460be4ce0a1bf530 " , " EGA Fr " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 1dd3c11ea4439adfe681e4e405b624e1 " , " EGA Fr " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 477dbafbd66a53c98416dc01aef019ad " , " EGA It " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 910e31cffb28226bd68c569668a0d6b4 " , " EGA Sp " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB | MDT_MIDI ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " c666a998af90d81db447eccba9f72c8d " , " Atari " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK ,
2005-10-05 13:10:59 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 927a764615c7fcdd72f591355e089d8c " , " Atari De " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK ,
2005-09-11 20:31:17 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 9e5e0fb43bd22f4628719b7501adb717 " , " Atari Fr " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 0a41311d462b6639fc45297b9044bf16 " , " Atari Sp " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK ,
2005-09-11 20:31:17 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformAtariST } ,
2006-02-12 20:51:56 +00:00
{ " 71523b539491527d9860f4407faf0411 " , " Demo " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 771bc18ec6f93837b839c992b211904b " , " Demo De " , GID_MONKEY_EGA , 4 , 0 , MDT_PCSPK | MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR , Common : : kPlatformPC } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 2d1e891fe52df707c30185e52c50cd92 " , " CD " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 305d3dd57c96c65b017bc70c8c7cfb5e " , " CD De " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " f049e38c1f8302b5db6170f1872af89a " , " CD Sp " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " da6269b18fcb08189c0aa9c95533cce2 " , " CD It " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " aa8a0cb65f3afbbe2c14c3f9f92775a3 " , " CD Fr " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 2ccd8891ce4d3f1a334d21bff6a88ca2 " , " Mac CD " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformMacintosh } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 8eb84cee9b429314c7f0bdcf560723eb " , " FM-TOWNS " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-13 23:11:44 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " e17db1ddf91b39ca6bbc8ad3ed19e883 " , " FM-TOWNS Jp " , GID_MONKEY , 5 , 0 , /*MDT_PCSPK |*/ MDT_ADLIB ,
2005-09-13 23:11:44 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " c13225cb1bbd3bc9fe578301696d8021 " , " SegaCD " , GID_MONKEY , 5 , 0 , MDT_NONE ,
2006-01-14 09:28:38 +00:00
GF_USE_KEY | GF_AUDIOTRACKS , Common : : kPlatformSegaCD } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 3de99ef0523f8ca7958faa3afccd035a " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 58436e634f4fae1d9973591c2ffa1fcb " , " Updated " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-12-01 22:51:43 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 9bda5fee51d2fda5253d02c642016bf4 " , " Updated Dutch " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " a28135a7ade38cc0208b04507c46efd1 " , " Updated German " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 72ac6bc980d5101c2142189d746bd62f " , " Updated Russian " , GID_HEGAME , 6 , 99 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } , // SPYFoxDC
2006-02-12 20:51:56 +00:00
{ " 9d4ab3e0e1d1ebc6ba8a6a4c470ed184 " , " Updated Demo " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2006-02-12 20:51:56 +00:00
{ " 4edbf9d03550f7ba01e7f34d69b678dd " , " Updated Dutch Demo " , GID_HEGAME , 6 , 98 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " 90c755e1c9b9b8a4129d37b2259d0655 " , " Updated " , GID_HEGAME , 6 , 100 , MDT_NONE ,
2005-09-04 15:07:09 +00:00
GF_USE_KEY | GF_NEW_COSTUMES , Common : : kPlatformWindows } ,
2005-04-11 04:02:48 +00:00
2006-02-12 20:51:56 +00:00
{ " b23f7cd7c304d7dff08e92a96120d5b4 " , " v1 " , GID_ZAK , 1 , 0 , MDT_PCSPK ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformPC } ,
2006-02-12 20:51:56 +00:00
{ " 7020931d5a2be0a49d68e7a1882363e4 " , " v1 " , GID_ZAK , 1 , 0 , MDT_PCSPK ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING , Common : : kPlatformPC } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 2d4536a56e01da4b02eb021e7770afa2 " , " FM-TOWNS " , GID_ZAK , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " 1ca86e2cf9aaa2068738a1e5ba477e60 " , " FM-TOWNS Jp " , GID_ZAK , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2005-09-04 12:42:19 +00:00
2006-02-12 20:51:56 +00:00
{ " 2d388339d6050d8ccaa757b64633954e " , " FM-TOWNS " , GID_ZAK , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " 77f5c9cc0986eb729c1a6b4c8823bbae " , " FM-TOWNS " , GID_ZAK , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2006-02-12 20:51:56 +00:00
{ " 3938ee1aa4433fca9d9308c9891172b1 " , " FM-TOWNS " , GID_ZAK , 3 , 0 , MDT_TOWNS ,
2005-09-04 15:07:09 +00:00
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS , Common : : kPlatformFMTowns } ,
2005-03-11 10:46:28 +00:00
# endif
2005-09-04 15:07:09 +00:00
{ NULL , NULL , 0 , 0 , MDT_NONE , 0 , 0 , Common : : kPlatformUnknown }
2004-06-29 12:10:08 +00:00
} ;
2005-02-25 10:00:06 +00:00
static SubstResFileNames substResFileNameTable [ ] = {
2005-09-13 17:31:06 +00:00
{ " Intentionally/left/blank " , " " , kGenMacNoParens } ,
2005-03-30 23:25:49 +00:00
{ " 00.LFL " , " Maniac Mansion (E).prg " , kGenAsIs } ,
{ " 00.LFL " , " Maniac Mansion (F).prg " , kGenAsIs } ,
{ " 00.LFL " , " Maniac Mansion (SW).prg " , kGenAsIs } ,
{ " 00.LFL " , " Maniac Mansion (U).prg " , kGenAsIs } ,
2006-01-18 16:12:44 +00:00
{ " 00.LFL " , " Maniac Mansion (G).prg " , kGenAsIs } ,
2005-06-19 18:16:27 +00:00
{ " 00.LFL " , " maniac1.d64 " , kGenAsIs } , // Do not
{ " 01.LFL " , " maniac2.d64 " , kGenAsIs } , // swap
{ " 00.LFL " , " zak1.d64 " , kGenAsIs } , // these
{ " 01.LFL " , " zak2.d64 " , kGenAsIs } , // lines
2005-11-17 13:20:09 +00:00
{ " atlantis.000 " , " Fate of Atlantis Data " , kGenAsIs } ,
2005-09-13 17:31:06 +00:00
{ " atlantis " , " fate " , kGenPC } ,
{ " atlantis " , " playfate " , kGenPC } ,
{ " atlantis " , " indy4 " , kGenPC } ,
{ " atlantis " , " indydemo " , kGenPC } ,
2006-01-06 14:03:41 +00:00
{ " tentacle.000 " , " Day of the Tentacle Data " , kGenAsIs } ,
2005-10-12 19:45:35 +00:00
{ " tentacle " , " dottdemo " , kGenPC } ,
{ " tentacle.000 " , " Day of the Tentacle Demo Data " , kGenAsIs } ,
{ " monkey " , " monkey1 " , kGenPC } ,
{ " monkey " , " monkeyk " , kGenPC } , // FM-TOWNS Jap
{ " monkey " , " game " , kGenPC } , // SegaCD
{ " monkey2 " , " mi2demo " , kGenPC } ,
{ " samnmax.000 " , " Sam & Max Data " , kGenAsIs } ,
{ " samnmax.000 " , " Sam & Max Demo Data " , kGenAsIs } ,
{ " samnmax " , " ramnmax " , kGenPC } , // Used in some releases of Russian Sam'n'Max
{ " samnmax " , " samdemo " , kGenPC } ,
{ " samnmax " , " snmdemo " , kGenPC } ,
{ " samnmax " , " snmidemo " , kGenPC } ,
2005-11-30 22:49:21 +00:00
{ " samnmax " , " sdemo " , kGenPC } ,
2005-10-12 19:45:35 +00:00
# ifndef DISABLE_SCUMM_7_8
{ " dig.la0 " , " The Dig Data " , kGenAsIs } ,
{ " dig.la0 " , " The Dig Demo Data " , kGenAsIs } ,
{ " ft.la0 " , " Full Throttle Data " , kGenAsIs } ,
2005-11-18 06:50:28 +00:00
{ " ft.la0 " , " Full Throttle Demo Data " , kGenAsIs } ,
2005-10-12 19:45:35 +00:00
{ " ft.la0 " , " Vollgas Data " , kGenAsIs } ,
{ " ft.la0 " , " Vollgas Demo Data " , kGenAsIs } ,
{ " ft " , " ftdemo " , kGenPC } ,
# endif
2006-02-05 02:14:20 +00:00
{ " fbear " , " fbdemo " , kGenPC } ,
{ " fbear " , " Fatty Bear Demo " , kGenMacNoParens } ,
{ " fbear " , " Fatty Bear " , kGenMacNoParens } ,
{ " puttmoon " , " moondemo " , kGenPC } ,
{ " puttmoon " , " Putt-Putt Moon Demo " , kGenMacNoParens } ,
{ " puttmoon " , " Putt-Putt Moon " , kGenMacNoParens } ,
{ " puttputt " , " puttdemo " , kGenPC } ,
{ " puttputt " , " Putt-Putt's Demo " , kGenMacNoParens } ,
{ " puttputt " , " Putt-Putt Parade " , kGenMacNoParens } ,
2005-10-12 19:45:35 +00:00
# ifndef DISABLE_HE
{ " airport " , " airdemo " , kGenPC } ,
{ " airport " , " Airport Demo " , kGenMac } ,
2005-12-26 23:12:23 +00:00
{ " airport " , " The AirPort " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " balloon " , " Balloon-O-Rama " , kGenMac } ,
{ " baseball " , " BaseBall " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " baseball2001 " , " bb2demo " , kGenPC } ,
2005-10-25 03:00:26 +00:00
{ " baseball2001 " , " Baseball 2001 Demo " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " baseball2001 " , " Baseball 2001 " , kGenMac } ,
{ " baseball2001 " , " baseball 2001 " , kGenPC } ,
2005-10-26 05:34:03 +00:00
{ " Baseball2003 " , " Baseball 2003 " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " basketball " , " Basketball " , kGenMac } ,
{ " BluesABCTimeDemo " , " BluesABCTimeDemo " , kGenMac } ,
2005-10-28 07:48:53 +00:00
{ " catalog " , " catalog2 " , kGenPC } ,
2005-09-13 17:31:06 +00:00
{ " chase " , " Cheese Chase " , kGenMac } ,
{ " dog " , " Dog on a Stick " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " farm " , " farmdemo " , kGenPC } ,
{ " farm " , " Farm Demo " , kGenMac } ,
2005-03-22 20:57:14 +00:00
{ " football " , " FootBall " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " football " , " FootBall Demo " , kGenMac } ,
{ " football " , " FootBall2002 " , kGenPC } ,
{ " football " , " footdemo " , kGenPC } ,
{ " freddi " , " freddemo " , kGenPC } ,
{ " freddi " , " Freddi Demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " freddi " , " Freddi Fish " , kGenMac } ,
2005-05-08 22:10:09 +00:00
{ " freddi " , " FreddiD " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " freddi2 " , " ff2-demo " , kGenPC } ,
2005-11-05 23:08:27 +00:00
{ " freddi2 " , " FFHSDemo " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " freddi2 " , " FFHSDemo " , kGenPC } ,
{ " freddi2 " , " Freddi Fish 2 Demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " freddi2 " , " Freddi Fish 2 " , kGenMac } ,
2005-02-13 06:54:03 +00:00
{ " freddi2 " , " FreddiCHSH " , kGenPC } ,
2005-12-18 23:38:50 +00:00
{ " freddi2 " , " Fritzi Fisch 2 " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " freddi3 " , " F3-mdemo " , kGenMac } ,
{ " freddi3 " , " F3-Mdemo " , kGenMac } ,
{ " freddi3 " , " f3-mdemo " , kGenPC } ,
{ " freddi3 " , " FF3-DEMO " , kGenPC } ,
2006-01-13 05:14:27 +00:00
{ " freddi3 " , " Freddi Fish 3 " , kGenMac } ,
2005-11-07 13:03:20 +00:00
{ " freddi3 " , " FreddiFGT " , kGenPC } ,
2005-12-03 00:14:24 +00:00
{ " freddi3 " , " FreddiFGT " , kGenMac } ,
2006-01-13 05:14:27 +00:00
{ " freddi3 " , " FreddiSCS " , kGenPC } ,
{ " freddi3 " , " Fritzi3demo " , kGenMac } ,
{ " freddi3 " , " Fritzi3demo " , kGenPC } ,
2005-10-21 04:42:14 +00:00
{ " freddi3 " , " MM3-DEMO " , kGenPC } ,
2005-10-25 22:47:42 +00:00
{ " freddi3 " , " MM3-Demo " , kGenMac } , // FR Mac demo
2005-09-24 02:06:38 +00:00
{ " freddi4 " , " f4-demo " , kGenPC } ,
{ " freddi4 " , " ff4demo " , kGenPC } ,
2005-12-03 00:58:33 +00:00
{ " freddi4 " , " Ff4demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " freddi4 " , " Freddi 4 " , kGenMac } ,
2005-12-28 23:31:48 +00:00
{ " freddi4 " , " Freddi 4 Demo " , kGenMac } ,
2005-11-07 06:42:21 +00:00
{ " freddi4 " , " FreddiGS " , kGenPC } ,
2006-01-18 11:46:32 +00:00
{ " freddi4 " , " FreddiGS " , kGenMac } ,
2005-02-14 21:19:00 +00:00
{ " freddi4 " , " FreddiHRBG " , kGenPC } ,
{ " freddicove " , " FreddiCCC " , kGenPC } ,
2005-05-24 00:15:19 +00:00
{ " freddicove " , " FreddiCove " , kGenMac } ,
2005-05-08 12:10:57 +00:00
{ " freddicove " , " FreddiDZZ " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " freddicove " , " ff5demo " , kGenPC } ,
{ " freddicove " , " FFCoveDemo " , kGenPC } ,
2005-10-25 03:00:26 +00:00
{ " freddicove " , " FreddiCoveDemo " , kGenMac } ,
2005-10-25 22:47:42 +00:00
{ " freddicove " , " FF5Demo " , kGenMac } , // NL Mac demo
2005-05-10 02:25:17 +00:00
{ " FreddisFunShop " , " Freddi's FunShop " , kGenMac } ,
2005-12-26 23:12:23 +00:00
{ " jungle " , " The Jungle " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " lost " , " Lost and Found " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " lost " , " smaller " , kGenPC } ,
2005-02-11 03:45:10 +00:00
{ " maze " , " Maze Madness " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " mustard " , " Mustard " , kGenMac } ,
2006-01-13 05:05:13 +00:00
{ " pajama " , " Pyjama Pit " , kGenMac } ,
2005-09-13 17:31:06 +00:00
{ " pajama " , " Pajama Sam " , kGenMac } ,
{ " pajama " , " PajamaNHD " , kGenPC } ,
2005-10-26 05:34:03 +00:00
{ " pajama " , " PJS-DEMO " , kGenPC } ,
2006-01-13 22:37:35 +00:00
{ " pajama " , " PYJAMA " , kGenPC } ,
2005-10-22 00:04:36 +00:00
{ " pajama " , " SAMDEMO " , kGenPC } ,
2005-10-25 22:47:42 +00:00
{ " pajama " , " SAMDEMO " , kGenMac } , // FR Mac demo
2005-09-13 17:31:06 +00:00
{ " pajama2 " , " Pajama Sam 2 " , kGenMac } ,
{ " pajama2 " , " PajamaTAL " , kGenPC } ,
{ " pajama2 " , " PyjamaDBMN " , kGenPC } ,
2005-11-22 23:06:47 +00:00
{ " pajama2 " , " PyjamaDBMN " , kGenMac } ,
2006-01-13 05:20:01 +00:00
{ " pajama2 " , " Pyjama Pit 2 Demo " , kGenMac } ,
{ " pajama2 " , " PJP2DEMO " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " pajama2 " , " PJ2Demo " , kGenMac } ,
{ " pajama2 " , " pj2demo " , kGenPC } ,
{ " pajama2 " , " Pjs2demo " , kGenPC } ,
2005-10-25 22:47:42 +00:00
{ " pajama2 " , " PJ2 Demo " , kGenMac } , // NL Mac demo
2005-11-19 04:07:47 +00:00
{ " pajama3 " , " GPJ3Demo " , kGenPC } ,
2005-12-03 02:31:06 +00:00
{ " pajama3 " , " Pajama Sam 3 " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " pajama3 " , " Pajama Sam 3-Demo " , kGenMac } ,
{ " pajama3 " , " pj3-demo " , kGenPC } ,
{ " pajama3 " , " pj3demo " , kGenPC } ,
2005-12-03 00:58:33 +00:00
{ " pajama3 " , " PJ3Demo " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " pajama3 " , " Pajama Sam Demo " , kGenMac } ,
{ " pajama3 " , " PjSamDemo " , kGenMac } ,
{ " pajama3 " , " PjSamDemo " , kGenPC } ,
2005-12-03 00:14:24 +00:00
{ " pajama3 " , " PyjamaSKS " , kGenPC } ,
{ " pajama3 " , " PyjamaSKS " , kGenMac } ,
2005-10-25 02:43:05 +00:00
{ " pjgames " , " PJGames " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " puttcircus " , " circdemo " , kGenPC } ,
{ " puttcircus " , " Putt Circus Demo " , kGenMac } ,
2005-04-21 06:05:07 +00:00
{ " puttcircus " , " Putt Circus " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " puttrace " , " 500demo " , kGenPC } ,
{ " puttrace " , " racedemo " , kGenPC } ,
{ " puttrace " , " RaceDemo " , kGenMac } ,
2005-11-19 04:07:47 +00:00
{ " puttrace " , " Rennen " , kGenPC } ,
2005-10-25 22:47:42 +00:00
{ " puttrace " , " Putt500 demo " , kGenMac } , // NL Mac demo
2005-04-26 04:22:08 +00:00
{ " puttrace " , " Putt Race " , kGenMac } ,
2005-12-05 10:36:58 +00:00
{ " puttrace " , " ToffRennen " , kGenPC } ,
{ " puttrace " , " ToffRennen " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " PuttsFunShop " , " Putt's FunShop " , kGenMac } ,
2005-05-24 00:15:19 +00:00
{ " putttime " , " PuttPuttTTT " , kGenPC } ,
2005-09-26 02:10:31 +00:00
{ " putttime " , " PuttPuttTTT " , kGenMac } ,
2005-05-09 23:45:46 +00:00
{ " putttime " , " PuttTijd " , kGenPC } ,
2005-09-26 02:10:31 +00:00
{ " putttime " , " Putt Time " , kGenMac } ,
2005-04-28 01:31:30 +00:00
{ " putttime " , " PuttTTT " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " putttime " , " PuttTTT " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " putttime " , " TIJDDEMO " , kGenPC } ,
{ " putttime " , " timedemo " , kGenPC } ,
{ " putttime " , " TimeDemo " , kGenMac } ,
2005-10-21 04:42:14 +00:00
{ " putttime " , " TEMPDEMO " , kGenPC } ,
2005-10-25 22:47:42 +00:00
{ " putttime " , " Tempdemo " , kGenMac } , // FR Mac demo
2006-02-19 18:32:48 +00:00
{ " putttime " , " toffzeit " , kGenPC } , // German Toeff-Toeff: Reist durch die Zeit
{ " putttime " , " toffzeit " , kGenMac } , // German Toeff-Toeff: Reist durch die Zeit
2006-01-13 05:24:05 +00:00
{ " putttime " , " ZeitDemo " , kGenMac } ,
{ " putttime " , " ZEITDEMO " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " puttzoo " , " Puttzoo Demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " puttzoo " , " PuttZoo " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " puttzoo " , " zoodemo " , kGenPC } ,
{ " puttzoo " , " Zoo Demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " SamsFunShop " , " Sam's FunShop " , kGenMac } ,
2005-03-22 20:57:14 +00:00
{ " soccer " , " Soccer " , kGenMac } ,
2005-10-26 05:34:03 +00:00
{ " Soccer2004 " , " Soccer 2004 " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " socks " , " SockWorks " , kGenMac } ,
2006-01-13 05:17:00 +00:00
{ " spyfox " , " Fuchsdem " , kGenMac } ,
{ " spyfox " , " FUCHSDEM " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " spyfox " , " FoxDemo " , kGenMac } ,
{ " spyfox " , " foxdemo " , kGenPC } ,
2005-10-21 04:42:14 +00:00
{ " spyfox " , " JAMESDEM " , kGenPC } ,
2005-11-05 23:08:27 +00:00
{ " spyfox " , " Spydemo " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " spyfox " , " Spydemo " , kGenPC } ,
2005-02-11 03:45:10 +00:00
{ " spyfox " , " SPYFox " , kGenMac } ,
2005-02-13 06:54:03 +00:00
{ " spyfox " , " SPYFoxDC " , kGenPC } ,
2005-12-02 00:22:50 +00:00
{ " spyfox " , " SPYFoxDC " , kGenMac } ,
2005-12-05 12:33:42 +00:00
{ " spyfox " , " SpyFoxDMK " , kGenPC } ,
2005-12-05 10:36:58 +00:00
{ " spyfox " , " SpyFoxDMK " , kGenMac } ,
2005-10-25 22:47:42 +00:00
{ " spyfox " , " Spy Fox Demo " , kGenMac } , // NL Mac demo
{ " spyfox " , " JR-Demo " , kGenMac } , // FR Mac demo
2005-09-24 02:06:38 +00:00
{ " spyfox2 " , " sf2-demo " , kGenPC } ,
{ " spyfox2 " , " sf2demo " , kGenPC } ,
2005-12-03 00:58:33 +00:00
{ " spyfox2 " , " Sf2demo " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " spyfox2 " , " Spy Fox 2 - Demo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " spyfox2 " , " Spy Fox 2 " , kGenMac } ,
2005-12-05 10:36:58 +00:00
{ " spyfox2 " , " SpyFoxOR " , kGenPC } ,
{ " spyfox2 " , " SpyFoxOR " , kGenMac } ,
2005-03-24 12:33:53 +00:00
{ " spyfox2 " , " spyfoxsr " , kGenPC } ,
2005-09-24 02:06:38 +00:00
{ " spyozon " , " sf3-demo " , kGenPC } ,
{ " spyozon " , " Spy Ozone Demo " , kGenMac } ,
2005-03-24 12:33:53 +00:00
{ " spyozon " , " SPYFoxOZU " , kGenPC } ,
2005-05-24 00:15:19 +00:00
{ " spyozon " , " SpyOzon " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " thinker1 " , " 1grademo " , kGenPC } ,
2005-08-04 10:19:52 +00:00
{ " thinker1 " , " Thinker1 " , kGenMac } ,
2005-09-24 02:06:38 +00:00
{ " thinkerk " , " kinddemo " , kGenPC } ,
{ " thinkerk " , " KindDemo " , kGenMac } ,
2005-02-11 03:45:10 +00:00
{ " thinkerk " , " ThinkerK " , kGenMac } ,
{ " water " , " Water Worries " , kGenMac } ,
2005-10-12 19:45:35 +00:00
# endif
2006-02-25 17:36:32 +00:00
{ NULL , NULL , kGenAsIs }
2005-01-29 03:12:48 +00:00
} ;
2004-06-29 12:10:08 +00:00
2006-02-25 18:24:55 +00:00
static void applySubstResFileName ( const SubstResFileNames & subst , char * buf , int bufsize , const char * ext , int num ) {
2006-02-25 17:36:32 +00:00
switch ( subst . genMethod ) {
case kGenMac :
case kGenMacNoParens :
if ( num = = ' 3 ' ) { // special case for cursors
// For mac they're stored in game binary
strncpy ( buf , subst . macName , bufsize ) ;
} else {
if ( subst . genMethod = = kGenMac )
snprintf ( buf , bufsize , " %s (%c) " , subst . macName , num ) ;
else
snprintf ( buf , bufsize , " %s %c " , subst . macName , num ) ;
}
break ;
case kGenPC :
if ( ext )
snprintf ( buf , bufsize , " %s%s " , subst . macName , ext ) ;
else
strncpy ( buf , subst . macName , bufsize ) ;
break ;
case kGenAsIs :
strncpy ( buf , subst . macName , bufsize ) ;
break ;
default :
* buf = 0 ;
break ;
}
}
bool applySubstResFileName ( const SubstResFileNames & subst , const char * filename , char * buf , int bufsize ) {
if ( subst . winName = = 0 )
return false ;
size_t len = strlen ( filename ) ;
assert ( len > 0 ) ;
char num = filename [ len - 1 ] ;
// In some cases we have .(a) and .(b) extensions
if ( num = = ' ) ' )
num = filename [ len - 2 ] ;
const char * ext = strrchr ( filename , ' . ' ) ;
if ( ext )
len = ext - filename ;
if ( ! scumm_strnicmp ( filename , subst . winName , len ) ) {
applySubstResFileName ( subst , buf , bufsize , ext , num ) ;
return true ;
}
return false ;
}
int findSubstResFileName ( SubstResFileNames & subst , const char * filename , int index ) {
if ( index < = 0 )
return - 1 ;
size_t len = strlen ( filename ) ;
assert ( len > 0 ) ;
char num = filename [ len - 1 ] ;
// In some cases we have .(a) and .(b) extensions
if ( num = = ' ) ' )
num = filename [ len - 2 ] ;
const char * ext = strrchr ( filename , ' . ' ) ;
if ( ext )
len = ext - filename ;
int i ;
for ( i = index ; substResFileNameTable [ i ] . winName ; i + + ) {
if ( ! scumm_strnicmp ( filename , substResFileNameTable [ i ] . winName , len ) ) {
subst = substResFileNameTable [ i ] ;
return i ;
}
}
subst = substResFileNameTable [ i ] ;
return - 1 ;
}
2003-12-30 19:08:45 +00:00
static int compareMD5Table ( const void * a , const void * b ) {
const char * key = ( const char * ) a ;
const MD5Table * elem = ( const MD5Table * ) b ;
return strcmp ( key , elem - > md5 ) ;
}
2006-02-25 17:36:32 +00:00
ScummEngine : : ScummEngine ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
2003-11-10 01:04:12 +00:00
: Engine ( syst ) ,
2006-02-20 16:51:30 +00:00
_game ( gs ) ,
2006-02-25 17:36:32 +00:00
_substResFileName ( subst ) ,
2005-09-22 22:55:01 +00:00
_debugger ( 0 ) ,
_currentScript ( 0xFF ) , // Let debug() work on init stage
2005-03-31 21:39:31 +00:00
gdi ( this ) ,
res ( this ) ,
_pauseDialog ( 0 ) , _mainMenuDialog ( 0 ) , _versionDialog ( 0 ) ,
2003-10-14 08:31:56 +00:00
_targetName ( detector - > _targetName ) {
2002-08-18 18:39:42 +00:00
2004-09-20 20:56:10 +00:00
// Copy MD5 checksum
memcpy ( _gameMD5 , md5sum , 16 ) ;
2006-02-25 17:36:32 +00:00
// Clean _substResFileNameBundle
memset ( & _substResFileNameBundle , 0 , sizeof ( _substResFileNameBundle ) ) ;
2004-09-10 12:13:03 +00:00
2006-02-25 18:16:24 +00:00
_defaultFTSentenceScript = - 1 ;
_buggyFTSentenceScript = - 1 ;
2006-01-25 15:06:42 +00:00
2004-06-28 00:06:31 +00:00
// Add default file directories.
2006-02-20 16:51:30 +00:00
if ( ( ( _game . platform = = Common : : kPlatformAmiga ) | | ( _game . platform = = Common : : kPlatformAtariST ) ) & & ( _game . version < = 4 ) ) {
2004-08-21 10:01:19 +00:00
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
2004-10-08 16:09:52 +00:00
File : : addDefaultDirectory ( _gameDataPath + " ROOMS/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " rooms/ " ) ;
2004-06-28 00:06:31 +00:00
}
2006-02-20 16:51:30 +00:00
if ( ( _game . platform = = Common : : kPlatformMacintosh ) & & ( _game . version = = 3 ) ) {
2004-08-21 10:01:19 +00:00
// This is for the Mac version of Indy3/Loom
2004-10-08 16:09:52 +00:00
File : : addDefaultDirectory ( _gameDataPath + " Rooms 1/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " Rooms 2/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " Rooms 3/ " ) ;
2004-06-28 00:06:31 +00:00
}
2005-10-14 11:04:15 +00:00
# ifndef DISABLE_SCUMM_7_8
2004-06-28 00:06:31 +00:00
# ifdef MACOSX
2006-02-20 16:51:30 +00:00
if ( _game . version = = 8 & & ! memcmp ( _gameDataPath . c_str ( ) , " /Volumes/MONKEY3_ " , 17 ) ) {
2004-06-28 00:06:31 +00:00
// Special case for COMI on Mac OS X. The mount points on OS X depend
// on the volume name. Hence if playing from CD, we'd get a problem.
// So if loading of a resource file fails, we fall back to the (fixed)
// CD mount points (/Volumes/MONKEY3_1 and /Volumes/MONKEY3_2).
//
// This check for whether we play from CD is very crude, though.
File : : addDefaultDirectory ( " /Volumes/MONKEY3_1/RESOURCE/ " ) ;
File : : addDefaultDirectory ( " /Volumes/MONKEY3_1/resource/ " ) ;
File : : addDefaultDirectory ( " /Volumes/MONKEY3_2/ " ) ;
File : : addDefaultDirectory ( " /Volumes/MONKEY3_2/RESOURCE/ " ) ;
File : : addDefaultDirectory ( " /Volumes/MONKEY3_2/resource/ " ) ;
} else
# endif
2006-02-20 16:51:30 +00:00
if ( _game . version = = 8 ) {
2004-06-28 00:06:31 +00:00
// This is for COMI
2004-10-08 16:09:52 +00:00
File : : addDefaultDirectory ( _gameDataPath + " RESOURCE/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " resource/ " ) ;
2004-06-28 00:06:31 +00:00
}
2006-02-20 16:51:30 +00:00
if ( _game . version = = 7 ) {
2004-06-28 00:06:31 +00:00
// This is for Full Throttle & The Dig
2004-10-08 16:09:52 +00:00
File : : addDefaultDirectory ( _gameDataPath + " VIDEO/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " video/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " DATA/ " ) ;
File : : addDefaultDirectory ( _gameDataPath + " data/ " ) ;
2004-06-28 00:06:31 +00:00
}
2005-10-14 11:04:15 +00:00
# endif
2004-06-28 00:06:31 +00:00
2005-03-30 21:59:12 +00:00
// We read data directly from NES ROM instead of extracting it with
// external tool
2006-02-25 17:36:32 +00:00
if ( ( _game . platform = = Common : : kPlatformNES ) & & _substResFileName . winName ) {
2005-05-19 14:15:34 +00:00
char tmpBuf [ 128 ] ;
generateSubstResFileName ( " 00.LFL " , tmpBuf , sizeof ( tmpBuf ) ) ;
2005-03-30 21:59:12 +00:00
_fileHandle = new ScummNESFile ( ) ;
2005-05-19 14:15:34 +00:00
_containerFile = tmpBuf ;
2006-02-25 17:36:32 +00:00
} else if ( ( _game . platform = = Common : : kPlatformC64 ) & & _substResFileName . winName ) {
2005-05-19 14:15:34 +00:00
char tmpBuf1 [ 128 ] , tmpBuf2 [ 128 ] ;
generateSubstResFileName ( " 00.LFL " , tmpBuf1 , sizeof ( tmpBuf1 ) ) ;
generateSubstResFileName ( " 01.LFL " , tmpBuf2 , sizeof ( tmpBuf2 ) ) ;
2006-02-20 16:51:30 +00:00
_fileHandle = new ScummC64File ( tmpBuf1 , tmpBuf2 , _game . id = = GID_MANIAC ) ;
2005-05-19 14:15:34 +00:00
_containerFile = tmpBuf1 ;
} else
2005-03-30 21:59:12 +00:00
_fileHandle = new ScummFile ( ) ;
2005-11-18 00:59:10 +00:00
// The mac versions of Indy4, Sam&Max, DOTT, FT and The Dig used a
// special meta (container) file format to store the actual SCUMM data
// files. The rescumm utility used to be used to extract those files.
// While that is still possible, we now support reading those files
// directly. The first step is to check whether one of them is present
// (we do that here); the rest is handled by the ScummFile class and
// code in openResourceFile() (and in the Sound class, for MONSTER.SOU
// handling).
2006-02-25 17:36:32 +00:00
if ( _game . version > = 5 & & _game . heversion = = 0 & & _substResFileName . winName & &
2006-02-20 16:51:30 +00:00
_game . platform = = Common : : kPlatformMacintosh & &
2006-02-25 17:36:32 +00:00
_substResFileName . genMethod = = kGenAsIs ) {
if ( _fileHandle - > open ( _substResFileName . macName ) ) {
_containerFile = _substResFileName . macName ;
_substResFileName . winName = 0 ;
2005-05-24 00:15:19 +00:00
}
2004-07-26 18:13:53 +00:00
}
2004-09-20 22:04:06 +00:00
// Init all vars
2003-04-30 13:23:31 +00:00
_imuse = NULL ;
_imuseDigital = NULL ;
2003-10-12 17:33:29 +00:00
_musicEngine = NULL ;
2003-04-30 13:23:31 +00:00
_verbs = NULL ;
_objs = NULL ;
2005-10-14 02:13:33 +00:00
_storedFlObjects = NULL ;
2004-01-14 10:40:54 +00:00
_debugFlags = 0 ;
2003-06-08 12:11:14 +00:00
_sound = NULL ;
2003-04-30 13:23:31 +00:00
memset ( & vm , 0 , sizeof ( vm ) ) ;
2004-06-27 21:06:04 +00:00
_smushVideoShouldFinish = false ;
2003-12-25 02:55:00 +00:00
_smushPaused = false ;
2004-06-20 21:01:32 +00:00
_insaneRunning = false ;
2003-04-30 13:23:31 +00:00
_quit = false ;
_pauseDialog = NULL ;
2003-11-03 23:26:13 +00:00
_mainMenuDialog = NULL ;
2004-07-20 11:30:15 +00:00
_versionDialog = NULL ;
2003-04-30 13:23:31 +00:00
_fastMode = 0 ;
_actors = NULL ;
2004-08-02 06:21:00 +00:00
_arraySlot = NULL ;
2003-04-30 13:23:31 +00:00
_inventory = NULL ;
_newNames = NULL ;
2003-05-08 15:48:50 +00:00
_scummVars = NULL ;
2004-08-26 23:15:39 +00:00
_roomVars = NULL ;
2003-04-30 13:23:31 +00:00
_varwatch = 0 ;
_bitVars = NULL ;
_numVariables = 0 ;
_numBitVariables = 0 ;
2004-08-26 23:30:28 +00:00
_numRoomVariables = 0 ;
2003-04-30 13:23:31 +00:00
_numLocalObjects = 0 ;
_numGlobalObjects = 0 ;
2005-10-14 02:13:33 +00:00
_numStoredFlObjects = 0 ;
2003-04-30 13:23:31 +00:00
_numArray = 0 ;
_numVerbs = 0 ;
_numFlObject = 0 ;
_numInventory = 0 ;
_numRooms = 0 ;
_numScripts = 0 ;
_numSounds = 0 ;
_numCharsets = 0 ;
_numNewNames = 0 ;
_numGlobalScripts = 0 ;
_numCostumes = 0 ;
2004-06-30 06:46:32 +00:00
_numImages = 0 ;
2004-09-30 06:39:39 +00:00
_numLocalScripts = 60 ;
2004-09-08 05:58:36 +00:00
_numSprites = 0 ;
_numTalkies = 0 ;
2004-10-01 11:25:25 +00:00
_numPalettes = 0 ;
2004-10-04 02:23:02 +00:00
_numUnk = 0 ;
2003-04-30 13:23:31 +00:00
_curActor = 0 ;
_curVerb = 0 ;
_curVerbSlot = 0 ;
_curPalIndex = 0 ;
_currentRoom = 0 ;
_egoPositioned = false ;
_keyPressed = 0 ;
_lastKeyHit = 0 ;
2005-04-20 23:33:35 +00:00
_mouseAndKeyboardStat = 0 ;
2003-04-30 13:23:31 +00:00
_leftBtnPressed = 0 ;
_rightBtnPressed = 0 ;
_bootParam = 0 ;
_dumpScripts = false ;
_debugMode = 0 ;
2005-02-24 07:43:29 +00:00
_heV7DiskOffsets = NULL ;
2005-04-17 22:59:43 +00:00
_heV7RoomIntOffsets = NULL ;
2003-04-30 13:23:31 +00:00
_objectOwnerTable = NULL ;
_objectRoomTable = NULL ;
_objectStateTable = NULL ;
_numObjectsInRoom = 0 ;
_userPut = 0 ;
2003-05-21 07:22:43 +00:00
_userState = 0 ;
2005-09-14 08:20:37 +00:00
_activeObject = 0 ;
2005-04-03 15:06:08 +00:00
_resourceHeaderSize = 8 ;
2003-04-30 13:23:31 +00:00
_saveLoadFlag = 0 ;
_saveLoadSlot = 0 ;
_lastSaveTime = 0 ;
2004-01-31 22:12:35 +00:00
_saveTemporaryState = false ;
2003-06-09 01:06:29 +00:00
memset ( _saveLoadName , 0 , sizeof ( _saveLoadName ) ) ;
2005-01-29 15:49:57 +00:00
memset ( _localScriptOffsets , 0 , sizeof ( _localScriptOffsets ) ) ;
2003-04-30 13:23:31 +00:00
_scriptPointer = NULL ;
_scriptOrgPointer = NULL ;
_opcode = 0 ;
2003-09-11 10:32:15 +00:00
vm . numNestedScripts = 0 ;
2003-04-30 13:23:31 +00:00
_lastCodePtr = NULL ;
_resultVarNumber = 0 ;
_scummStackPos = 0 ;
2004-01-08 20:37:26 +00:00
memset ( _vmStack , 0 , sizeof ( _vmStack ) ) ;
2003-04-30 13:23:31 +00:00
_keyScriptKey = 0 ;
_keyScriptNo = 0 ;
_fileOffset = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _resourceMapper , 0 , sizeof ( _resourceMapper ) ) ;
2003-04-30 13:23:31 +00:00
_lastLoadedRoom = 0 ;
_roomResource = 0 ;
OF_OWNER_ROOM = 0 ;
_verbMouseOver = 0 ;
_inventoryOffset = 0 ;
_classData = NULL ;
_actorToPrintStrFor = 0 ;
_sentenceNum = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _sentence , 0 , sizeof ( _sentence ) ) ;
memset ( _string , 0 , sizeof ( _string ) ) ;
2003-04-30 13:23:31 +00:00
_screenB = 0 ;
_screenH = 0 ;
2003-05-10 21:49:59 +00:00
_roomHeight = 0 ;
_roomWidth = 0 ;
_screenHeight = 0 ;
_screenWidth = 0 ;
2003-06-09 01:06:29 +00:00
memset ( virtscr , 0 , sizeof ( virtscr ) ) ;
memset ( & camera , 0 , sizeof ( CameraData ) ) ;
memset ( _colorCycle , 0 , sizeof ( _colorCycle ) ) ;
2005-11-01 13:55:53 +00:00
memset ( _colorUsedByCycle , 0 , sizeof ( _colorUsedByCycle ) ) ;
2003-04-30 13:23:31 +00:00
_ENCD_offs = 0 ;
_EXCD_offs = 0 ;
_CLUT_offs = 0 ;
2004-08-22 06:16:16 +00:00
_EPAL_offs = 0 ;
2003-04-30 13:23:31 +00:00
_IM00_offs = 0 ;
_PALS_offs = 0 ;
_fullRedraw = false ;
2004-09-18 22:42:45 +00:00
_bgNeedsRedraw = false ;
2003-04-30 13:23:31 +00:00
_screenEffectFlag = false ;
_completeScreenRedraw = false ;
2003-06-09 01:06:29 +00:00
memset ( & _cursor , 0 , sizeof ( _cursor ) ) ;
memset ( _grabbedCursor , 0 , sizeof ( _grabbedCursor ) ) ;
2003-04-30 13:23:31 +00:00
_currentCursor = 0 ;
_newEffect = 0 ;
_switchRoomEffect2 = 0 ;
_switchRoomEffect = 0 ;
2004-09-05 15:44:29 +00:00
_scrollBuffer = NULL ;
2004-11-09 10:26:33 +00:00
2003-04-30 13:23:31 +00:00
_doEffect = false ;
2003-06-09 01:06:29 +00:00
memset ( & _flashlight , 0 , sizeof ( _flashlight ) ) ;
2003-05-28 21:28:30 +00:00
_bompActorPalettePtr = NULL ;
2005-03-25 01:27:28 +00:00
_shakeEnabled = false ;
2003-04-30 13:23:31 +00:00
_shakeFrame = 0 ;
_screenStartStrip = 0 ;
_screenEndStrip = 0 ;
_screenTop = 0 ;
_drawObjectQueNr = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _drawObjectQue , 0 , sizeof ( _drawObjectQue ) ) ;
2003-04-30 13:23:31 +00:00
_palManipStart = 0 ;
_palManipEnd = 0 ;
_palManipCounter = 0 ;
_palManipPalette = NULL ;
_palManipIntermediatePal = NULL ;
2003-06-09 01:06:29 +00:00
memset ( gfxUsageBits , 0 , sizeof ( gfxUsageBits ) ) ;
2005-06-02 14:40:13 +00:00
_hePalettes = NULL ;
2003-04-30 13:23:31 +00:00
_shadowPalette = NULL ;
_shadowPaletteSize = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _currentPalette , 0 , sizeof ( _currentPalette ) ) ;
2005-04-19 04:12:49 +00:00
memset ( _darkenPalette , 0 , sizeof ( _darkenPalette ) ) ;
2004-08-16 02:38:02 +00:00
memset ( _HEV7ActorPalette , 0 , sizeof ( _HEV7ActorPalette ) ) ;
2003-04-30 13:23:31 +00:00
_palDirtyMin = 0 ;
_palDirtyMax = 0 ;
_haveMsg = 0 ;
2005-11-02 21:47:44 +00:00
_haveActorSpeechMsg = false ;
2003-04-30 13:23:31 +00:00
_useTalkAnims = false ;
_defaultTalkDelay = 0 ;
2005-12-30 14:18:21 +00:00
_musicType = MDT_NONE ;
2004-09-20 22:04:06 +00:00
_tempMusic = 0 ;
2003-07-15 10:16:45 +00:00
_saveSound = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _extraBoxFlags , 0 , sizeof ( _extraBoxFlags ) ) ;
memset ( _scaleSlots , 0 , sizeof ( _scaleSlots ) ) ;
2003-04-30 13:23:31 +00:00
_charset = NULL ;
_charsetColor = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _charsetColorMap , 0 , sizeof ( _charsetColorMap ) ) ;
memset ( _charsetData , 0 , sizeof ( _charsetData ) ) ;
2003-04-30 13:23:31 +00:00
_charsetBufPos = 0 ;
2003-06-09 01:06:29 +00:00
memset ( _charsetBuffer , 0 , sizeof ( _charsetBuffer ) ) ;
2003-12-14 04:43:04 +00:00
_copyProtection = false ;
_demoMode = false ;
2003-07-28 01:36:16 +00:00
_confirmExit = false ;
2005-03-12 00:47:17 +00:00
_voiceMode = 0 ;
2003-04-30 13:23:31 +00:00
_talkDelay = 0 ;
2005-03-25 00:37:14 +00:00
_NES_lastTalkingActor = 0 ;
_NES_talkColor = 0 ;
2003-04-30 13:23:31 +00:00
_keepText = false ;
2005-03-27 01:07:22 +00:00
_costumeLoader = NULL ;
2003-06-14 13:38:22 +00:00
_costumeRenderer = NULL ;
2003-06-14 12:24:42 +00:00
_2byteFontPtr = 0 ;
2004-10-12 17:05:16 +00:00
_V1TalkingActor = 0 ;
2005-03-24 03:22:32 +00:00
_NESStartStrip = 0 ;
2003-04-30 13:23:31 +00:00
2004-09-04 10:29:06 +00:00
_actorClipOverride . top = 0 ;
2004-10-11 10:49:59 +00:00
_actorClipOverride . bottom = 480 ;
2004-09-04 10:29:06 +00:00
_actorClipOverride . left = 0 ;
2004-10-11 10:49:59 +00:00
_actorClipOverride . right = 640 ;
2004-09-04 08:13:48 +00:00
2004-08-24 00:58:28 +00:00
_skipDrawObject = 0 ;
2006-01-05 07:06:47 +00:00
memset ( _heTimers , 0 , sizeof ( _heTimers ) ) ;
2004-07-03 23:58:30 +00:00
2004-09-21 21:10:23 +00:00
memset ( _akosQueue , 0 , sizeof ( _akosQueue ) ) ;
_akosQueuePos = 0 ;
2003-05-08 15:48:50 +00:00
//
// Init all VARS to 0xFF
//
VAR_LANGUAGE = 0xFF ;
VAR_KEYPRESS = 0xFF ;
2004-01-09 22:10:32 +00:00
VAR_SYNC = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_EGO = 0xFF ;
VAR_CAMERA_POS_X = 0xFF ;
VAR_HAVE_MSG = 0xFF ;
VAR_ROOM = 0xFF ;
VAR_OVERRIDE = 0xFF ;
VAR_MACHINE_SPEED = 0xFF ;
VAR_ME = 0xFF ;
VAR_NUM_ACTOR = 0xFF ;
VAR_CURRENT_LIGHTS = 0xFF ;
VAR_CURRENTDRIVE = 0xFF ; // How about merging this with VAR_CURRENTDISK?
VAR_CURRENTDISK = 0xFF ;
VAR_TMR_1 = 0xFF ;
VAR_TMR_2 = 0xFF ;
VAR_TMR_3 = 0xFF ;
VAR_MUSIC_TIMER = 0xFF ;
VAR_ACTOR_RANGE_MIN = 0xFF ;
VAR_ACTOR_RANGE_MAX = 0xFF ;
VAR_CAMERA_MIN_X = 0xFF ;
VAR_CAMERA_MAX_X = 0xFF ;
VAR_TIMER_NEXT = 0xFF ;
VAR_VIRT_MOUSE_X = 0xFF ;
VAR_VIRT_MOUSE_Y = 0xFF ;
VAR_ROOM_RESOURCE = 0xFF ;
VAR_LAST_SOUND = 0xFF ;
VAR_CUTSCENEEXIT_KEY = 0xFF ;
VAR_OPTIONS_KEY = 0xFF ;
VAR_TALK_ACTOR = 0xFF ;
VAR_CAMERA_FAST_X = 0xFF ;
VAR_SCROLL_SCRIPT = 0xFF ;
VAR_ENTRY_SCRIPT = 0xFF ;
VAR_ENTRY_SCRIPT2 = 0xFF ;
VAR_EXIT_SCRIPT = 0xFF ;
VAR_EXIT_SCRIPT2 = 0xFF ;
VAR_VERB_SCRIPT = 0xFF ;
VAR_SENTENCE_SCRIPT = 0xFF ;
2003-06-14 12:23:30 +00:00
VAR_INVENTORY_SCRIPT = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_CUTSCENE_START_SCRIPT = 0xFF ;
VAR_CUTSCENE_END_SCRIPT = 0xFF ;
VAR_CHARINC = 0xFF ;
2003-05-14 13:30:52 +00:00
VAR_CHARCOUNT = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_WALKTO_OBJ = 0xFF ;
VAR_DEBUGMODE = 0xFF ;
VAR_HEAPSPACE = 0xFF ;
VAR_RESTART_KEY = 0xFF ;
VAR_PAUSE_KEY = 0xFF ;
VAR_MOUSE_X = 0xFF ;
VAR_MOUSE_Y = 0xFF ;
VAR_TIMER = 0xFF ;
VAR_TMR_4 = 0xFF ;
VAR_SOUNDCARD = 0xFF ;
VAR_VIDEOMODE = 0xFF ;
2003-11-03 23:26:13 +00:00
VAR_MAINMENU_KEY = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_FIXEDDISK = 0xFF ;
VAR_CURSORSTATE = 0xFF ;
VAR_USERPUT = 0xFF ;
VAR_SOUNDRESULT = 0xFF ;
VAR_TALKSTOP_KEY = 0xFF ;
2004-07-24 04:36:54 +00:00
VAR_FADE_DELAY = 0xFF ;
2003-06-12 16:38:43 +00:00
VAR_NOSUBTITLES = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_SOUNDPARAM = 0xFF ;
VAR_SOUNDPARAM2 = 0xFF ;
VAR_SOUNDPARAM3 = 0xFF ;
VAR_MOUSEPRESENT = 0xFF ;
2004-07-24 11:15:59 +00:00
VAR_MEMORY_PERFORMANCE = 0xFF ;
VAR_VIDEO_PERFORMANCE = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_ROOM_FLAG = 0xFF ;
VAR_GAME_LOADED = 0xFF ;
VAR_NEW_ROOM = 0xFF ;
2004-07-22 04:13:46 +00:00
VAR_VERSION_KEY = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_V5_TALK_STRING_Y = 0xFF ;
2004-10-04 14:28:43 +00:00
VAR_ROOM_WIDTH = 0xFF ;
VAR_ROOM_HEIGHT = 0xFF ;
2005-05-09 02:38:58 +00:00
VAR_SUBTITLES = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_V6_EMSSPACE = 0xFF ;
VAR_CAMERA_POS_Y = 0xFF ;
VAR_CAMERA_MIN_Y = 0xFF ;
VAR_CAMERA_MAX_Y = 0xFF ;
VAR_CAMERA_THRESHOLD_X = 0xFF ;
VAR_CAMERA_THRESHOLD_Y = 0xFF ;
VAR_CAMERA_SPEED_X = 0xFF ;
VAR_CAMERA_SPEED_Y = 0xFF ;
VAR_CAMERA_ACCEL_X = 0xFF ;
VAR_CAMERA_ACCEL_Y = 0xFF ;
VAR_CAMERA_DEST_X = 0xFF ;
VAR_CAMERA_DEST_Y = 0xFF ;
VAR_CAMERA_FOLLOWED_ACTOR = 0xFF ;
VAR_LEFTBTN_DOWN = 0xFF ;
VAR_RIGHTBTN_DOWN = 0xFF ;
VAR_LEFTBTN_HOLD = 0xFF ;
VAR_RIGHTBTN_HOLD = 0xFF ;
2005-11-10 23:09:20 +00:00
2003-05-13 17:51:56 +00:00
VAR_SAVELOAD_SCRIPT = 0xFF ;
VAR_SAVELOAD_SCRIPT2 = 0xFF ;
2003-05-08 15:48:50 +00:00
VAR_DEFAULT_TALK_DELAY = 0xFF ;
VAR_CHARSET_MASK = 0xFF ;
VAR_CUSTOMSCALETABLE = 0xFF ;
VAR_V6_SOUNDMODE = 0xFF ;
2003-05-17 18:42:31 +00:00
VAR_ACTIVE_VERB = 0xFF ;
VAR_ACTIVE_OBJECT1 = 0xFF ;
VAR_ACTIVE_OBJECT2 = 0xFF ;
VAR_VERB_ALLOWED = 0xFF ;
2003-05-17 10:04:30 +00:00
VAR_CLICK_AREA = 0xFF ;
2004-02-20 15:04:51 +00:00
VAR_BLAST_ABOVE_TEXT = 0xFF ;
2004-02-22 03:08:18 +00:00
VAR_VOICE_MODE = 0xFF ;
2004-07-04 06:14:18 +00:00
VAR_MUSIC_BUNDLE_LOADED = 0xFF ;
VAR_VOICE_BUNDLE_LOADED = 0xFF ;
2004-02-20 15:04:51 +00:00
2006-01-14 10:09:50 +00:00
VAR_REDRAW_ALL_ACTORS = 0xFF ;
2005-04-21 03:29:31 +00:00
VAR_SKIP_RESET_TALK_ACTOR = 0xFF ;
2006-01-14 10:09:50 +00:00
2004-09-10 10:39:10 +00:00
VAR_SOUND_CHANNEL = 0xFF ;
2006-01-15 08:37:01 +00:00
VAR_TALK_CHANNEL = 0xFF ;
2006-01-05 07:06:47 +00:00
VAR_SOUNDCODE_TMR = 0xFF ;
2006-01-15 08:37:01 +00:00
VAR_RESERVED_SOUND_CHANNELS = 0xFF ;
2004-09-10 10:39:10 +00:00
2006-01-14 05:32:11 +00:00
VAR_MAIN_SCRIPT = 0xFF ;
2006-01-14 10:09:50 +00:00
2005-02-28 13:23:10 +00:00
VAR_NUM_SCRIPT_CYCLES = 0xFF ;
VAR_SCRIPT_CYCLE = 0xFF ;
2004-09-04 23:35:14 +00:00
VAR_NUM_GLOBAL_OBJS = 0xFF ;
2004-10-18 06:40:36 +00:00
VAR_KEY_STATE = 0xFF ;
2005-04-20 20:34:44 +00:00
VAR_MOUSE_STATE = 0xFF ;
2004-09-04 23:35:14 +00:00
2002-08-18 17:48:18 +00:00
// Use g_scumm from error() ONLY
g_scumm = this ;
2003-10-13 12:56:53 +00:00
// Read settings from the detector & config manager
2005-04-24 12:21:53 +00:00
_debugMode = ( gDebugLevel > = 0 ) ;
2002-12-31 02:09:57 +00:00
_dumpScripts = detector - > _dumpScripts ;
2003-10-08 21:59:23 +00:00
_bootParam = ConfMan . getInt ( " boot_param " ) ;
2005-07-16 17:10:50 +00:00
// Boot params often need debugging switched on to work
if ( _bootParam )
_debugMode = true ;
2003-10-12 19:10:17 +00:00
// Allow the user to override the game name with a custom string.
// This allows some game versions to work which use filenames
// differing from the regular version(s) of that game.
2006-01-21 13:01:20 +00:00
_baseName = ConfMan . hasKey ( " basename " ) ? ConfMan . get ( " basename " ) : gs . gameid ;
2003-12-13 00:20:01 +00:00
2003-12-11 06:08:43 +00:00
_copyProtection = ConfMan . getBool ( " copy_protection " ) ;
2003-10-08 21:59:23 +00:00
_demoMode = ConfMan . getBool ( " demo_mode " ) ;
2003-12-02 08:12:39 +00:00
if ( ConfMan . hasKey ( " nosubtitles " ) ) {
2005-08-14 01:41:52 +00:00
printf ( " Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead \n " ) ;
2003-12-27 15:22:59 +00:00
if ( ! ConfMan . hasKey ( " subtitles " ) )
ConfMan . set ( " subtitles " , ! ConfMan . getBool ( " nosubtitles " ) ) ;
2003-12-02 08:12:39 +00:00
}
2005-03-12 00:47:17 +00:00
// Make sure that at least subtitles are enabled
if ( ConfMan . getBool ( " speech_mute " ) & & ! ConfMan . getBool ( " subtitles " ) )
ConfMan . set ( " subtitles " , 1 ) ;
// TODO Detect subtitle only versions of scumm6 games
if ( ConfMan . getBool ( " speech_mute " ) )
_voiceMode = 2 ;
else
_voiceMode = ConfMan . getBool ( " subtitles " ) ;
2003-10-08 21:59:23 +00:00
_confirmExit = ConfMan . getBool ( " confirm_exit " ) ;
2004-09-20 22:04:06 +00:00
2005-02-20 00:17:22 +00:00
if ( ConfMan . hasKey ( " render_mode " ) ) {
_renderMode = Common : : parseRenderMode ( ConfMan . get ( " render_mode " ) . c_str ( ) ) ;
} else {
_renderMode = Common : : kRenderDefault ;
}
// Do some render mode restirctions
2006-02-20 16:51:30 +00:00
if ( _game . version = = 1 )
2005-02-20 01:50:18 +00:00
_renderMode = Common : : kRenderDefault ;
2005-02-20 00:17:22 +00:00
switch ( _renderMode ) {
2005-03-02 21:46:51 +00:00
case Common : : kRenderHercA :
case Common : : kRenderHercG :
2006-02-20 16:51:30 +00:00
if ( _game . version > 2 & & _game . id ! = GID_MONKEY_EGA )
2005-02-20 00:17:22 +00:00
_renderMode = Common : : kRenderDefault ;
break ;
case Common : : kRenderCGA :
case Common : : kRenderEGA :
2005-03-07 00:39:48 +00:00
case Common : : kRenderAmiga :
2006-02-20 16:51:30 +00:00
if ( ! ( _game . features & GF_16COLOR ) )
2005-03-07 00:39:48 +00:00
_renderMode = Common : : kRenderDefault ;
break ;
2005-02-20 00:17:22 +00:00
default :
break ;
}
2003-05-13 23:33:01 +00:00
_hexdumpScripts = false ;
_showStack = false ;
2002-11-13 15:44:33 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformFMTowns & & _game . version = = 3 ) { // FM-TOWNS V3 games use 320x240
2003-05-10 21:49:59 +00:00
_screenWidth = 320 ;
_screenHeight = 240 ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version = = 8 | | _game . heversion > = 71 ) {
2006-02-18 00:12:36 +00:00
// COMI uses 640x480. Likewise starting from version 7.1, HE games use
// 640x480, too.
2003-05-10 21:49:59 +00:00
_screenWidth = 640 ;
_screenHeight = 480 ;
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformNES ) {
2005-03-24 21:34:35 +00:00
_screenWidth = 256 ;
2003-08-14 11:40:50 +00:00
_screenHeight = 240 ;
2005-03-02 21:46:51 +00:00
} else if ( _renderMode = = Common : : kRenderHercA | | _renderMode = = Common : : kRenderHercG ) {
2005-02-20 00:17:22 +00:00
_screenWidth = 320 ;
_screenHeight = 200 ;
2002-08-18 17:48:18 +00:00
} else {
2003-05-10 21:49:59 +00:00
_screenWidth = 320 ;
_screenHeight = 200 ;
2002-08-18 17:48:18 +00:00
}
2005-03-25 01:52:20 +00:00
_compositeBuf = ( byte * ) malloc ( _screenWidth * _screenHeight ) ;
2005-03-25 01:59:47 +00:00
_herculesBuf = 0 ;
2005-03-25 01:52:20 +00:00
if ( _renderMode = = Common : : kRenderHercA | | _renderMode = = Common : : kRenderHercG ) {
_herculesBuf = ( byte * ) malloc ( Common : : kHercW * Common : : kHercH ) ;
}
2002-08-14 00:01:39 +00:00
}
2003-10-02 22:42:03 +00:00
ScummEngine : : ~ ScummEngine ( ) {
2004-01-14 16:00:24 +00:00
if ( _musicEngine ) {
_musicEngine - > terminate ( ) ;
delete _musicEngine ;
}
2003-10-03 13:43:07 +00:00
_mixer - > stopAll ( ) ;
2003-11-08 21:59:32 +00:00
2002-08-14 00:01:39 +00:00
delete [ ] _actors ;
2005-04-30 22:01:16 +00:00
delete [ ] _sortedActors ;
2003-11-08 21:59:32 +00:00
2003-06-04 14:37:43 +00:00
delete _2byteFontPtr ;
2002-12-25 21:42:22 +00:00
delete _charset ;
delete _pauseDialog ;
2003-11-03 23:26:13 +00:00
delete _mainMenuDialog ;
2004-07-20 11:30:15 +00:00
delete _versionDialog ;
2005-03-30 21:59:12 +00:00
delete _fileHandle ;
2002-09-19 21:45:56 +00:00
2002-08-14 20:43:56 +00:00
delete _sound ;
2003-04-30 13:23:31 +00:00
2005-03-27 01:07:22 +00:00
delete _costumeLoader ;
2003-06-14 13:38:22 +00:00
delete _costumeRenderer ;
2003-06-05 02:44:18 +00:00
2003-06-15 00:33:16 +00:00
free ( _shadowPalette ) ;
2005-04-10 00:51:47 +00:00
free ( _palManipPalette ) ;
free ( _palManipIntermediatePal ) ;
2005-07-30 21:11:48 +00:00
2005-03-31 21:39:31 +00:00
res . freeResources ( ) ;
2003-06-25 23:25:52 +00:00
free ( _objectStateTable ) ;
free ( _objectRoomTable ) ;
free ( _objectOwnerTable ) ;
free ( _inventory ) ;
free ( _verbs ) ;
free ( _objs ) ;
2004-10-18 14:37:38 +00:00
free ( _roomVars ) ;
2003-06-25 23:25:52 +00:00
free ( _scummVars ) ;
free ( _bitVars ) ;
free ( _newNames ) ;
free ( _classData ) ;
2004-10-18 14:37:38 +00:00
free ( _arraySlot ) ;
2003-06-25 23:25:52 +00:00
2005-03-25 01:52:20 +00:00
free ( _compositeBuf ) ;
free ( _herculesBuf ) ;
2003-10-12 17:49:52 +00:00
delete _debugger ;
2002-08-14 00:01:39 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_v4 : : ScummEngine_v4 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v5 ( detector , syst , gs , md5sum , subst ) {
2005-04-03 15:06:08 +00:00
_resourceHeaderSize = 6 ;
}
2006-02-25 17:36:32 +00:00
ScummEngine_v3 : : ScummEngine_v3 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v4 ( detector , syst , gs , md5sum , subst ) {
2005-04-03 15:06:08 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_v3old : : ScummEngine_v3old ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v3 ( detector , syst , gs , md5sum , subst ) {
2005-04-03 15:06:08 +00:00
_resourceHeaderSize = 4 ;
}
2006-02-25 17:36:32 +00:00
ScummEngine_v2 : : ScummEngine_v2 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v3old ( detector , syst , gs , md5sum , subst ) {
2005-04-03 15:06:08 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_c64 : : ScummEngine_c64 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v2 ( detector , syst , gs , md5sum , subst ) {
2005-10-02 13:21:49 +00:00
_currentAction = 0 ;
_currentMode = 0 ;
2005-05-18 02:32:25 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_v6 : : ScummEngine_v6 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine ( detector , syst , gs , md5sum , subst ) {
2005-04-28 22:34:56 +00:00
_blastObjectQueuePos = 0 ;
memset ( _blastObjectQueue , 0 , sizeof ( _blastObjectQueue ) ) ;
_blastTextQueuePos = 0 ;
memset ( _blastTextQueue , 0 , sizeof ( _blastTextQueue ) ) ;
_smushFrameRate = 0 ;
2004-06-27 13:33:03 +00:00
VAR_VIDEONAME = 0xFF ;
VAR_RANDOM_NR = 0xFF ;
VAR_STRING2DRAW = 0xFF ;
VAR_TIMEDATE_YEAR = 0xFF ;
VAR_TIMEDATE_MONTH = 0xFF ;
VAR_TIMEDATE_DAY = 0xFF ;
VAR_TIMEDATE_HOUR = 0xFF ;
VAR_TIMEDATE_MINUTE = 0xFF ;
VAR_TIMEDATE_SECOND = 0xFF ;
}
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-25 17:36:32 +00:00
ScummEngine_v70he : : ScummEngine_v70he ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v60he ( detector , syst , gs , md5sum , subst ) {
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformMacintosh & & ( _game . heversion > = 72 & & _game . heversion < = 73 ) )
2005-05-18 15:57:16 +00:00
_resExtractor = new MacResExtractor ( this ) ;
else
_resExtractor = new Win32ResExtractor ( this ) ;
2004-09-29 21:45:52 +00:00
2005-05-23 02:00:49 +00:00
_wiz = new Wiz ( this ) ;
2005-04-17 22:59:43 +00:00
_heV7RoomOffsets = NULL ;
2004-09-29 21:45:52 +00:00
_heSndSoundId = 0 ;
_heSndOffset = 0 ;
_heSndChannel = 0 ;
2004-10-10 01:52:35 +00:00
_heSndFlags = 0 ;
2004-09-29 21:45:52 +00:00
_heSndSoundFreq = 0 ;
2005-04-20 23:13:11 +00:00
2005-04-28 00:45:06 +00:00
_skipProcessActors = 0 ;
2005-04-20 23:13:11 +00:00
VAR_NUM_SOUND_CHANNELS = 0xFF ;
2005-05-23 03:33:08 +00:00
VAR_WIZ_TCOLOR = 0xFF ;
2004-06-28 11:38:26 +00:00
}
2005-04-17 22:59:43 +00:00
ScummEngine_v70he : : ~ ScummEngine_v70he ( ) {
2005-09-08 19:26:43 +00:00
delete _resExtractor ;
delete _wiz ;
2005-04-17 22:59:43 +00:00
free ( _heV7DiskOffsets ) ;
free ( _heV7RoomIntOffsets ) ;
free ( _heV7RoomOffsets ) ;
2006-01-11 00:18:32 +00:00
free ( _storedFlObjects ) ;
2005-04-17 22:59:43 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_v71he : : ScummEngine_v71he ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v70he ( detector , syst , gs , md5sum , subst ) {
2005-05-15 09:46:34 +00:00
_auxBlocksNum = 0 ;
memset ( _auxBlocks , 0 , sizeof ( _auxBlocks ) ) ;
_auxEntriesNum = 0 ;
memset ( _auxEntries , 0 , sizeof ( _auxEntries ) ) ;
}
2006-02-25 17:36:32 +00:00
ScummEngine_v72he : : ScummEngine_v72he ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v71he ( detector , syst , gs , md5sum , subst ) {
2005-04-20 20:34:44 +00:00
VAR_NUM_ROOMS = 0xFF ;
VAR_NUM_SCRIPTS = 0xFF ;
VAR_NUM_SOUNDS = 0xFF ;
VAR_NUM_COSTUMES = 0xFF ;
VAR_NUM_IMAGES = 0xFF ;
VAR_NUM_CHARSETS = 0xFF ;
VAR_POLYGONS_ONLY = 0xFF ;
}
2006-02-25 17:36:32 +00:00
ScummEngine_v80he : : ScummEngine_v80he ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v72he ( detector , syst , gs , md5sum , subst ) {
2006-01-05 07:06:47 +00:00
_heSndResId = 0 ;
_curSndId = 0 ;
2006-01-06 23:54:42 +00:00
_sndPtrOffs = 0 ;
_sndTmrOffs = 0 ;
2006-01-16 11:36:16 +00:00
VAR_PLATFORM = 0xFF ;
VAR_WINDOWS_VERSION = 0xFF ;
VAR_CURRENT_CHARSET = 0xFF ;
VAR_COLOR_DEPTH = 0xFF ;
2005-04-26 15:13:04 +00:00
}
2006-02-25 17:36:32 +00:00
ScummEngine_v90he : : ScummEngine_v90he ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v80he ( detector , syst , gs , md5sum , subst ) {
2005-05-23 09:30:43 +00:00
_sprite = new Sprite ( this ) ;
2006-01-16 11:36:16 +00:00
VAR_NUM_SPRITE_GROUPS = 0xFF ;
VAR_NUM_SPRITES = 0xFF ;
VAR_NUM_PALETTES = 0xFF ;
VAR_NUM_UNK = 0xFF ;
VAR_U32_VERSION = 0xFF ;
VAR_U32_ARRAY_UNK = 0xFF ;
2005-05-23 09:30:43 +00:00
}
2005-05-08 03:08:11 +00:00
ScummEngine_v90he : : ~ ScummEngine_v90he ( ) {
2005-09-08 19:26:43 +00:00
delete _sprite ;
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 98 ) {
2005-05-08 03:08:11 +00:00
delete _logicHE ;
}
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 99 ) {
2006-01-27 06:05:03 +00:00
free ( _hePalettes ) ;
}
2005-05-08 03:08:11 +00:00
}
2005-05-14 14:06:37 +00:00
# endif
2005-05-08 03:08:11 +00:00
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2006-02-25 17:36:32 +00:00
ScummEngine_v7 : : ScummEngine_v7 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v6 ( detector , syst , gs , md5sum , subst ) {
2005-04-28 22:17:23 +00:00
_existLanguageFile = false ;
_languageBuffer = NULL ;
_languageIndex = NULL ;
2005-11-02 21:47:44 +00:00
clearSubtitleQueue ( ) ;
2005-04-28 22:17:23 +00:00
}
ScummEngine_v7 : : ~ ScummEngine_v7 ( ) {
free ( _languageBuffer ) ;
free ( _languageIndex ) ;
}
2006-02-25 17:36:32 +00:00
ScummEngine_v8 : : ScummEngine_v8 ( GameDetector * detector , OSystem * syst , const ScummGameSettings & gs , uint8 md5sum [ 16 ] , SubstResFileNames subst )
: ScummEngine_v7 ( detector , syst , gs , md5sum , subst ) {
2005-04-23 16:52:11 +00:00
_objectIDMap = 0 ;
}
ScummEngine_v8 : : ~ ScummEngine_v8 ( ) {
delete [ ] _objectIDMap ;
}
2005-05-14 22:56:41 +00:00
# endif
2005-04-23 16:52:11 +00:00
2003-07-19 18:18:01 +00:00
# pragma mark -
# pragma mark --- Initialization ---
# pragma mark -
2004-11-24 00:14:21 +00:00
int ScummEngine : : init ( GameDetector & detector ) {
2003-07-19 18:18:01 +00:00
2004-11-15 03:57:22 +00:00
// Initialize backend
2004-11-24 00:14:21 +00:00
_system - > beginGFXTransaction ( ) ;
2006-02-18 00:12:36 +00:00
bool defaultTo1XScaler = false ;
2005-03-02 21:46:51 +00:00
if ( _renderMode = = Common : : kRenderHercA | | _renderMode = = Common : : kRenderHercG ) {
2005-03-09 23:07:32 +00:00
_system - > initSize ( Common : : kHercW , Common : : kHercH , 1 ) ;
2006-02-18 00:12:36 +00:00
defaultTo1XScaler = true ;
2005-02-20 00:17:22 +00:00
} else {
2005-03-10 16:29:08 +00:00
_system - > initSize ( _screenWidth , _screenHeight , ( detector . _force1xOverlay ? 1 : 2 ) ) ;
2006-02-18 00:12:36 +00:00
defaultTo1XScaler = ( _screenWidth > 320 ) ;
2005-02-20 00:17:22 +00:00
}
2006-02-18 00:12:36 +00:00
initCommonGFX ( detector , defaultTo1XScaler ) ;
2004-11-24 00:14:21 +00:00
_system - > endGFXTransaction ( ) ;
2004-11-15 03:57:22 +00:00
2005-06-14 08:54:11 +00:00
// On some systems it's not safe to run CD audio games from the CD.
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_AUDIOTRACKS )
2005-06-14 08:54:11 +00:00
checkCD ( ) ;
2004-11-15 03:57:22 +00:00
int cd_num = ConfMan . getInt ( " cdrom " ) ;
2006-02-20 16:51:30 +00:00
if ( cd_num > = 0 & & ( _game . features & GF_AUDIOTRACKS ) )
2004-11-15 03:57:22 +00:00
_system - > openCD ( cd_num ) ;
// Create the sound manager
_sound = new Sound ( this ) ;
2005-07-30 21:11:48 +00:00
2004-11-15 03:57:22 +00:00
// Setup the music engine
2006-02-20 16:51:30 +00:00
setupMusic ( _game . midi ) ;
2004-11-15 03:57:22 +00:00
// TODO: We shouldn't rely on the global Language values matching those COMI etc. expect.
// Rather we should explicitly translate them.
_language = Common : : parseLanguage ( ConfMan . get ( " language " ) ) ;
// Load localization data, if present
loadLanguageBundle ( ) ;
// Load CJK font, if present
loadCJKFont ( ) ;
// Create the charset renderer
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformNES )
2005-05-20 22:49:09 +00:00
_charset = new CharsetRendererNES ( this ) ;
2006-02-20 16:51:30 +00:00
else if ( _game . version < = 2 )
2004-11-15 03:57:22 +00:00
_charset = new CharsetRendererV2 ( this , _language ) ;
2006-02-20 16:51:30 +00:00
else if ( _game . version = = 3 )
2004-11-15 03:57:22 +00:00
_charset = new CharsetRendererV3 ( this ) ;
2005-07-30 21:11:48 +00:00
# ifndef DISABLE_SCUMM_7_8
2006-02-20 16:51:30 +00:00
else if ( _game . version = = 8 )
2004-11-15 03:57:22 +00:00
_charset = new CharsetRendererNut ( this ) ;
2005-06-18 15:44:40 +00:00
# endif
2004-11-15 03:57:22 +00:00
else
_charset = new CharsetRendererClassic ( this ) ;
// Create the costume renderer
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_NEW_COSTUMES ) {
2004-11-15 03:57:22 +00:00
_costumeRenderer = new AkosRenderer ( this ) ;
2005-03-27 01:07:22 +00:00
_costumeLoader = new AkosCostumeLoader ( this ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformC64 & & _game . id = = GID_MANIAC ) {
2005-05-21 03:30:23 +00:00
_costumeRenderer = new C64CostumeRenderer ( this ) ;
_costumeLoader = new C64CostumeLoader ( this ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformNES ) {
2005-03-27 00:23:38 +00:00
_costumeRenderer = new NESCostumeRenderer ( this ) ;
2005-03-27 01:07:22 +00:00
_costumeLoader = new NESCostumeLoader ( this ) ;
} else {
2005-03-27 00:23:38 +00:00
_costumeRenderer = new ClassicCostumeRenderer ( this ) ;
2005-03-27 01:07:22 +00:00
_costumeLoader = new ClassicCostumeLoader ( this ) ;
}
2004-11-15 03:57:22 +00:00
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2004-11-15 03:57:22 +00:00
// Create FT INSANE object
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_FT )
2004-11-15 03:57:22 +00:00
_insane = new Insane ( ( ScummEngine_v6 * ) this ) ;
else
2005-05-14 22:56:41 +00:00
# endif
2004-11-15 03:57:22 +00:00
_insane = 0 ;
// Load game from specified slot, if any
if ( ConfMan . hasKey ( " save_slot " ) ) {
requestLoad ( ConfMan . getInt ( " save_slot " ) ) ;
}
2006-02-25 02:31:49 +00:00
allocResTypeData ( rtBuffer , 0 , 10 , " buffer " , 0 ) ;
2003-07-19 18:18:01 +00:00
setupScummVars ( ) ;
setupOpcodes ( ) ;
2006-02-20 16:51:30 +00:00
if ( _game . version = = 8 )
2005-05-11 14:21:07 +00:00
_numActors = 80 ;
2006-02-20 16:51:30 +00:00
else if ( _game . version = = 7 )
2005-05-11 14:21:07 +00:00
_numActors = 30 ;
2006-02-20 16:51:30 +00:00
else if ( _game . id = = GID_SAMNMAX )
2005-05-13 06:32:01 +00:00
_numActors = 30 ;
2006-02-20 16:51:30 +00:00
else if ( _game . id = = GID_MANIAC )
2005-05-11 14:21:07 +00:00
_numActors = 25 ;
2006-02-20 16:51:30 +00:00
else if ( _game . heversion > = 80 )
2005-05-11 14:39:04 +00:00
_numActors = 62 ;
2006-02-20 16:51:30 +00:00
else if ( _game . heversion > = 72 )
2005-05-11 14:32:21 +00:00
_numActors = 30 ;
2005-07-30 21:11:48 +00:00
else
2005-05-11 14:21:07 +00:00
_numActors = 13 ;
2006-02-20 16:51:30 +00:00
if ( _game . version > = 7 )
2003-07-19 18:18:01 +00:00
OF_OWNER_ROOM = 0xFF ;
else
OF_OWNER_ROOM = 0x0F ;
2006-02-20 16:51:30 +00:00
// if (_game.id==GID_MONKEY2 && _bootParam == 0)
2003-07-19 18:18:01 +00:00
// _bootParam = 10001;
2006-02-20 16:51:30 +00:00
if ( ! _copyProtection & & _game . id = = GID_INDY4 & & _bootParam = = 0 ) {
2003-07-19 18:18:01 +00:00
_bootParam = - 7873 ;
}
2006-02-20 16:51:30 +00:00
if ( ! _copyProtection & & _game . id = = GID_SAMNMAX & & _bootParam = = 0 ) {
2004-09-18 05:00:38 +00:00
_bootParam = - 1 ;
}
2003-07-19 18:18:01 +00:00
readIndexFile ( ) ;
2005-10-08 21:34:59 +00:00
# ifdef PALMOS_68K
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_NEW_COSTUMES )
2005-06-02 14:40:13 +00:00
res . _maxHeapThreshold = gVars - > memory [ kMemScummNewCostGames ] ;
else
res . _maxHeapThreshold = gVars - > memory [ kMemScummOldCostGames ] ;
# else
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_NEW_COSTUMES ) {
2005-06-02 14:40:13 +00:00
// Since the new costumes are very big, we increase the heap limit, to avoid having
// to constantly reload stuff from the data files.
2005-11-09 19:59:57 +00:00
res . _maxHeapThreshold = 6 * 1024 * 1024 ;
2005-06-02 14:40:13 +00:00
} else {
res . _maxHeapThreshold = 550000 ;
}
# endif
res . _minHeapThreshold = 400000 ;
2003-07-19 18:18:01 +00:00
scummInit ( ) ;
2004-09-20 22:04:06 +00:00
initScummVars ( ) ;
2003-07-19 18:18:01 +00:00
2004-07-22 04:13:46 +00:00
if ( VAR_DEBUGMODE ! = 0xFF ) {
2004-09-19 08:37:20 +00:00
VAR ( VAR_DEBUGMODE ) = _debugMode ;
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 80 & & _debugMode )
2004-09-19 08:37:20 +00:00
VAR ( 85 ) = 1 ;
2003-07-19 18:18:01 +00:00
}
2003-12-26 23:11:35 +00:00
if ( _imuse ) {
_imuse - > setBase ( res . address [ rtSound ] ) ;
}
2005-04-13 13:32:58 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . version > = 5 )
2005-04-13 13:32:58 +00:00
_sound - > setupSound ( ) ;
2003-07-19 18:18:01 +00:00
2005-11-27 02:35:57 +00:00
# if (defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__))
2005-10-08 21:34:59 +00:00
Graphics : : initfonts ( ) ;
# endif
2004-01-14 10:02:33 +00:00
// Create debugger
if ( ! _debugger )
_debugger = new ScummDebugger ( this ) ;
2004-11-23 00:03:25 +00:00
return 0 ;
2003-07-19 18:18:01 +00:00
}
2003-10-02 22:42:03 +00:00
void ScummEngine : : scummInit ( ) {
2001-10-09 14:30:12 +00:00
int i ;
2004-09-20 22:04:06 +00:00
_tempMusic = 0 ;
2001-10-09 14:30:12 +00:00
debug ( 9 , " scummInit " ) ;
2001-11-26 19:57:57 +00:00
2006-02-20 16:51:30 +00:00
if ( ( _game . id = = GID_MANIAC ) & & ( _game . version = = 1 ) & & ! ( _game . platform = = Common : : kPlatformNES ) ) {
if ( _game . platform = = Common : : kPlatformC64 )
2005-05-19 02:18:34 +00:00
initScreens ( 8 , 144 ) ;
else
initScreens ( 16 , 152 ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version > = 7 | | _game . heversion > = 71 ) {
2004-01-04 14:49:14 +00:00
initScreens ( 0 , _screenHeight ) ;
2002-12-26 01:47:40 +00:00
} else {
2004-01-04 14:49:14 +00:00
initScreens ( 16 , 144 ) ;
2002-12-26 01:47:40 +00:00
}
2005-04-10 00:51:47 +00:00
_palManipCounter = 0 ;
2003-10-13 12:17:26 +00:00
for ( i = 0 ; i < 256 ; i + + )
_roomPalette [ i ] = i ;
2006-02-20 16:51:30 +00:00
if ( _game . version = = 1 ) {
2003-12-15 16:11:43 +00:00
// Use 17 color table for v1 games to allow
// correct color for inventory and sentence
// line
// Original games used some kind of dynamic
// color table remapping between rooms
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformC64 ) {
2005-05-18 00:46:30 +00:00
setupC64Palette ( ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformNES ) {
2005-11-20 08:29:17 +00:00
setupNESPalette ( ) ;
} else {
setupV1Palette ( ) ;
2005-05-18 00:46:30 +00:00
}
2006-02-20 16:51:30 +00:00
} else if ( _game . features & GF_16COLOR ) {
2003-10-13 12:17:26 +00:00
for ( i = 0 ; i < 16 ; i + + )
2003-07-11 14:54:16 +00:00
_shadowPalette [ i ] = i ;
2005-03-07 00:53:30 +00:00
switch ( _renderMode ) {
case Common : : kRenderEGA :
setupEGAPalette ( ) ;
break ;
case Common : : kRenderAmiga :
2003-07-11 10:13:42 +00:00
setupAmigaPalette ( ) ;
2005-03-07 00:53:30 +00:00
break ;
case Common : : kRenderCGA :
2005-02-20 00:17:22 +00:00
setupCGAPalette ( ) ;
2005-03-07 00:53:30 +00:00
break ;
case Common : : kRenderHercA :
case Common : : kRenderHercG :
setupHercPalette ( ) ;
break ;
default :
2006-02-20 16:51:30 +00:00
if ( ( _game . platform = = Common : : kPlatformAmiga ) | | ( _game . platform = = Common : : kPlatformAtariST ) )
2005-03-07 00:53:30 +00:00
setupAmigaPalette ( ) ;
else
setupEGAPalette ( ) ;
}
2003-04-08 20:10:51 +00:00
}
2003-05-30 14:29:07 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . version > 3 & & _game . version < 8 )
2002-04-11 17:19:16 +00:00
loadCharset ( 1 ) ;
2005-07-30 21:11:48 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_OLD_BUNDLE )
2003-04-12 20:07:08 +00:00
loadCharset ( 0 ) ; // FIXME - HACK ?
2001-12-27 17:51:58 +00:00
2001-10-09 14:30:12 +00:00
setShake ( 0 ) ;
2001-11-06 20:00:47 +00:00
setupCursor ( ) ;
2005-07-30 21:11:48 +00:00
2002-12-29 19:54:11 +00:00
// Allocate and Initialize actors
2003-05-20 20:42:28 +00:00
Actor : : initActorClass ( this ) ;
2003-05-13 23:42:41 +00:00
_actors = new Actor [ _numActors ] ;
2005-04-30 22:01:16 +00:00
_sortedActors = new Actor * [ _numActors ] ;
2003-08-12 16:43:43 +00:00
for ( i = 0 ; i < _numActors ; i + + ) {
2005-03-11 01:10:06 +00:00
_actors [ i ] . _number = i ;
2003-05-23 12:48:50 +00:00
_actors [ i ] . initActor ( 1 ) ;
2005-07-30 21:11:48 +00:00
2003-06-07 04:24:57 +00:00
// this is from IDB
2006-02-20 16:51:30 +00:00
if ( ( _game . version = = 1 ) | | ( _game . id = = GID_MANIAC & & _demoMode ) )
2003-06-07 14:02:07 +00:00
_actors [ i ] . setActorCostume ( i ) ;
2001-10-09 14:30:12 +00:00
}
2003-03-06 17:58:13 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_MANIAC & & _game . version = = 1 ) {
2004-07-26 15:14:10 +00:00
setupV1ActorTalkColor ( ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . id = = GID_MANIAC & & _game . version = = 2 & & _demoMode ) {
2004-07-26 15:14:10 +00:00
// HACK Some palette changes needed for demo script
2004-08-21 22:33:23 +00:00
// in Maniac Mansion (Enhanced)
2004-03-04 03:08:42 +00:00
_actors [ 3 ] . setPalette ( 3 , 1 ) ;
2005-03-11 01:10:06 +00:00
_actors [ 9 ] . _talkColor = 15 ;
_actors [ 10 ] . _talkColor = 7 ;
_actors [ 11 ] . _talkColor = 2 ;
_actors [ 13 ] . _talkColor = 5 ;
_actors [ 23 ] . _talkColor = 14 ;
2004-03-04 03:08:42 +00:00
}
2003-09-11 10:32:15 +00:00
vm . numNestedScripts = 0 ;
2001-10-09 14:30:12 +00:00
vm . cutSceneStackPointer = 0 ;
memset ( vm . cutScenePtr , 0 , sizeof ( vm . cutScenePtr ) ) ;
memset ( vm . cutSceneData , 0 , sizeof ( vm . cutSceneData ) ) ;
2003-12-26 23:11:35 +00:00
for ( i = 0 ; i < _numVerbs ; i + + ) {
2001-10-16 10:01:48 +00:00
_verbs [ i ] . verbid = 0 ;
2004-01-15 19:25:17 +00:00
_verbs [ i ] . curRect . right = _screenWidth - 1 ;
_verbs [ i ] . oldRect . left = - 1 ;
2001-10-16 10:01:48 +00:00
_verbs [ i ] . type = 0 ;
_verbs [ i ] . color = 2 ;
_verbs [ i ] . hicolor = 0 ;
_verbs [ i ] . charset_nr = 1 ;
_verbs [ i ] . curmode = 0 ;
_verbs [ i ] . saveid = 0 ;
2002-04-11 17:19:16 +00:00
_verbs [ i ] . center = 0 ;
2001-10-16 10:01:48 +00:00
_verbs [ i ] . key = 0 ;
2001-10-09 14:30:12 +00:00
}
2006-02-20 16:51:30 +00:00
if ( _game . version = = 7 ) {
2004-08-06 02:10:23 +00:00
VAR ( VAR_CAMERA_THRESHOLD_X ) = 100 ;
VAR ( VAR_CAMERA_THRESHOLD_Y ) = 70 ;
VAR ( VAR_CAMERA_ACCEL_X ) = 100 ;
VAR ( VAR_CAMERA_ACCEL_Y ) = 100 ;
2006-02-20 16:51:30 +00:00
} else if ( ! ( _game . features & GF_NEW_CAMERA ) ) {
if ( _game . platform = = Common : : kPlatformNES ) {
2005-03-21 23:51:48 +00:00
camera . _leftTrigger = 6 ; // 6
camera . _rightTrigger = 21 ; // 25
2005-03-15 04:24:49 +00:00
} else {
camera . _leftTrigger = 10 ;
2006-02-20 16:51:30 +00:00
camera . _rightTrigger = ( _game . heversion > = 71 ) ? 70 : 30 ;
2005-03-15 04:24:49 +00:00
}
2002-03-05 23:41:41 +00:00
camera . _mode = 0 ;
2002-04-11 17:19:16 +00:00
}
2001-10-09 14:30:12 +00:00
camera . _follows = 0 ;
virtscr [ 0 ] . xstart = 0 ;
2004-01-08 21:21:40 +00:00
if ( VAR_CURRENT_LIGHTS ! = 0xFF ) {
2002-08-23 22:40:26 +00:00
// Setup light
2003-05-15 22:48:06 +00:00
_flashlight . xStrips = 7 ;
_flashlight . yStrips = 7 ;
2002-11-10 17:19:43 +00:00
_flashlight . buffer = NULL ;
2002-03-05 23:41:41 +00:00
}
2001-10-09 14:30:12 +00:00
2003-05-15 22:41:35 +00:00
_mouse . x = 104 ;
_mouse . y = 56 ;
2001-10-09 14:30:12 +00:00
_ENCD_offs = 0 ;
_EXCD_offs = 0 ;
_currentScript = 0xFF ;
2001-11-26 19:57:57 +00:00
_sentenceNum = 0 ;
2001-10-09 14:30:12 +00:00
_currentRoom = 0 ;
_numObjectsInRoom = 0 ;
_actorToPrintStrFor = 0 ;
2002-12-26 00:21:19 +00:00
_charsetBufPos = 0 ;
2001-10-09 14:30:12 +00:00
_haveMsg = 0 ;
2005-11-02 21:47:44 +00:00
_haveActorSpeechMsg = false ;
2001-10-09 14:30:12 +00:00
2002-03-06 10:03:00 +00:00
_varwatch = - 1 ;
2001-10-09 14:30:12 +00:00
_screenStartStrip = 0 ;
2004-02-21 06:44:10 +00:00
_defaultTalkDelay = 3 ;
2001-10-09 14:30:12 +00:00
_talkDelay = 0 ;
_keepText = false ;
2002-12-04 13:36:27 +00:00
_currentCursor = 0 ;
2002-12-04 22:31:36 +00:00
_cursor . state = 0 ;
2001-10-09 14:30:12 +00:00
_userPut = 0 ;
2002-04-11 17:19:16 +00:00
2001-10-09 14:30:12 +00:00
_newEffect = 129 ;
2001-11-09 18:54:15 +00:00
_fullRedraw = true ;
2001-10-09 14:30:12 +00:00
clearDrawObjectQueue ( ) ;
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformNES )
2005-03-16 03:20:32 +00:00
decodeNESBaseTiles ( ) ;
2005-03-14 21:13:35 +00:00
2002-04-11 17:19:16 +00:00
for ( i = 0 ; i < 6 ; i + + ) {
2006-02-20 16:51:30 +00:00
if ( _game . version = = 3 ) { // FIXME - what is this?
2004-04-05 23:54:58 +00:00
_string [ i ] . _default . xpos = 0 ;
_string [ i ] . _default . ypos = 0 ;
2002-02-19 22:36:09 +00:00
} else {
2004-04-05 23:54:58 +00:00
_string [ i ] . _default . xpos = 2 ;
_string [ i ] . _default . ypos = 5 ;
2002-02-19 22:36:09 +00:00
}
2004-04-05 23:54:58 +00:00
_string [ i ] . _default . right = _screenWidth - 1 ;
2005-03-18 15:04:37 +00:00
_string [ i ] . _default . height = 0 ;
2004-04-05 23:54:58 +00:00
_string [ i ] . _default . color = 0xF ;
_string [ i ] . _default . center = 0 ;
_string [ i ] . _default . charset = 0 ;
2001-10-09 14:30:12 +00:00
}
2003-12-05 00:02:01 +00:00
// all keys are released
for ( i = 0 ; i < 512 ; i + + )
_keyDownMap [ i ] = false ;
2004-09-28 20:19:37 +00:00
_lastSaveTime = _system - > getMillis ( ) ;
2004-09-26 07:30:29 +00:00
}
2004-09-13 23:24:36 +00:00
2005-10-02 13:21:49 +00:00
void ScummEngine_c64 : : scummInit ( ) {
ScummEngine : : scummInit ( ) ;
initC64Verbs ( ) ;
}
2004-09-26 07:30:29 +00:00
void ScummEngine_v2 : : scummInit ( ) {
ScummEngine : : scummInit ( ) ;
2004-09-13 23:24:36 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformNES ) {
2005-03-22 00:46:48 +00:00
initNESMouseOver ( ) ;
2005-03-21 00:27:39 +00:00
_switchRoomEffect2 = _switchRoomEffect = 6 ;
} else {
2005-03-22 00:46:48 +00:00
initV2MouseOver ( ) ;
2005-03-21 00:27:39 +00:00
// Seems in V2 there was only a single room effect (iris),
// so we set that here.
_switchRoomEffect2 = 1 ;
_switchRoomEffect = 5 ;
}
2005-10-15 06:41:48 +00:00
_inventoryOffset = 0 ;
2001-10-09 14:30:12 +00:00
}
2004-08-22 23:38:00 +00:00
void ScummEngine_v6 : : scummInit ( ) {
ScummEngine : : scummInit ( ) ;
2005-07-19 17:53:55 +00:00
setDefaultCursor ( ) ;
2004-10-13 08:08:45 +00:00
}
void ScummEngine_v60he : : scummInit ( ) {
ScummEngine : : scummInit ( ) ;
2004-09-18 20:29:13 +00:00
// HACK cursor hotspot is wrong
2005-07-30 21:11:48 +00:00
// Original games used
2004-09-18 20:29:13 +00:00
// setCursorHotspot(8, 7);
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_FUNPACK )
2004-09-18 20:29:13 +00:00
setCursorHotspot ( 16 , 16 ) ;
2004-09-26 07:30:29 +00:00
}
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2005-04-13 10:34:47 +00:00
void ScummEngine_v72he : : scummInit ( ) {
ScummEngine_v60he : : scummInit ( ) ;
_stringLength = 1 ;
memset ( _stringBuffer , 0 , sizeof ( _stringBuffer ) ) ;
}
2004-09-26 15:29:58 +00:00
void ScummEngine_v90he : : scummInit ( ) {
2005-04-13 10:34:47 +00:00
ScummEngine_v72he : : scummInit ( ) ;
2004-10-13 09:18:17 +00:00
_heObject = 0 ;
_heObjectNum = 0 ;
_hePaletteNum = 0 ;
2005-05-23 11:50:36 +00:00
_sprite - > resetTables ( 0 ) ;
2004-09-26 15:29:58 +00:00
memset ( & _wizParams , 0 , sizeof ( _wizParams ) ) ;
2005-04-20 03:13:06 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_HE_CURSORLESS )
2005-04-20 03:13:06 +00:00
setDefaultCursor ( ) ;
2005-05-08 03:08:11 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 98 ) {
switch ( _game . id ) {
2005-05-10 22:31:48 +00:00
case GID_PUTTRACE :
_logicHE = new LogicHErace ( this ) ;
break ;
case GID_FUNSHOP :
_logicHE = new LogicHEfunshop ( this ) ;
break ;
2005-05-12 01:21:04 +00:00
case GID_FOOTBALL :
_logicHE = new LogicHEfootball ( this ) ;
break ;
2006-02-12 13:45:57 +00:00
case GID_SOCCER :
_logicHE = new LogicHEsoccer ( this ) ;
break ;
2005-05-10 22:31:48 +00:00
default :
_logicHE = new LogicHE ( this ) ;
break ;
}
2005-05-08 03:08:11 +00:00
}
2004-09-26 15:29:58 +00:00
}
2005-04-07 11:15:10 +00:00
void ScummEngine_v99he : : scummInit ( ) {
ScummEngine_v90he : : scummInit ( ) ;
_hePalettes = ( uint8 * ) malloc ( ( _numPalettes + 1 ) * 1024 ) ;
2005-06-02 14:40:13 +00:00
memset ( _hePalettes , 0 , ( _numPalettes + 1 ) * 1024 ) ;
2005-04-08 00:38:12 +00:00
// Array 129 is set to base name
2006-01-21 13:01:20 +00:00
int len = resStrLen ( ( const byte * ) _baseName . c_str ( ) ) + 1 ;
2005-04-08 00:38:12 +00:00
ArrayHeader * ah = defineArray ( 129 , kStringArray , 0 , 0 , 0 , len ) ;
2006-01-21 13:01:20 +00:00
memcpy ( ah - > data , _baseName . c_str ( ) , len ) ;
2005-04-08 00:38:12 +00:00
2005-04-07 11:15:10 +00:00
}
2005-05-14 14:06:37 +00:00
# endif
2005-04-07 11:15:10 +00:00
2004-09-20 22:04:06 +00:00
void ScummEngine : : setupMusic ( int midi ) {
2005-12-30 14:18:21 +00:00
int midiDriver = MidiDriver : : detectMusicDriver ( midi ) ;
_native_mt32 = ( ( midiDriver = = MD_MT32 ) | | ConfMan . getBool ( " native_mt32 " ) ) ;
switch ( midiDriver ) {
case MD_NULL :
_musicType = MDT_NONE ;
break ;
case MD_PCSPK :
case MD_PCJR :
_musicType = MDT_PCSPK ;
break ;
case MD_TOWNS :
_musicType = MDT_TOWNS ;
break ;
case MD_ADLIB :
_musicType = MDT_ADLIB ;
break ;
default :
_musicType = MDT_MIDI ;
break ;
}
2005-04-19 06:16:53 +00:00
// FIXME: MD_TOWNS should not be _midi_native in the first place!! iMuse code needs to be restructured.
2006-02-20 16:51:30 +00:00
if ( ( _game . id = = GID_TENTACLE ) | | ( _game . id = = GID_SAMNMAX ) | | ( midiDriver = = MD_TOWNS ) )
2005-04-13 00:11:49 +00:00
_enable_gs = false ;
2005-07-30 21:11:48 +00:00
else
2005-04-13 00:11:49 +00:00
_enable_gs = ConfMan . getBool ( " enable_gs " ) ;
2003-04-22 04:40:30 +00:00
2004-09-20 22:04:06 +00:00
/* Bind the mixer to the system => mixer will be invoked
* automatically when samples need to be generated */
if ( ! _mixer - > isReady ( ) ) {
2005-10-14 11:04:15 +00:00
warning ( " Sound mixer initialization failed \n " ) ;
2005-12-30 14:18:21 +00:00
if ( _musicType = = MDT_ADLIB | | _musicType = = MDT_PCSPK ) {
midiDriver = MD_NULL ;
_musicType = MDT_NONE ;
2005-10-14 11:04:15 +00:00
warning ( " MIDI driver depends on sound mixer, switching to null MIDI driver \n " ) ;
2003-12-26 07:31:39 +00:00
}
2003-06-07 00:13:26 +00:00
}
2004-09-20 22:04:06 +00:00
// Init iMuse
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_DIGI_IMUSE ) {
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2004-09-20 22:04:06 +00:00
_musicEngine = _imuseDigital = new IMuseDigital ( this , 10 ) ;
2005-05-14 22:56:41 +00:00
# endif
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformC64 ) {
2005-05-18 01:17:17 +00:00
// TODO
_musicEngine = NULL ;
2006-02-20 16:51:30 +00:00
} else if ( _game . platform = = Common : : kPlatformNES ) {
2005-04-07 07:29:19 +00:00
_musicEngine = new Player_NES ( this ) ;
2006-02-20 16:51:30 +00:00
} else if ( ( _game . platform = = Common : : kPlatformAmiga ) & & ( _game . version = = 2 ) ) {
2004-09-20 22:04:06 +00:00
_musicEngine = new Player_V2A ( this ) ;
2006-02-20 16:51:30 +00:00
} else if ( ( _game . platform = = Common : : kPlatformAmiga ) & & ( _game . version = = 3 ) ) {
2004-09-20 22:04:06 +00:00
_musicEngine = new Player_V3A ( this ) ;
2006-02-20 16:51:30 +00:00
} else if ( ( _game . platform = = Common : : kPlatformAmiga ) & & ( _game . version < = 4 ) ) {
2004-09-20 22:04:06 +00:00
_musicEngine = NULL ;
2006-02-20 16:51:30 +00:00
} else if ( _game . id = = GID_MANIAC & & ( _game . version = = 1 ) ) {
2005-12-30 14:18:21 +00:00
_musicEngine = new Player_V1 ( this , midiDriver ! = MD_PCSPK ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version < = 2 ) {
2005-12-30 14:18:21 +00:00
_musicEngine = new Player_V2 ( this , midiDriver ! = MD_PCSPK ) ;
2006-02-20 16:51:30 +00:00
} else if ( ( _musicType = = MDT_PCSPK ) & & ( ( _game . version > 2 ) & & ( _game . version < = 4 ) ) ) {
2005-12-30 14:18:21 +00:00
_musicEngine = new Player_V2 ( this , midiDriver ! = MD_PCSPK ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version > = 3 & & _game . heversion < = 61 & & _game . platform ! = Common : : kPlatform3DO ) {
2005-12-30 14:18:21 +00:00
MidiDriver * nativeMidiDriver = 0 ;
MidiDriver * adlibMidiDriver = 0 ;
if ( _musicType ! = MDT_ADLIB )
nativeMidiDriver = MidiDriver : : createMidi ( midiDriver ) ;
2004-11-27 14:53:37 +00:00
if ( nativeMidiDriver ! = NULL & & _native_mt32 )
2005-12-30 14:18:21 +00:00
nativeMidiDriver - > property ( MidiDriver : : PROP_CHANNEL_MASK , 0x03FE ) ;
bool multi_midi = ConfMan . getBool ( " multi_midi " ) & & _musicType ! = MDT_NONE & & ( midi & MDT_ADLIB ) ;
if ( _musicType = = MDT_ADLIB | | multi_midi ) {
2004-11-27 14:53:37 +00:00
adlibMidiDriver = MidiDriver_ADLIB_create ( _mixer ) ;
2006-02-20 16:51:30 +00:00
adlibMidiDriver - > property ( MidiDriver : : PROP_OLD_ADLIB , ( _game . features & GF_SMALL_HEADER ) ? 1 : 0 ) ;
2005-12-30 14:18:21 +00:00
}
2004-11-27 14:53:37 +00:00
_musicEngine = _imuse = IMuse : : create ( _system , nativeMidiDriver , adlibMidiDriver ) ;
2004-09-20 22:04:06 +00:00
if ( _imuse ) {
if ( ConfMan . hasKey ( " tempo " ) )
_imuse - > property ( IMuse : : PROP_TEMPO_BASE , ConfMan . getInt ( " tempo " ) ) ;
_imuse - > property ( IMuse : : PROP_NATIVE_MT32 , _native_mt32 ) ;
2005-04-13 00:11:49 +00:00
_imuse - > property ( IMuse : : PROP_GS , _enable_gs ) ;
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 60 | | midi = = MDT_TOWNS ) {
2004-09-20 22:04:06 +00:00
_imuse - > property ( IMuse : : PROP_LIMIT_PLAYERS , 1 ) ;
_imuse - > property ( IMuse : : PROP_RECYCLE_PLAYERS , 1 ) ;
}
if ( midi = = MDT_TOWNS )
_imuse - > property ( IMuse : : PROP_DIRECT_PASSTHROUGH , 1 ) ;
}
2004-07-15 23:15:13 +00:00
}
2004-11-28 21:24:02 +00:00
setupVolumes ( ) ;
2003-03-06 17:58:13 +00:00
}
2001-10-09 14:30:12 +00:00
2004-11-28 21:24:02 +00:00
void ScummEngine : : setupVolumes ( ) {
// Sync the engine with the config manager
int soundVolumeMusic = ConfMan . getInt ( " music_volume " ) ;
int soundVolumeSfx = ConfMan . getInt ( " sfx_volume " ) ;
int soundVolumeSpeech = ConfMan . getInt ( " speech_volume " ) ;
if ( _musicEngine ) {
2004-12-25 23:43:05 +00:00
_musicEngine - > setMusicVolume ( soundVolumeMusic ) ;
2004-11-28 21:24:02 +00:00
}
2005-05-10 23:48:48 +00:00
_mixer - > setVolumeForSoundType ( Audio : : Mixer : : kSFXSoundType , soundVolumeSfx ) ;
_mixer - > setVolumeForSoundType ( Audio : : Mixer : : kMusicSoundType , soundVolumeMusic ) ;
_mixer - > setVolumeForSoundType ( Audio : : Mixer : : kSpeechSoundType , soundVolumeSpeech ) ;
2004-11-28 21:24:02 +00:00
}
2004-09-20 22:04:06 +00:00
2003-07-19 18:18:01 +00:00
# pragma mark -
# pragma mark --- Main loop ---
# pragma mark -
2004-11-23 00:03:25 +00:00
int ScummEngine : : go ( ) {
2005-10-01 21:13:38 +00:00
_engineStartTime = _system - > getMillis ( ) / 1000 ;
2004-11-23 09:36:46 +00:00
// If requested, load a save game instead of running the boot script
if ( _saveLoadFlag ! = 2 | | ! loadState ( _saveLoadSlot , _saveTemporaryState ) ) {
int args [ 16 ] ;
memset ( args , 0 , sizeof ( args ) ) ;
2005-07-30 21:11:48 +00:00
args [ 0 ] = _bootParam ;
2004-11-23 09:36:46 +00:00
_saveLoadFlag = 0 ;
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 98 ) {
2005-05-08 03:08:11 +00:00
( ( ScummEngine_v90he * ) this ) - > _logicHE - > initOnce ( ) ;
( ( ScummEngine_v90he * ) this ) - > _logicHE - > beforeBootScript ( ) ;
}
2005-05-14 14:06:37 +00:00
# endif
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_MANIAC & & _demoMode )
2004-11-23 09:36:46 +00:00
runScript ( 9 , 0 , 0 , args ) ;
else
runScript ( 1 , 0 , 0 , args ) ;
} else {
_saveLoadFlag = 0 ;
}
2003-07-19 18:18:01 +00:00
int delta = 0 ;
2004-09-28 20:19:37 +00:00
int diff = _system - > getMillis ( ) ;
2003-07-19 18:18:01 +00:00
while ( ! _quit ) {
updatePalette ( ) ;
2004-02-28 12:58:13 +00:00
_system - > updateScreen ( ) ;
2003-07-19 18:18:01 +00:00
2004-09-28 20:19:37 +00:00
diff - = _system - > getMillis ( ) ;
2003-07-19 18:18:01 +00:00
waitForTimer ( delta * 15 + diff ) ;
2004-09-28 20:19:37 +00:00
diff = _system - > getMillis ( ) ;
2003-07-19 18:18:01 +00:00
delta = scummLoop ( delta ) ;
if ( delta < 1 ) // Ensure we don't get into a loop
delta = 1 ; // by not decreasing sleepers.
if ( _quit ) {
// TODO: Maybe perform an autosave on exit?
}
}
2005-07-30 21:11:48 +00:00
2004-11-23 00:03:25 +00:00
return 0 ;
2003-07-19 18:18:01 +00:00
}
2003-10-02 22:42:03 +00:00
void ScummEngine : : waitForTimer ( int msec_delay ) {
2003-07-19 18:18:01 +00:00
uint32 start_time ;
if ( _fastMode & 2 )
msec_delay = 0 ;
else if ( _fastMode & 1 )
msec_delay = 10 ;
2004-09-28 20:19:37 +00:00
start_time = _system - > getMillis ( ) ;
2003-07-19 18:18:01 +00:00
while ( ! _quit ) {
_sound - > updateCD ( ) ; // Loop CD Audio if needed
2006-01-28 16:30:39 +00:00
parseEvents ( ) ;
2004-09-28 20:19:37 +00:00
if ( _system - > getMillis ( ) > = start_time + msec_delay )
2003-07-19 18:18:01 +00:00
break ;
2004-09-28 20:19:37 +00:00
_system - > delayMillis ( 10 ) ;
2001-10-09 14:30:12 +00:00
}
}
2003-10-02 22:42:03 +00:00
int ScummEngine : : scummLoop ( int delta ) {
2003-10-12 17:49:52 +00:00
if ( _debugger - > isAttached ( ) )
_debugger - > onFrame ( ) ;
2002-04-11 17:19:16 +00:00
2002-07-19 01:40:24 +00:00
// Randomize the PRNG by calling it at regular intervals. This ensures
// that it will be in a different state each time you run the program.
2002-12-01 14:57:50 +00:00
_rnd . getRandomNumber ( 2 ) ;
2002-07-19 01:40:24 +00:00
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 98 ) {
2005-05-08 03:08:11 +00:00
( ( ScummEngine_v90he * ) this ) - > _logicHE - > startOfFrame ( ) ;
}
2005-05-14 14:06:37 +00:00
# endif
2006-02-20 16:51:30 +00:00
if ( _game . version > 2 ) {
2003-05-08 15:58:30 +00:00
VAR ( VAR_TMR_1 ) + = delta ;
VAR ( VAR_TMR_2 ) + = delta ;
VAR ( VAR_TMR_3 ) + = delta ;
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_ZAK | | _game . id = = GID_INDY3 ) {
2004-07-21 12:05:00 +00:00
// All versions of Indy3 set three extra timers
2004-09-29 09:42:36 +00:00
// FM-TOWNS version of Zak sets three extra timers
2004-07-18 11:46:50 +00:00
VAR ( 39 ) + = delta ;
VAR ( 40 ) + = delta ;
VAR ( 41 ) + = delta ;
}
2003-05-08 15:58:30 +00:00
}
2003-05-10 22:35:12 +00:00
if ( VAR_TMR_4 ! = 0xFF )
VAR ( VAR_TMR_4 ) + = delta ;
2001-10-09 14:30:12 +00:00
2001-11-09 18:54:15 +00:00
if ( delta > 15 )
delta = 15 ;
2001-10-23 19:51:50 +00:00
2001-11-09 18:54:15 +00:00
decreaseScriptDelay ( delta ) ;
2001-11-05 19:21:49 +00:00
2004-07-14 08:55:31 +00:00
_talkDelay - = delta ;
if ( _talkDelay < 0 )
_talkDelay = 0 ;
2001-11-09 18:54:15 +00:00
2003-07-12 12:16:17 +00:00
// Record the current ego actor before any scripts (including input scripts)
// get a chance to run.
int oldEgo = 0 ;
if ( VAR_EGO ! = 0xFF )
oldEgo = VAR ( VAR_EGO ) ;
2003-09-10 00:28:26 +00:00
// In V1-V3 games, CHARSET_1 is called much earlier than in newer games.
// See also bug #770042 for a case were this makes a difference.
2006-02-20 16:51:30 +00:00
if ( _game . version < = 3 )
2003-09-10 00:28:26 +00:00
CHARSET_1 ( ) ;
2004-01-25 12:20:59 +00:00
processKbd ( false ) ;
2001-11-09 18:54:15 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_NEW_CAMERA ) {
2003-05-08 15:48:50 +00:00
VAR ( VAR_CAMERA_POS_X ) = camera . _cur . x ;
VAR ( VAR_CAMERA_POS_Y ) = camera . _cur . y ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version < = 2 ) {
2003-05-16 23:54:58 +00:00
VAR ( VAR_CAMERA_POS_X ) = camera . _cur . x / 8 ;
2002-03-06 00:18:22 +00:00
} else {
2003-05-08 15:48:50 +00:00
VAR ( VAR_CAMERA_POS_X ) = camera . _cur . x ;
2002-03-06 00:18:22 +00:00
}
2006-02-20 16:51:30 +00:00
if ( _game . version < = 7 )
2005-11-02 21:47:44 +00:00
VAR ( VAR_HAVE_MSG ) = _haveMsg ;
2005-09-24 05:26:12 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformC64 & & _game . id = = GID_MANIAC ) {
2005-09-24 05:26:12 +00:00
// TODO
2006-02-20 16:51:30 +00:00
} else if ( _game . version < = 2 ) {
2003-05-15 22:41:35 +00:00
VAR ( VAR_VIRT_MOUSE_X ) = _virtualMouse . x / 8 ;
VAR ( VAR_VIRT_MOUSE_Y ) = _virtualMouse . y / 2 ;
2005-03-24 03:22:32 +00:00
// Adjust mouse coordinates as narrow rooms in NES are centered
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformNES & & _NESStartStrip > 0 ) {
2005-03-24 21:34:35 +00:00
VAR ( VAR_VIRT_MOUSE_X ) - = 2 ;
2005-03-24 03:22:32 +00:00
if ( VAR ( VAR_VIRT_MOUSE_X ) < 0 )
VAR ( VAR_VIRT_MOUSE_X ) = 0 ;
}
2003-05-10 23:47:39 +00:00
} else {
2003-05-15 22:41:35 +00:00
VAR ( VAR_VIRT_MOUSE_X ) = _virtualMouse . x ;
VAR ( VAR_VIRT_MOUSE_Y ) = _virtualMouse . y ;
VAR ( VAR_MOUSE_X ) = _mouse . x ;
VAR ( VAR_MOUSE_Y ) = _mouse . y ;
2004-07-22 04:13:46 +00:00
if ( VAR_DEBUGMODE ! = 0xFF ) {
2004-03-29 07:12:14 +00:00
// This is NOT for the Mac version of Indy3/Loom
2003-07-04 12:34:09 +00:00
VAR ( VAR_DEBUGMODE ) = _debugMode ;
}
2003-05-08 20:37:06 +00:00
}
2001-11-09 18:54:15 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . features & GF_AUDIOTRACKS ) {
2003-05-01 00:04:05 +00:00
// Covered automatically by the Sound class
2005-09-24 05:26:12 +00:00
} else if ( VAR_MUSIC_TIMER ! = 0xFF ) {
if ( _musicEngine ) {
// The music engine generates the timer data for us.
VAR ( VAR_MUSIC_TIMER ) = _musicEngine - > getMusicTimer ( ) ;
} else {
// Used for Money Island 1 (Amiga)
// TODO: The music delay (given in milliseconds) might have to be tuned a little
// to get it correct for all games. Without the ability to watch/listen to the
// original games, I can't do that myself.
const int MUSIC_DELAY = 350 ;
_tempMusic + = delta * 15 ; // Convert delta to milliseconds
if ( _tempMusic > = MUSIC_DELAY ) {
_tempMusic - = MUSIC_DELAY ;
VAR ( VAR_MUSIC_TIMER ) + = 1 ;
}
2002-04-19 21:06:50 +00:00
}
}
2001-11-09 18:54:15 +00:00
2005-11-23 19:11:33 +00:00
// Trigger autosave if necessary.
if ( ! _saveLoadFlag & & shouldPerformAutoSave ( _lastSaveTime ) ) {
2002-11-10 14:59:15 +00:00
_saveLoadSlot = 0 ;
sprintf ( _saveLoadName , " Autosave %d " , _saveLoadSlot ) ;
_saveLoadFlag = 1 ;
2004-01-31 22:12:35 +00:00
_saveTemporaryState = false ;
2002-11-10 14:59:15 +00:00
}
2002-04-20 04:09:02 +00:00
2003-06-06 21:59:56 +00:00
if ( VAR_GAME_LOADED ! = 0xFF )
2003-05-08 15:48:50 +00:00
VAR ( VAR_GAME_LOADED ) = 0 ;
2001-11-09 18:54:15 +00:00
if ( _saveLoadFlag ) {
2003-03-04 03:18:12 +00:00
load_game :
2002-11-10 14:59:15 +00:00
bool success ;
2003-07-08 18:09:22 +00:00
const char * errMsg = 0 ;
2002-12-21 12:09:28 +00:00
char filename [ 256 ] ;
2002-04-11 17:19:16 +00:00
if ( _saveLoadFlag = = 1 ) {
2004-01-31 22:12:35 +00:00
success = saveState ( _saveLoadSlot , _saveTemporaryState ) ;
2002-11-10 14:59:15 +00:00
if ( ! success )
2002-12-03 23:53:42 +00:00
errMsg = " Failed to save game state to file: \n \n %s " ;
2003-01-02 08:39:33 +00:00
// Ender: Disabled for small_header games, as can overwrite game
// variables (eg, Zak256 cashcard values). Temp disabled for V8
// because of odd timing issue with scripts and the variable reset
2006-02-20 16:51:30 +00:00
if ( success & & _saveTemporaryState & & ! ( _game . features & GF_SMALL_HEADER ) & & _game . version < 8 )
2003-05-08 15:48:50 +00:00
VAR ( VAR_GAME_LOADED ) = 201 ;
2001-11-09 18:54:15 +00:00
} else {
2004-01-31 22:12:35 +00:00
success = loadState ( _saveLoadSlot , _saveTemporaryState ) ;
2002-11-10 14:59:15 +00:00
if ( ! success )
2002-12-03 23:53:42 +00:00
errMsg = " Failed to load game state from file: \n \n %s " ;
2003-01-02 08:39:33 +00:00
// Ender: Disabled for small_header games, as can overwrite game
// variables (eg, Zak256 cashcard values).
2006-02-20 16:51:30 +00:00
if ( success & & _saveTemporaryState & & ! ( _game . features & GF_SMALL_HEADER ) )
2003-05-08 15:48:50 +00:00
VAR ( VAR_GAME_LOADED ) = 203 ;
2001-10-09 14:30:12 +00:00
}
2004-01-31 22:12:35 +00:00
makeSavegameName ( filename , _saveLoadSlot , _saveTemporaryState ) ;
2002-11-10 14:59:15 +00:00
if ( ! success ) {
2004-03-28 13:28:44 +00:00
displayMessage ( 0 , errMsg , filename ) ;
2004-01-31 22:12:35 +00:00
} else if ( _saveLoadFlag = = 1 & & _saveLoadSlot ! = 0 & & ! _saveTemporaryState ) {
2003-11-07 02:11:41 +00:00
// Display "Save successful" message, except for auto saves
2004-09-20 22:04:06 +00:00
char buf [ 256 ] ;
snprintf ( buf , sizeof ( buf ) , " Successfully saved game state in file: \n \n %s " , filename ) ;
2005-07-30 21:11:48 +00:00
2003-11-11 00:40:35 +00:00
GUI : : TimedMessageDialog dialog ( buf , 1500 ) ;
2002-12-21 12:09:28 +00:00
runDialog ( dialog ) ;
2002-11-10 14:59:15 +00:00
}
2003-06-22 23:01:06 +00:00
if ( success & & _saveLoadFlag ! = 1 )
clearClickedStatus ( ) ;
2004-01-16 07:58:55 +00:00
2002-11-10 14:59:15 +00:00
_saveLoadFlag = 0 ;
2004-09-28 20:19:37 +00:00
_lastSaveTime = _system - > getMillis ( ) ;
2002-04-27 04:31:25 +00:00
}
2001-11-09 18:54:15 +00:00
if ( _completeScreenRedraw ) {
2004-01-08 21:21:40 +00:00
_charset - > clearCharsetMask ( ) ;
2002-12-25 21:04:47 +00:00
_charset - > _hasMask = false ;
2004-09-19 06:02:59 +00:00
// HACK as in game save stuff isn't supported currently
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_LOOM ) {
2004-09-19 06:02:59 +00:00
int args [ 16 ] ;
uint value ;
memset ( args , 0 , sizeof ( args ) ) ;
args [ 0 ] = 2 ;
2006-02-20 16:51:30 +00:00
if ( _game . platform = = Common : : kPlatformMacintosh )
2004-09-19 06:02:59 +00:00
value = 105 ;
2006-02-20 16:51:30 +00:00
else if ( _game . version = = 4 ) // 256 color CD version
2006-01-23 20:09:25 +00:00
value = 150 ;
2004-09-19 06:02:59 +00:00
else
2006-01-23 20:09:25 +00:00
value = 100 ;
2006-02-20 16:51:30 +00:00
byte restoreScript = ( _game . platform = = Common : : kPlatformFMTowns ) ? 17 : 18 ;
2004-09-19 06:02:59 +00:00
// if verbs should be shown restore them
if ( VAR ( value ) = = 2 )
runScript ( restoreScript , 0 , 0 , args ) ;
2006-02-20 16:51:30 +00:00
} else if ( _game . version > 3 ) {
2004-09-19 06:02:59 +00:00
for ( int i = 0 ; i < _numVerbs ; i + + )
drawVerb ( i , 0 ) ;
} else {
redrawVerbs ( ) ;
}
2005-04-28 01:04:42 +00:00
handleMouseOver ( false ) ;
2004-09-19 06:02:59 +00:00
2005-05-29 17:31:27 +00:00
_completeScreenRedraw = false ;
2001-11-09 18:54:15 +00:00
_fullRedraw = true ;
}
2001-10-09 14:30:12 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 80 ) {
2006-01-05 07:06:47 +00:00
_sound - > processSoundCode ( ) ;
}
2001-11-09 18:54:15 +00:00
runAllScripts ( ) ;
checkExecVerbs ( ) ;
2002-12-09 01:27:40 +00:00
checkAndRunSentenceScript ( ) ;
2001-10-09 14:30:12 +00:00
2003-06-09 01:32:36 +00:00
if ( _quit )
return 0 ;
2003-03-04 03:18:12 +00:00
// HACK: If a load was requested, immediately perform it. This avoids
// drawing the current room right after the load is request but before
2003-06-09 01:06:29 +00:00
// it is performed. That was annoying esp. if you loaded while a SMUSH
2003-03-04 03:18:12 +00:00
// cutscene was playing.
if ( _saveLoadFlag & & _saveLoadFlag ! = 1 ) {
goto load_game ;
}
2005-07-30 21:11:48 +00:00
2002-04-11 17:19:16 +00:00
if ( _currentRoom = = 0 ) {
2006-02-20 16:51:30 +00:00
if ( _game . version > 3 )
2003-09-10 00:28:26 +00:00
CHARSET_1 ( ) ;
2001-11-09 18:54:15 +00:00
drawDirtyScreenParts ( ) ;
} else {
2001-10-09 14:30:12 +00:00
walkActors ( ) ;
moveCamera ( ) ;
2005-04-27 14:30:32 +00:00
updateObjectStates ( ) ;
2006-02-20 16:51:30 +00:00
if ( _game . version > 3 )
2003-09-10 00:28:26 +00:00
CHARSET_1 ( ) ;
2002-08-20 02:13:41 +00:00
2004-09-18 22:42:45 +00:00
if ( camera . _cur . x ! = camera . _last . x | | _bgNeedsRedraw | | _fullRedraw
2006-02-20 16:51:30 +00:00
| | ( ( _game . features & GF_NEW_CAMERA ) & & camera . _cur . y ! = camera . _last . y ) ) {
2002-08-20 02:13:41 +00:00
redrawBGAreas ( ) ;
2001-10-09 14:30:12 +00:00
}
2002-08-20 02:13:41 +00:00
2001-10-09 14:30:12 +00:00
processDrawQue ( ) ;
2002-10-01 09:27:09 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 99 )
2005-04-01 08:51:13 +00:00
_fullRedraw = false ;
2004-07-10 11:42:31 +00:00
// Full Throttle always redraws verbs and draws verbs before actors
2006-02-20 16:51:30 +00:00
if ( _game . version > = 7 )
2002-10-01 09:27:09 +00:00
redrawVerbs ( ) ;
2005-02-24 04:04:17 +00:00
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 90 ) {
2005-05-23 11:50:36 +00:00
( ( ScummEngine_v90he * ) this ) - > _sprite - > resetBackground ( ) ;
( ( ScummEngine_v90he * ) this ) - > _sprite - > sortActiveSprites ( ) ;
2005-02-24 04:04:17 +00:00
}
2005-05-14 14:06:37 +00:00
# endif
2005-07-30 21:11:48 +00:00
2003-05-30 00:55:21 +00:00
setActorRedrawFlags ( ) ;
2001-10-09 14:30:12 +00:00
resetActorBgs ( ) ;
2004-01-08 21:21:40 +00:00
if ( VAR_CURRENT_LIGHTS ! = 0xFF & &
2003-05-08 15:48:50 +00:00
! ( VAR ( VAR_CURRENT_LIGHTS ) & LIGHTMODE_screen ) & &
VAR ( VAR_CURRENT_LIGHTS ) & LIGHTMODE_flashlight ) {
2002-08-19 17:23:48 +00:00
drawFlashlight ( ) ;
2003-05-30 00:55:21 +00:00
setActorRedrawFlags ( ) ;
2002-07-13 14:07:37 +00:00
}
2005-04-20 23:53:29 +00:00
processActors ( ) ;
2005-07-30 21:11:48 +00:00
2002-09-19 21:45:56 +00:00
_fullRedraw = false ;
2005-02-24 04:04:17 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . version > = 4 & & _game . heversion < = 61 )
2004-07-11 03:46:32 +00:00
cyclePalette ( ) ;
2001-10-09 14:30:12 +00:00
palManipulate ( ) ;
2001-10-26 17:34:50 +00:00
if ( _doEffect ) {
_doEffect = false ;
2002-07-13 14:07:37 +00:00
fadeIn ( _newEffect ) ;
2001-10-09 14:30:12 +00:00
clearClickedStatus ( ) ;
}
2001-11-09 18:54:15 +00:00
2006-01-14 05:32:11 +00:00
if ( VAR_MAIN_SCRIPT ! = 0xFF & & VAR ( VAR_MAIN_SCRIPT ) ! = 0 ) {
runScript ( VAR ( VAR_MAIN_SCRIPT ) , 0 , 0 , 0 ) ;
}
2005-04-28 22:34:56 +00:00
// Handle mouse over effects (for verbs).
2005-04-28 01:04:42 +00:00
handleMouseOver ( oldEgo ! = VAR ( VAR_EGO ) ) ;
2004-07-03 13:32:56 +00:00
2005-04-28 22:34:56 +00:00
// Render everything to the screen.
2001-11-09 18:54:15 +00:00
drawDirtyScreenParts ( ) ;
2001-10-09 14:30:12 +00:00
2006-02-20 16:51:30 +00:00
if ( _game . version < = 5 )
2001-10-23 19:51:50 +00:00
playActorSounds ( ) ;
2001-11-09 18:54:15 +00:00
}
2005-06-04 06:30:35 +00:00
_sound - > processSound ( ) ;
2004-05-26 17:09:12 +00:00
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2004-05-26 17:09:12 +00:00
if ( _imuseDigital ) {
_imuseDigital - > flushTracks ( ) ;
2006-02-20 16:51:30 +00:00
if ( ( ( _game . id = = GID_DIG ) & & ( ! ( _game . features & GF_DEMO ) ) ) | | ( _game . id = = GID_CMI ) )
2004-05-26 17:09:12 +00:00
_imuseDigital - > refreshScripts ( ) ;
}
2005-05-14 22:56:41 +00:00
# endif
2004-03-02 20:35:48 +00:00
2003-07-02 00:49:03 +00:00
camera . _last = camera . _cur ;
2005-03-31 21:39:31 +00:00
if ( ! ( + + res . _expireCounter ) ) {
res . increaseResourceCounter ( ) ;
2001-11-09 18:54:15 +00:00
}
2002-04-11 17:19:16 +00:00
2002-04-12 21:26:59 +00:00
animateCursor ( ) ;
2005-07-30 21:11:48 +00:00
2002-04-12 21:26:59 +00:00
/* show or hide mouse */
2004-03-28 16:30:50 +00:00
_system - > showMouse ( _cursor . state > 0 ) ;
2002-04-12 21:26:59 +00:00
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 90 ) {
2005-05-23 11:50:36 +00:00
( ( ScummEngine_v90he * ) this ) - > _sprite - > updateImages ( ) ;
2005-05-08 03:08:11 +00:00
}
2006-02-20 16:51:30 +00:00
if ( _game . heversion > = 98 ) {
2005-05-08 03:08:11 +00:00
( ( ScummEngine_v90he * ) this ) - > _logicHE - > endOfFrame ( ) ;
}
2005-05-14 14:06:37 +00:00
# endif
2005-02-24 08:00:30 +00:00
2003-05-10 22:35:12 +00:00
if ( VAR_TIMER ! = 0xFF )
2003-05-08 15:58:30 +00:00
VAR ( VAR_TIMER ) = 0 ;
2003-05-08 15:48:50 +00:00
return VAR ( VAR_TIMER_NEXT ) ;
2001-11-09 18:54:15 +00:00
}
2003-07-19 18:18:01 +00:00
# pragma mark -
# pragma mark --- SCUMM ---
# pragma mark -
2006-01-05 07:06:47 +00:00
int ScummEngine : : getHETimer ( int timer ) {
2006-01-18 07:23:49 +00:00
checkRange ( 15 , 1 , timer , " getHETimer: Timer out of range(%d) " ) ;
2006-01-05 07:06:47 +00:00
int time = _system - > getMillis ( ) - _heTimers [ timer ] ;
return time ;
}
void ScummEngine : : setHETimer ( int timer ) {
2006-01-18 07:23:49 +00:00
checkRange ( 15 , 1 , timer , " setHETimer: Timer out of range(%d) " ) ;
2006-01-05 07:06:47 +00:00
_heTimers [ timer ] = _system - > getMillis ( ) ;
}
2003-10-02 22:42:03 +00:00
void ScummEngine : : pauseGame ( ) {
2003-07-19 18:18:01 +00:00
pauseDialog ( ) ;
2001-10-09 14:30:12 +00:00
}
2003-10-02 22:42:03 +00:00
void ScummEngine : : shutDown ( ) {
2003-07-19 18:18:01 +00:00
_quit = true ;
2003-01-13 01:29:45 +00:00
}
2003-10-02 22:42:03 +00:00
void ScummEngine : : restart ( ) {
2003-07-19 18:18:01 +00:00
// TODO: Check this function - we should probably be reinitting a lot more stuff, and I suspect
// this leaks memory like a sieve
2002-04-11 17:19:16 +00:00
2004-09-20 22:04:06 +00:00
// Fingolfing seez: An alternate way to implement restarting would be to create
// a save state right after startup ... to this end we could introduce a SaveFile
// subclass which is implemented using a memory buffer (i.e. no actual file is
// created). Then to restart we just have to load that pseudo save state.
2003-07-19 18:18:01 +00:00
int i ;
2002-04-11 17:19:16 +00:00
2003-07-19 18:18:01 +00:00
// Reset some stuff
_currentRoom = 0 ;
_currentScript = 0xFF ;
killAllScriptsExceptCurrent ( ) ;
setShake ( 0 ) ;
_sound - > stopAllSounds ( ) ;
2003-06-02 05:38:45 +00:00
2003-09-11 10:32:15 +00:00
// Clear the script variables
2004-09-10 02:03:31 +00:00
for ( i = 0 ; i < _numVariables ; i + + )
2003-06-02 05:38:45 +00:00
_scummVars [ i ] = 0 ;
// Empty inventory
2003-11-29 14:36:55 +00:00
for ( i = 0 ; i < _numGlobalObjects ; i + + )
2003-06-02 05:38:45 +00:00
clearOwnerOf ( i ) ;
2006-02-04 23:51:25 +00:00
// Reallocate arrays
allocateArrays ( ) ;
// Reread index (reset objectstate etc)
readIndexFile ( ) ;
// Reinit scumm variables
scummInit ( ) ;
2004-09-20 22:04:06 +00:00
initScummVars ( ) ;
2006-02-04 23:51:25 +00:00
2003-12-26 23:11:35 +00:00
if ( _imuse ) {
_imuse - > setBase ( res . address [ rtSound ] ) ;
}
2006-02-04 23:51:25 +00:00
// Reinit sound engine
2006-02-20 16:51:30 +00:00
if ( _game . version > = 5 )
2006-02-04 23:51:25 +00:00
_sound - > setupSound ( ) ;
2002-10-19 22:35:22 +00:00
2003-07-19 18:18:01 +00:00
// Re-run bootscript
2004-02-24 10:52:40 +00:00
int args [ 16 ] ;
memset ( args , 0 , sizeof ( args ) ) ;
2005-07-30 21:11:48 +00:00
args [ 0 ] = _bootParam ;
2006-02-20 16:51:30 +00:00
if ( _game . id = = GID_MANIAC & & _demoMode )
2004-02-24 10:52:40 +00:00
runScript ( 9 , 0 , 0 , args ) ;
else
runScript ( 1 , 0 , 0 , args ) ;
2003-07-19 18:18:01 +00:00
}
2002-04-12 21:26:59 +00:00
2003-10-02 22:42:03 +00:00
void ScummEngine : : startManiac ( ) {
2005-08-14 01:41:52 +00:00
debug ( 0 , " stub startManiac() " ) ;
2004-03-28 13:28:44 +00:00
displayMessage ( 0 , " Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory. " ) ;
2003-07-19 18:18:01 +00:00
}
2002-07-28 01:40:24 +00:00
2003-07-19 18:18:01 +00:00
# pragma mark -
# pragma mark --- GUI ---
# pragma mark -
2002-08-08 11:14:45 +00:00
2003-10-02 22:42:03 +00:00
int ScummEngine : : runDialog ( Dialog & dialog ) {
2005-10-01 21:13:38 +00:00
_dialogStartTime = _system - > getMillis ( ) / 1000 ;
2003-12-25 02:55:00 +00:00
// Pause sound & video
2003-07-19 18:18:01 +00:00
bool old_soundsPaused = _sound - > _soundsPaused ;
_sound - > pauseSounds ( true ) ;
2003-12-25 02:55:00 +00:00
bool oldSmushPaused = _smushPaused ;
_smushPaused = true ;
2002-08-08 11:14:45 +00:00
2003-07-19 18:18:01 +00:00
// Open & run the dialog
2003-09-11 10:32:15 +00:00
int result = dialog . runModal ( ) ;
2002-08-08 11:14:45 +00:00
2003-07-19 18:18:01 +00:00
// Restore old cursor
updateCursor ( ) ;
2002-10-19 22:35:22 +00:00
2003-12-25 02:55:00 +00:00
// Resume sound & video
2003-07-19 18:18:01 +00:00
_sound - > pauseSounds ( old_soundsPaused ) ;
2003-12-25 02:55:00 +00:00
_smushPaused = oldSmushPaused ;
2005-07-30 21:11:48 +00:00
2005-10-01 21:13:38 +00:00
_engineStartTime + = ( _system - > getMillis ( ) / 1000 ) - _dialogStartTime ;
_dialogStartTime = 0 ;
2003-07-19 18:18:01 +00:00
// Return the result
return result ;
2002-04-12 21:26:59 +00:00
}
2002-04-11 17:19:16 +00:00
2003-10-02 22:42:03 +00:00
void ScummEngine : : pauseDialog ( ) {
2003-07-19 18:18:01 +00:00
if ( ! _pauseDialog )
2004-07-20 11:30:15 +00:00
_pauseDialog = new PauseDialog ( this , 10 ) ;
2003-09-11 10:32:15 +00:00
runDialog ( * _pauseDialog ) ;
2003-07-19 18:18:01 +00:00
}
2003-06-08 12:11:14 +00:00
2004-07-20 11:30:15 +00:00
void ScummEngine : : versionDialog ( ) {
if ( ! _versionDialog )
_versionDialog = new PauseDialog ( this , 11 ) ;
runDialog ( * _versionDialog ) ;
}
2003-11-03 23:26:13 +00:00
void ScummEngine : : mainMenuDialog ( ) {
if ( ! _mainMenuDialog )
_mainMenuDialog = new MainMenuDialog ( this ) ;
runDialog ( * _mainMenuDialog ) ;
2002-03-21 00:40:18 +00:00
}
2002-03-23 20:34:47 +00:00
2005-04-17 22:40:45 +00:00
void ScummEngine : : confirmExitDialog ( ) {
ConfirmDialog d ( this , " Do you really want to quit (y/n) ? " ) ;
2003-07-28 01:36:16 +00:00
2005-04-17 22:40:45 +00:00
if ( runDialog ( d ) ) {
2003-07-28 01:36:16 +00:00
_quit = true ;
}
}
2005-04-17 22:40:45 +00:00
void ScummEngine : : confirmRestartDialog ( ) {
ConfirmDialog d ( this , " Do you really want to restart (y/n) ? " ) ;
2003-12-14 15:04:05 +00:00
2005-04-17 22:40:45 +00:00
if ( runDialog ( d ) ) {
2003-12-14 15:04:05 +00:00
restart ( ) ;
}
}
2004-03-28 13:28:44 +00:00
char ScummEngine : : displayMessage ( const char * altButton , const char * message , . . . ) {
2004-11-09 10:26:33 +00:00
char buf [ STRINGBUFLEN ] ;
2003-07-19 18:18:01 +00:00
va_list va ;
2003-03-06 17:58:13 +00:00
2003-07-19 18:18:01 +00:00
va_start ( va , message ) ;
2005-04-09 01:52:44 +00:00
vsnprintf ( buf , STRINGBUFLEN , message , va ) ;
2003-07-19 18:18:01 +00:00
va_end ( va ) ;
2002-03-23 20:34:47 +00:00
2004-02-05 22:39:13 +00:00
GUI : : MessageDialog dialog ( buf , " OK " , altButton ) ;
2003-09-11 10:32:15 +00:00
return runDialog ( dialog ) ;
2003-07-19 18:18:01 +00:00
}
2002-12-29 19:54:11 +00:00
2003-07-19 18:18:01 +00:00
# pragma mark -
# pragma mark --- Miscellaneous ---
# pragma mark -
2002-03-23 20:34:47 +00:00
2005-04-10 12:59:17 +00:00
2003-10-02 22:42:03 +00:00
void ScummEngine : : errorString ( const char * buf1 , char * buf2 ) {
2003-07-19 18:18:01 +00:00
if ( _currentScript ! = 0xFF ) {
ScriptSlot * ss = & vm . slot [ _currentScript ] ;
sprintf ( buf2 , " (%d:%d:0x%X): %s " , _roomResource ,
ss - > number , _scriptPointer - _scriptOrgPointer , buf1 ) ;
} else {
strcpy ( buf2 , buf1 ) ;
}
2002-03-23 20:34:47 +00:00
2003-07-21 22:30:15 +00:00
# ifdef _WIN32_WCE
if ( isSmartphone ( ) )
return ;
# endif
2003-07-19 18:18:01 +00:00
// Unless an error -originated- within the debugger, spawn the debugger. Otherwise
// exit out normally.
2004-01-16 07:33:23 +00:00
if ( _debugger & & ! _debugger - > isAttached ( ) ) {
2003-10-12 17:49:52 +00:00
printf ( " %s \n " , buf2 ) ; // (Print it again in case debugger segfaults)
_debugger - > attach ( buf2 ) ;
_debugger - > onFrame ( ) ;
2003-07-19 18:18:01 +00:00
}
}
2002-03-23 20:34:47 +00:00
2006-02-25 17:36:32 +00:00
void ScummEngine : : generateSubstResFileName ( const char * filename , char * buf , int bufsize ) {
applySubstResFileName ( _substResFileName , filename , buf , bufsize ) ;
2005-01-29 17:58:47 +00:00
}
2003-10-03 18:33:57 +00:00
} // End of namespace Scumm
using namespace Scumm ;
2006-02-18 11:15:37 +00:00
GameList Engine_SCUMM_gameIDList ( ) {
const GameSettings * g = gameDescriptions ;
2003-10-17 23:16:53 +00:00
GameList games ;
2006-01-21 13:01:20 +00:00
while ( g - > gameid ) {
2006-02-18 11:15:37 +00:00
games . push_back ( * g ) ;
g + + ;
}
return games ;
}
GameSettings Engine_SCUMM_findGameID ( const char * gameid ) {
// First search the list of supported game IDs.
const GameSettings * g = gameDescriptions ;
while ( g - > gameid ) {
if ( 0 = = strcmp ( gameid , g - > gameid ) )
return * g ;
2003-10-28 17:07:25 +00:00
g + + ;
}
2005-09-04 12:42:19 +00:00
2006-02-18 11:15:37 +00:00
// If we didn't find the gameid in the main list, check if it
// is an obsolete game id.
GameSettings gs = { 0 , 0 } ;
const ObsoleteGameID * o = obsoleteGameIDsTable ;
2005-09-04 12:42:19 +00:00
while ( o - > from ) {
2006-02-18 11:15:37 +00:00
if ( 0 = = strcmp ( gameid , o - > from ) ) {
gs . gameid = gameid ;
gs . gameid = " Obsolete game ID " ;
return gs ;
}
2005-09-04 12:42:19 +00:00
o + + ;
}
2006-02-18 11:15:37 +00:00
return gs ;
2003-10-17 23:16:53 +00:00
}
2006-02-18 11:15:37 +00:00
2006-01-21 18:17:56 +00:00
enum {
kDetectNameMethodsCount = 8
} ;
static bool generateDetectName ( const ScummGameSettings * g , int method , char * detectName ) {
detectName [ 0 ] = ' \0 ' ;
switch ( method ) {
case 0 :
if ( g - > version > 3 )
return false ;
strcpy ( detectName , " 00.LFL " ) ;
break ;
case 1 :
2006-01-23 19:13:05 +00:00
if ( g - > version < 3 | | g - > version > 5 )
2006-01-21 18:17:56 +00:00
return false ;
strcpy ( detectName , " 000.LFL " ) ;
break ;
case 2 :
2006-01-22 13:32:39 +00:00
if ( g - > version < 4 | | g - > version > 7 )
2006-01-21 18:17:56 +00:00
return false ;
strcpy ( detectName , g - > gameid ) ;
strcat ( detectName , " .000 " ) ;
break ;
case 3 :
if ( g - > version < 7 )
return false ;
strcpy ( detectName , g - > gameid ) ;
strcat ( detectName , " .la0 " ) ;
break ;
case 4 :
2006-01-24 23:14:52 +00:00
if ( g - > heversion = = 0 )
2006-01-21 18:17:56 +00:00
return false ;
strcpy ( detectName , g - > gameid ) ;
strcat ( detectName , " .he0 " ) ;
break ;
case 5 :
// FIXME: Fingolfin asks: For which games is this case used?
// Please document this. Also: Why was this case missing in
// Engine_SCUMM_create ?
strcpy ( detectName , g - > gameid ) ;
break ;
case 6 :
if ( g - > id ! = GID_SAMNMAX )
return false ;
strcpy ( detectName , g - > gameid ) ;
strcat ( detectName , " .sm0 " ) ;
break ;
case 7 :
if ( g - > id ! = GID_MANIAC )
return false ;
strcpy ( detectName , " 00.MAN " ) ;
break ;
}
return true ;
}
2003-12-21 15:29:52 +00:00
DetectedGameList Engine_SCUMM_detectGames ( const FSList & fslist ) {
DetectedGameList detectedGames ;
2003-10-28 17:07:25 +00:00
const ScummGameSettings * g ;
2003-10-17 23:16:53 +00:00
char detectName [ 128 ] ;
2005-01-29 03:12:48 +00:00
char tempName [ 128 ] ;
2006-02-25 17:36:32 +00:00
SubstResFileNames subst = { 0 , 0 , kGenAsIs } ;
2004-07-26 18:13:53 +00:00
2004-02-07 17:12:10 +00:00
typedef Common : : Map < Common : : String , bool > StringSet ;
StringSet fileSet ;
2003-10-17 23:16:53 +00:00
2006-01-21 13:01:20 +00:00
for ( g = scumm_settings ; g - > gameid ; + + g ) {
2005-07-30 21:11:48 +00:00
// Determine the 'detectname' for this game, that is, the name of a
2003-10-17 23:16:53 +00:00
// file that *must* be presented if the directory contains the data
// for this game. For example, FOA requires atlantis.000
2004-07-26 18:13:53 +00:00
2005-09-04 14:51:00 +00:00
// TODO: we need to add cache here
2006-01-21 18:17:56 +00:00
for ( int method = 0 ; method < kDetectNameMethodsCount ; method + + ) {
if ( ! generateDetectName ( g , method , detectName ) )
continue ;
2005-09-04 14:51:00 +00:00
strcpy ( tempName , detectName ) ;
2006-02-25 17:36:32 +00:00
int substLastIndex = 0 ;
2005-09-04 14:51:00 +00:00
while ( substLastIndex ! = - 1 ) {
// Iterate over all files in the given directory
for ( FSList : : const_iterator file = fslist . begin ( ) ; file ! = fslist . end ( ) ; + + file ) {
if ( ! file - > isDirectory ( ) ) {
const char * name = file - > displayName ( ) . c_str ( ) ;
if ( 0 = = scumm_stricmp ( detectName , name ) ) {
byte buf [ 6 ] ;
if ( g - > version < 4 ) {
// We take a look at the file now, to narrow
// down the list of possible candidates a bit further.
// E.g. it's trivial to distinguish V1 from V3 games.
File tmp ;
if ( ! tmp . open ( file - > path ( ) . c_str ( ) ) )
2005-04-16 12:41:56 +00:00
break ;
2005-09-04 14:51:00 +00:00
tmp . read ( buf , 6 ) ;
if ( buf [ 0 ] = = 0xCE & & buf [ 1 ] = = 0xF5 ) {
// Looks like V1. However, we currently do not distinguish between V1 and V2
// in the scumm_settings list.
if ( g - > version ! = 1 & & g - > version ! = 2 )
break ;
// Candidates: maniac clasic, zak classic
// TODO: Maybe we can use the filesize to distinguish these two?
// English V1 Zak: 1896 bytes
// English V1 MM: 1972 bytes
// It would be interesting if those sizes are the same for other language
// variants of these games, or for demos?
} else if ( buf [ 0 ] = = 0xFF & & buf [ 1 ] = = 0xFE ) {
// GF_OLD_BUNDLE: could be V2 or old V3.
if ( ! ( g - > features & GF_OLD_BUNDLE ) | | ( g - > version ! = 2 & & g - > version ! = 3 ) )
break ;
// Candidates: maniac enhanced, zak enhanced, indy3ega, loom
2005-04-16 12:41:56 +00:00
/*
2006-02-25 17:36:32 +00:00
TODO : Might be possible to distinguish those by the script count .
2005-04-16 12:41:56 +00:00
Specifically , my versions of these games have this in their headers :
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Loom ( en ; de ; en demo ; en MAC ) :
_numGlobalObjects 1000
_numRooms 100
_numCostumes 200
_numScripts 200
_numSounds 80
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Indy3EGA ( en PC ; en Mac ; en demo ) :
_numGlobalObjects 1000
_numRooms 99
_numCostumes 129
_numScripts 139
_numSounds 84
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
MM ( en ; de ) :
_numGlobalObjects 780
_numRooms 61
_numCostumes 40
_numScripts 179
_numSounds 120
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Zak ( de ; en demo ) :
_numGlobalObjects 780
_numRooms 61
_numCostumes 40
_numScripts 155
_numSounds 120
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
So , they all have a different number of scripts .
*/
2005-09-04 14:51:00 +00:00
} else if ( buf [ 4 ] = = ' 0 ' & & buf [ 5 ] = = ' R ' ) {
// newer V3 game
2006-02-05 00:56:00 +00:00
if ( g - > version ! = 3 )
2005-09-04 14:51:00 +00:00
break ;
// Candidates: indy3, indy3Towns, zakTowns, loomTowns
2005-04-16 12:41:56 +00:00
/*
Considering that we know about * all * TOWNS versions ,
and know their MD5s , we could simply rely on this and
if we find something which has an unknown MD5 , assume
that it is an ( so far unknown ) version of Indy3 .
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
We can combin this with a look at the resource headers :
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Indy3 :
_numGlobalObjects 1000
_numRooms 99
_numCostumes 129
_numScripts 139
_numSounds 84
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Indy3Towns , ZakTowns , ZakLoom demo :
_numGlobalObjects 1000
_numRooms 99
_numCostumes 199
_numScripts 199
_numSounds 199
2005-07-30 21:11:48 +00:00
2005-04-16 12:41:56 +00:00
Assuming that all the town variants look like the latter , we can
do the chceck like this :
if ( numScripts = = 139 )
assume Indy3
else if ( numScripts = = 199 )
assume towns game
else
unknown , do not accept it
*/
2005-09-04 14:51:00 +00:00
} else if ( buf [ 4 ] = = ' R ' & & buf [ 5 ] = = ' N ' ) {
// V4 game
if ( g - > version ! = 4 )
break ;
// Candidates: monkeyEGA, pass, monkeyVGA, loomcd
2005-04-16 12:41:56 +00:00
/*
For all of them , we have :
_numGlobalObjects 1000
_numRooms 99
_numCostumes 199
_numScripts 199
_numSounds 199
*/
2005-09-04 14:51:00 +00:00
} else if ( buf [ 0 ] = = 0xa0 & & buf [ 1 ] = = 0x07 & & buf [ 2 ] = = 0xa5 & &
buf [ 3 ] = = 0xbc ) {
// MM NES .prg
if ( g - > id ! = GID_MANIAC )
break ;
} else if ( buf [ 0 ] = = 0xbc & & buf [ 1 ] = = 0xb9 ) {
// MM NES 00.LFL
if ( g - > id ! = GID_MANIAC )
break ;
} else if ( buf [ 0 ] = = 0x31 & & buf [ 1 ] = = 0x0a ) {
// C64 MM & Zak disk1
if ( g - > version ! = 2 )
break ;
} else if ( buf [ 0 ] = = 0xcd & & buf [ 1 ] = = 0xfe ) {
// C64 MM & Zak 00.LFL
if ( g - > version ! = 2 )
break ;
} else {
// This is not a V1-V4 game
2005-05-19 22:14:49 +00:00
break ;
2005-09-04 14:51:00 +00:00
}
2005-04-16 12:41:56 +00:00
}
2005-07-30 21:11:48 +00:00
2005-09-04 14:51:00 +00:00
// Match found, add to list of candidates, then abort inner loop.
if ( substLastIndex > 0 & & // HE Mac versions.
2006-02-25 17:36:32 +00:00
( subst . genMethod = = kGenMac | |
subst . genMethod = = kGenMacNoParens ) ) {
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( DetectedGame ( toGameSettings ( * g ) ,
2005-09-04 14:51:00 +00:00
Common : : UNK_LANG ,
Common : : kPlatformMacintosh ) ) ;
fileSet [ file - > path ( ) ] = true ;
} else if ( substLastIndex = = 0 & & g - > id = = GID_MANIAC & &
( buf [ 0 ] = = 0xbc | | buf [ 0 ] = = 0xa0 ) ) {
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( DetectedGame ( toGameSettings ( * g ) ,
2005-09-04 14:51:00 +00:00
Common : : UNK_LANG ,
Common : : kPlatformNES ) ) ;
} else if ( ( g - > id = = GID_MANIAC | | g - > id = = GID_ZAK ) & &
( ( buf [ 0 ] = = 0x31 & & buf [ 1 ] = = 0x0a ) | |
( buf [ 0 ] = = 0xcd & & buf [ 1 ] = = 0xfe ) ) ) {
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( DetectedGame ( toGameSettings ( * g ) ,
2005-09-04 14:51:00 +00:00
Common : : UNK_LANG ,
Common : : kPlatformC64 ) ) ;
} else {
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( toGameSettings ( * g ) ) ;
2005-09-04 14:51:00 +00:00
fileSet [ file - > path ( ) ] = false ;
}
break ;
2005-01-29 03:12:48 +00:00
}
}
2004-12-09 15:06:49 +00:00
}
2005-01-29 03:12:48 +00:00
2006-02-25 17:36:32 +00:00
substLastIndex = findSubstResFileName ( subst , tempName , substLastIndex + 1 ) ;
applySubstResFileName ( subst , tempName , detectName , sizeof ( detectName ) ) ;
2005-09-04 14:51:00 +00:00
}
2003-10-17 23:16:53 +00:00
}
}
2005-04-16 12:41:56 +00:00
2004-02-07 17:12:10 +00:00
// Now, we check the MD5 sums of the 'candidate' files. If we have an exact match,
// only return that.
bool exactMatch = false ;
for ( StringSet : : const_iterator iter = fileSet . begin ( ) ; iter ! = fileSet . end ( ) ; + + iter ) {
uint8 md5sum [ 16 ] ;
const char * name = iter - > _key . c_str ( ) ;
2005-01-29 03:12:48 +00:00
2005-05-10 22:56:25 +00:00
if ( Common : : md5_file ( name , md5sum , 0 , kMD5FileSizeLimit ) ) {
2004-02-07 17:12:10 +00:00
char md5str [ 32 + 1 ] ;
for ( int j = 0 ; j < 16 ; j + + ) {
sprintf ( md5str + j * 2 , " %02x " , ( int ) md5sum [ j ] ) ;
}
const MD5Table * elem ;
elem = ( const MD5Table * ) bsearch ( md5str , md5table , ARRAYSIZE ( md5table ) - 1 , sizeof ( MD5Table ) , compareMD5Table ) ;
if ( elem ) {
if ( ! exactMatch )
detectedGames . clear ( ) ; // Clear all the non-exact candidates
2004-08-21 23:12:11 +00:00
2006-01-21 13:01:20 +00:00
const char * gameid = elem - > gameid ;
2004-08-21 23:12:11 +00:00
2006-01-21 13:01:20 +00:00
// Find the GameSettings for that gameid
for ( g = scumm_settings ; g - > gameid ; + + g ) {
if ( 0 = = scumm_stricmp ( g - > gameid , gameid ) )
2005-01-29 03:12:48 +00:00
break ;
2004-02-07 17:12:10 +00:00
}
2006-01-21 13:01:20 +00:00
assert ( g - > gameid ) ;
2004-02-07 17:12:10 +00:00
// Insert the 'enhanced' game data into the candidate list
2005-01-29 03:12:48 +00:00
if ( iter - > _value = = true ) // This was HE Mac game
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( DetectedGame ( toGameSettings ( * g ) , elem - > language , Common : : kPlatformMacintosh ) ) ;
2005-01-29 03:12:48 +00:00
else
2006-02-20 16:35:37 +00:00
detectedGames . push_back ( DetectedGame ( toGameSettings ( * g ) , elem - > language , elem - > platform ) ) ;
2004-02-07 17:12:10 +00:00
exactMatch = true ;
}
}
}
2005-04-16 12:41:56 +00:00
2003-10-17 23:16:53 +00:00
return detectedGames ;
2003-10-03 18:33:57 +00:00
}
2006-01-21 13:01:20 +00:00
/**
* Create a ScummEngine instance , based on the given detector data .
*
* This is heavily based on our MD5 detection scheme .
*/
2003-10-03 18:33:57 +00:00
Engine * Engine_SCUMM_create ( GameDetector * detector , OSystem * syst ) {
Engine * engine ;
2006-01-21 13:01:20 +00:00
// We start by checking whether the specified game ID is obsolete.
// If that is the case, we automaticlaly upgrade the target to use
// the correct new game ID (and platform, if specified).
2006-02-18 11:15:37 +00:00
const ObsoleteGameID * o = obsoleteGameIDsTable ;
2005-09-04 12:42:19 +00:00
while ( o - > from ) {
2006-02-18 12:50:48 +00:00
if ( ! scumm_stricmp ( detector - > _gameid . c_str ( ) , o - > from ) ) {
2006-01-21 13:01:20 +00:00
// Match found, perform upgrade
2006-02-18 12:50:48 +00:00
detector - > _gameid = o - > to ;
2005-09-04 12:42:19 +00:00
ConfMan . set ( " gameid " , o - > to ) ;
2005-10-14 10:27:24 +00:00
if ( o - > platform ! = Common : : kPlatformUnknown )
ConfMan . set ( " platform " , Common : : getPlatformCode ( o - > platform ) ) ;
2005-09-04 12:42:19 +00:00
2006-01-21 13:01:20 +00:00
warning ( " Target upgraded from game ID %s to %s " , o - > from , o - > to ) ;
2005-09-04 12:42:19 +00:00
ConfMan . flushToDisk ( ) ;
break ;
}
o + + ;
}
2005-07-30 21:11:48 +00:00
2006-01-21 13:01:20 +00:00
// Lookup the game ID in our database. If this lookup fails, then
// the game ID is unknown, and we have to abort.
2003-10-28 17:07:25 +00:00
const ScummGameSettings * g = scumm_settings ;
2006-01-21 13:01:20 +00:00
while ( g - > gameid ) {
2006-02-18 12:50:48 +00:00
if ( ! scumm_stricmp ( detector - > _gameid . c_str ( ) , g - > gameid ) )
2003-10-28 17:07:25 +00:00
break ;
g + + ;
}
2006-01-21 13:01:20 +00:00
if ( ! g - > gameid ) {
2005-05-05 12:03:16 +00:00
return 0 ;
}
2003-10-28 17:07:25 +00:00
2006-01-21 18:17:56 +00:00
// We now want to alculate the MD5 of the games detection file, so that we
// can store it in savegames etc..
2006-01-21 13:01:20 +00:00
const char * gameid = g - > gameid ;
2005-01-29 17:58:47 +00:00
char detectName [ 256 ] , tempName [ 256 ] , gameMD5 [ 32 + 1 ] ;
2004-09-10 12:13:03 +00:00
uint8 md5sum [ 16 ] ;
2006-02-25 17:36:32 +00:00
SubstResFileNames subst = { 0 , 0 , kGenAsIs } ;
2005-05-05 12:03:16 +00:00
bool found = false ;
2005-09-04 14:51:00 +00:00
2005-11-27 02:35:57 +00:00
ScummGameSettings game = * g ;
2006-01-21 18:17:56 +00:00
// To this end, we first have to figure out what the proper detection file
// is (00.LFL, 000.LFL, ...). So we iterate over all possible names,
// and once we find a matching file, we assume that's it.
for ( int method = 0 ; method < kDetectNameMethodsCount & & ! found ; method + + ) {
if ( ! generateDetectName ( g , method , detectName ) )
continue ;
2005-09-04 14:51:00 +00:00
strcpy ( tempName , detectName ) ;
2005-01-29 17:58:47 +00:00
2006-02-25 17:36:32 +00:00
int substLastIndex = 0 ;
2005-09-04 14:51:00 +00:00
while ( substLastIndex ! = - 1 ) {
2006-01-21 18:17:56 +00:00
// FIXME: Repeatedly calling File::exists like this is a bad idea.
// Instead, use the fs.h code to get a list of all files in that
// directory and simply check whether that filename is contained
// in it.
2005-09-04 14:51:00 +00:00
if ( File : : exists ( detectName , ConfMan . get ( " path " ) . c_str ( ) ) ) {
found = true ;
break ;
}
2006-02-25 17:36:32 +00:00
substLastIndex = findSubstResFileName ( subst , tempName , substLastIndex + 1 ) ;
applySubstResFileName ( subst , tempName , detectName , sizeof ( detectName ) ) ;
2005-09-04 14:51:00 +00:00
}
2005-09-17 00:24:51 +00:00
if ( found ) {
if ( substLastIndex ! = 0 )
debug ( 5 , " Generated filename substitute: %s -> %s " , tempName , detectName ) ;
2005-09-04 14:51:00 +00:00
break ;
2005-09-17 00:24:51 +00:00
}
2005-02-11 03:45:10 +00:00
}
2005-07-30 21:11:48 +00:00
2005-05-05 12:03:16 +00:00
// Unable to locate game data
if ( ! found ) {
return 0 ;
}
2005-02-11 03:45:10 +00:00
// Force game to have Mac platform if needed
2006-02-25 17:36:32 +00:00
if ( subst . winName ) {
if ( subst . genMethod = = kGenMac | |
subst . genMethod = = kGenMacNoParens )
2005-04-20 09:53:13 +00:00
game . platform = Common : : kPlatformMacintosh ;
2004-09-10 12:13:03 +00:00
}
2004-06-29 12:10:08 +00:00
2006-01-21 18:17:56 +00:00
// Compute the MD5 of the file, and (if we succeeded) store a hex version
// of it in gameMD5 (useful to print it to the user in messages).
2005-05-10 22:56:25 +00:00
if ( Common : : md5_file ( detectName , md5sum , ConfMan . get ( " path " ) . c_str ( ) , kMD5FileSizeLimit ) ) {
2004-09-10 12:13:03 +00:00
for ( int j = 0 ; j < 16 ; j + + ) {
sprintf ( gameMD5 + j * 2 , " %02x " , ( int ) md5sum [ j ] ) ;
2004-06-29 12:10:08 +00:00
}
2004-09-10 12:13:03 +00:00
}
2006-01-21 12:01:39 +00:00
// Check if the MD5 was overwritten, if so, use that in the subsequent search
const char * md5 ;
2005-09-20 00:52:32 +00:00
if ( ConfMan . hasKey ( " target_md5 " ) ) {
2006-01-21 12:01:39 +00:00
md5 = ConfMan . get ( " target_md5 " ) . c_str ( ) ;
2005-09-20 00:52:32 +00:00
} else {
2006-01-21 12:01:39 +00:00
md5 = gameMD5 ;
}
// Now search our 'database' for the MD5; if a match is found, we use
// the information in the 'database' to correct the GameSettings.
g = multiple_versions_md5_settings ;
2006-01-21 13:01:20 +00:00
while ( g - > gameid ) {
if ( ! scumm_stricmp ( md5 , g - > gameid ) ) {
2006-02-20 16:35:37 +00:00
// Match found. Copy the data and ensure that we use the correct
// gameid (since we abused that field to store the MD5).
2005-10-28 11:41:07 +00:00
game = * g ;
2006-02-20 16:35:37 +00:00
game . gameid = gameid ;
2006-02-12 20:51:56 +00:00
if ( game . extra ) {
Common : : String desc ( findDescriptionFromGameID ( gameid ) ) ;
desc + = " ( " ;
desc + = game . extra ;
desc + = " ) " ;
// FIXME: Unconditionally setting the window caption here seems
// quite wrong. In particular, we override whatever custom
// description the user has set.
g_system - > setWindowCaption ( desc . c_str ( ) ) ;
}
2006-01-21 12:01:39 +00:00
break ;
2005-09-20 00:52:32 +00:00
}
2006-01-21 12:01:39 +00:00
g + + ;
2004-06-29 12:10:08 +00:00
}
2006-01-21 12:01:39 +00:00
2006-01-21 18:17:56 +00:00
// Check for a user override of the platform. We allow the user to override
// the platform, to make it possible to add games which are not yet in
// our MD5 database but require a specific platform setting.
2005-04-20 09:53:13 +00:00
if ( ConfMan . hasKey ( " platform " ) )
game . platform = Common : : parsePlatform ( ConfMan . get ( " platform " ) ) ;
2003-10-08 21:59:23 +00:00
2006-01-21 18:17:56 +00:00
// V3 FM-TOWNS games *always* should use the corresponding music driver,
// anything else makes no sense for them.
2005-04-20 18:21:30 +00:00
if ( game . platform = = Common : : kPlatformFMTowns & & game . version = = 3 ) {
game . midi = MDT_TOWNS ;
2003-10-03 18:33:57 +00:00
}
2006-02-25 18:24:22 +00:00
// Check for unknown MD5 checksums, and print a message if we encounter one.
const MD5Table * elem ;
# ifdef PALMOS_68K
uint32 arraySize = MemPtrSize ( ( void * ) md5table ) / sizeof ( MD5Table ) - 1 ;
# else
uint32 arraySize = ARRAYSIZE ( md5table ) - 1 ;
# endif
elem = ( const MD5Table * ) bsearch ( md5 , md5table , arraySize , sizeof ( MD5Table ) , compareMD5Table ) ;
if ( ! elem )
printf ( " Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team \n " , md5 ) ;
2006-01-21 18:17:56 +00:00
// Finally, we have massaged the GameSettings to our satisfaction, and can
// instantiate the appropriate game engine. Hooray!
2003-10-28 17:07:25 +00:00
switch ( game . version ) {
2003-10-03 18:33:57 +00:00
case 1 :
case 2 :
2005-05-18 02:56:41 +00:00
if ( game . id = = GID_MANIAC & & game . platform = = Common : : kPlatformC64 )
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_c64 ( detector , syst , game , md5sum , subst ) ;
2005-05-18 02:32:25 +00:00
else
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v2 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
case 3 :
2005-04-03 15:06:08 +00:00
if ( game . features & GF_OLD_BUNDLE )
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v3old ( detector , syst , game , md5sum , subst ) ;
2005-04-03 15:06:08 +00:00
else
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v3 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
case 4 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v4 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
case 5 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v5 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
case 6 :
2004-08-23 10:52:10 +00:00
switch ( game . heversion ) {
2005-05-14 14:06:37 +00:00
# ifndef DISABLE_HE
2004-10-09 14:33:31 +00:00
case 100 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v100he ( detector , syst , game , md5sum , subst ) ;
2004-10-09 14:33:31 +00:00
break ;
2005-04-07 10:43:51 +00:00
case 99 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v99he ( detector , syst , game , md5sum , subst ) ;
2005-04-07 11:43:38 +00:00
break ;
2004-08-26 14:35:38 +00:00
case 98 :
2005-04-19 09:53:06 +00:00
case 95 :
2005-04-29 01:36:30 +00:00
case 90 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v90he ( detector , syst , game , md5sum , subst ) ;
2004-09-06 00:58:40 +00:00
break ;
case 80 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v80he ( detector , syst , game , md5sum , subst ) ;
2004-09-06 00:58:40 +00:00
break ;
2005-05-21 14:20:28 +00:00
case 73 :
2004-09-06 00:58:40 +00:00
case 72 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v72he ( detector , syst , game , md5sum , subst ) ;
2004-08-23 10:52:10 +00:00
break ;
case 71 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v71he ( detector , syst , game , md5sum , subst ) ;
2005-04-29 01:36:30 +00:00
break ;
2004-08-23 10:52:10 +00:00
case 70 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v70he ( detector , syst , game , md5sum , subst ) ;
2004-08-23 10:52:10 +00:00
break ;
2004-03-02 13:09:35 +00:00
# endif
2005-10-12 19:45:35 +00:00
# ifndef PALMOS_68K
2005-04-20 01:33:44 +00:00
case 61 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v60he ( detector , syst , game , md5sum , subst ) ;
2004-08-23 10:52:10 +00:00
break ;
2005-10-12 19:45:35 +00:00
# endif
2004-08-23 10:52:10 +00:00
default :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v6 ( detector , syst , game , md5sum , subst ) ;
2004-03-01 05:57:30 +00:00
}
2003-10-03 18:33:57 +00:00
break ;
2005-05-14 22:56:41 +00:00
# ifndef DISABLE_SCUMM_7_8
2003-10-03 18:33:57 +00:00
case 7 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v7 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
case 8 :
2006-02-25 17:36:32 +00:00
engine = new ScummEngine_v8 ( detector , syst , game , md5sum , subst ) ;
2003-10-03 18:33:57 +00:00
break ;
2004-03-02 13:09:35 +00:00
# endif
2003-10-03 18:33:57 +00:00
default :
error ( " Engine_SCUMM_create(): Unknown version of game engine " ) ;
}
return engine ;
}
2005-03-25 17:55:57 +00:00
REGISTER_PLUGIN ( SCUMM , " Scumm Engine " )
2005-03-11 10:46:28 +00:00
2005-10-08 21:34:59 +00:00
# ifdef PALMOS_68K
2005-03-11 10:46:28 +00:00
# include "scumm_globals.h"
_GINIT ( Scumm_md5table )
_GSETPTR ( md5table , GBVARS_MD5TABLE_INDEX , MD5Table , GBVARS_SCUMM )
_GEND
_GRELEASE ( Scumm_md5table )
_GRELEASEPTR ( GBVARS_MD5TABLE_INDEX , GBVARS_SCUMM )
_GEND
# endif