Minor cleanup
svn-id: r24333
This commit is contained in:
parent
ed89778036
commit
8925e814a7
6 changed files with 28 additions and 31 deletions
|
@ -2403,7 +2403,7 @@ void AGOSEngine::loadMusic(uint music) {
|
||||||
if (f.isOpen() == false)
|
if (f.isOpen() == false)
|
||||||
error("loadMusic: Can't load music from '%s'", filename);
|
error("loadMusic: Can't load music from '%s'", filename);
|
||||||
|
|
||||||
if (getGameId() == GID_SIMON1DEMO)
|
if (getFeatures() & GF_DEMO)
|
||||||
midi.loadS1D (&f);
|
midi.loadS1D (&f);
|
||||||
else
|
else
|
||||||
midi.loadSMF (&f, music);
|
midi.loadSMF (&f, music);
|
||||||
|
|
|
@ -722,8 +722,8 @@ static const AGOSGameDescription gameDescriptions[] = {
|
||||||
},
|
},
|
||||||
|
|
||||||
GType_ELVIRA1,
|
GType_ELVIRA1,
|
||||||
GID_ELVIRA1DEMO,
|
GID_ELVIRA1,
|
||||||
GF_OLD_BUNDLE | GF_CRUNCHED,
|
GF_OLD_BUNDLE | GF_CRUNCHED | GF_DEMO,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Elvira - English Atari ST Floppy
|
// Elvira - English Atari ST Floppy
|
||||||
|
@ -930,8 +930,8 @@ static const AGOSGameDescription gameDescriptions[] = {
|
||||||
},
|
},
|
||||||
|
|
||||||
GType_SIMON1,
|
GType_SIMON1,
|
||||||
GID_SIMON1AMIGADEMO,
|
GID_SIMON1AMIGA,
|
||||||
GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE,
|
GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE | GF_DEMO,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Simon the Sorcerer 1 - English Amiga AGA Floppy
|
// Simon the Sorcerer 1 - English Amiga AGA Floppy
|
||||||
|
@ -1026,8 +1026,8 @@ static const AGOSGameDescription gameDescriptions[] = {
|
||||||
},
|
},
|
||||||
|
|
||||||
GType_SIMON1,
|
GType_SIMON1,
|
||||||
GID_SIMON1DEMO,
|
GID_SIMON1DOS,
|
||||||
GF_OLD_BUNDLE,
|
GF_OLD_BUNDLE | GF_DEMO,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Simon the Sorcerer 1 - English DOS Floppy
|
// Simon the Sorcerer 1 - English DOS Floppy
|
||||||
|
|
|
@ -209,7 +209,8 @@ enum GameFeatures {
|
||||||
GF_OLD_BUNDLE = 1 << 1,
|
GF_OLD_BUNDLE = 1 << 1,
|
||||||
GF_CRUNCHED = 1 << 2,
|
GF_CRUNCHED = 1 << 2,
|
||||||
GF_ZLIBCOMP = 1 << 3,
|
GF_ZLIBCOMP = 1 << 3,
|
||||||
GF_32COLOR = 1 << 4
|
GF_32COLOR = 1 << 4,
|
||||||
|
GF_DEMO = 1 << 5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GameFileTypes {
|
enum GameFileTypes {
|
||||||
|
@ -227,14 +228,11 @@ enum GameFileTypes {
|
||||||
|
|
||||||
enum GameIds {
|
enum GameIds {
|
||||||
GID_ELVIRA1,
|
GID_ELVIRA1,
|
||||||
GID_ELVIRA1DEMO,
|
|
||||||
GID_ELVIRA2,
|
GID_ELVIRA2,
|
||||||
GID_WAXWORKS,
|
GID_WAXWORKS,
|
||||||
|
|
||||||
GID_SIMON1DOS,
|
GID_SIMON1DOS,
|
||||||
GID_SIMON1DEMO,
|
|
||||||
GID_SIMON1AMIGA,
|
GID_SIMON1AMIGA,
|
||||||
GID_SIMON1AMIGADEMO,
|
|
||||||
GID_SIMON1CD32,
|
GID_SIMON1CD32,
|
||||||
GID_SIMON1TALKIE,
|
GID_SIMON1TALKIE,
|
||||||
|
|
||||||
|
|
|
@ -552,7 +552,7 @@ void MidiPlayer::loadS1D(Common::File *in, bool sfx) {
|
||||||
|
|
||||||
uint16 size = in->readUint16LE();
|
uint16 size = in->readUint16LE();
|
||||||
if (size != in->size() - 2) {
|
if (size != in->size() - 2) {
|
||||||
error("Size mismatch in simon1demo MUS file (%ld versus reported %d)", (long)in->size() - 2, (int)size);
|
error("Size mismatch in MUS file (%ld versus reported %d)", (long)in->size() - 2, (int)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->data = (byte *)calloc(size, 1);
|
p->data = (byte *)calloc(size, 1);
|
||||||
|
|
|
@ -660,23 +660,21 @@ bool AGOSEngine::loadVGAFile(uint id, uint type) {
|
||||||
if (getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformAtariST) {
|
if (getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformAtariST) {
|
||||||
if (getFeatures() & GF_TALKIE) {
|
if (getFeatures() & GF_TALKIE) {
|
||||||
sprintf(filename, "%.3d%d.out", id, type);
|
sprintf(filename, "%.3d%d.out", id, type);
|
||||||
|
} else if (getGameType() == GType_ELVIRA1 && getFeatures() & GF_DEMO) {
|
||||||
|
if (id == 20)
|
||||||
|
sprintf(filename, "D%d.out", type);
|
||||||
|
else if (id == 26)
|
||||||
|
sprintf(filename, "J%d.out", type);
|
||||||
|
else if (id == 27)
|
||||||
|
sprintf(filename, "K%d.out", type);
|
||||||
|
else if (id == 33)
|
||||||
|
sprintf(filename, "Q%d.out", type);
|
||||||
|
else if (id == 34)
|
||||||
|
sprintf(filename, "R%d.out", type);
|
||||||
|
else
|
||||||
|
sprintf(filename, "%.1d%d.out", id, type);
|
||||||
} else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
|
} else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
|
||||||
if (getGameId() == GID_ELVIRA1DEMO) {
|
sprintf(filename, "%.2d%d.pkd", id, type);
|
||||||
if (id == 20)
|
|
||||||
sprintf(filename, "D%d.out", type);
|
|
||||||
else if (id == 26)
|
|
||||||
sprintf(filename, "J%d.out", type);
|
|
||||||
else if (id == 27)
|
|
||||||
sprintf(filename, "K%d.out", type);
|
|
||||||
else if (id == 33)
|
|
||||||
sprintf(filename, "Q%d.out", type);
|
|
||||||
else if (id == 34)
|
|
||||||
sprintf(filename, "R%d.out", type);
|
|
||||||
else
|
|
||||||
sprintf(filename, "%.1d%d.out", id, type);
|
|
||||||
} else {
|
|
||||||
sprintf(filename, "%.2d%d.pkd", id, type);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
sprintf(filename, "%.3d%d.pkd", id, type);
|
sprintf(filename, "%.3d%d.pkd", id, type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,10 +133,11 @@ char *AGOSEngine::genSaveName(int slot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AGOSEngine::quickLoadOrSave() {
|
void AGOSEngine::quickLoadOrSave() {
|
||||||
// The demo of Simon 1 (DOS Floppy) is missing too many segments
|
// Quick load & save is only supported complete version of Simon the Sorcerer 1/2
|
||||||
// and the Feeble Files doesn't always allow a load or save
|
if (getGameType() != GType_SIMON1 && getGameType() != GType_SIMON2 &&
|
||||||
if (getGameId() == GID_SIMON1DEMO || getGameType() == GType_FF)
|
!(getFeatures() & GF_DEMO)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
char buf[50];
|
char buf[50];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue