mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-25 20:48:29 +00:00
Cleaned up various type conversion issues
This makes sure SDL_PixelFormatEnum flows through the internal code correctly, as well as fixing a number of other minor issues.
This commit is contained in:
@@ -278,7 +278,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin
|
||||
}
|
||||
|
||||
if (blend != SDL_BLENDMODE_NONE) {
|
||||
int format = dst->format->format;
|
||||
SDL_PixelFormatEnum format = dst->format->format;
|
||||
|
||||
/* need an alpha format */
|
||||
if (!dst->format->Amask) {
|
||||
@@ -300,7 +300,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin
|
||||
SDL_SetSurfaceBlendMode(tmp, blend);
|
||||
|
||||
dstbpp = tmp->format->bytes_per_pixel;
|
||||
dst_ptr = tmp->pixels;
|
||||
dst_ptr = (Uint8 *)tmp->pixels;
|
||||
dst_pitch = tmp->pitch;
|
||||
|
||||
} else {
|
||||
@@ -465,7 +465,7 @@ int SDL_SW_BlitTriangle(
|
||||
Uint8 *dst_ptr;
|
||||
int dst_pitch;
|
||||
|
||||
int *src_ptr;
|
||||
const int *src_ptr;
|
||||
int src_pitch;
|
||||
|
||||
Sint64 area, tmp64;
|
||||
@@ -583,7 +583,7 @@ int SDL_SW_BlitTriangle(
|
||||
dst_pitch = dst->pitch;
|
||||
|
||||
/* Set source pointer */
|
||||
src_ptr = src->pixels;
|
||||
src_ptr = (const int *)src->pixels;
|
||||
src_pitch = src->pitch;
|
||||
|
||||
is_clockwise = area > 0;
|
||||
|
Reference in New Issue
Block a user