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

sev- sev at scummvm.org
Mon Sep 9 22:24:35 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:
fa8027203c FULLPIPE: Started debug scene


Commit: fa8027203c0e3aea23e3b15f6a2382d0fbfc56b5
    https://github.com/scummvm/scummvm/commit/fa8027203c0e3aea23e3b15f6a2382d0fbfc56b5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-09-09T13:23:33-07:00

Commit Message:
FULLPIPE: Started debug scene

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/gameloader.cpp
    engines/fullpipe/scenes.cpp
    engines/fullpipe/scenes.h



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 5048bf9..f99e679 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -90,6 +90,7 @@ namespace Fullpipe {
 #define PIC_SC1_LADDER 1091
 #define PIC_SC1_OSK 1018
 #define PIC_SC1_OSK2 2932
+#define PIC_SCD_SEL 734
 #define SC_1 301
 #define SC_10 653
 #define SC_11 654
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index f48c407..a44501b 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -173,6 +173,9 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) {
 	if (_sc2array[sc2idx]._entranceDataCount <= 0)
 		return false;
 
+	if (sceneId == 726)
+		return true;
+
 	int entranceIdx;
 	for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) {
 		if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount)
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index f4e771a..bedfa4c 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -53,6 +53,9 @@ void scene01_fixEntrance();
 void scene01_initScene(Scene *sc, int entrance);
 int sceneHandler01(ExCommand *cmd);
 
+void sceneDbgMenu_initScene(Scene *sc);
+int sceneHandlerDbgMenu(ExCommand *cmd);
+
 Vars::Vars() {
 	sceneIntro_aniin1man = 0;
 	sceneIntro_needSleep = true;
@@ -632,6 +635,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
 		addMessageHandler(sceneHandlerFinal1, 2);
 		_updateCursorCallback = sceneFinal1_updateCursor;
 		break;
+#endif
 
 	case SC_DBGMENU:
 		sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_DBGMENU");
@@ -641,7 +645,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
 		scene->initObjectCursors("SC_DBGMENU");
 		addMessageHandler(sceneHandlerDbgMenu, 2);
 		break;
-#endif
 
 	default:
 		_behaviorManager->initBehavior(0, 0);
@@ -847,6 +850,7 @@ int global_messageHandler2(ExCommand *cmd) {
 
 	switch (cmd->_messageNum) {
 	case 0x44c8:
+		error("0x44c8");
 		// Unk3_sub_4477A0(&unk3, _parentId, _field_14 != 0);
 		break;
 
@@ -1430,4 +1434,57 @@ int sceneHandler01(ExCommand *cmd) {
 	return res;
 }
 
+void sceneDbgMenu_initScene(Scene *sc) {
+	g_vars->selector = sc->getPictureObjectById(PIC_SCD_SEL, 0);
+	getGameLoaderInteractionController()->disableFlag24();
+	setInputDisabled(0);
+}
+
+int sceneHandlerDbgMenu(ExCommand *ex) {
+	if (ex->_messageKind != 17)
+		return 0;
+#if 0
+	int mx = g_fullpipe->_mouseScreenPos.x + g_sceneRect.left;
+	int my = g_fullpipe->_mouseScreenPos.y + g_sceneRect.top;
+
+	if (ex->_messageNum == 29) {
+		GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my);
+		if (obj && GameObject_canInteractAny(0, obj, -3) ) {
+			getGameLoaderInteractionController()->enableFlag24();
+			handleObjectInteraction(0, obj, 0);
+		}
+		return 0;
+	}
+	if (ex->_messageNum != 33) {
+		if (ex->_messageNum == MSG_RESTARTGAME) {
+			g_fullpipe->_needRestart = true;
+			return 0;
+		}
+		return 0;
+	}
+
+	g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
+	GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my);
+	if (obj) {
+		if (GameObject_canInteractAny(0, obj, -3)) {
+			g_cursorId = PIC_CSR_DEFAULT;
+			input_setCursor(PIC_CSR_DEFAULT);
+			return 0;
+		}
+	} else {
+		obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my);
+		if (obj && GameObject_canInteractAny(0, obj, -3) ) {
+			g_vars->selector->_flags |= 4;
+			g_vars->selector->setOXY(obj->_ox, obj->_oy);
+			g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
+			input_setCursor(PIC_CSR_DEFAULT);
+			return 0;
+		}
+		g_vars->selector->_flags &= 0xFFFB;
+	}
+	input_setCursor(g_cursorId);
+#endif
+	return 0;
+}
+
 } // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index ae5f2da..be42838 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -44,6 +44,8 @@ class Vars {
 
 	PictureObject *scene01_picSc01Osk;
 	PictureObject *scene01_picSc01Osk2;
+
+	GameObject *selector;
 };
 
 } // End of namespace Fullpipe






More information about the Scummvm-git-logs mailing list