[Scummvm-git-logs] scummvm master -> eada851a4d0a199a116d2129c5ec243176ed5ab3

neuromancer noreply at scummvm.org
Sat Dec 18 11:12:34 UTC 2021


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:
eada851a4d HYPNO: recept hardcoded check and switch indentation fix


Commit: eada851a4d0a199a116d2129c5ec243176ed5ab3
    https://github.com/scummvm/scummvm/commit/eada851a4d0a199a116d2129c5ec243176ed5ab3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-12-18T12:12:19+01:00

Commit Message:
HYPNO: recept hardcoded check and switch indentation fix

Changed paths:
    engines/hypno/hypno.h
    engines/hypno/spider/hard.cpp
    engines/hypno/spider/spider.cpp


diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index d0861a264c..f8ebf20ddc 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -299,6 +299,7 @@ private:
 	void runMatrix(Code *code);
 	void runNote(Code *code);
 	void runFusePanel(Code *code);
+	void runRecept(Code *code);
 };
 
 class BoyzEngine : public HypnoEngine {
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index 3adef45414..3a739cadfe 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -33,6 +33,8 @@ void SpiderEngine::runCode(Code *code) {
 		runNote(code);
 	else if (code->name == "<fuse_panel>")
 		runFusePanel(code);
+	else if (code->name == "<recept>")
+		runRecept(code);
 	else if (code->name == "<credits>")
 		showCredits();
 	else
@@ -175,38 +177,38 @@ void SpiderEngine::runNote(Code *code) {
 	Common::String secondSolution;
 
 	switch (_language) {
-		case Common::EN_USA:
-			alpha = alphaEN;
-			if (_sceneState["GS_PUZZLELEVEL"] == 0) { // easy
-				firstSentence = (char*) &placeEasyEN;
-				secondSentence = (char*) &placeEasy2;
-				firstSolution = solEasyEN1;
-				secondSolution = solEasyEN2;
-			} else { // hard 
-				firstSentence = (char*) &placeHardEN;
-				secondSentence = (char*) &placeHardEN2;
-				firstSolution = solHardEN1;
-				secondSolution = solHardEN2;
-			}
-		break;
+	case Common::EN_USA:
+		alpha = alphaEN;
+		if (_sceneState["GS_PUZZLELEVEL"] == 0) { // easy
+			firstSentence = (char*) &placeEasyEN;
+			secondSentence = (char*) &placeEasy2;
+			firstSolution = solEasyEN1;
+			secondSolution = solEasyEN2;
+		} else { // hard 
+			firstSentence = (char*) &placeHardEN;
+			secondSentence = (char*) &placeHardEN2;
+			firstSolution = solHardEN1;
+			secondSolution = solHardEN2;
+		}
+	break;
 	
-		case Common::ES_ESP:
-			alpha = alphaES;
-			if (_sceneState["GS_PUZZLELEVEL"] == 0) { // easy
-				firstSentence = (char*) &placeEasyES;
-				secondSentence = (char*) &placeEasy2;
-				firstSolution = solEasyES1; 
-				secondSolution = solEasyES2;
-			} else { // hard 
-				firstSentence = (char*) &placeHardES;
-				secondSentence = (char*) &placeHardES2;
-				firstSolution = solHardES1;
-				secondSolution = solHardES2;
-			}
-		break;
-		default:
-			error("Unsupported language");
-		break;
+	case Common::ES_ESP:
+		alpha = alphaES;
+		if (_sceneState["GS_PUZZLELEVEL"] == 0) { // easy
+			firstSentence = (char*) &placeEasyES;
+			secondSentence = (char*) &placeEasy2;
+			firstSolution = solEasyES1; 
+			secondSolution = solEasyES2;
+		} else { // hard 
+			firstSentence = (char*) &placeHardES;
+			secondSentence = (char*) &placeHardES2;
+			firstSolution = solHardES1;
+			secondSolution = solHardES2;
+		}
+	break;
+	default:
+		error("Unsupported language");
+	break;
 	}
 
 	float firstSentenceLength = strlen(firstSentence);
@@ -317,6 +319,24 @@ void SpiderEngine::runNote(Code *code) {
 	}
 }
 
+void SpiderEngine::runRecept(Code *code) {
+
+	if (!_sceneState["GS_SWITCH3"]) { // lights off
+		MVideo v("spider/cine/recdark.smk", Common::Point(0, 0), false, false, false);
+		runIntro(v);
+		_nextLevel = "int_roof.mi_";
+		return;
+	}
+	
+	if (_sceneState["GS_SWITCH2"]) { // camera on
+		MVideo v("spider/cine/iobs001s.smk", Common::Point(0, 0), false, true, false);
+		runIntro(v);
+		_nextLevel = "<over_apt_5>";
+		return;
+	}
+
+	_nextLevel = "recept.mi_";
+}
 
 void SpiderEngine::runFusePanel(Code *code) {
 	changeScreenMode("640x480");
@@ -351,7 +371,11 @@ void SpiderEngine::runFusePanel(Code *code) {
 					if (s == 1) {
 						_sceneState["GS_SWITCH1"] = !_sceneState["GS_SWITCH1"]; 
 					} else if (s == 2) {
-
+						_sceneState["GS_SWITCH2"] = !_sceneState["GS_SWITCH2"];
+					} else if (s == 12) {
+						_sceneState["GS_SWITCH4"] = !_sceneState["GS_SWITCH4"];
+					} else if (s == 13) {
+						_sceneState["GS_SWITCH5"] = !_sceneState["GS_SWITCH5"];
 					}
 
 				} else if (back.contains(mousePos)) {
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 7b9f96e85d..4c6983db13 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -154,7 +154,7 @@ void SpiderEngine::loadAssetsFullGame() {
 
 	loadSceneLevel("int_roof.mi_", "", prefix);
 	sc = (Scene *) _levels["int_roof.mi_"];
-	cl = new ChangeLevel("recept.mi_");
+	cl = new ChangeLevel("<recept>");
 	sc->hots[1].actions.push_back(cl);
 	cl = new ChangeLevel("<boil_selector>");
 	sc->hots[2].actions.push_back(cl);
@@ -165,11 +165,15 @@ void SpiderEngine::loadAssetsFullGame() {
 	sc = (Scene *) _levels["alofintr.mi_"];
 	sc->intros.push_back("cine/swc002as.smk");
 	// This is necessary, for some reason
-	Global *gl = new Global("GS_SWITCH1", "TURNON");
+	Global *gl = new Global("GS_SWITCH1", "TURNON");	// alarm system
 	sc->hots[2].actions.push_back(gl);
-	gl = new Global("GS_SWITCH4", "TURNON");
+	gl = new Global("GS_SWITCH2", "TURNON");			// camera
 	sc->hots[2].actions.push_back(gl);
-	gl = new Global("GS_SWITCH5", "TURNON");
+	gl = new Global("GS_SWITCH3", "TURNON");			// lights recept
+	sc->hots[2].actions.push_back(gl);
+	gl = new Global("GS_SWITCH4", "TURNON");			// Side A door
+	sc->hots[2].actions.push_back(gl);
+	gl = new Global("GS_SWITCH5", "TURNON");			// Side B door
 	sc->hots[2].actions.push_back(gl);
 	
 	Transition *boil_selector = new Transition("boiler.mi_", "boilhard.mi_");
@@ -209,6 +213,10 @@ void SpiderEngine::loadAssetsFullGame() {
 	Transition *alveroff_selector = new Transition("alveroff.mi_", "alverofh.mi_");
 	_levels["<alveroff_selector>"] = alveroff_selector;
 
+	Code *recept = new Code();
+	recept->name = "<recept>";
+	_levels["<recept>"] = recept;
+
 	loadSceneLevel("recept.mi_", "", prefix);
 	sc = (Scene *) _levels["recept.mi_"];
 	sc->intros.push_back("cine/recpinto.smk");
@@ -364,7 +372,12 @@ void SpiderEngine::loadAssetsFullGame() {
 	Transition *over_apt_1 = new Transition("tryagain.mi_");
 	over_apt_1->intros.push_back("spider/cine/apts01as.smk");
 	_levels["<over_apt_1>"] = over_apt_1;
-	_nextLevel = "<start>";
+
+	Transition *over_apt_5 = new Transition("tryagain.mi_");
+	over_apt_5->intros.push_back("spider/cine/apts05as.smk");
+	_levels["<over_apt_5>"] = over_apt_5;
+
+	_nextLevel = "decide3.mi_";
 }
 
 void SpiderEngine::loadAssetsDemo() {




More information about the Scummvm-git-logs mailing list