aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2010-06-15 10:35:10 +0000
committerEugene Sandulenko2010-06-15 10:35:10 +0000
commitc7e9b620eef9973beee5f2055fb37308682d86ff (patch)
treee801a6f09a5c5cad88faf3a7328ce9c3eaad18c4
parent0a1a9194064a96673b45d856f06dbb689838d746 (diff)
downloadscummvm-rg350-c7e9b620eef9973beee5f2055fb37308682d86ff.tar.gz
scummvm-rg350-c7e9b620eef9973beee5f2055fb37308682d86ff.tar.bz2
scummvm-rg350-c7e9b620eef9973beee5f2055fb37308682d86ff.zip
AGI: properly setup Sound var.
svn-id: r49752
-rw-r--r--engines/agi/agi.h9
-rw-r--r--engines/agi/cycle.cpp11
-rw-r--r--engines/agi/detection_tables.h2
-rw-r--r--engines/agi/sound.cpp4
-rw-r--r--engines/agi/sound.h4
5 files changed, 21 insertions, 9 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index b00b0b3d7e..4cc823df5a 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -152,7 +152,8 @@ enum AgiGameFeatures {
GF_MENUS = (1 << 7),
GF_ESCPAUSE = (1 << 8),
GF_OLDAMIGAV20 = (1 << 9),
- GF_CLIPCOORDS = (1 << 10)
+ GF_CLIPCOORDS = (1 << 10),
+ GF_2GSOLDSOUND = (1 << 11)
};
struct AGIGameDescription;
@@ -317,6 +318,12 @@ enum AgiComputerType {
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
*/
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 5614195fcf..40d6f2d008 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -387,28 +387,33 @@ int AgiEngine::runGame() {
_restartGame = false;
}
- // Set computer type (v20 i.e. vComputer)
+ // Set computer type (v20 i.e. vComputer) and sound type
switch (getPlatform()) {
case Common::kPlatformAtariST:
setvar(vComputer, kAgiComputerAtariST);
+ setvar(vSoundgen, kAgiSoundPC);
break;
case Common::kPlatformAmiga:
if (getFeatures() & GF_OLDAMIGAV20)
setvar(vComputer, kAgiComputerAmigaOld);
else
setvar(vComputer, kAgiComputerAmiga);
+ setvar(vSoundgen, kAgiSoundTandy);
break;
case Common::kPlatformApple2GS:
setvar(vComputer, kAgiComputerApple2GS);
+ if (getFeatures() & GF_2GSOLDSOUND)
+ setvar(vSoundgen, kAgiSound2GSOld);
+ else
+ setvar(vSoundgen, kAgiSoundTandy);
break;
case Common::kPlatformPC:
default:
setvar(vComputer, kAgiComputerPC);
+ setvar(vSoundgen, kAgiSoundPC);
break;
}
- setvar(vSoundgen, 1); // IBM PC SOUND
-
// Set monitor type (v26 i.e. vMonitor)
switch (_renderMode) {
case Common::kRenderCGA:
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index 9c915b12f5..a3e95241c1 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -166,7 +166,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Gold Rush! (Apple IIgs) 1.0M 2/28/89 (CE) aka 2.01 12/22/88
// 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
GAME3_P("goldrush", "1.01 1989-01-13 aka 2.01 1988-12-22", "grdir", "4dd4d50480a3d6c206fa227ce8142735", 0x3149, 0, GID_GOLDRUSH, Common::kPlatformAtariST),
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index b9a118c95f..c4c695c59e 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -142,7 +142,7 @@ void SoundMgr::unloadSound(int resnum) {
void SoundMgr::startSound(int resnum, int flag) {
int i;
- AgiSoundType type;
+ AgiSoundEmuType type;
if (_vm->_game.sounds[resnum] != NULL && _vm->_game.sounds[resnum]->isPlaying())
return;
@@ -152,7 +152,7 @@ void SoundMgr::startSound(int resnum, int flag) {
if (_vm->_game.sounds[resnum] == NULL) // Is this needed at all?
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)
return;
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 16ec81d19a..d217d52ac6 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -89,7 +89,7 @@ struct CoCoNote {
* as they're simply the different used values in AGI sound resources'
* starts (The first 16-bit little endian word, to be precise).
*/
-enum AgiSoundType {
+enum AgiSoundEmuType {
AGI_SOUND_SAMPLE = 0x0001,
AGI_SOUND_MIDI = 0x0002,
AGI_SOUND_4CHN = 0x0008
@@ -110,7 +110,7 @@ enum AgiSoundEnv {
* AGI engine sound channel structure.
*/
struct ChannelInfo {
- AgiSoundType type;
+ AgiSoundEmuType type;
const uint8 *ptr; // Pointer to the AgiNote data
const int16 *ins;
int32 size;