Commit 29606055 authored by Bruno Coudoin's avatar Bruno Coudoin

fixed for out of source compilation. Thanks to Mike Castle for that. -

	* docs/C/Makefile.am: fixed for out of source compilation. Thanks to Mike Castle for that.
	* docs/fr/Makefile.am: -
	* src/boards/algebra.c: fixes for windows.
	* src/boards/maze.c: (maze_next_level), (generateMaze): fixes for windows.
	* src/gcompris/.cvsignore: updated
	* src/gcompris/board.c: (board_check_file), (board_play): added traces
	* src/gcompris/gameutil.c: added traces. Add now the full xml file path in
	gcompris_load_menus before calling gcompris_read_xml_file
parent 14ab0437
2004-04-13 Bruno coudoin <bruno.coudoin@free.fr>
* docs/C/Makefile.am: fixed for out of source compilation. Thanks to Mike Castle for that.
* docs/fr/Makefile.am: -
* src/boards/algebra.c: fixes for windows.
* src/boards/maze.c: (maze_next_level), (generateMaze): fixes for windows.
* src/gcompris/.cvsignore: updated
* src/gcompris/board.c: (board_check_file), (board_play): added traces
* src/gcompris/gameutil.c: added traces. Add now the full xml file path in
gcompris_load_menus before calling gcompris_read_xml_file
2004-04-06 Bruno coudoin <bruno.coudoin@free.fr>
* src/gcompris/gcompris-marshal.c: create to make the gcompris library
......
......@@ -15,7 +15,7 @@ info_TEXINFOS = gcompris.texi
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/gcompris.html $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) gcompris.html $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/overview.jpg $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/topic.dat $(DESTDIR)$(gcompris_helpdir)
......
......@@ -15,7 +15,7 @@ info_TEXINFOS = gcompris.texi
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/gcompris.html $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) gcompris.html $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/overview.jpg $(DESTDIR)$(gcompris_helpdir)
$(INSTALL_DATA) $(srcdir)/topic.dat $(DESTDIR)$(gcompris_helpdir)
......
......@@ -36,7 +36,7 @@
#define SOUNDLISTFILE PACKAGE
gboolean board_paused = TRUE;
static gboolean board_paused = TRUE;
static int leavenow;
static int gamewon;
static void game_won(void);
......
......@@ -250,14 +250,14 @@ static void maze_next_level() {
gamewon = FALSE;
initMaze();
generateMaze((random()%breedte),(random()%hoogte));
generateMaze((rand()%breedte),(rand()%hoogte));
removeSet();
/* Try the next level */
maze_create_item(gnome_canvas_root(gcomprisBoard->canvas));
draw_background();
/* make a new group for the items */
begin=random()%hoogte;
end=random()%hoogte;
begin=rand()%hoogte;
end=rand()%hoogte;
/* Draw the tux */
pixmap = gcompris_load_pixmap("gcompris/misc/tux_top_east.png");
......@@ -673,7 +673,7 @@ static void generateMaze(int x, int y)
{
int nr = *po;
int ran, in;
in=(random()%nr)+1;
in=(rand()%nr)+1;
//printf("random: %d en %d mogelijkheden\n", in, *po);
ran=*(po + in);
if (nr>=1)
......
......@@ -3,6 +3,7 @@
.deps
.exrc
.libs
*.pc
Makefile
Makefile.in
gcompris
......
......@@ -61,7 +61,6 @@ void set_current_gcompris_board(GcomprisBoard * gcomprisBoard)
gboolean board_check_file(GcomprisBoard *gcomprisBoard)
{
GList *node;
BoardPlugin *bp;
GModule *gmodule = NULL;
gchar *gmodule_file = NULL;
......@@ -135,7 +134,6 @@ gboolean board_check_file(GcomprisBoard *gcomprisBoard)
void board_play(GcomprisBoard *gcomprisBoard)
{
GList *node;
BoardPlugin *bp;
GModule *gmodule = NULL;
......
/* gcompris - gameutil.c
*
* Time-stamp: <2004/03/07 19:45:20 bcoudoin>
* Time-stamp: <2004/04/14 00:47:32 bcoudoin>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -442,12 +442,14 @@ parse_doc(xmlDocPtr doc, GcomprisBoard *gcomprisBoard)
*/
GcomprisBoard *gcompris_read_xml_file(GcomprisBoard *gcomprisBoard, char *fname)
{
char *filename;
gchar *filename;
/* pointer to the new doc */
xmlDocPtr doc;
g_return_val_if_fail(fname!=NULL,FALSE);
g_message("gcompris_read_xml_file for %s\n", fname);
filename = g_strdup(fname);
/* if the file doesn't exist */
......@@ -609,12 +611,22 @@ void gcompris_load_menus()
if (!dir) {
g_warning("gcompris_load_menus : no menu found in %s", PACKAGE_DATA_DIR);
} else {
while((one_dirent = readdir(dir)) != NULL) {
/* add the board to the list */
GcomprisBoard *gcomprisBoard = NULL;
gchar *filename;
filename = g_strdup_printf("%s/%s",
PACKAGE_DATA_DIR, one_dirent->d_name);
if(!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
g_free(filename);
continue;
}
g_message("gcompris_load_menus is parsing file %s", filename);
if(selectMenuXML(one_dirent->d_name)) {
gcomprisBoard = g_malloc (sizeof (GcomprisBoard));
......@@ -625,9 +637,10 @@ void gcompris_load_menus()
gcomprisBoard->plugin=NULL;
boards_list = g_list_append(boards_list, gcompris_read_xml_file(gcomprisBoard,
one_dirent->d_name));
filename));
}
g_free(filename);
}
}
closedir(dir);
......
/* gcompris - gcompris.c
*
* Time-stamp: <2004/03/08 00:24:24 bcoudoin>
* Time-stamp: <2004/04/13 23:26:55 bcoudoin>
*
* Copyright (C) 2000-2003 Bruno Coudoin
*
......@@ -454,9 +454,11 @@ static void setup_window ()
/* Get and Run the root menu */
gcomprisBoardMenu = gcompris_get_board_from_section("/");
if(!board_check_file(gcomprisBoardMenu))
if(!board_check_file(gcomprisBoardMenu)) {
g_error("Cant't find the menu board or plugin execution error");
} else {
g_warning("Fine, we got the gcomprisBoardMenu, xml boards parsing went fine");
}
/* Run the bar */
gcompris_bar_start(canvas_bar);
......
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