Shut up some warnings

This commit is contained in:
Clownacy 2019-07-31 04:41:46 +00:00
parent 3973419cef
commit 42765792bc
4 changed files with 6 additions and 6 deletions

View file

@ -106,7 +106,7 @@ unsigned char* Backend_Lock(Backend_Surface *surface, unsigned int *pitch)
void Backend_Unlock(Backend_Surface *surface)
{
(void)surface;
}
void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y, BOOL colour_key)

View file

@ -207,7 +207,7 @@ void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Sur
SDL_Rect source_rect;
RectToSDLRect(rect, &source_rect);
SDL_Rect destination_rect = {x, y, source_rect.w, source_rect.h};
SDL_Rect destination_rect = {(int)x, (int)y, source_rect.w, source_rect.h};
// Blit the surface
SDL_SetSurfaceBlendMode(source_surface->sdl_surface, colour_key ? SDL_BLENDMODE_BLEND : SDL_BLENDMODE_NONE);
@ -234,7 +234,7 @@ void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, lon
SDL_Rect source_rect;
RectToSDLRect(rect, &source_rect);
SDL_Rect destination_rect = {x, y, source_rect.w, source_rect.h};
SDL_Rect destination_rect = {(int)x, (int)y, source_rect.w, source_rect.h};
// Blit the texture
SDL_SetTextureBlendMode(source_surface->texture, colour_key ? SDL_BLENDMODE_BLEND : SDL_BLENDMODE_NONE);
@ -398,7 +398,7 @@ void Backend_DrawGlyph(Backend_Surface *surface, Backend_Glyph *glyph, long x, l
if (glyph == NULL || surface == NULL)
return;
SDL_Rect destination_rect = {x, y, glyph->surface->sdl_surface->w, glyph->surface->sdl_surface->h};
SDL_Rect destination_rect = {(int)x, (int)y, glyph->surface->sdl_surface->w, glyph->surface->sdl_surface->h};
SDL_SetSurfaceColorMod(glyph->surface->sdl_surface, colours[0], colours[1], colours[2]);
SDL_SetSurfaceBlendMode(glyph->surface->sdl_surface, SDL_BLENDMODE_BLEND);

View file

@ -111,7 +111,7 @@ unsigned char* Backend_Lock(Backend_Surface *surface, unsigned int *pitch)
void Backend_Unlock(Backend_Surface *surface)
{
(void)surface;
}
void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y, BOOL colour_key)

View file

@ -17,7 +17,7 @@ BOOL LoadNpcTable(const char *path)
FILE *fp;
long n;
long num;
unsigned long size;
long size;
size = GetFileSizeLong(path);
if (size == -1)