Limpieza de código. Modificada la fuente nokiabig2. Puestas ayudas para los dos jugadores. Cambiado el tamaño del mensaje de juego completado
This commit is contained in:
@@ -17,10 +17,7 @@ bool checkCollision(circle_t &a, circle_t &b)
|
||||
|
||||
// Si la distancia entre el centro de los circulos es inferior a la suma de sus radios
|
||||
if (distanceSquared(a.x, a.y, b.x, b.y) < (totalRadiusSquared))
|
||||
{
|
||||
// Los circulos han colisionado
|
||||
return true;
|
||||
}
|
||||
return true; // Los circulos han colisionado
|
||||
|
||||
// En caso contrario
|
||||
return false;
|
||||
@@ -114,11 +111,11 @@ bool checkCollision(SDL_Rect &a, SDL_Rect &b)
|
||||
// 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;
|
||||
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