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,7 +1,7 @@
/*
* Draws fretwork
*
* Last updated: 2021-09-20
* Last updated: 2022-05-19
*/
#include "tp_magic_api.h"
@ -70,7 +70,7 @@ void fretwork_release(magic_api * api, int which,
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);
inline void fretwork_extract_coords_from_segment(unsigned int segment, int * x, int * 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);
@ -278,7 +278,7 @@ inline unsigned int fretwork_get_segment(int x, int y)
return (yy - 1) * fretwork_segments_x + xx;
}
inline void fretwork_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y)
inline void fretwork_extract_coords_from_segment(unsigned int segment, int * x, int * 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;