SDL API renaming: SDL_surface.h

Fixes https://github.com/libsdl-org/SDL/issues/6884
This commit is contained in:
Sam Lantinga
2022-12-27 06:36:39 -08:00
parent 2db699f48e
commit cc0296c934
47 changed files with 416 additions and 362 deletions

View File

@@ -123,7 +123,7 @@ initializeTextures(SDL_Renderer *renderer)
fatalError("could not ship.bmp");
}
/* set blue to transparent on the ship */
SDL_SetColorKey(bmp_surface, 1,
SDL_SetSurfaceColorKey(bmp_surface, 1,
SDL_MapRGB(bmp_surface->format, 0, 0, 255));
/* create ship texture from surface */
@@ -137,7 +137,7 @@ initializeTextures(SDL_Renderer *renderer)
shipData.rect.w = bmp_surface->w;
shipData.rect.h = bmp_surface->h;
SDL_FreeSurface(bmp_surface);
SDL_DestroySurface(bmp_surface);
/* load the space background */
bmp_surface = SDL_LoadBMP("space.bmp");
@@ -149,7 +149,7 @@ initializeTextures(SDL_Renderer *renderer)
if (space == NULL) {
fatalError("could not create space texture");
}
SDL_FreeSurface(bmp_surface);
SDL_DestroySurface(bmp_surface);
}