Arreglats els endings

This commit is contained in:
2025-03-05 21:57:10 +01:00
parent 241732752a
commit 5cc163dd14
3 changed files with 9 additions and 7 deletions

View File

@@ -84,7 +84,7 @@ void Ending::render()
Screen::get()->start();
// Limpia la pantalla
Screen::get()->clearSurface(stringToColor("yellow"));
Screen::get()->clearSurface(stringToColor("black"));
// Dibuja las imagenes de la escena
sprite_pics_.at(current_scene_).image_sprite->render();
@@ -167,14 +167,15 @@ void Ending::iniTexts()
const int WIDTH = text->lenght(txt.caption, 1) + 2 + 2;
const int HEIGHT = text->getCharacterSize() + 2 + 2;
auto color = stringToColor("black");
auto text_color = stringToColor("white");
auto shadow_color = stringToColor("black");
EndingSurface st;
// Crea la textura
st.image_surface = std::make_shared<Surface>(WIDTH, HEIGHT);
Screen::get()->setRendererSurface(st.image_surface);
text->writeDX(TEXT_STROKE, 2, 2, txt.caption, 1, color, 2, color);
text->writeDX(TEXT_STROKE, 2, 2, txt.caption, 1, text_color, 2, shadow_color);
// Crea el sprite
st.image_sprite = std::make_shared<SSprite>(st.image_surface, 0, 0, st.image_surface->getWidth(), st.image_surface->getHeight());
@@ -189,7 +190,7 @@ void Ending::iniTexts()
// Crea una malla de 8 pixels de alto
auto surface = Screen::get()->getRendererSurface();
color = stringToColor("black");
auto color = stringToColor("black");
for (int i = 0; i < WIDTH; i += 2)
{
surface->putPixel(i, 0, color);