[Scummvm-git-logs] scummvm master -> 78903a3c51a78bdc07d30238a68e558c6276c391
sev-
noreply at scummvm.org
Sat Apr 29 10:08:40 UTC 2023
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:
78903a3c51 PINK: PDA open from menu does not change pause level
Commit: 78903a3c51a78bdc07d30238a68e558c6276c391
https://github.com/scummvm/scummvm/commit/78903a3c51a78bdc07d30238a68e558c6276c391
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2023-04-29T12:08:37+02:00
Commit Message:
PINK: PDA open from menu does not change pause level
Addresses bug #13860 "PINK: Animations will freeze after exiting PDA"
Changed paths:
engines/pink/objects/actors/lead_actor.cpp
engines/pink/screen.cpp
engines/pink/screen.h
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 3206ba10623..466512fd83a 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -156,7 +156,7 @@ void LeadActor::loadPDA(const Common::String &pageName) {
if (_state != kPDA) {
if (_state == kMoving)
cancelInteraction();
- if (_state != kInventory)
+ if (_state != kInventory && !_page->getGame()->getScreen()->isMenuActive())
_page->pause(true);
_stateBeforePDA = _state;
@@ -317,8 +317,9 @@ void LeadActor::onPDAClose() {
_page->getGame()->getScreen()->loadStage();
_state = _stateBeforePDA;
+ _stateBeforePDA = kUndefined;
if (_state != kInventory)
- _page->pause(0);
+ _page->pause(false);
}
bool LeadActor::isInteractingWith(const Actor *actor) const {
diff --git a/engines/pink/screen.cpp b/engines/pink/screen.cpp
index 3505a3d148e..583afccc1a3 100644
--- a/engines/pink/screen.cpp
+++ b/engines/pink/screen.cpp
@@ -233,6 +233,10 @@ void Screen::pause(bool pause_) {
}
}
+bool Screen::isMenuActive() {
+ return _wm != nullptr && _wm->isMenuActive();
+}
+
void Screen::saveStage() {
_savedSprites = _sprites;
clear();
diff --git a/engines/pink/screen.h b/engines/pink/screen.h
index 52918990673..1055901c588 100644
--- a/engines/pink/screen.h
+++ b/engines/pink/screen.h
@@ -69,6 +69,7 @@ public:
void clear();
void pause(bool pause);
+ bool isMenuActive();
void saveStage();
void loadStage();
More information about the Scummvm-git-logs
mailing list