This commit is contained in:
2026-04-11 18:40:03 +02:00
parent bb38600aac
commit 72741896c1
27 changed files with 163 additions and 163 deletions

View File

@@ -16,7 +16,7 @@
Cheevos* Cheevos::cheevos = nullptr;
// [SINGLETON] Crearemos el objeto con esta función estática
void Cheevos::init(const std::string& file) { // NOLINT(readability-convert-member-functions-to-static)
void Cheevos::init(const std::string& file) {
Cheevos::cheevos = new Cheevos(file);
}
@@ -43,12 +43,12 @@ Cheevos::~Cheevos() {
}
// Inicializa los logros
void Cheevos::init() { // NOLINT(readability-convert-member-functions-to-static)
void Cheevos::init() {
cheevos_list_.clear();
}
// Busca un logro por id y devuelve el indice
auto Cheevos::find(int id) -> int { // NOLINT(readability-convert-member-functions-to-static)
auto Cheevos::find(int id) -> int {
for (int i = 0; i < (int)cheevos_list_.size(); ++i) {
if (cheevos_list_[i].id == id) {
return i;
@@ -88,7 +88,7 @@ void Cheevos::setUnobtainable(int id) {
}
// Carga el estado de los logros desde un fichero
void Cheevos::loadFromFile() { // NOLINT(readability-convert-member-functions-to-static)
void Cheevos::loadFromFile() {
std::ifstream file(file_, std::ios::binary);
// El fichero no existe