aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v6.cpp
diff options
context:
space:
mode:
authorSven Hesse2008-12-13 16:35:14 +0000
committerSven Hesse2008-12-13 16:35:14 +0000
commit49e0a52ee1f4e31d073da025cae00d4157ef1707 (patch)
treede5b8659645a7e8fee8d2af8fd8086ba032d780f /engines/gob/inter_v6.cpp
parent2fdc191e4a8f4e5409993b31a2aaa26b3db51a39 (diff)
downloadscummvm-rg350-49e0a52ee1f4e31d073da025cae00d4157ef1707.tar.gz
scummvm-rg350-49e0a52ee1f4e31d073da025cae00d4157ef1707.tar.bz2
scummvm-rg350-49e0a52ee1f4e31d073da025cae00d4157ef1707.zip
Modified collision init functions for Urban Runner
svn-id: r35341
Diffstat (limited to 'engines/gob/inter_v6.cpp')
-rw-r--r--engines/gob/inter_v6.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index ad4512e216..59c406f7bb 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -405,7 +405,7 @@ void Inter_v6::setupOpcodes() {
OPCODE(o2_animPalInit),
/* 18 */
OPCODE(o2_addCollision),
- OPCODE(o2_freeCollision),
+ OPCODE(o6_freeCollision),
OPCODE(o3_getTotTextItemPart),
{NULL, ""},
/* 1C */
@@ -794,4 +794,40 @@ bool Inter_v6::o6_palLoad(OpFuncParams &params) {
return false;
}
+bool Inter_v6::o6_freeCollision(OpFuncParams &params) {
+ int16 id;
+
+ id = _vm->_parse->parseValExpr();
+
+ switch (id + 5) {
+ case 0:
+ _vm->_game->pushCollisions(1);
+ break;
+ case 1:
+ _vm->_game->popCollisions();
+ break;
+ case 2:
+ _vm->_game->pushCollisions(2);
+ break;
+ case 3:
+ for (int i = 0; i < 150; i++) {
+ if (((_vm->_game->_collisionAreas[i].id & 0xF000) == 0xD000) ||
+ ((_vm->_game->_collisionAreas[i].id & 0xF000) == 0x4000))
+ _vm->_game->_collisionAreas[i].left = 0xFFFF;
+ }
+ break;
+ case 4:
+ for (int i = 0; i < 150; i++) {
+ if ((_vm->_game->_collisionAreas[i].id & 0xF000) == 0xE000)
+ _vm->_game->_collisionAreas[i].left = 0xFFFF;
+ }
+ break;
+ default:
+ _vm->_game->freeCollision(0xE000 + id);
+ break;
+ }
+
+ return false;
+}
+
} // End of namespace Gob