aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/room.cpp
diff options
context:
space:
mode:
authorMatthew Stewart2018-05-29 16:51:05 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commite5a97d91373e20815c4f093803dc569112e0c922 (patch)
tree3a6aaff70afee05cb00f3a61b571a67e8423d383 /engines/startrek/room.cpp
parent2e80a35e08bf360a65592784631425e5d1081d65 (diff)
downloadscummvm-rg350-e5a97d91373e20815c4f093803dc569112e0c922.tar.gz
scummvm-rg350-e5a97d91373e20815c4f093803dc569112e0c922.tar.bz2
scummvm-rg350-e5a97d91373e20815c4f093803dc569112e0c922.zip
STARTREK: Demon5
Diffstat (limited to 'engines/startrek/room.cpp')
-rw-r--r--engines/startrek/room.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 2c181a51a2..8a71961398 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -57,6 +57,10 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) {
_roomActionList = demon4ActionList;
_numRoomActions = sizeof(demon4ActionList) / sizeof(RoomAction);
}
+ else if (name == "DEMON5") {
+ _roomActionList = demon5ActionList;
+ _numRoomActions = sizeof(demon5ActionList) / sizeof(RoomAction);
+ }
else {
warning("Room \"%s\" unimplemented", name.c_str());
_numRoomActions = 0;
@@ -220,6 +224,7 @@ int Room::showText(int text) {
}
void Room::giveItem(int item) {
+ assert(item >= ITEMS_START && item < ITEMS_END);
_vm->_itemList[item - ITEMS_START].have = true;
}
@@ -235,6 +240,11 @@ void Room::loadRoomIndex(int roomIndex, int spawnIndex) {
// manipulate the stack to jump directly back to the start of "runAwayMission"...
}
+void Room::loseItem(int item) {
+ assert(item >= ITEMS_START && item < ITEMS_END);
+ _vm->_itemList[item - ITEMS_START].have = false;
+}
+
void Room::walkCrewman(int actorIndex, int16 destX, int16 destY, uint16 finishedAnimActionParam) {
if (!(actorIndex >= OBJECT_KIRK && actorIndex <= OBJECT_REDSHIRT))
error("Tried to walk a non PC");