[Scummvm-git-logs] scummvm master -> d6f2a8948810ed8c7f6d241b7ef194f2ef095d09
whiterandrek
whiterandrek at gmail.com
Thu Aug 16 05:34:00 CEST 2018
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:
486a63d14f PINK: JANITORIAL: formatting fixes
d6f2a89488 PINK: fixed original bug when ActionSfx continues to play when it should stop
Commit: 486a63d14f4e93759ded3e1c1506a575224601bf
https://github.com/scummvm/scummvm/commit/486a63d14f4e93759ded3e1c1506a575224601bf
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2018-08-16T06:33:53+03:00
Commit Message:
PINK: JANITORIAL: formatting fixes
Changed paths:
engines/pink/detection_tables.h
engines/pink/objects/sequences/sequence_context.cpp
diff --git a/engines/pink/detection_tables.h b/engines/pink/detection_tables.h
index be875c4..f6a44bf 100644
--- a/engines/pink/detection_tables.h
+++ b/engines/pink/detection_tables.h
@@ -153,7 +153,7 @@ static const ADGameDescription gameDescriptions[] = {
{
"pokus",
0,
- AD_ENTRY1s("HPP.orb", "b769855e2fc94b9180763211c349a9ed",509498007),
+ AD_ENTRY1s("HPP.orb", "b769855e2fc94b9180763211c349a9ed", 509498007),
Common::NL_NLD,
Common::kPlatformWindows,
ADGF_UNSTABLE | ADGF_DROPPLATFORM,
diff --git a/engines/pink/objects/sequences/sequence_context.cpp b/engines/pink/objects/sequences/sequence_context.cpp
index ff7d4e8..4366fd4 100644
--- a/engines/pink/objects/sequences/sequence_context.cpp
+++ b/engines/pink/objects/sequences/sequence_context.cpp
@@ -43,8 +43,7 @@ void SequenceActorState::execute(uint segment, Sequence *sequence, bool loadingS
SequenceContext::SequenceContext(Sequence *sequence)
: _sequence(sequence), _nextItemIndex(0),
- _segment(1), _actor(nullptr)
-{
+ _segment(1), _actor(nullptr) {
sequence->setContext(this);
Common::Array<SequenceItem *> &items = sequence->getItems();
debug(kPinkDebugScripts, "SequenceContext for %s", _sequence->getName().c_str());
Commit: d6f2a8948810ed8c7f6d241b7ef194f2ef095d09
https://github.com/scummvm/scummvm/commit/d6f2a8948810ed8c7f6d241b7ef194f2ef095d09
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2018-08-16T06:33:53+03:00
Commit Message:
PINK: fixed original bug when ActionSfx continues to play when it should stop
Changed paths:
engines/pink/objects/actions/action_play_with_sfx.cpp
engines/pink/objects/actions/action_play_with_sfx.h
engines/pink/objects/sequences/sequencer.cpp
diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp
index 0c8aa94..3064215 100644
--- a/engines/pink/objects/actions/action_play_with_sfx.cpp
+++ b/engines/pink/objects/actions/action_play_with_sfx.cpp
@@ -29,6 +29,8 @@
namespace Pink {
+bool g_skipping = false; // FIXME: non-const global var
+
ActionPlayWithSfx::~ActionPlayWithSfx() {
ActionPlay::end();
for (uint i = 0; i < _sfxArray.size(); ++i) {
@@ -74,6 +76,12 @@ void ActionPlayWithSfx::onStart() {
void ActionPlayWithSfx::end() {
ActionCEL::end();
debugC(6, kPinkDebugActions, "ActionPlayWithSfx %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
+ // original bug fix
+ if (g_skipping) {
+ for (uint i = 0; i < _sfxArray.size(); ++i) {
+ _sfxArray[i]->end();
+ }
+ }
}
void ActionSfx::deserialize(Pink::Archive &archive) {
@@ -97,4 +105,8 @@ void ActionSfx::play() {
}
}
+void ActionSfx::end() {
+ _sound.stop();
+}
+
} // End of namespace Pink
diff --git a/engines/pink/objects/actions/action_play_with_sfx.h b/engines/pink/objects/actions/action_play_with_sfx.h
index 2797604..16d1855 100644
--- a/engines/pink/objects/actions/action_play_with_sfx.h
+++ b/engines/pink/objects/actions/action_play_with_sfx.h
@@ -28,6 +28,8 @@
namespace Pink {
+extern bool g_skipping;
+
class ActionSfx;
class ActionPlayWithSfx : public ActionPlay {
@@ -61,6 +63,7 @@ public:
void toConsole() override;
void play();
+ void end();
int32 getFrame() { return _frame; }
diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp
index 8885fdc..df5522d 100644
--- a/engines/pink/objects/sequences/sequencer.cpp
+++ b/engines/pink/objects/sequences/sequencer.cpp
@@ -24,6 +24,7 @@
#include "pink/archive.h"
#include "pink/pink.h"
+#include "pink/objects/actions/action_play_with_sfx.h"
#include "pink/objects/actors/lead_actor.h"
#include "pink/objects/pages/game_page.h"
#include "pink/objects/sequences/sequencer.h"
@@ -143,18 +144,27 @@ void Sequencer::removeContext(SequenceContext *context) {
}
void Sequencer::skipSubSequence() {
- if (_context)
+ if (_context) {
+ g_skipping = true;
_context->getSequence()->skipSubSequence();
+ g_skipping = false;
+ }
}
void Sequencer::restartSequence() {
- if (_context)
+ if (_context) {
+ g_skipping = true;
_context->getSequence()->restart();
+ g_skipping = false;
+ }
}
void Sequencer::skipSequence() {
- if (_context && _context->getSequence()->isSkippingAllowed())
+ if (_context && _context->getSequence()->isSkippingAllowed()) {
+ g_skipping = true;
_context->getSequence()->skip();
+ g_skipping = false;
+ }
}
void Sequencer::loadState(Archive &archive) {
More information about the Scummvm-git-logs
mailing list