[Scummvm-git-logs] scummvm master -> 406ed1ba4c74e0bd3b486db1081892380a25106f
Die4Ever
noreply at scummvm.org
Wed Jan 19 23:13:35 UTC 2022
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:
406ed1ba4c GROOVIE: fast forwarding improvements
Commit: 406ed1ba4c74e0bd3b486db1081892380a25106f
https://github.com/scummvm/scummvm/commit/406ed1ba4c74e0bd3b486db1081892380a25106f
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-01-19T17:13:12-06:00
Commit Message:
GROOVIE: fast forwarding improvements
Fast forward until waitForInput again, also fast forward through fade screens
Changed paths:
engines/groovie/script.cpp
engines/groovie/script.h
engines/groovie/video/vdx.cpp
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 2680f934ef5..3bc54de446d 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -118,6 +118,9 @@ Script::Script(GroovieEngine *vm, EngineVersion version) :
_oldInstruction = (uint16)-1;
_videoSkipAddress = 0;
+ _fastForwarding = false;
+ _eventKbdChar = 0;
+ _eventMouseClicked = 0;
}
Script::~Script() {
@@ -709,7 +712,8 @@ void Script::o_bf9on() { // 0x03
void Script::o_palfadeout() {
debugC(1, kDebugScript, "Groovie::Script: PALFADEOUT");
debugC(2, kDebugVideo, "Groovie::Script: PALFADEOUT");
- _vm->_graphicsMan->fadeOut();
+ if (!_fastForwarding)
+ _vm->_graphicsMan->fadeOut();
}
void Script::o_bf8on() { // 0x05
@@ -916,9 +920,15 @@ bool Script::playvideofromref(uint32 fileref, bool loopUntilAudioDone) {
// End the playback
return true;
- } else if (_eventMouseClicked == 2) {
+ } else if (_eventMouseClicked == 2 || _eventKbdChar == Common::KEYCODE_ESCAPE || _eventKbdChar == Common::KEYCODE_SPACE) {
+ _vm->_videoPlayer->fastForward();
+ _fastForwarding = true;
+ // we don't want to clear a left click here, that would eat the input
+ if (_eventMouseClicked == 2)
+ _eventMouseClicked = 0;
+ _eventKbdChar = 0;
+ } else if (_fastForwarding) {
_vm->_videoPlayer->fastForward();
- _eventMouseClicked = 0;
}
// Video available, play one frame
@@ -1129,6 +1139,7 @@ void Script::o_inputloopend() {
// There's nothing to do until we get some input
_vm->waitForInput();
+ _fastForwarding = DebugMan.isDebugChannelEnabled(kDebugFast);
}
}
@@ -1206,7 +1217,7 @@ void Script::o_sleep() {
uint32 endTime = _vm->_system->getMillis() + time * 3;
Common::Event ev;
- while (_vm->_system->getMillis() < endTime) {
+ while (_vm->_system->getMillis() < endTime && !_fastForwarding) {
_vm->_system->getEventManager()->pollEvent(ev);
_vm->_system->updateScreen();
_vm->_system->delayMillis(10);
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index 5210223b05b..ce0bc43d1aa 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -126,6 +126,7 @@ private:
uint16 _hotspotRightAction;
uint16 _hotspotLeftAction;
uint16 _hotspotSlot;
+ bool _fastForwarding;
// Video
Common::SeekableReadStream *_videoFile;
diff --git a/engines/groovie/video/vdx.cpp b/engines/groovie/video/vdx.cpp
index 94629c635e6..96bdbec2bc6 100644
--- a/engines/groovie/video/vdx.cpp
+++ b/engines/groovie/video/vdx.cpp
@@ -410,7 +410,10 @@ void VDXPlayer::getStill(Common::ReadStream *in) {
// Apply the palette
if (_flagNine) {
// Flag 9 starts a fade in
- fadeIn(_palBuf);
+ if (!isFastForwarding())
+ fadeIn(_palBuf);
+ else
+ setPalette(_palBuf);
} else {
if (!_flagOne && !_flagSeven) {
// Actually apply the palette
More information about the Scummvm-git-logs
mailing list