diff options
author | Paul Gilbert | 2007-02-09 10:58:06 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-02-09 10:58:06 +0000 |
commit | 87b3f2c6d8da238c0d98ce87b24b31416e97ef82 (patch) | |
tree | bbd9b8c6ebca019fb2299a94b6c7ad4ce15b4b38 /engines/lure/res_struct.cpp | |
parent | 6391e49ee5d1fa9a0cc6f92fb13996d00e364a9e (diff) | |
download | scummvm-rg350-87b3f2c6d8da238c0d98ce87b24b31416e97ef82.tar.gz scummvm-rg350-87b3f2c6d8da238c0d98ce87b24b31416e97ef82.tar.bz2 scummvm-rg350-87b3f2c6d8da238c0d98ce87b24b31416e97ef82.zip |
Added new flag for blocked characters and extra checking of dynamic support records versus static schedule entry records
svn-id: r25441
Diffstat (limited to 'engines/lure/res_struct.cpp')
-rw-r--r-- | engines/lure/res_struct.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index b9d994b798..d1178ae5ca 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -303,6 +303,7 @@ HotspotData::HotspotData(HotspotResource *rec) { // Initialise runtime fields actionCtr = 0; blockedState = BS_NONE; + blockedFlag = false; coveredFlag = VB_INITIAL; talkMessageId = 0; talkDestCharacterId = 0; @@ -340,6 +341,7 @@ void HotspotData::saveToStream(WriteStream *stream) { // Write out the runtime fields stream->writeUint16LE(actionCtr); stream->writeUint16LE(blockedState); + stream->writeByte((byte)blockedFlag); stream->writeByte((byte)coveredFlag); stream->writeUint16LE(talkMessageId); stream->writeUint16LE(talkDestCharacterId); @@ -378,6 +380,7 @@ void HotspotData::loadFromStream(ReadStream *stream) { // Read in the runtime fields actionCtr = stream->readUint16LE(); blockedState = (BlockedState)stream->readUint16LE(); + blockedFlag = stream->readByte() != 0; coveredFlag = (VariantBool)stream->readByte(); talkMessageId = stream->readUint16LE(); talkDestCharacterId = stream->readUint16LE(); @@ -705,7 +708,7 @@ CharacterScheduleEntry *CharacterScheduleEntry::next() { } uint16 CharacterScheduleEntry::id() { - return parent()->getId(this); + return (_parent == NULL) ? NULL : _parent->getId(this); } CharacterScheduleSet::CharacterScheduleSet(CharacterScheduleResource *rec, uint16 setId) { |