termux-packages/x11-packages/tuxpaint/static-inline.patch
2022-05-04 21:14:35 +09:00

157 lines
7.2 KiB
Diff

--- a/magic/src/confetti.c
+++ b/magic/src/confetti.c
@@ -31,8 +31,8 @@
void confetti_release(magic_api * api, int which,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect);
void confetti_shutdown(magic_api * api);
-inline char confetti_get_greater(const char what1, const char what2);
-inline char confetti_get_lesser(const char what1, const char what2);
+static inline char confetti_get_greater(const char what1, const char what2);
+static inline char confetti_get_lesser(const char what1, const char what2);
Uint32 confetti_get_new_color(void *ptr, SDL_Surface * canvas);
void confetti_click(magic_api * api, int which, int mode,
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
@@ -116,7 +116,7 @@
//private functions
-inline char confetti_get_greater(const char what1, const char what2)
+static inline char confetti_get_greater(const char what1, const char what2)
{
if (what1 > what2)
return what1;
@@ -124,7 +124,7 @@
return what2;
}
-inline char confetti_get_lesser(const char what1, const char what2)
+static inline char confetti_get_lesser(const char what1, const char what2)
{
if (what1 < what2)
return what1;
--- a/magic/src/fold.c
+++ b/magic/src/fold.c
@@ -60,7 +60,7 @@
void fold_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect);
void fold_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
-inline Uint8 fold_what_corner(int x, int y, SDL_Surface * canvas);
+static inline Uint8 fold_what_corner(int x, int y, SDL_Surface * canvas);
void fold_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
Uint32 fold_api_version(void)
@@ -388,7 +388,7 @@
// Interactivity functions
-inline Uint8 fold_what_corner(int x, int y, SDL_Surface * canvas)
+static inline Uint8 fold_what_corner(int x, int y, SDL_Surface * canvas)
{
if (x >= canvas->w / 2)
{
--- a/magic/src/fretwork.c
+++ b/magic/src/fretwork.c
@@ -31,7 +31,7 @@
Mix_Chunk *fretwork_snd;
unsigned int img_w, img_h;
unsigned int fretwork_segments_x, fretwork_segments_y; //how many segments do we have?
-inline int fretwork_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
+static inline int fretwork_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
static Uint8 *fretwork_status_of_segments; //a place to store an info about bitmap used for selected segment
static char **fretwork_images; //the pathes to all the images needed
static unsigned int fretwork_segment_modified; //which segment was modified this time?
@@ -66,7 +66,7 @@
void fretwork_shutdown(magic_api * api);
void fretwork_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot);
void fretwork_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot);
-inline void fretwork_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y);
+static inline void fretwork_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y);
void fretwork_click(magic_api * api, int which, int mode,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect);
@@ -75,7 +75,7 @@
void fretwork_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect);
static void fretwork_draw_wrapper(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
-inline unsigned int fretwork_get_segment(int x, int y);
+static inline unsigned int fretwork_get_segment(int x, int y);
SDL_Surface *fretwork_one, *fretwork_three, *fretwork_four, *fretwork_corner;
@@ -251,7 +251,7 @@
// Interactivity functions
-inline int fretwork_math_ceil(int x, int y)
+static inline int fretwork_math_ceil(int x, int y)
{
int temp;
@@ -262,7 +262,7 @@
return temp;
}
-inline unsigned int fretwork_get_segment(int x, int y)
+static inline unsigned int fretwork_get_segment(int x, int y)
{
int xx; //segments are numerated just like pixels
int yy; //in computer graphics: left upper (=1), ... ,right upper,
@@ -274,7 +274,7 @@
return (yy - 1) * fretwork_segments_x + xx;
}
-inline void fretwork_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
+static inline void fretwork_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
{
*x = ((segment % fretwork_segments_x) - 1) * img_w; //useful to set update_rect as small as possible
*y = (int)(segment / fretwork_segments_x) * img_h;
--- a/magic/src/rails.c
+++ b/magic/src/rails.c
@@ -25,7 +25,7 @@
Mix_Chunk *rails_snd;
unsigned int img_w, img_h;
unsigned int rails_segments_x, rails_segments_y; //how many segments do we have?
-inline int rails_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
+static inline int rails_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
static Uint8 *rails_status_of_segments; //a place to store an info about bitmap used for selected segment
static char **rails_images; //the pathes to all the images needed
static unsigned int rails_segment_modified; //which segment was modified this time?
@@ -53,8 +53,8 @@
void rails_shutdown(magic_api * api);
void rails_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
void rails_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
-inline unsigned int rails_get_segment(int x, int y);
-inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y);
+static inline unsigned int rails_get_segment(int x, int y);
+static inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y);
static void rails_flip(void *ptr, SDL_Surface * dest, SDL_Surface * src);
static void rails_flip_flop(void *ptr, SDL_Surface * dest, SDL_Surface * src);
static void rails_rotate(void *ptr, SDL_Surface * dest, SDL_Surface * src, unsigned int direction);
@@ -199,7 +199,7 @@
// Interactivity functions
-inline int rails_math_ceil(int x, int y)
+static inline int rails_math_ceil(int x, int y)
{
int temp;
@@ -211,7 +211,7 @@
return temp;
}
-inline unsigned int rails_get_segment(int x, int y)
+static inline unsigned int rails_get_segment(int x, int y)
{
int xx; //segments are numerated just like pixels
int yy; //in computer graphics: left upper (=1), ... ,right upper,
@@ -224,7 +224,7 @@
}
-inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
+static inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
{ //extracts the coords of the beginning and the segment
*x = ((segment % rails_segments_x) - 1) * img_w; //useful to set update_rect as small as possible
*y = (int)(segment / rails_segments_x) * img_h;