aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2016-12-23 23:47:25 +0100
committerWalter van Niftrik2016-12-23 23:47:25 +0100
commit3c07d75825bb0907987210accd9e2a7f4c00176b (patch)
tree398972d51af039fe4452748aed587584c425e54f
parent0dc67a0a6e37446ed63e777712d6d239b4090d11 (diff)
downloadscummvm-rg350-3c07d75825bb0907987210accd9e2a7f4c00176b.tar.gz
scummvm-rg350-3c07d75825bb0907987210accd9e2a7f4c00176b.tar.bz2
scummvm-rg350-3c07d75825bb0907987210accd9e2a7f4c00176b.zip
ADL: Fix warnings
-rw-r--r--engines/adl/adl.h5
-rw-r--r--engines/adl/adl_v2.cpp3
-rw-r--r--engines/adl/hires1.cpp3
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();