Eliminado el procedimiento loadTextureFromFile() de utils.h

This commit is contained in:
2022-09-01 18:59:18 +02:00
parent 4433cc6943
commit 203391da2d
10 changed files with 15 additions and 27 deletions

View File

@@ -50,7 +50,6 @@ bool LTexture::loadFromFile(std::string path, SDL_Renderer *renderer)
SDL_Texture *newTexture = NULL;
// Load image at specified path
//SDL_Surface *loadedSurface = IMG_Load(path.c_str());
SDL_Surface *loadedSurface = SDL_CreateRGBSurfaceWithFormatFrom((void *)data, width, height, depth, pitch, pixel_format);
if (loadedSurface == NULL)
{
@@ -58,9 +57,6 @@ bool LTexture::loadFromFile(std::string path, SDL_Renderer *renderer)
}
else
{
// Color key image
//SDL_SetColorKey(loadedSurface, SDL_TRUE, SDL_MapRGB(loadedSurface->format, COLOR_KEY_R, COLOR_KEY_G, COLOR_KEY_B));
// Create texture from surface pixels
newTexture = SDL_CreateTextureFromSurface(renderer, loadedSurface);
if (newTexture == NULL)