[Scummvm-git-logs] scummvm master -> b4e311b707b074cb0d337be322009faefdda4cd9
neuromancer
noreply at scummvm.org
Thu Mar 12 12:36:05 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b4e311b707 HYPNO: add subtitles to spiderman conversations
Commit: b4e311b707b074cb0d337be322009faefdda4cd9
https://github.com/scummvm/scummvm/commit/b4e311b707b074cb0d337be322009faefdda4cd9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-03-12T13:07:19+01:00
Commit Message:
HYPNO: add subtitles to spiderman conversations
Changed paths:
engines/hypno/hypno.cpp
engines/hypno/hypno.h
engines/hypno/spider/talk.cpp
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index c89fc668d6c..f12bba6a6c7 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -329,6 +329,19 @@ void HypnoEngine::runIntro(MVideo &video) {
g_system->hideOverlay();
}
+void HypnoEngine::runIntrosWithSubtitles(Videos &videos) {
+ if (videos.empty())
+ return;
+
+ loadSubtitles(Common::Path(videos[0].path));
+ if (!_subtitles)
+ warning("Conversation: failed to load subtitles for video '%s'", videos[0].path.c_str());
+ runIntros(videos);
+ delete _subtitles;
+ _subtitles = nullptr;
+ g_system->hideOverlay();
+}
+
void HypnoEngine::runCode(Code *code) { error("Function \"%s\" not implemented", __FUNCTION__); }
void HypnoEngine::showCredits() { error("Function \"%s\" not implemented", __FUNCTION__); }
void HypnoEngine::loadGame(const Common::String &nextLevel, int score, int puzzleDifficulty, int combatDifficulty) {
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 2c41b5ee7f7..43f6d93bb77 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -268,6 +268,7 @@ public:
// intros
void runIntro(MVideo &video);
void runIntros(Videos &videos);
+ void runIntrosWithSubtitles(Videos &videos);
Common::HashMap<Filename, bool> _intros;
// levels
diff --git a/engines/hypno/spider/talk.cpp b/engines/hypno/spider/talk.cpp
index 740040f36d8..0dcdb9cd250 100644
--- a/engines/hypno/spider/talk.cpp
+++ b/engines/hypno/spider/talk.cpp
@@ -70,7 +70,7 @@ void SpiderEngine::showConversation() {
}
if (videos.size() > 0) {
- runIntros(videos);
+ runIntrosWithSubtitles(videos);
videos.clear();
}
@@ -130,14 +130,14 @@ void SpiderEngine::showConversation() {
}
if (videos.size() > 0) {
- runIntros(videos);
+ runIntrosWithSubtitles(videos);
videos.clear();
}
endConversation();
if (shouldEscape) {
- runIntros(_escapeSequentialVideoToPlay);
+ runIntrosWithSubtitles(_escapeSequentialVideoToPlay);
_escapeSequentialVideoToPlay.clear();
// HACK
@@ -202,8 +202,7 @@ void SpiderEngine::leftClickedConversation(const Common::Point &mousePos) {
_sceneState["GS_LEVELWON"] = true;
}
- if (videos.size() > 0)
- runIntros(videos);
+ runIntrosWithSubtitles(videos);
}
void SpiderEngine::rightClickedConversation(const Common::Point &mousePos) {
@@ -221,8 +220,7 @@ void SpiderEngine::rightClickedConversation(const Common::Point &mousePos) {
}
}
}
- if (videos.size() > 0)
- runIntros(videos);
+ runIntrosWithSubtitles(videos);
}
bool SpiderEngine::hoverConversation(const Common::Point &mousePos) {
More information about the Scummvm-git-logs
mailing list