forked from jaildesigner-jailgames/jaildoctors_dilemma
Ya guarda y lee la configuracion
This commit is contained in:
@@ -142,6 +142,8 @@ int Text::lenght(std::string text, int kerning)
|
||||
void Text::initOffsetFromFile()
|
||||
{
|
||||
std::ifstream rfile(file);
|
||||
printf("Reading file %s\n", file.c_str());
|
||||
|
||||
if (rfile.is_open() && rfile.good())
|
||||
{
|
||||
std::string buffer;
|
||||
@@ -168,6 +170,16 @@ void Text::initOffsetFromFile()
|
||||
buffer.clear();
|
||||
line_read++;
|
||||
};
|
||||
|
||||
// Cierra el fichero
|
||||
printf("Closing file %s\n\n", file.c_str());
|
||||
rfile.close();
|
||||
}
|
||||
|
||||
// El fichero no se puede abrir
|
||||
else
|
||||
{
|
||||
printf("Warning: Unable to open %s file\n", file.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user