[Scummvm-git-logs] scummvm master -> 65514688aa2db6190fb9f3097cde6b67e8242290
neuromancer
noreply at scummvm.org
Wed Jan 12 20:47:40 UTC 2022
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e64e82adbc HYPNO: disable save/load in spider demo
5d3ea0a079 HYPNO: allow to load during puzzles in spider
a12b84679b HYPNO: reset puzzle state variable when loading in spider
6ebfac05f5 HYPNO: force a refresh after a fullscreen video
65514688aa HYPNO: refactored looping video code
Commit: e64e82adbc1c121724a9e8518e3ffb69add8c792
https://github.com/scummvm/scummvm/commit/e64e82adbc1c121724a9e8518e3ffb69add8c792
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-12T10:55:08+01:00
Commit Message:
HYPNO: disable save/load in spider demo
Changed paths:
engines/hypno/hypno.h
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index bdd02b29518..c2ff7e6cacd 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -124,9 +124,9 @@ public:
bool cursorExit(Common::Point);
bool cursorMask(Common::Point);
- bool canLoadGameStateCurrently() override { return true; }
+ bool canLoadGameStateCurrently() override { return (isDemo() ? false : true); }
bool canSaveAutosaveCurrently() override { return false; }
- bool canSaveGameStateCurrently() override { return true; }
+ bool canSaveGameStateCurrently() override { return (isDemo() ? false : true); }
Common::String _checkpoint;
Common::String _prefixDir;
Commit: 5d3ea0a07966f39dccaf45e3ff02e62f4c08bac0
https://github.com/scummvm/scummvm/commit/5d3ea0a07966f39dccaf45e3ff02e62f4c08bac0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-12T10:58:33+01:00
Commit Message:
HYPNO: allow to load during puzzles in spider
Changed paths:
engines/hypno/spider/hard.cpp
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index c6e14fb5e05..83f945f1dc7 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -87,7 +87,7 @@ void SpiderEngine::runMatrix(Code *code) {
}
playVideo(*v);
- while (!shouldQuit()) {
+ while (!shouldQuit() && _nextLevel.empty()) {
while (g_system->getEventManager()->pollEvent(event)) {
mousePos = g_system->getEventManager()->getMousePos();
@@ -290,7 +290,7 @@ void SpiderEngine::runNote(Code *code) {
loadImage("spider/int_ball/hnote.smk", 0, 0, false, true);
}
- while (!shouldQuit()) {
+ while (!shouldQuit() && _nextLevel.empty()) {
while (g_system->getEventManager()->pollEvent(event)) {
mousePos = g_system->getEventManager()->getMousePos();
@@ -454,7 +454,7 @@ void SpiderEngine::runFusePanel(Code *code) {
}
}
- while (!shouldQuit()) {
+ while (!shouldQuit() && _nextLevel.empty()) {
while (g_system->getEventManager()->pollEvent(event)) {
mousePos = g_system->getEventManager()->getMousePos();
@@ -571,7 +571,7 @@ void SpiderEngine::runFileCabinet(Code *code) {
drawImage(*nums[comb[i]], sel[i].left, sel[i].top, true);
}
- while (!shouldQuit()) {
+ while (!shouldQuit() && _nextLevel.empty()) {
while (g_system->getEventManager()->pollEvent(event)) {
mousePos = g_system->getEventManager()->getMousePos();
Commit: a12b84679b2c92e11a737ca69a6ea975c845fcf3
https://github.com/scummvm/scummvm/commit/a12b84679b2c92e11a737ca69a6ea975c845fcf3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-12T11:43:26+01:00
Commit Message:
HYPNO: reset puzzle state variable when loading in spider
Changed paths:
engines/hypno/spider/hard.cpp
engines/hypno/spider/spider.cpp
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index 83f945f1dc7..fb648622b78 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -525,7 +525,6 @@ void SpiderEngine::runFusePanel(Code *code) {
else
defaultCursor();
-
default:
break;
}
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 10cfcd6a9fe..78109caaf72 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -1013,6 +1013,17 @@ Common::Error SpiderEngine::loadGameStream(Common::SeekableReadStream *stream) {
_sceneState["GS_PUZZLELEVEL"] = stream->readUint32LE();
_sceneState["GS_COMBATLEVEL"] = stream->readUint32LE();
_nextLevel = stream->readString();
+
+ // Reset state variables from puzzles
+ for (int i = 0; i < 2; i++)
+ for (int j = 0; j < 10; j++)
+ _fuseState[i][j] = 0;
+
+ _isFuseRust = true;
+ _isFuseUnreadable = false;
+ for (int i = 0; i < 7; i++)
+ ingredients[i] = 0;
+
return Common::kNoError;
}
Commit: 6ebfac05f5add7454a3a8b88999dc204a7246354
https://github.com/scummvm/scummvm/commit/6ebfac05f5add7454a3a8b88999dc204a7246354
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-12T21:04:20+01:00
Commit Message:
HYPNO: force a refresh after a fullscreen video
Changed paths:
engines/hypno/scene.cpp
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index c7d96fe636c..699765494fa 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -393,15 +393,17 @@ void HypnoEngine::runScene(Scene *scene) {
it->decoder->rewind();
it->decoder->start();
} else {
+ if (it->scaled ||
+ ( it->currentFrame->w == _screenW
+ && it->currentFrame->h == _screenH
+ && it->decoder->getCurFrame() > 0)) {
+ runMenu(*stack.back());
+ drawScreen();
+ }
it->decoder->close();
delete it->decoder;
it->decoder = nullptr;
videosToRemove.push_back(i);
- if (it->scaled) {
- runMenu(*stack.back());
- drawScreen();
- }
-
}
} else if (it->decoder->needsUpdate()) {
Commit: 65514688aa2db6190fb9f3097cde6b67e8242290
https://github.com/scummvm/scummvm/commit/65514688aa2db6190fb9f3097cde6b67e8242290
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-12T21:47:24+01:00
Commit Message:
HYPNO: refactored looping video code
Changed paths:
engines/hypno/hypno.cpp
engines/hypno/hypno.h
engines/hypno/scene.cpp
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index 20426fd4f7c..420809caf96 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -137,6 +137,7 @@ Common::Error HypnoEngine::run() {
debug("nextLevel: %s", _nextLevel.c_str());
_prefixDir = "";
_videosPlaying.clear();
+ _videosLooping.clear();
if (!_nextLevel.empty()) {
_currentLevel = findNextLevel(_nextLevel);
_nextLevel = "";
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index c2ff7e6cacd..29ed00286db 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -199,9 +199,9 @@ public:
// Movies
Videos _nextSequentialVideoToPlay;
Videos _nextParallelVideoToPlay;
- Videos _nextLoopingVideoToPlay;
Videos _escapeSequentialVideoToPlay;
Videos _videosPlaying;
+ Videos _videosLooping;
// Sounds
Filename _soundPath;
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 699765494fa..7fa5d9b5f39 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -373,39 +373,54 @@ void HypnoEngine::runScene(Scene *scene) {
if (!_nextParallelVideoToPlay.empty()) {
for (Videos::iterator it = _nextParallelVideoToPlay.begin(); it != _nextParallelVideoToPlay.end(); ++it) {
playVideo(*it);
- _videosPlaying.push_back(*it);
+ if (it->loop)
+ _videosLooping.push_back(*it);
+ else
+ _videosPlaying.push_back(*it);
}
_nextParallelVideoToPlay.clear();
}
if (!_nextSequentialVideoToPlay.empty() && _videosPlaying.empty()) {
- playVideo(*_nextSequentialVideoToPlay.begin());
- _videosPlaying.push_back(*_nextSequentialVideoToPlay.begin());
+ MVideo *it = _nextSequentialVideoToPlay.begin();
+ playVideo(*it);
+ if (it->loop)
+ _videosLooping.push_back(*it);
+ else
+ _videosPlaying.push_back(*it);
_nextSequentialVideoToPlay.remove_at(0);
}
+
+ for (Videos::iterator it = _videosLooping.begin(); it != _videosLooping.end(); ++it) {
+ if (it->decoder && _conversation.empty()) {
+ if (it->decoder->endOfVideo()) {
+ if (it->loop && enableLoopingVideos) {
+ it->decoder->rewind();
+ it->decoder->start();
+ }
+ } else if (it->decoder->needsUpdate()) {
+ updateScreen(*it);
+ }
+ }
+ }
+
uint32 i = 0;
videosToRemove.clear();
for (Videos::iterator it = _videosPlaying.begin(); it != _videosPlaying.end(); ++it) {
if (it->decoder) {
if (it->decoder->endOfVideo()) {
- if (it->loop && enableLoopingVideos) {
- it->decoder->rewind();
- it->decoder->start();
- } else {
- if (it->scaled ||
- ( it->currentFrame->w == _screenW
- && it->currentFrame->h == _screenH
- && it->decoder->getCurFrame() > 0)) {
- runMenu(*stack.back());
- drawScreen();
- }
- it->decoder->close();
- delete it->decoder;
- it->decoder = nullptr;
- videosToRemove.push_back(i);
+ if (it->scaled ||
+ ( it->currentFrame->w == _screenW
+ && it->currentFrame->h == _screenH
+ && it->decoder->getCurFrame() > 0)) {
+ runMenu(*stack.back());
+ drawScreen();
}
-
+ it->decoder->close();
+ delete it->decoder;
+ it->decoder = nullptr;
+ videosToRemove.push_back(i);
} else if (it->decoder->needsUpdate()) {
updateScreen(*it);
}
@@ -458,7 +473,7 @@ void HypnoEngine::runScene(Scene *scene) {
}
}
- if (!_videosPlaying.empty() || !_nextSequentialVideoToPlay.empty()) {
+ if (!_videosPlaying.empty() || !_videosLooping.empty() || !_nextSequentialVideoToPlay.empty()) {
drawScreen();
continue;
}
@@ -487,6 +502,11 @@ void HypnoEngine::runScene(Scene *scene) {
}
// Deallocate videos
+ for (Videos::iterator it = _videosLooping.begin(); it != _videosLooping.end(); ++it) {
+ if (it->decoder)
+ skipVideo(*it);
+ }
+
for (Videos::iterator it = _videosPlaying.begin(); it != _videosPlaying.end(); ++it) {
if (it->decoder)
skipVideo(*it);
@@ -507,7 +527,6 @@ void HypnoEngine::runScene(Scene *scene) {
skipVideo(*it);
}
- _nextLoopingVideoToPlay.clear();
_nextParallelVideoToPlay.clear();
_nextSequentialVideoToPlay.clear();
_escapeSequentialVideoToPlay.clear();
More information about the Scummvm-git-logs
mailing list