Address some compile-time warnings in SDL 2.0

Also disable VERBOSE DEBUG output.

Note - Still a pair of nasty warnings about the following

 * ‘rsvg_handle_close’ is deprecated: Use
   'rsvg_handle_read_stream_sync' instead

 * passing argument 3 of ‘autoscale_copy_smear_free’ from incompatible
   pointer type (SDL_BlitSurface)

They should be addressed.
This commit is contained in:
Bill Kendrick 2022-05-19 00:49:48 -07:00
parent ed7184bd64
commit dfba73d327
5 changed files with 51 additions and 45 deletions

View file

@ -1,4 +1,4 @@
/* Last modified: 2021-09-21 */
/* Last modified: 2022-05-19 */
#include "tp_magic_api.h"
#include "SDL_image.h"
#include "SDL_mixer.h"
@ -58,7 +58,7 @@ 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);
inline void rails_extract_coords_from_segment(unsigned int segment, int * x, int * 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);
@ -228,7 +228,7 @@ inline unsigned int rails_get_segment(int x, int y)
}
inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
inline void rails_extract_coords_from_segment(unsigned int segment, int * x, int * 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;