[Scummvm-git-logs] scummvm master -> 26fbb7673b6d34cd25578a2f520f6234cbf035a5

neuromancer noreply at scummvm.org
Fri Jan 7 20:41:36 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:
26fbb7673b HYPNO: timer and cursor fixes


Commit: 26fbb7673b6d34cd25578a2f520f6234cbf035a5
    https://github.com/scummvm/scummvm/commit/26fbb7673b6d34cd25578a2f520f6234cbf035a5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-07T21:41:15+01:00

Commit Message:
HYPNO: timer and cursor fixes

Changed paths:
    engines/hypno/hypno.cpp
    engines/hypno/scene.cpp
    engines/hypno/spider/spider.cpp


diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index ec1a7217933..6247781c289 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -513,7 +513,6 @@ static void alarmCallback(void *refCon) {
 
 static void countdownCallback(void *refCon) {
 	g_hypno->_countdown = g_hypno->_countdown - 1;
-	debug("countdown: %d", g_hypno->_countdown);
 }
 
 bool HypnoEngine::startAlarm(uint32 delay, Common::String *ns) {
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index cde51b02f56..1e8b4ec464f 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -262,7 +262,7 @@ void HypnoEngine::runScene(Scene *scene) {
 	Common::Point mousePos;
 	Common::List<uint32> videosToRemove;
 	bool enableLoopingVideos = true;
-
+	int32 lastCountdown = 0;
 	// These variables are always resetted
 	_sceneState["GS_LEVELCOMPLETE"] = 0;
 	_sceneState["GS_LEVELWON"] = 0;
@@ -274,7 +274,9 @@ void HypnoEngine::runScene(Scene *scene) {
 	while (!shouldQuit() && _nextLevel.empty()) {
 		
 		if (_timerStarted && _videosPlaying.empty() && !_nextHotsToRemove) {
-			if (_countdown > 0) {
+
+			if (lastCountdown == _countdown) {}
+			else if (_countdown > 0) {
 				uint32 c = _pixelFormat.RGBToColor(255, 0, 0);
 				runMenu(*stack.back());
 				uint32 minutes = _countdown / 60;
@@ -288,6 +290,7 @@ void HypnoEngine::runScene(Scene *scene) {
 				resetSceneState();
 				continue; 
 			}
+			lastCountdown = _countdown;
 		}
 
 		while (g_system->getEventManager()->pollEvent(event)) {
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 304df4273e1..115161af4e4 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -944,6 +944,7 @@ void SpiderEngine::loadAssetsDemo() {
 	matrix->levelIfLose = "sixdemo/mis/demo.mis";
 	_levels["<puz_matr>"] = matrix;
 	_soundPath = "c_misc/sound.lib/";
+	_defaultCursor = "mouse/cursor1.smk";
 	_nextLevel = "<start>";
 }
 




More information about the Scummvm-git-logs mailing list