aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2002-11-05 10:36:31 +0000
committerTravis Howell2002-11-05 10:36:31 +0000
commit2f270bfd586ff0822c04dc9252f63ffffa1a2fcb (patch)
tree394a5745af86a9917c696c8a7bbd5d405746dd04 /simon
parentca785239c06591c964496a9886100e0c82f6dc03 (diff)
downloadscummvm-rg350-2f270bfd586ff0822c04dc9252f63ffffa1a2fcb.tar.gz
scummvm-rg350-2f270bfd586ff0822c04dc9252f63ffffa1a2fcb.tar.bz2
scummvm-rg350-2f270bfd586ff0822c04dc9252f63ffffa1a2fcb.zip
Add simon1talkie and simon2talkie targets
svn-id: r5413
Diffstat (limited to 'simon')
-rw-r--r--simon/items.cpp12
-rw-r--r--simon/res.cpp2
-rw-r--r--simon/simon.cpp14
-rw-r--r--simon/simon.h10
4 files changed, 24 insertions, 14 deletions
diff --git a/simon/items.cpp b/simon/items.cpp
index bdc1fbe3f4..4f4a9f13db 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -386,7 +386,7 @@ int SimonState::runScript()
break;
case 67:{ /* set array 3 and 4 */
- if (_game & GAME_WIN) {
+ if (_game & GAME_TALKIE || _game & GAME_WIN) {
uint var = getVarOrByte();
uint string_id = getNextStringID();
uint value = getNextWord();
@@ -1008,14 +1008,14 @@ int SimonState::runScript()
break;
case 179:{
- if (_game == GAME_SIMON1WIN) {
+ if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
uint b = getVarOrByte();
/*uint c = */ getVarOrByte();
uint a = getVarOrByte();
uint d = _array_4[a];
if (d != 0)
talk_with_speech(d, b);
- } else if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
+ } else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
uint b = getVarOrByte();
uint c = getVarOrByte();
uint a = getVarOrByte();
@@ -1040,7 +1040,7 @@ int SimonState::runScript()
}
talk_with_text(b, c, s, tv->a, tv->b, tv->c);
- } else if (_game == GAME_SIMON2WIN) {
+ } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
uint b = getVarOrByte();
uint c = getVarOrByte();
uint a = getVarOrByte();
@@ -1303,7 +1303,7 @@ bool SimonState::o_unk_23(uint a)
void SimonState::o_177()
{
- if (_game == GAME_SIMON1WIN) {
+ if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
uint a = getVarOrByte();
/*uint b = */ getVarOrByte();
uint offs;
@@ -1348,7 +1348,7 @@ void SimonState::o_177()
talk_with_text(a, b, s, tv->a, tv->b, tv->c);
}
- } else if (_game == GAME_SIMON2WIN) {
+ } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
uint a = getVarOrByte();
uint b = getVarOrByte();
Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2);
diff --git a/simon/res.cpp b/simon/res.cpp
index 7e5c832138..fb7bcb0354 100644
--- a/simon/res.cpp
+++ b/simon/res.cpp
@@ -253,12 +253,14 @@ byte *SimonState::readSingleOpcode(File *in, byte *ptr)
const char *const *table;
switch (_game) {
+ case GAME_SIMON1TALKIE:
case GAME_SIMON1WIN:
table = opcode_arg_table_simon1win;
break;
case GAME_SIMON2DOS:
table = opcode_arg_table_simon2dos;
break;
+ case GAME_SIMON2TALKIE:
case GAME_SIMON2WIN:
table = opcode_arg_table_simon2win;
break;
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 386050de77..f222e5a150 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1713,6 +1713,7 @@ void SimonState::o_print_str()
switch (_game) {
+ case GAME_SIMON1TALKIE:
case GAME_SIMON1WIN:
if (string_id != 0xFFFF)
string_ptr = getStringPtrByID(string_id);
@@ -1720,6 +1721,7 @@ void SimonState::o_print_str()
speech_id = (uint16)getNextWord();
break;
+ case GAME_SIMON2TALKIE:
case GAME_SIMON2WIN:
if (string_id != 0xFFFF)
string_ptr = getStringPtrByID(string_id);
@@ -1759,6 +1761,7 @@ void SimonState::o_print_str()
switch (_game) {
+ case GAME_SIMON1TALKIE:
case GAME_SIMON1WIN:
#ifdef USE_TEXT_HACK
if (speech_id != 0) {
@@ -1792,6 +1795,7 @@ void SimonState::o_print_str()
talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
break;
+ case GAME_SIMON2TALKIE:
case GAME_SIMON2WIN:
if (speech_id != 0 && num_1 == 1 && !_vk_t_toggle)
talk_with_speech(speech_id, num_1);
@@ -4347,7 +4351,7 @@ void SimonState::go()
_sdl_buf = (byte *)calloc(320 * 200, 1);
_sdl_buf_attached = (byte *)calloc(320 * 200, 1);
- if (_game == GAME_SIMON2WIN) {
+ if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
gss = &simon2win_settings;
} else if (_game == GAME_SIMON2DOS) {
gss = &simon2dos_settings;
@@ -4675,7 +4679,7 @@ bool SimonState::load_game(uint slot)
void SimonState::initSound()
{
/* only read voice file in windows game */
- if (_game & GAME_WIN) {
+ if (_game & GAME_TALKIE || _game & GAME_WIN) {
const char *m = gss->mp3_filename;
const char *s = gss->wav_filename;
const char *s2 = gss->voc_filename;
@@ -4985,7 +4989,7 @@ void SimonState::playSound(uint sound)
#ifdef USE_MAD
}
#endif
- } else if (_game & GAME_WIN) { /* ? sound simon 1/2 win talkie */
+ } else if (_game & GAME_TALKIE || _game & GAME_WIN) { /* ? sound simon 1/2 win talkie */
byte *p;
@@ -5027,7 +5031,7 @@ void SimonState::playMusic(uint music)
/* Simon 2 dos music isn't supported */
if (_voice_type == FORMAT_WAV) {
midi.shutdown();
- if (_game & GAME_WIN) {
+ if (_game & GAME_TALKIE || _game & GAME_WIN) {
_game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
midi.read_all_songs(_game_file);
}
@@ -5037,7 +5041,7 @@ void SimonState::playMusic(uint music)
} else if (!(_game & GAME_SIMON2)){
midi.shutdown();
- if (_game & GAME_WIN) {
+ if (_game & GAME_TALKIE || _game & GAME_WIN) {
_game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
midi.read_all_songs_old(_game_file);
} else {
diff --git a/simon/simon.h b/simon/simon.h
index 5d808dec10..77d2ebd437 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -114,12 +114,16 @@ public:
enum {
GAME_SIMON2 = 1,
GAME_WIN = 2,
+ GAME_TALKIE = 4,
+ GAME_DEMO = 8,
GAME_SIMON1DOS = 0,
- GAME_SIMON1WIN = GAME_WIN,
GAME_SIMON2DOS = GAME_SIMON2,
- GAME_SIMON2WIN = GAME_SIMON2 + GAME_WIN,
- GAME_SIMON1DEMO = 4,
+ GAME_SIMON1TALKIE = GAME_TALKIE,
+ GAME_SIMON2TALKIE = GAME_SIMON2 + GAME_TALKIE,
+ GAME_SIMON1WIN = GAME_WIN + GAME_TALKIE,
+ GAME_SIMON2WIN = GAME_SIMON2 + GAME_WIN + GAME_TALKIE,
+ GAME_SIMON1DEMO = GAME_DEMO,
};
typedef enum {