Borradas clases que no se utilizaban

This commit is contained in:
2022-08-29 18:29:39 +02:00
parent 9a20d5fc1b
commit 47c57a9f44
20 changed files with 70 additions and 666 deletions

View File

@@ -375,14 +375,12 @@ void Room::fillMapTexture()
// Los tilesets son de 20x20 tiles. El primer tile es el 1. Cuentan hacia la derecha y hacia abajo
// printf("Filling map\n");
SDL_Rect clip = {0, 0, 8, 8};
for (int y = 0; y < 16; y++)
for (int x = 0; x < 32; x++)
{
clip.x = ((tilemap[(y * 32) + x] - 1) % 20) * 8;
clip.y = ((tilemap[(y * 32) + x] - 1) / 20) * 8;
// printf("tilemap [%i] = %i | x = %i | y = %i\n", ((y * 32) + x), tilemap[(y * 32) + x], clip.x, clip.y);
texture->render(renderer, x * 8, y * 8, &clip);
}
@@ -390,7 +388,7 @@ void Room::fillMapTexture()
}
// Dibuja el mapa en pantalla
void Room::drawMap()
void Room::renderMap()
{
SDL_Rect rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT};
@@ -399,20 +397,20 @@ void Room::drawMap()
}
// Dibuja los enemigos en pantalla
void Room::drawEnemies()
void Room::renderEnemies()
{
for (auto enemy : enemies)
{
enemy->draw();
enemy->render();
}
}
// Dibuja los objetos en pantalla
void Room::drawItems()
void Room::renderItems()
{
for (auto item : items)
{
item->draw();
item->render();
}
}