treballant en la intro

This commit is contained in:
2025-07-14 19:43:07 +02:00
parent bfd3943bba
commit 5cb67b41d1
6 changed files with 24 additions and 9 deletions

View File

@@ -272,6 +272,10 @@ void Intro::render()
case IntroState::SCENES:
{
renderSprites();
static const float HEIGHT = Resource::get()->getText("04b_25_metal")->getCharacterSize();
static SDL_FRect rect = {0.0f, param.game.height - param.intro.text_distance_from_bottom - HEIGHT, param.game.width, HEIGHT * 3};
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), param.intro.shadow_color.r, param.intro.shadow_color.g, param.intro.shadow_color.b, param.intro.shadow_color.a);
SDL_RenderFillRect(Screen::get()->getRenderer(), &rect);
renderTexts();
break;
}
@@ -432,8 +436,8 @@ void Intro::initTexts()
for (int i = 0; i < TOTAL_TEXTS; ++i)
{
auto w = std::make_unique<Writer>(Resource::get()->getText("04b_25_metal"));
w->setPosX(BLOCK * 0);
w->setPosY(param.game.height - (BLOCK * 6));
w->setPosX(0);
w->setPosY(param.game.height - param.intro.text_distance_from_bottom);
w->setKerning(-2);
w->setEnabled(false);
w->setFinishedCounter(180);