Commit 76363ada authored by Bruno Coudoin's avatar Bruno Coudoin

Joe Neeman implemented the animation API (C and python)

	Added a test case for that in watercycle.
        added a Garden chronos level by Frank
        Fixed switz to Switzeraland.
parent f04801cb
2005-03-22 Bruno coudoin <bruno.coudoin@free.fr>
Joe Neeman implemented the animation API (C and python)
Added a test case for that in watercycle.
Added a Garden chronos level by Frank
* boards/chronos/Makefile.am: added a Garden chronos level by Frank
* boards/chronos/images/garden1.png:
* boards/chronos/images/garden2.png:
* boards/chronos/images/garden3.png:
* boards/chronos/images/garden4.png:
* boards/clockgame/clockgame-bg.jpg: rework by bruno to look like babytoy theme
* boards/draw/tool-camera.png: fixed by Frank
* boards/draw/tool-camera_on.png: -
* boards/geography/board2_0.xml.in: Fixed switz to Switzeraland.
* boards/geography/board2_1.xml.in: Added capital letters in front of each contry
* boards/geography/board3_0.xml.in: -
* boards/geography/board3_1.xml.in: -
* boards/skins/default/file_selector_bg.png: fixed by Frank
* boards/watercycle/tuxboat.gif: animation testcase by Joe
* boards/watercycle/tuxboat.txt: -
* configure.in: fixes by Joe for gentoo
* po/POTFILES.in: added garden
* src/boards/Makefile.am:
* src/boards/advanced_colors.c: (init_xml): compile warning fix
* src/boards/animtest.c: (get_bplugin_info), (start_board),
(end_board), (is_our_board):
* src/boards/clockgame.c: (clockgame_create_item):
* src/boards/py-mod-anim.c: (Animation_init), (Animation_free),
(py_gcompris_activate_animation_m),
(py_gcompris_deactivate_animation),
(py_gcompris_activate_animation),
(python_gcompris_anim_module_init):
* src/boards/py-mod-anim.h:
* src/boards/py-mod-gcompris.c: (python_gcompris_module_init):
* src/boards/python.c: (pythonboard_init):
* src/boards/python/gcompris/Makefile.am:
* src/boards/python/gcompris/anim/Makefile.am:
* src/boards/python/gcompris/anim/__init__.py:
* src/boards/python/watercycle.py:
* src/boards/read_colors.c: (init_xml): compile warning fix
* src/gcompris/Makefile.am:
* src/gcompris/anim.c: (gcompris_load_animation),
(gcompris_load_animation_asset), (gcompris_activate_animation),
(gcompris_deactivate_animation), (gcompris_free_animation),
(anim_tick), (anim_item_cmpr), (anim_anim_cmpr):
* src/gcompris/anim.h:
* src/gcompris/gcompris.h:
2005-03-19 Bruno coudoin <bruno.coudoin@free.fr>
Rework of many graphism by Frank
......
......@@ -4,6 +4,7 @@ xmldir = $(pkgdatadir)/@PACKAGE_DATA_DIR@/chronos
xml_in_files = \
board1_0.xml.in \
board1_1.xml.in \
board1_2.xml.in \
board2_0.xml.in \
board3_0.xml.in \
board3_1.xml.in \
......
boards/clockgame/clockgame-bg.jpg

29.4 KB | W: | H:

boards/clockgame/clockgame-bg.jpg

34.7 KB | W: | H:

boards/clockgame/clockgame-bg.jpg
boards/clockgame/clockgame-bg.jpg
boards/clockgame/clockgame-bg.jpg
boards/clockgame/clockgame-bg.jpg
  • 2-up
  • Swipe
  • Onion skin
boards/draw/tool-camera.png

3.07 KB | W: | H:

boards/draw/tool-camera.png

2.88 KB | W: | H:

boards/draw/tool-camera.png
boards/draw/tool-camera.png
boards/draw/tool-camera.png
boards/draw/tool-camera.png
  • 2-up
  • Swipe
  • Onion skin
boards/draw/tool-camera_on.png

3.02 KB | W: | H:

boards/draw/tool-camera_on.png

2.85 KB | W: | H:

boards/draw/tool-camera_on.png
boards/draw/tool-camera_on.png
boards/draw/tool-camera_on.png
boards/draw/tool-camera_on.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,37 +5,37 @@
<_name>North America</_name>
</Title>
<Shape name="A" pixmapfile="geography/northamerica/bahamas.png" x="399" y="443" zoomx="1" zoomy="1" position="0" sound="geography/bahamas">
<_tooltip>bahamas</_tooltip>
<_tooltip>Bahamas</_tooltip>
</Shape>
<Shape name="B" pixmapfile="geography/northamerica/canada.png" x="349" y="182" zoomx="1" zoomy="1" position="0" sound="geography/canada">
<_tooltip>canada</_tooltip>
<_tooltip>Canada</_tooltip>
</Shape>
<Shape name="C" pixmapfile="geography/northamerica/cuba.png" x="595" y="400" zoomx="1" zoomy="1" position="0" sound="geography/cuba">
<_tooltip>cuba</_tooltip>
<_tooltip>Cuba</_tooltip>
</Shape>
<Shape name="D" pixmapfile="geography/northamerica/dominican_republic.png" x="700" y="429" zoomx="1" zoomy="1" position="0" sound="geography/dominican_republic">
<_tooltip>dominican republic</_tooltip>
<_tooltip>Dominican republic</_tooltip>
</Shape>
<Shape name="E" pixmapfile="geography/northamerica/greenland.png" x="442" y="79" zoomx="1" zoomy="1" position="0" sound="geography/greenland">
<_tooltip>greenland</_tooltip>
<_tooltip>Greenland</_tooltip>
</Shape>
<Shape name="F" pixmapfile="geography/northamerica/haiti.png" x="663" y="429" zoomx="1" zoomy="1" position="0" sound="geography/haiti">
<_tooltip>haiti</_tooltip>
<_tooltip>Haiti</_tooltip>
</Shape>
<Shape name="G" pixmapfile="geography/northamerica/iceland.png" x="528" y="48" zoomx="1" zoomy="1" position="0" sound="geography/iceland">
<_tooltip>iceland</_tooltip>
<_tooltip>Iceland</_tooltip>
</Shape>
<Shape name="H" pixmapfile="geography/northamerica/jamaica.png" x="620" y="438" zoomx="1" zoomy="1" position="0" sound="geography/jamaica">
<_tooltip>jamaica</_tooltip>
<_tooltip>Jamaica</_tooltip>
</Shape>
<Shape name="I" pixmapfile="geography/northamerica/mexico.png" x="255" y="434" zoomx="1" zoomy="1" position="0" sound="geography/mexico">
<_tooltip>mexico</_tooltip>
<_tooltip>Mexico</_tooltip>
</Shape>
<Shape name="J" pixmapfile="geography/northamerica/usa.png" x="323" y="366" zoomx="1" zoomy="1" position="0" sound="geography/usa">
<_tooltip>united state</_tooltip>
<_tooltip>United state</_tooltip>
</Shape>
<Shape name="K" pixmapfile="geography/northamerica/alaska.png" x="156" y="92" zoomx="1" zoomy="1" position="0" sound="geography/alaska">
<_tooltip>alaska</_tooltip>
<_tooltip>Alaska</_tooltip>
</Shape>
<Shape name="1" pixmapfile="geography/northamerica/north_america.png" type="SHAPE_BACKGROUND" x="425" y="260" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
......
......@@ -4,46 +4,46 @@
<_name>South America</_name>
</Title>
<Shape name="A" pixmapfile="geography/southamerica/argentina.png" x="410" y="380" zoomx="1" zoomy="1" position="0" sound="geography/argentina">
<_tooltip>argentina</_tooltip>
<_tooltip>Argentina</_tooltip>
</Shape>
<Shape name="B" pixmapfile="geography/southamerica/bolivia.png" x="390" y="224" zoomx="1" zoomy="1" position="0" sound="geography/bolivia">
<_tooltip>bolivia</_tooltip>
<_tooltip>Bolivia</_tooltip>
</Shape>
<Shape name="C" pixmapfile="geography/southamerica/brazil.png" x="453" y="203" zoomx="1" zoomy="1" position="0" sound="geography/brazil">
<_tooltip>brazil</_tooltip>
<_tooltip>Brazil</_tooltip>
</Shape>
<Shape name="D" pixmapfile="geography/southamerica/chile.png" x="375" y="369" zoomx="1" zoomy="1" position="0" sound="geography/chile">
<_tooltip>chile</_tooltip>
<_tooltip>Chile</_tooltip>
</Shape>
<Shape name="E" pixmapfile="geography/southamerica/colombia.png" x="314" y="81" zoomx="1" zoomy="1" position="0" sound="geography/colombia">
<_tooltip>colombia</_tooltip>
<_tooltip>Colombia</_tooltip>
</Shape>
<Shape name="F" pixmapfile="geography/southamerica/ecuador.png" x="279" y="128" zoomx="1" zoomy="1" position="0" sound="geography/ecuador">
<_tooltip>ecuador</_tooltip>
<_tooltip>Ecuador</_tooltip>
</Shape>
<Shape name="G" pixmapfile="geography/southamerica/french_guiana.png" x="454" y="77" zoomx="1" zoomy="1" position="0" sound="geography/french_guiana">
<_tooltip>french guiana</_tooltip>
<_tooltip>French guiana</_tooltip>
</Shape>
<Shape name="H" pixmapfile="geography/southamerica/guyana.png" x="413" y="72" zoomx="1" zoomy="1" position="0" sound="geography/guyana">
<_tooltip>guyana</_tooltip>
<_tooltip>Guyana</_tooltip>
</Shape>
<Shape name="I" pixmapfile="geography/southamerica/panama.png" x="263" y="54" zoomx="1" zoomy="1" position="0" sound="geography/panama">
<_tooltip>panama</_tooltip>
<_tooltip>Panama</_tooltip>
</Shape>
<Shape name="J" pixmapfile="geography/southamerica/paraguay.png" x="428" y="270" zoomx="1" zoomy="1" position="0" sound="geography/paraguay">
<_tooltip>paraguay</_tooltip>
<_tooltip>Paraguay</_tooltip>
</Shape>
<Shape name="K" pixmapfile="geography/southamerica/peru.png" x="305" y="178" zoomx="1" zoomy="1" position="0" sound="geography/peru">
<_tooltip>peru</_tooltip>
<_tooltip>Peru</_tooltip>
</Shape>
<Shape name="L" pixmapfile="geography/southamerica/suriname.png" x="434" y="77" zoomx="1" zoomy="1" position="0" sound="geography/suriname">
<_tooltip>suriname</_tooltip>
<_tooltip>Suriname</_tooltip>
</Shape>
<Shape name="M" pixmapfile="geography/southamerica/uruguay.png" x="452" y="333" zoomx="1" zoomy="1" position="0" sound="geography/uruguay">
<_tooltip>uruguay</_tooltip>
<_tooltip>Uruguay</_tooltip>
</Shape>
<Shape name="N" pixmapfile="geography/southamerica/venezuela.png" x="357" y="66" zoomx="1" zoomy="1" position="0" sound="geography/venezuela">
<_tooltip>venezuela</_tooltip>
<_tooltip>Venezuela</_tooltip>
</Shape>
<Shape name="1" pixmapfile="geography/southamerica/south_america.png" type="SHAPE_BACKGROUND" x="420" y="260" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
......
......@@ -4,55 +4,55 @@
<_name>West Europe</_name>
</Title>
<Shape name="E" pixmapfile="geography/europe/austria.png" x="443" y="328" zoomx="1" zoomy="1" position="0" sound="geography/austria">
<_tooltip>austria</_tooltip>
<_tooltip>Austria</_tooltip>
</Shape>
<Shape name="O" pixmapfile="geography/europe/belgium.png" x="335" y="286" zoomx="1" zoomy="1" position="0" sound="geography/belgium">
<_tooltip>belgium</_tooltip>
<_tooltip>Belgium</_tooltip>
</Shape>
<Shape name="B" pixmapfile="geography/europe/denmark.png" x="399" y="203" zoomx="1" zoomy="1" position="0" sound="geography/denmark">
<_tooltip>denmark</_tooltip>
<_tooltip>Denmark</_tooltip>
</Shape>
<Shape name="A" pixmapfile="geography/europe/finland.png" x="554" y="75" zoomx="1" zoomy="1" position="0" sound="geography/finland">
<_tooltip>finland</_tooltip>
<_tooltip>Finland</_tooltip>
</Shape>
<Shape name="D" pixmapfile="geography/europe/france.png" x="312" y="351" zoomx="1" zoomy="1" position="0" sound="geography/france">
<_tooltip>france</_tooltip>
<_tooltip>France</_tooltip>
</Shape>
<Shape name="H" pixmapfile="geography/europe/germany.png" x="405" y="277" zoomx="1" zoomy="1" position="0" sound="geography/germany">
<_tooltip>germany</_tooltip>
<_tooltip>Germany</_tooltip>
</Shape>
<Shape name="F" pixmapfile="geography/europe/iceland.png" x="141" y="54" zoomx="1" zoomy="1" position="0" sound="geography/iceland">
<_tooltip>iceland</_tooltip>
<_tooltip>Iceland</_tooltip>
</Shape>
<Shape name="R" pixmapfile="geography/europe/ireland.png" x="186" y="249" zoomx="1" zoomy="1" position="0" sound="geography/ireland">
<_tooltip>ireland</_tooltip>
<_tooltip>Ireland</_tooltip>
</Shape>
<Shape name="I" pixmapfile="geography/europe/italy.png" x="439" y="417" zoomx="1" zoomy="1" position="0" sound="geography/italy">
<_tooltip>italy</_tooltip>
<_tooltip>Italy</_tooltip>
</Shape>
<Shape name="L" pixmapfile="geography/europe/luxembourg.png" type="SHAPE_BACKGROUND" x="354" y="298" zoomx="1" zoomy="1" position="0" sound="geography/luxembourg">
<_tooltip>luxembourg</_tooltip>
<_tooltip>Luxembourg</_tooltip>
</Shape>
<Shape name="N" pixmapfile="geography/europe/netherland.png" x="342" y="261" zoomx="1" zoomy="1" position="0" sound="geography/netherland">
<_tooltip>netherland</_tooltip>
<_tooltip>Netherland</_tooltip>
</Shape>
<Shape name="M" pixmapfile="geography/europe/norway.png" x="462" y="85" zoomx="1" zoomy="1" position="0" sound="geography/norway">
<_tooltip>norway</_tooltip>
<_tooltip>Norway</_tooltip>
</Shape>
<Shape name="C" pixmapfile="geography/europe/portugal.png" x="182" y="453" zoomx="1" zoomy="1" position="0" sound="geography/portugal">
<_tooltip>portugal</_tooltip>
<_tooltip>Portugal</_tooltip>
</Shape>
<Shape name="P" pixmapfile="geography/europe/spain.png" x="252" y="448" zoomx="1" zoomy="1" position="0" sound="geography/spain">
<_tooltip>spain</_tooltip>
<_tooltip>Spain</_tooltip>
</Shape>
<Shape name="Q" pixmapfile="geography/europe/sweden.png" x="467" y="118" zoomx="1" zoomy="1" position="0" sound="geography/sweden">
<_tooltip>sweden</_tooltip>
<_tooltip>Sweden</_tooltip>
</Shape>
<Shape name="J" pixmapfile="geography/europe/switz.png" x="383" y="341" zoomx="1" zoomy="1" position="0" sound="geography/switz">
<_tooltip>switz</_tooltip>
<_tooltip>Switzerland</_tooltip>
</Shape>
<Shape name="G" pixmapfile="geography/europe/united_kingdom.png" x="241" y="226" zoomx="1" zoomy="1" position="0" sound="geography/united_kingdom">
<_tooltip>united kingdom</_tooltip>
<_tooltip>United kingdom</_tooltip>
</Shape>
<Shape name="Z" pixmapfile="geography/europe/europe.png" type="SHAPE_BACKGROUND" x="450" y="260" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
......
......@@ -4,70 +4,70 @@
<_name>East Europe</_name>
</Title>
<Shape name="A" pixmapfile="geography/europe/albania.png" x="505" y="431" zoomx="1" zoomy="1" position="0" sound="geography/albania">
<_tooltip>albania</_tooltip>
<_tooltip>Albania</_tooltip>
</Shape>
<Shape name="B" pixmapfile="geography/europe/belarus.png" x="577" y="239" zoomx="1" zoomy="1" position="0" sound="geography/belarus">
<_tooltip>belarus</_tooltip>
<_tooltip>Belarus</_tooltip>
</Shape>
<Shape name="C" pixmapfile="geography/europe/bosnia_herzegovina.png" x="470" y="388" zoomx="1" zoomy="1" position="0" sound="geography/bosnia_herzegovina">
<_tooltip>bosnia herzegovina</_tooltip>
<_tooltip>Bosnia herzegovina</_tooltip>
</Shape>
<Shape name="D" pixmapfile="geography/europe/bulgaria.png" x="567" y="404" zoomx="1" zoomy="1" position="0" sound="geography/bulgaria">
<_tooltip>bulgaria</_tooltip>
<_tooltip>Bulgaria</_tooltip>
</Shape>
<Shape name="E" pixmapfile="geography/europe/croatia.png" x="454" y="375" zoomx="1" zoomy="1" position="0" sound="geography/croatia">
<_tooltip>croatia</_tooltip>
<_tooltip>Croatia</_tooltip>
</Shape>
<Shape name="G" pixmapfile="geography/europe/czech.png" x="438" y="294" zoomx="1" zoomy="1" position="0" sound="geography/czech">
<_tooltip>czech</_tooltip>
<_tooltip>Czech</_tooltip>
</Shape>
<Shape name="H" pixmapfile="geography/europe/estonia.png" x="528" y="167" zoomx="1" zoomy="1" position="0" sound="geography/estonia">
<_tooltip>estonia</_tooltip>
<_tooltip>Estonia</_tooltip>
</Shape>
<Shape name="I" pixmapfile="geography/europe/hungary.png" x="487" y="336" zoomx="1" zoomy="1" position="0" sound="geography/hungary">
<_tooltip>hungary</_tooltip>
<_tooltip>Hungary</_tooltip>
</Shape>
<Shape name="J" pixmapfile="geography/europe/latvia.png" x="531" y="193" zoomx="1" zoomy="1" position="0" sound="geography/latvia">
<_tooltip>latvia</_tooltip>
<_tooltip>Latvia</_tooltip>
</Shape>
<Shape name="K" pixmapfile="geography/europe/lithuania.png" x="524" y="218" zoomx="1" zoomy="1" position="0" sound="geography/lithuania">
<_tooltip>lithuania</_tooltip>
<_tooltip>Lithuania</_tooltip>
</Shape>
<Shape name="L" pixmapfile="geography/europe/macedonia.png" x="524" y="421" zoomx="1" zoomy="1" position="0" sound="geography/macedonia">
<_tooltip>macedonia</_tooltip>
<_tooltip>Macedonia</_tooltip>
</Shape>
<Shape name="M" pixmapfile="geography/europe/moldova.png" x="596" y="339" zoomx="1" zoomy="1" position="0" sound="geography/moldova">
<_tooltip>moldova</_tooltip>
<_tooltip>Moldova</_tooltip>
</Shape>
<Shape name="N" pixmapfile="geography/europe/poland.png" x="474" y="264" zoomx="1" zoomy="1" position="0" sound="geography/poland">
<_tooltip>poland</_tooltip>
<_tooltip>Poland</_tooltip>
</Shape>
<Shape name="O" pixmapfile="geography/europe/romania.png" x="558" y="355" zoomx="1" zoomy="1" position="0" sound="geography/romania">
<_tooltip>romania</_tooltip>
<_tooltip>Romania</_tooltip>
</Shape>
<Shape name="P" pixmapfile="geography/europe/russia.png" x="631" y="189" zoomx="1" zoomy="1" position="0" sound="geography/russia">
<_tooltip>russia</_tooltip>
<_tooltip>Russia</_tooltip>
</Shape>
<Shape name="Q" pixmapfile="geography/europe/serbia_montenegro.png" x="510" y="385" zoomx="1" zoomy="1" position="0" sound="geography/serbia_montenegro">
<_tooltip>serbia montenegro</_tooltip>
<_tooltip>Serbia montenegro</_tooltip>
</Shape>
<Shape name="R" pixmapfile="geography/europe/slovakia.png" x="488" y="314" zoomx="1" zoomy="1" position="0" sound="geography/slovakia">
<_tooltip>slovakia</_tooltip>
<_tooltip>Slovakia</_tooltip>
</Shape>
<Shape name="S" pixmapfile="geography/europe/slovenia.png" x="432" y="351" zoomx="1" zoomy="1" position="0" sound="geography/slovenia">
<_tooltip>slovenia</_tooltip>
<_tooltip>Slovenia</_tooltip>
</Shape>
<Shape name="T" pixmapfile="geography/europe/turkey.png" x="677" y="466" zoomx="1" zoomy="1" position="0" sound="geography/turkey">
<_tooltip>turkey</_tooltip>
<_tooltip>Turkey</_tooltip>
</Shape>
<Shape name="U" pixmapfile="geography/europe/ukraine.png" x="626" y="318" zoomx="1" zoomy="1" position="0" sound="geography/ukraine">
<_tooltip>ukraine</_tooltip>
<_tooltip>Ukraine</_tooltip>
</Shape>
<Shape name="V" pixmapfile="geography/europe/greece.png" x="550" y="472" zoomx="1" zoomy="1" position="0" sound="geography/greece">
<_tooltip>greece</_tooltip>
<_tooltip>Greece</_tooltip>
</Shape>
<Shape name="F" pixmapfile="geography/europe/cyprus.png" type="SHAPE_BACKGROUND" x="683" y="521" zoomx="1" zoomy="1" position="0" sound="geography/cyprus">
<_tooltip>cyprus</_tooltip>
<_tooltip>Cyprus</_tooltip>
</Shape>
<Shape name="Z" pixmapfile="geography/europe/europe.png" type="SHAPE_BACKGROUND"
x="420" y="260" zoomx="1" zoomy="1" position="0"/>
......
watercycle/tuxboat.gif
......@@ -5,6 +5,7 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gcompris, 6.5.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
CFLAGS=
# Making releases:
# LIBGCOMPRIS_MICRO_VERSION += 1;
......@@ -141,7 +142,7 @@ AC_ARG_ENABLE(debug,
USE_DEBUG="$enableval", USE_DEBUG="no")
if test "x$USE_DEBUG" == "xyes" ; then
AC_DEFINE_UNQUOTED(DEBUG, 1, "Enable debug messages.")
CFLAGS="$CFLAGS -Wall -Werror"]
CFLAGS="$CFLAGS -Wall -g"
fi
dnl WIN32 Specifics
......@@ -236,7 +237,7 @@ AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${myprefix}/${DATADIRNAME}/pixmaps", [Gnome i
dnl Test for gnuchess
AC_PATH_PROG(GNUCHESS, gnuchess,no,[/usr/bin:/usr/games:/usr/local/bin])
AC_PATH_PROG(GNUCHESS, gnuchess,no,[/usr/bin:/usr/games:/usr/local/bin:$PATH])
if test x$GNUCHESS = xno; then
AC_MSG_ERROR(Couldn't find gnuchess, please install the gnuchess package version 5 or above)
......@@ -463,6 +464,7 @@ AC_SUBST(VERSION_VOICES_MISC_RU)
VERSION_FLAGS=1.8
AC_SUBST(VERSION_FLAGS)
AC_SUBST(CFLAGS)
dnl Autoconf output
AC_OUTPUT([ gcompris.spec
......@@ -474,6 +476,7 @@ src/gcompris/libgcompris-1.0-uninstalled.pc
src/boards/Makefile
src/boards/python/Makefile
src/boards/python/gcompris/Makefile
src/boards/python/gcompris/anim/Makefile
src/boards/python/gcompris/bonus/Makefile
src/boards/python/gcompris/score/Makefile
src/boards/python/gcompris/skin/Makefile
......
......@@ -46,6 +46,7 @@ boards/chess_partyend.xml.in
boards/chronos.xml.in
boards/chronos/board1_0.xml.in
boards/chronos/board1_1.xml.in
boards/chronos/board1_2.xml.in
boards/chronos/board2_0.xml.in
boards/chronos/board3_0.xml.in
boards/chronos/board3_1.xml.in
......
......@@ -69,7 +69,6 @@ libalgebra_la_LDFLAGS = -module -avoid-version
libalgebra_la_LIBADD = $(top_builddir)/src/gcompris/libgcompris-1.la
libalgebra_la_SOURCES = algebra.c
libclockgame_la_LDFLAGS = -module -avoid-version
libclockgame_la_LIBADD = $(top_builddir)/src/gcompris/libgcompris-1.la
libclockgame_la_SOURCES = clockgame.c
......@@ -226,7 +225,8 @@ libpython_la_SOURCES = python.c \
py-mod-score.c py-mod-score.h \
py-mod-timer.c py-mod-timer.h \
py-mod-sound.c py-mod-sound.h \
py-mod-skin.c py-mod-skin.h
py-mod-skin.c py-mod-skin.h \
py-mod-anim.c py-mod-anim.h
EXTRA_DIST = README boards2static.pl
......
......@@ -452,15 +452,7 @@ static void init_xml()
assert(g_file_test(filename, G_FILE_TEST_EXISTS));
assert(read_xml_file(filename)== TRUE);
g_free(filename);
#ifdef DEBUG
dump_xml();
#endif
}
/* ====== for DEBUG ======== */
#ifdef DEBUG
static void dump_xml() {
}
#endif
/* ==================================== */
static void add_xml_data(xmlDocPtr doc, xmlNodePtr xmlnode, GNode * child)
......
/* gcompris - animtest.c
*
* Copyright (C) 2005 Joe Neeman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "gcompris/gcompris.h"
#define CENTER_LEFT_X 185
#define CENTER_LEFT_Y 430
static GcomprisBoard *board;
static gboolean paused = TRUE;
static void start_board(GcomprisBoard*);
static void end_board();
static gboolean is_our_board(GcomprisBoard*);
/*=============================================*/
static GcomprisAnimation *animation;
static GnomeCanvasItem *anim_item;
static BoardPlugin menu_bp =
{
NULL,
NULL,
"Blah",
"Blah",
"Me",
NULL,
NULL,
NULL,
NULL,
start_board,
NULL,
end_board,
is_our_board,
NULL,
NULL,
NULL,
NULL
};
BoardPlugin *get_bplugin_info()
{
return &menu_bp;
}
static void start_board(GcomprisBoard *b)
{
if(b != NULL)
{
board = b;
gcompris_set_background(gnome_canvas_root(board->canvas), "leftright/leftright-bg.jpg");
board->level = 1;
board->maxlevel=1;
board->sublevel=1;
board->number_of_sublevel=1;
gcompris_score_start(SCORESTYLE_NOTE, 10, 50, board->number_of_sublevel);
gcompris_bar_set(GCOMPRIS_BAR_LEVEL);
gcompris_bar_set_level(board);
gcompris_score_set(board->sublevel);
animation = gcompris_load_animation( "animtest/test.txt" );
anim_item = (GnomeCanvasItem*)
gcompris_activate_animation( gnome_canvas_root(board->canvas),
animation );
gnome_canvas_item_set(anim_item,
"x", (double) CENTER_LEFT_X,
"y", (double) CENTER_LEFT_Y,
"anchor", GTK_ANCHOR_CENTER,
"width", (double)128,
"height", (double)128,
"width_set", TRUE,
"height_set", TRUE,
NULL);
}
}
static void end_board()
{
if(board != NULL)
{
gcompris_deactivate_animation(anim_item);
gcompris_free_animation(animation);
}
}
static gboolean is_our_board(GcomprisBoard *b)
{
if(b)
{
if(g_strcasecmp(b->type, "animtest") == 0)
{
b->plugin = &menu_bp;
return TRUE;
}
}
return FALSE;
}
/* gcompris - clockgame.c
*
* Time-stamp: <2004/06/15 01:35:31 bcoudoin>
* Time-stamp: <2005/03/21 22:56:23 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -527,7 +527,7 @@ static GnomeCanvasItem *clockgame_create_item(GnomeCanvasGroup *parent)
gnome_canvas_text_get_type (),
"text", _("Set the watch to:"),
"font", gcompris_skin_font_board_small,
"x", (double) gcomprisBoard->width*0.15,
"x", (double) gcomprisBoard->width*0.17,
"y", (double) cy + needle_size + needle_size / 3 - 30,
"anchor", GTK_ANCHOR_CENTER,
"fill_color", "white",
......@@ -539,7 +539,7 @@ static GnomeCanvasItem *clockgame_create_item(GnomeCanvasGroup *parent)
gnome_canvas_text_get_type (),
"text", "",
"font", gcompris_skin_font_board_big_bold,
"x", (double) gcomprisBoard->width*0.15,
"x", (double) gcomprisBoard->width*0.17,
"y", (double) cy + needle_size + needle_size / 3,
"anchor", GTK_ANCHOR_CENTER,
"fill_color", "white",
......
#include <Python.h>
#include <pygobject.h>
#include "gcompris/gcompris.h"
#include "py-gcompris-board.h"
#include "py-mod-anim.h"
static int Animation_init(py_GcomprisAnimation *self, PyObject*, PyObject*);
static void Animation_free(py_GcomprisAnimation *self);
/* Animation methods */
static PyObject *py_gcompris_activate_animation_m(PyObject *self,
PyObject *args);
/* global methods */
static PyObject *py_gcompris_activate_animation(PyObject *self,
PyObject *args);
static PyObject *py_gcompris_deactivate_animation(PyObject *self,
PyObject *args);
static PyMethodDef AnimationMethods[] = {
{"activate", py_gcompris_activate_animation_m, METH_VARARGS,
"gcompris_activate_animation_m"},
{"deactivate", py_gcompris_deactivate_animation, METH_VARARGS,
"gcompris_deactivate_animation"},
{NULL}
};
static PyTypeObject py_GcomprisAnimationType = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"pyGcomprisAnimation", /* tp_name */
sizeof(py_GcomprisAnimation), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Animation_free, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
0, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"Animation objects", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
AnimationMethods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)Animation_init, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
};
static PyMethodDef PythonGcomprisAnimModule[] = {
{"activate_animation", py_gcompris_activate_animation, METH_VARARGS,
"gcompris_activate_animation"},
{"deactivate_animation", py_gcompris_deactivate_animation, METH_VARARGS,
"gcompris_deactivate_animation"},
{NULL}
};
static int
Animation_init(py_GcomprisAnimation *self, PyObject *args, PyObject *key)
{
static char *kwlist[] =
{
"filename", "dataset", "categories", "mimetype", "name", NULL
};
char *file=NULL, *data=NULL, *cat=NULL, *mime=NULL, *name=NULL;
if(!PyArg_ParseTupleAndKeywords(args, key, "|sssss", kwlist,
&file, &data, &cat, &mime, &name))
{
return -1;
}
if(file)
{
self->a = gcompris_load_animation(file);
}
else
{
if( !data || !cat || !mime || !name )
return -1;
self->a = gcompris_load_animation_asset(data, cat, mime, name);
}
if(!self->a)
{
return -1;
}
return 0;
}
static void Animation_free(py_GcomprisAnimation *self)
{
gcompris_free_animation(self->a);
}
/*============================================================================*/
/* Animation Methods */
/*============================================================================*/
static PyObject*
py_gcompris_activate_animation_m(PyObject *s, PyObject *args)
{
GnomeCanvasItem *item;
GnomeCanvasGroup *parent;
PyObject *py_p;
py_GcomprisAnimation *self = (py_GcomprisAnimation*)