gnome-games r8695 - trunk/gnometris



Author: jclinton
Date: Mon Feb  9 17:22:49 2009
New Revision: 8695
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8695&view=rev

Log:
Make the degree of explosive angle dependent on the size of cells

Modified:
   trunk/gnometris/blockops.cpp
   trunk/gnometris/blockops.h

Modified: trunk/gnometris/blockops.cpp
==============================================================================
--- trunk/gnometris/blockops.cpp	(original)
+++ trunk/gnometris/blockops.cpp	Mon Feb  9 17:22:49 2009
@@ -108,7 +108,7 @@
 }
 
 Block&
-Block::move_from (Block& b)
+Block::move_from (Block& b, BlockOps *f)
 {
 	if (this != &b) {
 		what = b.what;
@@ -121,8 +121,8 @@
 			clutter_actor_raise_top (actor);
 			clutter_effect_fade (tmpl, actor, 0, NULL, NULL);
 			clutter_effect_move (tmpl, actor,
-					cur_x + g_random_int_range(-60, 60),
-					cur_y + g_random_int_range(-16, 60),
+					cur_x + g_random_int_range(f->cell_width * -5, f->cell_width * 5),
+					cur_y + g_random_int_range(f->cell_height * -5, f->cell_height * 5),
 					NULL, NULL);
 			destroy_actors = g_list_append (destroy_actors, actor);
 		}
@@ -397,7 +397,7 @@
 		{
 			for (int x = 0; x < COLUMNS; ++x)
 			{
-				field[x][y+numFullLines].move_from (field[x][y]);
+				field[x][y+numFullLines].move_from (field[x][y], this);
 			}
 			++numCascades;
 		}

Modified: trunk/gnometris/blockops.h
==============================================================================
--- trunk/gnometris/blockops.h	(original)
+++ trunk/gnometris/blockops.h	Mon Feb  9 17:22:49 2009
@@ -42,7 +42,7 @@
 	Block ();
 	~Block ();
 
-	Block& move_from (Block& b);
+	Block& move_from (Block &b, BlockOps *f);
 
 	SlotType what;
 	guint color;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]