[Scummvm-cvs-logs] scummvm master -> 108e709b9bf78df2672f8a8bf0547a0966bfc246

dreammaster dreammaster at scummvm.org
Wed Jul 11 13:22:51 CEST 2012


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:
108e709b9b TSAGE: Fix for bug #3541354 - Nico shooting player after being tied up


Commit: 108e709b9bf78df2672f8a8bf0547a0966bfc246
    https://github.com/scummvm/scummvm/commit/108e709b9bf78df2672f8a8bf0547a0966bfc246
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-07-11T04:20:52-07:00

Commit Message:
TSAGE: Fix for bug #3541354 - Nico shooting player after being tied up

Changed paths:
    engines/tsage/blue_force/blueforce_scenes9.cpp
    engines/tsage/globals.cpp
    engines/tsage/globals.h



diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp
index 2178f31..1cb8191 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes9.cpp
@@ -794,12 +794,12 @@ bool Scene910::Lyle::startAction(CursorType action, Event &event) {
 	Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene;
 
 	if (action == CURSOR_USE) {
-		if (BF_GLOBALS._v4CEE2 == 0)
+		if (BF_GLOBALS._nico910State == 0)
 			return NamedObject::startAction(action, event);
 		else
 			return false;
 	} else if (action == CURSOR_TALK) {
-		if ((BF_GLOBALS._hiddenDoorStatus != 0) || (BF_GLOBALS._v4CEE2 != 0)) {
+		if ((BF_GLOBALS._hiddenDoorStatus != 0) || (BF_GLOBALS._nico910State != 0)) {
 			scene->_stripManager.start(9100 + _field90, &BF_GLOBALS._stripProxy);
 			if (_field90 < 1)
 				_field90++;
@@ -833,7 +833,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) {
 		return true;
 		break;
 	case CURSOR_TALK:
-		if (BF_GLOBALS._v4CEE2 >= 4)
+		if (BF_GLOBALS._nico910State >= 4)
 			return NamedObject::startAction(action, event);
 
 		if (BF_GLOBALS._v4CEE6 < 4)
@@ -847,8 +847,8 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) {
 		return true;
 		break;
 	case INV_COLT45:
-		if (BF_GLOBALS._v4CEE2 > 1) {
-			if (BF_GLOBALS._v4CEE2 != 4) {
+		if (BF_GLOBALS._nico910State > 1) {
+			if (BF_GLOBALS._nico910State != 4) {
 				if ((BF_GLOBALS.getFlag(gunDrawn)) && (BF_GLOBALS.getFlag(fGunLoaded)) && (BF_GLOBALS.getHasBullets())) {
 					if (scene->_field2DE0 == 0) {
 						BF_GLOBALS._player.disableControl();
@@ -880,7 +880,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) {
 		break;
 	case INV_BADGE:
 	case INV_ID:
-		if (BF_GLOBALS._v4CEE2 >= 4)
+		if (BF_GLOBALS._nico910State >= 4)
 			return NamedObject::startAction(action, event);
 
 		if (BF_GLOBALS._v4CEE6 < 4)
@@ -895,11 +895,12 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) {
 		return true;
 		break;
 	case INV_YELLOW_CORD:
-		if (BF_GLOBALS._v4CEE2 < 4) {
+		if (BF_GLOBALS._nico910State < 4) {
 			BF_GLOBALS._player.disableControl();
 			scene->_yellowCord.fixPriority(121);
 			scene->_sceneSubMode = 10;
 			scene->_sceneMode = 9123;
+			BF_GLOBALS._nico910State = 3;
 			if (BF_GLOBALS._player._visage == 1911)
 				scene->setAction(&scene->_sequenceManager1, scene, 9123, &BF_GLOBALS._player, NULL);
 			else
@@ -995,7 +996,7 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) {
 			return true;
 		} else {
 			BF_GLOBALS._player.disableControl();
-			if (BF_GLOBALS._v4CEE2 == 4) {
+			if (BF_GLOBALS._nico910State == 4) {
 				scene->_sceneSubMode = 11;
 				scene->_sceneMode = 9123;
 				if (BF_GLOBALS._player._visage == 1911)
@@ -1136,7 +1137,7 @@ bool Scene910::BreakerBox::startAction(CursorType action, Event &event) {
 			SceneItem::display2(910, 62);
 			return true;
 		} else if (scene->_sceneMode != 9120) {
-			if (BF_GLOBALS._v4CEE2 == 1) {
+			if (BF_GLOBALS._nico910State == 1) {
 				BF_GLOBALS._player.disableControl();
 				scene->_sceneMode = 9118;
 				scene->setAction(&scene->_sequenceManager1, scene, 9118, &BF_GLOBALS._player, &scene->_nico, NULL);
@@ -1291,7 +1292,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) {
 
 		switch (_state) {
 		case 1:
-			if (BF_GLOBALS._v4CEE2 < 1) {
+			if (BF_GLOBALS._nico910State < 1) {
 				if (_frame == 2) {
 					if (!BF_GLOBALS.getFlag(fGotPointsForClosingDoor)) {
 						T2_GLOBALS._uiElements.addScore(30);
@@ -1299,7 +1300,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) {
 					}
 					scene->_sceneMode = 0;
 					if (BF_GLOBALS._dayNumber == 5) {
-						if (BF_GLOBALS._v4CEE2 == 0) {
+						if (BF_GLOBALS._nico910State == 0) {
 							scene->_breakerBoxInset.remove();
 							// _objectList.draw();
 							BF_GLOBALS._player.disableControl();
@@ -1309,7 +1310,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) {
 							scene->_nico.postInit();
 							scene->_sceneMode = 9129;
 							scene->setAction(&scene->_sequenceManager1, scene, 9129, &BF_GLOBALS._player, &scene->_nico, NULL);
-						} else if (BF_GLOBALS._v4CEE2 == 2) {
+						} else if (BF_GLOBALS._nico910State == 2) {
 							scene->_breakerBoxInset.remove();
 							// _objectList.draw();
 							BF_GLOBALS._player.disableControl();
@@ -1612,7 +1613,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) {
 				SET_EXT_FGCOLOR, 13, LIST_END);
 			return true;
 		}
-		if (BF_GLOBALS._v4CEE2 == 3) {
+		if (BF_GLOBALS._nico910State == 3) {
 			SceneItem::display(910, 84, SET_WIDTH, 312,
 				SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4,
 				SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2,
@@ -1830,7 +1831,7 @@ bool Scene910::Generator::startAction(CursorType action, Event &event) {
 				SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2,
 				SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9,
 				SET_EXT_FGCOLOR, 13, LIST_END);
-		else if (BF_GLOBALS._v4CEE2 == 1) {
+		else if (BF_GLOBALS._nico910State == 1) {
 			BF_GLOBALS._player.disableControl();
 			scene->_sceneMode = 9118;
 			scene->setAction(&scene->_sequenceManager1, scene, 9118, &BF_GLOBALS._player, &scene->_nico, NULL);
@@ -1869,7 +1870,7 @@ bool Scene910::Item2::startAction(CursorType action, Event &event) {
 bool Scene910::Item3::startAction(CursorType action, Event &event) {
 	Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene;
 
-	if ((action == CURSOR_TALK) && (BF_GLOBALS._v4CEE2 == 4) && (BF_GLOBALS._v4CEE4 == 0)) {
+	if ((action == CURSOR_TALK) && (BF_GLOBALS._nico910State == 4) && (BF_GLOBALS._v4CEE4 == 0)) {
 		BF_GLOBALS._player.disableControl();
 		scene->_sceneMode = 15;
 		scene->_stripManager.start(9102, scene);
@@ -1907,7 +1908,7 @@ bool Scene910::Item15::startAction(CursorType action, Event &event) {
 bool Scene910::Item16::startAction(CursorType action, Event &event) {
 	Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene;
 
-	if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._v4CEE2 != 0))
+	if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._nico910State != 0))
 		return false;
 
 	if (BF_GLOBALS._player._visage == 1911) {
@@ -2016,7 +2017,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) {
 	if (BF_GLOBALS._dayNumber < 5)
 		_item17.setDetails(Rect(0, 149, 29, 167), 910, -1, -1, -1, 1, NULL);
 
-	if (BF_GLOBALS._v4CEE2 == 0)
+	if (BF_GLOBALS._nico910State == 0)
 		_item16.setDetails(Rect(265, 18, 319, 102), 910, -1, -1, -1, 1, NULL);
 
 	_breakerBox.setDetails(910, 6, -1, -1, 1, (SceneItem *)NULL);
@@ -2048,7 +2049,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) {
 		|| (BF_GLOBALS._sceneManager._previousScene == 190)
 		|| (BF_GLOBALS._sceneManager._previousScene == 300)) {
 		BF_GLOBALS._sceneManager._previousScene = 900;
-		BF_GLOBALS._v4CEE2 = 0;
+		BF_GLOBALS._nico910State = 0;
 		BF_GLOBALS._v4CEE4 = 0;
 	}
 
@@ -2142,7 +2143,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) {
 		_nico.setPosition(Common::Point(262, 124));
 		_nico.setStrip(6);
 		BF_GLOBALS._v4CEE6 = 0;
-		BF_GLOBALS._v4CEE2 = 1;
+		BF_GLOBALS._nico910State = 1;
 		_nico.setDetails(910, 63, 64, 67, 5, &_item4);
 		BF_GLOBALS._v4CECA = 2;
 		if (BF_GLOBALS._v4CECC == 0)
@@ -2157,7 +2158,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) {
 		BF_GLOBALS._player.disableControl();
 	}
 
-	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)){
+	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)){
 		_shadow.postInit();
 		_shadow.setAction(&_action2);
 	}
@@ -2297,7 +2298,7 @@ void Scene910::signal() {
 	case 13:
 		BF_GLOBALS._player.disableControl();
 		BF_GLOBALS._player.setAction(&_sequenceManager2, NULL, 9117, &_nico, NULL);
-		BF_GLOBALS._v4CEE2 = 2;
+		BF_GLOBALS._nico910State = 2;
 	// No break on purpose
 	case 15:
 		_stuart.postInit();
@@ -2314,7 +2315,7 @@ void Scene910::signal() {
 		_lyle._field90 = 1;
 		_sceneMode = 10;
 		addFader((const byte *)&black, 2, this);
-		BF_GLOBALS._v4CEE2 = 1;
+		BF_GLOBALS._nico910State = 1;
 		BF_GLOBALS._walkRegions.disableRegion(16);
 		BF_GLOBALS._walkRegions.disableRegion(14);
 		BF_GLOBALS._sceneItems.remove(&_item16);
@@ -2324,7 +2325,7 @@ void Scene910::signal() {
 		BF_GLOBALS._player._frame = 1;
 		if (_field2DE2 == 0) {
 			_field2DE2 = 1;
-			if (BF_GLOBALS._v4CEE2 == 4) {
+			if (BF_GLOBALS._nico910State == 4) {
 				_sceneMode = 9149;
 				setAction(&_sequenceManager1, this, 9149, &BF_GLOBALS._player, NULL);
 			} else {
@@ -2452,7 +2453,7 @@ void Scene910::signal() {
 		break;
 	case 9114:
 		_fakeWall.hide();
-		if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)) {
+		if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)) {
 			BF_GLOBALS._player.disableControl();
 			_nico.postInit();
 			_nico.setDetails(910, 63, 64, 65, 5, &_item4);
@@ -2496,7 +2497,7 @@ void Scene910::signal() {
 	case 9121:
 		_item3.setDetails(7, 910, 96, 60, 61, 3);
 		BF_GLOBALS._v4CEE4 = 2;
-		if (BF_GLOBALS._v4CEE2 == 4) {
+		if (BF_GLOBALS._nico910State == 4) {
 			_sceneMode = 20;
 			_stripManager.start(9115, this);
 		} else {
@@ -2527,7 +2528,7 @@ void Scene910::signal() {
 			setAction(&_sequenceManager1, this, 9111, &BF_GLOBALS._player, &_blackCord, NULL);
 			break;
 		case 5:
-			switch (BF_GLOBALS._v4CEE2 - 1) {
+			switch (BF_GLOBALS._nico910State - 1) {
 			case 0:
 				_sceneMode = 9118;
 				setAction(&_sequenceManager1, this, 9118, &BF_GLOBALS._player, &_nico, NULL);
@@ -2598,7 +2599,7 @@ void Scene910::signal() {
 		break;
 	case 9125:
 		BF_GLOBALS.setFlag(fBackupAt340);
-		BF_GLOBALS._v4CEE2 = 4;
+		BF_GLOBALS._nico910State = 4;
 		_stuart.postInit();
 		_nico.setDetails(910, 72, 73, 74, 3, (SceneItem *)NULL);
 		_stuart.setDetails(910, 66, 67, 68, 5, &_nico);
@@ -2645,7 +2646,7 @@ void Scene910::signal() {
 		}
 		_lyle.setAction(&_sequenceManager2, NULL, 9131, &_lyle, NULL);
 		BF_GLOBALS._walkRegions.enableRegion(16);
-		if (BF_GLOBALS._v4CEE2 == 4)
+		if (BF_GLOBALS._nico910State == 4)
 			BF_INVENTORY.setObjectScene(INV_YELLOW_CORD, 0);
 		else
 			BF_INVENTORY.setObjectScene(INV_HALF_YELLOW_CORD, 910);
@@ -2679,7 +2680,7 @@ void Scene910::signal() {
 		}
 		break;
 	case 9143:
-		if (BF_GLOBALS._v4CEE2 == 0) {
+		if (BF_GLOBALS._nico910State == 0) {
 			BF_GLOBALS._v51C44 = 1;
 			BF_GLOBALS._sceneManager.changeScene(920);
 		} else {
@@ -2730,7 +2731,7 @@ void Scene910::process(Event &event) {
 		if (_item17._bounds.contains(event.mousePos)) {
 				GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW);
 				BF_GLOBALS._events.setCursor(surface);
-		} else if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._v4CEE2 != 0)) {
+		} else if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._nico910State != 0)) {
 			CursorType cursorId = BF_GLOBALS._events.getCursor();
 			BF_GLOBALS._events.setCursor(cursorId);
 		} else if (!_item16._bounds.contains(event.mousePos)) {
@@ -2755,7 +2756,7 @@ void Scene910::process(Event &event) {
 			_sceneMode = 9123;
 			setAction(&_sequenceManager1, this, 9123, &BF_GLOBALS._player, NULL);
 			event.handled = true;
-		} else if (BF_GLOBALS._v4CEE2 <= 1) {
+		} else if (BF_GLOBALS._nico910State <= 1) {
 			if (BF_GLOBALS.getFlag(fCanDrawGun)) {
 				BF_GLOBALS._player.addMover(NULL);
 				BF_GLOBALS._player.disableControl();
@@ -2776,7 +2777,7 @@ void Scene910::process(Event &event) {
 		event.handled = true;
 		break;
 	case CURSOR_WALK:
-		if (BF_GLOBALS._v4CEE2 == 1) {
+		if (BF_GLOBALS._nico910State == 1) {
 			BF_GLOBALS._player.disableControl();
 			if (BF_GLOBALS._player._visage == 1911) {
 				BF_GLOBALS._player.disableControl();
@@ -2826,7 +2827,7 @@ void Scene910::dispatch() {
 			_sceneSubMode = 3;
 			_sceneMode = 9123;
 			setAction(&_sequenceManager1, this, 9123, &BF_GLOBALS._player, NULL);
-		} else if (BF_GLOBALS._v4CEE2 == 0) {
+		} else if (BF_GLOBALS._nico910State == 0) {
 			_sceneMode = 9143;
 			setAction(&_sequenceManager1, this, 9143, &BF_GLOBALS._player, NULL);
 		} else {
@@ -2840,7 +2841,7 @@ void Scene910::dispatch() {
 		}
 	}
 
-	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._player._position.x > 250) && (_sceneMode != 9135) && (_sceneMode != 11) && (BF_GLOBALS._hiddenDoorStatus != 0) && (BF_GLOBALS._v4CEE2 == 0)) {
+	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._player._position.x > 250) && (_sceneMode != 9135) && (_sceneMode != 11) && (BF_GLOBALS._hiddenDoorStatus != 0) && (BF_GLOBALS._nico910State == 0)) {
 		BF_GLOBALS._player.disableControl();
 		_shadow.remove();
 		_nico.remove();
@@ -2853,7 +2854,7 @@ void Scene910::dispatch() {
 }
 
 void Scene910::checkGun() {
-	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0) && (BF_GLOBALS._hiddenDoorStatus != 0))
+	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0) && (BF_GLOBALS._hiddenDoorStatus != 0))
 		SceneItem::display(910, 70, SET_WIDTH, 312,
 				SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4,
 				SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2,
@@ -2900,7 +2901,7 @@ void Scene910::closeHiddenDoor() {
 			setAction(&_sequenceManager1, this, 9115, &_fakeWall, &_object5, NULL);
 	}
 
-	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)) {
+	if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)) {
 		// _objectList.draw();
 		if (BF_GLOBALS._sceneObjects->contains(&_breakerBoxInset))
 			_breakerBoxInset.remove();
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 59eb59b..de94632 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -247,7 +247,7 @@ void BlueForceGlobals::synchronize(Serializer &s) {
 	for (int i = 0; i < 18; i++)
 		s.syncAsByte(_breakerBoxStatusArr[i]);
 	s.syncAsSint16LE(_hiddenDoorStatus);
-	s.syncAsSint16LE(_v4CEE2);
+	s.syncAsSint16LE(_nico910State);
 	s.syncAsSint16LE(_v4CEE4);
 	s.syncAsSint16LE(_v4CEE6);
 	s.syncAsSint16LE(_v4CEE8);
@@ -320,7 +320,7 @@ void BlueForceGlobals::reset() {
 	_breakerBoxStatusArr[16] = 3;
 	_breakerBoxStatusArr[17] = 0;
 	_hiddenDoorStatus = 0;
-	_v4CEE2 = 0;
+	_nico910State = 0;
 	_v4CEE4 = 0;
 	_v4CEE6 = 0;
 	_v4CEE8 = 0;
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 45226c9..d190b6a 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -200,7 +200,7 @@ public:
 	int _v4CECC;
 	int8 _breakerBoxStatusArr[18];
 	int _hiddenDoorStatus;
-	int _v4CEE2;
+	int _nico910State;
 	int _v4CEE4;
 	int _v4CEE6;
 	int _v4CEE8;






More information about the Scummvm-git-logs mailing list