[Tux4kids-commits] r239 - in tuxtype/trunk/tuxtype: . data data/themes/catalan data/words
dbruce-guest at alioth.debian.org
dbruce-guest at alioth.debian.org
Fri Sep 14 20:25:18 UTC 2007
Author: dbruce-guest
Date: 2007-09-14 20:25:18 +0000 (Fri, 14 Sep 2007)
New Revision: 239
Added:
tuxtype/trunk/tuxtype/data/words/alphabet.txt
Modified:
tuxtype/trunk/tuxtype/data/Makefile.am
tuxtype/trunk/tuxtype/data/Makefile.in
tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.am
tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.in
tuxtype/trunk/tuxtype/scripting.c
Log:
More work on lessons/scripting; fixed missing tuxtype/data/words/alphabet.txt in svn
-;-This line, and those below, will be ignored--
M tuxtype/trunk/tuxtype/data/Makefile.in
M tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.in
M tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.am
M tuxtype/trunk/tuxtype/data/Makefile.am
A tuxtype/trunk/tuxtype/data/words/alphabet.txt
M tuxtype/trunk/tuxtype/scripting.c
Modified: tuxtype/trunk/tuxtype/data/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/Makefile.am 2007-09-14 10:42:17 UTC (rev 238)
+++ tuxtype/trunk/tuxtype/data/Makefile.am 2007-09-14 20:25:18 UTC (rev 239)
@@ -10,3 +10,4 @@
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/keyboard.lst
+_SOURCES = alphabet.txt
Modified: tuxtype/trunk/tuxtype/data/Makefile.in
===================================================================
--- tuxtype/trunk/tuxtype/data/Makefile.in 2007-09-14 10:42:17 UTC (rev 238)
+++ tuxtype/trunk/tuxtype/data/Makefile.in 2007-09-14 20:25:18 UTC (rev 239)
@@ -163,6 +163,7 @@
top_srcdir = @top_srcdir@
SUBDIRS = images scripts sounds themes words fonts
EXTRA_DIST = keyboard.lst
+_SOURCES = alphabet.txt
all: all-recursive
.SUFFIXES:
Modified: tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.am 2007-09-14 10:42:17 UTC (rev 238)
+++ tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.am 2007-09-14 20:25:18 UTC (rev 239)
@@ -1,14 +1,12 @@
SUBDIRS = words
-EXTRA_DIST = \
-lang.po\
-keyboard.lst
+EXTRA_DIST = lang.po keyboard.lst
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan
+
$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan/lang.po
- $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan/keyboard.lst
uninstall-local:
Modified: tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.in
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.in 2007-09-14 10:42:17 UTC (rev 238)
+++ tuxtype/trunk/tuxtype/data/themes/catalan/Makefile.in 2007-09-14 20:25:18 UTC (rev 239)
@@ -162,10 +162,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = words
-EXTRA_DIST = \
-lang.po\
-keyboard.lst
-
+EXTRA_DIST = lang.po keyboard.lst
all: all-recursive
.SUFFIXES:
@@ -476,8 +473,8 @@
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan
+
$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan/lang.po
- $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/catalan/keyboard.lst
uninstall-local:
Added: tuxtype/trunk/tuxtype/data/words/alphabet.txt
===================================================================
--- tuxtype/trunk/tuxtype/data/words/alphabet.txt (rev 0)
+++ tuxtype/trunk/tuxtype/data/words/alphabet.txt 2007-09-14 20:25:18 UTC (rev 239)
@@ -0,0 +1,27 @@
+Alphabet
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
Modified: tuxtype/trunk/tuxtype/scripting.c
===================================================================
--- tuxtype/trunk/tuxtype/scripting.c 2007-09-14 10:42:17 UTC (rev 238)
+++ tuxtype/trunk/tuxtype/scripting.c 2007-09-14 20:25:18 UTC (rev 239)
@@ -57,9 +57,9 @@
char fn[FNLEN];
if (settings.use_english)
- sprintf( fn, "%s/scripts/cascade.xml", settings.default_data_path);
+ sprintf( fn, "%s/scripts/laser.xml", settings.default_data_path);
else
- sprintf( fn, "%s/scripts/cascade.xml", settings.theme_data_path);
+ sprintf( fn, "%s/scripts/laser.xml", settings.theme_data_path);
if (load_script( fn ) != 0)
return; // bail if any errors occur
@@ -77,9 +77,9 @@
char fn[FNLEN];
if (settings.use_english)
- sprintf( fn, "%s/scripts/cascade.xml", settings.default_data_path);
+ sprintf( fn, "%s/scripts/projectInfo.xml", settings.default_data_path);
else
- sprintf( fn, "%s/scripts/cascade.xml", settings.theme_data_path);
+ sprintf( fn, "%s/scripts/projectInfo.xml", settings.theme_data_path);
if (load_script( fn ) != 0)
return; // bail if any errors occur
@@ -88,10 +88,10 @@
}
-int TestLesson( void )
+int TestLesson(void)
{
SDL_Surface* left = NULL, *right = NULL, *pointer = NULL, *bkg = NULL;
- SDL_Surface *filenames[200] = {NULL};
+ SDL_Surface* filenames[200] = {NULL};
SDL_Rect spot, arrow_area;
SDL_Rect leftRect, rightRect;
@@ -190,7 +190,7 @@
DEBUGCODE { fprintf(stderr, "Adding XML file no. %d: %s\n", c, wordlistFile[c]); }
- filenames[c] = TTF_RenderUTF8_Blended( font, wordsFile->d_name, white);
+ filenames[c] = TTF_RenderUTF8_Blended(font, wordsFile->d_name, white);
SDL_BlitSurface( filenames[c], NULL, screen, &spot );
SDL_FreeSurface(filenames[c]);
c++;
@@ -214,7 +214,7 @@
titleRects[0].y = 30;
titleRects[0].w = titleRects[0].h = titleRects[0].x = 0;
- for (i = 1; i<8; i++)
+ for (i = 1; i < 8; i++)
{
titleRects[i].y = titleRects[i-1].y + 50;
titleRects[i].w = titleRects[i].h = titleRects[i].x = 0;
@@ -228,7 +228,7 @@
while (!stop)
{
while (SDL_PollEvent(&event))
-
+ {
switch (event.type)
{
case SDL_QUIT:
@@ -312,47 +312,50 @@
if (loc+1< c)
loc++;
}
- }
+ } /* End of 'switch(event.type)' loop */
+ } /* End of 'while(SDL_PollEvent(&event))' loop */
- if (old_loc != loc)
- {
- int start;
- SDL_BlitSurface( bkg, &arrow_area, screen, NULL);
- start = loc;
- for (i = start; i < c; i++)
- {
- spot.x = 5;
- spot.y = (i * MENU_FONT_SIZE) + 18;
- if (i == loc)
- SDL_BlitSurface(pointer, NULL, screen, &spot);
- }
+ if (old_loc != loc)
+ {
+ int start;
+ SDL_BlitSurface( bkg, &arrow_area, screen, NULL);
- SDL_Flip(screen);
+ start = loc;
+ for (i = start; i < c; i++)
+ {
+ spot.x = 5;
+ spot.y = (i * MENU_FONT_SIZE) + 18;
+ if (i == loc)
+ SDL_BlitSurface(pointer, NULL, screen, &spot);
}
+ SDL_Flip(screen);
+ }
+
SDL_Delay(40);
old_loc = loc;
- }
+ } /* End of 'while(!stop)' loop */
- SDL_FreeSurface(pointer);
- SDL_FreeSurface(left);
- SDL_FreeSurface(right);
- SDL_FreeSurface(bkg);
- pointer = left = right = bkg = NULL;
+ SDL_FreeSurface(pointer);
+ SDL_FreeSurface(left);
+ SDL_FreeSurface(right);
+ SDL_FreeSurface(bkg);
+ pointer = left = right = bkg = NULL;
- if (stop == 2)
- {
- LOG("Player pressed 'Esc' - leaving TestLesson\n");
- return 1;
- }
+ if (stop == 2)
+ {
+ LOG("Player pressed 'Esc' - leaving TestLesson\n");
+ return 1;
+ }
- if (load_script( fn ) != 0)
- {
- fprintf(stderr, "load_script() failed to load '%s'\n");
- return 0; // bail if any errors occur
- }
+ /* Getting to here means "stop == 1", try to run chosen script: */
+ if (load_script(fn) != 0)
+ {
+ fprintf(stderr, "load_script() failed to load '%s'\n");
+ return 0; // bail if any errors occur
+ }
DEBUGCODE { fprintf(stderr, "Attempting to run script: %s\n", fn); }
More information about the Tux4kids-commits
mailing list