aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/rooms.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-10-04 03:29:14 +0000
committerTravis Howell2006-10-04 03:29:14 +0000
commitbaac2939118a3cb6ca0d8f8ddd0d7b8edfe64109 (patch)
tree2cab477adcd26a91d611ebb603a29484f218c4ff /engines/agos/rooms.cpp
parent1f5a69ea118931f4253ad09e5bb823eda9de9c1e (diff)
downloadscummvm-rg350-baac2939118a3cb6ca0d8f8ddd0d7b8edfe64109.tar.gz
scummvm-rg350-baac2939118a3cb6ca0d8f8ddd0d7b8edfe64109.tar.bz2
scummvm-rg350-baac2939118a3cb6ca0d8f8ddd0d7b8edfe64109.zip
Add more code for WW
svn-id: r24103
Diffstat (limited to 'engines/agos/rooms.cpp')
-rw-r--r--engines/agos/rooms.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index 2af76d8c60..e321485e53 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -62,6 +62,29 @@ uint16 AGOSEngine::getExitOf(Item *item, uint16 d) {
return subRoom->roomExit[d];
}
+void AGOSEngine::moveDirn(Item *i, int x) {
+ Item *d;
+ uint16 n;
+
+ if (i->parent == 0)
+ return;
+
+ n = getExitOf(derefItem(i->parent), x);
+ if (derefItem(n) == NULL) {
+ loadRoomItems(n);
+ n=getExitOf(derefItem(i->parent), x);
+ }
+
+ d = derefItem(n);
+ if (d) {
+ n = getDoorState(derefItem(i->parent), x);
+ if(n == 1) {
+ if(!canPlace(i,d))
+ setItemParent(i,d);
+ }
+ }
+}
+
bool AGOSEngine::loadRoomItems(uint item) {
byte *p;
uint i, min_num, max_num;