aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJames Brown2004-07-11 04:41:48 +0000
committerJames Brown2004-07-11 04:41:48 +0000
commit9756a420a3629900783c63f1bc4778c08e2c969b (patch)
tree80124eac426f0a93ac6a4767ab669a5186a48eed /graphics
parent26f4df6aa35199522be4111da17e38f7a6ffbd61 (diff)
downloadscummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.tar.gz
scummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.tar.bz2
scummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.zip
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 :)
svn-id: r14188
Diffstat (limited to 'graphics')
-rw-r--r--graphics/animation.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/animation.cpp b/graphics/animation.cpp
index 0b5aba1e99..c5dcef267e 100644
--- a/graphics/animation.cpp
+++ b/graphics/animation.cpp
@@ -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 @@ BaseAnimationState::~BaseAnimationState() {
bool BaseAnimationState::init(const char *name) {
+ const Common::String ePath = ConfMan.get("extrapath");
+
#ifdef USE_MPEG2
char tempFile[512];
@@ -62,7 +65,7 @@ bool BaseAnimationState::init(const char *name) {
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 @@ bool BaseAnimationState::init(const char *name) {
// 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 @@ bool BaseAnimationState::init(const char *name) {
// 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);