aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2008-07-27 10:36:26 +0000
committerTravis Howell2008-07-27 10:36:26 +0000
commite0503bc5499614399bf5778c66ff0b7f4e5e4b07 (patch)
tree582c6e5c1d2e71b8b13bb45a52e539b9409d8869 /engines
parent5ca78661b1f57aee500a4d9e5d6a22b5c3e17731 (diff)
downloadscummvm-rg350-e0503bc5499614399bf5778c66ff0b7f4e5e4b07.tar.gz
scummvm-rg350-e0503bc5499614399bf5778c66ff0b7f4e5e4b07.tar.bz2
scummvm-rg350-e0503bc5499614399bf5778c66ff0b7f4e5e4b07.zip
Search common directory, when loading frames and talks in Amiga verison of BRA.
svn-id: r33327
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk.h2
-rw-r--r--engines/parallaction/disk_br.cpp42
2 files changed, 33 insertions, 11 deletions
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index 694d4efa6d..5b00baeb04 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -239,7 +239,7 @@ class AmigaDisk_br : public DosDisk_br {
protected:
BackgroundInfo _backgroundTemp;
- Sprites* createSprites(const char *name);
+ Sprites* createSprites(Common::ReadStream &stream);
Font *createFont(const char *name, Common::SeekableReadStream &stream);
void loadMask(BackgroundInfo& info, const char *name);
void loadBackground(BackgroundInfo& info, const char *name);
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index ee1e111139..035d0d13c5 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -576,13 +576,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {
return new GfxObj(0, new SurfaceToFrames(surf));
}
-Sprites* AmigaDisk_br::createSprites(const char *path) {
-
- Common::File stream;
- if (!stream.open(path)) {
- errorFileNotFound(path);
- }
-
+Sprites* AmigaDisk_br::createSprites(Common::ReadStream &stream) {
uint16 num = stream.readUint16BE();
Sprites *sprites = new Sprites(num);
@@ -609,16 +603,44 @@ Frames* AmigaDisk_br::loadFrames(const char* name) {
char path[PATH_LEN];
sprintf(path, "%s/anims/%s", _partPath, name);
- return createSprites(path);
+ Common::File stream;
+ if (!stream.open(path)) {
+ sprintf(path, "%s/anims/%s.ani", _partPath, name);
+ if (!stream.open(path)) {
+ sprintf(path, "common/anims/%s", name);
+ if (!stream.open(path)) {
+ sprintf(path, "common/anims/%s.ani", name);
+ if (!stream.open(path)) {
+ errorFileNotFound(path);
+ }
+ }
+ }
+ }
+
+ return createSprites(stream);
}
GfxObj* AmigaDisk_br::loadTalk(const char *name) {
debugC(1, kDebugDisk, "AmigaDisk_br::loadTalk '%s'", name);
+ Common::File stream;
+
char path[PATH_LEN];
- sprintf(path, "%s/talks/%s.tal", _partPath, name);
+ sprintf(path, "%s/talks/%s", _partPath, name);
+ if (!stream.open(path)) {
+ sprintf(path, "%s/talks/%s.tal", _partPath, name);
+ if (!stream.open(path)) {
+ sprintf(path, "common/talks/%s", name);
+ if (!stream.open(path)) {
+ sprintf(path, "common/talks/%s.tal", name);
+ if (!stream.open(path)) {
+ errorFileNotFound(path);
+ }
+ }
+ }
+ }
- return new GfxObj(0, createSprites(path));
+ return new GfxObj(0, createSprites(stream));
}
Font* AmigaDisk_br::loadFont(const char* name) {