Minor corrections and cleanup.

svn-id: r39505
This commit is contained in:
Travis Howell 2009-03-18 06:06:16 +00:00
parent 9a99eb221a
commit 717102578b

View file

@ -34,12 +34,18 @@ namespace AGOS {
uint16 AGOSEngine::getBackExit(int n) { uint16 AGOSEngine::getBackExit(int n) {
switch (n) { switch (n) {
case 0:return 2; case 0:
case 1:return 3; return 2;
case 2:return 0; case 1:
case 3:return 1; return 3;
case 4:return 5; case 2:
case 5:return 4; return 0;
case 3:
return 1;
case 4:
return 5;
case 5:
return 4;
} }
return 0; return 0;
@ -419,10 +425,10 @@ bool AGOSEngine::loadRoomItems(uint16 room) {
item->parent = 0; item->parent = 0;
item->child = 0; item->child = 0;
for (uint16 z = _itemArrayInited - 1; z; z--) { for (uint16 z = _itemArrayInited; z; z--) {
itemTmp = _itemArrayPtr[z]; itemTmp = derefItem(z);
if (itemTmp->parent == 0) if (!itemTmp)
continue; continue;
if (itemTmp->parent != itemNum) if (itemTmp->parent != itemNum)
continue; continue;
@ -437,7 +443,7 @@ bool AGOSEngine::loadRoomItems(uint16 room) {
break; break;
} }
itemTmp = _itemArrayPtr[itemTmp->next]; itemTmp = derefItem(itemTmp->next);
} }
} }