[gnome-games/gnibbles-clutter] Removed unused code for loading pixmaps in board.c
- From: Guillaume Béland <guillaubel src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gnibbles-clutter] Removed unused code for loading pixmaps in board.c
- Date: Tue, 26 May 2009 16:53:29 -0400 (EDT)
commit 446c02b48d3b1b07b47fa93c5776ffcc82979090
Author: Guillaume Beland <guillaume beland gmail com>
Date: Tue May 26 15:06:05 2009 -0400
Removed unused code for loading pixmaps in board.c
---
gnibbles/board.c | 70 ------------------------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/gnibbles/board.c b/gnibbles/board.c
index 310f840..1458bf9 100644
--- a/gnibbles/board.c
+++ b/gnibbles/board.c
@@ -39,74 +39,6 @@ extern GnibblesProperties *properties;
extern GdkPixbuf *wall_pixmaps[];
-GdkPixbuf *walls_pixmaps[19] = { NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL
-};
-
-static GdkPixbuf *
-board_load_pixmap_file (const gchar * pixmap, gint xsize, gint ysize)
-{
- GdkPixbuf *image;
- gchar *filename;
- const char *dirname;
-
- dirname = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY);
- filename = g_build_filename (dirname, pixmap, NULL);
-
- if (!filename) {
- 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;
- g_free(message);
- }
-
- image = gdk_pixbuf_new_from_file_at_size (filename, xsize, ysize, NULL);
- g_free (filename);
-
- return image;
-}
-
-static void
-board_load_pixmap ()
-{
-
- gchar *small_files[] = {
- "snake-red.svg",
- "snake-green.svg",
- "snake-blue.svg",
- "snake-yellow.svg",
- "snake-cyan.svg",
- "snake-magenta.svg",
- "snake-grey.svg",
- "wall-empty.svg",
- "wall-straight-up.svg",
- "wall-straight-side.svg",
- "wall-corner-bottom-left.svg",
- "wall-corner-bottom-right.svg",
- "wall-corner-top-left.svg",
- "wall-corner-top-right.svg",
- "wall-tee-up.svg",
- "wall-tee-right.svg",
- "wall-tee-left.svg",
- "wall-tee-down.svg",
- "wall-cross.svg"
- };
-
- int i;
-
- for (i = 0; i < 19; i++) {
- if (walls_pixmaps[i])
- g_object_unref (walls_pixmaps[i]);
-
- walls_pixmaps[i] = board_load_pixmap_file (small_files[i],
- 4 * properties->tilesize,
- 4 * properties->tilesize);
- }
-}
-
GnibblesBoard *
gnibbles_board_new (gint t_w, gint t_h)
{
@@ -124,8 +56,6 @@ gnibbles_board_new (gint t_w, gint t_h)
ClutterActor *stage;
- board_load_pixmap ();
-
stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (board->clutter_widget));
clutter_stage_set_color (CLUTTER_STAGE(stage), &stage_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]