[Scummvm-git-logs] scummvm master -> 369ef67d3b9f1dc42471d8d6cf4dcef92363d26d

neuromancer noreply at scummvm.org
Sat Apr 30 09:01:11 UTC 2022


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

Summary:
b1b2048201 HYPNO: implemented more original cheats in wet
58564e81a9 HYPNO: fixed assert in transition handling of wet
124eb0f122 HYPNO: correct check of arcade objectives during level c40 in wet
10dbdb0b22 HYPNO: added a barrier on the wrong path in level c40 in wet
b865cb4838 HYPNO: fixed rare crash when shoots are deallocated during arcade sequences
29d23c18e5 HYPNO: more checks for hardcoded endings when missing certain targets in wet
369ef67d3b HYPNO: more UI fixes in wet to correctly place the ammo bar


Commit: b1b2048201b7d9ac0c15c2da2a1596981000c8f1
    https://github.com/scummvm/scummvm/commit/b1b2048201b7d9ac0c15c2da2a1596981000c8f1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: implemented more original cheats in wet

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


diff --git a/engines/hypno/wet/hard.cpp b/engines/hypno/wet/hard.cpp
index 4173fdaff90..4ca581bef52 100644
--- a/engines/hypno/wet/hard.cpp
+++ b/engines/hypno/wet/hard.cpp
@@ -184,6 +184,16 @@ void WetEngine::runMainMenu(Code *code) {
 	} else
 		_lastLevel = 0;
 
+	if (_name == "ELRAPIDO") {
+		_infiniteAmmoCheat = true;
+		playSound("sound/extra.raw", 1);
+	}
+
+	if (_name == "SAVANNAH") {
+		_infiniteHealthCheat = true;
+		playSound("sound/extra.raw", 1);
+	}
+
 	_name.toLowercase();
 	bool found = loadProfile(_name);
 


Commit: 58564e81a951d28c4ee801f381345a8b970c3c3f
    https://github.com/scummvm/scummvm/commit/58564e81a951d28c4ee801f381345a8b970c3c3f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: fixed assert in transition handling of wet

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


diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 5291cc706a3..3c121f6ec05 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -284,8 +284,7 @@ bool WetEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting *
 	ArcadeTransition at = *transitions.begin();
 	int ttime = at.time;
 	if (ttime == 0) { // This special case is only reachable in c33
-		assert(_objIdx == 0);
-		_objIdx = 1;
+		assert(_objIdx == 1);
 		transitions.pop_front();
 	} else if (_background->decoder->getCurFrame() > ttime) {
 


Commit: 124eb0f122fa5011c49e2be07b7e3341f3991df1
    https://github.com/scummvm/scummvm/commit/124eb0f122fa5011c49e2be07b7e3341f3991df1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: correct check of arcade objectives during level c40 in wet

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


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index b2b55c50389..13ec77f471d 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -182,7 +182,11 @@ void HypnoEngine::findNextSegment(ArcadeShooting *arc) { error("Function \"%s\"
 
 byte *HypnoEngine::getTargetColor(Common::String name, int levelId) { error("Function \"%s\" not implemented", __FUNCTION__); }
 
-bool HypnoEngine::checkArcadeObjectives(ArcadeShooting *arc) {
+bool HypnoEngine::availableObjectives() {
+	return (_objKillsRequired[_objIdx] > 0);
+}
+
+bool HypnoEngine::checkArcadeObjectives() {
 	debugC(1, kHypnoDebugArcade, "Checking objective %d (%d/%d)", _objIdx, _objKillsCount[_objIdx], _objKillsRequired[_objIdx]);
 	if (_objKillsRequired[_objIdx] > 0)
 		return (_objKillsCount[_objIdx] >= _objKillsRequired[_objIdx] && \
@@ -377,7 +381,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 		if (segments[_segmentIdx].end || _skipLevel || _loseLevel) {
 			skipVideo(*_background);
 			// Objectives
-			if (!checkArcadeObjectives(arc) && !_skipLevel) {
+			if (!checkArcadeObjectives() && !_skipLevel) {
 				if (!arc->defeatMissBossVideo.empty()) {
 					MVideo video(arc->defeatMissBossVideo, Common::Point(0, 0), false, true, false);
 					disableCursor();
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index f728c14e6b1..01f462e55bf 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -243,7 +243,8 @@ public:
 	Common::String _arcadeMode;
 	MVideo *_background;
 	Filename _currentPalette;
-	virtual bool checkArcadeObjectives(ArcadeShooting *arc);
+	virtual bool availableObjectives();
+	virtual bool checkArcadeObjectives();
 	virtual bool checkTransition(ArcadeTransitions &transitions, ArcadeShooting *arc);
 	virtual Common::Point getPlayerPosition(bool needsUpdate);
 	virtual Common::Point computeTargetPosition(const Common::Point &mousePos);
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 3c121f6ec05..0207f88d748 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -196,7 +196,7 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
 		} else {
 
 			// Objective checking
-			if (checkArcadeObjectives(arc)) {
+			if (availableObjectives() && checkArcadeObjectives()) {
 				if (_objIdx == 0) {
 					_objIdx = 1;
 					if (_arcadeMode == "Y1") {
@@ -306,7 +306,7 @@ bool WetEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting *
 		}
 
 		if (_levelId == 33) {
-			if (checkArcadeObjectives(arc)) {
+			if (checkArcadeObjectives()) {
 				_objIdx = 1;
 			} else {
 				// We do not play the transition, just skip the level
@@ -319,7 +319,7 @@ bool WetEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting *
 			_objIdx = 1;
 		} else if (_levelId == 61 && transitions.size() == 1) {
 			// Check the first objective during the second transition
-			if (checkArcadeObjectives(arc)) {
+			if (checkArcadeObjectives()) {
 				_objIdx = 1;
 			} else {
 				// We do not play the transition, just skip the level


Commit: 10dbdb0b227be0594e02d936cf372ed66dd2bc92
    https://github.com/scummvm/scummvm/commit/10dbdb0b227be0594e02d936cf372ed66dd2bc92
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: added a barrier on the wrong path in level c40 in wet

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


diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 0207f88d748..2af7cb18057 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -239,7 +239,8 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
 				//_segmentShootSequenceOffset = 0; // TODO
 				//_segmentShootSequenceMax = 7; // TODO
 			}
-
+			// TODO: refactor the following code to avoid using a variable here
+			bool addBarrier = false;
 			if (_arcadeMode == "Y4") {
 				if (_c40SegmentPath[_c40SegmentIdx] == _segmentIdx) {
 					_c40SegmentIdx++;
@@ -247,7 +248,7 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
 					if (_c40lastTurn == int(_segmentIdx))
 						_health = 0;
 					else {
-						// TODO: this should also add a barrier near the end
+						addBarrier = true;
 						_c40lastTurn = int(_segmentIdx);
 					}
 				}
@@ -275,6 +276,12 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
 
 				si.timestamp = 30 * (_segmentRepetitionMax + 1) - 3;
 				_shootSequence.push_back(si);
+			} else if (_arcadeMode == "Y4" && addBarrier) {
+				// Add a barrier near the end
+				ShootInfo si;
+				si.name = "SP_BLOCKADE";
+				si.timestamp = (30 * _segmentRepetitionMax) - 20;
+				_shootSequence.push_back(si);
 			}
 		}
 	}


Commit: b865cb4838590f95074d044c3e99467ca1ed5d53
    https://github.com/scummvm/scummvm/commit/b865cb4838590f95074d044c3e99467ca1ed5d53
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: fixed rare crash when shoots are deallocated during arcade sequences

Changed paths:
    engines/hypno/arcade.cpp


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 13ec77f471d..6791b21fe34 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -479,6 +479,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 					incTargetsMissed();
 					// No need to pop attackFrames or explosionFrames
 					skipVideo(*it->video);
+					shootsToRemove.push_back(i);
 				} else if (frame > 0 && frame >= (int)(it->lastFrame)) {
 					skipVideo(*it->video);
 					shootsToRemove.push_back(i);
@@ -497,7 +498,9 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 			i++;
 		}
 		if (shootsToRemove.size() > 0) {
-			for (Common::List<uint32>::iterator it = shootsToRemove.begin(); it != shootsToRemove.end(); ++it) {
+			debugC(1, kHypnoDebugArcade, "Shoots to remove: %d", shootsToRemove.size());
+			Common::sort(shootsToRemove.begin(), shootsToRemove.end());
+			for (Common::List<uint32>::iterator it = shootsToRemove.reverse_begin(); it != shootsToRemove.end(); --it) {
 				debugC(1, kHypnoDebugArcade, "Removing %d from %d size", *it, _shoots.size());
 				delete _shoots[*it].video;
 				_shoots.remove_at(*it);


Commit: 29d23c18e572ea9503cd9a7dedc21d54d8394f73
    https://github.com/scummvm/scummvm/commit/29d23c18e572ea9503cd9a7dedc21d54d8394f73
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: more checks for hardcoded endings when missing certain targets in wet

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


diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 2af7cb18057..8c3bd94cf3e 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -684,10 +684,10 @@ void WetEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
 		_background->decoder->pauseVideo(false);
 		updateScreen(*_background);
 		drawScreen();
-	} else if (_levelId == 60 && s->name == "DOOR1") {
+	} else if (s->name == "DOOR1" || s->name == "DOOR2") {
 		_health = 0;
 		_background->decoder->pauseVideo(true);
-		// In this level, the hit boss video is used to store this ending
+		// In some levels, the hit boss video is used to store this ending
 		MVideo video(arc->hitBoss1Video, Common::Point(0, 0), false, true, false);
 		runIntro(video);
 		loadPalette(arc->backgroundPalette);


Commit: 369ef67d3b9f1dc42471d8d6cf4dcef92363d26d
    https://github.com/scummvm/scummvm/commit/369ef67d3b9f1dc42471d8d6cf4dcef92363d26d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T11:01:38+02:00

Commit Message:
HYPNO: more UI fixes in wet to correctly place the ammo bar

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


diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 514063090d7..e6eb8f3fb96 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -33,7 +33,7 @@ static const chapterEntry rawChapterTable[] = {
 	{21, {70, 160}, {180, 160}, {220, 185}, {44, 162},  kHypnoColorYellow}, // c21
 	{22, {70, 160}, {180, 160}, {220, 185}, {44, 162},  kHypnoColorGreen}, 	// c22
 	{23, {70, 160}, {180, 160}, {220, 185}, {44, 162},  kHypnoColorCyan}, 	// c23
-	{20, {128, 150}, {238, 150},{0,   0},   {0, 0},     kHypnoColorCyan}, 	// c20
+	{20, {128, 150}, {238, 150},{0,   0},   {209, 146}, kHypnoColorCyan}, 	// c20
 	{31, {70, 160}, {180, 160}, {220, 185}, {44, 164},  kHypnoColorGreen}, 	// c31
 	{32, {70, 160}, {180, 160}, {220, 185}, {44, 164},  kHypnoColorRed}, 	// c32
 	{33, {70, 160}, {180, 160}, {220, 185}, {44, 162},  kHypnoColorRed}, 	// c33
@@ -44,7 +44,7 @@ static const chapterEntry rawChapterTable[] = {
 	{44, {70, 160}, {180, 160}, {220, 185}, {44, 162},  kHypnoColorRed}, 	// c44
 	{40, {19, 3},   {246, 3}, 	{246, 11},  {2, 2},     kHypnoColorRed}, 	// c40
 	{51, {60, 167}, {190, 167}, {135, 187}, {136, 163}, kHypnoColorRed}, 	// c51
-	{52, {60, 167}, {190, 167}, {135, 187}, {136, 163}, kHypnoColorRed}, 	// c52
+	{52, {60, 167}, {190, 167}, {135, 187}, {136, 165}, kHypnoColorRed}, 	// c52
 	{50, {19, 3},   {246, 3}, 	{246, 11},  {2, 2}, 	kHypnoColorRed}, 	// c50 (fixed)
 	{61, {63, 167}, {187, 167}, {192, 188}, {152, 185}, kHypnoColorRed}, 	// c61
 	{60, {63, 167}, {187, 167}, {192, 188}, {152, 185}, kHypnoColorRed}, 	// c60




More information about the Scummvm-git-logs mailing list