- Added 3DO platform
- talkSpeed and copryprotection are now global to all engines - Fixed music and sound configuration svn-id: r20891
This commit is contained in:
parent
b558663e84
commit
ba6c48583c
1 changed files with 27 additions and 40 deletions
|
@ -169,12 +169,10 @@ Boolean StartScummVM() {
|
||||||
UInt32 stackSize;
|
UInt32 stackSize;
|
||||||
Boolean toLauncher, direct, isARM;
|
Boolean toLauncher, direct, isARM;
|
||||||
UInt8 engine;
|
UInt8 engine;
|
||||||
|
|
||||||
UInt16 musicDriver = sysInvalidRefNum; // for launch call
|
|
||||||
UInt16 index = GamGetSelected();
|
|
||||||
|
|
||||||
Char num[6];
|
Char num[6];
|
||||||
|
|
||||||
|
UInt16 index = GamGetSelected();
|
||||||
|
|
||||||
argvP = ArgsInit();
|
argvP = ArgsInit();
|
||||||
direct = false;
|
direct = false;
|
||||||
|
|
||||||
|
@ -302,6 +300,7 @@ Boolean StartScummVM() {
|
||||||
// not a PC version
|
// not a PC version
|
||||||
if (gameInfoP->setPlatform) {
|
if (gameInfoP->setPlatform) {
|
||||||
static const char *platform[] = {
|
static const char *platform[] = {
|
||||||
|
"3do",
|
||||||
"acorn",
|
"acorn",
|
||||||
"amiga",
|
"amiga",
|
||||||
"atari",
|
"atari",
|
||||||
|
@ -331,17 +330,14 @@ Boolean StartScummVM() {
|
||||||
ArgsAdd(&argvP[argc], "--tempo=", num, &argc);
|
ArgsAdd(&argvP[argc], "--tempo=", num, &argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine == ENGINE_SCUMM || engine == ENGINE_SAGA) {
|
|
||||||
// talk speed
|
// talk speed
|
||||||
if (gameInfoP->talkSpeed) {
|
if (gameInfoP->talkSpeed) {
|
||||||
StrIToA(num, gameInfoP->talkValue);
|
StrIToA(num, gameInfoP->talkValue);
|
||||||
ArgsAdd(&argvP[argc], "--talkspeed=", num, &argc);
|
ArgsAdd(&argvP[argc], "--talkspeed=", num, &argc);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// music driver
|
// music driver
|
||||||
musicDriver = gameInfoP->musicInfo.sound.music;
|
if (gameInfoP->musicInfo.sound.music) {
|
||||||
if (musicDriver) {
|
|
||||||
switch (gameInfoP->musicInfo.sound.drvMusic) {
|
switch (gameInfoP->musicInfo.sound.drvMusic) {
|
||||||
case 0: // NULL
|
case 0: // NULL
|
||||||
ArgsAdd(&argvP[argc], "-e", "null", &argc);
|
ArgsAdd(&argvP[argc], "-e", "null", &argc);
|
||||||
|
@ -372,9 +368,18 @@ Boolean StartScummVM() {
|
||||||
ArgsAdd(&argvP[argc], "-e", "pcspk", &argc);
|
ArgsAdd(&argvP[argc], "-e", "pcspk", &argc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else // NULL as default
|
// output rate
|
||||||
|
UInt32 rates[] = {4000, 8000, 11025, 22050, 44100};
|
||||||
|
StrIToA(num, rates[gameInfoP->musicInfo.sound.rate]);
|
||||||
|
ArgsAdd(&argvP[argc], "--output-rate=", num, &argc);
|
||||||
|
|
||||||
|
// FM quality
|
||||||
|
gVars->fmQuality = gameInfoP->fmQuality;
|
||||||
|
|
||||||
|
} else {
|
||||||
ArgsAdd(&argvP[argc], "-e", "null", &argc);
|
ArgsAdd(&argvP[argc], "-e", "null", &argc);
|
||||||
|
}
|
||||||
|
|
||||||
// volume control
|
// volume control
|
||||||
StrIToA(num, gameInfoP->musicInfo.volume.sfx);
|
StrIToA(num, gameInfoP->musicInfo.volume.sfx);
|
||||||
|
@ -384,25 +389,9 @@ Boolean StartScummVM() {
|
||||||
StrIToA(num, gameInfoP->musicInfo.volume.speech);
|
StrIToA(num, gameInfoP->musicInfo.volume.speech);
|
||||||
ArgsAdd(&argvP[argc], "-r", num, &argc);
|
ArgsAdd(&argvP[argc], "-r", num, &argc);
|
||||||
|
|
||||||
// output rate
|
|
||||||
if (gameInfoP->musicInfo.sound.sfx) {
|
|
||||||
UInt32 rates[] = {4000, 8000, 11025, 22050, 44100};
|
|
||||||
StrIToA(num, rates[gameInfoP->musicInfo.sound.rate]);
|
|
||||||
ArgsAdd(&argvP[argc], "--output-rate=", num, &argc);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FM quality
|
|
||||||
gVars->fmQuality = gameInfoP->fmQuality;
|
|
||||||
|
|
||||||
// game name
|
// game name
|
||||||
ArgsAdd(&argvP[argc], gameInfoP->gameP, NULL, &argc);
|
ArgsAdd(&argvP[argc], gameInfoP->gameP, NULL, &argc);
|
||||||
|
|
||||||
// use sound
|
|
||||||
if (!gameInfoP->musicInfo.sound.sfx) { // FIXME : not the good way to do it
|
|
||||||
// OPTIONS_RST(kOptSonyPa1LibAPI);
|
|
||||||
// OPTIONS_RST(kOptPalmSoundAPI);
|
|
||||||
}
|
|
||||||
|
|
||||||
// others globals data
|
// others globals data
|
||||||
gVars->CD.enable = gameInfoP->musicInfo.sound.CD;
|
gVars->CD.enable = gameInfoP->musicInfo.sound.CD;
|
||||||
gVars->CD.driver = gameInfoP->musicInfo.sound.drvCD;
|
gVars->CD.driver = gameInfoP->musicInfo.sound.drvCD;
|
||||||
|
@ -410,7 +399,7 @@ Boolean StartScummVM() {
|
||||||
gVars->CD.volume = gameInfoP->musicInfo.volume.audiocd;
|
gVars->CD.volume = gameInfoP->musicInfo.volume.audiocd;
|
||||||
gVars->CD.defaultTrackLength = gameInfoP->musicInfo.sound.defaultTrackLength;
|
gVars->CD.defaultTrackLength = gameInfoP->musicInfo.sound.defaultTrackLength;
|
||||||
gVars->CD.firstTrack = gameInfoP->musicInfo.sound.firstTrack;
|
gVars->CD.firstTrack = gameInfoP->musicInfo.sound.firstTrack;
|
||||||
gVars->palmVolume = musicDriver ? gameInfoP->musicInfo.volume.palm : 0;
|
gVars->palmVolume = gameInfoP->musicInfo.sound.music ? gameInfoP->musicInfo.volume.palm : 0;
|
||||||
|
|
||||||
MemHandleUnlock(recordH);
|
MemHandleUnlock(recordH);
|
||||||
} // end no game / game selected
|
} // end no game / game selected
|
||||||
|
@ -429,18 +418,16 @@ Boolean StartScummVM() {
|
||||||
ArgsAdd(&argvP[argc], "--alt-intro", NULL, &argc);
|
ArgsAdd(&argvP[argc], "--alt-intro", NULL, &argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine == ENGINE_SCUMM || engine == ENGINE_SAGA) {
|
|
||||||
// copy protection ?
|
|
||||||
if (gPrefs->copyProtection)
|
|
||||||
ArgsAdd(&argvP[argc], "--copy-protection", NULL, &argc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (engine == ENGINE_SCUMM) {
|
if (engine == ENGINE_SCUMM) {
|
||||||
// demo mode ?
|
// demo mode ?
|
||||||
if (gPrefs->demoMode)
|
if (gPrefs->demoMode)
|
||||||
ArgsAdd(&argvP[argc], "--demo-mode", NULL, &argc);
|
ArgsAdd(&argvP[argc], "--demo-mode", NULL, &argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// copy protection ?
|
||||||
|
if (gPrefs->copyProtection)
|
||||||
|
ArgsAdd(&argvP[argc], "--copy-protection", NULL, &argc);
|
||||||
|
|
||||||
// exceed max args ?
|
// exceed max args ?
|
||||||
if (argc > MAX_ARG)
|
if (argc > MAX_ARG)
|
||||||
FrmCustomAlert(FrmErrorAlert, "Too many parameters.",0,0);
|
FrmCustomAlert(FrmErrorAlert, "Too many parameters.",0,0);
|
||||||
|
@ -474,14 +461,14 @@ Boolean StartScummVM() {
|
||||||
|
|
||||||
if (gVars->vibrator)
|
if (gVars->vibrator)
|
||||||
HWR_SET(INIT_VIBRATOR);
|
HWR_SET(INIT_VIBRATOR);
|
||||||
|
/* ????
|
||||||
if ( musicDriver == 1 ||
|
if ( musicDriver == 1 ||
|
||||||
musicDriver == 3 ||
|
musicDriver == 3 ||
|
||||||
musicDriver == 4 ||
|
musicDriver == 4 ||
|
||||||
musicDriver == sysInvalidRefNum) {
|
musicDriver == sysInvalidRefNum) {
|
||||||
HWR_SET(INIT_PA1LIB);
|
HWR_SET(INIT_PA1LIB);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (ModImport(gVars->VFS.volRefNum, engine, &isARM) != errNone) {
|
if (ModImport(gVars->VFS.volRefNum, engine, &isARM) != errNone) {
|
||||||
if (bDirectMode) {
|
if (bDirectMode) {
|
||||||
// and force exit if nothing selected
|
// and force exit if nothing selected
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue