diff options
author | Martin Kiewitz | 2017-02-23 23:54:45 +0100 |
---|---|---|
committer | Martin Kiewitz | 2017-02-23 23:54:45 +0100 |
commit | 9dd0cd51d5b243700ccbd154e1d91ddb84c307c2 (patch) | |
tree | 5fa0a22dc13b07840d5495d0fec99f3d1a38c0ee /engines/agi/loader_v2.cpp | |
parent | 5fa728371f9d01f9fb268596d961ad841825a456 (diff) | |
download | scummvm-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/loader_v2.cpp')
-rw-r--r-- | engines/agi/loader_v2.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp index 43ef46bd72..bebde69fe9 100644 --- a/engines/agi/loader_v2.cpp +++ b/engines/agi/loader_v2.cpp @@ -34,7 +34,12 @@ int AgiLoader_v2::detectGame() { !Common::File::exists(VIEWDIR)) return errInvalidAGIFile; - return _vm->setupV2Game(_vm->getVersion()); + // Should this go above the previous lines, so we can force emulation versions + // even for AGDS games? -- dsymonds + if (_vm->getFeatures() & GF_AGDS) + _vm->setVersion(0x2440); // ALL AGDS games built for 2.440 + + return errOK; } int AgiLoader_v2::loadDir(AgiDir *agid, const char *fname) { |