añadidos nuevos ficheros de clases
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user