forked from jaildesigner-jailgames/jaildoctors_dilemma
Arreglada la cárrega de opcions i recursos
Modificats els parametros dels fitxers .ani a snake_case
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include "cheevos.h"
|
||||
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_RWwrite
|
||||
#include <stddef.h> // for NULL
|
||||
#include <fstream> // for basic_ostream, operator<<, basic_ofstream
|
||||
#include <iostream> // for cout, cerr
|
||||
#include "notifier.h" // for Notifier
|
||||
#include "options.h" // for Options, options
|
||||
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_RWwrite
|
||||
#include <stddef.h> // for NULL
|
||||
#include <fstream> // for basic_ostream, operator<<, basic_ofstream
|
||||
#include <iostream> // for cout, cerr
|
||||
#include "notifier.h" // for Notifier
|
||||
#include "options.h" // for Options, options
|
||||
|
||||
// [SINGLETON]
|
||||
Cheevos *Cheevos::cheevos_ = nullptr;
|
||||
@@ -108,24 +108,24 @@ void Cheevos::invalidate(int id)
|
||||
// Carga el estado de los logros desde un fichero
|
||||
void Cheevos::loadFromFile()
|
||||
{
|
||||
std::ifstream file(this->file_, std::ios::binary);
|
||||
std::ifstream file(file_, std::ios::binary);
|
||||
|
||||
// El fichero no existe
|
||||
if (!file)
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "Warning: Unable to open file! Creating new file..." << std::endl;
|
||||
std::cout << "Warning: Unable to open " << file_ << "! Creating new file..." << std::endl;
|
||||
}
|
||||
|
||||
// Crea el fichero en modo escritura (binario)
|
||||
std::ofstream newFile(this->file_, std::ios::binary);
|
||||
std::ofstream newFile(file_, std::ios::binary);
|
||||
|
||||
if (newFile)
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "New file created!" << std::endl;
|
||||
std::cout << "New " << file_ << " created!" << std::endl;
|
||||
}
|
||||
|
||||
// Guarda la información
|
||||
@@ -138,7 +138,7 @@ void Cheevos::loadFromFile()
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cerr << "Error: Unable to create file!" << std::endl;
|
||||
std::cerr << "Error: Unable to create " << file_ << "!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ void Cheevos::loadFromFile()
|
||||
{
|
||||
if (options.console)
|
||||
{
|
||||
std::cout << "Reading file...!" << std::endl;
|
||||
std::cout << "Reading " << file_ << std::endl;
|
||||
}
|
||||
|
||||
// Carga los datos
|
||||
|
||||
Reference in New Issue
Block a user