Added Rain magic tool. Added error checking to previous tools. Added missing static declarations for global variables

This commit is contained in:
Andrew Corcoran 2008-07-24 15:44:14 +00:00
parent e154767776
commit fd65f98abc
9 changed files with 264 additions and 17 deletions

View file

@ -46,13 +46,13 @@
#endif
const int mosaic_AMOUNT= 300;
const int mosaic_RADIUS = 16;
const double mosaic_SHARPEN = 1.0;
static const int mosaic_AMOUNT= 300;
static const int mosaic_RADIUS = 16;
static const double mosaic_SHARPEN = 1.0;
//Holder for the pre calulated pixel values
SDL_Surface * mosaic_temp;
SDL_Surface * mosaic_final;
static SDL_Surface * mosaic_temp;
static SDL_Surface * mosaic_final;
enum {
TOOL_MOSAIC,
@ -85,6 +85,9 @@ int mosaic_init(magic_api * api){
for (i = 0; i < mosaic_NUM_TOOLS; i++){
snprintf(fname, sizeof(fname), "%s/sounds/magic/%s", api->data_directory, mosaic_snd_filenames[i]);
mosaic_snd_effect[i] = Mix_LoadWAV(fname);
if (mosaic_snd_effect[i]==NULL){
return(0);
}
}
return(1);