Eliminados todos los std:: del código
This commit is contained in:
@@ -34,7 +34,7 @@ Ending2::Ending2(SDL_Renderer *renderer, Screen *screen, Resource *resource, Ass
|
||||
secondCol = GAMECANVAS_THIRD_QUARTER_X - (GAMECANVAS_WIDTH / 16);
|
||||
|
||||
// Inicializa el vector de colores
|
||||
const std::vector<std::string> colorList = {"white", "yellow", "cyan", "green", "magenta", "red", "blue", "black"};
|
||||
const vector<string> colorList = {"white", "yellow", "cyan", "green", "magenta", "red", "blue", "black"};
|
||||
for (auto cl : colorList)
|
||||
{
|
||||
colors.push_back(stringToColor(options->palette, cl));
|
||||
@@ -131,7 +131,7 @@ void Ending2::render()
|
||||
// Dibuja los sprites con el texto del final
|
||||
renderTexts();
|
||||
|
||||
const std::string txt = std::to_string(postCounter);
|
||||
const string txt = to_string(postCounter);
|
||||
// text->write(0, 192 - 8, txt);
|
||||
|
||||
// Dibuja la cuadricula
|
||||
@@ -363,8 +363,8 @@ void Ending2::loadSprites()
|
||||
for (auto sl : spriteList)
|
||||
{
|
||||
sprites.push_back(new AnimatedSprite(renderer, resource->getAnimation(sl + ".ani")));
|
||||
maxSpriteWidth = std::max(sprites.back()->getAnimationClip(0, 0).w, maxSpriteWidth);
|
||||
maxSpriteHeight = std::max(sprites.back()->getAnimationClip(0, 0).h, maxSpriteHeight);
|
||||
maxSpriteWidth = max(sprites.back()->getAnimationClip(0, 0).w, maxSpriteWidth);
|
||||
maxSpriteHeight = max(sprites.back()->getAnimationClip(0, 0).h, maxSpriteHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,8 +488,8 @@ void Ending2::createSpriteTexts()
|
||||
for (int i = 0; i < (int)spriteList.size(); ++i)
|
||||
{
|
||||
// Calcula constantes
|
||||
std::string txt = spriteList[i];
|
||||
std::replace(txt.begin(), txt.end(), '_', ' ');
|
||||
string txt = spriteList[i];
|
||||
replace(txt.begin(), txt.end(), '_', ' ');
|
||||
txt = txt == "player" ? "JAILDOCTOR" : txt; // Reemplaza el texto
|
||||
const int w = text->lenght(txt, 1);
|
||||
const int h = text->getCharacterSize();
|
||||
@@ -520,7 +520,7 @@ void Ending2::createTexts()
|
||||
deleteTexts();
|
||||
|
||||
// Crea los primeros textos
|
||||
std::vector<std::string> list;
|
||||
vector<string> list;
|
||||
list.push_back("STARRING");
|
||||
|
||||
// Crea los sprites de texto a partir de la lista
|
||||
@@ -610,7 +610,7 @@ void Ending2::deleteTexts()
|
||||
void Ending2::updateFinalFade()
|
||||
{
|
||||
// La variable step va de 0 a 40 en el tramo de postCounter que va de 500 a 540. Al dividirlo por 40, va de 0.0f a 1.0f
|
||||
const float step = std::min(std::max(postCounter, 500) - 500, 40) / 40.0f;
|
||||
const float step = min(max(postCounter, 500) - 500, 40) / 40.0f;
|
||||
const int index = (colors.size() - 1) * step;
|
||||
|
||||
for (auto t : texts)
|
||||
|
||||
Reference in New Issue
Block a user