From 184c15905d1d9b4fc10b91adf5cc4b6f411f0a54 Mon Sep 17 00:00:00 2001 From: Henry Bush Date: Mon, 24 Nov 2008 21:48:40 +0000 Subject: T7G: Add a debug level to play movies fast with no pcm sound (unstable) svn-id: r35165 --- engines/groovie/groovie.cpp | 1 + engines/groovie/groovie.h | 3 ++- engines/groovie/vdx.cpp | 10 +++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 1a4c41b10d..15342965c4 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -55,6 +55,7 @@ GroovieEngine::GroovieEngine(OSystem *syst, GroovieGameDescription *gd) : Common::addSpecialDebugLevel(kGroovieDebugMIDI, "MIDI", "Debug MIDI / XMIDI files"); Common::addSpecialDebugLevel(kGroovieDebugScriptvars, "Scriptvars", "Print out any change to script variables"); Common::addSpecialDebugLevel(kGroovieDebugCell, "Cell", "Debug the cell game (in the microscope)"); + Common::addSpecialDebugLevel(kGroovieDebugFast, "Fast", "Play videos quickly, with no sound (unstable)"); } GroovieEngine::~GroovieEngine() { diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index f1d47f3a33..70e1bb03f8 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -51,7 +51,8 @@ enum kDebugLevels { kGroovieDebugCursor = 1 << 6, kGroovieDebugMIDI = 1 << 7, kGroovieDebugScriptvars = 1 << 8, - kGroovieDebugCell = 1 << 9 + kGroovieDebugCell = 1 << 9, + kGroovieDebugFast = 1 << 10 // the current limitation is 32 debug levels (1 << 31 is the last one) }; diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index b3ef117919..1a260b4ab8 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -161,8 +161,10 @@ bool VDXPlayer::playFrameInternal() { } // Wait until the current frame can be shown - waitFrame(); - + + if (!(Common::getEnabledSpecialDebugLevels() & kGroovieDebugFast)) { + waitFrame(); + } // TODO: Move it to a better place // Update the screen if (currRes == 0x25) { @@ -486,7 +488,9 @@ void VDXPlayer::chunkSound(Common::ReadStream *in) { byte *data = new byte[60000]; int chunksize = in->read(data, 60000); - _audioStream->queueBuffer(data, chunksize); + if (!(Common::getEnabledSpecialDebugLevels() & kGroovieDebugFast)) { + _audioStream->queueBuffer(data, chunksize); + } } void VDXPlayer::fadeIn(uint8 *targetpal) { -- cgit v1.2.3