|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: gfx.c,v 1.19 2003/06/06 23:22:03 stpohle Exp $ */
|
|
|
|
/* $Id: gfx.c,v 1.20 2003/06/07 14:25:46 stpohle Exp $ */
|
|
|
|
/* gfx.c */
|
|
|
|
/* gfx.c */
|
|
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL.h>
|
|
|
@ -948,8 +948,15 @@ gfx_load_tileset (char *tilesetname)
|
|
|
|
getRGBpixel (tmpimage1, 0, 0, &r, &g, &b);
|
|
|
|
getRGBpixel (tmpimage1, 0, 0, &r, &g, &b);
|
|
|
|
SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b));
|
|
|
|
SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b));
|
|
|
|
gfx.field[i].image = SDL_DisplayFormat (tmpimage1);
|
|
|
|
gfx.field[i].image = SDL_DisplayFormat (tmpimage1);
|
|
|
|
SDL_FreeSurface (tmpimage);
|
|
|
|
|
|
|
|
SDL_FreeSurface (tmpimage1);
|
|
|
|
SDL_FreeSurface (tmpimage1);
|
|
|
|
|
|
|
|
if (i >= FT_sp_trigger && i < FT_max) {
|
|
|
|
|
|
|
|
// create the smal special thing
|
|
|
|
|
|
|
|
tmpimage1 = scale_image (tmpimage, 32, 32);
|
|
|
|
|
|
|
|
getRGBpixel (tmpimage1, 0, 0, &r, &g, &b);
|
|
|
|
|
|
|
|
SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b));
|
|
|
|
|
|
|
|
gfx.smal_special[i - FT_sp_trigger] = SDL_DisplayFormat (tmpimage1);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
SDL_FreeSurface (tmpimage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
UpdateRects_nr = 0;
|
|
|
|
UpdateRects_nr = 0;
|
|
|
@ -964,6 +971,11 @@ gfx_free_tileset ()
|
|
|
|
if (gfx.field[i].image != NULL)
|
|
|
|
if (gfx.field[i].image != NULL)
|
|
|
|
SDL_FreeSurface (gfx.field[i].image);
|
|
|
|
SDL_FreeSurface (gfx.field[i].image);
|
|
|
|
gfx.field[i].image = NULL;
|
|
|
|
gfx.field[i].image = NULL;
|
|
|
|
|
|
|
|
if (i >= FT_sp_trigger && i < FT_max) {
|
|
|
|
|
|
|
|
if (gfx.smal_special[i - FT_sp_trigger] != NULL)
|
|
|
|
|
|
|
|
SDL_FreeSurface (gfx.smal_special[i - FT_sp_trigger]);
|
|
|
|
|
|
|
|
gfx.smal_special[i - FT_sp_trigger] = NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (gfx.bomb.image != NULL)
|
|
|
|
if (gfx.bomb.image != NULL)
|
|
|
|
SDL_FreeSurface (gfx.bomb.image);
|
|
|
|
SDL_FreeSurface (gfx.bomb.image);
|
|
|
|