forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en el fichero de configuración
This commit is contained in:
@@ -65,14 +65,14 @@ Room::~Room()
|
||||
}
|
||||
|
||||
// Carga las variables desde un fichero
|
||||
bool Room::load(std::string _file_path)
|
||||
bool Room::load(std::string file_path)
|
||||
{
|
||||
// Indicador de éxito en la carga
|
||||
bool success = true;
|
||||
|
||||
std::string filename = _file_path.substr(_file_path.find_last_of("\\/") + 1);
|
||||
std::string filename = file_path.substr(file_path.find_last_of("\\/") + 1);
|
||||
std::string line;
|
||||
std::ifstream file(_file_path);
|
||||
std::ifstream file(file_path);
|
||||
|
||||
// El fichero se puede abrir
|
||||
if (file.good())
|
||||
@@ -275,6 +275,7 @@ bool Room::setVars(std::string var, std::string value)
|
||||
}
|
||||
|
||||
return success;
|
||||
|
||||
}
|
||||
|
||||
// Asigna variables a una estructura enemy_t
|
||||
|
||||
Reference in New Issue
Block a user