forked from jaildesigner-jailgames/jaildoctors_dilemma
Añadido brillo a los creditos y cambiada la malla
This commit is contained in:
@@ -22,7 +22,7 @@ Credits::Credits(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
||||
section.subsection = 0;
|
||||
ticks = 0;
|
||||
ticksSpeed = 15;
|
||||
sprite->setRect({21 * 8, 15 * 8, 8, 8});
|
||||
sprite->setRect({194, 174, 8, 8});
|
||||
|
||||
// Cambia el color del borde
|
||||
screen->setBorderColor(stringToColor("black"));
|
||||
@@ -53,7 +53,7 @@ Credits::Credits(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
|
||||
texts.push_back({"LOVE JAILGAMES!}", stringToColor("white")});
|
||||
texts.push_back({"I LOVE JAILGAMES!}", stringToColor("white")});
|
||||
texts.push_back({"", stringToColor("white")});
|
||||
|
||||
// Crea la textura para el texto que se escribe en pantalla
|
||||
@@ -154,8 +154,8 @@ void Credits::fillTexture()
|
||||
SDL_RenderDrawPoint(renderer, i, 4);
|
||||
SDL_RenderDrawPoint(renderer, i, 6);
|
||||
|
||||
SDL_RenderDrawPoint(renderer, i + 1, 1);
|
||||
SDL_RenderDrawPoint(renderer, i + 1, 3);
|
||||
// SDL_RenderDrawPoint(renderer, i + 1, 1);
|
||||
// SDL_RenderDrawPoint(renderer, i + 1, 3);
|
||||
SDL_RenderDrawPoint(renderer, i + 1, 5);
|
||||
SDL_RenderDrawPoint(renderer, i + 1, 7);
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void Credits::updateCounter()
|
||||
}
|
||||
|
||||
// Comprueba si ha terminado la sección
|
||||
if (counter > 1000)
|
||||
if (counter > 1200)
|
||||
{
|
||||
section.name = SECTION_PROG_DEMO;
|
||||
}
|
||||
@@ -212,9 +212,12 @@ void Credits::update()
|
||||
updateCounter();
|
||||
|
||||
// Actualiza el sprite con el brillo
|
||||
if (counter > 770)
|
||||
{
|
||||
sprite->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dibuja en pantalla
|
||||
void Credits::render()
|
||||
@@ -225,7 +228,8 @@ void Credits::render()
|
||||
// Limpia la pantalla
|
||||
screen->clean();
|
||||
|
||||
// Dibuja la textura con el texto en pantalla
|
||||
if (counter < 1150)
|
||||
{ // Dibuja la textura con el texto en pantalla
|
||||
SDL_RenderCopy(renderer, textTexture, nullptr, nullptr);
|
||||
|
||||
// Dibuja la textura que cubre el texto
|
||||
@@ -235,6 +239,7 @@ void Credits::render()
|
||||
|
||||
// Dibuja el sprite con el brillo
|
||||
sprite->render();
|
||||
}
|
||||
|
||||
// text->write(0,0,std::to_string(counter));
|
||||
// text->write(0,8,std::to_string(counterEnabled));
|
||||
|
||||
@@ -9,7 +9,7 @@ Director::Director(std::string path)
|
||||
section.name = SECTION_PROG_LOGO;
|
||||
section.subsection = SUBSECTION_LOGO_TO_INTRO;
|
||||
|
||||
section.name = SECTION_PROG_TITLE;
|
||||
section.name = SECTION_PROG_CREDITS;
|
||||
|
||||
// Crea el objeto que controla los ficheros de recursos
|
||||
asset = new Asset(path.substr(0, path.find_last_of("\\/")));
|
||||
|
||||
Reference in New Issue
Block a user