Commit 6e4b332f authored by David Bruce's avatar David Bruce

more improvements to 'practice' activity



git-svn-id: svn://svn.debian.org/svn/tux4kids/tuxtype/trunk@760 47d30e19-490b-0410-9d18-e851f4e465b3
parent 0816a83d
13 Oct 2008 - svn revision 760
[ David Bruce <davidstuartbruce@gmail.com> ]
- Lots more work on fullscreen mode with Fish Cascade working but a little slow
- Practice activity extensively reworked - wrapping of arbitrary length phrases,
rearrangement of screen layout, fullscreen mode supported, animated Tux icons,
onscreen display of time, chars, words per min, accuracy with gettext support.
22 Aug 2008 - svn revision 668
[ David Bruce <davidstuartbruce@gmail.com> ]
- Extensive revision to support fullscreen mode at resolution of OS rather than only 640x480.
......
......@@ -7,6 +7,10 @@
- Using GNU iconv() instead of Unicode Inc.'s conversion code
- SDL_extras brought in from tuxmath for DrawButton(), streamlined BlackOutline(), etc.
18 Aug 2008 -svn revision 652
[ Mobin Mohan <mobinmohan@gmail.com> ]
-GUI for editing wordlist Implemented
18 Aug 2008 - svn revision 647
[ Sreyas Kurumanghat <k.sreyas@gmail.com ]
- Added features to practice game. Now pressing the down arrow presents the next phrase for practice and the escape key quits from the game.
......
......@@ -36,4 +36,5 @@ walk1.png\
walk2.png\
walk3.png\
win0.png\
win1.png\
yipe0.png
......@@ -214,6 +214,7 @@ walk1.png\
walk2.png\
walk3.png\
win0.png\
win1.png\
yipe0.png
all: all-am
......
......@@ -7,6 +7,7 @@ dist_sounds_DATA = tuxi.ogg \
alarm.wav \
bite.wav \
buzz.wav \
cheer.wav \
click.wav \
excuseme.wav \
explosion.wav \
......
......@@ -184,6 +184,7 @@ dist_sounds_DATA = tuxi.ogg \
alarm.wav \
bite.wav \
buzz.wav \
cheer.wav \
click.wav \
excuseme.wav \
explosion.wav \
......
......@@ -324,6 +324,7 @@ SDL_Surface* Blend(SDL_Surface *S1,SDL_Surface *S2,float gamma)
SDLPango_Context *context = NULL;
void init_SDLPango_Context()
{
if((context = SDLPango_CreateContext_GivenFontDesc(settings.theme_font_name))==NULL)
......@@ -331,6 +332,8 @@ void init_SDLPango_Context()
SDLPango_SetBaseDirection(context, SDLPANGO_DIRECTION_LTR);
SDLPango_SetDpi(context, 125.0, 125.0);
}
void free_SDLPango_Context()
{
if(context != NULL)
......@@ -426,10 +429,18 @@ SDL_Surface* BlackOutline(const char *t, TTF_Font *font, SDL_Color *c)
#else
if( context != NULL)
{
SDLPango_SetDefaultColor(context, MATRIX_TRANSPARENT_BACK_WHITE_LETTER);
/* convert color arg: */
SDLPango_Matrix* color_matrix = SDL_Colour_to_SDLPango_Matrix(c);
if (color_matrix)
SDLPango_SetDefaultColor(context, color_matrix);
else /* fall back to just using white if conversion fails: */
SDLPango_SetDefaultColor(context, MATRIX_TRANSPARENT_BACK_WHITE_LETTER);
white_letters = SDLPango_CreateSurfaceDraw(context);
}
else {
else
{
white_letters = TTF_RenderUTF8_Blended(font, t, *c);
}
#endif
......
......@@ -28,16 +28,6 @@ Sreyas Kurumanghat <k.sreyas@gmail.com>
#include "funcs.h"
/* NOTE these are externed in globals.h so not static */
/* the colors we use throughout the game */
SDL_Color black;
SDL_Color gray;
SDL_Color dark_blue;
SDL_Color red;
SDL_Color white;
SDL_Color yellow;
/* An individual item in the list of cached unicode characters that are rendered at */
/* the start of each game. */
......
......@@ -62,6 +62,7 @@
#endif // __GLOBALS_H__
/* FIXME get rid of these 'evil' macros */
#define NEXT_FRAME(SPRITE) if ((SPRITE)->num_frames) (SPRITE)->cur = (((SPRITE)->cur)+1) % (SPRITE)->num_frames;
#define REWIND(SPRITE) (SPRITE)->cur = 0;
......
......@@ -448,8 +448,12 @@ void FreeSprite(sprite* gfx )
return;
for (x = 0; x < gfx->num_frames; x++)
SDL_FreeSurface(gfx->frame[x]);
SDL_FreeSurface(gfx->default_img);
{
if (gfx->frame[x])
SDL_FreeSurface(gfx->frame[x]);
}
if (gfx->default_img)
SDL_FreeSurface(gfx->default_img);
free(gfx);
}
......
......@@ -21,9 +21,15 @@
SDL_Surface* screen;
SDL_Event event;
/* the colors we use throughout the game */
SDL_Color black;
SDL_Color gray;
SDL_Color dark_blue;
SDL_Color red;
SDL_Color white;
SDL_Color yellow;
/********************
......
This diff is collapsed.
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