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

neuromancer noreply at scummvm.org
Mon Apr 18 10:40:42 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:
4ba39b6421 HYPNO: fixed uninitialized variables in ArcadeShooting
0f5d1089d3 HYPNO: avoid unitialized field in Level class
b51b2519d8 HYPNO: make sure images are deallocated correctly from the main menu in wet


Commit: 4ba39b64213afa7bae044a76db6ca2f99777634c
    https://github.com/scummvm/scummvm/commit/4ba39b64213afa7bae044a76db6ca2f99777634c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-18T12:40:12+02:00

Commit Message:
HYPNO: fixed uninitialized variables in ArcadeShooting

Changed paths:
    engines/hypno/grammar.h


diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index cee2c81d3a9..f428f3e3493 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -527,6 +527,10 @@ public:
 		objMissesAllowed[0] = 0;
 		objMissesAllowed[1] = 0;
 		frameDelay = 0;
+		targetSoundRate = 0; // TODO: unused
+		shootSoundRate = 0;
+		enemySoundRate = 0;
+		hitSoundRate = 0;
 	}
 	void clear() {
 		nextLevelVideo.clear();
@@ -553,6 +557,10 @@ public:
 		objMissesAllowed[0] = 0;
 		objMissesAllowed[1] = 0;
 		mouseBox = Common::Rect(0, 0, 320, 200);
+		targetSoundRate = 0;
+		shootSoundRate = 0;
+		enemySoundRate = 0;
+		hitSoundRate = 0;
 	}
 
 	uint32 id;


Commit: 0f5d1089d3f118a73ca2e8fb0e2f2cb5357300c0
    https://github.com/scummvm/scummvm/commit/0f5d1089d3f118a73ca2e8fb0e2f2cb5357300c0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-18T12:40:12+02:00

Commit Message:
HYPNO: avoid unitialized field in Level class

Changed paths:
    engines/hypno/grammar.h


diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index f428f3e3493..a35dd49eab2 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -337,6 +337,7 @@ enum LevelType {
 class Level {
 public:
 	Level() {
+		type = CodeLevel;
 		musicRate = 22050;
 	}
 	virtual ~Level() {} // needed to make Level polymorphic


Commit: b51b2519d857557d7b37149d45e94353bca191a1
    https://github.com/scummvm/scummvm/commit/b51b2519d857557d7b37149d45e94353bca191a1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-18T12:40:12+02:00

Commit Message:
HYPNO: make sure images are deallocated correctly from the main menu in wet

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


diff --git a/engines/hypno/wet/hard.cpp b/engines/hypno/wet/hard.cpp
index aaad9643390..3bdb94b44f5 100644
--- a/engines/hypno/wet/hard.cpp
+++ b/engines/hypno/wet/hard.cpp
@@ -182,8 +182,14 @@ void WetEngine::runMainMenu(Code *code) {
 	_name.toLowercase();
 	bool found = loadProfile(_name);
 
-	if (found)
+	if (found) {
+		menu->free();
+		delete menu;
+		overlay->free();
+		delete overlay;
 		return;
+	}
+
 
 	saveProfile(_name, _ids[_lastLevel]);
 
@@ -252,7 +258,10 @@ void WetEngine::runMainMenu(Code *code) {
 
 	_difficulty = difficulties[idx];
 	_nextLevel = code->levelIfWin;
-
+	menu->free();
+	delete menu;
+	overlay->free();
+	delete overlay;
 }
 
 void WetEngine::showDemoScore() {




More information about the Scummvm-git-logs mailing list