[Scummvm-cvs-logs] SF.net SVN: scummvm:[33327] scummvm/trunk/engines/parallaction
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Jul 27 12:36:26 CEST 2008
Revision: 33327
http://scummvm.svn.sourceforge.net/scummvm/?rev=33327&view=rev
Author: Kirben
Date: 2008-07-27 10:36:26 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
Search common directory, when loading frames and talks in Amiga verison of BRA.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.h
scummvm/trunk/engines/parallaction/disk_br.cpp
Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h 2008-07-27 10:15:57 UTC (rev 33326)
+++ scummvm/trunk/engines/parallaction/disk.h 2008-07-27 10:36:26 UTC (rev 33327)
@@ -239,7 +239,7 @@
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);
Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-27 10:15:57 UTC (rev 33326)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-27 10:36:26 UTC (rev 33327)
@@ -576,13 +576,7 @@
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 @@
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) {
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