Les enum class passen a estar totes amb la inicial en majuscula
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
#include <vector> // for vector
|
||||
#include "input.h" // for inputs_e, INPUT_USE_ANY, INPUT_...
|
||||
#include "lang.h" // for lang_e
|
||||
#include "screen.h" // for screenVideoMode, screenFilter
|
||||
#include "screen.h" // for ScreenVideoMode, ScreenFilter
|
||||
#include "utils.h" // for op_controller_t, options_t, op_...
|
||||
|
||||
// Variables
|
||||
options_t options;
|
||||
// Variables
|
||||
options_t options;
|
||||
|
||||
// Declaraciones
|
||||
bool setOptions(std::string var, std::string value);
|
||||
@@ -20,13 +20,13 @@ void initOptions()
|
||||
{
|
||||
// Opciones de video
|
||||
#ifdef ANBERNIC
|
||||
options.video.mode = screenVideoMode::WINDOW;
|
||||
options.video.mode = ScreenVideoMode::WINDOW;
|
||||
options.video.window.size = 3;
|
||||
#else
|
||||
options.video.mode = screenVideoMode::WINDOW;
|
||||
options.video.mode = ScreenVideoMode::WINDOW;
|
||||
options.video.window.size = 2;
|
||||
#endif
|
||||
options.video.filter = screenFilter::NEAREST;
|
||||
options.video.filter = ScreenFilter::NEAREST;
|
||||
options.video.vSync = true;
|
||||
options.video.shaders = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ void initOptions()
|
||||
options.audio.sound.volume = 64;
|
||||
|
||||
// Opciones de juego
|
||||
options.game.difficulty = gameDifficulty::NORMAL;
|
||||
options.game.difficulty = GameDifficulty::NORMAL;
|
||||
options.game.language = lang::ba_BA;
|
||||
options.game.autofire = true;
|
||||
|
||||
@@ -132,11 +132,11 @@ bool loadOptionsFile(std::string filePath)
|
||||
}
|
||||
|
||||
// Normaliza los valores
|
||||
const bool a = options.video.mode == screenVideoMode::WINDOW;
|
||||
const bool b = options.video.mode == screenVideoMode::FULLSCREEN;
|
||||
const bool a = options.video.mode == ScreenVideoMode::WINDOW;
|
||||
const bool b = options.video.mode == ScreenVideoMode::FULLSCREEN;
|
||||
if (!(a || b))
|
||||
{
|
||||
options.video.mode = screenVideoMode::WINDOW;
|
||||
options.video.mode = ScreenVideoMode::WINDOW;
|
||||
}
|
||||
|
||||
if (options.video.window.size < 1 || options.video.window.size > 4)
|
||||
@@ -171,10 +171,10 @@ bool saveOptionsFile(std::string filePath)
|
||||
#endif
|
||||
|
||||
// Opciones de video
|
||||
const auto valueVideoModeWinow = std::to_string(static_cast<int>(screenVideoMode::WINDOW));
|
||||
const auto valueVideoModeFullscreen = std::to_string(static_cast<int>(screenVideoMode::FULLSCREEN));
|
||||
const auto valueFilterNearest = std::to_string(static_cast<int>(screenFilter::NEAREST));
|
||||
const auto valueFilterLineal = std::to_string(static_cast<int>(screenFilter::LINEAL));
|
||||
const auto valueVideoModeWinow = std::to_string(static_cast<int>(ScreenVideoMode::WINDOW));
|
||||
const auto valueVideoModeFullscreen = std::to_string(static_cast<int>(ScreenVideoMode::FULLSCREEN));
|
||||
const auto valueFilterNearest = std::to_string(static_cast<int>(ScreenFilter::NEAREST));
|
||||
const auto valueFilterLineal = std::to_string(static_cast<int>(ScreenFilter::LINEAL));
|
||||
|
||||
file << "## VIDEO\n";
|
||||
file << "## video.mode [" << valueVideoModeWinow << ": window, " << valueVideoModeFullscreen << ": fullscreen]\n";
|
||||
@@ -236,9 +236,9 @@ bool saveOptionsFile(std::string filePath)
|
||||
file << "audio.sound.volume=" + std::to_string(options.audio.sound.volume) + "\n";
|
||||
|
||||
// Opciones del juego
|
||||
const auto valueDifficultyEasy = std::to_string(static_cast<int>(gameDifficulty::EASY));
|
||||
const auto valueDifficultyNormal = std::to_string(static_cast<int>(gameDifficulty::NORMAL));
|
||||
const auto valueDifficultyHard = std::to_string(static_cast<int>(gameDifficulty::HARD));
|
||||
const auto valueDifficultyEasy = std::to_string(static_cast<int>(GameDifficulty::EASY));
|
||||
const auto valueDifficultyNormal = std::to_string(static_cast<int>(GameDifficulty::NORMAL));
|
||||
const auto valueDifficultyHard = std::to_string(static_cast<int>(GameDifficulty::HARD));
|
||||
file << "\n\n## GAME\n";
|
||||
file << "## game.language [0: spanish, 1: valencian, 2: english]\n";
|
||||
file << "## game.difficulty [" << valueDifficultyEasy << ": easy, " << valueDifficultyNormal << ": normal, " << valueDifficultyHard << ": hard]\n";
|
||||
@@ -285,8 +285,8 @@ bool setOptions(std::string var, std::string value)
|
||||
// Opciones de video
|
||||
if (var == "video.mode")
|
||||
{
|
||||
// options.video.mode = value == std::to_string(static_cast<int>(screenVideoMode::WINDOW)) ? screenVideoMode::WINDOW : screenVideoMode::FULLSCREEN;
|
||||
options.video.mode = static_cast<screenVideoMode>(std::stoi(value));
|
||||
// options.video.mode = value == std::to_string(static_cast<int>(ScreenVideoMode::WINDOW)) ? ScreenVideoMode::WINDOW : ScreenVideoMode::FULLSCREEN;
|
||||
options.video.mode = static_cast<ScreenVideoMode>(std::stoi(value));
|
||||
}
|
||||
|
||||
else if (var == "video.window.size")
|
||||
@@ -300,8 +300,8 @@ bool setOptions(std::string var, std::string value)
|
||||
|
||||
else if (var == "video.filter")
|
||||
{
|
||||
// options.video.filter = value == std::to_string(static_cast<int>(screenFilter::NEAREST)) ? screenFilter::NEAREST : screenFilter::LINEAL;
|
||||
options.video.filter = static_cast<screenFilter>(std::stoi(value));
|
||||
// options.video.filter = value == std::to_string(static_cast<int>(ScreenFilter::NEAREST)) ? ScreenFilter::NEAREST : ScreenFilter::LINEAL;
|
||||
options.video.filter = static_cast<ScreenFilter>(std::stoi(value));
|
||||
}
|
||||
|
||||
else if (var == "video.shaders")
|
||||
@@ -370,7 +370,7 @@ bool setOptions(std::string var, std::string value)
|
||||
|
||||
else if (var == "game.difficulty")
|
||||
{
|
||||
options.game.difficulty = static_cast<gameDifficulty>(std::stoi(value));
|
||||
options.game.difficulty = static_cast<GameDifficulty>(std::stoi(value));
|
||||
}
|
||||
|
||||
else if (var == "game.autofire")
|
||||
|
||||
Reference in New Issue
Block a user