Fix FTBFS with GCC 10.
Thanks: Logan Rosen for the patch.
Closes: #957786
Markus Koschany
3 years ago
0 | --- a/src/sdlBasic/src/sdlBrt/SDLengine/SDLengine.h | |
1 | +++ b/src/sdlBasic/src/sdlBrt/SDLengine/SDLengine.h | |
2 | @@ -315,14 +315,14 @@ | |
3 | void crossfadehandler(int s); | |
4 | int hit_pixelperfect(SDL_Surface *imga,int xa1,int ya1,int xa2,int ya2,SDL_Surface *imgb,int xb1,int yb1,int xb2,int yb2); | |
5 | ||
6 | -Uint32(*getpixel)(SDL_Surface *surface, int x, int y); | |
7 | +extern Uint32(*getpixel)(SDL_Surface *surface, int x, int y); | |
8 | Uint32 getpixel8(SDL_Surface *surface, int x, int y); | |
9 | Uint32 getpixel16(SDL_Surface *surface, int x, int y); | |
10 | Uint32 getpixel24BE(SDL_Surface *surface, int x, int y); | |
11 | Uint32 getpixel24(SDL_Surface *surface, int x, int y); | |
12 | Uint32 getpixel32(SDL_Surface *surface, int x, int y); | |
13 | ||
14 | -void (*putpixel)(SDL_Surface *surface, int x, int y, Uint32 col ); | |
15 | +extern void (*putpixel)(SDL_Surface *surface, int x, int y, Uint32 col ); | |
16 | void putpixel8(SDL_Surface *surface, int x, int y, Uint32 col ); | |
17 | void putpixel16(SDL_Surface *surface, int x, int y, Uint32 col ); | |
18 | void putpixel24BE(SDL_Surface *surface, int x, int y, Uint32 col ); | |
19 | @@ -337,7 +337,7 @@ | |
20 | void draw_ellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color); | |
21 | void draw_fillellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color); | |
22 | ||
23 | -Uint32 (*rrgb)(int col); | |
24 | +extern Uint32 (*rrgb)(int col); | |
25 | Uint32 rrgb8(int col); | |
26 | Uint32 rrgb16(int col); | |
27 | Uint32 rrgb24(int col); | |
28 | --- a/src/sdlBasic/src/sdlBrt/SDLengine/screen.c | |
29 | +++ b/src/sdlBasic/src/sdlBrt/SDLengine/screen.c | |
30 | @@ -28,6 +28,10 @@ | |
31 | ||
32 | #include "SDLengine.h" | |
33 | ||
34 | +Uint32(*getpixel)(SDL_Surface *surface, int x, int y); | |
35 | +void (*putpixel)(SDL_Surface *surface, int x, int y, Uint32 col ); | |
36 | +Uint32 (*rrgb)(int col); | |
37 | + | |
38 | //_________________________________________________________________________________________________________________________ | |
39 | ||
40 | //SCREEN |