[Scummvm-cvs-logs] scummvm master -> 8a936200037e6d97212a4d0ad6a710c87cc15b58

sev- sev at scummvm.org
Mon Dec 9 17:18:28 CET 2013


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
354794386c FULLPIPE: Rearrange debug output
c732ee501c FULLPIPE: Implement Scene::updateScrolling()
8a93620003 FULLPIPE: Implement Scene::updateScrolling2()


Commit: 354794386cbdd8061a32e20659f14fb2965539c9
    https://github.com/scummvm/scummvm/commit/354794386cbdd8061a32e20659f14fb2965539c9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-09T07:38:04-08:00

Commit Message:
FULLPIPE: Rearrange debug output

Changed paths:
    engines/fullpipe/gfx.cpp
    engines/fullpipe/scene.cpp
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index fba7e40..a4dbc30 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -596,7 +596,7 @@ void Picture::draw(int x, int y, int style, int angle) {
 	int x1 = x;
 	int y1 = y;
 
-	debug(0, "Picture::draw(%d, %d, %d, %d) (%s)", x, y, style, angle, _memfilename);
+	debug(7, "Picture::draw(%d, %d, %d, %d) (%s)", x, y, style, angle, _memfilename);
 
 	if (x != -1)
 		x1 = x;
@@ -611,7 +611,7 @@ void Picture::draw(int x, int y, int style, int angle) {
 		return;
 
 	if ((_alpha & 0xff) < 0xff) {
-		debug(0, "Picture:draw: alpha = %0x", _alpha);
+		debug(7, "Picture:draw: alpha = %0x", _alpha);
 	}
 
 	byte *pal = _paletteData;
@@ -783,7 +783,7 @@ bool Bitmap::isPixelAtHitPosRB(int x, int y) {
 }
 
 void Bitmap::putDib(int x, int y, int32 *palette) {
-	debug(0, "Bitmap::putDib(%d, %d)", x, y);
+	debug(7, "Bitmap::putDib(%d, %d)", x, y);
 
 	_x = x - g_fullpipe->_sceneRect.left;
 	_y = y - g_fullpipe->_sceneRect.top;
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 3831831..78c58bd 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -447,7 +447,7 @@ void Scene::objectList_sortByPriority(PtrList &list) {
 }
 
 void Scene::draw() {
-	debug(0, ">>>>> Scene::draw()");
+	debug(6, ">>>>> Scene::draw()");
 	updateScrolling();
 
 	drawContent(60000, 0, true);
@@ -525,7 +525,7 @@ int Scene::getPictureObjectIdAtPos(int x, int y) {
 }
 
 void Scene::update(int counterdiff) {
-	debug(0, "Scene::update(%d)", counterdiff);
+	debug(6, "Scene::update(%d)", counterdiff);
 
 	for (PtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s)
 		((StaticANIObject *)*s)->update(counterdiff);
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index b82875f..8324e0f 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -496,7 +496,7 @@ void StaticANIObject::draw() {
 	Common::Point point;
 	Common::Rect rect;
 
-	debug(0, "StaticANIObject::draw() (%s) [%d] [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy);
+	debug(6, "StaticANIObject::draw() (%s) [%d] [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy);
 
 	if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows
 		&& (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) {
@@ -556,7 +556,7 @@ void StaticANIObject::draw() {
 }
 
 void StaticANIObject::draw2() {
-	debug(0, "StatciANIObject::draw2(): id: (%s) %d [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy);
+	debug(6, "StatciANIObject::draw2(): id: (%s) %d [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy);
 
 	if ((_flags & 4) && (_flags & 0x10)) {
 		if (_movement) {
@@ -891,7 +891,7 @@ void StaticANIObject::hide() {
 }
 
 void StaticANIObject::show1(int x, int y, int movId, int mqId) {
-	debug(0, "StaticANIObject::show1(%d, %d, %d, %d)", x, y, movId, mqId);
+	debug(6, "StaticANIObject::show1(%d, %d, %d, %d)", x, y, movId, mqId);
 
 	if (_messageQueueId)
 		return;
@@ -998,20 +998,17 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
 	int newy = _oy;
 	Common::Point point;
 
-	debug(0, "0 %d %d", newx, newy);
 	if (_movement) {
 		_movement->getCurrDynamicPhaseXY(point);
 
 		newx -= point.x;
 		newy -= point.y;
 
-		debug(0, "1 %d %d", newx, newy);
 	} else if (_statics) {
 		_statics->getSomeXY(point);
 
 		newx -= point.x;
 		newy -= point.y;
-		debug(0, "2 %d %d - %d %d assa", newx, newy, point.x, point.y);
 	}
 
 	_movement = mov;
@@ -1029,7 +1026,6 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
 			newx += point.x + _movement->_mx;
 			newy += point.y + _movement->_my;
 
-			debug(0, "3 %d %d", newx, newy);
 			_stepArray.gotoNextPoint();
 
 			ExCommand *ex = _movement->_currDynamicPhase->getExCommand();
@@ -1794,7 +1790,7 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) {
 	_field_7E = 0;
 	_rect = new Common::Rect();
 
-	debug(0, "DynamicPhase::DynamicPhase(src, %d)", reverse);
+	debug(1, "DynamicPhase::DynamicPhase(src, %d)", reverse);
 
 	if (reverse) {
 		if (!src->_bitmap)


Commit: c732ee501cea60f5634cb19e86877cf3ab40feef
    https://github.com/scummvm/scummvm/commit/c732ee501cea60f5634cb19e86877cf3ab40feef
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-09T08:00:26-08:00

Commit Message:
FULLPIPE: Implement Scene::updateScrolling()

Changed paths:
    engines/fullpipe/scene.cpp



diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 78c58bd..c261874 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -470,7 +470,48 @@ void Scene::draw() {
 }
 
 void Scene::updateScrolling() {
-	debug(0, "STUB Scene::updateScrolling()");
+	if (_messageQueueId && !_x && !_y) {
+		MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
+
+		if (mq)
+			mq->update();
+
+		_messageQueueId = 0;
+	}
+
+	if (_x || _y) {
+		int offsetX = 0;
+		int offsetY = 0;
+
+		if (_x < 0) {
+			if (!g_fullpipe->_sceneRect.left && !(((PictureObject *)_picObjList[0])->_flags & 2))
+				_x = 0;
+
+			if (_x <= -g_fullpipe->_scrollSpeed) {
+				offsetX = -g_fullpipe->_scrollSpeed;
+				_x += g_fullpipe->_scrollSpeed;
+			}
+		} else if (_x >= g_fullpipe->_scrollSpeed) {
+			offsetX = g_fullpipe->_scrollSpeed;
+			_x -= g_fullpipe->_scrollSpeed;
+		} else {
+			_x = 0;
+		}
+
+		if (_y > 0) {
+			offsetY = g_fullpipe->_scrollSpeed;
+			_y -= g_fullpipe->_scrollSpeed;
+		}
+
+		if (_y < 0) {
+			offsetY -= g_fullpipe->_scrollSpeed;
+			_y += g_fullpipe->_scrollSpeed;
+		}
+
+		g_fullpipe->_sceneRect.translate(offsetX, offsetY);
+	}
+
+	updateScrolling2();
 }
 
 void Scene::updateScrolling2() {
@@ -603,7 +644,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
 					}
 				}
 				_bigPictureArray[bgNumX][0]->getDimensions(&point);
-				int v32 = point.x + bgPosX;
+				int oldx = point.x + bgPosX;
 				bgPosX += point.x;
 				bgNumX++;
 
@@ -612,7 +653,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
 						break;
 					bgNumX = 0;
 				}
-				if (v32 >= g_fullpipe->_sceneRect.right - 1)
+				if (oldx >= g_fullpipe->_sceneRect.right - 1)
 					break;
 			}
 		}


Commit: 8a936200037e6d97212a4d0ad6a710c87cc15b58
    https://github.com/scummvm/scummvm/commit/8a936200037e6d97212a4d0ad6a710c87cc15b58
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-09T08:17:30-08:00

Commit Message:
FULLPIPE: Implement Scene::updateScrolling2()

Changed paths:
    engines/fullpipe/scene.cpp



diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index c261874..61ff345 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -515,7 +515,29 @@ void Scene::updateScrolling() {
 }
 
 void Scene::updateScrolling2() {
-	warning("STUB Scene::updateScrolling2()");
+	if (_picObjList.size()) {
+		Common::Point point;
+		int offsetY = 0;
+		int offsetX = 0;
+
+		((PictureObject *)_picObjList[0])->getDimensions(&point);
+
+		int flags = ((PictureObject *)_picObjList[0])->_flags;
+
+		if (g_fullpipe->_sceneRect.left < 0 && !(flags & 2))
+			offsetX = -g_fullpipe->_sceneRect.left;
+
+		if (g_fullpipe->_sceneRect.top < 0 && !(flags & 0x20))
+			offsetY = -g_fullpipe->_sceneRect.top;
+
+		if (g_fullpipe->_sceneRect.right > point.x - 1 && g_fullpipe->_sceneRect.left > 0 && !(flags & 2))
+			offsetX = point.x - g_fullpipe->_sceneRect.right - 1;
+
+		if (g_fullpipe->_sceneRect.bottom > point.y - 1 && g_fullpipe->_sceneRect.top > 0 && !(flags & 0x20))
+			offsetY = point.y - g_fullpipe->_sceneRect.bottom - 1;
+
+		g_fullpipe->_sceneRect.translate(offsetX, offsetY);
+	}
 }
 
 StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) {






More information about the Scummvm-git-logs mailing list