[gnome-games] gnometris: Quake strength now depends on N lines cleared
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] gnometris: Quake strength now depends on N lines cleared
- Date: Thu, 7 May 2009 17:17:32 -0400 (EDT)
commit efd3c9cc74754c9105ad2e2ae64ef7a524e33087
Author: Jason D. Clinton <me jasonclinton com>
Date: Thu May 7 16:17:17 2009 -0500
gnometris: Quake strength now depends on N lines cleared
---
gnometris/blockops.cpp | 6 ++++--
gnometris/blockops.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnometris/blockops.cpp b/gnometris/blockops.cpp
index 1b60c20..071f332 100644
--- a/gnometris/blockops.cpp
+++ b/gnometris/blockops.cpp
@@ -155,7 +155,8 @@ BlockOps::BlockOps() :
backgroundImage(NULL),
center_anchor_x(0),
center_anchor_y(0),
- FALL_TIMING(360)
+ FALL_TIMING(360),
+ QUAKE_TIMING(720)
{
w = gtk_clutter_embed_new ();
@@ -192,7 +193,7 @@ BlockOps::BlockOps() :
1.0, 1.0,
2.0, 2.0);
- quake_time = clutter_timeline_new_for_duration (360);
+ quake_time = clutter_timeline_new_for_duration (QUAKE_TIMING);
quake_alpha = clutter_alpha_new_full (quake_time,
CLUTTER_EASE_OUT_BOUNCE);
quake_behaviour = clutter_behaviour_path_new_with_knots (quake_alpha,
@@ -443,6 +444,7 @@ BlockOps::checkFullLines()
if (num_full_lines > 0)
{
clutter_timeline_set_duration (fall_time, FALL_TIMING / (5 - num_full_lines));
+ clutter_timeline_set_duration (quake_time, QUAKE_TIMING / (5 - num_full_lines));
clutter_timeline_start (fall_time);
clutter_timeline_start (explode_time);
quake_ratio = ((float) num_full_lines) / 4.0;
diff --git a/gnometris/blockops.h b/gnometris/blockops.h
index 6748325..7a2fd63 100644
--- a/gnometris/blockops.h
+++ b/gnometris/blockops.h
@@ -161,6 +161,7 @@ private:
BlockOps *field);
const gint FALL_TIMING;
+ const gint QUAKE_TIMING;
};
#endif //__blockops_h__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]