[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.65,1.66 script_v6.cpp,1.108,1.109 script_v8.cpp,2.152,2.153 string.cpp,1.108,1.109

Max Horn fingolfin at users.sourceforge.net
Mon May 12 15:09:34 CEST 2003


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

Modified Files:
	saveload.cpp script_v6.cpp script_v8.cpp string.cpp 
Log Message:
swapped talkPosX and talkPosY (they were misnamed); factored out some duplicate code in string.cpp; VC warning fix in smush_player.cpp

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- saveload.cpp	10 May 2003 21:49:57 -0000	1.65
+++ saveload.cpp	12 May 2003 22:08:38 -0000	1.66
@@ -318,8 +318,8 @@
 		MKLINE(Actor, needBgReset, sleByte, VER_V8),
 		MKLINE(Actor, costumeNeedsInit, sleByte, VER_V8),
 
-		MKLINE(Actor, talkPosX, sleInt16, VER_V8),
 		MKLINE(Actor, talkPosY, sleInt16, VER_V8),
+		MKLINE(Actor, talkPosX, sleInt16, VER_V8),
 		MKLINE(Actor, ignoreTurns, sleByte, VER_V8),
 
 		MKLINE(Actor, layer, sleByte, VER_V8),

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- script_v6.cpp	10 May 2003 22:35:12 -0000	1.108
+++ script_v6.cpp	12 May 2003 22:08:38 -0000	1.109
@@ -1698,8 +1698,8 @@
 		a->shadow_mode = pop();
 		break;
 	case 99:
-		a->talkPosX = pop();
 		a->talkPosY = pop();
+		a->talkPosX = pop();
 		break;
 	case 198:										/* set anim variable */
 		i = pop();									/* value */

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.152
retrieving revision 2.153
diff -u -d -r2.152 -r2.153
--- script_v8.cpp	10 May 2003 21:49:58 -0000	2.152
+++ script_v8.cpp	12 May 2003 22:08:38 -0000	2.153
@@ -1121,8 +1121,8 @@
 		a->shadow_mode = pop();
 		break;
 	case 0x79:		// SO_ACTOR_TEXT_OFFSET Set text offset relative to actor
-		a->talkPosX = pop();
 		a->talkPosY = pop();
+		a->talkPosX = pop();
 		break;
 //	case 0x7A:		// SO_ACTOR_INIT Set current actor (handled above)
 	case 0x7B:		// SO_ACTOR_VARIABLE Set actor variable

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- string.cpp	10 May 2003 21:49:59 -0000	1.108
+++ string.cpp	12 May 2003 22:08:39 -0000	1.109
@@ -108,29 +108,25 @@
 			} else {
 				_string[0].ypos = (int)VAR(VAR_V5_TALK_STRING_Y);
 			}
-			if (_string[0].ypos < 1)
-				_string[0].ypos = 1;
 
-			if (_string[0].xpos < 80)
-				_string[0].xpos = 80;
-			if (_string[0].xpos > _screenWidth - 80)
-				_string[0].xpos = _screenWidth - 80;
 		} else {
-			s = a->scaley * a->talkPosX / 0xFF;
-			_string[0].ypos = ((a->talkPosX - s) >> 1) + s - a->elevation + a->y;
-			if (_string[0].ypos < 1)
-				_string[0].ypos = 1;
+			s = a->scaley * a->talkPosY / 0xFF;
+			_string[0].ypos = ((a->talkPosY - s) >> 1) + s - a->elevation + a->y;
 
 			if (_string[0].ypos < camera._cur.y - (_screenHeight / 2))
 				_string[0].ypos = camera._cur.y - (_screenHeight / 2);
 
-			s = a->scalex * a->talkPosY / 0xFF;
-			_string[0].xpos = ((a->talkPosY - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);
-			if (_string[0].xpos < 80)
-				_string[0].xpos = 80;
-			if (_string[0].xpos > _screenWidth - 80)
-				_string[0].xpos = _screenWidth - 80;
+			s = a->scalex * a->talkPosX / 0xFF;
+			_string[0].xpos = ((a->talkPosX - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);
 		}
+
+		if (_string[0].ypos < 1)
+			_string[0].ypos = 1;
+
+		if (_string[0].xpos < 80)
+			_string[0].xpos = 80;
+		if (_string[0].xpos > _screenWidth - 80)
+			_string[0].xpos = _screenWidth - 80;
 	}
 
 	_charset->_top = _string[0].ypos;





More information about the Scummvm-git-logs mailing list