gnome-games r8419 - trunk/libgames-support
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8419 - trunk/libgames-support
- Date: Tue, 6 Jan 2009 18:18:05 +0000 (UTC)
Author: chpe
Date: Tue Jan 6 18:18:05 2009
New Revision: 8419
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8419&view=rev
Log:
Code cleanup.
Modified:
trunk/libgames-support/games-card-theme-svg.c
Modified: trunk/libgames-support/games-card-theme-svg.c
==============================================================================
--- trunk/libgames-support/games-card-theme-svg.c (original)
+++ trunk/libgames-support/games-card-theme-svg.c Tue Jan 6 18:18:05 2009
@@ -102,6 +102,11 @@
GamesPreimage *preimage = preimage_card_theme->cards_preimage;
GdkPixbuf *subpixbuf;
int suit, rank;
+ double card_width, card_height;
+ double width, height;
+ double offsetx, offsety;
+ double zoomx, zoomy;
+ char node[64];
if (!preimage_card_theme->theme_loaded)
return NULL;
@@ -117,38 +122,28 @@
return subpixbuf;
}
- if (TRUE) {
- double card_width, card_height;
- double width, height;
- double offsetx, offsety;
- double zoomx, zoomy;
- char node[64];
-
- card_width = ((double) games_preimage_get_width (preimage)) / N_COLS;
- card_height = ((double) games_preimage_get_height (preimage)) / N_ROWS;
-
- width = preimage_card_theme->card_size.width - 2 * DELTA;
- height = preimage_card_theme->card_size.height - 2 * DELTA;
-
- offsetx = -((double) rank) * card_width + DELTA;
- offsety = -((double) suit) * card_height + DELTA;
-
- zoomx = width / card_width;
- zoomy = height / card_height;
-
- games_card_get_node_by_suit_and_rank_snprintf (node, sizeof (node), suit, rank);
-
- subpixbuf = games_preimage_render_sub (preimage,
- node,
- preimage_card_theme->card_size.width,
- preimage_card_theme->card_size.height,
- offsetx, offsety,
- zoomx, zoomy);
+ card_width = ((double) games_preimage_get_width (preimage)) / N_COLS;
+ card_height = ((double) games_preimage_get_height (preimage)) / N_ROWS;
- return subpixbuf;
- }
+ width = preimage_card_theme->card_size.width - 2 * DELTA;
+ height = preimage_card_theme->card_size.height - 2 * DELTA;
+
+ offsetx = -((double) rank) * card_width + DELTA;
+ offsety = -((double) suit) * card_height + DELTA;
+
+ zoomx = width / card_width;
+ zoomy = height / card_height;
+
+ games_card_get_node_by_suit_and_rank_snprintf (node, sizeof (node), suit, rank);
+
+ subpixbuf = games_preimage_render_sub (preimage,
+ node,
+ preimage_card_theme->card_size.width,
+ preimage_card_theme->card_size.height,
+ offsetx, offsety,
+ zoomx, zoomy);
- return NULL; // FIXMEchpe
+ return subpixbuf;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]