[Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.35,1.36 actor.cpp,1.80,1.81 scene.cpp,1.76,1.77

Andrew Kurushin h00ligan at users.sourceforge.net
Fri Jan 7 13:25:20 CET 2005


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

Modified Files:
	actionmap.cpp actor.cpp scene.cpp 
Log Message:
fixing scene transition

Index: actionmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- actionmap.cpp	2 Jan 2005 14:51:59 -0000	1.35
+++ actionmap.cpp	7 Jan 2005 21:24:26 -0000	1.36
@@ -69,6 +69,7 @@
 		}
 
 		free(_stepZoneList);
+		_stepZoneList = NULL;
 	}
 }
 

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- actor.cpp	7 Jan 2005 15:49:47 -0000	1.80
+++ actor.cpp	7 Jan 2005 21:24:26 -0000	1.81
@@ -370,11 +370,11 @@
 }
 
 bool Actor::validFollowerLocation(const ActorLocation &location) {
-	Point point;
+	Point point;	
 	location.toScreenPointXY(point);
 	
 	if ((point.x < 5) || (point.x >= _vm->getDisplayWidth() - 5) ||
-		(point.y < 0) || (point.y >= _vm->getStatusYOffset())) {
+		(point.y < 0) || (point.y > _vm->getStatusYOffset())) {
 		return false;
 	}
 	
@@ -1379,7 +1379,11 @@
 
 	for (iteratorPoint.y = 0; iteratorPoint.y < _yCellCount; iteratorPoint.y++) {
 		for (iteratorPoint.x = 0; iteratorPoint.x < _xCellCount; iteratorPoint.x++) {
-			maskType = _vm->_scene->getBGMaskType(iteratorPoint);
+			if (_vm->_scene->validBGMaskPoint(iteratorPoint)) {
+				maskType = _vm->_scene->getBGMaskType(iteratorPoint);
+			} else {
+				maskType = 1;
+			}			
 			setPathCell(iteratorPoint,  maskType ? kPathCellBarrier : kPathCellEmpty);			
 		}
 	}

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- scene.cpp	7 Jan 2005 00:57:43 -0000	1.76
+++ scene.cpp	7 Jan 2005 21:24:26 -0000	1.77
@@ -409,15 +409,14 @@
 		return false;
 	}
 
-
-	first.x = clamp( 0, testPoint.x, _vm->getDisplayWidth() - 1 );
-	first.y = clamp( 0, testPoint.y, _vm->getDisplayHeight() - 1 );
+	first.x = clamp( 0, testPoint.x, _bgMask.w - 1 );
+	first.y = clamp( 0, testPoint.y, _bgMask.h - 1 );
 	if (first == testPoint) {
 		return false;
 	}
 
-	if (first.y >= _vm->getDisplayHeight() - 1) {
-		first.y = 200 -1 - 1;
+	if (first.y >= _bgMask.h - 1) {
+		first.y = _bgMask.h - 2;
 	}
 	testPoint = first;
 
@@ -432,12 +431,12 @@
 					break;
 				}
 			} else {
-				if (third.x >= _vm->getDisplayWidth()) {
+				if (third.x >= _bgMask.w) {
 					return false;
 				}
 			}
 
-			if (third.x < _vm->getDisplayWidth()) {
+			if (third.x < _bgMask.w) {
 				maskType = getBGMaskType(third);
 				if (getDoorState(maskType) == 0) {
 					testPoint.x = third.x + 1;
@@ -458,12 +457,12 @@
 					break;
 				}
 			} else {
-				if (third.y > _vm->getDisplayHeight() - 1) {
+				if (third.y >= _bgMask.h) {
 					return false;
 				}
 			}
 
-			if (third.y <= _vm->getDisplayHeight() - 1) {
+			if (third.y < _bgMask.h) {
 				maskType = getBGMaskType(third);
 				if (getDoorState(maskType) == 0) {
 					testPoint.y = third.y + 1;
@@ -809,6 +808,7 @@
 			_bgMask.loaded = 1;
 			_vm->decodeBGImage(_bgMask.res_buf, _bgMask.res_len, &_bgMask.buf,
 							&_bgMask.buf_len, &_bgMask.w, &_bgMask.h);
+			debug(0, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len);
 			break;
 		case SAGA_OBJECT_NAME_LIST:
 			debug(0, "Loading object name list resource...");





More information about the Scummvm-git-logs mailing list