Old targets will be auto updated.

Many non-English versions will be broken until information is updated.

svn-id: r19563
This commit is contained in:
Travis Howell 2005-11-12 06:01:24 +00:00
parent 5496f91269
commit b4908f449e
18 changed files with 1182 additions and 558 deletions

View file

@ -223,7 +223,7 @@ static const byte _simon2_cursors[10][256] = {
};
void SimonEngine::draw_mouse_pointer() {
if (_game & GF_SIMON2)
if (getGameType() == GType_SIMON2)
_system->setMouseCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
else
_system->setMouseCursor(_simon1_cursor, 16, 16, 0, 0);

View file

@ -37,13 +37,13 @@ const byte *SimonEngine::dumpOpcode(const byte *p) {
opcode = *p++;
if (opcode == 255)
return NULL;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
st = s = feeblefiles_opcode_name_table[opcode];
} else if (_game & GF_SIMON2 && _game & GF_TALKIE) {
} else if (getGameType() == GType_SIMON2 && getFeatures() & GF_TALKIE) {
st = s = simon2talkie_opcode_name_table[opcode];
} else if (_game & GF_TALKIE) {
} else if (getFeatures() & GF_TALKIE) {
st = s = simon1talkie_opcode_name_table[opcode];
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
st = s = simon2dos_opcode_name_table[opcode];
} else {
st = s = simon1dos_opcode_name_table[opcode];
@ -176,7 +176,7 @@ void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
const char *str, *strn;
do {
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
opcode = READ_BE_UINT16(src);
src += 2;
} else {
@ -188,9 +188,9 @@ void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
return;
}
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
strn = str = feeblefiles_video_opcode_name_table[opcode];
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
strn = str = simon2_video_opcode_name_table[opcode];
} else {
strn = str = simon1_video_opcode_name_table[opcode];
@ -200,7 +200,7 @@ void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
strn++;
fprintf(_dumpFile, "%.2d: %s ", opcode, strn + 1);
int end = (_game == GAME_FEEBLEFILES) ? 9999 : 999;
int end = (getGameType() == GType_FF) ? 9999 : 999;
for (; *str != '|'; str++) {
switch (*str) {
case 'x':

View file

@ -106,10 +106,10 @@ bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
bool Debugger::Cmd_PlayMusic(int argc, const char **argv) {
if (argc > 1) {
uint music = atoi(argv[1]);
uint range = (_vm->_game & GF_SIMON2) ? 93 : 34;
uint range = (_vm->getGameType() == GType_SIMON2) ? 93 : 34;
if (music <= range) {
_vm->loadMusic (music);
if (_vm->_game & GF_SIMON2)
if (_vm->getGameType() == GType_SIMON2)
_vm->midi.startTrack (0);
} else
DebugPrintf("Music out of range (0 - %d)\n", range);
@ -122,7 +122,7 @@ bool Debugger::Cmd_PlayMusic(int argc, const char **argv) {
bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
if (argc > 1) {
uint sound = atoi(argv[1]);
uint range = (_vm->_game & GF_SIMON2) ? 222 : 127;
uint range = (_vm->getGameType() == GType_SIMON2) ? 222 : 127;
if (sound <= range)
_vm->_sound->playEffects(sound);
else
@ -136,7 +136,7 @@ bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
bool Debugger::Cmd_PlayVoice(int argc, const char **argv) {
if (argc > 1) {
uint voice = atoi(argv[1]);
uint range = (_vm->_game & GF_SIMON2) ? 3632 : 1996;
uint range = (_vm->getGameType() == GType_SIMON2) ? 3632 : 1996;
if (voice <= range)
_vm->_sound->playVoice(voice);
else

715
simon/game.cpp Normal file
View file

@ -0,0 +1,715 @@
/* ScummVM - Scumm Interpreter
* Copyright (C) 2001-2005 The ScummVM project
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Header$
*
*/
#include "common/stdafx.h"
#include "backends/fs/fs.h"
#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/md5.h"
#include "simon/simon.h"
#include "simon/intern.h"
using Common::File;
namespace Simon {
static int detectGame(const FSList &fslist, bool mode = false, int start = -1);
struct GameMD5 {
GameIds id;
const char *md5;
const char *filename;
bool caseSensitive;
};
#define FILE_MD5_BYTES 5000
static GameMD5 gameMD5[] = {
{ GID_SIMON1ACORN, "64958b3a38afdcb85da1eeed85169806", "data", false },
{ GID_SIMON1ACORN, "28261b99cd9da1242189b4f6f2841bd6", "gamebase", false },
{ GID_SIMON1ACORN, "22107c24dfb31b66ac503c28a6e20b19", "icondata", false},
{ GID_SIMON1ACORN, "f3b27a3fbb45dcd323a48159496e45e8", "stripped", false},
{ GID_SIMON1ACORN, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1CD32, "bab7f19237cf7d7619b6c73631da1854", "gameamiga", true },
{ GID_SIMON1CD32, "565ef7a98dcc21ef526a2bb10b6f42ed", "icon.pkd", true },
{ GID_SIMON1CD32, "59be788020441e21861e284236fd08c1", "stripped.txt", true},
{ GID_SIMON1CD32, "f9d5bf2ce09f82289c791c3ca26e1e4b", "tbllist", true},
{ GID_SIMON1DOS, "9f93d27432ce44a787eef10adb640870", "gamepc", false },
{ GID_SIMON1DOS, "22107c24dfb31b66ac503c28a6e20b19", "icon.dat", false},
{ GID_SIMON1DOS, "2af9affc5981eec44b90d4c556145cb8", "stripped.txt", false},
{ GID_SIMON1DOS, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1DEMO, "2be4a21bc76e2fdc071867c130651439", "gdemo", false },
{ GID_SIMON1DEMO, "55af3b4d93972bc58bfee38a86b76c3f", "icon.dat", false},
{ GID_SIMON1DEMO, "33a2e329b97b2a349858d6a093159eb7", "stripped.txt", false},
{ GID_SIMON1DEMO, "1247e024e1f13ca54c1e354120c7519c", "tbllist", false},
{ GID_SIMON1TALKIE, "28261b99cd9da1242189b4f6f2841bd6", "gamepc", false },
{ GID_SIMON1TALKIE, "22107c24dfb31b66ac503c28a6e20b19", "icon.dat", false},
{ GID_SIMON1TALKIE, "64958b3a38afdcb85da1eeed85169806", "simon.gme", false },
{ GID_SIMON1TALKIE, "f3b27a3fbb45dcd323a48159496e45e8", "stripped.txt", false},
{ GID_SIMON1TALKIE, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1TALKIE_FR, "00000000000000000000000000000000", "gamepc", false },
{ GID_SIMON1TALKIE_FR, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON1TALKIE_FR, "00000000000000000000000000000000", "simon.gme", false },
{ GID_SIMON1TALKIE_FR, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON1TALKIE_FR, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON1TALKIE_DE, "00000000000000000000000000000000", "gamepc", false },
{ GID_SIMON1TALKIE_DE, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON1TALKIE_DE, "00000000000000000000000000000000", "simon.gme", false },
{ GID_SIMON1TALKIE_DE, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON1TALKIE_DE, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON1TALKIE_HB, "bc66e9c0b296e1b155a246917133f71a", "gamepc", false },
{ GID_SIMON1TALKIE_HB, "22107c24dfb31b66ac503c28a6e20b19", "icon.dat", false},
{ GID_SIMON1TALKIE_HB, "a34b2c8642f2e3676d7088b5c8b3e884", "simon.gme", false },
{ GID_SIMON1TALKIE_HB, "9d31bef42db1a8abe4e9f368014df1d5", "stripped.txt", false},
{ GID_SIMON1TALKIE_HB, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1TALKIE_IT, "00000000000000000000000000000000", "gamepc", false },
{ GID_SIMON1TALKIE_IT, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON1TALKIE_IT, "00000000000000000000000000000000", "simon.gme", false },
{ GID_SIMON1TALKIE_IT, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON1TALKIE_IT, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON1TALKIE_ES, "439f801ba52c02c9d1844600d1ce0f5e", "gamepc", false },
{ GID_SIMON1TALKIE_ES, "22107c24dfb31b66ac503c28a6e20b19", "icon.dat", false},
{ GID_SIMON1TALKIE_ES, "eff2774a73890b9eac533db90cd1afa1", "simon.gme", false },
{ GID_SIMON1TALKIE_ES, "9d31bef42db1a8abe4e9f368014df1d5", "stripped.txt", false},
{ GID_SIMON1TALKIE_ES, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1WIN, "c7c12fea7f6d0bfd22af5cdbc8166862", "gamepc", false },
{ GID_SIMON1WIN, "22107c24dfb31b66ac503c28a6e20b19", "icon.dat", false},
{ GID_SIMON1WIN, "b1b18d0731b64c0738c5cc4a2ee792fc", "simon.gme", false },
{ GID_SIMON1WIN, "a27e87a9ba21212d769804b3df47bfb2", "stripped.txt", false},
{ GID_SIMON1WIN, "d198a80de2c59e4a0cd24b98814849e8", "tbllist", false},
{ GID_SIMON1WIN_DE, "00000000000000000000000000000000", "gamepc", false },
{ GID_SIMON1WIN_DE, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON1WIN_DE, "00000000000000000000000000000000", "simon.gme", false },
{ GID_SIMON1WIN_DE, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON1WIN_DE, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON2DOS, "00000000000000000000000000000000", "game32", false },
{ GID_SIMON2DOS, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON2DOS, "00000000000000000000000000000000", "simon2.gme", false},
{ GID_SIMON2DOS, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON2DOS, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON2DEMO, "3794c15887539b8578bacab694ccf08a", "gsptr30", false },
{ GID_SIMON2DEMO, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2DEMO, "f8c9e6df1e55923a749e115ba74210c4", "simon2.gme", false},
{ GID_SIMON2DEMO, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},
{ GID_SIMON2DEMO, "a0d5a494b5d3d209d1a1d76cc8d76601", "tbllist", false},
{ GID_SIMON2TALKIE, "8c301fb9c4fcf119d2730ccd2a565eb3", "gsptr30", false },
{ GID_SIMON2TALKIE, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2TALKIE, "9c535d403966750ae98bdaf698375a38", "simon2.gme", false },
{ GID_SIMON2TALKIE, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},
{ GID_SIMON2TALKIE, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
{ GID_SIMON2TALKIE_FR, "43b3a04d2f0a0cbd1b024c814856561a", "gsptr30", false },
{ GID_SIMON2TALKIE_FR, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2TALKIE_FR, "8af0e02c0c3344db64dffc12196eb59d", "simon2.gme", false },
{ GID_SIMON2TALKIE_FR, "5ea27977b4d7dcfd50eb5074e162ebbf", "stripped.txt", false},
{ GID_SIMON2TALKIE_FR, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
{ GID_SIMON2TALKIE_DE, "00000000000000000000000000000000", "gsptr30", false },
{ GID_SIMON2TALKIE_DE, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON2TALKIE_DE, "00000000000000000000000000000000", "simon2.gme", false },
{ GID_SIMON2TALKIE_DE, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON2TALKIE_DE, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON2TALKIE_HB, "952a2b1be23c3c609ba8d988a9a1627d", "gsptr30", false },
{ GID_SIMON2TALKIE_HB, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2TALKIE_HB, "a2b249a82ea182af09789eb95fb6c5be", "simon2.gme", false },
{ GID_SIMON2TALKIE_HB, "de9dbc24158660e153483fa0cf6c3172", "stripped.txt", false},
{ GID_SIMON2TALKIE_HB, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
{ GID_SIMON2TALKIE_IT, "00000000000000000000000000000000", "gsptr30", false },
{ GID_SIMON2TALKIE_IT, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON2TALKIE_IT, "00000000000000000000000000000000", "simon2.gme", false },
{ GID_SIMON2TALKIE_IT, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON2TALKIE_IT, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON2TALKIE_ES, "00000000000000000000000000000000", "gsptr30", false },
{ GID_SIMON2TALKIE_ES, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON2TALKIE_ES, "00000000000000000000000000000000", "simon2.gme", false },
{ GID_SIMON2TALKIE_ES, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON2TALKIE_ES, "00000000000000000000000000000000", "tbllist", false},
{ GID_SIMON2WIN, "608e277904d87dd28725fa08eacc2c0d", "gsptr30", false },
{ GID_SIMON2WIN, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2WIN, "e749c4c103d7e7d51b34620ed76c5a04", "simon2.gme", false },
{ GID_SIMON2WIN, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},
{ GID_SIMON2WIN, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
{ GID_SIMON2WIN_DE, "00000000000000000000000000000000", "gsptr30", false },
{ GID_SIMON2WIN_DE, "00000000000000000000000000000000", "icon.dat", false},
{ GID_SIMON2WIN_DE, "00000000000000000000000000000000", "simon2.gme", false },
{ GID_SIMON2WIN_DE, "00000000000000000000000000000000", "stripped.txt", false},
{ GID_SIMON2WIN_DE, "00000000000000000000000000000000", "tbllist", false},
};
// Simon the Sorcerer 1
static GameFileDescription SIMON1CD32_GameFiles[] = {
{"gameamiga", GAME_BASEFILE},
{"icon.pkd", GAME_ICONFILE},
{"stripped.txt", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
static GameFileDescription SIMON1ACORN_GameFiles[] = {
{"data", GAME_GMEFILE},
{"gamebase", GAME_BASEFILE},
{"icondata", GAME_ICONFILE},
{"stripped", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
static GameFileDescription SIMON1DEMO_GameFiles[] = {
{"gdemo", GAME_BASEFILE},
{"icon.dat", GAME_ICONFILE},
{"stripped.txt", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
static GameFileDescription SIMON1DOS_GameFiles[] = {
{"gamepc", GAME_BASEFILE},
{"icon.dat", GAME_ICONFILE},
{"stripped.txt", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
static GameFileDescription SIMON1_GameFiles[] = {
{"gamepc", GAME_BASEFILE},
{"icon.dat", GAME_ICONFILE},
{"simon.gme", GAME_GMEFILE},
{"stripped.txt", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
// Simon the Sorcerer 2
static GameFileDescription SIMON2_GameFiles[] = {
{"gsptr30", GAME_BASEFILE},
{"icon.dat", GAME_ICONFILE},
{"simon2.gme", GAME_GMEFILE},
{"stripped.txt", GAME_STRFILE},
{"tbllist", GAME_TBLFILE},
};
static GameDescription gameDescriptions[] = {
// Simon the Sorcerer 1 - English Amiga CD32
{
"simon1",
GType_SIMON1,
GID_SIMON1CD32,
"Simon the Sorcerer 1 (Amiga CD32)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1CD32_GameFiles,
GF_TALKIE | GF_OLD_BUNDLE,
Common::EN_USA,
Common::kPlatformAmiga,
},
// Simon the Sorcerer 1 - English Acorn CD
{
"simon1",
GType_SIMON1,
GID_SIMON1ACORN,
"Simon the Sorcerer 1 (Acorn CD)",
ARRAYSIZE(SIMON1ACORN_GameFiles),
SIMON1ACORN_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformAcorn,
},
// Simon the Sorcerer 1 - English DOS Floppy Demo
{
"simon1",
GType_SIMON1,
GID_SIMON1DEMO,
"Simon the Sorcerer 1 (DOS Floppy Demo)",
ARRAYSIZE(SIMON1DEMO_GameFiles),
SIMON1DEMO_GameFiles,
GF_OLD_BUNDLE,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - English DOS Floppy (Infocom)
{
"simon1",
GType_SIMON1,
GID_SIMON1DOS,
"Simon the Sorcerer 1 (DOS Floppy)",
ARRAYSIZE(SIMON1DOS_GameFiles),
SIMON1DOS_GameFiles,
GF_OLD_BUNDLE,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - English DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE,
"Simon the Sorcerer 1 (DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - French DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE_FR,
"Simon the Sorcerer 1 (Fr DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::FR_FRA,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - German DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE_DE,
"Simon the Sorcerer 1 (De DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::DE_DEU,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - Hebrew DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE_HB,
"Simon the Sorcerer 1 (Hb DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::HB_ISR,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - Italian DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE_IT,
"Simon the Sorcerer 1 (It DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::IT_ITA,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - Spanish DOS CD
{
"simon1",
GType_SIMON1,
GID_SIMON1TALKIE_ES,
"Simon the Sorcerer 1 (Sp DOS CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::ES_ESP,
Common::kPlatformPC,
},
// Simon the Sorcerer 1 - English Windows CD
{
"simon1",
GType_SIMON1,
GID_SIMON1WIN,
"Simon the Sorcerer 1 (Windows CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformWindows,
},
// Simon the Sorcerer 1 - German Windows CD
{
"simon1",
GType_SIMON1,
GID_SIMON1WIN_DE,
"Simon the Sorcerer 1 (De Windows CD)",
ARRAYSIZE(SIMON1_GameFiles),
SIMON1_GameFiles,
GF_TALKIE,
Common::DE_DEU,
Common::kPlatformWindows,
},
// Simon the Sorcerer 2 - English DOS Floppy
{
"simon2",
GType_SIMON2,
GID_SIMON2DOS,
"Simon the Sorcerer 2 (DOS Floppy)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
0,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - English DOS CD Demo
{
"simon2",
GType_SIMON2,
GID_SIMON2DEMO,
"Simon the Sorcerer 2 (DOS CD Demo)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - English DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE,
"Simon the Sorcerer 2 (DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - French DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE_FR,
"Simon the Sorcerer 2 (Fr DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::FR_FRA,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - German DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE_DE,
"Simon the Sorcerer 2 (De DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::DE_DEU,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - Hebrew DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE_HB,
"Simon the Sorcerer 2 (Hb DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::HB_ISR,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - Italian DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE_IT,
"Simon the Sorcerer 2 (It DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::IT_ITA,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - Spanish DOS CD
{
"simon2",
GType_SIMON2,
GID_SIMON2TALKIE_ES,
"Simon the Sorcerer 2 (Sp DOS CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::ES_ESP,
Common::kPlatformPC,
},
// Simon the Sorcerer 2 - English Windows CD
{
"simon2",
GType_SIMON2,
GID_SIMON2WIN,
"Simon the Sorcerer 2 (Windows CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::EN_USA,
Common::kPlatformWindows,
},
// Simon the Sorcerer 2 - German Windows CD
{
"simon2",
GType_SIMON2,
GID_SIMON2WIN_DE,
"Simon the Sorcerer 2 (De Windows CD)",
ARRAYSIZE(SIMON2_GameFiles),
SIMON2_GameFiles,
GF_TALKIE,
Common::DE_DEU,
Common::kPlatformWindows,
},
};
bool SimonEngine::initGame(void) {
int gameNumber;
FSList dummy;
if ((gameNumber = detectGame(dummy)) == -1) {
warning("No valid games were found in the specified directory.");
return false;
}
debug(0, "Running %s", gameDescriptions[gameNumber].title);
_gameDescription = &gameDescriptions[gameNumber];
return true;
}
DetectedGameList GAME_ProbeGame(const FSList &fslist, int **retmatches) {
DetectedGameList detectedGames;
int game_n;
int index = 0, i, j;
int matches[ARRAYSIZE(gameDescriptions)];
bool mode = retmatches ? false : true;
game_n = -1;
for (i = 0; i < ARRAYSIZE(gameDescriptions); i++)
matches[i] = -1;
while (1) {
game_n = detectGame(fslist, mode, game_n);
if (game_n == -1)
break;
matches[index++] = game_n;
}
// We have some resource sets which are superpositions of other
// Particularly it is ite-demo-linux vs ite-demo-win
// Now remove lesser set if bigger matches too
if (index > 1) {
// Search max number
int maxcount = 0;
for (i = 0; i < index; i++) {
int count = 0;
for (j = 0; j < ARRAYSIZE(gameMD5); j++)
if (gameMD5[j].id == gameDescriptions[matches[i]].gameId)
count++;
maxcount = MAX(maxcount, count);
}
// Now purge targets with number of files lesser than max
for (i = 0; i < index; i++) {
int count = 0;
for (j = 0; j < ARRAYSIZE(gameMD5); j++)
if (gameMD5[j].id == gameDescriptions[matches[i]].gameId)
count++;
if (count < maxcount) {
debug(2, "Purged: %s", gameDescriptions[matches[i]].title);
matches[i] = -1;
}
}
}
// and now push them into list of detected games
for (i = 0; i < index; i++)
if (matches[i] != -1)
detectedGames.push_back(DetectedGame(gameDescriptions[matches[i]].toGameSettings(),
gameDescriptions[matches[i]].language,
gameDescriptions[matches[i]].platform));
if (retmatches) {
*retmatches = (int *)calloc(ARRAYSIZE(gameDescriptions), sizeof(int));
for (i = 0; i < ARRAYSIZE(gameDescriptions); i++)
(*retmatches)[i] = matches[i];
}
return detectedGames;
}
int detectGame(const FSList &fslist, bool mode, int start) {
int game_count = ARRAYSIZE(gameDescriptions);
int game_n = -1;
typedef Common::Map<Common::String, Common::String> StringMap;
StringMap filesMD5;
typedef Common::Map<Common::String, bool> StringSet;
StringSet filesList;
uint16 file_count;
uint16 file_n;
Common::File test_file;
bool file_missing;
Common::String tstr, tstr1;
char md5str[32+1];
uint8 md5sum[16];
// First we compose list of files which we need MD5s for
for (int i = 0; i < ARRAYSIZE(gameMD5); i++) {
tstr = Common::String(gameMD5[i].filename);
tstr.toLowercase();
if (gameMD5[i].caseSensitive && !mode)
filesList[Common::String(gameMD5[i].filename)] = true;
else
filesList[tstr] = true;
}
if (mode) {
// Now count MD5s for required files
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
tstr = file->displayName();
// FIXME: there is a bug in String class. tstr1 = tstr; tstr.toLowercase()
// makes tstr1 lowercase as well
tstr1 = Common::String(file->displayName().c_str());
tstr.toLowercase();
if (filesList.contains(tstr) || filesList.contains(tstr1)) {
if (Common::md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
filesMD5[tstr] = Common::String(md5str);
filesMD5[tstr1] = Common::String(md5str);
}
}
}
}
} else {
Common::File testFile;
for (StringSet::const_iterator file = filesList.begin(); file != filesList.end(); ++file) {
if (testFile.open(file->_key.c_str())) {
testFile.close();
if (Common::md5_file(file->_key.c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
filesMD5[file->_key] = Common::String(md5str);
}
}
}
}
for (game_n = start + 1; game_n < game_count; game_n++) {
file_count = gameDescriptions[game_n].filesCount;
file_missing = false;
// Try to open all files for this game
for (file_n = 0; file_n < file_count; file_n++) {
tstr = gameDescriptions[game_n].filesDescriptions[file_n].fileName;
if (!filesMD5.contains(tstr)) {
file_missing = true;
break;
}
}
// Try the next game, couldn't find all files for the current
// game
if (file_missing) {
continue;
} else {
bool match = true;
debug(0, "Probing game: %s", gameDescriptions[game_n].title);
for (int i = 0; i < ARRAYSIZE(gameMD5); i++) {
if (gameMD5[i].id == gameDescriptions[game_n].gameId) {
tstr = gameMD5[i].filename;
if (strcmp(gameMD5[i].md5, filesMD5[tstr].c_str())) {
match = false;
break;
}
}
}
if (!match)
continue;
debug(0, "Found game: %s", gameDescriptions[game_n].title);
return game_n;
}
}
if (!filesMD5.isEmpty() && start == -1) {
printf("MD5s of your game version are unknown. Please, report following data to\n");
printf("ScummVM team along with your game name and version:\n");
for (StringMap::const_iterator file = filesMD5.begin(); file != filesMD5.end(); ++file)
printf("%s: %s\n", file->_key.c_str(), file->_value.c_str());
}
return -1;
}
} // End of namespace Simon

View file

@ -30,9 +30,9 @@ namespace Simon {
void SimonEngine::loadIconFile() {
Common::File in;
if (_game & GF_ACORN)
if (getPlatform() == Common::kPlatformAcorn)
in.open("ICONDATA");
else if (_game & GF_AMIGA)
else if (getPlatform() == Common::kPlatformAmiga)
in.open("icon.pkd");
else
in.open("ICON.DAT");
@ -161,12 +161,12 @@ void SimonEngine::draw_icon_c(FillOrCopyStruct *fcs, uint icon, uint x, uint y)
_lockWord |= 0x8000;
dst = dx_lock_2();
if (!(_game & GF_SIMON2)) {
if (!(getGameType() == GType_SIMON2)) {
// Simon 1
dst += (x + fcs->x) * 8;
dst += (y * 25 + fcs->y) * _dxSurfacePitch;
if (_game & GF_AMIGA) {
if (getPlatform() == Common::kPlatformAmiga) {
src = _iconFilePtr;
src += READ_BE_UINT32(&((uint32 *)src)[icon]);
decompress_icon_amiga (dst, src, 0xE0, _dxSurfacePitch);
@ -200,7 +200,7 @@ uint SimonEngine::setup_icon_hit_area(FillOrCopyStruct *fcs, uint x, uint y, uin
ha = findEmptyHitArea();
if (!(_game & GF_SIMON2)) {
if (!(getGameType() == GType_SIMON2)) {
ha->x = (x + fcs->x) << 3;
ha->y = y * 25 + fcs->y;
ha->item_ptr = item_ptr;

View file

@ -147,30 +147,46 @@ struct GameSpecificSettings {
} // End of namespace Simon
enum {
GF_SIMON1 = 1 << 0,
GF_SIMON2 = 1 << 1,
GF_WIN = 1 << 2,
GF_TALKIE = 1 << 3,
GF_DEMO = 1 << 4,
GF_AMIGA = 1 << 5,
GF_ACORN = 1 << 6,
GF_OLD_BUNDLE = 1 << 7
enum GameFeatures {
GF_TALKIE = 1 << 0,
GF_OLD_BUNDLE = 1 << 1
};
enum {
GAME_SIMON1DOS = GF_SIMON1 | GF_OLD_BUNDLE,
GAME_SIMON1DEMO = GF_SIMON1 | GF_DEMO | GF_OLD_BUNDLE,
GAME_SIMON1AMIGA = GF_SIMON1 | GF_AMIGA | GF_OLD_BUNDLE,
GAME_SIMON1CD32 = GF_SIMON1 | GF_TALKIE | GF_AMIGA | GF_OLD_BUNDLE,
GAME_SIMON1ACORN = GF_SIMON1 | GF_TALKIE | GF_ACORN,
GAME_SIMON1TALKIE = GF_SIMON1 | GF_TALKIE,
enum GameFileTypes {
GAME_BASEFILE = 1 << 0,
GAME_ICONFILE = 1 << 1,
GAME_GMEFILE = 1 << 2,
GAME_STRFILE = 1 << 3,
GAME_TBLFILE = 1 << 4
};
GAME_SIMON2DOS = GF_SIMON2,
GAME_SIMON2TALKIE = GF_SIMON2 | GF_TALKIE,
GAME_SIMON2WIN = GF_SIMON2 | GF_WIN | GF_TALKIE,
enum GameIds {
GID_SIMON1DOS,
GID_SIMON1DEMO,
GID_SIMON1AMIGA,
GID_SIMON1CD32,
GID_SIMON1ACORN,
GID_SIMON1TALKIE,
GID_SIMON1TALKIE_DE,
GID_SIMON1TALKIE_FR,
GID_SIMON1TALKIE_HB,
GID_SIMON1TALKIE_IT,
GID_SIMON1TALKIE_ES,
GID_SIMON1WIN,
GID_SIMON1WIN_DE,
GAME_FEEBLEFILES = GF_SIMON2 | GF_WIN | GF_TALKIE | GF_OLD_BUNDLE
GID_SIMON2DOS,
GID_SIMON2DEMO,
GID_SIMON2TALKIE,
GID_SIMON2TALKIE_DE,
GID_SIMON2TALKIE_FR,
GID_SIMON2TALKIE_HB,
GID_SIMON2TALKIE_IT,
GID_SIMON2TALKIE_ES,
GID_SIMON2WIN,
GID_SIMON2WIN_DE,
GAME_FEEBLEFILES
};
#endif

View file

@ -277,7 +277,7 @@ int SimonEngine::runScript() {
// Disable random in simon1amiga for now
// Since copy protection screen is currently unreadable
if (_game == GAME_SIMON1AMIGA)
if (getPlatform() == Common::kPlatformAmiga)
writeVariable(var, 4);
else
writeVariable(var, _rnd.getRandomNumber(value - 1));
@ -374,7 +374,7 @@ int SimonEngine::runScript() {
case 67:{ /* set item description */
uint var = getVarOrByte();
uint string_id = getNextStringID();
if (_game & GF_TALKIE) {
if (getFeatures() & GF_TALKIE) {
uint speech_id = getNextWord();
if (var < 20) {
_stringIdArray3[var] = string_id;
@ -400,7 +400,7 @@ int SimonEngine::runScript() {
case 70:{ /* show string from array */
const char *str = (const char *)getStringPtrByID(_stringIdArray3[getVarOrByte()]);
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
writeVariable(51, strlen(str) / 53 * 8 + 8);
}
@ -449,7 +449,7 @@ int SimonEngine::runScript() {
break;
case 83:{ /* restart subroutine */
if (_game & GF_SIMON2)
if (getGameType() == GType_SIMON2)
o_83_helper();
return -10;
}
@ -527,7 +527,7 @@ int SimonEngine::runScript() {
case 98:{ /* start vga */
uint vga_res, vgaSpriteId, windowNum, x, y, palette;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
vga_res = getVarOrWord();
vgaSpriteId = getVarOrWord();
} else {
@ -543,7 +543,7 @@ int SimonEngine::runScript() {
break;
case 99:{ /* kill sprite */
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
o_kill_sprite_simon1(getVarOrWord());
} else {
uint a = getVarOrWord();
@ -741,7 +741,7 @@ int SimonEngine::runScript() {
case 133:{ /* load game */
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
load_game(readVariable(55));
} else {
o_load_game();
@ -757,7 +757,7 @@ int SimonEngine::runScript() {
break;
case 135:{ /* quit if user presses y */
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
// Switch CD
debug(1, "Switch to CD number %d", readVariable(97));
} else {
@ -986,7 +986,7 @@ int SimonEngine::runScript() {
const char *string_ptr = (const char *)getStringPtrByID(_stringIdArray3[string_id]);
TextLocation *tl = getTextLocation(vgaSpriteId);
if (_game & GF_TALKIE)
if (getFeatures() & GF_TALKIE)
speech_id = _speechIdArray4[string_id];
if (_speech && speech_id != 0)
@ -1003,7 +1003,7 @@ int SimonEngine::runScript() {
case 181:{ /* force lock */
o_force_lock();
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
changeWindow(1);
showMessageFormat("\xC");
}
@ -1011,10 +1011,10 @@ int SimonEngine::runScript() {
break;
case 182:{ /* load beard */
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
// Load video file
debug(1,"Load video file: %s", getStringPtrByID(getNextStringID()));
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
goto invalid_opcode;
} else {
o_loadBeard();
@ -1023,10 +1023,10 @@ int SimonEngine::runScript() {
break;
case 183:{ /* unload beard */
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
// Play video
debug(1, "Play video");
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
goto invalid_opcode;
} else {
o_unloadBeard();
@ -1040,11 +1040,11 @@ int SimonEngine::runScript() {
break;
case 185:{ /* load sound files */
if (_game & GF_SIMON2)
if (getGameType() == GType_SIMON2)
goto invalid_opcode;
_soundFileId = getVarOrWord();
if (_game == GAME_SIMON1CD32) {
if (getPlatform() == Common::kPlatformAmiga && getFeatures() & GF_TALKIE) {
char buf[10];
sprintf(buf, "%d%s", _soundFileId, "Effects");
_sound->readSfxFile(buf);
@ -1061,14 +1061,14 @@ int SimonEngine::runScript() {
break;
case 187:{ /* fade to black */
if (_game & GF_SIMON2)
if (getGameType() == GType_SIMON2)
goto invalid_opcode;
o_fade_to_black();
}
break;
case 188: /* string2 is */
if (_game & GF_SIMON1)
if (getGameType() == GType_SIMON1)
goto invalid_opcode;
{
uint i = getVarOrByte();
@ -1078,7 +1078,7 @@ int SimonEngine::runScript() {
break;
case 189:{ /* clear_op189_flag */
if (_game & GF_SIMON1)
if (getGameType() == GType_SIMON1)
goto invalid_opcode;
_marks = 0;
}
@ -1086,7 +1086,7 @@ int SimonEngine::runScript() {
case 190:{
uint i;
if (_game & GF_SIMON1)
if (getGameType() == GType_SIMON1)
goto invalid_opcode;
i = getVarOrByte();
if (!(_marks & (1 << i)))
@ -1310,7 +1310,7 @@ void SimonEngine::o_inventory_descriptions() {
tl = getTextLocation(vgaSpriteId);
}
if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
if ((getGameType() == GType_SIMON2) && (getFeatures() & GF_TALKIE)) {
if (child != NULL && child->avail_props & 0x200) {
uint speech_id = child->array[getOffsetOfChild2Param(child, 0x200)];
@ -1362,7 +1362,7 @@ void SimonEngine::o_inventory_descriptions() {
talk_with_speech(speech_id, vgaSpriteId);
}
} else if (_game & GF_TALKIE) {
} else if (getFeatures() & GF_TALKIE) {
if (child != NULL && child->avail_props & 0x200) {
uint offs = getOffsetOfChild2Param(child, 0x200);
talk_with_speech(child->array[offs], vgaSpriteId);
@ -1470,7 +1470,7 @@ int SimonEngine::o_unk_132_helper(bool *b, char *buf) {
start_over:;
_keyPressed = 0;
if (_game == GAME_SIMON1CD32)
if (getPlatform() == Common::kPlatformAmiga && getFeatures() & GF_TALKIE)
goto start_over_3;
start_over_2:;
@ -1604,7 +1604,7 @@ void SimonEngine::o_play_music_resource() {
// actually start a track (so the resource is
// effectively preloaded so there's no latency when
// starting playback).
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
int loop = getVarOrByte();
midi.setLoop (loop != 0);
@ -1630,7 +1630,7 @@ void SimonEngine::o_unk_120(uint a) {
}
void SimonEngine::o_play_sound(uint sound_id) {
if (_game == GAME_SIMON1DOS)
if (getGameId() == GID_SIMON1DOS)
playSting(sound_id);
else
_sound->playEffects(sound_id);

View file

@ -5,6 +5,7 @@ MODULE_OBJS := \
simon/cursor.o \
simon/debug.o \
simon/debugger.o \
simon/game.o \
simon/icons.o \
simon/items.o \
simon/midi.o \

View file

@ -114,14 +114,14 @@ static const char *const opcode_arg_table_feeblefiles[256] = {
};
uint16 SimonEngine::to16Wrapper(uint value) {
if (_game == GAME_FEEBLEFILES)
if (getGameType() == GType_FF)
return TO_LE_16(value);
else
return TO_BE_16(value);
}
uint16 SimonEngine::readUint16Wrapper(const void *src) {
if (_game == GAME_FEEBLEFILES)
if (getGameType() == GType_FF)
return READ_LE_UINT16(src);
else
return READ_BE_UINT16(src);
@ -179,11 +179,11 @@ void SimonEngine::loadGamePcFile(const char *filename) {
_tablesHeapPtrOrg = _tablesHeapPtr;
_tablesHeapCurPosOrg = _tablesHeapCurPos;
if (_game == GAME_FEEBLEFILES)
if (getGameType() == GType_FF)
return;
/* Read list of TEXT resources */
if (_game == GAME_SIMON1ACORN)
if (getPlatform() == Common::kPlatformAcorn)
in.open("STRIPPED");
else
in.open("STRIPPED.TXT");
@ -294,13 +294,13 @@ byte *SimonEngine::readSingleOpcode(Common::File *in, byte *ptr) {
const char *const *table;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
table = opcode_arg_table_feeblefiles;
} else if ((_game & GF_SIMON2) && (_game & GF_TALKIE))
} else if ((getGameType() == GType_SIMON2) && (getFeatures() & GF_TALKIE))
table = opcode_arg_table_simon2win;
else if (_game & GF_SIMON2)
else if (getGameType() == GType_SIMON2)
table = opcode_arg_table_simon2dos;
else if (_game & GF_TALKIE)
else if (getFeatures() & GF_TALKIE)
table = opcode_arg_table_simon1win;
else
table = opcode_arg_table_simon1dos;

View file

@ -108,7 +108,7 @@ int SimonEngine::display_savegame_list(int curpos, bool load, char *dst) {
void SimonEngine::quick_load_or_save() {
// simon1demo subroutines are missing too many segments
// original demo didn't allow load or save either.
if (_game == GAME_SIMON1DEMO)
if (getGameId() == GID_SIMON1DEMO)
return;
bool success;
@ -412,7 +412,7 @@ bool SimonEngine::save_game(uint slot, char *caption) {
return false;
}
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
f->write(caption, 100);
} else {
f->write(caption, 18);
@ -482,7 +482,7 @@ bool SimonEngine::save_game(uint slot, char *caption) {
f->writeUint16BE(_bitArray[i]);
// Write the bits in array 3
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
for (i = 33; i != 48; i++)
f->writeUint16BE(_bitArray[i]);
}
@ -499,12 +499,12 @@ bool SimonEngine::save_game(uint slot, char *caption) {
char *SimonEngine::gen_savename(int slot) {
static char buf[15];
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
if (slot == 999)
sprintf(buf, "save.%.3d", slot);
else
sprintf(buf, "feeble.%.3d", slot);
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
sprintf(buf, "simon2.%.3d", slot);
} else {
sprintf(buf, "simon1.%.3d", slot);
@ -525,7 +525,7 @@ bool SimonEngine::load_game(uint slot) {
return false;
}
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
f->read(ident, 100);
} else {
f->read(ident, 18);
@ -612,7 +612,7 @@ bool SimonEngine::load_game(uint slot) {
_bitArray[i] = f->readUint16BE();
// Read the bits in array 3
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
for (i = 33; i != 48; i++)
_bitArray[i] = f->readUint16BE();
}

View file

@ -1,40 +0,0 @@
/*
This file was generated by the md5table tool on Fri Nov 11 22:51:20 2005
DO NOT EDIT MANUALLY!
*/
struct MD5Table {
const char *md5;
const char *target;
Common::Language language;
Common::Platform platform;
};
static const MD5Table md5table[] = {
{ "028c6240c9c8e190d86188238505c5e5", "simon2talkie", Common::DE_DEU, Common::kPlatformPC },
{ "057eac98fc4d14dc7fd04341781b26b3", "simon1talkie", Common::IT_ITA, Common::kPlatformPC },
{ "078b04da0974a40645b92baffdf2781e", "simon2talkie", Common::EN_USA, Common::kPlatformPC },
{ "08bd7abefe9c44e43df396748640e531", "simon1talkie", Common::FR_FRA, Common::kPlatformPC },
{ "1e11ddbad80c408031ae44a0cbce46bb", "simon2talkie", Common::EN_USA, Common::kPlatformPC },
{ "39e8f13ec29de1fcef98c81ca0a2ae57", "simon1amiga", Common::EN_USA, Common::kPlatformAmiga },
{ "3b22f3cc4ce9faa3f7830ab18235b04d", "simon1dos", Common::RU_RUS, Common::kPlatformPC },
{ "3bdf85dc57c1abff8f05416b4571198f", "simon2talkie", Common::DE_DEU, Common::kPlatformPC },
{ "486f026593f894f5b6b346ef3984a7a0", "simon1demo", Common::EN_USA, Common::kPlatformPC },
{ "48ce4ffda968cc7a38870c354571f92c", "simon1dos", Common::EN_USA, Common::kPlatformPC },
{ "79a9d9357c15153c8c502dba73c3eac6", "simon2talkie", Common::ES_ESP, Common::kPlatformPC },
{ "9d58f84988634d217c944cd4153a2a3b", "simon1talkie", Common::HB_ISR, Common::kPlatformPC },
{ "9e858b3bb189c134c3a5f34c3385a8d3", "simon2talkie", Common::DE_DEU, Common::kPlatformWindows },
{ "a3cbdd3450f9fccb0a9d8d6dc28f66fe", "simon2talkie", Common::HB_ISR, Common::kPlatformPC },
{ "b6cfe7449a32418ed523bde22f5125ed", "simon1dos", Common::FR_FRA, Common::kPlatformPC },
{ "bd85a8b5135592ada9cbeae49160f1d3", "simon2talkie", Common::EN_USA, Common::kPlatformWindows },
{ "c5091c98e3b13760764876177fdf4fb4", "simon2talkie", Common::IT_ITA, Common::kPlatformPC },
{ "c8ddd48919aa75423dd2d3e5864909df", "simon2talkie", Common::FR_FRA, Common::kPlatformPC },
{ "c8f5b860a20dcc63915d94cf2bdcfa49", "simon1dos", Common::IT_ITA, Common::kPlatformPC },
{ "d22302abf44219f95d50f2faa807dd1a", "simon1talkie", Common::EN_USA, Common::kPlatformWindows },
{ "d545db8a0efae95a90b23da81aadb201", "simon1talkie", Common::EN_USA, Common::kPlatformPC },
{ "e3712b3ed4429e736123a40276f533d7", "simon1talkie", Common::ES_ESP, Common::kPlatformPC },
{ "ec5358680c117f29b128cbbb322111a4", "simon1cd32", Common::EN_USA, Common::kPlatformAmiga },
{ "ecc01a02c9b97b49d0b4191a346b0940", "simon1talkie", Common::DE_DEU, Common::kPlatformPC },
{ "fa5651a5e5da0f3c89473dd62af095d8", "simon1amiga", Common::EN_USA, Common::kPlatformAmiga },
{ 0, 0, Common::UNK_LANG, Common::kPlatformUnknown }
};

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,8 @@
#include <stdio.h>
#include "base/engine.h"
#include "base/gameDetector.h"
#include "base/plugins.h"
#include "common/util.h"
#include "simon/midi.h"
#include "simon/sound.h"
@ -101,6 +103,36 @@ struct VgaTimerEntry {
VgaTimerEntry() { memset(this, 0, sizeof(*this)); }
};
enum SimonTypes {
GType_SIMON1,
GType_SIMON2,
GType_FF
};
struct GameFileDescription {
const char *fileName;
uint16 fileType;
};
struct GameDescription {
const char *name;
SimonTypes gameType;
GameIds gameId;
const char *title;
int filesCount;
GameFileDescription *filesDescriptions;
uint32 features;
Common::Language language;
Common::Platform platform;
GameSettings toGameSettings() const {
GameSettings dummy = { name, title, features };
return dummy;
}
};
DetectedGameList GAME_ProbeGame(const FSList &fslist, int **matches = NULL);
struct GameSpecificSettings;
class Debugger;
@ -114,6 +146,17 @@ class SimonEngine : public Engine {
void setupVgaOpcodes();
const VgaOpcodeProc *_vga_opcode_table;
public:
GameDescription *_gameDescription;
bool initGame(void);
int getGameId() const { return _gameDescription->gameId; }
int getGameType() const { return _gameDescription->gameType; }
uint32 getFeatures() const { return _gameDescription->features; }
Common::Language getLanguage() const { return _gameDescription->language; }
Common::Platform getPlatform() const { return _gameDescription->platform; }
protected:
void playSting(uint a);

View file

@ -22,6 +22,7 @@
#include "common/file.h"
#include "common/util.h"
#include "simon/simon.h"
#include "simon/sound.h"
#include "sound/flac.h"
@ -231,8 +232,8 @@ void FlacSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
}
#endif
Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mixer)
: _game(game), _mixer(mixer) {
Sound::Sound(SimonEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer) {
_voice = 0;
_effects = 0;
@ -247,8 +248,8 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
_hasVoiceFile = false;
_ambientPlaying = 0;
// simon1cd32 uses separate speech files
if (!(_game & GF_TALKIE) || (_game == GAME_SIMON1CD32))
// SIMON1CD32 uses separate speech files
if (!(_vm->getFeatures() & GF_TALKIE) || (_vm->getGameId() == GID_SIMON1CD32))
return;
File *file = new File();
@ -280,7 +281,7 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
}
}
#endif
if (!_hasVoiceFile && (_game & GF_SIMON2)) {
if (!_hasVoiceFile && _vm->getGameType() == GType_SIMON2) {
// for simon2 mac/amiga, only read index file
file->open("voices.idx");
if (file->isOpen() == true) {
@ -312,7 +313,7 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
}
}
if ((_game & GF_SIMON1) && (_game & GF_TALKIE)) {
if ((_vm->getGameType() == GType_SIMON1) && (_vm->getFeatures() & GF_TALKIE)) {
file = new File();
#ifdef USE_MAD
if (!_hasEffectsFile && gss->mp3_effects_filename && gss->mp3_effects_filename[0]) {
@ -383,7 +384,7 @@ void Sound::readSfxFile(const char *filename) {
}
delete _effects;
if (_game == GAME_SIMON1CD32) {
if (_vm->getGameId() == GID_SIMON1CD32) {
_effects = new VocSound(_mixer, file, 0, SOUND_BIG_ENDIAN);
} else
_effects = new WavSound(_mixer, file);
@ -392,7 +393,7 @@ void Sound::readSfxFile(const char *filename) {
void Sound::loadSfxTable(File *gameFile, uint32 base) {
stopAll();
if (_game & GF_WIN)
if (_vm->getPlatform() == Common::kPlatformWindows)
_effects = new WavSound(_mixer, gameFile, base);
else
_effects = new VocSound(_mixer, gameFile, base);
@ -444,7 +445,7 @@ void Sound::playVoice(uint sound) {
return;
_mixer->stopHandle(_voiceHandle);
_voice->playSound(sound, &_voiceHandle, (_game == GAME_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
_voice->playSound(sound, &_voiceHandle, (_vm->getGameId() == GID_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
}
void Sound::playEffects(uint sound) {
@ -454,7 +455,7 @@ void Sound::playEffects(uint sound) {
if (_effectsPaused)
return;
_effects->playSound(sound, &_effectsHandle, (_game == GAME_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
_effects->playSound(sound, &_effectsHandle, (_vm->getGameId() == GID_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
}
void Sound::playAmbient(uint sound) {

View file

@ -28,9 +28,11 @@ namespace Simon {
class BaseSound;
class SimonEngine;
class Sound {
private:
byte _game;
SimonEngine *_vm;
Audio::Mixer *_mixer;
@ -53,7 +55,7 @@ private:
uint _ambientPlaying;
public:
Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mixer);
Sound(SimonEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer);
~Sound();
void readSfxFile(const char *filename);

View file

@ -191,7 +191,7 @@ void SimonEngine::defocusHitarea() {
HitArea *last;
HitArea *ha;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
if (_bitArray[4] & 0x8000) {
o_unk_120(202);
_lastHitArea2Ptr = NULL;
@ -265,7 +265,7 @@ void SimonEngine::showActionString(uint x, const byte *string) {
void SimonEngine::hitareaChangedHelper() {
FillOrCopyStruct *fcs;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
if (_bitArray[4] & 0x8000)
return;
}
@ -362,7 +362,7 @@ void SimonEngine::hitarea_proc_1() {
uint id;
HitArea *ha;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
id = 2;
if (!(_bitArray[4] & 0x8000))
id = (_mouseY >= 136) ? 102 : 101;
@ -391,7 +391,7 @@ void SimonEngine::handle_verb_hitarea(HitArea *ha) {
if (ha == tmp)
return;
if (!(_game & GF_SIMON2)) {
if (!(getGameType() == GType_SIMON2)) {
if (tmp != NULL) {
tmp->flags |= 8;
video_toggle_colors(tmp, 0xd5, 0xd0, 0xd5, 0xA);
@ -414,7 +414,7 @@ void SimonEngine::handle_verb_hitarea(HitArea *ha) {
}
void SimonEngine::hitarea_leave(HitArea *ha) {
if (!(_game & GF_SIMON2)) {
if (!(getGameType() == GType_SIMON2)) {
video_toggle_colors(ha, 0xdf, 0xd5, 0xda, 5);
} else {
video_toggle_colors(ha, 0xe7, 0xe5, 0xe6, 1);
@ -458,7 +458,7 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) {
uint16 x_ = x;
const uint16 y_ = y;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
if (_bitArray[4] & 0x8000 || y < 134) {
x_ += _scrollX * 8;
}
@ -528,7 +528,7 @@ bool SimonEngine::hitarea_proc_2(uint a) {
uint x;
const byte *string_ptr;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
if (_bitArray[4] & 0x8000) {
Subroutine *sub;
_variableArray[84] = a;

View file

@ -134,7 +134,7 @@ void SimonEngine::run_vga_script() {
}
}
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
opcode = READ_BE_UINT16(_vcPtr);
_vcPtr += 2;
} else {
@ -208,10 +208,10 @@ void SimonEngine::vc_skip_next_instruction() {
6, 4, 2, 6, 0
};
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
uint opcode = vc_read_next_byte();
_vcPtr += opcode_param_len_feeblefiles[opcode];
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
uint opcode = vc_read_next_byte();
_vcPtr += opcode_param_len_simon2[opcode];
} else {
@ -279,7 +279,7 @@ void SimonEngine::vc2_call() {
bb = _curVgaFile1;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
b = bb + READ_LE_UINT16(&((VgaFileHeader_Feeble *) bb)->hdr2_start);
b = bb + READ_LE_UINT16(&((VgaFileHeader2_Feeble *) b)->imageTable);
@ -295,7 +295,7 @@ void SimonEngine::vc2_call() {
vc_ptr_org = _vcPtr;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
_vcPtr = _curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble *) b)->scriptOffs);
} else {
_vcPtr = _curVgaFile1 + READ_BE_UINT16(&((ImageHeader_Simon *) b)->scriptOffs);
@ -320,7 +320,7 @@ void SimonEngine::vc3_loadSprite() {
windowNum = vc_read_next_word(); /* 0 */
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
fileId = vc_read_next_word(); /* 0 */
vgaSpriteId = vc_read_next_word(); /* 2 */
} else {
@ -365,7 +365,7 @@ void SimonEngine::vc3_loadSprite() {
}
pp = _curVgaFile1;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
p = pp + READ_LE_UINT16(&((VgaFileHeader_Feeble *) pp)->hdr2_start);
p = pp + READ_LE_UINT16(&((VgaFileHeader2_Feeble *) p)->animationTable);
@ -400,7 +400,7 @@ void SimonEngine::vc3_loadSprite() {
#endif
if (_startVgaScript) {
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
dump_vga_script(_curVgaFile1 + READ_LE_UINT16(&((AnimationHeader_Feeble*)p)->scriptOffs), res, vgaSpriteId);
} else {
dump_vga_script(_curVgaFile1 + READ_BE_UINT16(&((AnimationHeader_Simon*)p)->scriptOffs), res, vgaSpriteId);
@ -408,7 +408,7 @@ void SimonEngine::vc3_loadSprite() {
}
}
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
add_vga_timer(VGA_DELAY_BASE, _curVgaFile1 + READ_LE_UINT16(&((AnimationHeader_Feeble *) p)->scriptOffs), vgaSpriteId, res);
} else {
add_vga_timer(VGA_DELAY_BASE, _curVgaFile1 + READ_BE_UINT16(&((AnimationHeader_Simon *) p)->scriptOffs), vgaSpriteId, res);
@ -666,7 +666,7 @@ void SimonEngine::vc10_draw() {
if (state.image == 0)
return;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
state.palette = (_vcPtr[0] * 16);
} else {
state.palette = (_vcPtr[1] * 16);
@ -674,12 +674,12 @@ void SimonEngine::vc10_draw() {
_vcPtr += 2;
state.x = (int16)vc_read_next_word();
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
state.x -= _scrollX;
}
state.y = (int16)vc_read_next_word();
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
state.flags = vc_read_next_word();
} else {
state.flags = vc_read_next_byte();
@ -691,7 +691,7 @@ void SimonEngine::vc10_draw() {
p2 = _curVgaFile2 + state.image * 8;
state.depack_src = _curVgaFile2 + READ_BE_UINT32(p2);
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
state.depack_src = _curVgaFile2 + READ_LE_UINT32(p2);
width = READ_LE_UINT16(p2 + 6);
height = READ_LE_UINT16(p2 + 4) & 0x7FFF;
@ -722,8 +722,8 @@ void SimonEngine::vc10_draw() {
}
}
maxWidth = (_game == GAME_FEEBLEFILES) ? 640 : 20;
if (_game & GF_SIMON2 && width > maxWidth) {
maxWidth = (getGameType() == GType_FF) ? 640 : 20;
if (getGameType() == GType_SIMON2 && width > maxWidth) {
const byte *src;
byte *dst;
uint w;
@ -752,7 +752,7 @@ void SimonEngine::vc10_draw() {
return;
}
if (_game != GAME_FEEBLEFILES) {
if (getGameType() != GType_FF) {
if (state.flags & 0x10) {
state.depack_src = vc10_uncompressFlip(state.depack_src, width, height);
} else if (state.flags & 1) {
@ -778,7 +778,7 @@ void SimonEngine::vc10_draw() {
}
state.x = cur;
maxWidth = (_game == GAME_FEEBLEFILES) ? 640 : (vlut[2] * 2);
maxWidth = (getGameType() == GType_FF) ? 640 : (vlut[2] * 2);
cur += state.draw_width - maxWidth;
if (cur > 0) {
do {
@ -797,7 +797,7 @@ void SimonEngine::vc10_draw() {
}
state.y = cur;
maxHeight = (_game == GAME_FEEBLEFILES) ? 480 : vlut[3];
maxHeight = (getGameType() == GType_FF) ? 480 : vlut[3];
cur += state.draw_height - maxHeight;
if (cur > 0) {
do {
@ -820,7 +820,7 @@ void SimonEngine::vc10_draw() {
uint offs, offs2;
// Allow one section of Simon the Sorcerer 1 introduction to be displayed
// in lower half of screen
if ((_game & GF_SIMON1) && _subroutine == 2926) {
if ((getGameType() == GType_SIMON1) && _subroutine == 2926) {
offs = ((vlut[0]) * 2 + state.x) * 8;
offs2 = (vlut[1] + state.y);
} else {
@ -850,7 +850,7 @@ void SimonEngine::vc10_draw() {
dst = state.surf_addr + w * 2; /* edi */
h = state.draw_height;
if ((_game & GF_SIMON1) && vc_get_bit(88)) {
if ((getGameType() == GType_SIMON1) && vc_get_bit(88)) {
/* transparency */
do {
if (mask[0] & 0xF0) {
@ -991,7 +991,7 @@ void SimonEngine::vc10_draw() {
}
/* vc10_helper_4 */
} else {
if (_game & GF_SIMON2 && state.flags & 0x4 && _bitArray[10] & 0x800) {
if (getGameType() == GType_SIMON2 && state.flags & 0x4 && _bitArray[10] & 0x800) {
state.surf_addr = state.surf2_addr;
state.surf_pitch = state.surf2_pitch;
}
@ -1100,7 +1100,7 @@ void SimonEngine::vc12_delay() {
VgaSprite *vsp = find_cur_sprite();
uint num;
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
num = vc_read_var_or_word();
} else {
num = vc_read_next_byte() * _frameRate;
@ -1108,7 +1108,7 @@ void SimonEngine::vc12_delay() {
// Work around to allow inventory arrows to be
// shown in some versions of Simon the Sorcerer 1
if ((_game & GF_SIMON1) && vsp->id == 0x80)
if ((getGameType() == GType_SIMON1) && vsp->id == 0x80)
num = 0;
else
num += VGA_DELAY_BASE;
@ -1167,7 +1167,7 @@ void SimonEngine::vc17_setPathfinderItem() {
uint a = vc_read_next_word();
_pathFindArray[a - 1] = (const uint16 *)_vcPtr;
int end = (_game == GAME_FEEBLEFILES) ? 9999 : 999;
int end = (getGameType() == GType_FF) ? 9999 : 999;
while (readUint16Wrapper(_vcPtr) != end)
_vcPtr += 4;
_vcPtr += 2;
@ -1199,7 +1199,7 @@ void SimonEngine::vc20_setRepeat() {
void SimonEngine::vc21_endRepeat() {
int16 a = vc_read_next_word();
const byte *tmp = _vcPtr + a;
if (_game & GF_SIMON2)
if (getGameType() == GType_SIMON2)
tmp += 3;
else
tmp += 4;
@ -1219,7 +1219,7 @@ void SimonEngine::vc22_setSpritePalette() {
uint palSize = 96;
byte *palptr, *src;
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
num = 256;
palSize = 768;
}
@ -1283,7 +1283,7 @@ void SimonEngine::vc24_setSpriteXY() {
vsp->x += (int16)vc_read_next_word();
vsp->y += (int16)vc_read_next_word();
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
vsp->flags = vc_read_next_word();
} else {
vsp->flags = vc_read_next_byte();
@ -1321,7 +1321,7 @@ void SimonEngine::vc27_resetSprite() {
vsp = _vgaSprites;
while (vsp->id) {
if ((_game & GF_SIMON1) && vsp->id == 128) {
if ((getGameType() == GType_SIMON1) && vsp->id == 128) {
memcpy(&bak, vsp, sizeof(VgaSprite));
}
vsp->id = 0;
@ -1339,7 +1339,7 @@ void SimonEngine::vc27_resetSprite() {
vte = _vgaTimerList;
while (vte->delay) {
if ((_game & GF_SIMON1) && vsp->id == 128) {
if ((getGameType() == GType_SIMON1) && vsp->id == 128) {
vte++;
} else {
vte2 = vte;
@ -1410,7 +1410,7 @@ void SimonEngine::vc36_setWindowImage() {
uint vga_res = vc_read_next_word();
uint windowNum = vc_read_next_word();
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
if (windowNum == 16) {
_copyPartialMode = 2;
} else {
@ -1443,7 +1443,7 @@ void SimonEngine::vc40() {
uint var = vc_read_next_word();
int16 value = vc_read_var(var) + vc_read_next_word();
if ((_game & GF_SIMON2) && var == 15 && !(_bitArray[5] & 1)) {
if ((getGameType() == GType_SIMON2) && var == 15 && !(_bitArray[5] & 1)) {
int16 tmp;
if (_scrollCount != 0) {
@ -1472,7 +1472,7 @@ void SimonEngine::vc41() {
uint var = vc_read_next_word();
int16 value = vc_read_var(var) - vc_read_next_word();
if ((_game & GF_SIMON2) && var == 15 && !(_bitArray[5] & 1)) {
if ((getGameType() == GType_SIMON2) && var == 15 && !(_bitArray[5] & 1)) {
int16 tmp;
if (_scrollCount != 0) {
@ -1591,18 +1591,18 @@ void SimonEngine::vc51_clear_hitarea_bit_0x40() {
void SimonEngine::vc52_playSound() {
uint16 sound_id = vc_read_next_word();
if (_game == GAME_FEEBLEFILES) {
if (getGameType() == GType_FF) {
uint16 pan = vc_read_next_word();
uint16 vol = vc_read_next_word();
debug(0, "STUB: vc52_playSound: snd %d pan %d vol %d", sound_id, pan, vol);
} else if (_game & GF_SIMON2) {
} else if (getGameType() == GType_SIMON2) {
if (sound_id >= 0x8000) {
sound_id = -sound_id;
_sound->playAmbient(sound_id);
} else {
_sound->playEffects(sound_id);
}
} else if (_game & GF_TALKIE) {
} else if (getFeatures() & GF_TALKIE) {
_sound->playEffects(sound_id);
} else {
playSting(sound_id);
@ -1644,7 +1644,7 @@ void SimonEngine::vc55_offset_hit_area() {
}
void SimonEngine::vc56_delay() {
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
uint num = vc_read_var_or_word() * _frameRate;
add_vga_timer(num + VGA_DELAY_BASE, _vcPtr, _vgaCurSpriteId, _vgaCurFileId);
@ -1653,7 +1653,7 @@ void SimonEngine::vc56_delay() {
}
void SimonEngine::vc59() {
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
uint file = vc_read_next_word();
uint start = vc_read_next_word();
uint end = vc_read_next_word() + 1;
@ -1707,7 +1707,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) {
vfs = _vgaSleepStructs;
while (vfs->ident != 0) {
if (vfs->sprite_id == _vgaCurSpriteId && ((_game & GF_SIMON1) || vfs->cur_vga_file == _vgaCurFileId)) {
if (vfs->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vfs->cur_vga_file == _vgaCurFileId)) {
while (vfs->ident != 0) {
memcpy(vfs, vfs + 1, sizeof(VgaSleepStruct));
vfs++;
@ -1723,7 +1723,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) {
vte = _vgaTimerList;
while (vte->delay != 0) {
if (vte->sprite_id == _vgaCurSpriteId && ((_game & GF_SIMON1) || vte->cur_vga_file == _vgaCurFileId)) {
if (vte->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vte->cur_vga_file == _vgaCurFileId)) {
delete_vga_timer(vte);
break;
}
@ -1739,7 +1739,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) {
void SimonEngine::vc60_killSprite() {
uint file;
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
file = vc_read_next_word();
} else {
file = _vgaCurFileId;
@ -1781,7 +1781,7 @@ void SimonEngine::vc62_fastFadeOut() {
delay(5);
}
if (_game & GF_SIMON1) {
if (getGameType() == GType_SIMON1) {
uint16 params[5]; /* parameters to vc10_draw */
VgaSprite *vsp;
VgaPointersEntry *vpe;
@ -1819,12 +1819,12 @@ void SimonEngine::vc62_fastFadeOut() {
// Allow one section of Simon the Sorcerer 1 introduction to be displayed
// in lower half of screen
if ((_game & GF_SIMON1) && (_subroutine == 2923 || _subroutine == 2926))
if ((getGameType() == GType_SIMON1) && (_subroutine == 2923 || _subroutine == 2926))
dx_clear_surfaces(200);
else
dx_clear_surfaces(_windowNum == 4 ? 134 : 200);
}
if (_game & GF_SIMON2) {
if (getGameType() == GType_SIMON2) {
if (_nextMusicToPlay != -1)
loadMusic(_nextMusicToPlay);
}

View file

@ -1,28 +0,0 @@
Simon the Sorcerer 1
- DOS en 48ce4ffda968cc7a38870c354571f92c simon1dos Kirben
- DOS fr b6cfe7449a32418ed523bde22f5125ed simon1dos ketchup_addict
- DOS it c8f5b860a20dcc63915d94cf2bdcfa49 simon1dos
- DOS ru 3b22f3cc4ce9faa3f7830ab18235b04d simon1dos Kirben
- Windows en d22302abf44219f95d50f2faa807dd1a simon1talkie Kirben
- DOS de ecc01a02c9b97b49d0b4191a346b0940 simon1talkie SimSaw
- DOS en d545db8a0efae95a90b23da81aadb201 simon1talkie Kirben
- DOS fr 08bd7abefe9c44e43df396748640e531 simon1talkie jellby
- DOS hb 9d58f84988634d217c944cd4153a2a3b simon1talkie jellby
- DOS it 057eac98fc4d14dc7fd04341781b26b3 simon1talkie jellby
- DOS es e3712b3ed4429e736123a40276f533d7 simon1talkie jellby
- Amiga en ec5358680c117f29b128cbbb322111a4 simon1cd32 Kirben
AGA Amiga en 39e8f13ec29de1fcef98c81ca0a2ae57 simon1amiga
ECS Amiga en fa5651a5e5da0f3c89473dd62af095d8 simon1amiga
Demo DOS en 486f026593f894f5b6b346ef3984a7a0 simon1demo Kirben
Simon the Sorcerer 2
- Windows de 9e858b3bb189c134c3a5f34c3385a8d3 simon2talkie DhWz
- Windows en bd85a8b5135592ada9cbeae49160f1d3 simon2talkie Kirben
- DOS de 3bdf85dc57c1abff8f05416b4571198f simon2talkie SimSaw
- DOS en 078b04da0974a40645b92baffdf2781e simon2talkie Kirben
- DOS fr c8ddd48919aa75423dd2d3e5864909df simon2talkie SimSaw
- DOS hb a3cbdd3450f9fccb0a9d8d6dc28f66fe simon2talkie
- DOS it c5091c98e3b13760764876177fdf4fb4 simon2talkie guybrushvm
- DOS es 79a9d9357c15153c8c502dba73c3eac6 simon2talkie Samuel Suárez
Demo DOS en 1e11ddbad80c408031ae44a0cbce46bb simon2talkie Kirben
Demo DOS de 028c6240c9c8e190d86188238505c5e5 simon2talkie Kirben