aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-09-20 23:14:30 +0200
committerStrangerke2016-09-20 23:14:30 +0200
commit2458fd090cd9d937e0d3bc8c042b6ebad1dab6c0 (patch)
tree2f825d1b0d40ec882da5e14f9fbcf485ebe26f2d /engines
parent8ffa6483f45960c2c0d919aa7c11f06a9c79f3b0 (diff)
downloadscummvm-rg350-2458fd090cd9d937e0d3bc8c042b6ebad1dab6c0.tar.gz
scummvm-rg350-2458fd090cd9d937e0d3bc8c042b6ebad1dab6c0.tar.bz2
scummvm-rg350-2458fd090cd9d937e0d3bc8c042b6ebad1dab6c0.zip
DM: Initialize some variables
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/dm.cpp1
-rw-r--r--engines/dm/dungeonman.cpp10
-rw-r--r--engines/dm/gfx.cpp7
-rw-r--r--engines/dm/gfx.h6
4 files changed, 20 insertions, 4 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 4029c5ea9c..cb2a2f1053 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -165,6 +165,7 @@ DMEngine::DMEngine(OSystem *syst, const DMADGameDescription *desc) : Engine(syst
_saveThumbnail = nullptr;
_canLoadFromGMM = false;
_loadSaveSlotAtRuntime = -1;
+ _dialog = nullptr;
}
DMEngine::~DMEngine() {
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 796413a48b..9ee86eda90 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -443,10 +443,20 @@ DungeonMan::DungeonMan(DMEngine *dmEngine) : _vm(dmEngine) {
_isFacingViAltar = false;
_isFacingFountain = false;
_squareAheadElement = (ElementType)0;
+
+ _dungeonFileHeader._ornamentRandomSeed = 0;
+ _dungeonFileHeader._rawMapDataSize = 0;
+ _dungeonFileHeader._mapCount = 0;
+ _dungeonFileHeader._textDataWordCount = 0;
+ _dungeonFileHeader._partyStartLocation = 0;
+ _dungeonFileHeader._squareFirstThingCount = 0;
+
for (uint16 i = 0; i < 5; ++i)
_pileTopObject[i] = Thing(0);
for (uint16 i = 0; i < 2; ++i)
_currMapDoorInfo[i].resetToZero();
+ for (uint16 i = 0; i < 16; i++)
+ _dungeonFileHeader._thingCounts[i] = 0;
setupConstants();
}
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index a629c56cd9..c382342094 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -42,6 +42,13 @@
namespace DM {
+FieldAspect::FieldAspect(uint16 native, uint16 base, uint16 transparent, byte mask, uint16 byteWidth, uint16 height, uint16 xPos, uint16 bitplane)
+ : _nativeBitmapRelativeIndex(native), _baseStartUnitIndex(base), _transparentColor(transparent), _mask(mask),
+ _byteWidth(byteWidth), _height(height), _xPos(xPos), _bitplaneWordCount(bitplane) {}
+
+FieldAspect::FieldAspect() : _nativeBitmapRelativeIndex(0), _baseStartUnitIndex(0), _transparentColor(0),
+ _mask(0), _byteWidth(0), _height(0), _xPos(0), _bitplaneWordCount(0) {}
+
DoorFrames::DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3,
Frame f3_1, Frame f3_2, Frame f3_3,
Frame f4_1, Frame f4_2, Frame f4_3) {
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index 9df6ad1c3a..ff44f951d5 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -418,10 +418,8 @@ public:
uint16 _height;
uint16 _xPos;
uint16 _bitplaneWordCount;
- FieldAspect(uint16 native, uint16 base, uint16 transparent, byte mask, uint16 byteWidth, uint16 height, uint16 xPos, uint16 bitplane)
- : _nativeBitmapRelativeIndex(native), _baseStartUnitIndex(base), _transparentColor(transparent), _mask(mask),
- _byteWidth(byteWidth), _height(height), _xPos(xPos), _bitplaneWordCount(bitplane) {}
- FieldAspect() {}
+ FieldAspect(uint16 native, uint16 base, uint16 transparent, byte mask, uint16 byteWidth, uint16 height, uint16 xPos, uint16 bitplane);
+ FieldAspect();
}; // @ FIELD_ASPECT
class CreatureAspect {