AGOS: Replace if-cascade by switch.

This commit is contained in:
Christoph Mallon 2011-08-06 11:13:07 +02:00
parent 715c07930d
commit 0a458019b3

View File

@ -642,14 +642,12 @@ Common::Error AGOSEngine::init() {
// TODO: Use special debug levels instead of the following hack.
_debugMode = (gDebugLevel >= 0);
if (gDebugLevel == 2)
_dumpOpcodes = true;
if (gDebugLevel == 3)
_dumpVgaOpcodes = true;
if (gDebugLevel == 4)
_dumpScripts = true;
if (gDebugLevel == 5)
_dumpVgaScripts = true;
switch (gDebugLevel) {
case 2: _dumpOpcodes = true; break;
case 3: _dumpVgaOpcodes = true; break;
case 4: _dumpScripts = true; break;
case 5: _dumpVgaScripts = true; break;
}
return Common::kNoError;
}