Add GF_LANG_MULT game flag, for detecting differences between the two Amiga versions.

svn-id: r27441
This commit is contained in:
Travis Howell 2007-06-16 02:43:31 +00:00
parent ce8a015c1c
commit 4362692684
5 changed files with 25 additions and 11 deletions

View file

@ -68,8 +68,13 @@ void Archive::open(const char *file) {
error("archive '%s' not found", path); error("archive '%s' not found", path);
bool isSmallArchive = false; bool isSmallArchive = false;
if (_vm->getFeatures() & GF_DEMO) if (_vm->getPlatform() == Common::kPlatformAmiga) {
isSmallArchive = _archive.size() == SIZEOF_SMALL_ARCHIVE; if (_vm->getFeatures() & GF_DEMO) {
isSmallArchive = _archive.size() == SIZEOF_SMALL_ARCHIVE;
} else if (_vm->getFeatures() & GF_LANG_MULT) {
isSmallArchive = (_archive.readUint32BE() != MKID_BE('NDOS'));
}
}
_numFiles = (isSmallArchive) ? SMALL_ARCHIVE_FILES_NUM : NORMAL_ARCHIVE_FILES_NUM; _numFiles = (isSmallArchive) ? SMALL_ARCHIVE_FILES_NUM : NORMAL_ARCHIVE_FILES_NUM;

View file

@ -75,7 +75,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
Common::ADGF_NO_FLAGS Common::ADGF_NO_FLAGS
}, },
GType_Nippon, GType_Nippon,
GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT,
}, },
{ {
@ -98,7 +98,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
Common::ADGF_NO_FLAGS Common::ADGF_NO_FLAGS
}, },
GType_Nippon, GType_Nippon,
GF_LANG_EN | GF_LANG_FR | GF_LANG_DE, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_MULT,
}, },
{ {

View file

@ -1150,11 +1150,19 @@ Font* AmigaFullDisk::loadFont(const char* name) {
char path[PATH_LEN]; char path[PATH_LEN];
sprintf(path, "%sfont", name); sprintf(path, "%sfont", name);
Common::File stream; if (_vm->getFeatures() & GF_LANG_MULT) {
if (!stream.open(path)) if (!_resArchive.openArchivedFile(path))
errorFileNotFound(path); errorFileNotFound(path);
return createFont(name, stream); return createFont(name, _resArchive);
} else {
// Italian version has separate font files?
Common::File stream;
if (!stream.open(path))
errorFileNotFound(path);
return createFont(name, stream);
}
} }

View file

@ -105,7 +105,7 @@ Menu::~Menu() {
void Menu::start() { void Menu::start() {
_vm->_disk->selectArchive((_vm->getPlatform() == Common::kPlatformAmiga) ? "disk0" : "disk1"); _vm->_disk->selectArchive((_vm->getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0");
splash(); splash();
@ -335,7 +335,7 @@ void Menu::selectCharacter() {
_vm->_gfx->setFont(kFontMenu); _vm->_gfx->setFont(kFontMenu);
_vm->_disk->selectArchive((_vm->getPlatform() == Common::kPlatformAmiga) ? "disk0" : "disk1"); _vm->_disk->selectArchive((_vm->getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0");
_vm->_disk->loadSlide("password"); // loads background into kBitBack buffer _vm->_disk->loadSlide("password"); // loads background into kBitBack buffer

View file

@ -64,7 +64,8 @@ enum {
GF_LANG_EN = 1 << 1, GF_LANG_EN = 1 << 1,
GF_LANG_FR = 1 << 2, GF_LANG_FR = 1 << 2,
GF_LANG_DE = 1 << 3, GF_LANG_DE = 1 << 3,
GF_LANG_IT = 1 << 4 GF_LANG_IT = 1 << 4,
GF_LANG_MULT = 1 << 5
}; };