diff --git a/src/bomb.c b/src/bomb.c index 002908b..b55a6a7 100644 --- a/src/bomb.c +++ b/src/bomb.c @@ -154,7 +154,7 @@ get_bomb_on (int x, int y, _point bombs[]) void -draw_fire (int x, int y, int d) +draw_fire (int x, int y, int d, int frame) { SDL_Rect src, dest; @@ -165,7 +165,7 @@ draw_fire (int x, int y, int d) dest.x = gfx.offset.x + x * gfx.block.x; dest.y = gfx.offset.y + y * gfx.block.y; - src.y = 0; + src.y = frame * src.w; src.x = d * src.w; SDL_BlitSurface (gfx.fire.image, &src, gfx.screen, &dest); @@ -328,7 +328,7 @@ do_explosion (int p, int b) BS_off && bomb->firerst[d] == -1) { bomb->firer[d]++; bman.field[bomb->pos.x + dx][bomb->pos.y + dy].ex[d]++; - draw_fire (bomb->pos.x + dx, bomb->pos.y + dy, d); + draw_fire (bomb->pos.x + dx, bomb->pos.y + dy, d, 0); } else { bomb->firerst[d] = bomb->firer[d]; diff --git a/src/bomberclone.h b/src/bomberclone.h index fecd447..50c6073 100644 --- a/src/bomberclone.h +++ b/src/bomberclone.h @@ -68,7 +68,7 @@ struct __player { int range; // range of the bombs int speed; // how fast we can go (0 = slow, 1 = normal... 3 = fastest) int speeddat; // some data i need to do the speed thing - _playerilness ill[PI_max]; // all possible types + _playerilness ill[PI_max]; // all possible types char name[LEN_PLAYERNAME]; // name oder name[0] == 0 unsigned char state; // status of the player @@ -177,7 +177,7 @@ extern void player_set_gfx (_player *p, signed char gfx_nr); extern void bomb_loop (); extern void restore_bomb_screen (); extern void get_bomb_on (int x, int y, _point bombs[]); -extern void draw_fire (int x, int y, int frame); +extern void draw_fire (int x, int y, int d, int frame); extern void do_explosion (int p, int b); extern void restore_explosion (_bomb * bomb); extern int explosion_check_field (int x, int y, int p, int b); diff --git a/src/field.c b/src/field.c index cfa2698..f9927de 100644 --- a/src/field.c +++ b/src/field.c @@ -57,7 +57,7 @@ draw_stone (int x, int y) for (d = 0, i = 0; d < 4; d++) if (stone->ex[d] > 0) { i = 1; // mark that there is already an explosion - draw_fire (x, y, d); + draw_fire (x, y, d, 0); } if (i == 0) // we don't have to do this anymore because this was happend in draw_fire diff --git a/src/main.c b/src/main.c index 0ff0cfc..f0886f1 100644 --- a/src/main.c +++ b/src/main.c @@ -25,6 +25,9 @@ main (int argc, char **argv) return (1); } + sprintf (text,"Bomberclone %s", VERSION); + SDL_WM_SetCaption(text , NULL); + game_init (argv); d_printf ("\n\n ***** Bomberclone Version %s \n\n",VERSION); if (ReadConfig()) {