mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 15:48:48 +00:00
AGI: properly setup Sound var.
svn-id: r49752
This commit is contained in:
parent
0a1a919406
commit
c7e9b620ee
@ -152,7 +152,8 @@ enum AgiGameFeatures {
|
|||||||
GF_MENUS = (1 << 7),
|
GF_MENUS = (1 << 7),
|
||||||
GF_ESCPAUSE = (1 << 8),
|
GF_ESCPAUSE = (1 << 8),
|
||||||
GF_OLDAMIGAV20 = (1 << 9),
|
GF_OLDAMIGAV20 = (1 << 9),
|
||||||
GF_CLIPCOORDS = (1 << 10)
|
GF_CLIPCOORDS = (1 << 10),
|
||||||
|
GF_2GSOLDSOUND = (1 << 11)
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AGIGameDescription;
|
struct AGIGameDescription;
|
||||||
@ -317,6 +318,12 @@ enum AgiComputerType {
|
|||||||
kAgiComputerAmigaOld = 20 // Older Amiga AGI interpreters' value (Seldom used)
|
kAgiComputerAmigaOld = 20 // Older Amiga AGI interpreters' value (Seldom used)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum AgiSoundType {
|
||||||
|
kAgiSoundPC = 1,
|
||||||
|
kAgiSoundTandy = 3, // Tandy (This value is also used by the Amiga AGI and Apple IIGS AGI)
|
||||||
|
kAgiSound2GSOld = 8 // Apple IIGS's Gold Rush! (Version 1.0M 1989-02-28 (CE), AGI 3.003) uses value 8
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AGI flags
|
* AGI flags
|
||||||
*/
|
*/
|
||||||
|
@ -387,28 +387,33 @@ int AgiEngine::runGame() {
|
|||||||
_restartGame = false;
|
_restartGame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set computer type (v20 i.e. vComputer)
|
// Set computer type (v20 i.e. vComputer) and sound type
|
||||||
switch (getPlatform()) {
|
switch (getPlatform()) {
|
||||||
case Common::kPlatformAtariST:
|
case Common::kPlatformAtariST:
|
||||||
setvar(vComputer, kAgiComputerAtariST);
|
setvar(vComputer, kAgiComputerAtariST);
|
||||||
|
setvar(vSoundgen, kAgiSoundPC);
|
||||||
break;
|
break;
|
||||||
case Common::kPlatformAmiga:
|
case Common::kPlatformAmiga:
|
||||||
if (getFeatures() & GF_OLDAMIGAV20)
|
if (getFeatures() & GF_OLDAMIGAV20)
|
||||||
setvar(vComputer, kAgiComputerAmigaOld);
|
setvar(vComputer, kAgiComputerAmigaOld);
|
||||||
else
|
else
|
||||||
setvar(vComputer, kAgiComputerAmiga);
|
setvar(vComputer, kAgiComputerAmiga);
|
||||||
|
setvar(vSoundgen, kAgiSoundTandy);
|
||||||
break;
|
break;
|
||||||
case Common::kPlatformApple2GS:
|
case Common::kPlatformApple2GS:
|
||||||
setvar(vComputer, kAgiComputerApple2GS);
|
setvar(vComputer, kAgiComputerApple2GS);
|
||||||
|
if (getFeatures() & GF_2GSOLDSOUND)
|
||||||
|
setvar(vSoundgen, kAgiSound2GSOld);
|
||||||
|
else
|
||||||
|
setvar(vSoundgen, kAgiSoundTandy);
|
||||||
break;
|
break;
|
||||||
case Common::kPlatformPC:
|
case Common::kPlatformPC:
|
||||||
default:
|
default:
|
||||||
setvar(vComputer, kAgiComputerPC);
|
setvar(vComputer, kAgiComputerPC);
|
||||||
|
setvar(vSoundgen, kAgiSoundPC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setvar(vSoundgen, 1); // IBM PC SOUND
|
|
||||||
|
|
||||||
// Set monitor type (v26 i.e. vMonitor)
|
// Set monitor type (v26 i.e. vMonitor)
|
||||||
switch (_renderMode) {
|
switch (_renderMode) {
|
||||||
case Common::kRenderCGA:
|
case Common::kRenderCGA:
|
||||||
|
@ -166,7 +166,7 @@ static const AGIGameDescription gameDescriptions[] = {
|
|||||||
|
|
||||||
// Gold Rush! (Apple IIgs) 1.0M 2/28/89 (CE) aka 2.01 12/22/88
|
// Gold Rush! (Apple IIgs) 1.0M 2/28/89 (CE) aka 2.01 12/22/88
|
||||||
// Menus not tested
|
// Menus not tested
|
||||||
GAME3_P("goldrush", "1.0M 1989-02-28 (CE) aka 2.01 1988-12-22", "grdir", "3f7b9ce62631434389f85371b11921d6", 0x3149, 0, GID_GOLDRUSH, Common::kPlatformApple2GS),
|
GAME3_P("goldrush", "1.0M 1989-02-28 (CE) aka 2.01 1988-12-22", "grdir", "3f7b9ce62631434389f85371b11921d6", 0x3149, GF_2GSOLDSOUND, GID_GOLDRUSH, Common::kPlatformApple2GS),
|
||||||
|
|
||||||
// Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
|
// Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
|
||||||
GAME3_P("goldrush", "1.01 1989-01-13 aka 2.01 1988-12-22", "grdir", "4dd4d50480a3d6c206fa227ce8142735", 0x3149, 0, GID_GOLDRUSH, Common::kPlatformAtariST),
|
GAME3_P("goldrush", "1.01 1989-01-13 aka 2.01 1988-12-22", "grdir", "4dd4d50480a3d6c206fa227ce8142735", 0x3149, 0, GID_GOLDRUSH, Common::kPlatformAtariST),
|
||||||
|
@ -142,7 +142,7 @@ void SoundMgr::unloadSound(int resnum) {
|
|||||||
|
|
||||||
void SoundMgr::startSound(int resnum, int flag) {
|
void SoundMgr::startSound(int resnum, int flag) {
|
||||||
int i;
|
int i;
|
||||||
AgiSoundType type;
|
AgiSoundEmuType type;
|
||||||
|
|
||||||
if (_vm->_game.sounds[resnum] != NULL && _vm->_game.sounds[resnum]->isPlaying())
|
if (_vm->_game.sounds[resnum] != NULL && _vm->_game.sounds[resnum]->isPlaying())
|
||||||
return;
|
return;
|
||||||
@ -152,7 +152,7 @@ void SoundMgr::startSound(int resnum, int flag) {
|
|||||||
if (_vm->_game.sounds[resnum] == NULL) // Is this needed at all?
|
if (_vm->_game.sounds[resnum] == NULL) // Is this needed at all?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
type = (AgiSoundType)_vm->_game.sounds[resnum]->type();
|
type = (AgiSoundEmuType)_vm->_game.sounds[resnum]->type();
|
||||||
|
|
||||||
if (type != AGI_SOUND_SAMPLE && type != AGI_SOUND_MIDI && type != AGI_SOUND_4CHN)
|
if (type != AGI_SOUND_SAMPLE && type != AGI_SOUND_MIDI && type != AGI_SOUND_4CHN)
|
||||||
return;
|
return;
|
||||||
|
@ -89,7 +89,7 @@ struct CoCoNote {
|
|||||||
* as they're simply the different used values in AGI sound resources'
|
* as they're simply the different used values in AGI sound resources'
|
||||||
* starts (The first 16-bit little endian word, to be precise).
|
* starts (The first 16-bit little endian word, to be precise).
|
||||||
*/
|
*/
|
||||||
enum AgiSoundType {
|
enum AgiSoundEmuType {
|
||||||
AGI_SOUND_SAMPLE = 0x0001,
|
AGI_SOUND_SAMPLE = 0x0001,
|
||||||
AGI_SOUND_MIDI = 0x0002,
|
AGI_SOUND_MIDI = 0x0002,
|
||||||
AGI_SOUND_4CHN = 0x0008
|
AGI_SOUND_4CHN = 0x0008
|
||||||
@ -110,7 +110,7 @@ enum AgiSoundEnv {
|
|||||||
* AGI engine sound channel structure.
|
* AGI engine sound channel structure.
|
||||||
*/
|
*/
|
||||||
struct ChannelInfo {
|
struct ChannelInfo {
|
||||||
AgiSoundType type;
|
AgiSoundEmuType type;
|
||||||
const uint8 *ptr; // Pointer to the AgiNote data
|
const uint8 *ptr; // Pointer to the AgiNote data
|
||||||
const int16 *ins;
|
const int16 *ins;
|
||||||
int32 size;
|
int32 size;
|
||||||
|
Loading…
Reference in New Issue
Block a user