Updated structure and field names for consistency

Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
This commit is contained in:
Sam Lantinga
2024-02-11 08:03:26 -08:00
parent 6f87973b9c
commit cacac6cc34
74 changed files with 499 additions and 366 deletions

View File

@@ -104,14 +104,14 @@ LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent,
/* Set transparent pixel as the pixel at (0,0) */
if (transparent) {
if (temp->format->palette) {
const Uint8 bpp = temp->format->BitsPerPixel;
const Uint8 bpp = temp->format->bits_per_pixel;
const Uint8 mask = (1 << bpp) - 1;
if (SDL_PIXELORDER(temp->format->format) == SDL_BITMAPORDER_4321)
SDL_SetSurfaceColorKey(temp, SDL_TRUE, (*(Uint8 *)temp->pixels) & mask);
else
SDL_SetSurfaceColorKey(temp, SDL_TRUE, ((*(Uint8 *)temp->pixels) >> (8 - bpp)) & mask);
} else {
switch (temp->format->BitsPerPixel) {
switch (temp->format->bits_per_pixel) {
case 15:
SDL_SetSurfaceColorKey(temp, SDL_TRUE,
(*(Uint16 *)temp->pixels) & 0x00007FFF);