forked from jaildesigner-jailgames/jaildoctors_dilemma
Singletonejant
Borrat menu.cpp que no estava gastantse...mmm.. desde mai
This commit is contained in:
@@ -18,26 +18,26 @@
|
||||
#include "options.h"
|
||||
|
||||
// Constructor
|
||||
Title::Title(Resource *resource)
|
||||
Title::Title()
|
||||
: screen_(Screen::get()),
|
||||
renderer_(Screen::get()->getRenderer()),
|
||||
resource_(resource),
|
||||
resource_(Resource::get()),
|
||||
input_(Input::get())
|
||||
{
|
||||
// Reserva memoria para los punteros
|
||||
event_handler_ = new SDL_Event();
|
||||
cheevos_ = std::make_unique<Cheevos>(screen_, Asset::get()->get("cheevos.bin"));
|
||||
cheevos_ = std::make_unique<Cheevos>(Asset::get()->get("cheevos.bin"));
|
||||
if (options.palette == p_zxspectrum)
|
||||
{
|
||||
texture_ = resource->getTexture("title_logo.png");
|
||||
texture_ = resource_->getTexture("title_logo.png");
|
||||
}
|
||||
else if (options.palette == p_zxarne)
|
||||
{
|
||||
texture_ = resource->getTexture("title_logo.png");
|
||||
texture_ = resource_->getTexture("title_logo.png");
|
||||
}
|
||||
sprite_ = new Sprite(0, 0, texture_->getWidth(), texture_->getHeight(), texture_, renderer_);
|
||||
text_ = new Text(resource->getOffset("smb2.txt"), resource->getTexture("smb2.png"), renderer_);
|
||||
info_text_ = new Text(resource->getOffset("subatomic.txt"), resource->getTexture("subatomic.png"), renderer_);
|
||||
text_ = new Text(resource_->getOffset("smb2.txt"), resource_->getTexture("smb2.png"), renderer_);
|
||||
info_text_ = new Text(resource_->getOffset("subatomic.txt"), resource_->getTexture("subatomic.png"), renderer_);
|
||||
|
||||
// Crea la textura para los graficos que aparecen en el fondo de la pantalla de titulo
|
||||
bg_texture_ = SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
|
||||
@@ -271,8 +271,7 @@ void Title::update()
|
||||
// Comprueba las entradas
|
||||
checkInput();
|
||||
|
||||
// Actualiza las notificaciones
|
||||
screen_->updateNotifier();
|
||||
screen_->update();
|
||||
|
||||
// Incrementa el contador
|
||||
counter_++;
|
||||
@@ -447,7 +446,7 @@ void Title::fillTexture()
|
||||
void Title::createCheevosTexture()
|
||||
{
|
||||
// Crea la textura con el listado de logros
|
||||
const std::vector<cheevos_t> cheevosList = cheevos_->list();
|
||||
const auto cheevosList = cheevos_->list();
|
||||
const int cheevosTextureWidth = 200;
|
||||
const int cheevosTextureViewHeight = 110;
|
||||
const int cheevosTexturePosY = 73;
|
||||
|
||||
Reference in New Issue
Block a user