[Scummvm-git-logs] scummvm master -> 14be2ff5e96b68760facd2e21650ec9703494521

neuromancer noreply at scummvm.org
Sun Feb 27 19:34:54 UTC 2022


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:
14be2ff5e9 HYPNO: enabled screen offset in the x axis in wet


Commit: 14be2ff5e96b68760facd2e21650ec9703494521
    https://github.com/scummvm/scummvm/commit/14be2ff5e96b68760facd2e21650ec9703494521
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-27T20:33:24+01:00

Commit Message:
HYPNO: enabled screen offset in the x axis in wet

Changed paths:
    engines/hypno/arcade.cpp


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 18c177be9bc..728d3f74506 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -188,7 +188,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 	_shoots.clear();
 	_skipLevel = false;
 
-	MVideo background = MVideo(arc->backgroundVideo, Common::Point(0, 0), false, false, false);
+	Common::Point offset;
+	MVideo background = MVideo(arc->backgroundVideo, offset, false, false, false);
 
 	changeCursor("arcade");
 	playVideo(background);
@@ -262,6 +263,22 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 
 			case Common::EVENT_MOUSEMOVE:
 				drawCursorArcade(mousePos);
+				if (mousePos.x <= 100 && offset.x < 0) {
+					for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
+						if (it->video && it->video->decoder)
+							it->video->position.x = it->video->position.x + 1;
+					}
+					offset.x = offset.x + 1;
+					needsUpdate = true;
+				} else if (mousePos.x >= 300 && offset.x > 320 - background.decoder->getWidth()) {
+					for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
+						if (it->video && it->video->decoder)
+							it->video->position.x = it->video->position.x - 1;
+					}
+					offset.x = offset.x - 1;
+					needsUpdate = true;
+				}
+				background.position = offset;
 				break;
 
 			default:
@@ -382,7 +399,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 							loadPalette((byte *) &p, s.paletteOffset, s.paletteSize);
 							_shoots.push_back(s);
 						} else {
-							s.video = new MVideo(it->animation, it->position, true, false, false);
+							s.video = new MVideo(it->animation, offset + it->position, true, false, false);
 							playVideo(*s.video);
 							s.video->decoder->decodeNextFrame(); // Make sure the palette is loaded
 							if (s.attackFrames.size() == 0) {




More information about the Scummvm-git-logs mailing list