[Scummvm-cvs-logs] scummvm master -> 2be4c69939215ed6d2e2cac17eb2d9e341dea317

Strangerke Strangerke at scummvm.org
Sun Mar 2 20:46:35 CET 2014


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

Summary:
3c41d9b9cb CGE: Add a safeguard in pocFul
bc58a42574 CGE: Move hero shadow check inside hero check in sceneUp()
bd66fc0e1a CGE: Add a comment about an intended fall-through
2be4c69939 CGE: Fix some uninitialized variables


Commit: 3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320
    https://github.com/scummvm/scummvm/commit/3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-02T11:44:21-08:00

Commit Message:
CGE: Add a safeguard in pocFul

Changed paths:
    engines/cge/snail.cpp



diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 942a9c4..1a6ca07 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -658,6 +658,9 @@ void CGEEngine::selectPocket(int n) {
 void CGEEngine::pocFul() {
 	debugC(1, kCGEDebugEngine, "CGEEngine::pocFul()");
 
+	if (!_hero)
+		error("pocFul - Unexpected null _hero");
+
 	_hero->park();
 	_commandHandler->addCommand(kCmdWait, -1, -1, _hero);
 	_commandHandler->addCommand(kCmdSeq, -1, kSeqPocketFull, _hero);


Commit: bc58a42574c9f5ea0963f9f4883630ca0e23152a
    https://github.com/scummvm/scummvm/commit/bc58a42574c9f5ea0963f9f4883630ca0e23152a
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-02T11:44:22-08:00

Commit Message:
CGE: Move hero shadow check inside hero check in sceneUp()

Changed paths:
    engines/cge/cge_main.cpp



diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 6440058..260fd89 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -656,14 +656,15 @@ void CGEEngine::sceneUp() {
 
 	_vga->copyPage(0, 1);
 	selectPocket(-1);
-	if (_hero)
+	if (_hero) {
 		_vga->_showQ->insert(_vga->_showQ->remove(_hero));
 
-	if (_shadow) {
-		_vga->_showQ->remove(_shadow);
-		_shadow->makeXlat(_vga->glass(_vga->_sysPal, 204, 204, 204));
-		_vga->_showQ->insert(_shadow, _hero);
-		_shadow->_z = _hero->_z;
+		if (_shadow) {
+			_vga->_showQ->remove(_shadow);
+			_shadow->makeXlat(_vga->glass(_vga->_sysPal, 204, 204, 204));
+			_vga->_showQ->insert(_shadow, _hero);
+			_shadow->_z = _hero->_z;
+		}
 	}
 	feedSnail(_vga->_showQ->locate(BakRef + 999), kTake);
 	_vga->show();


Commit: bd66fc0e1a3252d9e1c86c59abafe5ad066d4b5e
    https://github.com/scummvm/scummvm/commit/bd66fc0e1a3252d9e1c86c59abafe5ad066d4b5e
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-02T11:44:23-08:00

Commit Message:
CGE: Add a comment about an intended fall-through

Changed paths:
    engines/cge/bitmap.cpp



diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 04a5f5d..536db5e 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -293,6 +293,7 @@ bool Bitmap::solidAt(int16 x, int16 y) {
 		switch (t) {
 		case kBmpEOI:
 			r--;
+			// No break on purpose
 		case kBmpSKP:
 			w = 0;
 			break;


Commit: 2be4c69939215ed6d2e2cac17eb2d9e341dea317
    https://github.com/scummvm/scummvm/commit/2be4c69939215ed6d2e2cac17eb2d9e341dea317
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-02T11:44:25-08:00

Commit Message:
CGE: Fix some uninitialized variables

Changed paths:
    engines/cge/cge.cpp
    engines/cge/sound.cpp



diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index e8ab3c2..a409d76 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 cc5e97b..370b768 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() {






More information about the Scummvm-git-logs mailing list