[Scummvm-cvs-logs] scummvm master -> 8388714ac939c91100146872c777126a50101f24

sev- sev at scummvm.org
Fri Jan 17 19:28:06 CET 2014


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

Summary:
8a2b186382 FULLPIPE: Implement sceneHandler35_genFlies()
8388714ac9 FULLPIPE: Renames in scene35. This completes the scene


Commit: 8a2b186382c2df86f41bdf4f9d96add0e475551e
    https://github.com/scummvm/scummvm/commit/8a2b186382c2df86f41bdf4f9d96add0e475551e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-17T03:46:39-08:00

Commit Message:
FULLPIPE: Implement sceneHandler35_genFlies()

Changed paths:
    engines/fullpipe/scenes/scene35.cpp



diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index 4cf7fb4..e63938e 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -124,7 +124,34 @@ void sceneHandler35_startFlow() {
 }
 
 void sceneHandler35_genFlies() {
-	warning("STUB: sceneHandler35_genFlies()");
+	StaticANIObject *fly = g_fp->_currentScene->getStaticANIObject1ById(ANI_FLY, -1);
+
+	int xoff = 0;
+	if ((!fly || !(fly->_flags & 4)) && !(g_fp->_rnd->getRandomNumber(32767) % 30)) {
+		int x, y;
+
+		if (g_fp->_rnd->getRandomNumber(1)) {
+			x = 600;
+			y = 0;
+		} else {
+			x = 0;
+			y = 600;
+		}
+
+		int numFlies = g_fp->_rnd->getRandomNumber(3) + 1;
+
+		while (numFlies--) {
+			g_fp->_floaters->genFlies(g_fp->_currentScene, g_fp->_rnd->getRandomNumber(55) + 1057,  g_fp->_rnd->getRandomNumber(60) + x + xoff, 4, 1);
+
+			xoff += 40;
+
+			g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val2 = 1084;
+			g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val3 = y;
+			g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val11 = 8.0;
+		}
+
+		g_vars->scene35_var06 = 0;
+	}
 }
 
 int sceneHandler35(ExCommand *cmd) {


Commit: 8388714ac939c91100146872c777126a50101f24
    https://github.com/scummvm/scummvm/commit/8388714ac939c91100146872c777126a50101f24
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-17T03:57:17-08:00

Commit Message:
FULLPIPE: Renames in scene35. This completes the scene

Changed paths:
    engines/fullpipe/scenes.cpp
    engines/fullpipe/scenes.h
    engines/fullpipe/scenes/scene35.cpp



diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index a4bf2dc..c61872f 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -348,14 +348,10 @@ Vars::Vars() {
 	scene34_dudeOnCactus = false;
 	scene34_fliesCountdown = 0;
 
-	scene35_var01 = 0;
-	scene35_var02 = 0;
-	scene35_var03 = 0;
-	scene35_var04 = 0;
 	scene35_hose = 0;
 	scene35_bellyInflater = 0;
-	scene35_var05 = 0;
-	scene35_var06 = 0;
+	scene35_flowCounter = 0;
+	scene35_fliesCounter = 0;
 
 	scene36_rotohrust = 0;
 	scene36_scissors = 0;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 42a56be..24da21c 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -491,14 +491,10 @@ public:
 	bool scene34_dudeOnCactus;
 	int scene34_fliesCountdown;
 
-	int scene35_var01;
-	int scene35_var02;
-	int scene35_var03;
-	int scene35_var04;
 	StaticANIObject *scene35_hose;
 	StaticANIObject *scene35_bellyInflater;
-	int scene35_var05;
-	int scene35_var06;
+	int scene35_flowCounter;
+	int scene35_fliesCounter;
 
 	StaticANIObject *scene36_rotohrust;
 	StaticANIObject *scene36_scissors;
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index e63938e..290213c 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -38,14 +38,10 @@
 namespace Fullpipe {
 
 void scene35_initScene(Scene *sc) {
-	g_vars->scene35_var01 = 200;
-	g_vars->scene35_var02 = 200;
-	g_vars->scene35_var03 = 300;
-	g_vars->scene35_var04 = 300;
 	g_vars->scene35_hose = sc->getStaticANIObject1ById(ANI_HOSE, -1);
 	g_vars->scene35_bellyInflater = sc->getStaticANIObject1ById(ANI_PUZODUV, -1);
-	g_vars->scene35_var05 = 0;
-	g_vars->scene35_var06 = 0;
+	g_vars->scene35_flowCounter = 0;
+	g_vars->scene35_fliesCounter = 0;
 
 	MovGraphLink *lnk = getSc2MctlCompoundBySceneId(sc->_sceneId)->getLinkByName(sO_CloseThing);
 
@@ -115,8 +111,8 @@ void sceneHandler35_startFlow() {
 
 			g_fp->playSound(SND_35_012, 1);
 		} else {
-			if (!g_vars->scene35_var05)
-				g_vars->scene35_var05 = 98;
+			if (!g_vars->scene35_flowCounter)
+				g_vars->scene35_flowCounter = 98;
 
 			g_fp->playSound(SND_35_011, 1);
 		}
@@ -150,7 +146,7 @@ void sceneHandler35_genFlies() {
 			g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val11 = 8.0;
 		}
 
-		g_vars->scene35_var06 = 0;
+		g_vars->scene35_fliesCounter = 0;
 	}
 }
 
@@ -184,7 +180,7 @@ int sceneHandler35(ExCommand *cmd) {
 			g_fp->stopAllSoundInstances(SND_35_011);
 			g_fp->playSound(SND_35_012, 1);
 
-			g_vars->scene35_var05 = 0;
+			g_vars->scene35_flowCounter = 0;
 			break;
 		}
 		break;
@@ -235,23 +231,23 @@ int sceneHandler35(ExCommand *cmd) {
 		if (g_fp->_aniMan2) {
 			int x = g_fp->_aniMan2->_ox;
 
-			if (x < g_fp->_sceneRect.left + g_vars->scene35_var01)
-				g_fp->_currentScene->_x = x - g_vars->scene35_var03 - g_fp->_sceneRect.left;
+			if (x < g_fp->_sceneRect.left + 200)
+				g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
 
-			if (x > g_fp->_sceneRect.right - g_vars->scene35_var01)
-				g_fp->_currentScene->_x = x + g_vars->scene35_var03 - g_fp->_sceneRect.right;
+			if (x > g_fp->_sceneRect.right - 200)
+				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
 		}
 
-		if (g_vars->scene35_var05 > 0) {
-			--g_vars->scene35_var05;
+		if (g_vars->scene35_flowCounter > 0) {
+			--g_vars->scene35_flowCounter;
 
-			if (!g_vars->scene35_var05)
+			if (!g_vars->scene35_flowCounter)
 				sceneHandler35_stopFlow();
 		}
 
-		g_vars->scene35_var06++;
+		g_vars->scene35_fliesCounter++;
 
-		if (g_vars->scene35_var06 >= 160)
+		if (g_vars->scene35_fliesCounter >= 160)
 			sceneHandler35_genFlies();
 
 		g_fp->_floaters->update();






More information about the Scummvm-git-logs mailing list