Commit f18d67ee authored by Bruno Coudoin's avatar Bruno Coudoin

created. Allow to transform the boards to static notation used in the

	* src/boards/boards2static.pl: created. Allow to transform the boards to static notation used in the
	windows version.
	* src/boards/clockgame.c: -A- added missing static => fails on windows
	* src/boards/draw.c: -A-
	* src/boards/python/anim.py: Fixed coord system by Yves Combe
	* src/boards/reversecount.c: -A-
	* src/boards/shapegame.c: -A-
	* THANKS: Updated. It was very needed.
parent 963df986
2004-06-15 Bruno coudoin <bruno.coudoin@free.fr>
* src/boards/boards2static.pl: created. Allow to transform the boards to static notation used in the
windows version.
* src/boards/clockgame.c: -A- added missing static => fails on windows
* src/boards/draw.c: -A-
* src/boards/python/anim.py: Fixed coord system by Yves Combe
* src/boards/reversecount.c: -A-
* src/boards/shapegame.c: -A-
* THANKS: Updated. It was very needed.
2004-06-14 Bruno coudoin <bruno.coudoin@free.fr>
* .cvsignore:
......
......@@ -14,9 +14,10 @@ Web Site:
Graphism:
- Fishes taken from the great xfishtank project.
- The ThumbUp icon taken from http://collegian.ksu.edu/issues/v105/fa/pix/logos/
- Backgrounds and Letters made with the Gimp by Bruno Coudoin.
- Backgrounds made with the OpenOffice.org and the Gimp by Bruno Coudoin.
- Shape game reuses great impressionism paintings authors names are displayed
when running the game.
- Many icons, images and the plane LOGO are by Renaud Blanchard
Sounds:
- Reusing standard gnome sounds (installed by Gnome)
......@@ -25,6 +26,20 @@ Test and Validation:
- Bruno Coudoin's family Clment, Clara and Zohra.
- Marec Dirson 3 years old.
Development:
(Each activity includes the name of the author. The name is displayed in the
activity description area.)
- Andre Connes (andre.connes@toulouse.iufm.fr)
- Bastiaan Verhoef (b.f.verhoef@student.utwente.nl)
- Bruno Coudoin (bruno.coudoin@free.fr)>
- Christof Petig (christof@petig-baender.de)
- Christof Petig and Ingo Konrad
- Jean-Philippe Ayanides (jp.ayanides@free.fr)
- Jos Jorge (jjorge@free.fr)
- Olivier Samyn (osamyn@ulb.ac.be)
- Pascal Georges (pascal.georges1@free.fr)
- Yves Combe <yves@ycombe.net>
Translation:
- de Gerhard Dieringer <GDieringer@compuserve.com>
- es Zohra Coudoin <zohra.coudion@free.fr>
......@@ -33,3 +48,5 @@ Translation:
- nl Dirk Schouten <schoutdi@knoware.nl>
- pt_BR Isaas V. Prestes <isix@uol.com.br>
- fi Jyrki Kuoppala <jkp@kaapeli.fi>
Run ./list_translators.sh to get the full list
#!/usr/bin/perl
# Convert all the .c files in this directory from boards dynamic naming (Default CVS, Linux)
# To static naming (For windows)
my $outputdir = "static";
opendir BOARDS, ".";
foreach my $file (readdir BOARDS) {
if (($file =~ /\.c$/) && ($file !~ /^\./)) {
# if ($file =~ /^clickgame.c$/) {
print "\nProcessing $file\n";
open BOARD, $file;
my @tmp = split('\.', $file);
my $basefile = $tmp[0];
print "basefile=$basefile\n";
open (OUTPUT, ">$outputdir/$file")
or die "Can't open $outputdir/$file for update: $!";
foreach $line (readline BOARD) {
if ($line =~ "^static BoardPlugin ") {
print OUTPUT "BoardPlugin ${basefile}_menu_bp =\n";
} elsif ($line =~ "get_bplugin_info") {
$line =~ s/get_bplugin_info/${basefile}_get_bplugin_info/;
print OUTPUT $line;
} elsif ($line =~ "return \&menu_bp") {
print OUTPUT " return \&${basefile}_menu_bp;\n";
} elsif ($line =~ "gcomprisBoard->plugin=&menu_bp;") {
print OUTPUT " gcomprisBoard->plugin=&${basefile}_menu_bp;\n";
} else {
print OUTPUT $line;
}
}
close OUTPUT;
close BOARD;
}
close BOARDS;
}
/* gcompris - clockgame.c
*
* Time-stamp: <2004/06/13 00:03:16 bcoudoin>
* Time-stamp: <2004/06/15 01:35:31 bcoudoin>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -29,7 +29,7 @@
static GList *item_list = NULL;
static GcomprisBoard *gcomprisBoard = NULL;
gboolean board_paused = TRUE;
static gboolean board_paused = TRUE;
static GnomeCanvasItem *second_item;
static GnomeCanvasItem *hour_item;
......
......@@ -50,7 +50,7 @@ static GnomeCanvasItem *shape_root_item = NULL;
static GnomeCanvasItem *draw_root_item = NULL;
static GnomeCanvasItem *current_color_item = NULL;
static guint currentColor = 0;
gboolean board_paused = TRUE;
static gboolean board_paused = TRUE;
typedef enum
{
......
......@@ -511,7 +511,7 @@ class Gcompris_anim:
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
# activate the anchors
# deactivate the anchors
if self.selected != None:
self.selected.item_list[1].hide()
self.selected=None
......@@ -536,7 +536,8 @@ class Gcompris_anim:
x=event.x
y=event.y
bounds = item.get_bounds()
#bounds = item.get_bounds()
bounds = self.get_bounds(item)
# Save the ofset between the mouse pointer and the upper left corner of the object
if(self.in_select_ofx == -1):
......@@ -562,9 +563,15 @@ class Gcompris_anim:
# We need to realign y cause the bounds values are not precise enough
n,y = self.snap_to_grid(x,y)
print "delta bounded" , x, y
# Now perform the object move
gcompris.utils.item_absolute_move(item.get_property("parent"), x, y)
#gcompris.utils.item_absolute_move(item.get_property("parent"), x, y)
self.object_move(
item.get_property("parent"),
x-bounds[0],
y-bounds[1]
)
return gtk.TRUE
......@@ -977,7 +984,7 @@ class Gcompris_anim:
def snapshot_event(self, item, event):
if event.type == gtk.gdk.BUTTON_PRESS:
self.flash.show()
gobject.timeout_add(40, self.run_flash)
gobject.timeout_add(100, self.run_flash)
self.AnimShot(self.root_drawingitem)
def run_flash(self):
......@@ -1026,6 +1033,17 @@ class Gcompris_anim:
)
run.connect("event", self.playing_event)
def object_move(self,object,dx,dy):
if gobject.type_name(object.item_list[0])=="GnomeCanvasLine":
(x1,y1,x2,y2)=object.item_list[0].get_property('points')
else:
x1=object.item_list[0].get_property("x1")
y1=object.item_list[0].get_property("y1")
x2=object.item_list[0].get_property("x2")
y2=object.item_list[0].get_property("y2")
self.object_set_size_and_pos(object, x1+dx, y1+dy, x2+dx, y2+dy)
def object_set_size_and_pos(self, object, x1, y1, x2, y2):
if gobject.type_name(object.item_list[0])=="GnomeCanvasLine":
object.item_list[0].set(
......@@ -1179,6 +1197,14 @@ class Gcompris_anim:
)
def get_bounds(self, item):
if gobject.type_name(item)=="GnomeCanvasLine":
(x1,y1,x2,y2)=item.get_property("points")
else:
x1=item.get_property("x1")
y1=item.get_property("y1")
x2=item.get_property("x2")
y2=item.get_property("y2")
return (min(x1,x2),min(y1,y2),max(x1,x2),max(y1,y2))
......@@ -25,8 +25,8 @@
#define SOUNDLISTFILE PACKAGE
GcomprisBoard *gcomprisBoard = NULL;
gboolean board_paused = TRUE;
static GcomprisBoard *gcomprisBoard = NULL;
static gboolean board_paused = TRUE;
static gint animate_id = 0;
static int leavenow;
......
/* gcompris - shapegame.c
*
* Time-stamp: <2004/03/13 00:10:08 bcoudoin>
* Time-stamp: <2004/06/15 01:33:41 bcoudoin>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -44,7 +44,7 @@ static gint addedname; /* Defined the rules to apply to determine if the
*/
static GcomprisBoard *gcomprisBoard = NULL;
gboolean board_paused = TRUE;
static gboolean board_paused = TRUE;
typedef enum
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment