Eliminados todos los std:: del código

This commit is contained in:
2023-09-16 12:44:40 +02:00
parent 71be364141
commit 4a2d27dc59
35 changed files with 539 additions and 504 deletions

View File

@@ -14,7 +14,7 @@ ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Resource *resource, Asset *asset,
// Reserva memoria para los objetos
itemTexture = resource->getTexture("items.png");
const std::string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
const string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
sprite = new AnimatedSprite(renderer, resource->getAnimation(playerANI));
sprite->setCurrentAnimation("walk_menu");
text = new Text(resource->getOffset("smb2.txt"), resource->getTexture("smb2.png"), renderer);
@@ -28,7 +28,7 @@ ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Resource *resource, Asset *asset,
itemsColor = stringToColor(options->palette, "white");
// Inicializa el vector de colores
const std::vector<std::string> vColors = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
const vector<string> vColors = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
for (auto v : vColors)
{
color.push_back(stringToColor(options->palette, v));
@@ -77,14 +77,14 @@ void ScoreBoard::render()
}
// Escribe los textos
const std::string timeTxt = std::to_string((clock.minutes % 100) / 10) + std::to_string(clock.minutes % 10) + clock.separator + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
const std::string itemsTxt = std::to_string(board->items / 100) + std::to_string((board->items % 100) / 10) + std::to_string(board->items % 10);
const string timeTxt = to_string((clock.minutes % 100) / 10) + to_string(clock.minutes % 10) + clock.separator + to_string((clock.seconds % 60) / 10) + to_string(clock.seconds % 10);
const string itemsTxt = to_string(board->items / 100) + to_string((board->items % 100) / 10) + to_string(board->items % 10);
this->text->writeColored(BLOCK, line1, "Items collected ", board->color);
this->text->writeColored(17 * BLOCK, line1, itemsTxt, itemsColor);
this->text->writeColored(20 * BLOCK, line1, " Time ", board->color);
this->text->writeColored(26 * BLOCK, line1, timeTxt, stringToColor(options->palette, "white"));
const std::string roomsTxt = std::to_string(board->rooms / 100) + std::to_string((board->rooms % 100) / 10) + std::to_string(board->rooms % 10);
const string roomsTxt = to_string(board->rooms / 100) + to_string((board->rooms % 100) / 10) + to_string(board->rooms % 10);
this->text->writeColored(22 * BLOCK, line2, "Rooms", stringToColor(options->palette, "white"));
this->text->writeColored(28 * BLOCK, line2, roomsTxt, stringToColor(options->palette, "white"));
}
@@ -131,7 +131,7 @@ void ScoreBoard::reLoadTexture()
void ScoreBoard::reLoadPalette()
{
// Reinicia el vector de colores
const std::vector<std::string> vColors = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
const vector<string> vColors = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
color.clear();
for (auto v : vColors)
{