mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
Small cleanup to reduce amount of game id checks.
svn-id: r10402
This commit is contained in:
parent
07c3c2dac6
commit
ab66db7cd0
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user