diff options
author | Travis Howell | 2007-06-15 04:05:57 +0000 |
---|---|---|
committer | Travis Howell | 2007-06-15 04:05:57 +0000 |
commit | 388b8689a6e7d0fd2574bcf589d66fa2cb3393da (patch) | |
tree | 3f9cf864d2634b0c5e28534ffbae0f9afc7accce /engines | |
parent | 4f8f854ee6bd1e681af589a3565ac11ef8bcbc55 (diff) | |
download | scummvm-rg350-388b8689a6e7d0fd2574bcf589d66fa2cb3393da.tar.gz scummvm-rg350-388b8689a6e7d0fd2574bcf589d66fa2cb3393da.tar.bz2 scummvm-rg350-388b8689a6e7d0fd2574bcf589d66fa2cb3393da.zip |
Add basic support for Amiga version.
svn-id: r27411
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/archive.cpp | 9 | ||||
-rw-r--r-- | engines/parallaction/disk.cpp | 15 | ||||
-rw-r--r-- | engines/parallaction/menu.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 13 |
4 files changed, 30 insertions, 9 deletions
diff --git a/engines/parallaction/archive.cpp b/engines/parallaction/archive.cpp index c534fea207..4fba3ef0db 100644 --- a/engines/parallaction/archive.cpp +++ b/engines/parallaction/archive.cpp @@ -22,7 +22,9 @@ * $Id$ * */ +#include "common/stdafx.h" +#include "common/endian.h" #include "common/file.h" #include "parallaction/disk.h" @@ -54,6 +56,7 @@ Archive::Archive() { } void Archive::open(const char *file) { + bool isSmallArchive; debugC(3, kDebugDisk, "Archive::open(%s)", file); if (_archive.isOpen()) @@ -65,7 +68,11 @@ void Archive::open(const char *file) { if (!_archive.open(path)) error("archive '%s' not found", path); - bool isSmallArchive = _archive.size() == SIZEOF_SMALL_ARCHIVE; + if (_vm->getFeatures() & GF_DEMO) { + isSmallArchive = _archive.size() == SIZEOF_SMALL_ARCHIVE; + } else { + isSmallArchive = (_archive.readUint32BE() != MKID_BE('NDOS')); + } _numFiles = (isSmallArchive) ? SMALL_ARCHIVE_FILES_NUM : NORMAL_ARCHIVE_FILES_NUM; diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 0119dfce82..1351c33f91 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -808,7 +808,11 @@ Cnv* AmigaDisk::loadTalk(const char *name) { Common::SeekableReadStream *s; char path[PATH_LEN]; - sprintf(path, "%s.talk", name); + if (_vm->getFeatures() & GF_DEMO) + sprintf(path, "%s.talk", name); + else + sprintf(path, "talk/%s.talk", name); + s = openArchivedFile(path, false); if (s == NULL) { s = openArchivedFile(name, true); @@ -824,7 +828,11 @@ Cnv* AmigaDisk::loadObjects(const char *name) { debugC(1, kDebugDisk, "AmigaDisk::loadObjects"); char path[PATH_LEN]; - sprintf(path, "%s.objs", name); + if (_vm->getFeatures() & GF_DEMO) + sprintf(path, "%s.objs", name); + else + sprintf(path, "objs/%s.objs", name); + Common::SeekableReadStream *s = openArchivedFile(path, true); Cnv *cnv = makeCnv(*s); @@ -1103,6 +1111,9 @@ Table* AmigaDisk::loadTable(const char* name) { dispose = true; stream = s; } else { + if (!(_vm->getFeatures() & GF_DEMO)) + sprintf(path, "objs/%s.table", name); + if (!_resArchive.openArchivedFile(path)) errorFileNotFound(path); diff --git a/engines/parallaction/menu.cpp b/engines/parallaction/menu.cpp index c11c6216c5..b9421db576 100644 --- a/engines/parallaction/menu.cpp +++ b/engines/parallaction/menu.cpp @@ -105,7 +105,7 @@ Menu::~Menu() { void Menu::start() { - _vm->_disk->selectArchive((_vm->getPlatform() == Common::kPlatformPC) ? "disk1" : "disk0"); + _vm->_disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1"); splash(); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 342cce6dc5..cd87313fd2 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -175,11 +175,11 @@ int Parallaction::init() { _baseTime = 0; - if (getPlatform() == Common::kPlatformPC) + if (getPlatform() == Common::kPlatformPC) { _disk = new DosDisk(this); - else { + } else { _disk = new AmigaDisk(this); - _disk->selectArchive("disk0"); + _disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1"); } _engineFlags = 0; @@ -753,10 +753,13 @@ void Parallaction::changeCharacter(const char *name) { // character for sanity before memory is freed freeCharacter(); - _disk->selectArchive((_vm->getPlatform() == Common::kPlatformPC) ? "disk1" : "disk0"); + _disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1"); _vm->_char._ani._cnv = _disk->loadFrames(fullName); if (!IS_DUMMY_CHARACTER(name)) { + if (_vm->getPlatform() == Common::kPlatformAmiga) + _disk->selectArchive("disk0"); + _vm->_char._head = _disk->loadHead(baseName); _vm->_char._talk = _disk->loadTalk(baseName); _vm->_char._objs = _disk->loadObjects(baseName); @@ -765,7 +768,7 @@ void Parallaction::changeCharacter(const char *name) { _soundMan->playCharacterMusic(name); - if ((getFeatures() & GF_DEMO) == 0) + if (!(getFeatures() & GF_DEMO)) parseLocation("common"); } } |