[Scummvm-cvs-logs] scummvm master -> 657811e2c3754325860846ff5ddf5c28774126a5

sev- sev at scummvm.org
Sat Dec 28 22:56:32 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:
3f8c39341c FULLPIPE: Correctly implement scene switching from command line
657811e2c3 FULLPIPE: Revert accidential change


Commit: 3f8c39341c5f223fc5b06974ae16f28df99d779f
    https://github.com/scummvm/scummvm/commit/3f8c39341c5f223fc5b06974ae16f28df99d779f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-28T13:42:06-08:00

Commit Message:
FULLPIPE: Correctly implement scene switching from command line

Changed paths:
    engines/fullpipe/console.cpp
    engines/fullpipe/constants.h
    engines/fullpipe/fullpipe.h
    engines/fullpipe/messagehandlers.cpp
    engines/fullpipe/scenes.cpp
    engines/fullpipe/scenes/scene24.cpp
    engines/fullpipe/stateloader.cpp



diff --git a/engines/fullpipe/console.cpp b/engines/fullpipe/console.cpp
index 06235d3..2d27fc2 100644
--- a/engines/fullpipe/console.cpp
+++ b/engines/fullpipe/console.cpp
@@ -39,8 +39,12 @@ bool Console::Cmd_Scene(int argc, const char **argv) {
 		return true;
 	} else {
 		int scene = _vm->convertScene(atoi(argv[1]));
-		_vm->_gameLoader->loadScene(scene);
-		_vm->_gameLoader->gotoScene(scene, TrubaLeft);
+		_vm->_gameLoader->loadScene(726);
+		_vm->_gameLoader->gotoScene(726, TrubaLeft);
+
+		if (scene != 726)
+			_vm->_gameLoader->preloadScene(726, _vm->getSceneEntrance(scene));
+
 		return false;
 	}
 }
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 5f45ba0..6b4c3c5 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -303,7 +303,6 @@ namespace Fullpipe {
 #define PIC_SC8_LADDERD 1106
 #define PIC_SC10_DTRUBA 974
 #define PIC_SC10_LADDER 995
-#define PIC_SCD_SEL 734
 #define QU_BALL_WALKL 4920
 #define QU_BALL_WALKR 4919
 #define QU_CST_CLOSELUKE 820
@@ -566,6 +565,48 @@ namespace Fullpipe {
 #define ST_DRP24_EMPTY 3507
 #define ST_WTR24_FLOWLOWER 1843
 
+// Debug scene
+#define PIC_SCD_1 727
+#define PIC_SCD_2 728
+#define PIC_SCD_3 729
+#define PIC_SCD_4 730
+#define PIC_SCD_5 731
+#define PIC_SCD_6 732
+#define PIC_SCD_7 733
+#define PIC_SCD_8 756
+#define PIC_SCD_9 907
+#define PIC_SCD_10 981
+#define PIC_SCD_11 1098
+#define PIC_SCD_12 857
+#define PIC_SCD_13 1195
+#define PIC_SCD_14 1224
+#define PIC_SCD_15 1278
+#define PIC_SCD_16 1299
+#define PIC_SCD_17 1305
+#define PIC_SCD_18 1306
+#define PIC_SCD_19 1319
+#define PIC_SCD_20 1622
+#define PIC_SCD_21 1623
+#define PIC_SCD_22 1624
+#define PIC_SCD_23 1625
+#define PIC_SCD_24 1845
+#define PIC_SCD_25 1846
+#define PIC_SCD_26 1847
+#define PIC_SCD_27 1916
+#define PIC_SCD_28 2098
+#define PIC_SCD_29 2099
+#define PIC_SCD_30 2359
+#define PIC_SCD_31 2566
+#define PIC_SCD_32 2312
+#define PIC_SCD_33 2636
+#define PIC_SCD_34 2389
+#define PIC_SCD_35 2412
+#define PIC_SCD_36 2567
+#define PIC_SCD_37 2568
+#define PIC_SCD_38 2228
+#define PIC_SCD_FIN 5026
+#define PIC_SCD_SEL 734
+
 } // End of namespace Fullpipe
 
 #endif /* FULLPIPE_CONSTANTS_H */
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 5e4389a..0f3e057 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -238,6 +238,7 @@ public:
 	Scene *accessScene(int sceneId);
 	void setSceneMusicParameters(GameVar *var);
 	int convertScene(int scene);
+	int getSceneEntrance(int scene);
 	int getSceneFromTag(int tag);
 
 	NGIArchive *_currArchive;
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index a9872a5..3eb0668 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -42,7 +42,7 @@ void global_messageHandler_KickMetal() {
 }
 
 int global_messageHandler1(ExCommand *cmd) {
-	debug(0, "global_messageHandler1: %d %d", cmd->_messageKind, cmd->_messageNum);
+	debug(5, "global_messageHandler1: %d %d", cmd->_messageKind, cmd->_messageNum);
 
 	if (cmd->_excFlags & 0x10000) {
 		if (cmd->_messageNum == MV_MAN_TOLADDER)
@@ -306,6 +306,7 @@ int global_messageHandler3(ExCommand *cmd) {
 	case 17:
 		switch (cmd->_messageNum) {
 		case 61:
+			debug(0, "preload: { %d, %d },", cmd->_parentId, cmd->_keyCode);
 			return g_fp->_gameLoader->preloadScene(cmd->_parentId, cmd->_keyCode);
 		case 62:
 			return g_fp->_gameLoader->gotoScene(cmd->_parentId, cmd->_keyCode);
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index a8e96a1..dca6e71 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -209,19 +209,34 @@ static int scenes[] = {
 	SC_1,  SC_2,  SC_3,  SC_4,  SC_5,  SC_6,  SC_7,  SC_8,  SC_9,  SC_10,
 	SC_11, SC_12, SC_13, SC_14, SC_15, SC_16, SC_17, SC_18, SC_19, SC_20,
 	SC_21, SC_22, SC_23, SC_24, SC_25, SC_26, SC_27, SC_28, SC_29, SC_30,
-	SC_31, SC_32, SC_33, SC_34, SC_35, SC_36, SC_37, SC_38, SC_DBGMENU
+	SC_31, SC_32, SC_33, SC_34, SC_35, SC_36, SC_37, SC_38, SC_FINAL1, SC_DBGMENU
+};
+
+static int scenesD[] = {
+	PIC_SCD_1,  PIC_SCD_2,  PIC_SCD_3,  PIC_SCD_4,  PIC_SCD_5,  PIC_SCD_6,  PIC_SCD_7,  PIC_SCD_8,  PIC_SCD_9,  PIC_SCD_10,
+	PIC_SCD_11, PIC_SCD_12, PIC_SCD_13, PIC_SCD_14, PIC_SCD_15, PIC_SCD_16, PIC_SCD_17, PIC_SCD_18, PIC_SCD_19, PIC_SCD_20,
+	PIC_SCD_21, PIC_SCD_22, PIC_SCD_23, PIC_SCD_24, PIC_SCD_25, PIC_SCD_26, PIC_SCD_27, PIC_SCD_28, PIC_SCD_29, PIC_SCD_30,
+	PIC_SCD_31, PIC_SCD_32, PIC_SCD_33, PIC_SCD_34, PIC_SCD_35, PIC_SCD_36, PIC_SCD_37, PIC_SCD_38, PIC_SCD_FIN, 0
 };
 
 int FullpipeEngine::convertScene(int scene) {
 	if (!scene || scene >= SC_1)
 		return scene;
 
-	if (scene < 1 || scene > 39)
+	if (scene < 1 || scene > 40)
 		return SC_1;
 
 	return scenes[scene - 1];
 }
 
+int FullpipeEngine::getSceneEntrance(int scene) {
+	for (int i = 0; i < 41; i++)
+		if (scenes[i] == scene)
+			return scenesD[i];
+
+	return 0;
+}
+
 int FullpipeEngine::getSceneFromTag(int tag) {
 	for (int i = 0; i < ARRAYSIZE(scenes); i++) {
 		if (scenes[i] == tag)
diff --git a/engines/fullpipe/scenes/scene24.cpp b/engines/fullpipe/scenes/scene24.cpp
index 7ab0d94..08ac645 100644
--- a/engines/fullpipe/scenes/scene24.cpp
+++ b/engines/fullpipe/scenes/scene24.cpp
@@ -106,8 +106,8 @@ int sceneHandler24(ExCommand *cmd) {
 			if (x < g_fp->_sceneRect.left + 200) {
 				g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
 			}
-			if (x > g_fp->_sceneRect.right - 200)
-				g_fp->_currentScene->_x = x +  300 - g_fp->_sceneRect.right;
+			if (x > g_fp->_sceneRect.right - 200 - 1)
+				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
 		}
 
 		if (g_vars->scene24_waterIsOn && !g_vars->scene24_water->_movement) {
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 6a56ffd..9c54947 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -82,8 +82,11 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
 	setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED"));
 
 	if (scene) {
-		_gameLoader->loadScene(scene);
-		_gameLoader->gotoScene(scene, TrubaLeft);
+		_gameLoader->loadScene(726);
+		_gameLoader->gotoScene(726, TrubaLeft);
+
+		if (scene != 726)
+			_gameLoader->preloadScene(726, getSceneEntrance(scene));
 	} else {
 		if (_flgPlayIntro) {
 			_gameLoader->loadScene(SC_INTRO1);


Commit: 657811e2c3754325860846ff5ddf5c28774126a5
    https://github.com/scummvm/scummvm/commit/657811e2c3754325860846ff5ddf5c28774126a5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-28T13:55:49-08:00

Commit Message:
FULLPIPE: Revert accidential change

Changed paths:
    engines/fullpipe/scenes/scene24.cpp



diff --git a/engines/fullpipe/scenes/scene24.cpp b/engines/fullpipe/scenes/scene24.cpp
index 08ac645..508f776 100644
--- a/engines/fullpipe/scenes/scene24.cpp
+++ b/engines/fullpipe/scenes/scene24.cpp
@@ -106,7 +106,7 @@ int sceneHandler24(ExCommand *cmd) {
 			if (x < g_fp->_sceneRect.left + 200) {
 				g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
 			}
-			if (x > g_fp->_sceneRect.right - 200 - 1)
+			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
 		}
 






More information about the Scummvm-git-logs mailing list