working on class sections

This commit is contained in:
2021-04-17 23:46:14 +02:00
parent 2330820a15
commit e9ff516b1d
18 changed files with 329 additions and 6375 deletions

View File

@@ -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;
}