diff options
| author | Paul Gilbert | 2007-08-12 11:16:43 +0000 | 
|---|---|---|
| committer | Paul Gilbert | 2007-08-12 11:16:43 +0000 | 
| commit | 9a9d0cb0a5fbbce0f59d0b7587067f9e08cd98e2 (patch) | |
| tree | 87e3e9d0a35e0e6a79aa8a6ebc7f097ab0a04fa2 /engines/lure/res_struct.cpp | |
| parent | 4cf99284a7bee82fe9d945aa21592ad93a4d0c73 (diff) | |
| download | scummvm-rg350-9a9d0cb0a5fbbce0f59d0b7587067f9e08cd98e2.tar.gz scummvm-rg350-9a9d0cb0a5fbbce0f59d0b7587067f9e08cd98e2.tar.bz2 scummvm-rg350-9a9d0cb0a5fbbce0f59d0b7587067f9e08cd98e2.zip  | |
Cleaned up structures for room exit joins
svn-id: r28550
Diffstat (limited to 'engines/lure/res_struct.cpp')
| -rw-r--r-- | engines/lure/res_struct.cpp | 46 | 
1 files changed, 25 insertions, 21 deletions
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index 12cf61a58a..3db92d9c56 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -308,28 +308,29 @@ void RoomDataList::loadFromStream(ReadStream *stream) {  // Room exit joins class  RoomExitJoinData::RoomExitJoinData(RoomExitJoinResource *rec) { -	hotspot1Id = FROM_LE_16(rec->hotspot1Id); -	h1CurrentFrame = rec->h1CurrentFrame; -	h1DestFrame = rec->h1DestFrame; -	h1OpenSound = rec->h1OpenSound; -	h1CloseSound = rec->h1CloseSound; -	hotspot2Id = FROM_LE_16(rec->hotspot2Id); -	h2CurrentFrame = rec->h2CurrentFrame; -	h2DestFrame = rec->h2DestFrame; -	h2OpenSound = rec->h2OpenSound; -	h2CloseSound = rec->h2CloseSound; +	hotspots[0].hotspotId = FROM_LE_16(rec->hotspot1Id); +	hotspots[0].currentFrame = rec->h1CurrentFrame; +	hotspots[0].destFrame = rec->h1DestFrame; +	hotspots[0].openSound = rec->h1OpenSound; +	hotspots[0].closeSound = rec->h1CloseSound; +	hotspots[1].hotspotId = FROM_LE_16(rec->hotspot2Id); +	hotspots[1].currentFrame = rec->h2CurrentFrame; +	hotspots[1].destFrame = rec->h2DestFrame; +	hotspots[1].openSound = rec->h2OpenSound; +	hotspots[1].closeSound = rec->h2CloseSound;  	blocked = rec->blocked;  }  void RoomExitJoinList::saveToStream(WriteStream *stream) {  	for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {  		RoomExitJoinData *rec = *i; -		stream->writeUint16LE(rec->hotspot1Id); -		stream->writeUint16LE(rec->hotspot2Id); -		stream->writeByte(rec->h1CurrentFrame); -		stream->writeByte(rec->h1DestFrame); -		stream->writeByte(rec->h2CurrentFrame); -		stream->writeByte(rec->h2DestFrame); + +		stream->writeUint16LE(rec->hotspots[0].hotspotId); +		stream->writeUint16LE(rec->hotspots[1].hotspotId); +		stream->writeByte(rec->hotspots[0].currentFrame); +		stream->writeByte(rec->hotspots[0].destFrame); +		stream->writeByte(rec->hotspots[1].currentFrame); +		stream->writeByte(rec->hotspots[1].destFrame);  		stream->writeByte(rec->blocked);  	} @@ -345,13 +346,14 @@ void RoomExitJoinList::loadFromStream(ReadStream *stream) {  		if (hotspot1Id == 0xffff) error("Invalid room exit join list");  		uint16 hotspot2Id = stream->readUint16LE(); -		if ((rec->hotspot1Id != hotspot1Id) || (rec->hotspot2Id != hotspot2Id)) +		if ((rec->hotspots[0].hotspotId != hotspot1Id) ||  +			(rec->hotspots[1].hotspotId != hotspot2Id))  			break; -		rec->h1CurrentFrame = stream->readByte(); -		rec->h1DestFrame = stream->readByte(); -		rec->h2CurrentFrame = stream->readByte(); -		rec->h2DestFrame = stream->readByte(); +		rec->hotspots[0].currentFrame = stream->readByte(); +		rec->hotspots[0].destFrame = stream->readByte(); +		rec->hotspots[1].currentFrame = stream->readByte(); +		rec->hotspots[1].destFrame = stream->readByte();  		rec->blocked = stream->readByte();  	} @@ -429,6 +431,8 @@ HotspotData::HotspotData(HotspotResource *rec) {  	pauseCtr = 0;  	actionHotspotId = 0;  	talkOverride = 0; +	talkGate = 0; +	scriptHotspotId = 0;  }  void HotspotData::saveToStream(WriteStream *stream) {  | 
