diff options
Diffstat (limited to 'engines/dreamweb/object.cpp')
-rw-r--r-- | engines/dreamweb/object.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 8553f41ee8..6aa1364002 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -631,4 +631,39 @@ void DreamGenContext::outOfInv() { delPointer(); } +void DreamBase::resetLocation(uint8 index) { + if (index == 5) { + // delete hotel + purgeALocation(5); + purgeALocation(21); + purgeALocation(22); + purgeALocation(27); + } else if (index == 8) { + // delete TV studio + purgeALocation(8); + purgeALocation(28); + } else if (index == 6) { + // delete sarters + purgeALocation(6); + purgeALocation(20); + purgeALocation(25); + } else if (index == 13) { + // delete boathouse + purgeALocation(13); + purgeALocation(29); + } + + data.byte(kRoomscango + index) = 0; +} + +void DreamBase::purgeALocation(uint8 index) { + // index == al + for (uint8 i = 0; i < kNumexobjects; ++i) { + DynObject *t = getExAd(i); + if (t->currentLocation == index && t->mapad[0] == 0) { + deleteExObject(i); + } + } +} + } // End of namespace DreamGen |