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

@@ -31,7 +31,7 @@ static void SDL_DrawLine1(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint
{
if (y1 == y2) {
int length;
int pitch = (dst->pitch / dst->format->BytesPerPixel);
int pitch = (dst->pitch / dst->format->bytes_per_pixel);
Uint8 *pixel;
if (x1 <= x2) {
pixel = (Uint8 *)dst->pixels + y1 * pitch + x1;
@@ -119,9 +119,9 @@ typedef void (*DrawLineFunc)(SDL_Surface *dst,
static DrawLineFunc SDL_CalculateDrawLineFunc(const SDL_PixelFormat *fmt)
{
switch (fmt->BytesPerPixel) {
switch (fmt->bytes_per_pixel) {
case 1:
if (fmt->BitsPerPixel < 8) {
if (fmt->bits_per_pixel < 8) {
break;
}
return SDL_DrawLine1;