[Scummvm-git-logs] scummvm master -> 9e3568bdfb7275798163a002c43fac5cbe69b251

neuromancer noreply at scummvm.org
Mon Jan 17 19:54:45 UTC 2022


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
364aa27c07 HYPNO: fixed menus in spider demo
29897b27e9 HYPNO: fixed credits in spider
9e3568bdfb HYPNO: fixed menus in spider


Commit: 364aa27c07ddd65ba3b3837defcede60e7646c4f
    https://github.com/scummvm/scummvm/commit/364aa27c07ddd65ba3b3837defcede60e7646c4f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-17T20:34:49+01:00

Commit Message:
HYPNO: fixed menus in spider demo

Changed paths:
    engines/hypno/actions.cpp
    engines/hypno/hypno.cpp
    engines/hypno/scene.cpp
    engines/hypno/spider/hard.cpp


diff --git a/engines/hypno/actions.cpp b/engines/hypno/actions.cpp
index 66ddbac1ee7..89b271e6832 100644
--- a/engines/hypno/actions.cpp
+++ b/engines/hypno/actions.cpp
@@ -72,16 +72,18 @@ void HypnoEngine::runMenu(Hotspots *hs) {
 	if (_conversation.empty()) {
 		if (h->flags[0] == "HINTS" || h->flags[1] == "HINTS" || h->flags[2] == "HINTS") {
 			menu = decodeFrame("int_main/hint1.smk", 0);
-			h->rect = Common::Rect(0, 0, menu->w, menu->h);
-			drawImage(*menu, 0, 0, false);
 		} else if (h->flags[0] == "AUTO_BUTTONS" || h->flags[0] == "SINGLE_RUN") {
-			if (isDemo())
-				loadImage("int_main/resume.smk", 0, 0, true, false, 0);
-			else {
+			if (isDemo()) {
+				if (_currentLevel != "sixdemo/mis/demo.mis" && _currentLevel != "sixdemo/mis/order.mis") 
+					menu = decodeFrame("int_main/resume.smk", 0);
+			} else {
 				menu = decodeFrame("int_main/menu.smk", 0);
-				h->rect = Common::Rect(0, 0, menu->w, menu->h);
-				drawImage(*menu, 0, 0, true);
 			}
+		} 
+
+		if (menu) {
+			h->rect = Common::Rect(0, 0, menu->w, menu->h);
+			drawImage(*menu, 0, 0, true);
 		}
 	}
 }
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index c3137cc34b8..725a63dc5a2 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -266,7 +266,7 @@ void HypnoEngine::loadImage(const Common::String &name, int x, int y, bool trans
 
 void HypnoEngine::drawImage(Graphics::Surface &surf, int x, int y, bool transparent) {
 	if (transparent) {
-		_compositeSurface->transBlitFrom(surf, Common::Point(x, y), surf.getPixel(0, 0));
+		_compositeSurface->transBlitFrom(surf, Common::Point(x, y), _transparentColor);
 	} else
 		_compositeSurface->blitFrom(surf, Common::Point(x, y));
 }
@@ -366,7 +366,6 @@ void HypnoEngine::changeScreenMode(const Common::String &mode) {
 		_compositeSurface = new Graphics::ManagedSurface();
 		_compositeSurface->create(_screenW, _screenH, _pixelFormat);
 
-		_transparentColor = _pixelFormat.RGBToColor(0, 0x82, 0);
 		_compositeSurface->setTransparentColor(_transparentColor);
 
 	} else if (mode == "320x200") {
@@ -381,7 +380,6 @@ void HypnoEngine::changeScreenMode(const Common::String &mode) {
 		_compositeSurface = new Graphics::ManagedSurface();
 		_compositeSurface->create(_screenW, _screenH, _pixelFormat);
 
-		_transparentColor = 0; //_pixelFormat.RGBToColor(0, 0, 0);
 		_compositeSurface->setTransparentColor(_transparentColor);
 	} else
 		error("Unknown screen mode %s", mode.c_str());
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 7f74b199bee..ce82ed3faa1 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -120,8 +120,10 @@ void HypnoEngine::clickedHotspot(Common::Point mousePos) {
 		}
 	}
 	if (selected.type == MakeMenu) {
-		// TODO: remove when proper escape to main menu is implemented
-		openMainMenuDialog();
+		if (isDemo())
+			_nextLevel = "sixdemo/mis/demo.mis";
+		else // TODO: remove when proper escape to main menu is implemented
+			openMainMenuDialog();
 		return;
 	}
 
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index 30a91a0cf23..417c4e18200 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -89,11 +89,13 @@ void SpiderEngine::runMatrix(Code *code) {
 	playVideo(*v);
 	Graphics::Surface *menu;
 	Common::Rect menuArea(0, 0, 0, 0);
-	if (!isDemo())  { // No hints in demo
+	if (isDemo()) // No hints in demo
+		menu = decodeFrame("int_main/resume.smk", 0);
+	else
 		menu = decodeFrame("int_main/hint1.smk", 0);
-		menuArea = Common::Rect(0, 0, menu->w, menu->h);
-		drawImage(*menu, 0, 0, true);
-	}
+
+	menuArea = Common::Rect(0, 0, menu->w, menu->h);
+	drawImage(*menu, 0, 0, true);
 
 	while (!shouldQuit() && _nextLevel.empty()) {
 
@@ -120,7 +122,10 @@ void SpiderEngine::runMatrix(Code *code) {
 					runIntro(*v);
 					break;
 				} else if (menuArea.contains(mousePos)) {
-					openMainMenuDialog();
+					if (isDemo())
+						_nextLevel = "sixdemo/mis/demo.mis";
+					else
+						openMainMenuDialog();
 					break;
 				}
 


Commit: 29897b27e936bc03034b6df654aa09e8b0937f75
    https://github.com/scummvm/scummvm/commit/29897b27e936bc03034b6df654aa09e8b0937f75
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-17T20:43:41+01:00

Commit Message:
HYPNO: fixed credits in spider

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


diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index 725a63dc5a2..c4633eafdda 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -355,6 +355,9 @@ Frames HypnoEngine::decodeFrames(const Common::String &name) {
 void HypnoEngine::changeScreenMode(const Common::String &mode) {
 	debugC(1, kHypnoDebugMedia, "%s(%s)", __FUNCTION__, mode.c_str());
 	if (mode == "640x480") {
+		if (_screenH == 640 && _screenH == 480)
+			return;
+
 		_screenW = 640;
 		_screenH = 480;
 
@@ -369,6 +372,9 @@ void HypnoEngine::changeScreenMode(const Common::String &mode) {
 		_compositeSurface->setTransparentColor(_transparentColor);
 
 	} else if (mode == "320x200") {
+		if (_screenH == 320 && _screenH == 200)
+			return;
+
 		_screenW = 320;
 		_screenH = 200;
 
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index 417c4e18200..00391513188 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -1036,6 +1036,9 @@ void SpiderEngine::showCredits() {
 		return;
 	}
 
+	if (!_arcadeMode.empty())
+		return; // No credits during arcade sequence
+
 	if (!isDemo()) { // No credits in demo
 		changeScreenMode("640x480");
 		MVideo video("cine/credits.smk", Common::Point(0, 0), false, true, false);


Commit: 9e3568bdfb7275798163a002c43fac5cbe69b251
    https://github.com/scummvm/scummvm/commit/9e3568bdfb7275798163a002c43fac5cbe69b251
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-17T20:54:41+01:00

Commit Message:
HYPNO: fixed menus in spider

Changed paths:
    engines/hypno/actions.cpp


diff --git a/engines/hypno/actions.cpp b/engines/hypno/actions.cpp
index 89b271e6832..cfd6250d3c8 100644
--- a/engines/hypno/actions.cpp
+++ b/engines/hypno/actions.cpp
@@ -69,13 +69,16 @@ void HypnoEngine::runMenu(Hotspots *hs) {
 	}
 
 	Graphics::Surface *menu = nullptr;
+	bool transparent = false;
 	if (_conversation.empty()) {
 		if (h->flags[0] == "HINTS" || h->flags[1] == "HINTS" || h->flags[2] == "HINTS") {
 			menu = decodeFrame("int_main/hint1.smk", 0);
 		} else if (h->flags[0] == "AUTO_BUTTONS" || h->flags[0] == "SINGLE_RUN") {
 			if (isDemo()) {
-				if (_currentLevel != "sixdemo/mis/demo.mis" && _currentLevel != "sixdemo/mis/order.mis") 
+				if (_currentLevel != "sixdemo/mis/demo.mis" && _currentLevel != "sixdemo/mis/order.mis") {
 					menu = decodeFrame("int_main/resume.smk", 0);
+					transparent = true;
+				}
 			} else {
 				menu = decodeFrame("int_main/menu.smk", 0);
 			}
@@ -83,7 +86,7 @@ void HypnoEngine::runMenu(Hotspots *hs) {
 
 		if (menu) {
 			h->rect = Common::Rect(0, 0, menu->w, menu->h);
-			drawImage(*menu, 0, 0, true);
+			drawImage(*menu, 0, 0, transparent);
 		}
 	}
 }




More information about the Scummvm-git-logs mailing list