[Scummvm-cvs-logs] CVS: scummvm/graphics animation.cpp,1.8,1.9

James Brown ender at users.sourceforge.net
Sat Jul 10 21:42:13 CEST 2004


Update of /cvsroot/scummvm/scummvm/graphics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32342/graphics

Modified Files:
	animation.cpp 
Log Message:
Use extrapath in Sword1 engine (from 0.6.0 branch). More verbose errors to go with the forthcoming new manual. Sword1 CD swapping doesn't work as expected HERE, either :)


Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- animation.cpp	28 Jun 2004 22:35:20 -0000	1.8
+++ animation.cpp	11 Jul 2004 04:41:47 -0000	1.9
@@ -23,6 +23,7 @@
 #include "graphics/animation.h"
 #include "common/file.h"
 #include "sound/audiostream.h"
+#include "common/config-manager.h"
 
 namespace Graphics {
 
@@ -46,6 +47,8 @@
 
 
 bool BaseAnimationState::init(const char *name) {
+	const Common::String ePath = ConfMan.get("extrapath");
+
 #ifdef USE_MPEG2
 	char tempFile[512];
 
@@ -62,7 +65,7 @@
 
 	File f;
 
-	if (!f.open(tempFile)) {
+	if (!f.open(tempFile) && !f.open(tempFile, File::kFileReadMode, ePath.c_str())) {
 		warning("Cutscene: %s palette missing", tempFile);
 		return false;
 	}
@@ -111,7 +114,8 @@
 	// Open MPEG2 stream
 	mpgfile = new File();
 	sprintf(tempFile, "%s.mp2", name);
-	if (!mpgfile->open(tempFile)) {
+	if (!mpgfile->open(tempFile) && 
+	    !mpgfile->open(tempFile, File::kFileReadMode, ePath.c_str())) {
 		warning("Cutscene: Could not open %s", tempFile);
 		return false;
 	}
@@ -130,6 +134,8 @@
 
 	// Play audio
 	bgSoundStream = AudioStream::openStreamFile(name);
+	if (bgSoundStream == NULL)
+		bgSoundStream = AudioStream::openStreamFile(name, ePath.c_str());
 
 	if (bgSoundStream != NULL) {
 		_snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);





More information about the Scummvm-git-logs mailing list