[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.237,1.238 scumm.cpp,1.2,1.3 scumm.h,1.379,1.380 string.cpp,1.201,1.202

Max Horn fingolfin at users.sourceforge.net
Sun Mar 14 19:32:03 CET 2004


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

Modified Files:
	actor.cpp scumm.cpp scumm.h string.cpp 
Log Message:
After the refactoring it's clearly that _messagePtr can be removed. Hooray, yet another obscure global 'parameter' gone :-)

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- actor.cpp	15 Mar 2004 03:09:47 -0000	1.237
+++ actor.cpp	15 Mar 2004 03:22:36 -0000	1.238
@@ -1147,7 +1147,7 @@
 void ScummEngine::actorTalk(const byte *msg) {
 	Actor *a;
 
-	_messagePtr = addMessageToStack(msg, _charsetBuffer, sizeof(_charsetBuffer));
+	addMessageToStack(msg, _charsetBuffer, sizeof(_charsetBuffer));
 
 	// FIXME: Workaround for bugs #770039 and #770049 
 	if (_gameId == GID_LOOM || _gameId == GID_LOOM256) {
@@ -1225,7 +1225,6 @@
 }
 
 void ScummEngine::clearMsgQueue() {
-	_messagePtr = (const byte *)" ";
 	stopTalk();
 }
 

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- scumm.cpp	11 Mar 2004 04:13:22 -0000	1.2
+++ scumm.cpp	15 Mar 2004 03:22:36 -0000	1.3
@@ -501,7 +501,6 @@
 	_demoMode = false;
 	_confirmExit = false;
 	_msgPtrToAdd = NULL;
-	_messagePtr = NULL;
 	_talkDelay = 0;
 	_keepText = false;
 	_existLanguageFile = false;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.379
retrieving revision 1.380
diff -u -d -r1.379 -r1.380
--- scumm.h	15 Mar 2004 03:09:48 -0000	1.379
+++ scumm.h	15 Mar 2004 03:22:36 -0000	1.380
@@ -1075,7 +1075,6 @@
 	void clearMsgQueue();	// Used by Actor::putActor
 protected:
 	byte *_msgPtrToAdd;
-	const byte *_messagePtr;
 	bool _keepText;
 public:
 	Common::Language _language;

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- string.cpp	15 Mar 2004 03:09:48 -0000	1.201
+++ string.cpp	15 Mar 2004 03:22:36 -0000	1.202
@@ -48,7 +48,7 @@
 
 void ScummEngine::unkMessage1(const byte *msg) {
 	byte buffer[100];
-	_messagePtr = addMessageToStack(msg, buffer, sizeof(buffer));
+	addMessageToStack(msg, buffer, sizeof(buffer));
 
 //	if ((_gameId == GID_CMI) && _debugMode) {	// In CMI, unkMessage1 is used for printDebug output
 	if ((buffer[0] != 0xFF) && _debugMode) {
@@ -75,17 +75,14 @@
 	// Original COMI used different code at this point.
 	// Seemed to use blastText for the messages
 	byte buf[100];
-	const byte *tmp;
 
-	tmp = _messagePtr = addMessageToStack(msg, buf, sizeof(buf));
+	addMessageToStack(msg, buf, sizeof(buf));
 
 	if (_string[3].color == 0)
 		_string[3].color = 4;
 
 	InfoDialog dialog(this, (char*)buf);
 	VAR(VAR_KEYPRESS) = runDialog(dialog);
-
-	_messagePtr = tmp;
 }
 
 void ScummEngine::CHARSET_1() {
@@ -346,7 +343,7 @@
 	byte fontHeight = 0;
 	uint color;
 
-	_messagePtr = addMessageToStack(msg, buf, sizeof(buf));
+	addMessageToStack(msg, buf, sizeof(buf));
 
 	_charset->_top = _string[a].ypos + _screenTop;
 	_charset->_startLeft = _charset->_left = _string[a].xpos;





More information about the Scummvm-git-logs mailing list