[Scummvm-cvs-logs] SF.net SVN: scummvm: [28550] scummvm/trunk/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Aug 12 13:16:43 CEST 2007
Revision: 28550
http://scummvm.svn.sourceforge.net/scummvm/?rev=28550&view=rev
Author: dreammaster
Date: 2007-08-12 04:16:43 -0700 (Sun, 12 Aug 2007)
Log Message:
-----------
Cleaned up structures for room exit joins
Modified Paths:
--------------
scummvm/trunk/engines/lure/res.cpp
scummvm/trunk/engines/lure/res_struct.cpp
scummvm/trunk/engines/lure/res_struct.h
Modified: scummvm/trunk/engines/lure/res.cpp
===================================================================
--- scummvm/trunk/engines/lure/res.cpp 2007-08-12 11:15:36 UTC (rev 28549)
+++ scummvm/trunk/engines/lure/res.cpp 2007-08-12 11:16:43 UTC (rev 28550)
@@ -341,7 +341,7 @@
for (i = _exitJoins.begin(); i != _exitJoins.end(); ++i) {
RoomExitJoinData *rec = *i;
- if ((rec->hotspot1Id == hotspotId) || (rec->hotspot2Id == hotspotId))
+ if ((rec->hotspots[0].hotspotId == hotspotId) || (rec->hotspots[1].hotspotId == hotspotId))
return rec;
}
Modified: scummvm/trunk/engines/lure/res_struct.cpp
===================================================================
--- scummvm/trunk/engines/lure/res_struct.cpp 2007-08-12 11:15:36 UTC (rev 28549)
+++ scummvm/trunk/engines/lure/res_struct.cpp 2007-08-12 11:16:43 UTC (rev 28550)
@@ -308,28 +308,29 @@
// 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 @@
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 @@
pauseCtr = 0;
actionHotspotId = 0;
talkOverride = 0;
+ talkGate = 0;
+ scriptHotspotId = 0;
}
void HotspotData::saveToStream(WriteStream *stream) {
Modified: scummvm/trunk/engines/lure/res_struct.h
===================================================================
--- scummvm/trunk/engines/lure/res_struct.h 2007-08-12 11:15:36 UTC (rev 28549)
+++ scummvm/trunk/engines/lure/res_struct.h 2007-08-12 11:16:43 UTC (rev 28550)
@@ -225,6 +225,18 @@
uint16 hotspotId;
} PACKED_STRUCT;
+enum SoundDescFlags {SF_IN_USE = 1, SF_RESTORE = 2};
+
+// In desc entry, numChannels: bits 0-1 # roland, bits 2-3 #adlib, bits 4-5 #internal
+
+struct SoundDescResource {
+ uint8 soundNumber;
+ uint8 channel;
+ uint8 numChannels;
+ uint8 flags;
+ uint8 volume;
+} PACKED_STRUCT;
+
#include "common/pack-end.h" // END STRUCT PACKING
/**
@@ -353,22 +365,21 @@
void loadFromStream(ReadStream *stream);
};
+struct RoomExitJoinStruct {
+ uint16 hotspotId;
+ byte currentFrame;
+ byte destFrame;
+ uint8 openSound;
+ uint8 closeSound;
+};
+
class RoomExitJoinData {
public:
RoomExitJoinData(RoomExitJoinResource *rec);
- uint16 hotspot1Id;
- byte h1CurrentFrame;
- byte h1DestFrame;
- uint8 h1OpenSound;
- uint8 h1CloseSound;
- uint16 hotspot2Id;
- byte h2CurrentFrame;
- byte h2DestFrame;
- uint8 h2OpenSound;
- uint8 h2CloseSound;
+ RoomExitJoinStruct hotspots[2];
+
byte blocked;
- uint32 unknown;
};
class RoomExitJoinList: public ManagedList<RoomExitJoinData *> {
@@ -797,7 +808,8 @@
BOTTLE_FILLED = 18,
TALK_INDEX = 19,
SACK_CUT = 20,
- ROOM_EXIT_ANIMATION = 76
+ ROOM_EXIT_ANIMATION = 76,
+ AREA_FLAG = 82
};
enum GameFlags {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list