forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en el guardado de las estadisticas en las carpetas del sistema
This commit is contained in:
@@ -208,6 +208,21 @@ bool Director::saveConfig()
|
|||||||
// Crea y abre el fichero de texto
|
// Crea y abre el fichero de texto
|
||||||
std::ofstream file(asset->get("config.txt"));
|
std::ofstream file(asset->get("config.txt"));
|
||||||
|
|
||||||
|
if (file.good())
|
||||||
|
{
|
||||||
|
if (options->console)
|
||||||
|
{
|
||||||
|
std::cout << asset->get("config.txt") << " open for writing" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (options->console)
|
||||||
|
{
|
||||||
|
std::cout << asset->get("config.txt") << " can't be opened" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Escribe en el fichero
|
// Escribe en el fichero
|
||||||
if (options->fullScreenMode == 0)
|
if (options->fullScreenMode == 0)
|
||||||
{
|
{
|
||||||
@@ -1040,8 +1055,17 @@ bool Director::setFileList()
|
|||||||
|
|
||||||
// Configuración
|
// Configuración
|
||||||
asset->add(prefix + "/data/input/gamecontrollerdb.txt", t_data);
|
asset->add(prefix + "/data/input/gamecontrollerdb.txt", t_data);
|
||||||
asset->add(prefix + "/data/config/config.txt", t_data, false);
|
|
||||||
asset->add(prefix + "/data/config/stats.txt", t_data, false);
|
#ifdef _WIN32
|
||||||
|
asset->add("\%APPDATA\%/jaildoctors_dilemma/config.txt", t_data, false);
|
||||||
|
asset->add("\%APPDATA\%/jaildoctors_dilemma/stats.txt", t_data, false);
|
||||||
|
#elif __APPLE__
|
||||||
|
asset->add("~/Library/Application Support/jaildoctors_dilemma/config.txt", t_data, false);
|
||||||
|
asset->add("~/Library/Application Support/jaildoctors_dilemma/stats.txt", t_data, false);
|
||||||
|
#elif __linux__
|
||||||
|
asset->add("~/.jaildoctors_dilemma/config.txt", t_data, false);
|
||||||
|
asset->add("~/.jaildoctors_dilemma/stats.txt", t_data, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Habitaciones
|
// Habitaciones
|
||||||
asset->add(prefix + "/data/room/01.room", t_room);
|
asset->add(prefix + "/data/room/01.room", t_room);
|
||||||
|
|||||||
Reference in New Issue
Block a user