Limpieza y organización de código

This commit is contained in:
2022-10-19 10:34:33 +02:00
parent 7288792940
commit d5dfc952c2
13 changed files with 19 additions and 140 deletions

View File

@@ -38,12 +38,6 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options, i
anchor.middle = gameCanvasHeight / 2;
}
// Destructor
Screen::~Screen()
{
renderer = nullptr;
}
// Limpia la pantalla
void Screen::clean(color_t color)
{
@@ -293,30 +287,12 @@ void Screen::iniSpectrumFade()
spectrumColor.clear();
color_t c;
c = stringToColor("black");
spectrumColor.push_back(c);
c = stringToColor("blue");
spectrumColor.push_back(c);
c = stringToColor("red");
spectrumColor.push_back(c);
c = stringToColor("magenta");
spectrumColor.push_back(c);
c = stringToColor("green");
spectrumColor.push_back(c);
c = stringToColor("cyan");
spectrumColor.push_back(c);
c = stringToColor("yellow");
spectrumColor.push_back(c);
c = stringToColor("bright_white");
spectrumColor.push_back(c);
// Inicializa el vector de colores
const std::vector<std::string> vColors = {"black", "blue", "red", "magenta", "green", "cyan", "yellow", "bright_white"};
for (auto v : vColors)
{
spectrumColor.push_back(stringToColor(v));
}
}
// Actualiza el spectrum fade