[gnome-games] Re-added gnibles_error()
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] Re-added gnibles_error()
- Date: Wed, 14 Oct 2009 02:52:00 +0000 (UTC)
commit 082f102e598299bce720c6799c5eb6d2b731a8a6
Author: Guillaume Beland <guillaume beland gmail com>
Date: Wed Jul 29 10:59:10 2009 -0400
Re-added gnibles_error()
gnibbles/board.c | 6 +++---
gnibbles/gnibbles.c | 14 +++++++++++++-
gnibbles/gnibbles.h | 7 +------
gnibbles/worm-clutter.c | 6 +++---
4 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/gnibbles/board.c b/gnibbles/board.c
index 3bc3d6a..fe54012 100644
--- a/gnibbles/board.c
+++ b/gnibbles/board.c
@@ -76,7 +76,7 @@ gnibbles_board_new (ClutterActor *stage)
board->surface = clutter_texture_new_from_file (filename, NULL);
- clutter_actor_set_opacity (board->surface, 215);
+ clutter_actor_set_opacity (board->surface, 0xff);
g_value_init (&val, G_TYPE_BOOLEAN);
g_value_set_boolean ( &val, TRUE);
@@ -235,7 +235,7 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
g_strdup_printf (_
("Nibbles couldn't load level file:\n%s\n\n"
"Please check your Nibbles installation"), filename);
- //gnibbles_error (window, message);
+ gnibbles_error (message);
g_free (message);
}
@@ -254,7 +254,7 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
g_strdup_printf (_
("Level file appears to be damaged:\n%s\n\n"
"Please check your Nibbles installation"), filename);
- //gnibbles_error (window, message);
+ gnibbles_error (message);
g_free (message);
break;
}
diff --git a/gnibbles/gnibbles.c b/gnibbles/gnibbles.c
index 9628928..ad15b7e 100644
--- a/gnibbles/gnibbles.c
+++ b/gnibbles/gnibbles.c
@@ -79,6 +79,7 @@ extern GnibblesProperties *properties;
extern GnibblesScoreboard *scoreboard;
+
static GdkPixbuf *
gnibbles_load_pixmap_file (const gchar * pixmap, gint xsize, gint ysize)
{
@@ -93,7 +94,7 @@ gnibbles_load_pixmap_file (const gchar * pixmap, gint xsize, gint ysize)
char *message =
g_strdup_printf (_("Nibbles couldn't find pixmap file:\n%s\n\n"
"Please check your Nibbles installation"), pixmap);
- //gnibbles_error (window, message;
+ gnibbles_error (message);
g_free(message);
}
@@ -172,6 +173,17 @@ gnibbles_load_pixmap (gint tilesize)
}
void
+gnibbles_error (gchar *message)
+{
+ GtkWidget *w = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ "%s", message);
+ gtk_dialog_run (GTK_DIALOG (w));
+ gtk_widget_destroy (GTK_WIDGET (w));
+ exit (1);
+}
+
+void
gnibbles_load_logo (void)
{
if (logo_pixmap)
diff --git a/gnibbles/gnibbles.h b/gnibbles/gnibbles.h
index 0346773..3052385 100644
--- a/gnibbles/gnibbles.h
+++ b/gnibbles/gnibbles.h
@@ -57,14 +57,9 @@
extern GnibblesWarpManager *warpmanager;
-//void gnibbles_draw_pixmap (gint which, gint x, gint y);
-//void gnibbles_draw_big_pixmap (gint which, gint x, gint y);
-//void gnibbles_draw_pixmap_buffer (gint which, gint x, gint y);
-//void gnibbles_draw_big_pixmap_buffer (gint which, gint x, gint y);
void gnibbles_load_pixmap (gint tilesize);
-//void gnibbles_load_pixmap (GtkWidget * window);
+void gnibbles_error (gchar *message);
void gnibbles_load_logo (void);
-//void gnibbles_load_level (GtkWidget * window, gint level);
void gnibbles_init (void);
void gnibbles_add_bonus (gint regular);
gint gnibbles_move_worms (void);
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index 45b02dd..f500117 100644
--- a/gnibbles/worm-clutter.c
+++ b/gnibbles/worm-clutter.c
@@ -415,12 +415,12 @@ gnibbles_worm_animate (GnibblesWorm *worm)
actor = clutter_group_get_nth_child (CLUTTER_GROUP (worm->actors), i);
clutter_actor_get_size (actor, &w, &h);
- animation = clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUAD, 600,
+ animation = clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUAD, 400,
"opacity", 0,
"width", w * 1.5,
"height", h * 1.5,
- "rotation-angle-z", 360.f * 2,
- "fixed::rotation-center-z-gravity",
+ "rotation-angle-z", 360.f * 1.75,
+ "fixed::rotation-center-z-gravity",
CLUTTER_GRAVITY_CENTER,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]