aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2002-10-24 09:40:20 +0000
committerTravis Howell2002-10-24 09:40:20 +0000
commit68fada397e6818ac7c9d6f75fa2fbb5a92532104 (patch)
tree1a1538f9688fcbb746168719bdfb956388931b7f /simon
parent5a731060a467c99f95dcc0259711dee6571ba138 (diff)
downloadscummvm-rg350-68fada397e6818ac7c9d6f75fa2fbb5a92532104.tar.gz
scummvm-rg350-68fada397e6818ac7c9d6f75fa2fbb5a92532104.tar.bz2
scummvm-rg350-68fada397e6818ac7c9d6f75fa2fbb5a92532104.zip
Add simon1demo
svn-id: r5300
Diffstat (limited to 'simon')
-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
5 files changed, 42 insertions, 9 deletions
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,
};