From d6e9c1f3a074c0e8f76ba4107bfb2ddd1389f489 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 14 Jan 2003 05:25:31 +0000 Subject: Add hopefully the final simon target, not support at all yet. svn-id: r6451 --- simon/intern.h | 5 +++-- simon/items.cpp | 4 ++-- simon/simon.cpp | 56 ++++++++++++++++++++++++++++++-------------------------- 3 files changed, 35 insertions(+), 30 deletions(-) (limited to 'simon') diff --git a/simon/intern.h b/simon/intern.h index 17a596b717..210f96c688 100644 --- a/simon/intern.h +++ b/simon/intern.h @@ -138,7 +138,7 @@ enum { GAME_TALKIE = 4, GAME_DEMO = 8, GAME_MAC = 16, - GAME_CD32 = 32, + GAME_AMIGA = 32, GAME_SIMON1DOS = 0, GAME_SIMON2DOS = GAME_SIMON2, @@ -148,7 +148,8 @@ enum { GAME_SIMON2WIN = GAME_SIMON2 + GAME_WIN + GAME_TALKIE, GAME_SIMON1DEMO = GAME_DEMO, GAME_SIMON2MAC = GAME_SIMON2WIN + GAME_MAC, - GAME_SIMON1CD32 = GAME_SIMON1TALKIE + GAME_CD32 + GAME_SIMON1AMIGA = GAME_AMIGA, + GAME_SIMON1CD32 = GAME_SIMON1TALKIE + GAME_AMIGA }; #endif diff --git a/simon/items.cpp b/simon/items.cpp index 134d5efc95..224d1d4193 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -991,7 +991,7 @@ int SimonState::runScript() uint d = _array_4[a]; if (d != 0) talk_with_speech(d, b); - } else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS || _game == GAME_SIMON2DOS) { + } else if (!(_game & GAME_TALKIE)) { const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]); ThreeValues *tv = getThreeValues(b); @@ -1244,7 +1244,7 @@ void SimonState::o_177() offs = getOffsetOfChild2Param(child, 0x100); talk_with_speech(child->array[offs] + 3550, a); } - } else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS || _game == GAME_SIMON2DOS) { + } else if (!(_game & GAME_TALKIE)) { if (child != NULL && child->avail_props & 1) { const char *s = (const char *)getStringPtrByID(child->array[0]); char buf[256]; diff --git a/simon/simon.cpp b/simon/simon.cpp index cb72665260..414c38edcb 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -54,7 +54,7 @@ static const GameSpecificSettings simon1_settings = { "GAMEPC", /* gamepc_filename */ }; -static const GameSpecificSettings simon1cd32_settings = { +static const GameSpecificSettings simon1amiga_settings = { 1, /* VGA_DELAY_BASE */ 1576 / 4, /* TABLE_INDEX_BASE */ 1460 / 4, /* TEXT_INDEX_BASE */ @@ -67,8 +67,8 @@ static const GameSpecificSettings simon1cd32_settings = { "", /* wav_filename */ "", /* voc_filename */ "SIMON.MP3", /* mp3_filename */ - "", /* voc_effects_filename */ - "", /* mp3_effects_filename */ + "", /* voc_effects_filename */ + "", /* mp3_effects_filename */ "gameamiga", /* gamepc_filename */ }; @@ -983,7 +983,7 @@ void SimonState::closeTablesFile_simon1(File *in) uint SimonState::loadTextFile(const char *filename, byte *dst) { - if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) + if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) return loadTextFile_simon1(filename, dst); else return loadTextFile_gme(filename, dst); @@ -991,7 +991,7 @@ uint SimonState::loadTextFile(const char *filename, byte *dst) File *SimonState::openTablesFile(const char *filename) { - if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) + if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) return openTablesFile_simon1(filename); else return openTablesFile_gme(filename); @@ -999,7 +999,7 @@ File *SimonState::openTablesFile(const char *filename) void SimonState::closeTablesFile(File *in) { - if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) + if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) closeTablesFile_simon1(in); else closeTablesFile_gme(in); @@ -1491,7 +1491,7 @@ uint SimonState::item_get_icon_number(Item *item) void SimonState::loadIconFile() { File in; - if (_game == GAME_SIMON1CD32) + if (_game & GAME_AMIGA) in.open("icon.pkd", _gameDataPath); else in.open("ICON.DAT", _gameDataPath); @@ -1897,6 +1897,7 @@ void SimonState::o_print_str() case GAME_SIMON1DEMO: case GAME_SIMON1DOS: + case GAME_SIMON1AMIGA: case GAME_SIMON2DOS: talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c); break; @@ -4364,21 +4365,21 @@ void SimonState::print_char_helper_6(uint i) void SimonState::read_vga_from_datfile_1(uint vga_id) { - if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) { + if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) { File in; char buf[50]; uint32 size; - if (vga_id == 23) { - if (_game == GAME_SIMON1CD32) - sprintf(buf, "0112.out"); - else - sprintf(buf, "0112.VGA"); - } - if (vga_id == 328) { - if (_game == GAME_SIMON1CD32) - sprintf(buf, "0119.out"); - else - sprintf(buf, "0119.VGA"); + if (vga_id == 23) + vga_id = 112; + if (vga_id == 328) + vga_id = 119; + + if (_game == GAME_SIMON1CD32) { + sprintf(buf, "0%d.out", vga_id); + } else if (_game == GAME_SIMON1AMIGA) { + sprintf(buf, "0%d.pkd", vga_id); + } else { + sprintf(buf, "0%d.VGA", vga_id); } in.open(buf, _gameDataPath); @@ -4401,16 +4402,19 @@ void SimonState::read_vga_from_datfile_1(uint vga_id) byte *SimonState::read_vga_from_datfile_2(uint id) { - if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) { + if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) { File in; char buf[50]; uint32 size; byte *dst; - if (_game == GAME_SIMON1CD32) + if (_game == GAME_SIMON1CD32) { sprintf(buf, "%.3d%d.out", id >> 1, (id & 1) + 1); - else + } else if (_game == GAME_SIMON1AMIGA) { + sprintf(buf, "%.3d%d.pkd", id >> 1, (id & 1) + 1); + } else { sprintf(buf, "%.3d%d.VGA", id >> 1, (id & 1) + 1); + } in.open(buf, _gameDataPath); if (in.isOpen() == false) @@ -4448,7 +4452,7 @@ void SimonState::resfile_read(void *dst, uint32 offs, uint32 size) void SimonState::openGameFile() { - if (_game != GAME_SIMON1CD32 && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) { + if (!(_game & GAME_AMIGA) && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) { _game_file = new File(); _game_file->open(gss->gme_filename, _gameDataPath); @@ -4634,8 +4638,8 @@ void SimonState::go() gss = &simon2win_settings; } else if (_game == GAME_SIMON2DOS) { gss = &simon2dos_settings; - } else if (_game == GAME_SIMON1CD32) { - gss = &simon1cd32_settings; + } else if (_game & GAME_AMIGA) { + gss = &simon1amiga_settings; } else if (_game == GAME_SIMON1DEMO) { gss = &simon1demo_settings; } else { @@ -4999,7 +5003,7 @@ void SimonState::playMusic(uint music_unk, uint music) _vc70_var1 = 0xFFFF; _vc72_var3 = 0xFFFF; _midi_unk2 = 0xFFFF; - } else if (!(_game & GAME_DEMO) && (_game != GAME_SIMON1CD32)){ // Simon 1 music + } else if (!(_game & GAME_DEMO) && !(_game & GAME_AMIGA)){ // Simon 1 music midi.shutdown(); if (_game & GAME_WIN) { _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET); -- cgit v1.2.3