[gnome-games] gnometris: Resurrect block rotation; smoother block movement



commit 0ad1ea2750c6f821aaabd21a5dbf802f8747502a
Author: Jason D. Clinton <me jasonclinton com>
Date:   Wed May 6 17:44:33 2009 -0500

    gnometris: Resurrect block rotation; smoother block movement
    
    Just properly clean up our references when we rotate.
---
 gnometris/blockops.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnometris/blockops.cpp b/gnometris/blockops.cpp
index dbab17a..747dee2 100644
--- a/gnometris/blockops.cpp
+++ b/gnometris/blockops.cpp
@@ -165,7 +165,7 @@ BlockOps::BlockOps() :
 	g_signal_connect (move_time, "completed", G_CALLBACK
 			  (BlockOps::move_end), this);
 	move_alpha = clutter_alpha_new_full (move_time,
-					     CLUTTER_EASE_OUT_QUAD);
+					     CLUTTER_EASE_IN_QUAD);
 
 	fall_time = clutter_timeline_new_for_duration (120);
 	g_signal_connect (fall_time, "completed", G_CALLBACK
@@ -509,7 +509,10 @@ BlockOps::putBlockInField (SlotType fill)
 					field[i][j].createActor (playingField,
 								 renderer->getCacheCellById (color));
 				} else {
-					field[i][j].actor = NULL;
+					if (field[i][j].actor) {
+						clutter_actor_destroy (field[i][j].actor);
+						field[i][j].actor = NULL;
+					}
 				}
 			}
 		}



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