diff --git a/simon/res.cpp b/simon/res.cpp index 2a9de5dd835..cd8183f53ab 100644 --- a/simon/res.cpp +++ b/simon/res.cpp @@ -258,29 +258,14 @@ byte *SimonEngine::readSingleOpcode(File *in, byte *ptr) { const char *const *table; - switch (_game) { - case GAME_SIMON1TALKIE: - case GAME_SIMON1WIN: - case GAME_SIMON1CD32: - case GAME_SIMON1ACORN: - table = opcode_arg_table_simon1win; - break; - case GAME_SIMON2DOS: - table = opcode_arg_table_simon2dos; - break; - case GAME_SIMON2TALKIE: - case GAME_SIMON2WIN: - case GAME_SIMON2MAC: + if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) table = opcode_arg_table_simon2win; - break; - case GAME_SIMON1DOS: - case GAME_SIMON1DEMO: - case GAME_SIMON1AMIGA: + else if (_game & GF_SIMON2) + table = opcode_arg_table_simon2dos; + else if (_game & GF_TALKIE) + table = opcode_arg_table_simon1win; + else table = opcode_arg_table_simon1dos; - break; - default: - error("Invalid game specified"); - } i = 0; diff --git a/simon/simon.cpp b/simon/simon.cpp index 0f4c09e36e4..fce3ee104b5 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -210,21 +210,20 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _game = (byte)detector->_game.features; - if (_game == GAME_SIMON2MAC) { + if (_game & GF_MAC) gss = &simon2mac_settings; - } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) { + else if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) gss = &simon2win_settings; - } else if (_game == GAME_SIMON2DOS) { + else if (_game & GF_SIMON2) gss = &simon2dos_settings; - } else if (_game == GAME_SIMON1ACORN) { + else if (_game & GF_ACORN) gss =&simon1acorn_settings; - } else if (_game & GF_AMIGA) { + else if (_game & GF_AMIGA) gss = &simon1amiga_settings; - } else if (_game == GAME_SIMON1DEMO) { + else if (_game & GF_DEMO) gss = &simon1demo_settings; - } else { + else gss = &simon1_settings; - } _key_pressed = 0;