From a97a9507c9e9041b4f6c49350ee560118adb267c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 15 Nov 2017 19:32:03 -0500 Subject: XEEN: Fix uninitialized instance field warnings --- engines/xeen/font.cpp | 4 ++-- engines/xeen/map.cpp | 4 ++++ engines/xeen/scripts.cpp | 1 + engines/xeen/worldofxeen/worldofxeen.cpp | 1 + engines/xeen/xeen.cpp | 5 +++-- 5 files changed, 11 insertions(+), 4 deletions(-) (limited to 'engines/xeen') diff --git a/engines/xeen/font.cpp b/engines/xeen/font.cpp index ae2f37fa2d..cbb626970a 100644 --- a/engines/xeen/font.cpp +++ b/engines/xeen/font.cpp @@ -27,12 +27,12 @@ namespace Xeen { FontSurface::FontSurface() : XSurface(), _fontData(nullptr), _bgColor(DEFAULT_BG_COLOR), - _fontReduced(false),_fontJustify(JUSTIFY_NONE), _msgWraps(false) { + _fontReduced(false),_fontJustify(JUSTIFY_NONE), _msgWraps(false), _displayString(nullptr) { setTextColor(0); } FontSurface::FontSurface(int wv, int hv) : XSurface(wv, hv), _fontData(nullptr), _msgWraps(false), - _bgColor(DEFAULT_BG_COLOR), _fontReduced(false), _fontJustify(JUSTIFY_NONE) { + _bgColor(DEFAULT_BG_COLOR), _fontReduced(false), _fontJustify(JUSTIFY_NONE), _displayString(nullptr) { create(w, h); setTextColor(0); } diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index 37d7e03b9b..a459b56ae4 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -528,6 +528,9 @@ MazeDifficulties::MazeDifficulties() { _bashDoor = 0; _bashGrate = 0; _bashWall = 0; + _wallNoPass = -1; + _surfaceNoPass = -1; + _chance2Run = -1; } void MazeDifficulties::synchronize(Common::SeekableReadStream &s) { @@ -563,6 +566,7 @@ void MazeData::clear() { _trapDamage = 0; _wallKind = 0; _tavernTips = 0; + _mazeId = 0; } void MazeData::synchronize(Common::SeekableReadStream &s) { diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index cf5e706ea7..d1bd1f21f2 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -105,6 +105,7 @@ Scripts::Scripts(XeenEngine *vm) : _vm(vm) { _var50 = false; _redrawDone = false; _windowIndex = -1; + _event = nullptr; } int Scripts::checkEvents() { diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp index 0b19c607ff..c5f56573d3 100644 --- a/engines/xeen/worldofxeen/worldofxeen.cpp +++ b/engines/xeen/worldofxeen/worldofxeen.cpp @@ -33,6 +33,7 @@ WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *g : XeenEngine(syst, gameDesc), CloudsCutscenes(this), DarkSideCutscenes(this) { _seenDarkSideIntro = false; + _pendingAction = WOX_PLAY_GAME; } void WorldOfXeenEngine::outerGameLoop() { diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index e2dae4cbf8..d2b5cfa333 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -58,11 +58,12 @@ XeenEngine::XeenEngine(OSystem *syst, const XeenGameDescription *gameDesc) _spells = nullptr; _town = nullptr; _eventData = nullptr; - _quitMode = 0; _noDirectionSense = false; + _startupWindowActive = false; + _quitMode = 0; _mode = MODE_0; _endingScore = 0; - _startupWindowActive = false; + _loadSaveSlot = -1; g_vm = this; } -- cgit v1.2.3