2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2006-09-20 06:39:27 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2006-09-20 06:39:27 +00:00
|
|
|
|
2006-09-29 08:14:27 +00:00
|
|
|
#include "agos/agos.h"
|
|
|
|
#include "agos/intern.h"
|
2006-09-20 06:39:27 +00:00
|
|
|
|
|
|
|
using Common::File;
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
namespace AGOS {
|
2006-09-20 06:39:27 +00:00
|
|
|
|
2006-10-06 15:16:56 +00:00
|
|
|
uint16 AGOSEngine::getBackExit(int n) {
|
|
|
|
switch (n) {
|
2009-03-18 06:06:16 +00:00
|
|
|
case 0:
|
|
|
|
return 2;
|
|
|
|
case 1:
|
|
|
|
return 3;
|
|
|
|
case 2:
|
|
|
|
return 0;
|
|
|
|
case 3:
|
|
|
|
return 1;
|
|
|
|
case 4:
|
|
|
|
return 5;
|
|
|
|
case 5:
|
|
|
|
return 4;
|
2006-10-06 15:16:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
uint16 AGOSEngine::getDoorState(Item *item, uint16 d) {
|
2006-09-20 06:39:27 +00:00
|
|
|
uint16 mask = 3;
|
|
|
|
uint16 n;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType);
|
2006-09-20 06:39:27 +00:00
|
|
|
if (subRoom == NULL)
|
2009-02-07 01:11:51 +00:00
|
|
|
return 0;
|
2006-09-20 06:39:27 +00:00
|
|
|
|
|
|
|
d <<= 1;
|
|
|
|
mask <<= d;
|
|
|
|
n = subRoom->roomExitStates & mask;
|
|
|
|
n >>= d;
|
|
|
|
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
uint16 AGOSEngine::getExitOf(Item *item, uint16 d) {
|
2006-10-06 00:36:13 +00:00
|
|
|
SubRoom *subRoom;
|
2006-09-20 06:39:27 +00:00
|
|
|
uint16 x;
|
|
|
|
uint16 y = 0;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
subRoom = (SubRoom *)findChildOfType(item, kRoomType);
|
2006-09-20 06:39:27 +00:00
|
|
|
if (subRoom == NULL)
|
|
|
|
return 0;
|
|
|
|
x = d;
|
|
|
|
while (x > y) {
|
|
|
|
if (getDoorState(item, y) == 0)
|
|
|
|
d--;
|
|
|
|
y++;
|
|
|
|
}
|
|
|
|
return subRoom->roomExit[d];
|
|
|
|
}
|
|
|
|
|
2006-10-06 15:16:56 +00:00
|
|
|
void AGOSEngine::changeDoorState(SubRoom *r, uint16 d, uint16 n) {
|
|
|
|
uint16 mask=3;
|
|
|
|
d <<= 1;
|
|
|
|
mask <<= d;
|
|
|
|
n <<= d;
|
|
|
|
r->roomExitStates &= ~mask;
|
|
|
|
r->roomExitStates|= n;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AGOSEngine::setDoorState(Item *i, uint16 d, uint16 n) {
|
|
|
|
Item *j;
|
|
|
|
SubRoom *r, *r1;
|
|
|
|
uint16 d1;
|
|
|
|
uint16 y = 0;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
r = (SubRoom *)findChildOfType(i, kRoomType);
|
2006-10-06 15:16:56 +00:00
|
|
|
if (r == NULL)
|
2009-02-07 01:11:51 +00:00
|
|
|
return;
|
2006-10-06 15:16:56 +00:00
|
|
|
d1 = d;
|
|
|
|
while (d > y) {
|
|
|
|
if (getDoorState(i, y) == 0)
|
|
|
|
d1--;
|
|
|
|
y++;
|
|
|
|
}
|
|
|
|
changeDoorState(r, d, n);
|
|
|
|
|
|
|
|
j = derefItem(r->roomExit[d1]);
|
|
|
|
if (j == NULL)
|
|
|
|
return;
|
2007-06-30 16:25:59 +00:00
|
|
|
r1 = (SubRoom *)findChildOfType(j, kRoomType);
|
2006-10-06 15:16:56 +00:00
|
|
|
if (r1 == NULL)
|
2009-02-07 01:11:51 +00:00
|
|
|
return;
|
2006-10-06 15:16:56 +00:00
|
|
|
d = getBackExit(d);
|
|
|
|
d1 = d;
|
|
|
|
y = 0;
|
2006-10-08 09:02:31 +00:00
|
|
|
while (d > y) {
|
2006-10-06 15:16:56 +00:00
|
|
|
if (getDoorState(j, y) == 0)
|
|
|
|
d1--;
|
|
|
|
y++;
|
|
|
|
}
|
|
|
|
/* Check are a complete exit pair */
|
2007-09-19 08:40:12 +00:00
|
|
|
if (derefItem(r1->roomExit[d1]) != i)
|
2006-10-06 15:16:56 +00:00
|
|
|
return;
|
|
|
|
/* Change state of exit coming back */
|
2007-09-19 08:40:12 +00:00
|
|
|
changeDoorState(r1, d, n);
|
2006-10-06 15:16:56 +00:00
|
|
|
}
|
|
|
|
|
2006-10-13 11:38:41 +00:00
|
|
|
// Elvira 1 specific
|
2006-11-06 13:59:11 +00:00
|
|
|
Item *AGOSEngine::getDoorOf(Item *i, uint16 d) {
|
2006-10-13 11:38:41 +00:00
|
|
|
SubGenExit *g;
|
|
|
|
Item *x;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
g = (SubGenExit *)findChildOfType(i, kGenExitType);
|
2006-10-13 11:38:41 +00:00
|
|
|
if (g == NULL)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
x = derefItem(g->dest[d]);
|
|
|
|
if (x == NULL)
|
|
|
|
return 0;
|
|
|
|
if (isRoom(x))
|
|
|
|
return 0;
|
2006-11-06 13:59:11 +00:00
|
|
|
return x;
|
2006-10-13 11:38:41 +00:00
|
|
|
}
|
|
|
|
|
2006-11-06 13:59:11 +00:00
|
|
|
Item *AGOSEngine::getExitOf_e1(Item *item, uint16 d) {
|
2006-10-13 11:38:41 +00:00
|
|
|
SubGenExit *g;
|
|
|
|
Item *x;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
g = (SubGenExit *)findChildOfType(item, kGenExitType);
|
2006-10-13 11:38:41 +00:00
|
|
|
if (g == NULL)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
x = derefItem(g->dest[d]);
|
|
|
|
if (x == NULL)
|
|
|
|
return 0;
|
|
|
|
if (isRoom(x))
|
2006-11-06 13:59:11 +00:00
|
|
|
return x;
|
2006-10-13 11:38:41 +00:00
|
|
|
if (x->state != 0)
|
|
|
|
return 0;
|
2006-11-06 13:59:11 +00:00
|
|
|
return derefItem(x->parent);
|
2006-10-13 11:38:41 +00:00
|
|
|
}
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
void AGOSEngine_Waxworks::moveDirn(Item *i, uint 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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AGOSEngine_Elvira2::moveDirn(Item *i, uint x) {
|
|
|
|
SubSuperRoom *sr;
|
|
|
|
Item *d, *p;
|
|
|
|
uint16 a, n;
|
|
|
|
|
|
|
|
if (i->parent == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
p = derefItem(i->parent);
|
2007-06-30 16:25:59 +00:00
|
|
|
if (findChildOfType(p, kSuperRoomType)) {
|
2007-05-07 01:11:10 +00:00
|
|
|
n = getExitState(p, _superRoomNumber,x);
|
|
|
|
if (n == 1) {
|
2007-06-30 16:25:59 +00:00
|
|
|
sr = (SubSuperRoom *)findChildOfType(p, kSuperRoomType);
|
2007-05-07 01:11:10 +00:00
|
|
|
switch (x) {
|
|
|
|
case 0: a = -(sr->roomX); break;
|
|
|
|
case 1: a = 1; break;
|
|
|
|
case 2: a = sr->roomX; break;
|
|
|
|
case 3: a = 0xFFFF; break;
|
|
|
|
case 4: a = -(sr->roomX * sr->roomY); break;
|
|
|
|
case 5: a = (sr->roomX * sr->roomY); break;
|
|
|
|
default: return;
|
|
|
|
}
|
|
|
|
_superRoomNumber += a;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AGOSEngine::moveDirn(Item *i, uint x) {
|
2006-10-06 00:36:13 +00:00
|
|
|
Item *d, *p;
|
|
|
|
|
2006-11-06 13:59:11 +00:00
|
|
|
p = derefItem(i->parent);
|
|
|
|
if (p == 0)
|
2006-10-06 00:36:13 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
2006-11-06 13:59:11 +00:00
|
|
|
d = getExitOf_e1(p, x);
|
|
|
|
if (d) {
|
2006-10-06 00:36:13 +00:00
|
|
|
if (canPlace(i, d))
|
|
|
|
return;
|
|
|
|
|
|
|
|
setItemParent(i, d);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-11-06 13:59:11 +00:00
|
|
|
d = getDoorOf(p, x);
|
2006-10-06 00:36:13 +00:00
|
|
|
if (d) {
|
2008-12-13 07:38:37 +00:00
|
|
|
const byte *name = getStringPtrByID(d->itemName, true);
|
2006-10-06 00:36:13 +00:00
|
|
|
if (d->state == 1)
|
|
|
|
showMessageFormat("%s is closed.\n", name);
|
|
|
|
else
|
|
|
|
showMessageFormat("%s is locked.\n", name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
showMessageFormat("You can't go that way.\n");
|
|
|
|
}
|
|
|
|
|
2006-10-13 11:38:41 +00:00
|
|
|
// Elvira 2 specific
|
2007-05-07 01:11:10 +00:00
|
|
|
int AGOSEngine_Elvira2::changeExitStates(SubSuperRoom *sr, int n, int d, uint16 s) {
|
2006-10-25 08:12:05 +00:00
|
|
|
int b, bd;
|
|
|
|
uint16 mask = 3;
|
|
|
|
uint16 bs = s;
|
|
|
|
|
|
|
|
switch (d) {
|
|
|
|
case 0:
|
|
|
|
b =- (sr->roomX); bd = 2;
|
|
|
|
if (((n % (sr->roomX * sr->roomY)) / sr->roomX) == 0)
|
|
|
|
return(0);
|
|
|
|
else
|
|
|
|
break;
|
2007-09-19 08:40:12 +00:00
|
|
|
case 1:
|
2006-10-25 08:12:05 +00:00
|
|
|
b = 1; bd = 3;
|
|
|
|
if (((n % (sr->roomX * sr->roomY)) % sr->roomX) == 0)
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
break;
|
2007-09-19 08:40:12 +00:00
|
|
|
case 2:
|
2006-10-25 08:12:05 +00:00
|
|
|
b = sr->roomX; bd = 0;
|
|
|
|
if (((n % (sr->roomX * sr->roomY)) / sr->roomX) == (sr->roomY - 1))
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
b =- 1; bd = 1;
|
|
|
|
if (((n % (sr->roomX * sr->roomY)) % sr->roomX) == 1)
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
b =- (sr->roomX * sr->roomY); bd = 5;
|
|
|
|
if (n < (sr->roomX * sr->roomY))
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
b = sr->roomX * sr->roomY; bd = 4;
|
|
|
|
if (n > (sr->roomX * sr->roomY * (sr->roomZ - 1)))
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
n--;
|
|
|
|
d <<= 1;
|
|
|
|
mask <<= d;
|
|
|
|
s <<= d;
|
2006-11-05 08:27:15 +00:00
|
|
|
sr->roomExitStates[n] &= ~mask;
|
|
|
|
sr->roomExitStates[n] |= s;
|
2006-10-25 08:12:05 +00:00
|
|
|
mask = 3;
|
|
|
|
n += b;
|
|
|
|
bd <<= 1;
|
|
|
|
mask <<= bd;
|
|
|
|
bs <<= bd;
|
2006-11-05 08:27:15 +00:00
|
|
|
sr->roomExitStates[n] &= ~mask;
|
|
|
|
sr->roomExitStates[n] |= bs;
|
2006-10-25 08:12:05 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
uint16 AGOSEngine_Elvira2::getExitState(Item *i, uint16 x, uint16 d) {
|
2006-10-13 11:38:41 +00:00
|
|
|
SubSuperRoom *sr;
|
|
|
|
uint16 mask = 3;
|
|
|
|
uint16 n;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
sr = (SubSuperRoom *)findChildOfType(i, kSuperRoomType);
|
2006-10-13 11:38:41 +00:00
|
|
|
if (sr == NULL)
|
2009-02-07 01:11:51 +00:00
|
|
|
return 0;
|
2006-10-13 11:38:41 +00:00
|
|
|
|
|
|
|
d <<= 1;
|
|
|
|
mask <<= d;
|
2006-11-05 08:27:15 +00:00
|
|
|
n = sr->roomExitStates[x - 1] & mask;
|
2006-10-13 11:38:41 +00:00
|
|
|
n >>= d;
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
void AGOSEngine_Elvira2::setExitState(Item *i, uint16 n, uint16 d, uint16 s) {
|
2007-06-30 16:25:59 +00:00
|
|
|
SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(i, kSuperRoomType);
|
2006-10-25 08:12:05 +00:00
|
|
|
if (sr)
|
|
|
|
changeExitStates(sr, n, d, s);
|
|
|
|
}
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
void AGOSEngine_Elvira2::setSRExit(Item *i, int n, int d, uint16 s) {
|
2006-10-29 07:01:55 +00:00
|
|
|
uint16 mask = 3;
|
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(i, kSuperRoomType);
|
2006-10-29 07:01:55 +00:00
|
|
|
if (sr) {
|
|
|
|
n--;
|
|
|
|
d <<= 1;
|
|
|
|
mask <<= d;
|
|
|
|
s <<= d;
|
2006-11-05 08:27:15 +00:00
|
|
|
sr->roomExitStates[n] &= ~mask;
|
|
|
|
sr->roomExitStates[n] |= s;
|
2006-10-29 07:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-10-13 11:38:41 +00:00
|
|
|
// Waxworks specific
|
2008-03-22 09:46:25 +00:00
|
|
|
bool AGOSEngine::loadRoomItems(uint16 room) {
|
2006-09-20 06:39:27 +00:00
|
|
|
byte *p;
|
2008-03-22 09:46:25 +00:00
|
|
|
uint i, minNum, maxNum;
|
2006-09-20 06:39:27 +00:00
|
|
|
char filename[30];
|
|
|
|
File in;
|
2008-03-22 09:46:25 +00:00
|
|
|
Item *item, *itemTmp;
|
2006-09-20 06:39:27 +00:00
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
if (_roomsList == NULL)
|
2006-09-20 06:39:27 +00:00
|
|
|
return 0;
|
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
_currentRoom = room;
|
|
|
|
room -= 2;
|
|
|
|
|
|
|
|
if (_roomsListPtr) {
|
|
|
|
p = _roomsListPtr;
|
|
|
|
for (;;) {
|
|
|
|
minNum = READ_BE_UINT16(p); p += 2;
|
|
|
|
if (minNum == 0)
|
|
|
|
break;
|
|
|
|
|
|
|
|
maxNum = READ_BE_UINT16(p); p += 2;
|
|
|
|
|
|
|
|
for (uint16 z = minNum; z <= maxNum; z++) {
|
|
|
|
uint16 itemNum = z + 2;
|
|
|
|
item = derefItem(itemNum);
|
|
|
|
item->parent = 0;
|
2006-10-13 04:49:27 +00:00
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
uint16 num = (itemNum - _itemArrayInited);
|
|
|
|
_roomStates[num].state = item->state;
|
|
|
|
_roomStates[num].classFlags = item->classFlags;
|
|
|
|
SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType);
|
|
|
|
_roomStates[num].roomExitStates = subRoom->roomExitStates;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
p = _roomsList;
|
2006-09-20 06:39:27 +00:00
|
|
|
while (*p) {
|
|
|
|
for (i = 0; *p; p++, i++)
|
|
|
|
filename[i] = *p;
|
|
|
|
filename[i] = 0;
|
|
|
|
p++;
|
|
|
|
|
|
|
|
for (;;) {
|
2008-03-22 09:46:25 +00:00
|
|
|
_roomsListPtr = p;
|
|
|
|
|
|
|
|
minNum = READ_BE_UINT16(p); p += 2;
|
|
|
|
if (minNum == 0)
|
2006-09-20 06:39:27 +00:00
|
|
|
break;
|
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
maxNum = READ_BE_UINT16(p); p += 2;
|
2006-09-20 06:39:27 +00:00
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
if (room >= minNum && room <= maxNum) {
|
2006-09-20 06:39:27 +00:00
|
|
|
in.open(filename);
|
|
|
|
if (in.isOpen() == false) {
|
|
|
|
error("loadRoomItems: Can't load rooms file '%s'", filename);
|
|
|
|
}
|
|
|
|
|
2006-10-05 08:54:51 +00:00
|
|
|
while ((i = in.readUint16BE()) != 0) {
|
2008-03-22 09:46:25 +00:00
|
|
|
uint16 itemNum = i + 2;
|
|
|
|
|
|
|
|
_itemArrayPtr[itemNum] = (Item *)allocateItem(sizeof(Item));
|
|
|
|
readItemFromGamePc(&in, _itemArrayPtr[itemNum]);
|
|
|
|
|
|
|
|
item = derefItem(itemNum);
|
|
|
|
item->parent = 0;
|
|
|
|
item->child = 0;
|
|
|
|
|
2009-03-18 06:06:16 +00:00
|
|
|
for (uint16 z = _itemArrayInited; z; z--) {
|
|
|
|
itemTmp = derefItem(z);
|
2008-03-22 09:46:25 +00:00
|
|
|
|
2009-03-18 06:06:16 +00:00
|
|
|
if (!itemTmp)
|
2008-03-22 09:46:25 +00:00
|
|
|
continue;
|
|
|
|
if (itemTmp->parent != itemNum)
|
|
|
|
continue;
|
|
|
|
if (item->child == 0) {
|
|
|
|
item->child = z;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
uint16 child = item->child;
|
|
|
|
while (itemTmp->next != 0) {
|
|
|
|
if (itemTmp->next == child) {
|
|
|
|
item->child = z;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-03-18 06:06:16 +00:00
|
|
|
itemTmp = derefItem(itemTmp->next);
|
2008-03-22 09:46:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16 num = (itemNum - _itemArrayInited);
|
|
|
|
item->state = _roomStates[num].state;
|
|
|
|
item->classFlags = _roomStates[num].classFlags;
|
|
|
|
SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType);
|
|
|
|
subRoom->roomExitStates = _roomStates[num].roomExitStates;
|
2006-09-20 06:39:27 +00:00
|
|
|
}
|
|
|
|
in.close();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
debug(1,"loadRoomItems: didn't find %d", room);
|
2006-09-20 06:39:27 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
} // End of namespace AGOS
|