[Scummvm-cvs-logs] SF.net SVN: scummvm:[40735] scummvm/trunk/engines/sword2

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed May 20 06:29:10 CEST 2009


Revision: 40735
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40735&view=rev
Author:   eriktorbjorn
Date:     2009-05-20 04:29:09 +0000 (Wed, 20 May 2009)

Log Message:
-----------
Removed the rest of the hard-coded cutscene information. It was only needed to
get the number of frames of a cutscene (to find the "lead out frame"), but this
information is already provided by both the DXA and the SMK players. (It wasn't
provided by the now obsolete MPEG player.)

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/animation.cpp
    scummvm/trunk/engines/sword2/animation.h

Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp	2009-05-20 04:07:34 UTC (rev 40734)
+++ scummvm/trunk/engines/sword2/animation.cpp	2009-05-20 04:29:09 UTC (rev 40735)
@@ -46,28 +46,6 @@
 // Basic movie player
 ///////////////////////////////////////////////////////////////////////////////
 
-static const MovieInfo sequenceList[19] = {
-	{ "carib",    222 },
-	{ "escape",   187 },
-	{ "eye",      248 },
-	{ "finale",  1485 },
-	{ "guard",     75 },
-	{ "intro",   1800 },
-	{ "jungle",   186 },
-	{ "museum",   167 },
-	{ "pablo",     75 },
-	{ "pyramid",   60 },
-	{ "quaram",   184 },
-	{ "river",    656 },
-	{ "sailing",  138 },
-	{ "shaman",   788 },
-	{ "stone1",    34 },
-	{ "stone2",   282 },
-	{ "stone3",    65 },
-	{ "demo",      60 },
-	{ "enddemo",  110 }
-};
-
 MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType)
 	: _vm(vm), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system), VideoPlayer(decoder) {
 	_bgSoundStream = NULL;
@@ -84,15 +62,6 @@
  * @param id the id of the file
  */
 bool MoviePlayer::load(const char *name) {
-	_id = -1;
-
-	for (int i = 0; i < ARRAYSIZE(sequenceList); i++) {
-		if (scumm_stricmp(name, sequenceList[i].name) == 0) {
-			_id = i;
-			break;
-		}
-	}
-
 	if (_decoderType == kVideoDecoderDXA) {
 		_bgSoundStream = Audio::AudioStream::openStreamFile(name);
 	} else {
@@ -128,11 +97,9 @@
 	if (_vm->shouldQuit())
 		return;
 
-	if (_id >= 0) {
-		_numFrames = sequenceList[_id].frames;
-		if (_numFrames > 60)
-			_leadOutFrame = _numFrames - 60;
-	}
+	_leadOutFrame = _decoder->getFrameCount();
+	if (_leadOutFrame > 60)
+		_leadOutFrame -= 60;
 
 	_movieTexts = movieTexts;
 	_numMovieTexts = numMovieTexts;

Modified: scummvm/trunk/engines/sword2/animation.h
===================================================================
--- scummvm/trunk/engines/sword2/animation.h	2009-05-20 04:07:34 UTC (rev 40734)
+++ scummvm/trunk/engines/sword2/animation.h	2009-05-20 04:29:09 UTC (rev 40735)
@@ -58,11 +58,6 @@
 	}
 };
 
-struct MovieInfo {
-	const char *name;
-	int frames;
-};
-
 class DXADecoderWithSound : public Graphics::DXADecoder {
 public:
 	DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle);
@@ -97,9 +92,7 @@
 	Audio::SoundHandle *_bgSoundHandle;
 	Audio::AudioStream *_bgSoundStream;
 
-	int _id;
 	uint32 _leadOut;
-	int _numFrames;
 	int _leadOutFrame;
 
 	void performPostProcessing(byte *screen);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list