[Tux4kids-commits] r1248 - tuxmath/trunk/src
David Bruce
dbruce-guest at alioth.debian.org
Tue Jul 21 22:25:51 UTC 2009
Author: dbruce-guest
Date: 2009-07-21 22:25:49 +0000 (Tue, 21 Jul 2009)
New Revision: 1248
Modified:
tuxmath/trunk/src/game.c
Log:
minor tweak to avoid build error with gcc-2.95 (BeOS)
Modified: tuxmath/trunk/src/game.c
===================================================================
--- tuxmath/trunk/src/game.c 2009-07-21 19:21:25 UTC (rev 1247)
+++ tuxmath/trunk/src/game.c 2009-07-21 22:25:49 UTC (rev 1248)
@@ -2182,10 +2182,18 @@
{
for (i = 0; i < mp_get_parameter(PLAYERS); ++i)
{
+ SDL_Surface* score;
snprintf(str, 64, "%s: %d", mp_get_player_name(i),mp_get_player_score(i));
- SDL_Surface* score = BlackOutline(str, DEFAULT_MENU_FONT_SIZE, &white);
- SDL_Rect loc = {screen->w - score->w, score->h * (i + 2), 0, 0};
- SDL_BlitSurface(score, NULL, screen, &loc);
+ score = BlackOutline(str, DEFAULT_MENU_FONT_SIZE, &white);
+ if(score)
+ {
+ SDL_Rect loc;
+ loc.w = screen->w - score->w;
+ loc.h = score->h * (i + 2);
+ loc.x = 0;
+ loc.y = 0;
+ SDL_BlitSurface(score, NULL, screen, &loc);
+ }
}
}
More information about the Tux4kids-commits
mailing list