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

neuromancer noreply at scummvm.org
Wed Mar 22 20:13:39 UTC 2023


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:
a2d23b37a1 FREESCAPE: refactored init code and added onscreen controls for driller dos
9a42ae6957 HYPNO: allow to use click to skip some screens


Commit: a2d23b37a1cd93d959ac6135617c1e087cfb521a
    https://github.com/scummvm/scummvm/commit/a2d23b37a1cd93d959ac6135617c1e087cfb521a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-22T21:15:21+01:00

Commit Message:
FREESCAPE: refactored init code and added onscreen controls for driller dos

Changed paths:
    engines/freescape/freescape.h
    engines/freescape/games/driller/amiga.cpp
    engines/freescape/games/driller/c64.cpp
    engines/freescape/games/driller/cpc.cpp
    engines/freescape/games/driller/dos.cpp
    engines/freescape/games/driller/driller.cpp
    engines/freescape/games/driller/zx.cpp


diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 80f604f29db..daf46137bbc 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -486,6 +486,22 @@ private:
 	void drawC64UI(Graphics::Surface *surface) override;
 	void drawAmigaAtariSTUI(Graphics::Surface *surface) override;
 	void onScreenControls(Common::Point mouse) override;
+	void initAmigaAtari();
+	void initDOS();
+	void initZX();
+	void initCPC();
+	void initC64();
+
+	Common::Rect _moveFowardArea;
+	Common::Rect _moveLeftArea;
+	Common::Rect _moveRightArea;
+	Common::Rect _moveBackArea;
+	Common::Rect _moveUpArea;
+	Common::Rect _moveDownArea;
+	Common::Rect _deployDrillArea;
+	Common::Rect _infoScreenArea;
+	Common::Rect _saveGameArea;
+	Common::Rect _loadGameArea;
 
 	Graphics::ManagedSurface *load8bitTitleImage(Common::SeekableReadStream *file, int offset);
 	Graphics::ManagedSurface *load8bitDemoImage(Common::SeekableReadStream *file, int offset);
diff --git a/engines/freescape/games/driller/amiga.cpp b/engines/freescape/games/driller/amiga.cpp
index f1a6e01b542..28c1037ecc2 100644
--- a/engines/freescape/games/driller/amiga.cpp
+++ b/engines/freescape/games/driller/amiga.cpp
@@ -217,4 +217,19 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
 	}
 }
 
+void DrillerEngine::initAmigaAtari() {
+	_viewArea = Common::Rect(36, 16, 284, 118);
+
+	_moveFowardArea = Common::Rect(184, 125, 199, 144);
+	_moveLeftArea = Common::Rect(161, 145, 174, 164);
+	_moveRightArea = Common::Rect(207, 145, 222, 164);
+	_moveBackArea = Common::Rect(184, 152, 199, 171);
+	_moveUpArea = Common::Rect(231, 145, 246, 164);
+	_moveDownArea = Common::Rect(254, 145, 269, 164);
+	_deployDrillArea = Common::Rect(284, 145, 299, 166);
+	_infoScreenArea = Common::Rect(125, 172, 152, 197);
+	_saveGameArea = Common::Rect(9, 145, 39, 154);
+	_loadGameArea = Common::Rect(9, 156, 39, 164);
+}
+
 } // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/driller/c64.cpp b/engines/freescape/games/driller/c64.cpp
index fc9f11c2395..45c32204c1c 100644
--- a/engines/freescape/games/driller/c64.cpp
+++ b/engines/freescape/games/driller/c64.cpp
@@ -26,6 +26,10 @@
 
 namespace Freescape {
 
+void DrillerEngine::initC64() {
+	_viewArea = Common::Rect(32, 16, 288, 119);
+}
+
 void DrillerEngine::loadAssetsC64FullGame() {
 	Common::File file;
 	if (_targetName.hasPrefix("spacestationoblivion")) {
diff --git a/engines/freescape/games/driller/cpc.cpp b/engines/freescape/games/driller/cpc.cpp
index ced3e80c64e..f441d8bc449 100644
--- a/engines/freescape/games/driller/cpc.cpp
+++ b/engines/freescape/games/driller/cpc.cpp
@@ -27,6 +27,10 @@
 
 namespace Freescape {
 
+void DrillerEngine::initCPC() {
+	_viewArea = Common::Rect(36, 16, 284, 117);
+}
+
 byte kCPCPaletteTitleData[4][3] = {
 	{0x00, 0x00, 0x00},
 	{0x00, 0x80, 0xff},
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index fa948e5c330..cdd28d974c9 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -29,6 +29,24 @@ namespace Freescape {
 extern byte kCGAPalettePinkBlueWhiteData[4][3];
 extern byte kEGADefaultPaletteData[16][3];
 
+void DrillerEngine::initDOS() {
+	if (_renderMode == Common::kRenderEGA)
+		_viewArea = Common::Rect(40, 16, 280, 117);
+	else if (_renderMode == Common::kRenderCGA)
+		_viewArea = Common::Rect(36, 16, 284, 117);
+	else
+		error("Invalid or unknown render mode");
+
+	_moveFowardArea = Common::Rect(73, 144, 101, 152);
+	_moveLeftArea = Common::Rect(73, 150, 86, 159);
+	_moveRightArea = Common::Rect(88, 152, 104, 160);
+	_moveBackArea = Common::Rect(73, 160, 101, 168);
+	_moveUpArea = Common::Rect(219, 144, 243, 155);
+	_moveDownArea = Common::Rect(219, 157, 243, 167);
+	_deployDrillArea = Common::Rect(140, 175, 179, 191);
+	_infoScreenArea = Common::Rect(130, 125, 188, 144);
+}
+
 /*
  The following functions are only used for decoding title images for
  the US release of Driller ("Space Station Oblivion")
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 088f353b997..90a0a65a030 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -41,22 +41,16 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 	if (!Common::parseBool(ConfMan.get("automatic_drilling"), _useAutomaticDrilling))
 		error("Failed to parse bool from automatic_drilling option");
 
-	if (isDOS()) {
-		if (_renderMode == Common::kRenderEGA)
-			_viewArea = Common::Rect(40, 16, 280, 117);
-		else if (_renderMode == Common::kRenderCGA)
-			_viewArea = Common::Rect(36, 16, 284, 117);
-		else
-			error("Invalid or unknown render mode");
-	}
+	if (isDOS())
+		initDOS();
 	else if (isAmiga() || isAtariST())
-		_viewArea = Common::Rect(36, 16, 284, 118);
+		initAmigaAtari();
 	else if (isSpectrum())
-		_viewArea = Common::Rect(56, 20, 264, 124);
+		initZX();
 	else if (isCPC())
-		_viewArea = Common::Rect(36, 16, 284, 117);
+		initCPC();
 	else if (isC64())
-		_viewArea = Common::Rect(32, 16, 288, 119);
+		initC64();
 
 	_playerHeightNumber = 1;
 	_playerHeights.push_back(16);
@@ -826,44 +820,30 @@ bool DrillerEngine::checkIfGameEnded() {
 }
 
 void DrillerEngine::onScreenControls(Common::Point mouse) {
-
-	if (isAmiga() || isAtariST()) {
-		Common::Rect arrowFoward(184, 125, 199, 144);
-		Common::Rect arrowLeft(161, 145, 174, 164);
-		Common::Rect arrowRight(207, 145, 222, 164);
-		Common::Rect arrowBack(184, 152, 199, 171);
-		Common::Rect arrowUp(231, 145, 246, 164);
-		Common::Rect arrowDown(254, 145, 269, 164);
-		Common::Rect deployDrill(284, 145, 299, 166);
-		Common::Rect infoScreen(125, 172, 152, 197);
-		Common::Rect saveGame(9, 145, 39, 154);
-		Common::Rect loadGame(9, 156, 39, 164);
-
-		if (arrowFoward.contains(mouse))
-			move(kForwardMovement, _scaleVector.x(), 20.0);
-		else if (arrowLeft.contains(mouse))
-			move(kLeftMovement, _scaleVector.y(), 20.0);
-		else if (arrowRight.contains(mouse))
-			move(kRightMovement, _scaleVector.y(), 20.0);
-		else if (arrowBack.contains(mouse))
-			move(kBackwardMovement, _scaleVector.x(), 20.0);
-		else if (arrowUp.contains(mouse))
-			rise();
-		else if (arrowDown.contains(mouse))
-			lower();
-		else if (deployDrill.contains(mouse))
-			pressedKey(Common::KEYCODE_d);
-		else if (infoScreen.contains(mouse))
-			drawInfoMenu();
-		else if (saveGame.contains(mouse)) {
-			_gfx->setViewport(_fullscreenViewArea);
-			saveGameDialog();
-			_gfx->setViewport(_viewArea);
-		} else if (loadGame.contains(mouse)) {
-			_gfx->setViewport(_fullscreenViewArea);
-			loadGameDialog();
-			_gfx->setViewport(_viewArea);
-		}
+	if (_moveFowardArea.contains(mouse))
+		move(kForwardMovement, _scaleVector.x(), 20.0);
+	else if (_moveLeftArea.contains(mouse))
+		move(kLeftMovement, _scaleVector.y(), 20.0);
+	else if (_moveRightArea.contains(mouse))
+		move(kRightMovement, _scaleVector.y(), 20.0);
+	else if (_moveBackArea.contains(mouse))
+		move(kBackwardMovement, _scaleVector.x(), 20.0);
+	else if (_moveUpArea.contains(mouse))
+		rise();
+	else if (_moveDownArea.contains(mouse))
+		lower();
+	else if (_deployDrillArea.contains(mouse))
+		pressedKey(Common::KEYCODE_d);
+	else if (_infoScreenArea.contains(mouse))
+		drawInfoMenu();
+	else if (_saveGameArea.contains(mouse)) {
+		_gfx->setViewport(_fullscreenViewArea);
+		saveGameDialog();
+		_gfx->setViewport(_viewArea);
+	} else if (_loadGameArea.contains(mouse)) {
+		_gfx->setViewport(_fullscreenViewArea);
+		loadGameDialog();
+		_gfx->setViewport(_viewArea);
 	}
 }
 
diff --git a/engines/freescape/games/driller/zx.cpp b/engines/freescape/games/driller/zx.cpp
index a8f1a4658e3..65e933b81dc 100644
--- a/engines/freescape/games/driller/zx.cpp
+++ b/engines/freescape/games/driller/zx.cpp
@@ -25,6 +25,10 @@
 
 namespace Freescape {
 
+void DrillerEngine::initZX() {
+	_viewArea = Common::Rect(56, 20, 264, 124);
+}
+
 void DrillerEngine::loadAssetsZXFullGame() {
 	Common::File file;
 	file.open("driller.zx.title");


Commit: 9a42ae69575f20170268380d0e6d19e16cc4ad02
    https://github.com/scummvm/scummvm/commit/9a42ae69575f20170268380d0e6d19e16cc4ad02
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-22T21:15:21+01:00

Commit Message:
HYPNO: allow to use click to skip some screens

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


diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index e090d64b523..cc26695a51a 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -442,6 +442,7 @@ void WetEngine::runAfterArcade(ArcadeShooting *arc) {
 				case Common::EVENT_RETURN_TO_LAUNCHER:
 					break;
 
+				case Common::EVENT_LBUTTONDOWN:
 				case Common::EVENT_KEYDOWN:
 					bonusCounter = _bonus;
 					drawString("scifi08.fgx", Common::String::format("%-20s = %3d pts", "BONUS", _bonus), 60, 116, 0, c);
@@ -592,6 +593,7 @@ void WetEngine::runBeforeArcade(ArcadeShooting *arc) {
 				case Common::EVENT_RETURN_TO_LAUNCHER:
 					break;
 
+				case Common::EVENT_LBUTTONDOWN:
 				case Common::EVENT_KEYDOWN:
 					if (showedBriefing) {
 						endedBriefing = true;




More information about the Scummvm-git-logs mailing list