aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2017-02-23 23:54:45 +0100
committerMartin Kiewitz2017-02-23 23:54:45 +0100
commit9dd0cd51d5b243700ccbd154e1d91ddb84c307c2 (patch)
tree5fa0a22dc13b07840d5495d0fec99f3d1a38c0ee /engines/agi/agi.cpp
parent5fa728371f9d01f9fb268596d961ad841825a456 (diff)
downloadscummvm-rg350-9dd0cd51d5b243700ccbd154e1d91ddb84c307c2.tar.gz
scummvm-rg350-9dd0cd51d5b243700ccbd154e1d91ddb84c307c2.tar.bz2
scummvm-rg350-9dd0cd51d5b243700ccbd154e1d91ddb84c307c2.zip
AGI: Clean up VM opcode handling
so that invalid opcodes won't crash ScummVM anymore
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r--engines/agi/agi.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index b293a8e9e5..55872940f5 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -394,7 +394,6 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
resetControllers();
- setupOpcodes();
_game._curLogic = NULL;
_veryFirstInitialCycle = true;
_instructionCounter = 0;
@@ -498,6 +497,8 @@ void AgiEngine::initialize() {
} else {
warning("Could not open AGI game");
}
+ // finally set up actual VM opcodes, because we should now have figured out the right AGI version
+ setupOpCodes(getVersion());
debugC(2, kDebugLevelMain, "Init sound");
}