working on class sections
This commit is contained in:
@@ -109,4 +109,16 @@ bool checkCollision(SDL_Rect &a, SDL_Rect &b)
|
||||
|
||||
//If none of the sides from A are outside B
|
||||
return true;
|
||||
}
|
||||
|
||||
// Carga un archivo de imagen en una textura
|
||||
bool loadTextureFromFile(LTexture *texture, std::string path, SDL_Renderer *renderer)
|
||||
{
|
||||
bool success = true;
|
||||
if (!texture->loadFromFile(path, renderer))
|
||||
{
|
||||
printf("Failed to load %s texture!\n", path.c_str());
|
||||
success = false;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
Reference in New Issue
Block a user