diff options
author | Denis Kasak | 2009-07-16 18:31:15 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-16 18:31:15 +0000 |
commit | 652acfc4ca6e8b63fb7d02103fe5a07c2f4cd312 (patch) | |
tree | 1010c126f1508f7dfdbf2156351b03e2bcd6b371 /engines/draci/game.h | |
parent | e0317099899a2bb88e57bd1d8a1003c1cb180ee2 (diff) | |
download | scummvm-rg350-652acfc4ca6e8b63fb7d02103fe5a07c2f4cd312.tar.gz scummvm-rg350-652acfc4ca6e8b63fb7d02103fe5a07c2f4cd312.tar.bz2 scummvm-rg350-652acfc4ca6e8b63fb7d02103fe5a07c2f4cd312.zip |
* Added WalkingMaps class
* Added DraciEngine::walkingMapsArchive
* Made Game::loadRoom() read in the current walking map
svn-id: r42541
Diffstat (limited to 'engines/draci/game.h')
-rw-r--r-- | engines/draci/game.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/engines/draci/game.h b/engines/draci/game.h index d7d352ab6e..2b17002ef6 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -43,6 +43,39 @@ enum StructSizes { personSize = sizeof(uint16) * 2 + sizeof(byte) }; +class WalkingMap { + +public: + WalkingMap() { + _realWidth = 0; + _realHeight = 0; + _mapWidth = 0; + _mapHeight = 0; + _byteWidth = 0; + _data = NULL; + } + + void load(byte *data, uint length) { + Common::MemoryReadStream mapReader(data, length); + + _realWidth = mapReader.readUint16LE(); + _realHeight = mapReader.readUint16LE(); + _mapWidth = mapReader.readUint16LE(); + _mapHeight = mapReader.readUint16LE(); + _byteWidth = mapReader.readUint16LE(); + + // Set the data pointer to raw map data + _data = data + mapReader.pos(); + } + +private: + int _realWidth, _realHeight; + int _deltaX, _deltaY; + int _mapWidth, _mapHeight; + int _byteWidth; + byte *_data; +}; + struct GameObject { GameObject() : _title(NULL) {} @@ -84,7 +117,7 @@ struct Person { struct Room { byte _roomNum; byte _music; - byte _map; + WalkingMap _walkingMap; byte _palette; int _numMasks; int _init, _look, _use, _canUse; |