[Tux4kids-commits] r642 - tuxmath/trunk/src
fongog-guest at alioth.debian.org
fongog-guest at alioth.debian.org
Sat Aug 16 23:41:20 UTC 2008
Author: fongog-guest
Date: 2008-08-16 23:41:19 +0000 (Sat, 16 Aug 2008)
New Revision: 642
Modified:
tuxmath/trunk/src/factroids.c
Log:
Fixed: memory bug, and number overlapping
Modified: tuxmath/trunk/src/factroids.c
===================================================================
--- tuxmath/trunk/src/factroids.c 2008-08-16 22:58:37 UTC (rev 641)
+++ tuxmath/trunk/src/factroids.c 2008-08-16 23:41:19 UTC (rev 642)
@@ -509,6 +509,7 @@
FF_draw_bkgr();
if(FF_game==FACTOROIDS_GAME)
{
+
rect.x=(screen->w/2)-(IMG_factors->w/2);
rect.y=(screen->h)/7;
SDL_BlitSurface(IMG_factors,NULL,screen,&rect);
@@ -528,6 +529,9 @@
_("can simplify the fraction... The rocks will split until you got all"),
_("Type the number and shot presing return!"));
}
+
+ SDL_FreeSurface(IMG_factors);
+ SDL_FreeSurface(IMG_fractions);
}
static void FF_handle_ship(void){
@@ -775,6 +779,9 @@
/************* Draw Asteroids ***************/
for(i=0; i<MAX_ASTEROIDS; i++){
if(asteroid[i].alive>0){
+
+ xnum=0;
+ ynum=0;
dest.x = asteroid[i].x;
dest.y = asteroid[i].y;
More information about the Tux4kids-commits
mailing list