gcompris r3281 - in branches/gcomprixogoo/src: advanced_colors-activity algebra_by-activity algebra_guesscount-activity babymatch-activity boards clickgame-activity clockgame-activity gcompris gletters-activity imageid-activity missing_letter-activity paratrooper-activity planegame-activity railroad-activity scalesboard-activity smallnumbers-activity submarine-activity traffic-activity wordsgame-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3281 - in branches/gcomprixogoo/src: advanced_colors-activity algebra_by-activity algebra_guesscount-activity babymatch-activity boards clickgame-activity clockgame-activity gcompris gletters-activity imageid-activity missing_letter-activity paratrooper-activity planegame-activity railroad-activity scalesboard-activity smallnumbers-activity submarine-activity traffic-activity wordsgame-activity
- Date: Thu, 6 Mar 2008 23:03:13 +0000 (GMT)
Author: bcoudoin
Date: Thu Mar 6 23:03:12 2008
New Revision: 3281
URL: http://svn.gnome.org/viewvc/gcompris?rev=3281&view=rev
Log:
cleanup, removed width and heigth from the board struct as it
is always fixed
Modified:
branches/gcomprixogoo/src/advanced_colors-activity/advanced_colors.c
branches/gcomprixogoo/src/algebra_by-activity/algebra.c
branches/gcomprixogoo/src/algebra_guesscount-activity/algebra_guesscount.c
branches/gcomprixogoo/src/babymatch-activity/shapegame.c
branches/gcomprixogoo/src/boards/py-gcompris-board.c
branches/gcomprixogoo/src/clickgame-activity/clickgame.c
branches/gcomprixogoo/src/clockgame-activity/clockgame.c
branches/gcomprixogoo/src/gcompris/bonus.c
branches/gcomprixogoo/src/gcompris/gcompris-board.h
branches/gcomprixogoo/src/gcompris/gcompris_db.c
branches/gcomprixogoo/src/gcompris/menu.c
branches/gcomprixogoo/src/gletters-activity/gletters.c
branches/gcomprixogoo/src/imageid-activity/imageid.c
branches/gcomprixogoo/src/missing_letter-activity/missingletter.c
branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
branches/gcomprixogoo/src/planegame-activity/planegame.c
branches/gcomprixogoo/src/railroad-activity/railroad.c
branches/gcomprixogoo/src/scalesboard-activity/scale.c
branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
branches/gcomprixogoo/src/submarine-activity/submarine.c
branches/gcomprixogoo/src/traffic-activity/traffic.c
branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c
Modified: branches/gcomprixogoo/src/advanced_colors-activity/advanced_colors.c
==============================================================================
--- branches/gcomprixogoo/src/advanced_colors-activity/advanced_colors.c (original)
+++ branches/gcomprixogoo/src/advanced_colors-activity/advanced_colors.c Thu Mar 6 23:03:12 2008
@@ -136,8 +136,8 @@
gc_bar_set(GC_BAR_LEVEL);
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gamewon = FALSE;
Modified: branches/gcomprixogoo/src/algebra_by-activity/algebra.c
==============================================================================
--- branches/gcomprixogoo/src/algebra_by-activity/algebra.c (original)
+++ branches/gcomprixogoo/src/algebra_by-activity/algebra.c Thu Mar 6 23:03:12 2008
@@ -174,8 +174,8 @@
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=10; /* Go to next level after this number of 'play' */
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL|GC_BAR_OK);
@@ -553,7 +553,7 @@
double y_firstline = 0;
/* Some globals for this board layout */
- y_firstline = gcomprisBoard->height/5;
+ y_firstline = BOARDHEIGHT/5;
get_random_number(&first_operand, &second_operand);
@@ -564,7 +564,7 @@
/* Calc the longuest value */
longuest = MAX(strlen(first_operand_str), strlen(second_operand_str));
- x_align = (gcomprisBoard->width - (longuest*3*NUMBERSWIDTH))/2
+ x_align = (BOARDWIDTH - (longuest*3*NUMBERSWIDTH))/2
+ NUMBERSWIDTH*(strlen(first_operand_str)) - 200;
/* First operand */
Modified: branches/gcomprixogoo/src/algebra_guesscount-activity/algebra_guesscount.c
==============================================================================
--- branches/gcomprixogoo/src/algebra_guesscount-activity/algebra_guesscount.c (original)
+++ branches/gcomprixogoo/src/algebra_guesscount-activity/algebra_guesscount.c Thu Mar 6 23:03:12 2008
@@ -216,7 +216,7 @@
gcomprisBoard->number_of_sublevel=NUMBER_OF_SUBLEVELS; /* Go to next level after this number of 'play' */
gc_score_start(SCORESTYLE_NOTE,
50,
- gcomprisBoard->height - 50,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL);
@@ -454,7 +454,7 @@
NULL);
}
- xOffset = (gcomprisBoard->width - 4 * BUTTON_WIDTH - 3 * HORIZONTAL_SEPARATION)/2;
+ xOffset = (BOARDWIDTH - 4 * BUTTON_WIDTH - 3 * HORIZONTAL_SEPARATION)/2;
for (i=0; i<4; i++) {
oper_item[i] = goo_canvas_image_new (boardRootItem,
oper_pixmap[i],
@@ -491,7 +491,7 @@
"fill-color", TEXT_RESULT_COLOR_FRONT,
NULL);
- xOffset = (gcomprisBoard->width - (gcomprisBoard->level+1) * BUTTON_WIDTH - gcomprisBoard->level * HORIZONTAL_SEPARATION)/2;
+ xOffset = (BOARDWIDTH - (gcomprisBoard->level+1) * BUTTON_WIDTH - gcomprisBoard->level * HORIZONTAL_SEPARATION)/2;
for (i=0; i<gcomprisBoard->level+1; i++) {
num_item[i] = goo_canvas_image_new (boardRootItem,
num_pixmap[answer_num_index[i]],
Modified: branches/gcomprixogoo/src/babymatch-activity/shapegame.c
==============================================================================
--- branches/gcomprixogoo/src/babymatch-activity/shapegame.c (original)
+++ branches/gcomprixogoo/src/babymatch-activity/shapegame.c Thu Mar 6 23:03:12 2008
@@ -512,7 +512,7 @@
shape_root_item = goo_canvas_group_new (parent, NULL);
goo_canvas_item_translate(shape_root_item,
- gcomprisBoard->width/SHAPE_BOX_WIDTH_RATIO,
+ BOARDWIDTH/SHAPE_BOX_WIDTH_RATIO,
0);
shape_list_root_item = goo_canvas_group_new (parent, NULL);
@@ -520,7 +520,7 @@
/* Create the tooltip area */
tooltip_root_item = goo_canvas_group_new (goo_canvas_get_root_item(gcomprisBoard->canvas),
NULL);
- goo_canvas_item_translate(tooltip_root_item, 10, gcomprisBoard->height-70);
+ goo_canvas_item_translate(tooltip_root_item, 10, BOARDHEIGHT-70);
pixmap = gc_skin_pixmap_load("button_large.png");
@@ -987,7 +987,7 @@
goo_canvas_convert_from_item_space(goo_canvas_item_get_canvas(item),
item, &item_x, &item_y);
- found_shape = find_closest_shape(item_x - gcomprisBoard->width/SHAPE_BOX_WIDTH_RATIO,
+ found_shape = find_closest_shape(item_x - BOARDWIDTH/SHAPE_BOX_WIDTH_RATIO,
item_y, SQUARE_LIMIT_DISTANCE);
if(shadow_enable)
{
@@ -998,7 +998,7 @@
goo_canvas_item_get_bounds (shadow_item, &bounds);
gc_item_absolute_move(shadow_item,
found_shape->x - (bounds.x2 - bounds.x1) / 2
- + gcomprisBoard->width/SHAPE_BOX_WIDTH_RATIO,
+ + BOARDWIDTH/SHAPE_BOX_WIDTH_RATIO,
found_shape->y - (bounds.y2 - bounds.y1) / 2);
g_object_set (shadow_item, "visibility", GOO_CANVAS_ITEM_VISIBLE, NULL);
}
@@ -1023,7 +1023,7 @@
target_point_switch_on(NULL);
- found_shape = find_closest_shape(item_x - gcomprisBoard->width/SHAPE_BOX_WIDTH_RATIO,
+ found_shape = find_closest_shape(item_x - BOARDWIDTH/SHAPE_BOX_WIDTH_RATIO,
item_y,
SQUARE_LIMIT_DISTANCE);
@@ -1044,7 +1044,7 @@
gc_item_absolute_move(target_item,
found_shape->x - (bounds.x2 - bounds.x1) / 2
- + gcomprisBoard->width/SHAPE_BOX_WIDTH_RATIO,
+ + BOARDWIDTH/SHAPE_BOX_WIDTH_RATIO,
found_shape->y - (bounds.y2 - bounds.y1) / 2);
g_object_set (target_item, "visibility",
Modified: branches/gcomprixogoo/src/boards/py-gcompris-board.c
==============================================================================
--- branches/gcomprixogoo/src/boards/py-gcompris-board.c (original)
+++ branches/gcomprixogoo/src/boards/py-gcompris-board.c Thu Mar 6 23:03:12 2008
@@ -98,10 +98,6 @@
if(strcmp(name,"manual")==0) return Py_BuildValue("s", self->cdata->manual);
if(strcmp(name,"credit")==0) return Py_BuildValue("s", self->cdata->credit);
- /* Size of the window in which we have to run */
- if(strcmp(name,"width")==0) return Py_BuildValue("i", self->cdata->width);
- if(strcmp(name,"height")==0) return Py_BuildValue("i", self->cdata->height);
-
/* Dynamic board information (status) */
if(strcmp(name,"level")==0) return Py_BuildValue("i", self->cdata->level);
if(strcmp(name,"maxlevel")==0) return Py_BuildValue("i", self->cdata->maxlevel);
Modified: branches/gcomprixogoo/src/clickgame-activity/clickgame.c
==============================================================================
--- branches/gcomprixogoo/src/clickgame-activity/clickgame.c (original)
+++ branches/gcomprixogoo/src/clickgame-activity/clickgame.c Thu Mar 6 23:03:12 2008
@@ -364,8 +364,8 @@
gcomprisBoard->maxlevel=6;
gcomprisBoard->number_of_sublevel=10;
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL);
@@ -525,7 +525,7 @@
if(fishitem->speed>0)
{
- if(bounds.x1>gcomprisBoard->width)
+ if(bounds.x1>BOARDWIDTH)
fish_escape (fishitem);
}
else
@@ -696,7 +696,7 @@
if(fishitem->speed<0)
{
- x = (double) gcomprisBoard->width;
+ x = (double) BOARDWIDTH;
fishitem->speed=MIN(fishitem->speed, -1);
}
else
@@ -716,7 +716,7 @@
length = g_slist_length(ilist);
- y = (g_random_int()%(gcomprisBoard->height-
+ y = (g_random_int()%(BOARDHEIGHT-
(guint)(gdk_pixbuf_get_height(pixmap)*
imageZoom)));
Modified: branches/gcomprixogoo/src/clockgame-activity/clockgame.c
==============================================================================
--- branches/gcomprixogoo/src/clockgame-activity/clockgame.c (original)
+++ branches/gcomprixogoo/src/clockgame-activity/clockgame.c Thu Mar 6 23:03:12 2008
@@ -151,17 +151,17 @@
/* set initial values for this level adjusted to
fit the watch background */
- cx = gcomprisBoard->width/2;
- cy = gcomprisBoard->height*0.4 + 42;
- clock_size = gcomprisBoard->height*0.3;
+ cx = BOARDWIDTH/2;
+ cy = BOARDHEIGHT*0.4 + 42;
+ clock_size = BOARDHEIGHT*0.3;
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=6;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=3; /* Go to next level after this number of 'play' */
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL);
@@ -543,7 +543,7 @@
/* Create the text area for the time to find display */
goo_canvas_text_new (boardRootItem,
_("Set the watch to:"),
- (double) gcomprisBoard->width*0.17 + 1.0,
+ (double) BOARDWIDTH*0.17 + 1.0,
(double) cy + needle_size + needle_size / 3 - 30 + 1.0,
-1,
GTK_ANCHOR_CENTER,
@@ -553,7 +553,7 @@
goo_canvas_text_new (boardRootItem,
_("Set the watch to:"),
- (double) gcomprisBoard->width*0.17,
+ (double) BOARDWIDTH*0.17,
(double) cy + needle_size + needle_size / 3 - 30,
-1,
GTK_ANCHOR_CENTER,
@@ -564,7 +564,7 @@
time_to_find_item_s = \
goo_canvas_text_new (boardRootItem,
"",
- (double) gcomprisBoard->width*0.17 + 1.0,
+ (double) BOARDWIDTH*0.17 + 1.0,
(double) cy + needle_size + needle_size / 3 + 1.0,
-1,
GTK_ANCHOR_CENTER,
@@ -576,7 +576,7 @@
time_to_find_item = \
goo_canvas_text_new (boardRootItem,
"",
- (double) gcomprisBoard->width*0.17,
+ (double) BOARDWIDTH*0.17,
(double) cy + needle_size + needle_size / 3,
-1,
GTK_ANCHOR_CENTER,
Modified: branches/gcomprixogoo/src/gcompris/bonus.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/bonus.c (original)
+++ branches/gcomprixogoo/src/gcompris/bonus.c Thu Mar 6 23:03:12 2008
@@ -156,7 +156,7 @@
g_assert(gcomprisBoard != NULL);
- x = gcomprisBoard->width - OFFSET - gdk_pixbuf_get_width(pixmap_door1);
+ x = BOARDWIDTH - OFFSET - gdk_pixbuf_get_width(pixmap_door1);
y = OFFSET;
left_door_limit = x + gdk_pixbuf_get_width(pixmap_door1);
@@ -167,14 +167,14 @@
NULL);
x = OFFSET;
- y = (gcomprisBoard->height - gdk_pixbuf_get_height(pixmap_tuxplane)) /2;
+ y = (BOARDHEIGHT - gdk_pixbuf_get_height(pixmap_tuxplane)) /2;
tuxplane_item = goo_canvas_image_new (goo_canvas_get_root_item(GOO_CANVAS(gcomprisBoard->canvas)),
pixmap_tuxplane,
x,
y,
NULL);
- x = gcomprisBoard->width - OFFSET - gdk_pixbuf_get_width(pixmap_door2);
+ x = BOARDWIDTH - OFFSET - gdk_pixbuf_get_width(pixmap_door2);
y = OFFSET;
door2_item = goo_canvas_image_new (goo_canvas_get_root_item(GOO_CANVAS(gcomprisBoard->canvas)),
pixmap_door2,
@@ -321,8 +321,8 @@
bonus_group = goo_canvas_group_new (goo_canvas_get_root_item(GOO_CANVAS(gcomprisBoard->canvas)),
NULL);
- x = (gcomprisBoard->width - gdk_pixbuf_get_width(pixmap))/2;
- y = (gcomprisBoard->height - gdk_pixbuf_get_height(pixmap))/2;
+ x = (BOARDWIDTH - gdk_pixbuf_get_width(pixmap))/2;
+ y = (BOARDHEIGHT - gdk_pixbuf_get_height(pixmap))/2;
goo_canvas_image_new (bonus_group,
pixmap,
x,
Modified: branches/gcomprixogoo/src/gcompris/gcompris-board.h
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris-board.h (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris-board.h Thu Mar 6 23:03:12 2008
@@ -58,8 +58,6 @@
gchar *credit;
/* Size of the window in which we have to run */
- gint16 width;
- gint16 height;
GooCanvas *canvas;
/* Pointors to boards's own functions */
Modified: branches/gcomprixogoo/src/gcompris/gcompris_db.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris_db.c (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris_db.c Thu Mar 6 23:03:12 2008
@@ -685,11 +685,6 @@
/* From DB we have only package_data_dir. */
gcomprisBoard->board_dir = g_strdup(properties->package_data_dir);
- /* Fixed since I use the canvas own pixel_per_unit scheme */
- gcomprisBoard->width = BOARDWIDTH;
- gcomprisBoard->height = BOARDHEIGHT;
-
-
gcomprisBoard->board_id = atoi(result[i++]);
gcomprisBoard->name = g_strdup(result[i++]);
gcomprisBoard->section_id = atoi(result[i++]);
@@ -1727,11 +1722,6 @@
/* From DB we have only package_data_dir. */
gcomprisBoard->board_dir = g_strdup_printf(properties->package_data_dir);
- /* Fixed since I use the canvas own pixel_per_unit scheme */
- gcomprisBoard->width = BOARDWIDTH;
- gcomprisBoard->height = BOARDHEIGHT;
-
-
gcomprisBoard->board_id = board_id;
gcomprisBoard->name = g_strdup(result[i++]);
gcomprisBoard->section_id = atoi(result[i++]);
Modified: branches/gcomprixogoo/src/gcompris/menu.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/menu.c (original)
+++ branches/gcomprixogoo/src/gcompris/menu.c Thu Mar 6 23:03:12 2008
@@ -314,10 +314,6 @@
gcomprisBoard->gmodule = NULL;
gcomprisBoard->gmodule_file = NULL;
- /* Fixed since I use the canvas own pixel_per_unit scheme */
- gcomprisBoard->width = BOARDWIDTH;
- gcomprisBoard->height = BOARDHEIGHT;
-
return gcomprisBoard;
}
Modified: branches/gcomprixogoo/src/gletters-activity/gletters.c
==============================================================================
--- branches/gcomprixogoo/src/gletters-activity/gletters.c (original)
+++ branches/gcomprixogoo/src/gletters-activity/gletters.c Thu Mar 6 23:03:12 2008
@@ -171,8 +171,8 @@
gcomprisBoard->number_of_sublevel = (DEFAULT_SUBLEVEL>l?DEFAULT_SUBLEVEL:l);
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
}
@@ -501,7 +501,7 @@
goo_canvas_item_get_bounds (item,
&bounds);
- if(bounds.y1>gcomprisBoard->height) {
+ if(bounds.y1>BOARDHEIGHT) {
item2del_list = g_list_append (item2del_list, item);
player_loose();
}
@@ -643,7 +643,7 @@
NULL);
goo_canvas_item_translate(item, 0, -12);
- x = g_random_int_range( 80, gcomprisBoard->width-160);
+ x = g_random_int_range( 80, BOARDWIDTH-160);
goo_canvas_text_new (item,
letter,
x,
Modified: branches/gcomprixogoo/src/imageid-activity/imageid.c
==============================================================================
--- branches/gcomprixogoo/src/imageid-activity/imageid.c (original)
+++ branches/gcomprixogoo/src/imageid-activity/imageid.c Thu Mar 6 23:03:12 2008
@@ -246,7 +246,7 @@
gc_score_end();
gc_score_start(SCORESTYLE_NOTE,
50,
- gcomprisBoard->height - 50,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_score_set(gcomprisBoard->sublevel);
@@ -328,7 +328,7 @@
vertical_separation = 10 + 60 / i;
- yp = (gcomprisBoard->height -
+ yp = (BOARDHEIGHT -
i * gdk_pixbuf_get_height(button_pixmap)
- 2 * vertical_separation)/2 - 20;
Modified: branches/gcomprixogoo/src/missing_letter-activity/missingletter.c
==============================================================================
--- branches/gcomprixogoo/src/missing_letter-activity/missingletter.c (original)
+++ branches/gcomprixogoo/src/missing_letter-activity/missingletter.c Thu Mar 6 23:03:12 2008
@@ -243,7 +243,7 @@
gc_score_end();
gc_score_start(SCORESTYLE_NOTE,
50,
- gcomprisBoard->height - 45,
+ BOARDHEIGHT - 45,
gcomprisBoard->number_of_sublevel);
@@ -346,7 +346,7 @@
vertical_separation = 10 + 20 / i;
- yOffset = ( gcomprisBoard->height
+ yOffset = ( BOARDHEIGHT
- i * gdk_pixbuf_get_height(button_pixmap)
- 2 * vertical_separation) / 2 - 20;
xOffset = (img_area_x - gdk_pixbuf_get_width(button_pixmap))/2;
Modified: branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
==============================================================================
--- branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c (original)
+++ branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c Thu Mar 6 23:03:12 2008
@@ -355,7 +355,7 @@
svg_handle = gc_rsvg_load("paratrooper/fishingboat.svgz");
rsvg_handle_get_dimensions (svg_handle, &rsvg_dimension);
boat_x = (BOARDWIDTH - rsvg_dimension.width) / 2;
- boat_y = gcomprisBoard->height - 100;
+ boat_y = BOARDHEIGHT - 100;
boat_landarea_y = boat_y + 20;
item = \
goo_svg_item_new (boardRootItem,
@@ -408,7 +408,7 @@
paratrooperItem.instruct = \
goo_canvas_text_new (boardRootItem,
_("Control fall speed with up and down arrow keys."),
- (double) gcomprisBoard->width / 2.0,
+ (double) BOARDWIDTH / 2.0,
(double) 130,
-1,
GTK_ANCHOR_CENTER,
@@ -445,12 +445,12 @@
/* Manage the wrapping */
if(center < 0) {
goo_canvas_item_translate(paratrooperItem.rootitem,
- gcomprisBoard->width,
+ BOARDWIDTH,
0);
}
- if(center > gcomprisBoard->width) {
+ if(center > BOARDWIDTH) {
goo_canvas_item_translate(paratrooperItem.rootitem,
- -gcomprisBoard->width,
+ -BOARDWIDTH,
0);
}
@@ -479,7 +479,7 @@
}
else
{
- if(bounds.y2 < gcomprisBoard->height - 20)
+ if(bounds.y2 < BOARDHEIGHT - 20)
drop_tux_id = gtk_timeout_add (150,
(GtkFunction) paratrooper_move_tux,
NULL);
@@ -515,11 +515,11 @@
if(windspeed>0)
{
x = 0;
- x_end = gcomprisBoard->width;
+ x_end = BOARDWIDTH;
}
else
{
- x = gcomprisBoard->width - rsvg_dimension.width * imageZoom;
+ x = BOARDWIDTH - rsvg_dimension.width * imageZoom;
x_end = 0;
}
Modified: branches/gcomprixogoo/src/planegame-activity/planegame.c
==============================================================================
--- branches/gcomprixogoo/src/planegame-activity/planegame.c (original)
+++ branches/gcomprixogoo/src/planegame-activity/planegame.c Thu Mar 6 23:03:12 2008
@@ -307,8 +307,8 @@
else
{
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_score_set(gcomprisBoard->sublevel);
}
@@ -373,14 +373,14 @@
goo_canvas_item_get_bounds(item, &bounds);
- if(plane_x > gcomprisBoard->width - (bounds.x2 - bounds.x1)
+ if(plane_x > BOARDWIDTH - (bounds.x2 - bounds.x1)
&& planespeed_x > 0)
planespeed_x=0;
if(plane_x < 0 && planespeed_x < 0)
planespeed_x = 0;
- if(plane_y > gcomprisBoard->height - (bounds.y2 - bounds.y1)
+ if(plane_y > BOARDHEIGHT - (bounds.y2 - bounds.y1)
&& planespeed_y > 0)
planespeed_y = 0;
@@ -457,11 +457,11 @@
svg_handle = gc_rsvg_load("planegame/cloud.svgz");
rsvg_handle_get_dimensions(svg_handle, &dimension);
- y = (g_random_int()%(gcomprisBoard->height -
+ y = (g_random_int()%(BOARDHEIGHT -
(guint)(dimension.height * imageZoom)));
goo_canvas_item_translate(itemgroup,
- gcomprisBoard->width,
+ BOARDWIDTH,
y);
item = goo_svg_item_new (itemgroup,
Modified: branches/gcomprixogoo/src/railroad-activity/railroad.c
==============================================================================
--- branches/gcomprixogoo/src/railroad-activity/railroad.c (original)
+++ branches/gcomprixogoo/src/railroad-activity/railroad.c Thu Mar 6 23:03:12 2008
@@ -171,8 +171,8 @@
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=NUMBER_OF_SUBLEVELS; /* Go to next level after this number of 'play' */
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
@@ -315,7 +315,7 @@
else
pixmap = g_list_nth_data(listPixmapWagons, i-ENGINES);
- if ( (xOffset + gdk_pixbuf_get_width(pixmap)) >= gcomprisBoard->width) {
+ if ( (xOffset + gdk_pixbuf_get_width(pixmap)) >= BOARDWIDTH) {
xOffset = 0;
l++;
}
Modified: branches/gcomprixogoo/src/scalesboard-activity/scale.c
==============================================================================
--- branches/gcomprixogoo/src/scalesboard-activity/scale.c (original)
+++ branches/gcomprixogoo/src/scalesboard-activity/scale.c Thu Mar 6 23:03:12 2008
@@ -176,7 +176,7 @@
(GcDragFunc)scale_drag_event, drag_mode);
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
+ BOARDWIDTH - 220,
450 ,
gcomprisBoard->number_of_sublevel);
scale_next_level();
Modified: branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
==============================================================================
--- branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c (original)
+++ branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c Thu Mar 6 23:03:12 2008
@@ -163,8 +163,8 @@
gcomprisBoard->maxlevel = 9;
gcomprisBoard->number_of_sublevel=10;
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
@@ -333,7 +333,7 @@
GooCanvasBounds bounds;
goo_canvas_item_get_bounds (item, &bounds);
- if(bounds.y1>gcomprisBoard->height) {
+ if(bounds.y1>BOARDHEIGHT) {
player_loose();
goo_canvas_item_remove(item);
}
@@ -434,7 +434,7 @@
if(x==0.0)
{
- x = (double)(g_random_int()%(gcomprisBoard->width-
+ x = (double)(g_random_int()%(BOARDWIDTH-
(guint)(gdk_pixbuf_get_width(smallnumbers_pixmap)* imageZoom)*2));
}
else
Modified: branches/gcomprixogoo/src/submarine-activity/submarine.c
==============================================================================
--- branches/gcomprixogoo/src/submarine-activity/submarine.c (original)
+++ branches/gcomprixogoo/src/submarine-activity/submarine.c Thu Mar 6 23:03:12 2008
@@ -389,8 +389,8 @@
w = gdk_pixbuf_get_width(pixmap);
h = gdk_pixbuf_get_height(pixmap);
- schema_x = (gcomprisBoard->width - w)/2 ;
- schema_y = gcomprisBoard->height - h;
+ schema_x = (BOARDWIDTH - w)/2 ;
+ schema_y = BOARDHEIGHT - h;
sub_schema_image_item = goo_canvas_image_new (boardRootItem,
pixmap,
schema_x,
@@ -708,8 +708,8 @@
// whale item
pixmap = gc_pixmap_load("submarine/whale.png");
- whale_x = g_random_int_range((int)(gcomprisBoard->width/4),
- (int)(gcomprisBoard->width/2));
+ whale_x = g_random_int_range((int)(BOARDWIDTH/4),
+ (int)(BOARDWIDTH/2));
whale_y = g_random_int_range((int)(SURFACE_IN_BACKGROUND + gdk_pixbuf_get_height(pixmap)*2),
(int)MAX_DEPTH);
whale = goo_canvas_image_new (boardRootItem,
@@ -734,7 +734,7 @@
// treasure item
pixmap = gc_pixmap_load("submarine/crown.png");
- treasure_x = (gcomprisBoard->width*3)/4;
+ treasure_x = (BOARDWIDTH*3)/4;
treasure_y = MAX_DEPTH;
treasure = goo_canvas_image_new (boardRootItem,
pixmap,
@@ -1057,7 +1057,7 @@
}
/* wraps the destroyer if it reached the left side (and disappeared for a long time)*/
//if (bounds.x2 < -300.0)
- //gc_item_absolute_move( frigate_item, gcomprisBoard->width, bounds.y1 );
+ //gc_item_absolute_move( frigate_item, BOARDWIDTH, bounds.y1 );
}
/* whale detection */
Modified: branches/gcomprixogoo/src/traffic-activity/traffic.c
==============================================================================
--- branches/gcomprixogoo/src/traffic-activity/traffic.c (original)
+++ branches/gcomprixogoo/src/traffic-activity/traffic.c Thu Mar 6 23:03:12 2008
@@ -165,8 +165,8 @@
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=5; /* Go to next level after this number of 'play' */
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
str = gc_skin_image_get("button_reload.png");
Modified: branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c
==============================================================================
--- branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c (original)
+++ branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c Thu Mar 6 23:03:12 2008
@@ -426,8 +426,8 @@
gcomprisBoard->number_of_sublevel = 10 +
((gcomprisBoard->level-1) * 5);
gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ BOARDWIDTH - 220,
+ BOARDHEIGHT - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set_level(gcomprisBoard);
@@ -466,7 +466,7 @@
goo_canvas_item_get_bounds (item->rootitem,
&bounds);
- if(bounds.y1>gcomprisBoard->height) {
+ if(bounds.y1>BOARDHEIGHT) {
if (item == item_on_focus)
item_on_focus = NULL;
@@ -633,7 +633,7 @@
&bounds);
goo_canvas_item_translate (item->rootitem,
- (g_random_int()%(gcomprisBoard->width-(gint)(bounds.x2))),
+ (g_random_int()%(BOARDWIDTH-(gint)(bounds.x2))),
0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]