diff options
Diffstat (limited to 'simon/simon.cpp')
-rw-r--r-- | simon/simon.cpp | 56 |
1 files changed, 30 insertions, 26 deletions
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); |