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

dreammaster dreammaster at scummvm.org
Thu Sep 26 03:38:51 CEST 2013


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:
abfae92fa6 TSAGE: Renaming and bugfixes for R2R confrontation


Commit: abfae92fa61c504c5e26f63f7f59d9643e2bfa95
    https://github.com/scummvm/scummvm/commit/abfae92fa61c504c5e26f63f7f59d9643e2bfa95
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-09-25T18:36:12-07:00

Commit Message:
TSAGE: Renaming and bugfixes for R2R confrontation

Changed paths:
    engines/tsage/core.cpp
    engines/tsage/ringworld2/ringworld2_scenes3.cpp
    engines/tsage/ringworld2/ringworld2_scenes3.h
    engines/tsage/ringworld2/ringworld2_speakers.cpp



diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 029f9b5..b0220b5 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2370,12 +2370,17 @@ void SceneObject::animate(AnimateMode animMode, ...) {
 
 	case ANIM_MODE_8:
 	case ANIM_MODE_9:
-		_field68 = va_arg(va, int);
-		_endAction = va_arg(va, Action *);
-		_frameChange = 1;
-		_endFrame = getFrameCount();
-		if (_frame == _endFrame)
-			setFrame(getNewFrame());
+		if (_animateMode == ANIM_MODE_9 && g_vm->getGameID() == GType_Ringworld2) {
+			_frameChange = -1;
+			_field2E = _position;
+		} else {
+			_field68 = va_arg(va, int);
+			_endAction = va_arg(va, Action *);
+			_frameChange = 1;
+			_endFrame = getFrameCount();
+			if (_frame == _endFrame)
+				setFrame(getNewFrame());
+		}
 		break;
 	}
 	va_end(va);
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 2188a48..d60b286 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -2680,9 +2680,10 @@ void Scene3395::signal() {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 3400 -
+ * Scene 3400 - Confrontation
  *
  *--------------------------------------------------------------------------*/
+
 Scene3400::Scene3400() {
 	_field157C = 0;
 }
@@ -2722,16 +2723,16 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
 	_actor7.fixPriority(89);
 
 	R2_GLOBALS._player.postInit();
-	if (R2_GLOBALS._player._characterIndex == 2)
+	if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
 		R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
 	else
 		R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
 	R2_GLOBALS._player.changeZoom(-1);
 	R2_GLOBALS._player.setPosition(Common::Point(239, 64));
 
-	if (R2_GLOBALS._player._characterIndex == 2)
+	if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
 		R2_GLOBALS._player.setup(20, 5, 1);
-	else if (R2_GLOBALS._player._characterIndex == 3)
+	else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
 		R2_GLOBALS._player.setup(30, 5, 1);
 	else
 		R2_GLOBALS._player.setup(10, 5, 1);
@@ -2739,42 +2740,42 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
 	R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
 	R2_GLOBALS._player.disableControl();
 
-	_actor1.postInit();
-	if (R2_GLOBALS._player._characterIndex == 2) {
-		_actor1._numFrames = 10;
-		_actor1._moveDiff = Common::Point(3, 2);
+	_companion1.postInit();
+	if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
+		_companion1._numFrames = 10;
+		_companion1._moveDiff = Common::Point(3, 2);
 	} else {
-		_actor1._numFrames = 7;
-		_actor1._moveDiff = Common::Point(5, 3);
+		_companion1._numFrames = 7;
+		_companion1._moveDiff = Common::Point(5, 3);
 	}
-	_actor1.changeZoom(-1);
-	_actor1._effect = 1;
-	_actor1.setPosition(Common::Point(247, 63));
+	_companion1.changeZoom(-1);
+	_companion1._effect = 1;
+	_companion1.setPosition(Common::Point(247, 63));
 	if (R2_GLOBALS._player._characterIndex == 2)
-		_actor1.setup(10, 5, 1);
+		_companion1.setup(10, 5, 1);
 	else
-		_actor1.setup(20, 5, 1);
-	_actor1.animate(ANIM_MODE_1, NULL);
+		_companion1.setup(20, 5, 1);
+	_companion1.animate(ANIM_MODE_1, NULL);
 
-	_actor2.postInit();
-	_actor2._moveDiff = Common::Point(3, 2);
-	_actor2.changeZoom(-1);
-	_actor2._effect = 1;
-	_actor2.setPosition(Common::Point(225, 63));
+	_companion2.postInit();
+	_companion2._moveDiff = Common::Point(3, 2);
+	_companion2.changeZoom(-1);
+	_companion2._effect = 1;
+	_companion2.setPosition(Common::Point(225, 63));
 	if (R2_GLOBALS._player._characterIndex == 3)
-		_actor2.setup(10, 5, 1);
+		_companion2.setup(10, 5, 1);
 	else
-		_actor2.setup(30, 5, 1);
-	_actor2.animate(ANIM_MODE_1, NULL);
+		_companion2.setup(30, 5, 1);
+	_companion2.animate(ANIM_MODE_1, NULL);
 
-	_actor3.postInit();
-	_actor3._numFrames = 7;
-	_actor3._moveDiff = Common::Point(5, 3);
-	_actor3.changeZoom(-1);
-	_actor3._effect = 1;
-	_actor3.setPosition(Common::Point(235, 61));
-	_actor3.setup(40, 3, 1);
-	_actor3.animate(ANIM_MODE_1, NULL);
+	_webbster.postInit();
+	_webbster._numFrames = 7;
+	_webbster._moveDiff = Common::Point(5, 3);
+	_webbster.changeZoom(-1);
+	_webbster._effect = 1;
+	_webbster.setPosition(Common::Point(235, 61));
+	_webbster.setup(40, 3, 1);
+	_webbster.animate(ANIM_MODE_1, NULL);
 
 	_actor6.postInit();
 	_actor6.setup(3400, 1, 6);
@@ -2784,7 +2785,7 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
 
 	R2_GLOBALS.clearFlag(71);
 	_sceneMode = 3400;
-	setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL);
+	setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_companion1, &_companion2, &_webbster, NULL);
 }
 
 void Scene3400::remove() {
@@ -2798,30 +2799,30 @@ void Scene3400::signal() {
 	case 3305: {
 		warning("STUB: sub_1D227()");
 		_tealSpeaker._object1.hide();
-		_actor4.show();
-		_actor4.setStrip(1);
+		_teal.show();
+		_teal.setStrip(1);
 		Common::Point pt(158, 190);
 		NpcMover *mover = new NpcMover();
-		_actor4.addMover(mover, &pt, this);
+		_teal.addMover(mover, &pt, this);
 		_sceneMode = 3402;
-		setAction(&_sequenceManager, this, 3402, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL);
+		setAction(&_sequenceManager, this, 3402, &R2_GLOBALS._player, &_companion1, &_companion2, &_webbster, NULL);
 		}
 		break;
 	case 3306:
 		R2_GLOBALS._sound2.play(318);
-		_actor1.setStrip(2);
+		_companion1.setStrip(2);
 		R2_GLOBALS._player.setStrip(6);
-		_actor2.setStrip(6);
-		_actor3.setStrip(3);
-		_actor4.setStrip(1);
+		_companion2.setStrip(6);
+		_webbster.setStrip(3);
+		_teal.setStrip(1);
 		R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 0);
 		_stripManager.start(3307, this);
 		if (R2_GLOBALS._player._characterIndex == 2) {
 			_sceneMode = 3400;
-			R2_GLOBALS._player.setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_actor4, &_actor8, NULL);
+			R2_GLOBALS._player.setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_teal, &_actor8, NULL);
 		} else {
 			_sceneMode = 3408;
-			_actor1.setAction(&_sequenceManager, this, 3408, &_actor1, &_actor4, &_actor8, NULL);
+			_companion1.setAction(&_sequenceManager, this, 3408, &_companion1, &_teal, &_actor8, NULL);
 		}
 		break;
 	case 3307:
@@ -2837,63 +2838,63 @@ void Scene3400::signal() {
 		break;
 	case 3308:
 		warning("STUB: sub_1D227()");
-		_actor1.setStrip(2);
+		_companion1.setStrip(2);
 		R2_GLOBALS._player.setStrip(6);
-		_actor2.setStrip(6);
-		_actor3.setStrip(3);
-		_actor4.setStrip(1);
+		_companion2.setStrip(6);
+		_webbster.setStrip(3);
+		_teal.setStrip(1);
 		_sceneMode = 3403;
 		if (R2_GLOBALS._player._characterIndex == 2)
-			setAction(&_sequenceManager, this, 3403, &R2_GLOBALS._player, &_actor3, &_actor7, NULL);
+			setAction(&_sequenceManager, this, 3403, &R2_GLOBALS._player, &_webbster, &_actor7, NULL);
 		else
-			setAction(&_sequenceManager, this, 3403, &_actor1, &_actor3, &_actor7, NULL);
+			setAction(&_sequenceManager, this, 3403, &_companion1, &_webbster, &_actor7, NULL);
 		break;
 	case 3309:
 		warning("STUB: sub_1D227()");
-		_actor4.setStrip(1);
+		_teal.setStrip(1);
 		_sceneMode = 3405;
 		if (R2_GLOBALS._player._characterIndex == 3)
 			setAction(&_sequenceManager, this, 3405, &R2_GLOBALS._player, &_actor7, NULL);
 		else
-			setAction(&_sequenceManager, this, 3405, &_actor2, &_actor7, NULL);
+			setAction(&_sequenceManager, this, 3405, &_companion2, &_actor7, NULL);
 		break;
 	case 3310:
 		warning("STUB: sub_1D227()");
-		_actor4.setStrip(1);
+		_teal.setStrip(1);
 		_sceneMode = 3406;
 		if (R2_GLOBALS._player._characterIndex == 1)
 			setAction(&_sequenceManager, this, 3406, &R2_GLOBALS._player, &_actor7, NULL);
 		else if (R2_GLOBALS._player._characterIndex == 2)
-			setAction(&_sequenceManager, this, 3406, &_actor1, &_actor7, NULL);
+			setAction(&_sequenceManager, this, 3406, &_companion1, &_actor7, NULL);
 		else if (R2_GLOBALS._player._characterIndex == 3)
-			setAction(&_sequenceManager, this, 3406, &_actor2, &_actor7, NULL);
+			setAction(&_sequenceManager, this, 3406, &_companion2, &_actor7, NULL);
 		break;
 	case 3311:
 		warning("STUB: sub_1D227()");
 		_tealSpeaker._object1.hide();
-		_actor4.show();
-		_actor4.setStrip(1);
+		_teal.show();
+		_teal.setStrip(1);
 		_sceneMode = 3407;
-		setAction(&_sequenceManager, this, 3407, &_actor4, &_actor7, NULL);
+		setAction(&_sequenceManager, this, 3407, &_teal, &_actor7, NULL);
 		break;
 	case 3400: {
 		_actor8.postInit();
 		_actor8.hide();
-		_actor4.postInit();
-		_actor4._numFrames = 7;
-		_actor4._moveDiff = Common::Point(3, 2);
-		_actor4.changeZoom(-1);
-		_actor4._effect = 1;
-		_actor4.setPosition(Common::Point(-15, 90));
-		_actor4.setup(3402, 1, 1);
-		_actor4.animate(ANIM_MODE_1, NULL);
+		_teal.postInit();
+		_teal._numFrames = 7;
+		_teal._moveDiff = Common::Point(3, 2);
+		_teal.changeZoom(-1);
+		_teal._effect = 1;
+		_teal.setPosition(Common::Point(-15, 90));
+		_teal.setup(3402, 1, 1);
+		_teal.animate(ANIM_MODE_1, NULL);
 		Common::Point pt1(115, 90);
 		NpcMover *mover1 = new NpcMover();
-		_actor4.addMover(mover1, &pt1, this);
-		R2_GLOBALS._scrollFollower = &_actor4;
+		_teal.addMover(mover1, &pt1, this);
+		R2_GLOBALS._scrollFollower = &_teal;
 		Common::Point pt2(203, 76);
 		NpcMover *mover2 = new NpcMover();
-		_actor3.addMover(mover2, &pt2, NULL);
+		_webbster.addMover(mover2, &pt2, NULL);
 		_sceneMode = 3401;
 		}
 		break;
@@ -4611,7 +4612,7 @@ void Scene3600::remove() {
 void Scene3600::signal() {
 	switch (_sceneMode) {
 	case 3320:
-		warning("STUB: sub_1D227()");
+		// TODO: warning("STUB: sub_1D227()");
 		R2_GLOBALS._walkRegions.disableRegion(14);
 		R2_GLOBALS._scrollFollower = &_actor11;
 		_tealSpeaker._object1.hide();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h
index 82eafdc..f9a4bf7 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.h
@@ -547,10 +547,10 @@ public:
 	SpeakerMiranda3400 _mirandaSpeaker;
 	SpeakerWebbster3400 _webbsterSpeaker;
 	SpeakerTeal3400 _tealSpeaker;
-	SceneActor _actor1;
-	SceneActor _actor2;
-	SceneActor _actor3;
-	SceneActor _actor4;
+	SceneActor _companion1;
+	SceneActor _companion2;
+	SceneActor _webbster;
+	SceneActor _teal;
 	SceneActor _actor5;
 	SceneActor _actor6;
 	SceneActor _actor7;
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp
index fb10fdc..2cf5201 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.cpp
+++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp
@@ -779,7 +779,7 @@ void SpeakerMiranda3400::proc15() {
 		if (R2_GLOBALS._player._characterIndex == 3)
 			_object2 = &R2_GLOBALS._player;
 		else
-			_object2 = &scene->_actor2;
+			_object2 = &scene->_companion2;
 
 		_object2->hide();
 		_object1.postInit();
@@ -801,12 +801,12 @@ void SpeakerMiranda3400::proc15() {
 	case 1:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4051, 5, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 2:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4050, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	default:
 		signal();
@@ -1664,9 +1664,9 @@ void SpeakerQuinn3400::proc15() {
 		if (R2_GLOBALS._player._characterIndex == 1)
 			_object2 = &R2_GLOBALS._player;
 		else if (R2_GLOBALS._player._characterIndex == 2)
-			_object2 = &scene->_actor1;
+			_object2 = &scene->_companion1;
 		else
-			_object2 = &scene->_actor2;
+			_object2 = &scene->_companion2;
 
 		_object2->hide();
 		_object1.postInit();
@@ -1691,12 +1691,12 @@ void SpeakerQuinn3400::proc15() {
 	case 2:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4010, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 3:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4012, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	default:
 		signal();
@@ -2365,7 +2365,7 @@ void SpeakerSeeker3400::proc15() {
 		if (R2_GLOBALS._player._characterIndex == 2)
 			_object2 = &R2_GLOBALS._player;
 		else
-			_object2 = &scene->_actor1;
+			_object2 = &scene->_companion1;
 
 		_object2->hide();
 		_object1.postInit();
@@ -2387,27 +2387,27 @@ void SpeakerSeeker3400::proc15() {
 	case 1:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4031, 1, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 2:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4031, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 3:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4030, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 4:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4031, 7, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 5:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4033, 1, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	default:
 		signal();
@@ -2714,7 +2714,7 @@ void SpeakerTeal3400::proc15() {
 	int v = _speakerMode;
 
 	if (!_object2) {
-		_object2 = &scene->_actor4;
+		_object2 = &scene->_teal;
 		_object2->hide();
 		_object1.postInit();
 		_object1._numFrames = 7;
@@ -2731,8 +2731,8 @@ void SpeakerTeal3400::proc15() {
 
 	if (scene ->_sceneMode == 3305) {
 		R2_GLOBALS._player.setStrip(6);
-		scene->_actor1.setStrip(6);
-		scene->_actor2.setStrip(6);
+		scene->_companion1.setStrip(6);
+		scene->_companion2.setStrip(6);
 	}
 
 	switch (v) {
@@ -2742,22 +2742,22 @@ void SpeakerTeal3400::proc15() {
 	case 1:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4107, 5, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 2:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4107, 1, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 3:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4107, 7, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 4:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4107, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	default:
 		signal();
@@ -3050,7 +3050,7 @@ void SpeakerWebbster3400::proc15() {
 	int v = _speakerMode;
 
 	if (!_object2) {
-		_object2 = &scene->_actor3;
+		_object2 = &scene->_webbster;
 		_object2->hide();
 		_object1.postInit();
 		_object1.setPosition(_object2->_position);
@@ -3071,17 +3071,17 @@ void SpeakerWebbster3400::proc15() {
 	case 1:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4110, 5, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 2:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4110, 7, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	case 3:
 		((SceneItem *)_action)->_sceneRegionId = 0;
 		_object1.setup(4110, 3, 1);
-		_object1.animate(ANIM_MODE_5, NULL);
+		_object1.animate(ANIM_MODE_5, this);
 		break;
 	default:
 		signal();






More information about the Scummvm-git-logs mailing list