diff options
author | johndoe123 | 2014-03-27 18:55:41 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 33d28deb690c79a6aca190c5b1bc998c39d95662 (patch) | |
tree | faf3167dacc8c56a63e455af79cb8d7b2f16e2aa /engines/illusions/graphics.cpp | |
parent | 22e898f7eb1bddc363900f4146696bf6e9d41e2f (diff) | |
download | scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.tar.gz scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.tar.bz2 scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.zip |
ILLUSIONS: Additions in various places
- Add NamedPoint and related code
- Remove some debug output
- Fix right mouse button input
- Add bubble code
- Add BBDOU inventory skeleton
Diffstat (limited to 'engines/illusions/graphics.cpp')
-rw-r--r-- | engines/illusions/graphics.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/illusions/graphics.cpp b/engines/illusions/graphics.cpp index 61130988bd..37fe4d547e 100644 --- a/engines/illusions/graphics.cpp +++ b/engines/illusions/graphics.cpp @@ -24,6 +24,8 @@ namespace Illusions { +// WidthHeight + void WidthHeight::load(Common::SeekableReadStream &stream) { _width = stream.readSint16LE(); _height = stream.readSint16LE(); @@ -32,6 +34,8 @@ void WidthHeight::load(Common::SeekableReadStream &stream) { _width, _height); } +// SurfInfo + void SurfInfo::load(Common::SeekableReadStream &stream) { _pixelSize = stream.readUint32LE(); _dimensions.load(stream); @@ -40,6 +44,34 @@ void SurfInfo::load(Common::SeekableReadStream &stream) { _pixelSize); } +// NamedPoint + +void NamedPoint::load(Common::SeekableReadStream &stream) { + _namedPointId = stream.readUint32LE(); + loadPoint(stream, _pt); +} + +// NamedPoints + +bool NamedPoints::findNamedPoint(uint32 namedPointId, Common::Point &pt) { + for (ItemsIterator it = _namedPoints.begin(); it != _namedPoints.end(); ++it) + if ((*it)._namedPointId == namedPointId) { + pt = (*it)._pt; + return true; + } + return false; +} + +void NamedPoints::load(uint count, Common::SeekableReadStream &stream) { + _namedPoints.reserve(count); + for (uint i = 0; i < count; ++i) { + NamedPoint namedPoint; + namedPoint.load(stream); + _namedPoints.push_back(namedPoint); + debug(0, "namedPoint(%08X, %d, %d)", namedPoint._namedPointId, namedPoint._pt.x, namedPoint._pt.y); + } +} + void loadPoint(Common::SeekableReadStream &stream, Common::Point &pt) { pt.x = stream.readSint16LE(); pt.y = stream.readSint16LE(); |