[Scummvm-cvs-logs] SF.net SVN: scummvm: [24034] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Sep 30 12:45:15 CEST 2006


Revision: 24034
          http://svn.sourceforge.net/scummvm/?rev=24034&view=rev
Author:   kirben
Date:     2006-09-30 03:45:10 -0700 (Sat, 30 Sep 2006)

Log Message:
-----------
Add code to move pieces in jumble of PP

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/vga.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2006-09-30 07:29:23 UTC (rev 24033)
+++ scummvm/trunk/engines/agos/agos.cpp	2006-09-30 10:45:10 UTC (rev 24034)
@@ -616,6 +616,7 @@
 
 	_variableArray = (int16 *)calloc(_numVars, sizeof(int16));
 	_variableArray2 = (int16 *)calloc(_numVars, sizeof(int16));
+	_variableArrayPtr = _variableArray;
 
 	setupOpcodes();
 
@@ -632,8 +633,6 @@
 	_noOverWrite = 0xFFFF;
 
 	_stringIdLocalMin = 1;
-
-	_variableArrayPtr = _variableArray;
 }
 
 AGOSEngine::~AGOSEngine() {

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2006-09-30 07:29:23 UTC (rev 24033)
+++ scummvm/trunk/engines/agos/vga.cpp	2006-09-30 10:45:10 UTC (rev 24034)
@@ -432,6 +432,10 @@
 	y = vcReadNextWord();			/* 6 */
 	palette = vcReadNextWord();		/* 8 */
 
+	if (getGameType() == GType_PP && getBitFlag(100)) {
+		printf("StartAnOverlayAnim\n");
+	}
+
 	if (isSpriteLoaded(vgaSpriteId, zoneNum))
 		return;
 
@@ -1168,8 +1172,6 @@
 		return;
 
 	uint offs, offs2;
-	// Allow one section of Simon the Sorcerer 1 introduction to be displayed
-	// in lower half of screen
 	if (getGameType() == GType_WW) {
 		//if (_windowNum == 4 || _windowNum >= 10) {
 			offs = state->x * 8;
@@ -1179,9 +1181,11 @@
 		//	offs2 = (vlut[1] - _video_windows[17] + state->y);
 		//}
 	} else if (getGameType() == GType_SIMON1) {
-		if (_windowNum != 2 || _windowNum != 3) {
-			offs = ((vlut[0]) * 2 + state->x) * 8;
-			offs2 = (vlut[1] + state->y);
+		// Allow one section of Simon the Sorcerer 1 introduction to be displayed
+		// in lower half of screen
+		if ((getGameType() == GType_SIMON1) && (_subroutine == 2923 || _subroutine == 2926)) {
+			offs = state->x * 8;
+			offs2 = state->y;
 		} else {
 			offs = ((vlut[0] - _video_windows[16]) * 2 + state->x) * 8;
 			offs2 = (vlut[1] - _video_windows[17] + state->y);
@@ -2412,8 +2416,20 @@
 }
 
 void AGOSEngine::vc63_fastFadeIn() {
-	if (getGameType() == GType_FF || getGameType() == GType_PP) {
+	if (getGameType() == GType_PP) {
 		_fastFadeInFlag = 256;
+
+		if (getBitFlag(100)) {
+			printf("StartOverlayAnims\n");
+		}
+		if (getBitFlag(103)) {
+			printf("NameAndTime\n");
+		}
+		if (getBitFlag(104)) {
+			printf("HiScoreTable\n");
+		}
+	} else if (getGameType() == GType_FF) {
+		_fastFadeInFlag = 256;
 	} else {
 		_fastFadeInFlag = 208;
 		if (_windowNum != 4) {
@@ -2575,18 +2591,42 @@
 }
 
 void AGOSEngine::vc76_setScaleXOffs() {
-	VgaSprite *vsp = findCurSprite();
+	if (getGameType() == GType_PP && getBitFlag(120)) {
+		VgaSprite *vsp1, *vsp2;
+		uint16 old_file_1, tmp1, tmp2;
 
-	vsp->image = vcReadNextWord();
-	int16 x = vcReadNextWord();
-	uint16 var = vcReadNextWord();
+		old_file_1 = _vgaCurSpriteId;
 
-	vsp->x += getScale(vsp->y, x);
-	_variableArrayPtr[var] = vsp->x;
+		_vgaCurSpriteId = vcReadVar(vcReadNextWord());
+		 vsp1 = findCurSprite();
+		_vgaCurSpriteId = vcReadVar(vcReadNextWord());
+		 vsp2 = findCurSprite();
 
-	checkScrollX(x, vsp->x);
+		tmp1 = vsp1->x;
+		tmp2 = vsp2->x;
+		vsp1->x = tmp2;
+		vsp2->x = tmp1;
+		tmp1 = vsp1->y;
+		tmp2 = vsp1->y;
+		vsp1->y = tmp2;
+		vsp2->y = tmp1;
 
-	vsp->flags = kDFScaled;
+		_vgaCurSpriteId = old_file_1;
+		_vcPtr += 2;
+	} else {
+		VgaSprite *vsp = findCurSprite();
+
+		vsp->image = vcReadNextWord();
+		int16 x = vcReadNextWord();
+		uint16 var = vcReadNextWord();
+
+		vsp->x += getScale(vsp->y, x);
+		_variableArrayPtr[var] = vsp->x;
+
+		checkScrollX(x, vsp->x);
+
+		vsp->flags = kDFScaled;
+	}
 }
 
 void AGOSEngine::vc77_setScaleYOffs() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list