[Scummvm-git-logs] scummvm master -> dce7b42720ec3a3c332c3a2464b3ba89a4e0bf11
neuromancer
noreply at scummvm.org
Sun Jan 16 10:36:54 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bf30dc7ee9 HYPNO: correct pointer during conversations in spider
dce7b42720 HYPNO: better errors when functions are not implemented
Commit: bf30dc7ee9aec158af2bb2103873c7505466e318
https://github.com/scummvm/scummvm/commit/bf30dc7ee9aec158af2bb2103873c7505466e318
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-16T11:21:54+01:00
Commit Message:
HYPNO: correct pointer during conversations in spider
Changed paths:
engines/hypno/hypno.h
engines/hypno/scene.cpp
engines/hypno/spider/talk.cpp
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 7b3755d42d7..e3498bc6047 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -247,7 +247,7 @@ public:
virtual void showConversation();
virtual void rightClickedConversation(const Common::Point &mousePos);
virtual void leftClickedConversation(const Common::Point &mousePos);
-
+ virtual bool hoverConversation(const Common::Point &mousePos);
// Credits
virtual void showCredits();
@@ -313,6 +313,7 @@ public:
void showConversation() override;
void rightClickedConversation(const Common::Point &mousePos) override;
void leftClickedConversation(const Common::Point &mousePos) override;
+ bool hoverConversation(const Common::Point &mousePos) override;
void loadGame(const Common::String &nextLevel, int puzzleDifficulty, int combatDifficulty) override;
Common::Error loadGameStream(Common::SeekableReadStream *stream) override;
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 7fa5d9b5f39..7f1c065346a 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -348,6 +348,10 @@ void HypnoEngine::runScene(Scene *scene) {
//changeCursor("default");
// The following functions will return true
// if the cursor is changed
+
+ if (!_conversation.empty() && !hoverConversation(mousePos))
+ defaultCursor();
+
if (stack.empty() || !_conversation.empty() || !_videosPlaying.empty())
break;
@@ -537,6 +541,8 @@ void HypnoEngine::runScene(Scene *scene) {
void HypnoEngine::showConversation() { error("Not implemented"); }
void HypnoEngine::rightClickedConversation(const Common::Point &mousePos) { error("Not implemented"); }
void HypnoEngine::leftClickedConversation(const Common::Point &mousePos) { error("Not implemented"); }
+bool HypnoEngine::hoverConversation(const Common::Point &mousePos) { error("Not implemented"); }
+
} // End of namespace Hypno
diff --git a/engines/hypno/spider/talk.cpp b/engines/hypno/spider/talk.cpp
index 6aeecd8be96..61b7c79b116 100644
--- a/engines/hypno/spider/talk.cpp
+++ b/engines/hypno/spider/talk.cpp
@@ -194,4 +194,17 @@ void SpiderEngine::rightClickedConversation(const Common::Point &mousePos) {
runIntros(videos);
}
+bool SpiderEngine::hoverConversation(const Common::Point &mousePos) {
+ Mice mice(_defaultCursor, 1);
+
+ for (Actions::const_iterator itt = _conversation.begin(); itt != _conversation.end(); ++itt) {
+ Talk *a = (Talk *)*itt;
+ if (a->active && a->rect.contains(mousePos)) {
+ runMice(&mice);
+ return true;
+ }
+ }
+ return false;
+}
+
} // End of namespace Hypno
Commit: dce7b42720ec3a3c332c3a2464b3ba89a4e0bf11
https://github.com/scummvm/scummvm/commit/dce7b42720ec3a3c332c3a2464b3ba89a4e0bf11
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-16T11:25:12+01:00
Commit Message:
HYPNO: better errors when functions are not implemented
Changed paths:
engines/hypno/scene.cpp
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 7f1c065346a..de136c0e935 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -230,8 +230,8 @@ bool HypnoEngine::hoverHotspot(Common::Point mousePos) {
return false;
}
-Common::String HypnoEngine::findNextLevel(const Transition *trans) { error("no code!"); }
-Common::String HypnoEngine::findNextLevel(const Common::String &level) { error("no code!"); }
+Common::String HypnoEngine::findNextLevel(const Transition *trans) { error("Function \"%s\" not implemented", __FUNCTION__); }
+Common::String HypnoEngine::findNextLevel(const Common::String &level) { error("Function \"%s\" not implemented", __FUNCTION__); }
void HypnoEngine::runTransition(Transition *trans) {
Common::String nextLevel = findNextLevel(trans);
@@ -538,10 +538,10 @@ void HypnoEngine::runScene(Scene *scene) {
removeTimers();
}
-void HypnoEngine::showConversation() { error("Not implemented"); }
-void HypnoEngine::rightClickedConversation(const Common::Point &mousePos) { error("Not implemented"); }
-void HypnoEngine::leftClickedConversation(const Common::Point &mousePos) { error("Not implemented"); }
-bool HypnoEngine::hoverConversation(const Common::Point &mousePos) { error("Not implemented"); }
+void HypnoEngine::showConversation() { error("Function \"%s\" not implemented", __FUNCTION__); }
+void HypnoEngine::rightClickedConversation(const Common::Point &mousePos) { error("Function \"%s\" not implemented", __FUNCTION__); }
+void HypnoEngine::leftClickedConversation(const Common::Point &mousePos) { error("Function \"%s\" not implemented", __FUNCTION__); }
+bool HypnoEngine::hoverConversation(const Common::Point &mousePos) { error("Function \"%s\" not implemented", __FUNCTION__); }
} // End of namespace Hypno
More information about the Scummvm-git-logs
mailing list