añadidos nuevos ficheros de clases

This commit is contained in:
2022-08-07 12:29:53 +02:00
parent 04c1df4352
commit 26d4ba7c6a
18 changed files with 1083 additions and 1566 deletions

View File

@@ -51,7 +51,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)
{
@@ -59,9 +58,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)