[Scummvm-cvs-logs] CVS: scummvm/scumm player_v1.cpp,1.13,1.14 player_v1.h,1.11,1.12 player_v2.cpp,2.38,2.39 player_v2.h,2.20,2.21 player_v2a.h,2.5,2.6 player_v3a.h,1.13,1.14 resource_v2.cpp,1.36,1.37 script_v2.cpp,2.205,2.206 scumm.h,1.310,1.311 scummvm.cpp,2.425,2.426

Max Horn fingolfin at users.sourceforge.net
Sun Oct 5 10:33:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv18969

Modified Files:
	player_v1.cpp player_v1.h player_v2.cpp player_v2.h 
	player_v2a.h player_v3a.h resource_v2.cpp script_v2.cpp 
	scumm.h scummvm.cpp 
Log Message:
cleanup

Index: player_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v1.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- player_v1.cpp	3 Oct 2003 23:32:34 -0000	1.13
+++ player_v1.cpp	5 Oct 2003 17:32:38 -0000	1.14
@@ -34,7 +34,7 @@
 #define FIXP_SHIFT  16
 
 
-Player_V1::Player_V1(ScummEngine *scumm) : Player_V2(scumm) {	
+Player_V1::Player_V1(ScummEngine *scumm, bool pcjr) : Player_V2(scumm, pcjr) {	
 	// Initialize channel code
 	for (int i = 0; i < 4; ++i)
 		clear_channel(i);

Index: player_v1.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v1.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- player_v1.h	3 Oct 2003 23:32:34 -0000	1.11
+++ player_v1.h	5 Oct 2003 17:32:38 -0000	1.12
@@ -28,11 +28,11 @@
 namespace Scumm {
 
 /**
- * V1 PC-Speaker player.
+ * Scumm V1 PC-Speaker player.
  */
 class Player_V1 : public Player_V2 {
 public:
-	Player_V1(ScummEngine *scumm);
+	Player_V1(ScummEngine *scumm, bool pcjr);
 	~Player_V1();
 
 	virtual void startSound(int sound);

Index: player_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2.cpp,v
retrieving revision 2.38
retrieving revision 2.39
diff -u -d -r2.38 -r2.39
--- player_v2.cpp	3 Oct 2003 23:32:34 -0000	2.38
+++ player_v2.cpp	5 Oct 2003 17:32:38 -0000	2.39
@@ -341,12 +341,9 @@
 #endif
 
 
-Player_V2::Player_V2(ScummEngine *scumm) {
+Player_V2::Player_V2(ScummEngine *scumm, bool pcjr) {
 	int i;
 	
-	// This simulates the pc speaker sound, which is driven
-	// by the 8253 (square wave generator) and a low-band filter.
-	
 	_isV3Game = (scumm->_version >= 3);
 	_scumm = scumm;
 	_system = scumm->_system;
@@ -376,7 +373,7 @@
 
 	_RNG = NG_PRESET;
 
-	set_pcjr(scumm->_midiDriver != MD_PCSPK);
+	set_pcjr(pcjr);
 	setMasterVolume(255);
 
 	_mixer->setupPremix(premix_proc, this);

Index: player_v2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -u -d -r2.20 -r2.21
--- player_v2.h	3 Oct 2003 23:32:34 -0000	2.20
+++ player_v2.h	5 Oct 2003 17:32:38 -0000	2.21
@@ -68,11 +68,13 @@
 
 
 /**
- * V2 PC-Speaker MIDI driver.
+ * Scumm V2 PC-Speaker MIDI driver.
+ * This simulates the pc speaker sound, which is driven  by the 8253 (square
+ * wave generator) and a low-band filter.
  */
 class Player_V2 : public MusicEngine {
 public:
-	Player_V2(ScummEngine *scumm);
+	Player_V2(ScummEngine *scumm, bool pcjr);
 	virtual ~Player_V2();
 
 	virtual void setMasterVolume(int vol);

Index: player_v2a.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2a.h,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -d -r2.5 -r2.6
--- player_v2a.h	3 Oct 2003 23:32:34 -0000	2.5
+++ player_v2a.h	5 Oct 2003 17:32:38 -0000	2.6
@@ -36,7 +36,7 @@
 class V2A_Sound;
 
 /**
- * V2 Amiga sound/music driver.
+ * Scumm V2 Amiga sound/music driver.
  */
 class Player_V2A : public MusicEngine {
 public:

Index: player_v3a.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v3a.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- player_v3a.h	3 Oct 2003 23:32:34 -0000	1.13
+++ player_v3a.h	5 Oct 2003 17:32:38 -0000	1.14
@@ -35,7 +35,7 @@
 class ScummEngine;
 
 /**
- * V3 Amiga sound/music driver.
+ * Scumm V3 Amiga sound/music driver.
  */
 class Player_V3A : public MusicEngine {
 public:

Index: resource_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- resource_v2.cpp	3 Oct 2003 18:33:55 -0000	1.36
+++ resource_v2.cpp	5 Oct 2003 17:32:38 -0000	1.37
@@ -34,7 +34,7 @@
 
 	if (_gameId == GID_MANIAC) {
 		if (!(_features & GF_AMIGA) && !(_features & GF_NES))
-			_musicEngine = new Player_V1(this);
+			_musicEngine = new Player_V1(this, _midiDriver != MD_PCSPK);
 
 		_numGlobalObjects = 800;
 		_numRooms = 55;
@@ -43,7 +43,7 @@
 		_numSounds = 100;
 	} else if (_gameId == GID_ZAK) {
 		if (!(_features & GF_AMIGA))
-			_musicEngine = new Player_V2(this);
+			_musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
 
 		_numGlobalObjects = 775;
 		_numRooms = 61;
@@ -109,7 +109,7 @@
 void ScummEngine_v2::readEnhancedIndexFile() {
 
 	if (!(_features & GF_AMIGA))
-		_musicEngine = new Player_V2(this);
+		_musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
 
 	_numGlobalObjects = _fileHandle.readUint16LE();
 	_fileHandle.seek(_numGlobalObjects, SEEK_CUR); // Skip object flags

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.205
retrieving revision 2.206
diff -u -d -r2.205 -r2.206
--- script_v2.cpp	3 Oct 2003 18:33:55 -0000	2.205
+++ script_v2.cpp	5 Oct 2003 17:32:38 -0000	2.206
@@ -421,7 +421,7 @@
 	// V1 Mansion Mansion uses dynamic color table for subtitles
 	if ((_gameId == GID_MANIAC) && (_version == 1)) {
 		// Demo mode doesn't set subtitle color before display first subtitle.
-		if (_demo_mode && _actorToPrintStrFor == 0xFF)
+		if (_demoMode && _actorToPrintStrFor == 0xFF)
 			_string[textSlot].color = 1;
 		else if (_actorToPrintStrFor != 0xFF) 
 			_string[textSlot].color =  v1_mm_actor_speech_color[_actorToPrintStrFor];
@@ -836,7 +836,7 @@
 		vs = &_verbs[slot];
 		vs->verbid = verb;
 		if (_version == 1) {
-			if (_gameId == GID_MANIAC && _demo_mode)
+			if (_gameId == GID_MANIAC && _demoMode)
 				vs->color = 4;
 			else
 				vs->color = 5;
@@ -1382,7 +1382,7 @@
 	// FIXME allows quotes script (173) to start during introudction of
 	// demo mode of V1 Maniac Mansion. setUserState was halting script
 	// 173 before it started.
-	if (!(_gameId == GID_MANIAC && _version == 1 && _demo_mode))
+	if (!(_gameId == GID_MANIAC && _version == 1 && _demoMode))
 	// Hide inventory, freeze scripts, hide cursor
 	setUserState(15);
 	

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.310
retrieving revision 1.311
diff -u -d -r1.310 -r1.311
--- scumm.h	4 Oct 2003 11:50:21 -0000	1.310
+++ scumm.h	5 Oct 2003 17:32:38 -0000	1.311
@@ -955,7 +955,6 @@
 	byte _proc_special_palette[256];
 	byte *_roomPalette;
 	byte *_shadowPalette;
-	int _midiDriver; // Use the MD_ values from mididrv.h
 
 protected:
 	int _shadowPaletteSize;
@@ -969,6 +968,9 @@
 	int tempMusic;
 	int _saveSound;
 	bool _native_mt32;
+	int _midiDriver; // Use the MD_ values from mididrv.h
+	bool _demoMode;
+	bool _confirmExit;
 public:
 	bool _silentDigitalImuse, _noDigitalSamples;
 
@@ -1022,9 +1024,7 @@
 	byte _charsetBuffer[512];
 
 public:
-	bool _demo_mode;
 	bool _noSubtitles;	// Whether to skip all subtitles
-	bool _confirmExit;
 protected:
 
 	void initCharset(int charset);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.425
retrieving revision 2.426
diff -u -d -r2.425 -r2.426
--- scummvm.cpp	5 Oct 2003 15:36:00 -0000	2.425
+++ scummvm.cpp	5 Oct 2003 17:32:38 -0000	2.426
@@ -65,7 +65,6 @@
 
 extern NewGui *g_gui;
 extern uint16 _debugLevel;
-extern uint16 _demo_mode;
 
 namespace Scumm {
 
@@ -453,7 +452,6 @@
 	memset(_charsetData, 0, sizeof(_charsetData));
 	_charsetBufPos = 0;
 	memset(_charsetBuffer, 0, sizeof(_charsetBuffer));
-	_demo_mode = false;
 	_noSubtitles = false;
 	_confirmExit = false;
 	_numInMsgStack = 0;
@@ -606,7 +604,7 @@
 	_version = detector->_game.version;
 	setFeatures(detector->_game.features);
 
-	_demo_mode = detector->_demo_mode;
+	_demoMode = detector->_demo_mode;
 	_noSubtitles = detector->_noSubtitles;
 	_confirmExit = detector->_confirmExit;
 	_defaultTalkDelay = detector->_talkSpeed;
@@ -680,7 +678,7 @@
 	} else if ((_features & GF_AMIGA) && (_version < 5)) {
 		_musicEngine = NULL;
 	} else if (((_midiDriver == MD_PCJR) || (_midiDriver == MD_PCSPK)) && ((_version > 2) && (_version < 5))) {
-		_musicEngine = new Player_V2(this);
+		_musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
 	} else if (_version > 2) {
 		MidiDriver *driver = detector->createMidi();
 		if (driver && detector->_native_mt32)
@@ -890,7 +888,7 @@
 
 	// If requested, load a save game instead of running the boot script
 	if (_saveLoadFlag != 2 || !loadState(_saveLoadSlot, _saveLoadCompatible)) {
-		if (_gameId == GID_MANIAC && _demo_mode)
+		if (_gameId == GID_MANIAC && _demoMode)
 			runScript(9, 0, 0, &_bootParam);
 		else
 			runScript(1, 0, 0, &_bootParam);





More information about the Scummvm-git-logs mailing list