[Scummvm-cvs-logs] CVS: scummvm/sword2 console.cpp,1.44,1.45 console.h,1.20,1.21 debug.cpp,1.39,1.40 logic.h,1.34,1.35 speech.cpp,1.62,1.63 sword2.cpp,1.110,1.111

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Wed May 5 00:07:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31752

Modified Files:
	console.cpp console.h debug.cpp logic.h speech.cpp sword2.cpp 
Log Message:
Cleanup.

Part of this cleanup involved removing _unpauseZone. It was only used by
fnISpeak(), and as far as I could tell it was just because the original
code didn't trust amISpeaking() and getSpeechStatus() to return sensible
values directly after unpausing the game.


Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/console.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- console.cpp	1 May 2004 10:24:47 -0000	1.44
+++ console.cpp	5 May 2004 07:06:17 -0000	1.45
@@ -57,6 +57,11 @@
 					// object resources (except player) in
 					// fnAddHuman()
 
+	_speechScriptWaiting = 0;	// The id of whoever we're waiting for
+					// in a speech script. See fnTheyDo(),
+					// fnTheyDoWeWait(), fnWeWait(), and
+					// fnTimedWait().
+
 	_startTime = 0;			// "TIMEON" & "TIMEOFF" - system start
 					// time
 

Index: console.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/console.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- console.h	23 Apr 2004 07:01:37 -0000	1.20
+++ console.h	5 May 2004 07:06:17 -0000	1.21
@@ -65,6 +65,8 @@
 
 	bool _testingSnR;
 
+	int32 _speechScriptWaiting;
+
 	int32 _textNumber;
 
 	ObjectGraphic _playerGraphic;

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/debug.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- debug.cpp	24 Apr 2004 12:29:35 -0000	1.39
+++ debug.cpp	5 May 2004 07:06:17 -0000	1.40
@@ -265,10 +265,10 @@
 		// "waiting for person" indicator - set form fnTheyDo and
 		// fnTheyDoWeWait
 
-		if (_vm->_logic->_speechScriptWaiting) {
+		if (_speechScriptWaiting) {
 			sprintf(buf, "script waiting for %s (%d)",
-				_vm->fetchObjectName(_vm->_logic->_speechScriptWaiting, name),
-				_vm->_logic->_speechScriptWaiting);
+				_vm->fetchObjectName(_speechScriptWaiting, name),
+				_speechScriptWaiting);
 			makeDebugTextBlock(buf, 0, 90);
 		}
 

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/logic.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- logic.h	27 Apr 2004 08:59:58 -0000	1.34
+++ logic.h	5 May 2004 07:06:18 -0000	1.35
@@ -170,8 +170,7 @@
 		  _speechAnimType(0), _leftClickDelay(0), _rightClickDelay(0),
 		  _defaultResponseId(0), _totalStartups(0),
 		  _totalScreenManagers(0), _officialTextNumber(0),
-		  _speechScriptWaiting(0), _speechTextBlocNo(0),
-		  _choosing(false), _unpauseZone(0) {
+		  _speechTextBlocNo(0), _choosing(false) {
 		_scriptVars = NULL;
 		memset(_subjectList, 0, sizeof(_subjectList));
 		memset(_eventList, 0, sizeof(_eventList));
@@ -192,21 +191,12 @@
 
 	int16 _officialTextNumber;
 
-	// usually 0; if non-zero then it's the id of whoever we're waiting for
-	// in a speech script see fnTheyDo, fnTheyDoWeWait and fnWeWait
-
-	int32 _speechScriptWaiting;
-
 	// so speech text cleared when running a new start-script
-
 	uint32 _speechTextBlocNo;
 
 	// could alternately use logic->looping of course
-
 	bool _choosing;
 
-	uint32 _unpauseZone;
-
 	void resetScriptVars(void);
 
 	void conPrintStartMenu(void);

Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/speech.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- speech.cpp	24 Apr 2004 12:29:35 -0000	1.62
+++ speech.cpp	5 May 2004 07:06:18 -0000	1.63
@@ -32,56 +32,26 @@
 
 namespace Sword2 {
 
-enum {
-	INS_talk		= 1,
-	INS_anim		= 2,
-	INS_reverse_anim	= 3,
-	INS_walk		= 4,
-	INS_turn		= 5,
-	INS_face		= 6,
-	INS_trace		= 7,
[...1756 lines suppressed...]
 	switch (wavId) {
@@ -1464,13 +1241,13 @@
 	case 528:	// PresidentaSpeech
 			//	SFX (528);
 			//	FX <Nearby Crash of Collapsing Masonry>
-	case 920:	// location 62
-	case 923:	// location 62
-	case 926:	// location 62
-		// don't want speech for these lines!
+	case 920:	// Zombie Island forest maze (bird)
+	case 923:	// Zombie Island forest maze (monkey)
+	case 926:	// Zombie Island forest maze (zombie)
+		// Don't want speech for these lines!
 		return false;
 	default:
-		// ok for all other lines
+		// Ok for all other lines
 		return true;
 	}
 }

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sword2.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- sword2.cpp	23 Apr 2004 07:02:07 -0000	1.110
+++ sword2.cpp	5 May 2004 07:06:18 -0000	1.111
@@ -529,7 +529,6 @@
 	}
 
 	_gamePaused = false;
-	_logic->_unpauseZone = 2;
 
 	// if mouse is about or we're in a chooser menu
 	if (!_mouseStatus || _logic->_choosing)





More information about the Scummvm-git-logs mailing list