Continuemtreballant enels credits
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||
#include <SDL2/SDL_stdinc.h> // Para Uint8, Uint16, Uint32
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "utils.h" // Para Circle
|
||||
class Texture; // lines 10-10
|
||||
class Texture; // lines 9-9
|
||||
|
||||
// Cantidad de elementos del vector con los valores de la deformación del globo al rebotar
|
||||
constexpr int MAX_BOUNCE = 10;
|
||||
|
||||
@@ -119,6 +119,17 @@ void BalloonManager::deployBalloonFormation(int stage)
|
||||
}
|
||||
}
|
||||
|
||||
void BalloonManager::deployBalloonFormation(int pool, int set_number)
|
||||
{
|
||||
const auto set = balloon_formations_->getSet(pool, set_number);
|
||||
const auto numEnemies = set.number_of_balloons;
|
||||
for (int i = 0; i < numEnemies; ++i)
|
||||
{
|
||||
auto p = set.init[i];
|
||||
createBalloon(p.x, p.y, p.type, p.size, p.vel_x, balloon_speed_, p.creation_counter);
|
||||
}
|
||||
}
|
||||
|
||||
// Vacia del vector de globos los globos que ya no sirven
|
||||
void BalloonManager::freeBalloons()
|
||||
{
|
||||
@@ -339,13 +350,7 @@ void BalloonManager::reLoad()
|
||||
// Crea dos globos gordos
|
||||
void BalloonManager::createTwoBigBalloons()
|
||||
{
|
||||
const auto set = balloon_formations_->getSet(0, 1);
|
||||
const auto numEnemies = set.number_of_balloons;
|
||||
for (int i = 0; i < numEnemies; ++i)
|
||||
{
|
||||
auto p = set.init[i];
|
||||
createBalloon(p.x, p.y, p.type, p.size, p.vel_x, balloon_speed_, p.creation_counter);
|
||||
}
|
||||
deployBalloonFormation(0, 1);
|
||||
}
|
||||
|
||||
// Obtiene el nivel de ameza actual generado por los globos
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include "balloon.h" // Para BALLOON_SPEED, Balloon
|
||||
#include "balloon_formations.h" // Para BalloonFormations
|
||||
#include "explosions.h" // Para Explosions
|
||||
#include "param.h"
|
||||
class Texture;
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
#include "utils.h" // Para Zone
|
||||
class Texture; // lines 10-10
|
||||
|
||||
using Balloons = std::vector<std::shared_ptr<Balloon>>;
|
||||
|
||||
@@ -53,6 +55,7 @@ public:
|
||||
|
||||
// Crea una formación de enemigos
|
||||
void deployBalloonFormation(int stage);
|
||||
void deployBalloonFormation(int pool, int set);
|
||||
|
||||
// Actualiza la variable enemyDeployCounter
|
||||
void updateBalloonDeployCounter();
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
#include "credits.h"
|
||||
#include "section.h" // Para Name, name, Options, options
|
||||
#include <SDL2/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND
|
||||
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event, SDL_QUIT
|
||||
#include <SDL2/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
|
||||
#include <string> // Para basic_string, string
|
||||
#include <vector> // Para vector
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "jail_audio.h" // Para JA_StopMusic
|
||||
#include "jail_audio.h" // Para JA_PlayMusic, JA_StopMusic
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "param.h"
|
||||
#include "resource.h"
|
||||
#include "text.h"
|
||||
#include "section.h" // Para Name, name, Options, options
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_SHADOW
|
||||
#include "tiled_bg.h" // Para TiledBG, TiledBGMode
|
||||
#include "utils.h" // Para Color, no_color, shdw_txt_color, Zone
|
||||
|
||||
// Textos
|
||||
constexpr const char TEXT_COPYRIGHT[] = "@2020,2024 JailDesigner";
|
||||
|
||||
// Constructor
|
||||
Credits::Credits()
|
||||
: balloon_manager_(std::make_unique<BalloonManager>()),
|
||||
text_texture_(SDL_CreateTexture(Screen::get()->getRenderer(), SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, param.game.width, param.game.height)),
|
||||
tiled_bg_(std::make_unique<TiledBG>((SDL_Rect){0, 0, param.game.width, param.game.height}, TiledBGMode::DIAGONAL))
|
||||
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::DIAGONAL))
|
||||
{
|
||||
section::name = section::Name::CREDITS;
|
||||
balloon_manager_->setPlayArea(param.game.game_area.rect);
|
||||
balloon_manager_->createTwoBigBalloons();
|
||||
balloon_manager_->deployBalloonFormation(4,2);
|
||||
balloon_manager_->deployBalloonFormation(4,5);
|
||||
balloon_manager_->createPowerBall();
|
||||
SDL_SetTextureBlendMode(text_texture_, SDL_BLENDMODE_BLEND);
|
||||
fillTextTexture();
|
||||
JA_PlayMusic(Resource::get()->getMusic("credits.ogg"));
|
||||
@@ -51,7 +66,9 @@ void Credits::update()
|
||||
ticks_ = SDL_GetTicks();
|
||||
tiled_bg_->update();
|
||||
balloon_manager_->update();
|
||||
updateRects();
|
||||
Screen::get()->update();
|
||||
++counter_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +83,8 @@ void Credits::render()
|
||||
|
||||
tiled_bg_->render();
|
||||
balloon_manager_->render();
|
||||
SDL_RenderCopy(Screen::get()->getRenderer(), text_texture_, nullptr, nullptr);
|
||||
SDL_RenderCopy(Screen::get()->getRenderer(), text_texture_, &credits_rect_src_, &credits_rect_dst_);
|
||||
SDL_RenderCopy(Screen::get()->getRenderer(), text_texture_, &mini_logo_rect_src_, &mini_logo_rect_dst_);
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
Screen::get()->blit();
|
||||
@@ -129,42 +147,77 @@ void Credits::fillTextTexture()
|
||||
const int space_post_title = 3 + text->getCharacterSize();
|
||||
const int space_pre_title = text->getCharacterSize() * 3;
|
||||
const int texts_height = 1 * text->getCharacterSize() + 7 * space_post_title + 3 * space_pre_title;
|
||||
credits_rect_dst_.h = credits_rect_src_.h = texts_height;
|
||||
|
||||
int y = (param.game.height - texts_height) / 2;
|
||||
y = 0;
|
||||
text->setPalette(1);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(0), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(0), 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
text->setPalette(0);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(4), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(4), 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
y += space_pre_title;
|
||||
text->setPalette(1);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(1), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(1), 1, no_color, 1, shdw_txt_color);
|
||||
text->setPalette(0);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(4), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(4), 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
y += space_pre_title;
|
||||
text->setPalette(1);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(2), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(2), 1, no_color, 1, shdw_txt_color);
|
||||
text->setPalette(0);
|
||||
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(5), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(5), 1, no_color, 1, shdw_txt_color);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(6), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(6), 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
y += space_pre_title;
|
||||
text->setPalette(1);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(3), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(3), 1, no_color, 1, shdw_txt_color);
|
||||
text->setPalette(0);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(7), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(7), 1, no_color, 1, shdw_txt_color);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(8), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(8), 1, no_color, 1, shdw_txt_color);
|
||||
y += space_post_title;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.width / 2, y, texts.at(9), 1, no_color, 1, shdw_txt_color);
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, texts.at(9), 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
// Mini logo
|
||||
y += space_pre_title;
|
||||
mini_logo_rect_src_.y = y;
|
||||
auto mini_logo_sprite = std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"));
|
||||
mini_logo_sprite->setPosition(1 + param.game.game_area.center_x - mini_logo_sprite->getWidth() / 2, 1 + y);
|
||||
Resource::get()->getTexture("logo_jailgames_mini.png")->setColor(shdw_txt_color.r, shdw_txt_color.g, shdw_txt_color.b);
|
||||
mini_logo_sprite->render();
|
||||
|
||||
mini_logo_sprite->setPosition(param.game.game_area.center_x - mini_logo_sprite->getWidth() / 2, y);
|
||||
Resource::get()->getTexture("logo_jailgames_mini.png")->setColor(255, 255, 255);
|
||||
mini_logo_sprite->render();
|
||||
|
||||
// Texto con el copyright
|
||||
y += mini_logo_sprite->getHeight() + 3;
|
||||
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXT_COPYRIGHT, 1, no_color, 1, shdw_txt_color);
|
||||
|
||||
mini_logo_rect_dst_.h = mini_logo_rect_src_.h = mini_logo_sprite->getHeight() + 3 + text->getCharacterSize();
|
||||
|
||||
SDL_SetRenderTarget(Screen::get()->getRenderer(), nullptr);
|
||||
|
||||
credits_rect_dst_.y = param.game.game_area.rect.h;
|
||||
mini_logo_rect_dst_.y = credits_rect_dst_.y + credits_rect_dst_.h + 30;
|
||||
mini_logo_final_pos_ = param.game.game_area.center_y - mini_logo_rect_src_.h / 2;
|
||||
}
|
||||
|
||||
// Actualiza el destino de los rectangulos de las texturas
|
||||
void Credits::updateRects()
|
||||
{
|
||||
if (counter_ % 10 == 0)
|
||||
{
|
||||
--credits_rect_dst_.y;
|
||||
--mini_logo_rect_dst_.y;
|
||||
}
|
||||
mini_logo_rect_dst_.y = std::max(mini_logo_rect_dst_.y, mini_logo_final_pos_);
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
#pragma once
|
||||
#include "SDL2/SDL.h"
|
||||
#include <memory>
|
||||
#include "balloon_manager.h"
|
||||
#include "texture.h"
|
||||
#include "tiled_bg.h"
|
||||
|
||||
#include <SDL2/SDL_render.h> // Para SDL_Texture
|
||||
#include <SDL2/SDL_stdinc.h> // Para Uint32
|
||||
#include <memory> // Para unique_ptr
|
||||
#include "param.h"
|
||||
class BalloonManager;
|
||||
class TiledBG;
|
||||
|
||||
class Credits
|
||||
{
|
||||
@@ -15,6 +17,12 @@ private:
|
||||
|
||||
// Variables
|
||||
Uint32 ticks_ = 0; // Contador de ticks para ajustar la velocidad del programa
|
||||
Uint32 counter_ = 0; // Contador para la lógica de la clase
|
||||
SDL_Rect credits_rect_src_ = param.game.game_area.rect; // Rectangulo con el texto de los créditos (origen)
|
||||
SDL_Rect credits_rect_dst_ = param.game.game_area.rect; // Rectangulo con el texto de los créditos (destino)
|
||||
SDL_Rect mini_logo_rect_src_ = param.game.game_area.rect; // Rectangulo con el mini logo de JailGames y el texto de copyright (origen)
|
||||
SDL_Rect mini_logo_rect_dst_ = param.game.game_area.rect; // Rectangulo con el mini logo de JailGames y el texto de copyright (destino)
|
||||
int mini_logo_final_pos_ = 0;
|
||||
|
||||
// Actualiza las variables
|
||||
void update();
|
||||
@@ -31,6 +39,9 @@ private:
|
||||
// Crea la textura con el texto
|
||||
void fillTextTexture();
|
||||
|
||||
// Actualiza el destino de los rectangulos de las texturas
|
||||
void updateRects();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Credits();
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "balloon.h" // Para Balloon, BALLOON_SPEED
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "bullet.h" // Para Bullet, BulletType, BulletMoveStatus
|
||||
#include "enter_name.h" // Para NAME_LENGHT
|
||||
#include "fade.h" // Para Fade, FadeType
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para InputType, Input, INPUT_DO_NOT_ALL...
|
||||
@@ -30,9 +31,8 @@
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.h" // Para Name, name, Options, options
|
||||
#include "smart_sprite.h" // Para SmartSprite
|
||||
#include "stage.h" // Para get, number, Stage, power
|
||||
#include "stage.h" // Para number, get, Stage, power, total_p...
|
||||
#include "text.h" // Para Text
|
||||
#include "dbgtxt.h" // Para dbg_print
|
||||
#include "texture.h" // Para Texture
|
||||
struct JA_Sound_t; // lines 37-37
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Instructions::Instructions()
|
||||
texture_(SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, param.game.width, param.game.height)),
|
||||
backbuffer_(SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, param.game.width, param.game.height)),
|
||||
text_(Resource::get()->getText("smb2")),
|
||||
tiled_bg_(std::make_unique<TiledBG>((SDL_Rect){0, 0, param.game.width, param.game.height}, TiledBGMode::STATIC)),
|
||||
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::STATIC)),
|
||||
fade_(std::make_unique<Fade>())
|
||||
{
|
||||
// Configura las texturas
|
||||
@@ -36,7 +36,7 @@ Instructions::Instructions()
|
||||
|
||||
// Inicializa variables
|
||||
section::name = section::Name::INSTRUCTIONS;
|
||||
view_ = {0, 0, param.game.width, param.game.height};
|
||||
view_ = param.game.game_area.rect;
|
||||
|
||||
// Inicializa objetos
|
||||
fade_->setColor(fade_color.r, fade_color.g, fade_color.b);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "item.h"
|
||||
#include <algorithm> // para std::clamp
|
||||
#include <stdlib.h> // para rand
|
||||
#include "animated_sprite.h" // para SpriteAnimated
|
||||
#include "param.h" // para param
|
||||
class Texture;
|
||||
#include <stdlib.h> // Para rand
|
||||
#include <algorithm> // Para clamp
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
class Texture; // lines 6-6
|
||||
|
||||
Item::Item(ItemType type, float x, float y, SDL_Rect &play_area, std::shared_ptr<Texture> texture, const std::vector<std::string> &animation)
|
||||
: sprite_(std::make_unique<AnimatedSprite>(texture, animation)),
|
||||
@@ -73,8 +73,6 @@ void Item::render()
|
||||
}
|
||||
}
|
||||
|
||||
#include <algorithm> // Necesario para std::clamp
|
||||
|
||||
void Item::move()
|
||||
{
|
||||
floor_collision_ = false;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "path_sprite.h"
|
||||
#include <cmath> // Para abs
|
||||
#include <stdlib.h> // Para abs
|
||||
#include <cstdlib> // Para abs
|
||||
#include <functional> // Para function
|
||||
#include <utility> // Para move
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "player.h"
|
||||
#include <SDL2/SDL_render.h> // Para SDL_FLIP_HORIZONTAL, SDL_FLIP_NONE
|
||||
#include <SDL2/SDL_render.h> // Para SDL_FLIP_HORIZONTAL, SDL_FLIP_NONE, SDL...
|
||||
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
|
||||
#include <stdlib.h> // Para rand
|
||||
#include <algorithm> // Para max, min
|
||||
#include <algorithm> // Para clamp, max, min
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "input.h" // Para InputType
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry
|
||||
#include "options.h" // Para Options, OptionsGame, options
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
#include "scoreboard.h" // Para Scoreboard, ScoreboardMode
|
||||
#include "texture.h" // Para Texture
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "enter_name.h" // Para EnterName
|
||||
#include "utils.h" // Para Circle
|
||||
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||
#include <SDL2/SDL_stdinc.h> // Para Uint32
|
||||
#include <memory> // Para unique_ptr, shared_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include "options.h"
|
||||
|
||||
class Texture; // lines 12-12
|
||||
enum class InputType : int; // lines 13-13
|
||||
enum class ScoreboardMode; // lines 14-14
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "enter_name.h" // Para EnterName
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry
|
||||
#include "options.h" // Para Options, OptionsGame, options
|
||||
#include "utils.h" // Para Circle
|
||||
class Texture; // lines 13-13
|
||||
enum class InputType : int; // lines 14-14
|
||||
enum class ScoreboardMode; // lines 15-15
|
||||
|
||||
// Estados del jugador
|
||||
enum class PlayerState
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "asset.h" // Para Asset
|
||||
#include "dbgtxt.h" // Para dbg_print
|
||||
#include "global_inputs.h" // Para service_pressed_counter
|
||||
#include "jail_shader.h" // Para init, render
|
||||
#include "notifier.h" // Para Notifier
|
||||
#include "on_screen_help.h" // Para OnScreenHelp
|
||||
#include "options.h" // Para Options, OptionsVideo, options, Options...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "stage.h"
|
||||
#include <vector>
|
||||
#include <algorithm> // Para min
|
||||
#include <vector> // Para vector
|
||||
|
||||
namespace Stage
|
||||
{
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
Title::Title()
|
||||
: text_(Resource::get()->getText("smb2")),
|
||||
fade_(std::make_unique<Fade>()),
|
||||
tiled_bg_(std::make_unique<TiledBG>((SDL_Rect){0, 0, param.game.width, param.game.height}, TiledBGMode::RANDOM)),
|
||||
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::RANDOM)),
|
||||
game_logo_(std::make_unique<GameLogo>(param.game.game_area.center_x, param.title.title_c_c_position)),
|
||||
mini_logo_texture_(Resource::get()->getTexture("logo_jailgames_mini.png")),
|
||||
mini_logo_sprite_(std::make_unique<Sprite>(mini_logo_texture_, param.game.game_area.center_x - mini_logo_texture_->getWidth() / 2, 0, mini_logo_texture_->getWidth(), mini_logo_texture_->getHeight())),
|
||||
mini_logo_sprite_(std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"))),
|
||||
define_buttons_(std::make_unique<DefineButtons>()),
|
||||
num_controllers_(Input::get()->getNumControllers())
|
||||
{
|
||||
// Configura objetos
|
||||
game_logo_->enable();
|
||||
mini_logo_sprite_->setX(param.game.game_area.center_x - mini_logo_sprite_->getWidth() / 2);
|
||||
fade_->setColor(fade_color.r, fade_color.g, fade_color.b);
|
||||
fade_->setType(FadeType::RANDOM_SQUARE);
|
||||
fade_->setPost(param.fade.post_duration);
|
||||
|
||||
@@ -44,7 +44,6 @@ private:
|
||||
std::unique_ptr<Fade> fade_; // Objeto para realizar fundidos en pantalla
|
||||
std::unique_ptr<TiledBG> tiled_bg_; // Objeto para dibujar el mosaico animado de fondo
|
||||
std::unique_ptr<GameLogo> game_logo_; // Objeto para dibujar el logo con el título del juego
|
||||
std::shared_ptr<Texture> mini_logo_texture_; // Textura con el logo de JailGames mini
|
||||
std::unique_ptr<Sprite> mini_logo_sprite_; // Sprite con el logo de JailGames mini
|
||||
std::unique_ptr<DefineButtons> define_buttons_; // Objeto para definir los botones del joystic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user