|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: field.c,v 1.14 2003/05/07 21:28:12 stpohle Exp $ */
|
|
|
|
/* $Id: field.c,v 1.15 2003/05/08 14:35:49 stpohle Exp $ */
|
|
|
|
/* field.c - procedures which are needed to control the field */
|
|
|
|
/* field.c - procedures which are needed to control the field */
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
@ -49,10 +49,19 @@ draw_stone (int x, int y)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (stone->frame > 0)
|
|
|
|
if (stone->frame > 0 || stone->type == FT_nothing) {
|
|
|
|
SDL_BlitSurface (gfx.field[FT_nothing].image, NULL, gfx.screen, &dest);
|
|
|
|
SDL_Rect srcbg;
|
|
|
|
|
|
|
|
|
|
|
|
SDL_BlitSurface (srcimg, &src, gfx.screen, &dest);
|
|
|
|
srcbg.w = dest.w;
|
|
|
|
|
|
|
|
srcbg.h = dest.h;
|
|
|
|
|
|
|
|
srcbg.x = (x % gfx.field[FT_nothing].frames) * gfx.block.x;
|
|
|
|
|
|
|
|
srcbg.y = (y % gfx.field[FT_nothing].frames) * gfx.block.y;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SDL_BlitSurface (gfx.field[FT_nothing].image, &srcbg, gfx.screen, &dest);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (stone->type != FT_nothing)
|
|
|
|
|
|
|
|
SDL_BlitSurface (srcimg, &src, gfx.screen, &dest);
|
|
|
|
|
|
|
|
|
|
|
|
// draw explosions if there is any
|
|
|
|
// draw explosions if there is any
|
|
|
|
for (d = 0, i = 0; d < 4; d++)
|
|
|
|
for (d = 0, i = 0; d < 4; d++)
|
|
|
|