This commit is contained in:
2024-10-10 20:59:39 +02:00
parent d6c3c89872
commit 117b80bdfc
18 changed files with 197 additions and 197 deletions

View File

@@ -36,11 +36,11 @@ Title::Title(JA_Music_t *music)
text2 = std::make_unique<Text>(asset->get("8bithud.png"), asset->get("8bithud.txt"), renderer);
miniLogoTexture = std::make_shared<Texture>(renderer, asset->get("logo_jailgames_mini.png"));
miniLogoSprite = std::make_unique<Sprite>(param.game.game_area.centerX - miniLogoTexture->getWidth() / 2, 0, miniLogoTexture->getWidth(), miniLogoTexture->getHeight(), miniLogoTexture);
miniLogoSprite = std::make_unique<Sprite>(param.game.game_area.center_x - miniLogoTexture->getWidth() / 2, 0, miniLogoTexture->getWidth(), miniLogoTexture->getHeight(), miniLogoTexture);
tiledbg = std::make_unique<Tiledbg>(asset->get("title_bg_tile.png"), (SDL_Rect){0, 0, param.game.width, param.game.height}, TILED_MODE_RANDOM);
gameLogo = std::make_unique<GameLogo>(param.game.game_area.centerX, param.title.titleCCPosition);
gameLogo = std::make_unique<GameLogo>(param.game.game_area.center_x, param.title.title_c_c_position);
gameLogo->enable();
defineButtons = std::make_unique<DefineButtons>(std::move(text2));
@@ -59,9 +59,9 @@ void Title::init()
postFade = 0;
ticks = 0;
ticksSpeed = 15;
fade->setColor(fadeColor.r, fadeColor.g, fadeColor.b);
fade->setColor(fade_color.r, fade_color.g, fade_color.b);
fade->setType(FadeType::RANDOM_SQUARE);
fade->setPost(param.fade.postDuration);
fade->setPost(param.fade.post_duration);
demo = true;
numControllers = input->getNumControllers();
}
@@ -122,7 +122,7 @@ void Title::update()
// Actualiza el mosaico de fondo
tiledbg->update();
if (counter == param.title.titleDuration)
if (counter == param.title.title_duration)
{
fade->activate();
postFade = -1;
@@ -138,7 +138,7 @@ void Title::render()
screen->start();
// Limpia la pantalla
screen->clean(bgColor);
screen->clean(bg_color);
// Dibuja el mosacico de fondo
tiledbg->render();
@@ -153,7 +153,7 @@ void Title::render()
// 'PRESS TO PLAY'
if (counter % 50 > 14 && !defineButtons->isEnabled())
{
text1->writeDX(TXT_CENTER | TXT_SHADOW, param.game.game_area.centerX, param.title.pressStartPosition, lang::getText(23), 1, noColor, 1, shadow);
text1->writeDX(TXT_CENTER | TXT_SHADOW, param.game.game_area.center_x, param.title.press_start_position, lang::getText(23), 1, no_color, 1, shadow);
}
// Mini logo
@@ -163,7 +163,7 @@ void Title::render()
miniLogoSprite->render();
// Texto con el copyright
text1->writeDX(TXT_CENTER | TXT_SHADOW, param.game.game_area.centerX, pos2, TEXT_COPYRIGHT, 1, noColor, 1, shadow);
text1->writeDX(TXT_CENTER | TXT_SHADOW, param.game.game_area.center_x, pos2, TEXT_COPYRIGHT, 1, no_color, 1, shadow);
}
// Define Buttons
@@ -242,7 +242,7 @@ void Title::checkInput()
if (section::options == section::OPTIONS_TITLE_2 || ALLOW_TITLE_ANIMATION_SKIP)
{
fade->activate();
postFade = options.controller[0].playerId;
postFade = options.controller[0].player_id;
}
}
@@ -272,7 +272,7 @@ void Title::checkInput()
if (section::options == section::OPTIONS_TITLE_2 || ALLOW_TITLE_ANIMATION_SKIP)
{
fade->activate();
postFade = options.controller[i].playerId;
postFade = options.controller[i].player_id;
return;
}
}
@@ -338,7 +338,7 @@ void Title::swapControllers()
// Obtiene para cada jugador el índice del mando correspondiente
for (int i = 0; i < MAX_CONTROLLERS; ++i)
{
playerControllerIndex[options.controller[i].playerId - 1] = i;
playerControllerIndex[options.controller[i].player_id - 1] = i;
}
// Genera el texto correspondiente