@@ -275,7 +275,7 @@ bool OneSideClip(T1& c, T2& d, const T3 clip_c, const T4 clip_d) {
275275// Create a SDL rect
276276INLINE SDL_Rect MakeRect (int x, int y, int w, int h)
277277{
278- SDL_Rect r = {x, y, w, h};
278+ SDL_Rect r = {(Sint16) x, (Sint16) y, (Uint16) w, (Uint16) h};
279279 return r;
280280}
281281
@@ -408,8 +408,8 @@ INLINE void DrawImageAdv(SDL_Surface * bmpDest, const SmartPointer<SDL_Surface>
408408// ////////////
409409// Draw the image with a huge amount of options
410410INLINE void DrawImageAdv (SDL_Surface * bmpDest, SDL_Surface * bmpSrc, int sx, int sy, int dx, int dy, int w, int h) {
411- SDL_Rect r1 = { dx, dy, 0 , 0 };
412- SDL_Rect r2 = { sx, sy, w, h };
411+ SDL_Rect r1 = { (Sint16) dx, (Sint16) dy, 0 , 0 };
412+ SDL_Rect r2 = { (Sint16) sx, (Sint16) sy, (Uint16) w, (Uint16) h };
413413 DrawImageAdv ( bmpDest, bmpSrc, r1, r2);
414414}
415415INLINE void DrawImageAdv (SDL_Surface * bmpDest, const SmartPointer<SDL_Surface> & bmpSrc, int sx, int sy, int dx, int dy, int w, int h) {
@@ -433,7 +433,7 @@ INLINE void DrawImage(SDL_Surface * bmpDest, SDL_Surface * bmpSrc, SDL_Rect& rDe
433433 errors << " DrawImage: bmpSrc == NULL" << endl;
434434 return ;
435435 }
436- SDL_Rect rSource = { 0 , 0 , bmpSrc->w , bmpSrc->h };
436+ SDL_Rect rSource = { 0 , 0 , (Uint16) bmpSrc->w , (Uint16) bmpSrc->h };
437437 DrawImageAdv (bmpDest, bmpSrc, rDest, rSource);
438438}
439439INLINE void DrawImage (SDL_Surface * bmpDest, const SmartPointer<SDL_Surface> & bmpSrc, SDL_Rect& rDest) {
@@ -443,7 +443,7 @@ INLINE void DrawImage(SDL_Surface * bmpDest, const SmartPointer<SDL_Surface> & b
443443// /////////////
444444// Simply draw the image
445445INLINE void DrawImage (SDL_Surface * bmpDest, SDL_Surface * bmpSrc, int x, int y) {
446- SDL_Rect r = { x, y, 0 , 0 };
446+ SDL_Rect r = { (Sint16) x, (Sint16) y, 0 , 0 };
447447 DrawImage ( bmpDest, bmpSrc, r);
448448}
449449INLINE void DrawImage (SDL_Surface * bmpDest, const SmartPointer<SDL_Surface> & bmpSrc, int x, int y) {
0 commit comments