diff options
-rw-r--r-- | engines/adl/adl.h | 5 | ||||
-rw-r--r-- | engines/adl/adl_v2.cpp | 3 | ||||
-rw-r--r-- | engines/adl/hires1.cpp | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/engines/adl/adl.h b/engines/adl/adl.h index 4b644ccbf4..2b336c9e86 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -85,7 +85,8 @@ struct Room { Room() : description(0), picture(0), - curPicture(0) { + curPicture(0), + isFirstTime(true) { memset(connections, 0, sizeof(connections)); } @@ -153,6 +154,8 @@ struct Item { byte description; Common::Array<byte> roomPictures; bool isOnScreen; + + Item() : id(0), noun(0), region(0), room(0), picture(0), isLineArt(false), state(0), description(0), isOnScreen(false) { } }; struct Time { diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp index 8670bd08df..c3e82117d8 100644 --- a/engines/adl/adl_v2.cpp +++ b/engines/adl/adl_v2.cpp @@ -367,7 +367,8 @@ DataBlockPtr AdlEngine_v2::readDataBlockPtr(Common::ReadStream &f) const { void AdlEngine_v2::loadItems(Common::ReadStream &stream) { byte id; while ((id = stream.readByte()) != 0xff && !stream.eos() && !stream.err()) { - Item item = Item(); + Item item; + item.id = id; item.noun = stream.readByte(); item.room = stream.readByte(); diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp index 8bd49c75b4..e811b747c3 100644 --- a/engines/adl/hires1.cpp +++ b/engines/adl/hires1.cpp @@ -318,7 +318,8 @@ void HiRes1Engine::initGameState() { stream->seek(IDI_HR1_OFS_ITEMS); byte id; while ((id = stream->readByte()) != 0xff) { - Item item = Item(); + Item item; + item.id = id; item.noun = stream->readByte(); item.room = stream->readByte(); |