From df4daf954fe1bc379094b4a699267537f1f46916 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Wed, 16 Mar 2016 17:23:52 +0100 Subject: ADL: Load hires2 items --- engines/adl/hires2.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'engines/adl/hires2.cpp') diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 8b12746641..8dba9a6481 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -120,6 +120,32 @@ void HiRes2Engine::initState() { f.readByte(); // always 1, possibly disk? _state.rooms.push_back(room); } + + _state.items.clear(); + f.seek(IDI_HR2_OFS_ITEMS); + while (f.readByte() != 0xff) { + Item item; + item.noun = f.readByte(); + item.room = f.readByte(); + item.picture = f.readByte(); + item.isLineArt = f.readByte(); // Is this still used in this way? + item.position.x = f.readByte(); + item.position.y = f.readByte(); + item.state = f.readByte(); + item.description = f.readByte(); + + f.readByte(); + + byte size = f.readByte(); + + for (uint i = 0; i < size; ++i) + item.roomPictures.push_back(f.readByte()); + + _state.items.push_back(item); + + // One unknown extra byte compared to hires1 + f.readByte(); + } } void HiRes2Engine::loadRoom(byte roomNr) { -- cgit v1.2.3