corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader

This commit is contained in:
2025-10-15 12:16:50 +02:00
parent 7c102e42cc
commit e4a08d2ec7
52 changed files with 879 additions and 823 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include <SDL3/SDL.h>
#include <SDL3/SDL.h>
#include <algorithm>
#include <string> // Para string, basic_string
@@ -58,7 +58,7 @@ enum class ControlScheme {
constexpr int DEFAULT_GAME_WIDTH = 256; // Ancho de la ventana por defecto
constexpr int DEFAULT_GAME_HEIGHT = 192; // Alto de la ventana por defecto
constexpr int DEFAULT_WINDOW_ZOOM = 2; // Zoom de la ventana por defecto
constexpr int DEFAULT_VIDEO_MODE = 0; // Modo de pantalla completa por defecto
constexpr bool DEFAULT_VIDEO_MODE = false; // Modo de pantalla completa por defecto
constexpr ScreenFilter DEFAULT_VIDEO_FILTER = ScreenFilter::NEAREST; // Filtro por defecto
constexpr bool DEFAULT_VIDEO_VERTICAL_SYNC = true; // Vsync activado por defecto
constexpr bool DEFAULT_VIDEO_SHADERS = false; // Shaders desactivados por defecto
@@ -225,8 +225,8 @@ struct OptionsWindow {
// Estructura para gestionar el borde de la pantalla
struct Border {
bool enabled; // Indica si se ha de mostrar el borde
int width; // Ancho del borde
int height; // Alto del borde
float width; // Ancho del borde
float height; // Alto del borde
// Constructor por defecto
Border()
@@ -235,7 +235,7 @@ struct Border {
height(DEFAULT_BORDER_HEIGHT) {}
// Constructor
Border(bool e, int w, int h)
Border(bool e, float w, float h)
: enabled(e),
width(w),
height(h) {}
@@ -243,7 +243,7 @@ struct Border {
// Estructura para las opciones de video
struct OptionsVideo {
Uint32 mode; // Contiene el valor del modo de pantalla completa
bool fullscreen; // Contiene el valor del modo de pantalla completa
ScreenFilter filter; // Filtro usado para el escalado de la imagen
bool vertical_sync; // Indica si se quiere usar vsync o no
bool shaders; // Indica si se van a usar shaders o no
@@ -254,7 +254,7 @@ struct OptionsVideo {
// Constructor por defecto
OptionsVideo()
: mode(DEFAULT_VIDEO_MODE),
: fullscreen(DEFAULT_VIDEO_MODE),
filter(DEFAULT_VIDEO_FILTER),
vertical_sync(DEFAULT_VIDEO_VERTICAL_SYNC),
shaders(DEFAULT_VIDEO_SHADERS),
@@ -265,7 +265,7 @@ struct OptionsVideo {
// Constructor
OptionsVideo(Uint32 m, ScreenFilter f, bool vs, bool s, bool is, bool ka, Border b, const std::string& p)
: mode(m),
: fullscreen(m),
filter(f),
vertical_sync(vs),
shaders(s),
@@ -353,8 +353,8 @@ struct OptionsAudio {
// Estructura para las opciones de juego
struct OptionsGame {
int width; // Ancho de la resolucion del juego
int height; // Alto de la resolucion del juego
float width; // Ancho de la resolucion del juego
float height; // Alto de la resolucion del juego
// Constructor por defecto
OptionsGame()
@@ -362,7 +362,7 @@ struct OptionsGame {
height(DEFAULT_GAME_HEIGHT) {}
// Constructor
OptionsGame(int w, int h)
OptionsGame(float w, float h)
: width(w),
height(h) {}
};