Ran indent.sh to re-indent all source files
This commit is contained in:
parent
fbb46751c6
commit
5bdbc2766b
27 changed files with 1591 additions and 1273 deletions
|
|
@ -29,11 +29,9 @@ Uint8 specular_size = 32;
|
|||
|
||||
|
||||
void specular_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * snapshot, int old_x, int old_y, int x, int y,
|
||||
SDL_Rect * update_rect);
|
||||
SDL_Surface * snapshot, int old_x, int old_y, int x, int y, SDL_Rect * update_rect);
|
||||
|
||||
void specular_line_callback(void *pointer, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * snapshot, int x, int y);
|
||||
void specular_line_callback(void *pointer, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y);
|
||||
|
||||
|
||||
Uint32 specular_api_version(void)
|
||||
|
|
@ -46,8 +44,7 @@ int specular_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_lev
|
|||
int i;
|
||||
char filename[1024];
|
||||
|
||||
snprintf(filename, sizeof(filename), "%ssounds/magic/%s", api->data_directory,
|
||||
"reflection.ogg"); // FIXME
|
||||
snprintf(filename, sizeof(filename), "%ssounds/magic/%s", api->data_directory, "reflection.ogg"); // FIXME
|
||||
snd_effect = Mix_LoadWAV(filename);
|
||||
|
||||
return (1);
|
||||
|
|
@ -63,8 +60,7 @@ SDL_Surface *specular_get_icon(magic_api * api, int which)
|
|||
{
|
||||
char filename[1024];
|
||||
|
||||
snprintf(filename, sizeof(filename), "%simages/magic/%s",
|
||||
api->data_directory, "reflection.png"); // FIXME
|
||||
snprintf(filename, sizeof(filename), "%simages/magic/%s", api->data_directory, "reflection.png"); // FIXME
|
||||
|
||||
return (IMG_Load(filename));
|
||||
}
|
||||
|
|
@ -90,7 +86,9 @@ int specular_get_order(int which)
|
|||
|
||||
char *specular_get_description(magic_api * api, int which, int mode)
|
||||
{
|
||||
return strdup(gettext("Click and drag on the bottom half of your picture to draw a specular reflection — like a puddle, pond, or lake — that mirrors the top half of your picture."));
|
||||
return
|
||||
strdup(gettext
|
||||
("Click and drag on the bottom half of your picture to draw a specular reflection — like a puddle, pond, or lake — that mirrors the top half of your picture."));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -120,7 +118,8 @@ Uint8 specular_default_size(magic_api * api, int which, int mode)
|
|||
|
||||
void specular_shutdown(magic_api * api)
|
||||
{
|
||||
if (snd_effect != NULL) {
|
||||
if (snd_effect != NULL)
|
||||
{
|
||||
Mix_FreeChunk(snd_effect);
|
||||
}
|
||||
}
|
||||
|
|
@ -128,8 +127,7 @@ void specular_shutdown(magic_api * api)
|
|||
|
||||
void
|
||||
specular_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y,
|
||||
SDL_Rect * update_rect)
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
specular_drag(api, which, canvas, snapshot, x, y, x, y, update_rect);
|
||||
}
|
||||
|
|
@ -137,16 +135,12 @@ specular_click(magic_api * api, int which, int mode,
|
|||
|
||||
void
|
||||
specular_drag(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||
int old_x, int old_y, int x, int y,
|
||||
SDL_Rect * update_rect)
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int old_x, int old_y, int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
SDL_LockSurface(snapshot);
|
||||
SDL_LockSurface(canvas);
|
||||
|
||||
api->line((void *) api, which, canvas, snapshot,
|
||||
old_x, old_y, x, y, 1,
|
||||
specular_line_callback);
|
||||
api->line((void *)api, which, canvas, snapshot, old_x, old_y, x, y, 1, specular_line_callback);
|
||||
|
||||
SDL_UnlockSurface(canvas);
|
||||
SDL_UnlockSurface(snapshot);
|
||||
|
|
@ -176,23 +170,23 @@ specular_drag(magic_api * api, int which,
|
|||
|
||||
void
|
||||
specular_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y,
|
||||
SDL_Rect * update_rect)
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
}
|
||||
|
||||
void specular_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect)
|
||||
void specular_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 r, Uint8 g,
|
||||
Uint8 b, SDL_Rect * update_rect)
|
||||
{
|
||||
}
|
||||
|
||||
void specular_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 size, SDL_Rect * update_rect)
|
||||
void specular_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 size,
|
||||
SDL_Rect * update_rect)
|
||||
{
|
||||
specular_size = size * 16;
|
||||
}
|
||||
|
||||
|
||||
void specular_line_callback(void *pointer, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * snapshot, int x, int y)
|
||||
void specular_line_callback(void *pointer, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y)
|
||||
{
|
||||
magic_api *api = (magic_api *) pointer;
|
||||
int xx, yy, ysrc;
|
||||
|
|
@ -220,12 +214,10 @@ void specular_line_callback(void *pointer, int which, SDL_Surface * canvas,
|
|||
}
|
||||
}
|
||||
|
||||
void specular_switchin(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas)
|
||||
void specular_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
{
|
||||
}
|
||||
|
||||
void specular_switchout(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas)
|
||||
void specular_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue