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

Strangerke Strangerke at scummvm.org
Wed Nov 2 01:44:17 CET 2011


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:
e38921855c TSAGE: Blue Force - City Hall (385): Fix Jim action, fix bug when giving him blue prints, change type of _jimFlag


Commit: e38921855cfb88b36c85eb38f18323b476478e78
    https://github.com/scummvm/scummvm/commit/e38921855cfb88b36c85eb38f18323b476478e78
Author: Strangerke (strangerke at scummvm.org)
Date: 2011-11-01T17:43:42-07:00

Commit Message:
TSAGE: Blue Force - City Hall (385): Fix Jim action, fix bug when giving him blue prints, change type of _jimFlag

Changed paths:
    engines/tsage/blue_force/blueforce_scenes3.cpp
    engines/tsage/blue_force/blueforce_scenes3.h



diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index 3d42304..a32bd4d 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -5317,8 +5317,7 @@ bool Scene385::Door::startAction(CursorType action, Event &event) {
 bool Scene385::Jim::startAction(CursorType action, Event &event) {
 	Scene385 *scene = (Scene385 *)BF_GLOBALS._sceneManager._scene;
 
-	switch (action) {
-	case CURSOR_TALK:
+	if (action == CURSOR_TALK) {
 		if (scene->_jimFlag) {
 			scene->_talkAction = 3867;
 			scene->setAction(&scene->_action1);
@@ -5342,24 +5341,24 @@ bool Scene385::Jim::startAction(CursorType action, Event &event) {
 				break;
 			}
 
-			scene->_jimFlag = 1;
+			scene->_jimFlag = true;
 			scene->setAction(&scene->_action1);
 		}
 		return true;
-	case INV_PRINT_OUT:
+	} else if (action == INV_PRINT_OUT) {
 		if (!BF_GLOBALS.getFlag(fGotPointsForMCard)) {
 			T2_GLOBALS._uiElements.addScore(30);
-			BF_GLOBALS.getFlag(fGotPointsForMCard);
+			BF_GLOBALS.setFlag(fGotPointsForMCard);
 
 			scene->setAction(&scene->_action2);
 			return true;
-		}
-		break;
-	default:
-		break;
-	}
-
-	return NamedObject::startAction(action, event);
+		} else
+			return false;
+	} else if (action < CURSOR_WALK)
+		// Any other inventory item
+		return false;
+	else 
+		return NamedObject::startAction(action, event);
 }
 
 bool Scene385::Dezi::startAction(CursorType action, Event &event) {
@@ -5430,7 +5429,8 @@ bool Scene385::Exit::startAction(CursorType action, Event &event) {
 
 
 Scene385::Scene385(): SceneExt() {
-	_talkAction = _jimFlag = 0;
+	_talkAction = 0;
+	_jimFlag = false;
 }
 
 void Scene385::synchronize(Serializer &s) {
diff --git a/engines/tsage/blue_force/blueforce_scenes3.h b/engines/tsage/blue_force/blueforce_scenes3.h
index 2cff4d5..de53db8 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.h
+++ b/engines/tsage/blue_force/blueforce_scenes3.h
@@ -815,7 +815,8 @@ public:
 	SpeakerJake385 _jake385Speaker;
 	NamedHotspot _item1, _item2, _item3, _item4, _item5;
 	Exit _exit;
-	int _talkAction, _jimFlag;
+	int _talkAction;
+	bool _jimFlag;
 
 	Scene385();
 	virtual void synchronize(Serializer &s);






More information about the Scummvm-git-logs mailing list