forked from jaildesigner-jailgames/jaildoctors_dilemma
linter
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <string> // Para string, basic_string
|
||||
#include <utility>
|
||||
|
||||
#include "core/rendering/screen.hpp" // Para ScreenFilter
|
||||
#include "utils/utils.hpp" // Para Color, Palette
|
||||
@@ -15,7 +16,7 @@ namespace Options {
|
||||
// VOLUME HELPERS - Conversión de volumen 0-100 a 0-128
|
||||
// =============================================================================
|
||||
namespace VolumeHelpers {
|
||||
constexpr int convertVolume(int volume_percent) {
|
||||
constexpr auto convertVolume(int volume_percent) -> int {
|
||||
return (volume_percent * 128) / 100;
|
||||
}
|
||||
} // namespace VolumeHelpers
|
||||
@@ -77,7 +78,7 @@ struct Cheat {
|
||||
alternate_skin(alt_skin) {}
|
||||
|
||||
// Método para comprobar si alguno de los tres primeros trucos está activo
|
||||
bool enabled() const {
|
||||
[[nodiscard]] auto enabled() const -> bool {
|
||||
return infinite_lives == State::ENABLED ||
|
||||
invincible == State::ENABLED ||
|
||||
jail_is_open == State::ENABLED;
|
||||
@@ -96,10 +97,10 @@ struct Stats {
|
||||
items(0) {}
|
||||
|
||||
// Constructor
|
||||
Stats(int room_count, int item_count, const std::string& worst_nightmare_room)
|
||||
Stats(int room_count, int item_count, std::string worst_nightmare_room)
|
||||
: rooms(room_count),
|
||||
items(item_count),
|
||||
worst_nightmare(worst_nightmare_room) {}
|
||||
worst_nightmare(std::move(worst_nightmare_room)) {}
|
||||
};
|
||||
|
||||
// Estructura con opciones de la ventana
|
||||
@@ -164,7 +165,7 @@ struct Video {
|
||||
palette(GameDefaults::PALETTE_NAME) {}
|
||||
|
||||
// Constructor
|
||||
Video(bool is_fullscreen, ScreenFilter screen_filter, bool vsync, bool use_shaders, bool int_scale, bool keep_aspect_ratio, Border video_border, const std::string& palette_name)
|
||||
Video(bool is_fullscreen, ScreenFilter screen_filter, bool vsync, bool use_shaders, bool int_scale, bool keep_aspect_ratio, Border video_border, std::string palette_name)
|
||||
: fullscreen(is_fullscreen),
|
||||
filter(screen_filter),
|
||||
vertical_sync(vsync),
|
||||
@@ -172,7 +173,7 @@ struct Video {
|
||||
integer_scale(int_scale),
|
||||
keep_aspect(keep_aspect_ratio),
|
||||
border(video_border),
|
||||
palette(palette_name) {}
|
||||
palette(std::move(palette_name)) {}
|
||||
};
|
||||
|
||||
// Estructura para las opciones de musica
|
||||
@@ -269,7 +270,7 @@ inline ControlScheme keys{GameDefaults::CONTROL_SCHEME}; // Teclas usadas para
|
||||
|
||||
// --- Funciones ---
|
||||
void init(); // Crea e inicializa las opciones del programa
|
||||
bool loadFromFile(const std::string& file_path); // Carga las opciones desde un fichero
|
||||
bool saveToFile(const std::string& file_path); // Guarda las opciones a un fichero
|
||||
auto loadFromFile(const std::string& file_path) -> bool; // Carga las opciones desde un fichero
|
||||
auto saveToFile(const std::string& file_path) -> bool; // Guarda las opciones a un fichero
|
||||
|
||||
} // namespace Options
|
||||
Reference in New Issue
Block a user