[Scummvm-cvs-logs] scummvm master -> 2473348cf05db29ce4d1d1da48cb199199cdc554

Strangerke Strangerke at scummvm.org
Mon Jun 6 07:31:49 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2473348cf0 GNAP: Initialize some more variables, reorder initialization


Commit: 2473348cf05db29ce4d1d1da48cb199199cdc554
    https://github.com/scummvm/scummvm/commit/2473348cf05db29ce4d1d1da48cb199199cdc554
Author: Strangerke (strangerke at scummvm.org)
Date: 2016-06-06T07:22:14+02:00

Commit Message:
GNAP: Initialize some more variables, reorder initialization

Changed paths:
    engines/gnap/gnap.cpp



diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 7681818..780955b 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -95,16 +95,45 @@ GnapEngine::GnapEngine(OSystem *syst, const ADGameDescription *gd) :
 	DebugMan.addDebugChannel(kDebugBasic, "basic", "Basic debug level");
 
 	Engine::syncSoundSettings();
+
+	_exe = nullptr;
+	_dat = nullptr;
+	_spriteCache = nullptr;
+	_soundCache = nullptr;
+	_sequenceCache = nullptr;
+	_gameSys = nullptr;
+	_soundMan = nullptr;
+	_debugger = nullptr;
+	_gnap = nullptr;
+	_plat = nullptr;
+	_font = nullptr;
 	_scene = nullptr;
 	_music = nullptr;
 	_tempThumbnail = nullptr;
+	_menuBackgroundSurface = nullptr;
+	_menuQuitQuerySprite = nullptr;
+	_largeSprite = nullptr;
+	_menuSaveLoadSprite = nullptr;
+	_menuSprite2 = nullptr;
+	_menuSprite1 = nullptr;
+	_spriteHandle = nullptr;
+	_cursorSprite = nullptr;
+	_pauseSprite = nullptr;
+	_backgroundSurface = nullptr;
 
 	_wasSavegameLoaded = false;
-	for (int i = 0; i < kMaxTimers; ++i)
-		_savedTimers[i] = _timers[i] = 0;
-
 	_isWaiting = false;
 	_sceneWaiting = false;
+	_menuDone = false;
+	_sceneDone = false;
+	_isLeavingScene = false;
+	_isStockDatLoaded = false;
+	_gameDone = false;
+	_isPaused = false;
+	_sceneSavegameLoaded = false;
+
+	for (int i = 0; i < kMaxTimers; ++i)
+		_savedTimers[i] = _timers[i] = 0;
 
 	_mousePos = Common::Point(0, 0);
 	_currGrabCursorX = _currGrabCursorY = 0;
@@ -112,15 +141,6 @@ GnapEngine::GnapEngine(OSystem *syst, const ADGameDescription *gd) :
 	_idleTimerIndex = -1;
 	_menuStatus = 0;
 	_menuSpritesIndex = -1;
-	_menuDone = false;
-	_menuBackgroundSurface = nullptr;
-	_menuQuitQuerySprite = nullptr;
-	_largeSprite = nullptr;
-	_menuSaveLoadSprite = nullptr;
-	_menuSprite2 = nullptr;
-	_menuSprite1 = nullptr;
-	_spriteHandle = nullptr;
-	_cursorSprite = nullptr;
 	_savegameIndex = -1;
 	_gridMinX = 0;
 	_gridMinY = 0;
@@ -140,13 +160,10 @@ GnapEngine::GnapEngine(OSystem *syst, const ADGameDescription *gd) :
 		_menuInventorySprites[i] = nullptr;
 
 	_newSceneNum = 0;
-	_sceneDone = false;
 	_inventory = 0;
 	_gameFlags = 0;
 	_hotspotsCount = 0;
 	_sceneClickedHotspot = -1;
-	_isLeavingScene = false;
-	_isStockDatLoaded = false;
 	_newCursorValue = 0;
 	_cursorValue = 0;
 	_verbCursor = 0;
@@ -163,6 +180,10 @@ GnapEngine::GnapEngine(OSystem *syst, const ADGameDescription *gd) :
 	_soundTimerIndexA = 0;
 	_soundTimerIndexB = 0;
 	_soundTimerIndexC = 0;
+	_loadGameSlot = -1;
+	_lastUpdateClock = 0;
+	_prevSceneNum = -1;
+	_currentSceneNum = -1;
 }
 
 GnapEngine::~GnapEngine() {
@@ -190,7 +211,6 @@ Common::Error GnapEngine::run() {
 	_cursorIndex = -1;
 	_verbCursor = 1;
 
-	_loadGameSlot = -1;
 	if (ConfMan.hasKey("save_slot"))
 		_loadGameSlot = ConfMan.getInt("save_slot");
 






More information about the Scummvm-git-logs mailing list