linter; manage_hiscore i resource_loader

This commit is contained in:
2025-10-24 12:06:53 +02:00
parent 357b5d5977
commit 5362c5b022
4 changed files with 124 additions and 92 deletions
+10 -1
View File
@@ -1,5 +1,7 @@
#pragma once
#include <SDL3/SDL.h> // Para SDL_IOStream
#include <string> // Para std::string
#include <vector> // Para std::vector
@@ -45,6 +47,13 @@ class ManageHiScoreTable {
Table& table_; // Referencia a la tabla con los records
// --- Métodos privados ---
void sort(); // Ordena la tabla
void sort(); // Ordena la tabla
static auto calculateChecksum(const Table& table) -> unsigned int; // Calcula checksum de la tabla
// Métodos auxiliares para loadFromFile
auto validateMagicNumber(SDL_IOStream* file, const std::string& file_path) -> bool;
auto validateVersion(SDL_IOStream* file, const std::string& file_path) -> bool;
auto readTableSize(SDL_IOStream* file, const std::string& file_path, int& table_size) -> bool;
auto readEntry(SDL_IOStream* file, const std::string& file_path, int index, HiScoreEntry& entry) -> bool;
auto verifyChecksum(SDL_IOStream* file, const std::string& file_path, const Table& temp_table) -> bool;
};