[Scummvm-cvs-logs] SF.net SVN: scummvm:[49752] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Jun 15 12:35:10 CEST 2010


Revision: 49752
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49752&view=rev
Author:   sev
Date:     2010-06-15 10:35:10 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
AGI: properly setup Sound var.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/cycle.cpp
    scummvm/trunk/engines/agi/detection_tables.h
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agi/sound.h

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2010-06-15 10:34:45 UTC (rev 49751)
+++ scummvm/trunk/engines/agi/agi.h	2010-06-15 10:35:10 UTC (rev 49752)
@@ -152,7 +152,8 @@
 	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 @@
 	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
  */

Modified: scummvm/trunk/engines/agi/cycle.cpp
===================================================================
--- scummvm/trunk/engines/agi/cycle.cpp	2010-06-15 10:34:45 UTC (rev 49751)
+++ scummvm/trunk/engines/agi/cycle.cpp	2010-06-15 10:35:10 UTC (rev 49752)
@@ -387,28 +387,33 @@
 			_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:

Modified: scummvm/trunk/engines/agi/detection_tables.h
===================================================================
--- scummvm/trunk/engines/agi/detection_tables.h	2010-06-15 10:34:45 UTC (rev 49751)
+++ scummvm/trunk/engines/agi/detection_tables.h	2010-06-15 10:35:10 UTC (rev 49752)
@@ -166,7 +166,7 @@
 
 	// 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),

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2010-06-15 10:34:45 UTC (rev 49751)
+++ scummvm/trunk/engines/agi/sound.cpp	2010-06-15 10:35:10 UTC (rev 49752)
@@ -142,7 +142,7 @@
 
 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 @@
 	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;

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2010-06-15 10:34:45 UTC (rev 49751)
+++ scummvm/trunk/engines/agi/sound.h	2010-06-15 10:35:10 UTC (rev 49752)
@@ -89,7 +89,7 @@
  * 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 @@
  * AGI engine sound channel structure.
  */
 struct ChannelInfo {
-	AgiSoundType type;
+	AgiSoundEmuType type;
 	const uint8 *ptr; // Pointer to the AgiNote data
 	const int16 *ins;
 	int32 size;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list