[Scummvm-git-logs] scummvm master -> 0ef2b7027012fa72cfb8b200fb3b99cc5ca822ad

bluegr noreply at scummvm.org
Sat Apr 12 23:24:01 UTC 2025


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

Summary:
e184162769 ALG: Remove unused variable
73dba21303 ALG: Remove unimplemented function
0ef2b70270 ALG: Simplify iterator references


Commit: e18416276945c52100e669830bd0d0cd2e274d3b
    https://github.com/scummvm/scummvm/commit/e18416276945c52100e669830bd0d0cd2e274d3b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-04-13T02:23:27+03:00

Commit Message:
ALG: Remove unused variable

Changed paths:
    engines/alg/game.cpp
    engines/alg/game.h


diff --git a/engines/alg/game.cpp b/engines/alg/game.cpp
index 4d250799a97..1b567b9b8fd 100644
--- a/engines/alg/game.cpp
+++ b/engines/alg/game.cpp
@@ -375,11 +375,6 @@ void Game::removeCursorTimer() {
 }
 
 void Game::runCursorTimer() {
-	if (_gameTimer & 1) {
-		_gameTimer++;
-	} else {
-		_gameTimer += 3;
-	}
 	_thisGameTimer += 2;
 	if (_whichGun == 9) {
 		if (_emptyCount > 0) {
@@ -497,7 +492,6 @@ void Game::sceneIsoPause(Scene *scene) {
 		uint32 pauseStart = atoi(scene->_insopParam.c_str());
 		uint32 pauseEnd = atoi(scene->_insopParam.c_str()) + _videoFrameSkip + 1;
 		if (_currentFrame >= pauseStart && _currentFrame < pauseEnd && !_hadPause) {
-			_gameTimer = 0;
 			uint32 pauseDuration = scene->_dataParam1 * 0x90FF / 1000;
 			_pauseTime = pauseDuration;
 			_nextFrameTime += pauseDuration;
diff --git a/engines/alg/game.h b/engines/alg/game.h
index d99228365c3..a2de5ee2530 100644
--- a/engines/alg/game.h
+++ b/engines/alg/game.h
@@ -150,7 +150,6 @@ protected:
 	bool _fired = 0;
 	uint32 _currentFrame;
 	bool _gameInProgress = false;
-	uint32 _gameTimer = 0;
 	uint32 _thisGameTimer = 0;
 	bool _hadPause = false;
 	bool _holster = false;


Commit: 73dba213033c472d968a0abba80e746a699e54f0
    https://github.com/scummvm/scummvm/commit/73dba213033c472d968a0abba80e746a699e54f0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-04-13T02:23:29+03:00

Commit Message:
ALG: Remove unimplemented function

Changed paths:
    engines/alg/scene.h


diff --git a/engines/alg/scene.h b/engines/alg/scene.h
index 5084d71e838..07e994296d4 100644
--- a/engines/alg/scene.h
+++ b/engines/alg/scene.h
@@ -150,7 +150,6 @@ private:
 	Common::Array<Scene *> _scenes;
 	Common::Array<Zone *> _zones;
 
-	void parseStart(Common::String sceneName);
 	void parseScene(Common::String sceneName, uint32 startFrame, uint32 endFrame);
 	void parseZone(Common::String zoneName, uint32 startFrame, uint32 endFrame);
 	void addZonesToScenes();


Commit: 0ef2b7027012fa72cfb8b200fb3b99cc5ca822ad
    https://github.com/scummvm/scummvm/commit/0ef2b7027012fa72cfb8b200fb3b99cc5ca822ad
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-04-13T02:23:30+03:00

Commit Message:
ALG: Simplify iterator references

Changed paths:
    engines/alg/logic/game_bountyhunter.cpp
    engines/alg/logic/game_crimepatrol.cpp
    engines/alg/logic/game_drugwars.cpp
    engines/alg/logic/game_johnnyrock.cpp
    engines/alg/logic/game_maddog.cpp
    engines/alg/logic/game_maddog2.cpp
    engines/alg/logic/game_spacepirates.cpp


diff --git a/engines/alg/logic/game_bountyhunter.cpp b/engines/alg/logic/game_bountyhunter.cpp
index 2ba4b930a47..7acee46a45f 100644
--- a/engines/alg/logic/game_bountyhunter.cpp
+++ b/engines/alg/logic/game_bountyhunter.cpp
@@ -309,7 +309,7 @@ void GameBountyHunter::verifyScriptFunctions() {
 BHScriptFunctionRect GameBountyHunter::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameBountyHunter::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -346,7 +346,7 @@ BHScriptFunctionScene GameBountyHunter::getScriptFunctionScene(SceneFuncType typ
 	BHScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameBountyHunter::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
diff --git a/engines/alg/logic/game_crimepatrol.cpp b/engines/alg/logic/game_crimepatrol.cpp
index a157e3c679a..5c6a177f960 100644
--- a/engines/alg/logic/game_crimepatrol.cpp
+++ b/engines/alg/logic/game_crimepatrol.cpp
@@ -254,7 +254,7 @@ void GameCrimePatrol::verifyScriptFunctions() {
 CPScriptFunctionRect GameCrimePatrol::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameCrimePatrol::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -291,7 +291,7 @@ CPScriptFunctionScene GameCrimePatrol::getScriptFunctionScene(SceneFuncType type
 	CPScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameCrimePatrol::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
diff --git a/engines/alg/logic/game_drugwars.cpp b/engines/alg/logic/game_drugwars.cpp
index 370fc14a437..7cf4e4a854a 100644
--- a/engines/alg/logic/game_drugwars.cpp
+++ b/engines/alg/logic/game_drugwars.cpp
@@ -202,7 +202,7 @@ void GameDrugWars::verifyScriptFunctions() {
 DWScriptFunctionRect GameDrugWars::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameDrugWars::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -239,7 +239,7 @@ DWScriptFunctionScene GameDrugWars::getScriptFunctionScene(SceneFuncType type, C
 	DWScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameDrugWars::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
@@ -984,7 +984,7 @@ void GameDrugWars::debugWarpTo(int val) {
 }
 
 // Debugger methods
-DebuggerDrugWars::DebuggerDrugWars(GameDrugWars *game) : GUI::Debugger() {
+DebuggerDrugWars::DebuggerDrugWars(GameDrugWars *game) {
 	_game = game;
 	registerVar("drawRects", &game->_debug_drawRects);
 	registerVar("godMode", &game->_debug_godMode);
diff --git a/engines/alg/logic/game_johnnyrock.cpp b/engines/alg/logic/game_johnnyrock.cpp
index 201f6f2c998..d5dcc6b31bc 100644
--- a/engines/alg/logic/game_johnnyrock.cpp
+++ b/engines/alg/logic/game_johnnyrock.cpp
@@ -238,7 +238,7 @@ void GameJohnnyRock::verifyScriptFunctions() {
 JRScriptFunctionPoint GameJohnnyRock::getScriptFunctionZonePtrFb(Common::String name) {
 	auto it = _zonePtrFb.find(name);
 	if (it != _zonePtrFb.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameJohnnyRock::getScriptFunctionZonePtrFb(): Could not find zonePtrFb function: %s", name.c_str());
 	}
@@ -247,7 +247,7 @@ JRScriptFunctionPoint GameJohnnyRock::getScriptFunctionZonePtrFb(Common::String
 JRScriptFunctionRect GameJohnnyRock::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameJohnnyRock::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -284,7 +284,7 @@ JRScriptFunctionScene GameJohnnyRock::getScriptFunctionScene(SceneFuncType type,
 	JRScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameJohnnyRock::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
diff --git a/engines/alg/logic/game_maddog.cpp b/engines/alg/logic/game_maddog.cpp
index a8d1843bc69..9f1570e516e 100644
--- a/engines/alg/logic/game_maddog.cpp
+++ b/engines/alg/logic/game_maddog.cpp
@@ -255,7 +255,7 @@ void GameMaddog::verifyScriptFunctions() {
 MDScriptFunctionPoint GameMaddog::getScriptFunctionZonePtrFb(Common::String name) {
 	auto it = _zonePtrFb.find(name);
 	if (it != _zonePtrFb.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog::getScriptFunctionZonePtrFb(): Could not find zonePtrFb function: %s", name.c_str());
 	}
@@ -264,7 +264,7 @@ MDScriptFunctionPoint GameMaddog::getScriptFunctionZonePtrFb(Common::String name
 MDScriptFunctionRect GameMaddog::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -301,7 +301,7 @@ MDScriptFunctionScene GameMaddog::getScriptFunctionScene(SceneFuncType type, Com
 	MDScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
diff --git a/engines/alg/logic/game_maddog2.cpp b/engines/alg/logic/game_maddog2.cpp
index a037cfa2ad0..d24792e4b0a 100644
--- a/engines/alg/logic/game_maddog2.cpp
+++ b/engines/alg/logic/game_maddog2.cpp
@@ -269,7 +269,7 @@ void GameMaddog2::verifyScriptFunctions() {
 MD2ScriptFunctionPoint GameMaddog2::getScriptFunctionZonePtrFb(Common::String name) {
 	auto it = _zonePtrFb.find(name);
 	if (it != _zonePtrFb.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog2::getScriptFunctionZonePtrFb(): Could not find zonePtrFb function: %s", name.c_str());
 	}
@@ -278,7 +278,7 @@ MD2ScriptFunctionPoint GameMaddog2::getScriptFunctionZonePtrFb(Common::String na
 MD2ScriptFunctionRect GameMaddog2::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog2::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -315,7 +315,7 @@ MD2ScriptFunctionScene GameMaddog2::getScriptFunctionScene(SceneFuncType type, C
 	MD2ScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameMaddog2::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}
diff --git a/engines/alg/logic/game_spacepirates.cpp b/engines/alg/logic/game_spacepirates.cpp
index d8b4430012c..c8606f788ea 100644
--- a/engines/alg/logic/game_spacepirates.cpp
+++ b/engines/alg/logic/game_spacepirates.cpp
@@ -272,7 +272,7 @@ void GameSpacePirates::verifyScriptFunctions() {
 SPScriptFunctionRect GameSpacePirates::getScriptFunctionRectHit(Common::String name) {
 	auto it = _rectHitFuncs.find(name);
 	if (it != _rectHitFuncs.end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameSpacePirates::getScriptFunctionRectHit(): Could not find rectHit function: %s", name.c_str());
 	}
@@ -312,7 +312,7 @@ SPScriptFunctionScene GameSpacePirates::getScriptFunctionScene(SceneFuncType typ
 	SPScriptFunctionSceneMap::iterator it;
 	it = functionMap->find(name);
 	if (it != functionMap->end()) {
-		return (*(*it)._value);
+		return *it->_value;
 	} else {
 		error("GameSpacePirates::getScriptFunctionScene(): Could not find scene type %u function: %s", type, name.c_str());
 	}




More information about the Scummvm-git-logs mailing list