mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +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:
parent
6f87973b9c
commit
cacac6cc34
74 changed files with 499 additions and 366 deletions
|
|
@ -117,14 +117,14 @@ init_color_cursor(const char *file)
|
|||
SDL_Surface *surface = SDL_LoadBMP(file);
|
||||
if (surface) {
|
||||
if (surface->format->palette) {
|
||||
const Uint8 bpp = surface->format->BitsPerPixel;
|
||||
const Uint8 bpp = surface->format->bits_per_pixel;
|
||||
const Uint8 mask = (1 << bpp) - 1;
|
||||
if (SDL_PIXELORDER(surface->format->format) == SDL_BITMAPORDER_4321)
|
||||
SDL_SetSurfaceColorKey(surface, 1, (*(Uint8 *)surface->pixels) & mask);
|
||||
else
|
||||
SDL_SetSurfaceColorKey(surface, 1, ((*(Uint8 *)surface->pixels) >> (8 - bpp)) & mask);
|
||||
} else {
|
||||
switch (surface->format->BitsPerPixel) {
|
||||
switch (surface->format->bits_per_pixel) {
|
||||
case 15:
|
||||
SDL_SetSurfaceColorKey(surface, 1, (*(Uint16 *)surface->pixels) & 0x00007FFF);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue