aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-03-02 20:43:43 +0100
committerStrangerke2014-03-02 20:44:25 +0100
commit2be4c69939215ed6d2e2cac17eb2d9e341dea317 (patch)
treebb46f7e7a2566a18deaec3a64c65f5dab1e3112c /engines
parentbd66fc0e1a3252d9e1c86c59abafe5ad066d4b5e (diff)
downloadscummvm-rg350-2be4c69939215ed6d2e2cac17eb2d9e341dea317.tar.gz
scummvm-rg350-2be4c69939215ed6d2e2cac17eb2d9e341dea317.tar.bz2
scummvm-rg350-2be4c69939215ed6d2e2cac17eb2d9e341dea317.zip
CGE: Fix some uninitialized variables
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/cge.cpp29
-rw-r--r--engines/cge/sound.cpp1
2 files changed, 29 insertions, 1 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index e8ab3c262b..a409d765b4 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -53,9 +53,36 @@ CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription)
_startupMode = 1;
_oldLev = 0;
_pocPtr = 0;
- _bitmapPalette = NULL;
_quitFlag = false;
_showBoundariesFl = false;
+ _startGameSlot = -1;
+ _recentStep = -2;
+ _bitmapPalette = nullptr;
+ _pocLight = nullptr;
+ _keyboard = nullptr;
+ _mouse = nullptr;
+ _sprite = nullptr;
+ _miniScene = nullptr;
+ _shadow = nullptr;
+ _horzLine = nullptr;
+ _infoLine = nullptr;
+ _debugLine = nullptr;
+ _sceneLight = nullptr;
+ _commandHandler = nullptr;
+ _commandHandlerTurbo = nullptr;
+ _eventManager = nullptr;
+ _fx = nullptr;
+ _sound = nullptr;
+ _resman = nullptr;
+ for (int i = 0; i < 8; i++)
+ _pocket[i] = nullptr;
+ _hero = nullptr;
+ _text = nullptr;
+ _talk = nullptr;
+ _midiPlayer = nullptr;
+ _miniShp = nullptr;
+ _miniShpList = nullptr;
+ _console = nullptr;
}
void CGEEngine::initSceneValues() {
diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp
index cc5e97b475..370b768bca 100644
--- a/engines/cge/sound.cpp
+++ b/engines/cge/sound.cpp
@@ -228,6 +228,7 @@ MusicPlayer::MusicPlayer(CGEEngine *vm) : _vm(vm) {
_driver->setTimerCallback(this, &timerCallback);
}
+ _dataSize = -1;
}
MusicPlayer::~MusicPlayer() {