[Scummvm-cvs-logs] scummvm master -> a08af2952e57098feb64621cea805be2b9bf6a18

sev- sev at scummvm.org
Wed Oct 30 08:18:57 CET 2013


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

Summary:
cf6771c5d5 SWORD1: Fix unitialized variables. CID 1002989
a08af2952e SWORD1: Fix unitialized variables. CID 1002991


Commit: cf6771c5d541bfdd85156600a251f206da3fa39a
    https://github.com/scummvm/scummvm/commit/cf6771c5d541bfdd85156600a251f206da3fa39a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-30T00:14:06-07:00

Commit Message:
SWORD1: Fix unitialized variables. CID 1002989

Changed paths:
    engines/sword1/sword1.cpp



diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 2d54527..5738431 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -67,6 +67,17 @@ SwordEngine::SwordEngine(OSystem *syst)
 	SearchMan.addSubDirectoryMatching(gameDataDir, "italian"); // PSX Demo
 
 	_console = new SwordConsole(this);
+
+	_mouseState = 0;
+	_resMan = 0;
+	_objectMan = 0;
+	_screen = 0;
+	_mouse = 0;
+	_logic = 0;
+	_sound = 0;
+	_menu = 0;
+	_music = 0;
+	_control = 0;
 }
 
 SwordEngine::~SwordEngine() {


Commit: a08af2952e57098feb64621cea805be2b9bf6a18
    https://github.com/scummvm/scummvm/commit/a08af2952e57098feb64621cea805be2b9bf6a18
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-30T00:18:14-07:00

Commit Message:
SWORD1: Fix unitialized variables. CID 1002991

Changed paths:
    engines/sword1/screen.cpp



diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index ae128b8..76957e0 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -57,6 +57,30 @@ Screen::Screen(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan) {
 	_psxCache.extPlxCache = NULL;
 	_oldScrollX = 0;
 	_oldScrollY = 0;
+
+	_textMan = 0;
+
+	for (int i = 0; i < 4; i++)
+		_layerGrid[i] = 0;
+
+	for (int i = 0; i < 4; i++)
+		_layerBlocks[i] = 0;
+
+	_parallax[0] = 0;
+	_parallax[1] = 0;
+
+	_fullRefresh = 0;
+
+	for (int i = 0; i < MAX_SORT; i++) {
+		_sortList[i].id = 0;
+		_sortList[i].y = 0;
+	}
+	_scrnSizeX = 0;
+	_scrnSizeY = 0;
+	_gridSizeX = 0;
+	_gridSizeY = 0;
+	_fadingDirection = 0;
+	_isBlack = 0;
 }
 
 Screen::~Screen() {






More information about the Scummvm-git-logs mailing list