forked from jaildesigner-jailgames/jaildoctors_dilemma
Arreglos en la estructura i format del codi
This commit is contained in:
@@ -196,7 +196,7 @@ void Title::updateMarquee()
|
||||
// Dibuja la marquesina
|
||||
void Title::renderMarquee()
|
||||
{
|
||||
for (auto l : letters_)
|
||||
for (const auto &l : letters_)
|
||||
{
|
||||
if (l.enabled)
|
||||
{
|
||||
@@ -205,14 +205,6 @@ void Title::renderMarquee()
|
||||
}
|
||||
}
|
||||
|
||||
// Dibuja la linea de información inferior
|
||||
void Title::renderInfo()
|
||||
{
|
||||
const std::string version = "v.1.10";
|
||||
const int x = GAMECANVAS_WIDTH - info_text_->lenght(version) - 1;
|
||||
info_text_->write(x, 1, version);
|
||||
}
|
||||
|
||||
// Actualiza las variables
|
||||
void Title::update()
|
||||
{
|
||||
@@ -319,40 +311,6 @@ void Title::run()
|
||||
}
|
||||
}
|
||||
|
||||
// Recarga las texturas
|
||||
void Title::reLoadTextures()
|
||||
{
|
||||
// Carga la textura adecuada
|
||||
if (options.video.palette == Palette::ZXSPECTRUM)
|
||||
{
|
||||
texture_ = resource_->getTexture("loading_screen_color.png");
|
||||
}
|
||||
else if (options.video.palette == Palette::ZXARNE)
|
||||
{
|
||||
texture_ = resource_->getTexture("loading_screen_color_zxarne.png");
|
||||
}
|
||||
|
||||
texture_->reLoad();
|
||||
}
|
||||
|
||||
// Cambia la paleta
|
||||
void Title::switchPalette()
|
||||
{
|
||||
if (options.video.palette == Palette::ZXSPECTRUM)
|
||||
{
|
||||
options.video.palette = Palette::ZXARNE;
|
||||
sprite_->setTexture(resource_->getTexture("loading_screen_color_zxarne.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
options.video.palette = Palette::ZXSPECTRUM;
|
||||
sprite_->setTexture(resource_->getTexture("loading_screen_color.png"));
|
||||
}
|
||||
|
||||
// Cambia el color del borde
|
||||
screen_->setBorderColor(stringToColor(options.video.palette, "bright_blue"));
|
||||
}
|
||||
|
||||
// Desplaza la lista de logros
|
||||
void Title::moveCheevosList(int direction)
|
||||
{
|
||||
@@ -432,7 +390,7 @@ void Title::createCheevosTexture()
|
||||
constexpr int LINE_X1 = (CHEEVOS_TEXTURE_WIDTH / 7) * 3;
|
||||
constexpr int LINE_X2 = LINE_X1 + ((CHEEVOS_TEXTURE_WIDTH / 7) * 1);
|
||||
|
||||
for (auto cheevo : cheevosList)
|
||||
for (const auto &cheevo : cheevosList)
|
||||
{
|
||||
cheevoColor = cheevo.completed ? CHEEVO_UNLOCKED_COLOR : CHEEVO_LOCKED_COLOR;
|
||||
pos += CHEEVOS_PADDING;
|
||||
|
||||
Reference in New Issue
Block a user