aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/gameDetector.cpp1
-rw-r--r--scumm/scumm.h2
-rw-r--r--simon/items.cpp4
-rw-r--r--simon/midi.cpp2
-rw-r--r--simon/res.cpp3
-rw-r--r--simon/simon.cpp41
-rw-r--r--simon/simon.h1
7 files changed, 44 insertions, 10 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 7b0cf22dca..615220c863 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -506,6 +506,7 @@ const VersionSettings version_settings[] = {
{"simon2dos", "Simon the Sorcerer 2 for DOS", GID_SIMON_FIRST+1, 99, 99, 99, 0},
{"simon1win", "Simon the Sorcerer 1 for Windows", GID_SIMON_FIRST+2, 99, 99, 99, 0},
{"simon2win", "Simon the Sorcerer 2 for Windows", GID_SIMON_FIRST+3, 99, 99, 99, 0},
+ {"simon1demo", "Simon the Sorcerer 1 for DOS (demo)", GID_SIMON_FIRST+4, 99, 99, 99, 0},
/* Scumm Version 8 */
{"comi", "The Curse of Monkey Island", GID_CMI, 8, 1, 0,
diff --git a/scumm/scumm.h b/scumm/scumm.h
index cda8101285..d1ec8f5795 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -276,7 +276,7 @@ enum GameId {
/* Simon the Sorcerer */
GID_SIMON_FIRST = 20,
- GID_SIMON_LAST = GID_SIMON_FIRST + 3,
+ GID_SIMON_LAST = GID_SIMON_FIRST + 4,
};
enum GameFeatures {
diff --git a/simon/items.cpp b/simon/items.cpp
index 4baeae0ec8..227ec736bd 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -1015,7 +1015,7 @@ int SimonState::runScript()
uint d = _array_4[a];
if (d != 0)
talk_with_speech(d, b);
- } else if (_game == GAME_SIMON1DOS) {
+ } else if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
uint b = getVarOrByte();
uint c = getVarOrByte();
uint a = getVarOrByte();
@@ -1289,7 +1289,7 @@ void SimonState::o_177()
offs = getOffsetOfChild2Param(child, 0x100);
talk_with_speech(child->array[offs] + 3550, a);
}
- } else if (_game == GAME_SIMON1DOS) {
+ } else if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
uint a = getVarOrByte();
uint b = getVarOrByte();
Child2 *child = findChildOfType2(getNextItemPtr());
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 3a4dadb260..c43da45af2 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -135,7 +135,7 @@ void MidiPlayer::read_one_song(File *in, Song *s)
break;
default:
- error("Midi song has no 'MThd'");
+ warning("Midi song has no 'MThd'");
}
}
diff --git a/simon/res.cpp b/simon/res.cpp
index 6838f01ffc..430bfca57f 100644
--- a/simon/res.cpp
+++ b/simon/res.cpp
@@ -265,6 +265,9 @@ byte *SimonState::readSingleOpcode(File *in, byte *ptr)
case GAME_SIMON1DOS:
table = opcode_arg_table_simon1dos;
break;
+ case GAME_SIMON1DEMO:
+ table = opcode_arg_table_simon1dos;
+ break;
default:
error("Invalid game specified");
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 69563ab54a..3f0e3cb237 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -54,6 +54,25 @@ static const GameSpecificSettings simon1_settings = {
"GAMEPC", /* gamepc_filename */
};
+static const GameSpecificSettings simon1demo_settings = {
+ 1, /* VGA_DELAY_BASE */
+ 1576 / 4, /* TABLE_INDEX_BASE */
+ 1460 / 4, /* TEXT_INDEX_BASE */
+ 1700 / 4, /* NUM_GAME_OFFSETS */
+ 64, /* NUM_VIDEO_OP_CODES */
+ 1000000, /* VGA_MEM_SIZE */
+ 50000, /* TABLES_MEM_SIZE */
+ 3624, /* NUM_VOICE_RESOURCES */
+ 141, /* NUM_EFFECT_RESOURCES */
+ 1316 / 4, /* MUSIC_INDEX_BASE */
+ 0, /* SOUND_INDEX_BASE */
+ "", /* gme_filename */
+ "", /* wav_filename */
+ "", /* wav_filename2 */
+ "", /* effects_filename */
+ "GDEMO", /* gamepc_filename */
+};
+
static const GameSpecificSettings simon2win_settings = {
5, /* VGA_DELAY_BASE */
1580 / 4, /* TABLE_INDEX_BASE */
@@ -896,7 +915,7 @@ void SimonState::closeTablesFile_simon1(File *in)
uint SimonState::loadTextFile(const char *filename, byte *dst)
{
- if (_game == GAME_SIMON1DOS)
+ if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS))
return loadTextFile_simon1(filename, dst);
else
return loadTextFile_gme(filename, dst);
@@ -904,7 +923,7 @@ uint SimonState::loadTextFile(const char *filename, byte *dst)
File *SimonState::openTablesFile(const char *filename)
{
- if (_game == GAME_SIMON1DOS)
+ if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS))
return openTablesFile_simon1(filename);
else
return openTablesFile_gme(filename);
@@ -912,7 +931,7 @@ File *SimonState::openTablesFile(const char *filename)
void SimonState::closeTablesFile(File *in)
{
- if (_game == GAME_SIMON1DOS)
+ if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS))
closeTablesFile_simon1(in);
else
closeTablesFile_gme(in);
@@ -1714,6 +1733,10 @@ void SimonState::o_print_str()
string_ptr = getStringPtrByID(string_id);
break;
+ case GAME_SIMON1DEMO:
+ string_ptr = getStringPtrByID(string_id);
+ break;
+
case GAME_SIMON1DOS:
string_ptr = getStringPtrByID(string_id);
break;
@@ -1759,6 +1782,10 @@ void SimonState::o_print_str()
#endif
break;
+ case GAME_SIMON1DEMO:
+ talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+ break;
+
case GAME_SIMON1DOS:
talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
break;
@@ -4000,7 +4027,7 @@ void SimonState::print_char_helper_6(uint i)
void SimonState::read_vga_from_datfile_1(uint vga_id)
{
- if (_game == GAME_SIMON1DOS) {
+ if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
File in;
char buf[50];
uint32 size;
@@ -4032,7 +4059,7 @@ void SimonState::read_vga_from_datfile_1(uint vga_id)
byte *SimonState::read_vga_from_datfile_2(uint id)
{
- if (_game == GAME_SIMON1DOS) {
+ if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
File in;
char buf[50];
uint32 size;
@@ -4076,7 +4103,7 @@ void SimonState::resfile_read(void *dst, uint32 offs, uint32 size)
void SimonState::openGameFile()
{
- if (_game != GAME_SIMON1DOS) {
+ if ((_game != GAME_SIMON1DEMO) && (_game != GAME_SIMON1DOS)) {
_game_file = new File();
_game_file->open(gss->gme_filename, _gameDataPath);
@@ -4297,6 +4324,8 @@ void SimonState::go()
gss = &simon2win_settings;
} else if (_game == GAME_SIMON2DOS) {
gss = &simon2dos_settings;
+ } else if (_game == GAME_SIMON1DEMO) {
+ gss = &simon1demo_settings;
} else {
gss = &simon1_settings;
}
diff --git a/simon/simon.h b/simon/simon.h
index 02f6e952cc..8651873d37 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -121,6 +121,7 @@ public:
GAME_SIMON1WIN = 2,
GAME_SIMON2DOS = 1,
GAME_SIMON2WIN = 3,
+ GAME_SIMON1DEMO = 4,
};