Esquelet inicial: finestra negra i primera escena
This commit is contained in:
1 parent
959a3871db
commit
7bb1edd08a
20 files changed
+818
No files matched your search
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Defaults {
|
||||
|
||||
// Mode de presentació lògica (escala finestra). Mapeja als valors de
|
||||
// SDL_RendererLogicalPresentation des de Screen via una funció helper,
|
||||
// perquè aquest header no depengui de detalls de SDL3 més enllà del scancode.
|
||||
enum class ScalingMode : std::uint8_t {
|
||||
DISABLED = 0,
|
||||
STRETCH = 1,
|
||||
LETTERBOX = 2,
|
||||
OVERSCAN = 3,
|
||||
INTEGER = 4,
|
||||
};
|
||||
|
||||
// Filtre de textura per a l'upscale final.
|
||||
enum class TextureFilter : std::uint8_t {
|
||||
NEAREST = 0,
|
||||
LINEAR = 1,
|
||||
};
|
||||
|
||||
namespace Window {
|
||||
constexpr int ZOOM = 3;
|
||||
constexpr bool FULLSCREEN = false;
|
||||
} // namespace Window
|
||||
|
||||
namespace Video {
|
||||
constexpr bool VSYNC = true;
|
||||
constexpr ScalingMode SCALING_MODE = ScalingMode::LETTERBOX;
|
||||
constexpr TextureFilter TEXTURE_FILTER = TextureFilter::NEAREST;
|
||||
} // namespace Video
|
||||
|
||||
namespace Audio {
|
||||
constexpr bool ENABLED = true;
|
||||
constexpr float VOLUME = 1.0F;
|
||||
constexpr bool MUSIC_ENABLED = true;
|
||||
constexpr float MUSIC_VOLUME = 0.8F;
|
||||
constexpr bool SOUND_ENABLED = true;
|
||||
constexpr float SOUND_VOLUME = 1.0F;
|
||||
} // namespace Audio
|
||||
|
||||
namespace KeysGame {
|
||||
constexpr SDL_Scancode UP = SDL_SCANCODE_UP;
|
||||
constexpr SDL_Scancode DOWN = SDL_SCANCODE_DOWN;
|
||||
constexpr SDL_Scancode LEFT = SDL_SCANCODE_LEFT;
|
||||
constexpr SDL_Scancode RIGHT = SDL_SCANCODE_RIGHT;
|
||||
constexpr SDL_Scancode EXIT = SDL_SCANCODE_ESCAPE;
|
||||
} // namespace KeysGame
|
||||
|
||||
} // namespace Defaults
|
||||
Reference in new issue
Block a user