Modificado loadMedia por loadConfig
This commit is contained in:
@@ -241,20 +241,13 @@ bool Director::setFileList()
|
|||||||
return asset->check();
|
return asset->check();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carga los recursos necesarios
|
// Carga el fichero de configuración
|
||||||
bool Director::loadMedia(Uint8 section)
|
bool Director::loadConfig()
|
||||||
{
|
{
|
||||||
// Indicador de éxito en la carga
|
// Indicador de éxito en la carga
|
||||||
bool success = true;
|
bool success = true;
|
||||||
std::string p;
|
const std::string p = asset->get("config-bin").c_str();
|
||||||
|
const std::string filename = p.substr(p.find_last_of("\\/") + 1);
|
||||||
switch (section)
|
|
||||||
{
|
|
||||||
case GAME_SECTION_INIT:
|
|
||||||
{
|
|
||||||
p = asset->get("config-bin").c_str();
|
|
||||||
std::string filename = p.substr(p.find_last_of("\\/") + 1);
|
|
||||||
filename = p.substr(p.find_last_of("\\/") + 1);
|
|
||||||
|
|
||||||
// Abre el fichero con la configuracion de las opciones para leer en binario
|
// Abre el fichero con la configuracion de las opciones para leer en binario
|
||||||
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "r+b");
|
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "r+b");
|
||||||
@@ -300,49 +293,6 @@ bool Director::loadMedia(Uint8 section)
|
|||||||
SDL_RWclose(file);
|
SDL_RWclose(file);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_TITLE:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_PLAYING:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_GAME_OVER_SCREEN:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_INTRO:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_DEMO:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_INSTRUCTIONS:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GAME_SECTION_LOGO:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ private:
|
|||||||
// Crea el indice de ficheros de recursos
|
// Crea el indice de ficheros de recursos
|
||||||
bool setFileList();
|
bool setFileList();
|
||||||
|
|
||||||
// Carga los recursos necesarios
|
// Carga el fichero de configuración
|
||||||
bool loadMedia(Uint8 section);
|
bool loadConfig();
|
||||||
|
|
||||||
// Descrga los recursos necesarios
|
// Descrga los recursos necesarios
|
||||||
bool unLoadMedia(Uint8 section);
|
bool unLoadMedia(Uint8 section);
|
||||||
|
|||||||
Reference in New Issue
Block a user