diff options
author | David Corrales | 2007-06-23 18:51:33 +0000 |
---|---|---|
committer | David Corrales | 2007-06-23 18:51:33 +0000 |
commit | cacd7a28fd51d960947de88abbf30c487e66529d (patch) | |
tree | f3baa59853bfb307e452b86b9d93c4737b1fa6ab /engines/lure/res_struct.cpp | |
parent | 0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff) | |
parent | 90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff) | |
download | scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.gz scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.bz2 scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.zip |
Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
Diffstat (limited to 'engines/lure/res_struct.cpp')
-rw-r--r-- | engines/lure/res_struct.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index 1ca4394ad3..79bf0dfe6e 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -94,6 +94,8 @@ RoomData::RoomData(RoomResource *rec, MemoryBlock *pathData) { clippingXStart = FROM_LE_16(rec->clippingXStart); clippingXEnd = FROM_LE_16(rec->clippingXEnd); + exitTime = FROM_LE_32(rec->exitTime); + areaFlag = rec->areaFlag; walkBounds.left = FROM_LE_16(rec->walkBounds.xs); walkBounds.right = FROM_LE_16(rec->walkBounds.xe); walkBounds.top = FROM_LE_16(rec->walkBounds.ys); @@ -285,6 +287,7 @@ void RoomDataList::saveToStream(WriteStream *stream) { for (i = begin(); i != end(); ++i) { RoomData *rec = *i; + stream->writeByte(rec->flags); const byte *pathData = rec->paths.data(); stream->write(pathData, ROOM_PATHS_HEIGHT * ROOM_PATHS_WIDTH); } @@ -296,6 +299,7 @@ void RoomDataList::loadFromStream(ReadStream *stream) { for (i = begin(); i != end(); ++i) { RoomData *rec = *i; + rec->flags = stream->readByte(); stream->read(data, ROOM_PATHS_HEIGHT * ROOM_PATHS_WIDTH); rec->paths.load(data); } @@ -730,6 +734,7 @@ void SequenceDelayList::add(uint16 delay, uint16 seqOffset, bool canClear) { } void SequenceDelayList::tick() { + Resources &res = Resources::getReference(); uint32 currTime = g_system->getMillis(); SequenceDelayList::iterator i; @@ -738,6 +743,15 @@ void SequenceDelayList::tick() { if (currTime >= entry->timeoutCtr) { // Timeout reached - delete entry from list and execute the sequence uint16 seqOffset = entry->sequenceOffset; + + // FIXME: At current speed the player can enter the cave a bit too quickly ahead of Goewin. + // Use a hard-coded check to make sure Goewin is in the room + if (seqOffset == 0xebd) { + Hotspot *goewinHotspot = res.getActiveHotspot(GOEWIN_ID); + if (goewinHotspot->roomNumber() != 38) + return; + } + erase(i); Script::execute(seqOffset); return; |