70 lines
2.5 KiB
C++
70 lines
2.5 KiB
C++
#pragma once
|
|
|
|
#include <SDL3/SDL.h>
|
|
|
|
// Textos
|
|
namespace Texts {
|
|
constexpr const char* WINDOW_CAPTION = "© 2026 Projecte 2026 — JailDesigner";
|
|
constexpr const char* COPYRIGHT = "@2026 JailDesigner";
|
|
constexpr const char* VERSION = "0.1"; // Versión por defecto
|
|
} // namespace Texts
|
|
|
|
// Tamaño de bloque
|
|
namespace Tile {
|
|
constexpr int SIZE = 8;
|
|
constexpr int HALF_SIZE = SIZE / 2;
|
|
} // namespace Tile
|
|
|
|
// Dimensiones del mapa en tiles
|
|
namespace Map {
|
|
constexpr int WIDTH = 32; // Ancho del mapa en tiles
|
|
constexpr int HEIGHT = 21; // Alto del mapa en tiles (pantalla menos 3 tiles de statusbar)
|
|
} // namespace Map
|
|
|
|
// Borde extra alrededor del tilemap de colisión para cross-room collision.
|
|
// Debe ser >= ceil(max(Player::WIDTH, Player::HEIGHT) / Tile::SIZE).
|
|
namespace CollisionBorder {
|
|
constexpr int TILES = 3; // Tiles de borde por lado
|
|
constexpr int PX = TILES * Tile::SIZE; // Píxeles de borde por lado
|
|
} // namespace CollisionBorder
|
|
|
|
// Tilemap de colisión extendido (room + bordes de las adyacentes)
|
|
namespace ExtendedMap {
|
|
constexpr int WIDTH = Map::WIDTH + (2 * CollisionBorder::TILES); // 38
|
|
constexpr int HEIGHT = Map::HEIGHT + (2 * CollisionBorder::TILES); // 27
|
|
} // namespace ExtendedMap
|
|
|
|
namespace PlayArea {
|
|
constexpr int TOP = (0 * Tile::SIZE);
|
|
constexpr int BOTTOM = (Map::HEIGHT * Tile::SIZE);
|
|
constexpr int LEFT = (0 * Tile::SIZE);
|
|
constexpr int RIGHT = (Map::WIDTH * Tile::SIZE);
|
|
constexpr int WIDTH = RIGHT - LEFT;
|
|
constexpr int HEIGHT = BOTTOM - TOP;
|
|
constexpr int CENTER_X = LEFT + (WIDTH / 2);
|
|
constexpr int CENTER_FIRST_QUARTER_X = (WIDTH / 4);
|
|
constexpr int CENTER_THIRD_QUARTER_X = (WIDTH / 4) * 3;
|
|
constexpr int CENTER_Y = TOP + (HEIGHT / 2);
|
|
constexpr int FIRST_QUARTER_Y = HEIGHT / 4;
|
|
constexpr int THIRD_QUARTER_Y = (HEIGHT / 4) * 3;
|
|
} // namespace PlayArea
|
|
|
|
namespace GameCanvas {
|
|
constexpr int WIDTH = 256;
|
|
constexpr int HEIGHT = 192;
|
|
constexpr int CENTER_X = WIDTH / 2;
|
|
constexpr int FIRST_QUARTER_X = WIDTH / 4;
|
|
constexpr int THIRD_QUARTER_X = (WIDTH / 4) * 3;
|
|
constexpr int CENTER_Y = HEIGHT / 2;
|
|
constexpr int FIRST_QUARTER_Y = HEIGHT / 4;
|
|
constexpr int THIRD_QUARTER_Y = (HEIGHT / 4) * 3;
|
|
} // namespace GameCanvas
|
|
|
|
namespace Collision {
|
|
constexpr int NONE = -1;
|
|
} // namespace Collision
|
|
|
|
namespace Flip {
|
|
constexpr SDL_FlipMode LEFT = SDL_FLIP_HORIZONTAL;
|
|
constexpr SDL_FlipMode RIGHT = SDL_FLIP_NONE;
|
|
} // namespace Flip
|