[Scummvm-git-logs] scummvm master -> e9d826b1a44e23593f406aa9dc0facc4e6f8ae65

neuromancer noreply at scummvm.org
Mon Jun 13 07:21:17 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:
01b15ef4d5 HYPNO: save and load flashback mode field in boyz
228a6e5e32 HYPNO: correctly initialize noAmmoSoundRate
e9d826b1a4 HYPNO: correctly initialize previousHealth and civiliansShoots fields


Commit: 01b15ef4d5b7de72a6c7a7fb99c6db09937cea7c
    https://github.com/scummvm/scummvm/commit/01b15ef4d5b7de72a6c7a7fb99c6db09937cea7c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-13T09:18:10+02:00

Commit Message:
HYPNO: save and load flashback mode field in boyz

Changed paths:
    engines/hypno/boyz/arcade.cpp
    engines/hypno/boyz/boyz.cpp
    engines/hypno/boyz/hard.cpp


diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 8b82bf299ff..7283d75f3d9 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -29,8 +29,11 @@ namespace Hypno {
 void BoyzEngine::runBeforeArcade(ArcadeShooting *arc) {
 	_checkpoint = _currentLevel;
 	_lastStats = _stats;
-	if (!_name.empty()) // if name is name, then we are testing some level
+	if (!_name.empty() && !_flashbackMode) {
+		// if name is empty or we are flashback mode,
+		// then we are testing some level
 		saveProfile(_name, int(arc->id));
+	}
 
 	if (arc->mode == "YM") {
 		assert(!arc->player.empty());
@@ -82,6 +85,11 @@ void BoyzEngine::runAfterArcade(ArcadeShooting *arc) {
 	}
 	_playerFrames.clear();
 
+	if (_flashbackMode) {
+		resetStatistics();
+		_nextLevel = "<select_t1>";
+		return;
+	}
 
 	if (_health <= 0) {
 		if (_arcadeMode == "YS")
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 5ca524d7c1c..4aad0436c45 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -1039,6 +1039,7 @@ Common::Error BoyzEngine::saveGameStream(Common::WriteStream *stream, bool isAut
 	stream->writeUint32LE(_globalStats.friendliesEncountered);
 	stream->writeUint32LE(_globalStats.infoReceived);
 
+	stream->writeUint32LE(_flashbackMode);
 	saveSceneState(stream);
 	return Common::kNoError;
 }
@@ -1068,6 +1069,7 @@ Common::Error BoyzEngine::loadGameStream(Common::SeekableReadStream *stream) {
 	_globalStats.friendliesEncountered = stream->readUint32LE();
 	_globalStats.infoReceived = stream->readUint32LE();
 
+	_flashbackMode = stream->readUint32LE();
 	loadSceneState(stream);
 	if (_unlockAllLevels) {
 		_nextLevel = "<select_t1>";
diff --git a/engines/hypno/boyz/hard.cpp b/engines/hypno/boyz/hard.cpp
index 1617674303f..dc598d81434 100644
--- a/engines/hypno/boyz/hard.cpp
+++ b/engines/hypno/boyz/hard.cpp
@@ -52,6 +52,7 @@ void BoyzEngine::runMainMenu(Code *code) {
 	resetSceneState();
 	resetStatistics();
 	_globalStats = ArcadeStats();
+	_flashbackMode = false;
 
 	Common::Event event;
 	byte *palette;
@@ -116,6 +117,8 @@ void BoyzEngine::runMainMenu(Code *code) {
 		_nextLevel = code->levelIfWin;
 	} else if (_unlockAllLevels) {
 		_nextLevel = "<select_t1>";
+		unlockAllLevels();
+		_flashbackMode = true;
 	}
 
 	assert(!_nextLevel.empty());
@@ -194,6 +197,7 @@ void BoyzEngine::runDifficultyMenu(Code *code) {
 		if (_unlockAllLevels) {
 			_nextLevel = "<select_t1>";
 			unlockAllLevels();
+			_flashbackMode = true;
 		} else
 			_nextLevel = code->levelIfWin;
 	}
@@ -330,8 +334,10 @@ void BoyzEngine::runCheckHo(Code *code) {
 }
 
 void BoyzEngine::endCredits(Code *code) {
+	_flashbackMode = true;
+	saveProfile(_name, 59);
 	showCredits();
-	_nextLevel = "<main_menu>";
+	_nextLevel = "<select_t1>";
 }
 
 void BoyzEngine::showCredits() {


Commit: 228a6e5e3259461e1846ff205ec2895365975ccb
    https://github.com/scummvm/scummvm/commit/228a6e5e3259461e1846ff205ec2895365975ccb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-13T09:18:10+02:00

Commit Message:
HYPNO: correctly initialize noAmmoSoundRate

Changed paths:
    engines/hypno/grammar.h


diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index c9ba7904c6b..b128eecf270 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -606,6 +606,7 @@ public:
 		enemySoundRate = 0;
 		hitSoundRate = 0;
 		additionalSoundRate = 0;
+		noAmmoSoundRate = 0;
 	}
 	void clear() {
 		nextLevelVideo.clear();


Commit: e9d826b1a44e23593f406aa9dc0facc4e6f8ae65
    https://github.com/scummvm/scummvm/commit/e9d826b1a44e23593f406aa9dc0facc4e6f8ae65
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-13T09:18:10+02:00

Commit Message:
HYPNO: correctly initialize previousHealth and civiliansShoots fields

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


diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 4aad0436c45..19e5078f7e9 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -69,6 +69,8 @@ BoyzEngine::BoyzEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine
 	_currentMode = NonInteractive;
 	_crosshairsPalette = nullptr;
 	_lastLevel = 0;
+	_previousHealth = 0;
+	_civiliansShoot = 0;
 	_selectedCorrectBox = 0;
 	_flashbackMode = false;
 
@@ -854,7 +856,6 @@ void BoyzEngine::loadAssets() {
 	_weaponMaxAmmo[7] = 25; // Boat machine-gun
 
 	_maxHealth = 100;
-	_civiliansShoot = 0;
 	_warningVideosDay.push_back("");
 	_warningVideosDay.push_back("warnings/w01s.smk");
 	_warningVideosDay.push_back("warnings/w02s.smk");




More information about the Scummvm-git-logs mailing list