diff options
author | Kari Salminen | 2008-05-29 22:07:25 +0000 |
---|---|---|
committer | Kari Salminen | 2008-05-29 22:07:25 +0000 |
commit | b7deac38b3a529701a9c4866062e1db2db6214c4 (patch) | |
tree | ec8cd2a8370237ce203e62e6c3fe209f64f691db /engines | |
parent | 5396cd5dedd039fa40b46ef0f86cd757de4de259 (diff) | |
download | scummvm-rg350-b7deac38b3a529701a9c4866062e1db2db6214c4.tar.gz scummvm-rg350-b7deac38b3a529701a9c4866062e1db2db6214c4.tar.bz2 scummvm-rg350-b7deac38b3a529701a9c4866062e1db2db6214c4.zip |
Added check in modifyObjectParam's start (Verified with FW & OS PC versions' disassemblies). Also removed superfluous default-case, hopefully no compiler will complain about this :).
svn-id: r32371
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cine/object.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index d7b4b853ae..7666f05352 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -185,6 +185,10 @@ void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) { } void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { + // Operation Stealth checks object index range, Future Wars doesn't. + if (g_cine->getGameType() == Cine::GType_OS && objIdx >= NUM_MAX_OBJECT) + return; + switch (paramIdx) { case 1: objectTable[objIdx].x = newValue; @@ -214,8 +218,6 @@ void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { case 6: objectTable[objIdx].part = newValue; break; - default: // No-operation - break; } } |