mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user