renomena tipus niats a CamelCase (Bouncing, Stage, Item, Selector, ...)
This commit is contained in:
@@ -62,12 +62,12 @@ auto Input::get() -> Input * {
|
||||
Input::Input(std::string file)
|
||||
: dbPath(std::move(file)) {
|
||||
// Inicializa las variables
|
||||
keyBindings_t kb;
|
||||
KeyBindings kb;
|
||||
kb.scancode = 0;
|
||||
kb.active = false;
|
||||
keyBindings.resize(input_number_of_inputs, kb);
|
||||
|
||||
GameControllerBindings_t gcb;
|
||||
GameControllerBindings gcb;
|
||||
gcb.button = SDL_GAMEPAD_BUTTON_INVALID;
|
||||
gcb.active = false;
|
||||
gameControllerBindings.resize(input_number_of_inputs, gcb);
|
||||
|
||||
@@ -52,12 +52,12 @@ enum InputDisable : std::uint8_t {
|
||||
|
||||
class Input {
|
||||
private:
|
||||
struct keyBindings_t {
|
||||
struct KeyBindings {
|
||||
Uint8 scancode; // Scancode asociado
|
||||
bool active; // Indica si está activo
|
||||
};
|
||||
|
||||
struct GameControllerBindings_t {
|
||||
struct GameControllerBindings {
|
||||
SDL_GamepadButton button; // GameControllerButton asociado
|
||||
bool active; // Indica si está activo
|
||||
};
|
||||
@@ -67,8 +67,8 @@ class Input {
|
||||
std::vector<SDL_JoystickID> connectedControllerIds; // Instance IDs paralelos para mapear eventos
|
||||
|
||||
// Variables
|
||||
std::vector<keyBindings_t> keyBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<GameControllerBindings_t> gameControllerBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<KeyBindings> keyBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<GameControllerBindings> gameControllerBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<std::string> controllerNames; // Vector con los nombres de los mandos
|
||||
int numGamepads{0}; // Numero de mandos conectados
|
||||
std::string dbPath; // Ruta al archivo gamecontrollerdb.txt
|
||||
|
||||
@@ -31,7 +31,7 @@ Asset::Asset(const std::string &executablePath)
|
||||
|
||||
// Añade un elemento a la lista
|
||||
void Asset::add(const std::string &file, enum AssetType type, bool required, bool absolute) {
|
||||
item_t temp;
|
||||
Item temp;
|
||||
temp.file = absolute ? file : executablePath + file;
|
||||
temp.type = type;
|
||||
temp.required = required;
|
||||
|
||||
@@ -21,7 +21,7 @@ enum AssetType : std::uint8_t {
|
||||
class Asset {
|
||||
public:
|
||||
// Estructura para definir un item
|
||||
struct item_t {
|
||||
struct Item {
|
||||
std::string file; // Ruta del fichero desde la raiz del directorio
|
||||
enum AssetType type; // Indica el tipo de recurso
|
||||
bool required; // Indica si es un fichero que debe de existir
|
||||
@@ -30,7 +30,7 @@ class Asset {
|
||||
private:
|
||||
// Variables
|
||||
int longestName{0}; // Contiene la longitud del nombre de fichero mas largo
|
||||
std::vector<item_t> fileList; // Listado con todas las rutas a los ficheros
|
||||
std::vector<Item> fileList; // Listado con todas las rutas a los ficheros
|
||||
std::string executablePath; // Ruta al ejecutable
|
||||
bool verbose{true}; // Indica si ha de mostrar información por pantalla
|
||||
|
||||
@@ -59,7 +59,7 @@ class Asset {
|
||||
auto get(const std::string &text) -> std::string;
|
||||
|
||||
// Devuelve toda la lista de items registrados
|
||||
[[nodiscard]] auto getAll() const -> const std::vector<item_t> & { return fileList; }
|
||||
[[nodiscard]] auto getAll() const -> const std::vector<Item> & { return fileList; }
|
||||
|
||||
// Comprueba que existen todos los elementos
|
||||
auto check() -> bool;
|
||||
|
||||
Reference in New Issue
Block a user