Completado el logo y la intro
This commit is contained in:
@@ -26,7 +26,7 @@ Prog::Prog(std::string executablePath)
|
||||
}
|
||||
else
|
||||
{
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.name = SECTION_PROG_LOGO;
|
||||
}
|
||||
input = new Input(asset->get("gamecontrollerdb.txt"));
|
||||
screen = new Screen(window, renderer, options);
|
||||
@@ -182,6 +182,13 @@ bool Prog::setFileList()
|
||||
asset->add("/data/actors/enemies/flying_eye_horn.png", bitmap);
|
||||
asset->add("/data/actors/enemies/flying_eye_horn.ani", data);
|
||||
|
||||
// Ficheros del logo
|
||||
asset->add("/data/logo/logo.png", bitmap);
|
||||
|
||||
// Ficheros de la intro
|
||||
asset->add("/data/intro/intro.png", bitmap);
|
||||
asset->add("/data/intro/intro.ani", data);
|
||||
|
||||
return asset->check();
|
||||
}
|
||||
|
||||
@@ -197,6 +204,21 @@ void Prog::setSection(section_t section)
|
||||
this->section = section;
|
||||
}
|
||||
|
||||
void Prog::runLogo()
|
||||
{
|
||||
logo = new Logo(renderer, screen, asset);
|
||||
setSection(logo->run());
|
||||
delete logo;
|
||||
}
|
||||
|
||||
// Ejecuta la seccion de juego de la introducción
|
||||
void Prog::runIntro()
|
||||
{
|
||||
intro = new Intro(renderer, screen, asset);
|
||||
setSection(intro->run());
|
||||
delete intro;
|
||||
}
|
||||
|
||||
void Prog::runGame()
|
||||
{
|
||||
game = new Game(renderer, asset, screen, input);
|
||||
@@ -212,10 +234,10 @@ void Prog::run()
|
||||
switch (getSection())
|
||||
{
|
||||
case SECTION_PROG_LOGO:
|
||||
// runLogo();
|
||||
runLogo();
|
||||
break;
|
||||
case SECTION_PROG_INTRO:
|
||||
// runIntro();
|
||||
runIntro();
|
||||
break;
|
||||
case SECTION_PROG_TITLE:
|
||||
// runTitle();
|
||||
|
||||
Reference in New Issue
Block a user