Los items ya brillan a distinto ritmo

This commit is contained in:
2022-08-30 21:44:07 +02:00
parent 38c41193ec
commit 93febf3127
6 changed files with 88 additions and 37 deletions

View File

@@ -182,22 +182,23 @@ void Game::renderDebugInfo()
// Pinta el texto
std::string text;
int line = (16 * 8) + 3;
const int inc = debugText->getCharacterWidth() + 1;
int line = 131;
text = "status: " + std::to_string(player->status);
debugText->write(0, line += 6, text);
debugText->write(0, line += inc, text);
text = "foot: " + std::to_string((int)player->getLeftFoot().y);
debugText->write(0, line += 6, text);
debugText->write(0, line += inc, text);
const int a = (player->lastPosition.y + 16) / 8;
const int b = player->getLeftFoot().y / 8;
text = "tile: " + std::to_string(a) + " - " + std::to_string(b);
debugText->write(0, line += 6, text);
debugText->write(0, line += inc, text);
const bool collision = checkPlayerAndEnemies();
text = "collision: " + std::to_string(collision);
debugText->write(0, line += 6, text);
debugText->write(0, line += inc, text);
}
// Cambia de habitación