[Scummvm-git-logs] scummvm master -> 714337ee789ed380f435a4e2c0583a77ef3d9b4d

neuromancer noreply at scummvm.org
Sat Mar 18 09:39:44 UTC 2023


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

Summary:
91ddb6bef5 HYPNO: check zero or negative health when showing message at the end of fight
a1a77ad466 HYPNO: enable kSupportsReturnToLauncher
5512deb404 FREESCAPE: avoid crash selecting a missing palette in driller demo for amiga/atari
714337ee78 FREESCAPE: disallow crossair to be outside the view area


Commit: 91ddb6bef53126906ed27b0299ceacd69eb92713
    https://github.com/scummvm/scummvm/commit/91ddb6bef53126906ed27b0299ceacd69eb92713
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-18T10:39:13+01:00

Commit Message:
HYPNO: check zero or negative health when showing message at the end of fight

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


diff --git a/engines/hypno/spider/arcade.cpp b/engines/hypno/spider/arcade.cpp
index ad6d9dc8685..55e19ffd708 100644
--- a/engines/hypno/spider/arcade.cpp
+++ b/engines/hypno/spider/arcade.cpp
@@ -74,7 +74,7 @@ void SpiderEngine::runAfterArcade(ArcadeShooting *arc) {
 	_playerFrames.clear();
 
 	if (isDemo() && _restoredContentEnabled) {
-		if (_health == 0)
+		if (_health <= 0)
 			showScore("Spider-man was defeated!");
 		else
 			showScore("Spider-Man saved the day!");


Commit: a1a77ad4667d1a4fffe1ff2ce9587aee27ce14f2
    https://github.com/scummvm/scummvm/commit/a1a77ad4667d1a4fffe1ff2ce9587aee27ce14f2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-18T10:39:13+01:00

Commit Message:
HYPNO: enable kSupportsReturnToLauncher

Changed paths:
    engines/hypno/hypno.h


diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 02f827eba92..eddbc7140d4 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -500,7 +500,7 @@ public:
 	}
 
 	bool hasFeature(EngineFeature f) const override {
-		return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime);
+		return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime || f == kSupportsReturnToLauncher);
 	}
 
 private:


Commit: 5512deb404f9421e35a247f315f1793367c8a481
    https://github.com/scummvm/scummvm/commit/5512deb404f9421e35a247f315f1793367c8a481
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-18T10:39:13+01:00

Commit Message:
FREESCAPE: avoid crash selecting a missing palette in driller demo for amiga/atari

Changed paths:
    engines/freescape/games/palettes.cpp


diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 00e626fb653..2947a6c6268 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -209,9 +209,13 @@ byte kDrillerCGAPaletteRedGreenData[4][3] = {
 };
 
 void FreescapeEngine::swapPalette(uint16 levelID) {
-	if (isAmiga() || isAtariST())
+	if (isAmiga() || isAtariST()) {
+		// The following palette was not available in the demo, so we select another one
+		if (isDemo() && levelID == 32)
+			levelID = 31;
+
 		_gfx->_palette = _paletteByArea[levelID];
-	else if (isSpectrum() || isCPC() || isC64()) {
+	} else if (isSpectrum() || isCPC() || isC64()) {
 		_gfx->_inkColor = _areaMap[levelID]->_inkColor;
 		_gfx->_paperColor = _areaMap[levelID]->_paperColor;
 		_gfx->_underFireBackgroundColor = _areaMap[levelID]->_underFireBackgroundColor;


Commit: 714337ee789ed380f435a4e2c0583a77ef3d9b4d
    https://github.com/scummvm/scummvm/commit/714337ee789ed380f435a4e2c0583a77ef3d9b4d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-18T10:39:13+01:00

Commit Message:
FREESCAPE: disallow crossair to be outside the view area

Changed paths:
    engines/freescape/freescape.cpp


diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index c0aee262ed7..032af51e1b9 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -414,6 +414,8 @@ void FreescapeEngine::processInput() {
 				} else {
 					g_system->lockMouse(false);
 					g_system->warpMouse(_crossairPosition.x, _crossairPosition.y);
+					g_system->getEventManager()->purgeMouseEvents();
+					g_system->getEventManager()->purgeKeyboardEvents();
 				}
 				break;
 			case Common::KEYCODE_i:
@@ -443,15 +445,34 @@ void FreescapeEngine::processInput() {
 				g_system->warpMouse(mousePos.x, mousePos.y);
 
 			if (_shootMode) {
-				_crossairPosition = mousePos;
-				if (mousePos.x < _viewArea.left)
-					g_system->warpMouse(_viewArea.left + 1, _crossairPosition.y);
-				else if  (mousePos.x > _viewArea.right)
-					g_system->warpMouse(_viewArea.right - 1, _crossairPosition.y);
-				else if (mousePos.y < _viewArea.top)
-					g_system->warpMouse(_crossairPosition.x, _viewArea.top + 1);
-				else if  (mousePos.y > _viewArea.bottom)
-					g_system->warpMouse(_crossairPosition.x, _viewArea.bottom - 1);
+				{
+					bool shouldWarp = false;
+					_crossairPosition = mousePos;
+					if (mousePos.x < _viewArea.left) {
+						_crossairPosition.x = _viewArea.left + 1;
+						shouldWarp = true;
+					}
+
+					if  (mousePos.x > _viewArea.right) {
+						_crossairPosition.x = _viewArea.right - 1;
+						shouldWarp = true;
+					}
+					if (mousePos.y < _viewArea.top) {
+						_crossairPosition.y =  _viewArea.top + 1;
+						shouldWarp = true;
+					}
+
+					if  (mousePos.y > _viewArea.bottom) {
+						_crossairPosition.y = _viewArea.bottom - 1;
+						shouldWarp = true;
+					}
+
+					if (shouldWarp) {
+						g_system->warpMouse(_crossairPosition.x, _crossairPosition.y);
+						g_system->getEventManager()->purgeMouseEvents();
+						g_system->getEventManager()->purgeKeyboardEvents();
+					}
+				}
 				break;
 			}
 




More information about the Scummvm-git-logs mailing list