Arreglados dos fallos del menu
This commit is contained in:
@@ -12,6 +12,8 @@ Director::Director(std::string path)
|
||||
section.name = PROG_SECTION_GAME;
|
||||
section.subsection = GAME_SECTION_PLAY_1P;
|
||||
|
||||
section.name = PROG_SECTION_INTRO;
|
||||
|
||||
// Crea el objeto que controla los ficheros de recursos
|
||||
asset = new Asset(path.substr(0, path.find_last_of("\\/")) + "/../");
|
||||
|
||||
@@ -100,7 +102,8 @@ bool Director::initSDL()
|
||||
bool success = true;
|
||||
|
||||
// Inicializa SDL
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
|
||||
// if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
|
||||
{
|
||||
printf("SDL could not initialize!\nSDL Error: %s\n", SDL_GetError());
|
||||
success = false;
|
||||
@@ -127,9 +130,13 @@ bool Director::initSDL()
|
||||
{
|
||||
// Crea un renderizador para la ventana. El vsync se activa en funcion de las opciones
|
||||
if (options->vSync)
|
||||
{
|
||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
|
||||
}
|
||||
|
||||
if (renderer == nullptr)
|
||||
{
|
||||
@@ -208,7 +215,7 @@ bool Director::setFileList()
|
||||
|
||||
asset->add("data/gfx/intro.png", t_bitmap);
|
||||
asset->add("data/gfx/logo.png", t_bitmap);
|
||||
|
||||
|
||||
asset->add("data/gfx/item_points1_disk.png", t_bitmap);
|
||||
asset->add("data/gfx/item_points1_disk.ani", t_data);
|
||||
asset->add("data/gfx/item_points2_gavina.png", t_bitmap);
|
||||
|
||||
Reference in New Issue
Block a user