forked from jaildesigner-jailgames/jaildoctors_dilemma
canvi de pc
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
// Constructor
|
||||
Title::Title()
|
||||
: surface_(Resource::get()->getSurface("title_logo.gif")),
|
||||
sprite_(std::make_shared<SSprite>(surface_, 0, 0, surface_->getWidth(), surface_->getHeight())),
|
||||
: title_logo_surface_(Resource::get()->getSurface("title_logo.gif")),
|
||||
title_logo_sprite_(std::make_shared<SSprite>(title_logo_surface_, 0, 0, title_logo_surface_->getWidth(), title_logo_surface_->getHeight())),
|
||||
bg_surface_(std::make_shared<Surface>(Screen::get()->getRenderSurfaceData(), options.game.width, options.game.height))
|
||||
{
|
||||
// Carga la surface con los gráficos de la pantalla de carga
|
||||
@@ -33,6 +33,8 @@ Title::Title()
|
||||
pLoadPal(Asset::get()->get("loading_screen_color.gif").c_str());
|
||||
pSetSource(loading_screen_);
|
||||
|
||||
//title_logo_surface_->setSurfaceDataDest(bg_surface_->getSurfaceData());
|
||||
|
||||
// Inicializa variables
|
||||
state_ = options.section.subsection == Subsection::TITLE_WITH_LOADING_SCREEN ? TitleState::SHOW_LOADING_SCREEN : TitleState::SHOW_MENU;
|
||||
options.section.section = Section::TITLE;
|
||||
@@ -246,7 +248,7 @@ void Title::render()
|
||||
{
|
||||
// Prepara para empezar a dibujar en la textura de juego
|
||||
Screen::get()->start();
|
||||
Screen::get()->clear(stringToColor("black"));
|
||||
Screen::get()->clearSurface(stringToColor("black"));
|
||||
|
||||
if (state_ == TitleState::SHOW_MENU)
|
||||
{
|
||||
@@ -270,7 +272,7 @@ void Title::render()
|
||||
pFlip(Screen::get()->getRenderer());
|
||||
|
||||
// Dibuja el logo del título
|
||||
sprite_->render();
|
||||
title_logo_sprite_->render();
|
||||
}
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
@@ -314,11 +316,10 @@ void Title::fillSurface()
|
||||
Screen::get()->setRenderSurfaceData(bg_surface_);
|
||||
|
||||
// Rellena la textura de color
|
||||
bg_surface_->setColor(255, 0xFF000000);
|
||||
bg_surface_->clear(255);
|
||||
Screen::get()->clearSurface(4);
|
||||
|
||||
// Pinta el gráfico del titulo a partir del sprite
|
||||
sprite_->render();
|
||||
title_logo_sprite_->render();
|
||||
|
||||
// Escribe el texto en la textura
|
||||
auto text = Resource::get()->getText("smb2");
|
||||
@@ -328,6 +329,7 @@ void Title::fillSurface()
|
||||
text->writeDX(TEXT_CENTER | TEXT_COLOR, PLAY_AREA_CENTER_X, 13 * TEXT_SIZE, "2.ACHIEVEMENTS", 1, COLOR);
|
||||
text->writeDX(TEXT_CENTER | TEXT_COLOR, PLAY_AREA_CENTER_X, 15 * TEXT_SIZE, "3.REDEFINE KEYS", 1, COLOR);
|
||||
text->writeDX(TEXT_CENTER | TEXT_COLOR, PLAY_AREA_CENTER_X, 20 * TEXT_SIZE, "ESC.EXIT GAME", 1, COLOR);
|
||||
text->writeColored(PLAY_AREA_CENTER_X, 30 * TEXT_SIZE, "ESC.EXIT GAME", COLOR);
|
||||
|
||||
// Devuelve el puntero del renderizador a su sitio
|
||||
Screen::get()->setRenderSurfaceData(nullptr);
|
||||
@@ -352,7 +354,7 @@ void Title::createCheevosTexture()
|
||||
|
||||
// Rellena la textura con color sólido
|
||||
const Uint8 CHEEVOS_BG_COLOR = stringToColor("black");
|
||||
Screen::get()->clear(CHEEVOS_BG_COLOR);
|
||||
Screen::get()->clearSurface(CHEEVOS_BG_COLOR);
|
||||
|
||||
// Escribe la lista de logros en la textura
|
||||
const std::string CHEEVOS_OWNER = "ACHIEVEMENTS";
|
||||
|
||||
Reference in New Issue
Block a user