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:
Sam Lantinga
2024-03-07 05:20:20 -08:00
parent f53bdc9531
commit 33eaddc565
85 changed files with 391 additions and 369 deletions

View File

@@ -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;