Arreglats els endings
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -21,7 +21,7 @@ void initOptions()
|
||||
options = Options();
|
||||
|
||||
#ifdef DEBUG
|
||||
options.section = SectionState(Section::LOGO, Subsection::LOGO_TO_INTRO);
|
||||
options.section = SectionState(Section::ENDING2, Subsection::NONE);
|
||||
options.console = true;
|
||||
#else
|
||||
options.section = SectionState(Section::LOGO, Subsection::LOGO_TO_INTRO);
|
||||
|
||||
@@ -136,7 +136,7 @@ void Text::write(int x, int y, const std::string &text, int kerning, int lenght)
|
||||
auto index = static_cast<int>(text[i]);
|
||||
sprite_->setClip(offset_[index].x, offset_[index].y, box_width_, box_height_);
|
||||
sprite_->setX(x + shift);
|
||||
sprite_->render();
|
||||
sprite_->render(1, 15);
|
||||
shift += offset_[static_cast<int>(text[i])].w + kerning;
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,8 @@ void Text::writeDX(Uint8 flags, int x, int y, const std::string &text, int kerni
|
||||
}
|
||||
else
|
||||
{
|
||||
write(x, y, text, kerning, lenght);
|
||||
writeColored(x, y, text, textColor, kerning, lenght);
|
||||
//write(x, y, text, kerning, lenght);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user