provant a 320x200
This commit is contained in:
@@ -57,6 +57,8 @@ assets:
|
|||||||
rooms:
|
rooms:
|
||||||
- type: ROOM
|
- type: ROOM
|
||||||
path: ${PREFIX}/data/room/03.yaml
|
path: ${PREFIX}/data/room/03.yaml
|
||||||
|
- type: ROOM
|
||||||
|
path: ${PREFIX}/data/room/04.yaml
|
||||||
|
|
||||||
# TILESETS
|
# TILESETS
|
||||||
tilesets:
|
tilesets:
|
||||||
|
|||||||
85
data/room/04.yaml
Normal file
85
data/room/04.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# VOID MAIN
|
||||||
|
room:
|
||||||
|
name: "VOID MAIN"
|
||||||
|
bgColor: blue
|
||||||
|
border: mauve
|
||||||
|
tileSetFile: standard.gif
|
||||||
|
|
||||||
|
# Conexiones de la habitación (null = sin conexión)
|
||||||
|
connections:
|
||||||
|
up: null
|
||||||
|
down: null
|
||||||
|
left: null
|
||||||
|
right: null
|
||||||
|
|
||||||
|
# Colores de los objetos
|
||||||
|
itemColor1: magenta
|
||||||
|
itemColor2: pastel_magenta
|
||||||
|
|
||||||
|
# Dirección de la cinta transportadora: left, none, right
|
||||||
|
conveyorBelt: left
|
||||||
|
|
||||||
|
# Tilemap: 20 filas x 40 columnas (320x160 pixeles @ 8px/tile)
|
||||||
|
# Indices de tiles (-1 = vacio)
|
||||||
|
tilemap:
|
||||||
|
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 33, 33, -1, -1, -1, -1, -1]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 33, -1, 70, 71, -1, -1, 33]
|
||||||
|
- [33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 259, -1, -1, -1, -1, -1, -1, 259, -1, -1, 33, -1, 94, 95, -1, -1, 33]
|
||||||
|
- [33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, 30, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 364, 364, 364, 364, 364, 364, 364, 364, 364, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 174, 174, 174, 174, 174, -1, -1, -1, -1, -1, -1, 292, 292, 292, 292, 292, 292, 292, 292, 292, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 286, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, -1, -1, -1, -1, -1, -1, 286, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 133]
|
||||||
|
- [33, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, -1, -1, -1, -1, -1, -1, 286, -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, -1, 133]
|
||||||
|
- [33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 286, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, -1, -1, -1, -1, 380, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 310, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33]
|
||||||
|
- [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33]
|
||||||
|
|
||||||
|
# Collisionmap: 20 filas x 40 columnas
|
||||||
|
# Indices de colision (-1 = vacio, 1 = solido, 2 = plataforma)
|
||||||
|
collisionmap:
|
||||||
|
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, 2, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]
|
||||||
|
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||||
|
|
||||||
|
# Enemigos en esta habitación
|
||||||
|
enemies:
|
||||||
|
- animation: code.yaml
|
||||||
|
position: {x: 1, y: 17}
|
||||||
|
velocity: {x: 24.0, y: 0}
|
||||||
|
boundaries:
|
||||||
|
position1: {x: 1, y: 17}
|
||||||
|
position2: {x: 16, y: 17}
|
||||||
|
color: yellow
|
||||||
|
|
||||||
|
# Objetos en esta habitación
|
||||||
|
items:
|
||||||
|
- tileSetFile: items.gif
|
||||||
|
tile: 42
|
||||||
|
position: {x: 25, y: 7}
|
||||||
|
counter: 1
|
||||||
@@ -17,7 +17,7 @@ namespace Defaults {
|
|||||||
// Dimensiones del canvas del juego (usa GameCanvas como fuente única)
|
// Dimensiones del canvas del juego (usa GameCanvas como fuente única)
|
||||||
namespace Canvas {
|
namespace Canvas {
|
||||||
constexpr int WIDTH = GameCanvas::WIDTH; // Ancho del canvas del juego (320)
|
constexpr int WIDTH = GameCanvas::WIDTH; // Ancho del canvas del juego (320)
|
||||||
constexpr int HEIGHT = GameCanvas::HEIGHT; // Alto del canvas del juego (240)
|
constexpr int HEIGHT = GameCanvas::HEIGHT; // Alto del canvas del juego (200)
|
||||||
} // namespace Canvas
|
} // namespace Canvas
|
||||||
|
|
||||||
// --- WINDOW ---
|
// --- WINDOW ---
|
||||||
@@ -39,8 +39,8 @@ constexpr const char* PALETTE_NAME = "cpc"; // Paleta por defect
|
|||||||
// --- BORDER ---
|
// --- BORDER ---
|
||||||
namespace Border {
|
namespace Border {
|
||||||
constexpr bool ENABLED = true; // Borde activado por defecto
|
constexpr bool ENABLED = true; // Borde activado por defecto
|
||||||
constexpr int WIDTH = 32; // Ancho del borde por defecto
|
constexpr int WIDTH = 40; // Ancho del borde por defecto (400x300 total)
|
||||||
constexpr int HEIGHT = 24; // Alto del borde por defecto
|
constexpr int HEIGHT = 50; // Alto del borde por defecto (400x300 total)
|
||||||
} // namespace Border
|
} // namespace Border
|
||||||
|
|
||||||
// --- AUDIO ---
|
// --- AUDIO ---
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
class Player {
|
class Player {
|
||||||
public:
|
public:
|
||||||
|
// --- Constantes de tamaño ---
|
||||||
|
static constexpr int WIDTH = 8; // Ancho del jugador en pixels
|
||||||
|
static constexpr int HEIGHT = 16; // Alto del jugador en pixels
|
||||||
|
|
||||||
// --- Enums y Structs ---
|
// --- Enums y Structs ---
|
||||||
enum class State {
|
enum class State {
|
||||||
ON_GROUND, // En suelo plano o conveyor belt
|
ON_GROUND, // En suelo plano o conveyor belt
|
||||||
@@ -72,10 +76,6 @@ class Player {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// --- Constantes de tamaño ---
|
|
||||||
static constexpr int WIDTH = 8; // Ancho del jugador en pixels
|
|
||||||
static constexpr int HEIGHT = 16; // Alto del jugador en pixels
|
|
||||||
|
|
||||||
// --- Constantes de movimiento horizontal ---
|
// --- Constantes de movimiento horizontal ---
|
||||||
static constexpr float WALK_VELOCITY = 50.0F; // Velocidad al caminar (inmediata) en pixels/segundo
|
static constexpr float WALK_VELOCITY = 50.0F; // Velocidad al caminar (inmediata) en pixels/segundo
|
||||||
static constexpr float RUN_VELOCITY = 80.0F; // Velocidad al correr en pixels/segundo
|
static constexpr float RUN_VELOCITY = 80.0F; // Velocidad al correr en pixels/segundo
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class RoomLoader {
|
|||||||
*
|
*
|
||||||
* El formato YAML esperado incluye:
|
* El formato YAML esperado incluye:
|
||||||
* - room: configuración general
|
* - room: configuración general
|
||||||
* - tilemap: array 2D de 24x40 tiles (convertido a vector 1D de 960 elementos)
|
* - tilemap: array 2D de 20x40 tiles (convertido a vector 1D de 800 elementos)
|
||||||
* - enemies: lista de enemigos (opcional)
|
* - enemies: lista de enemigos (opcional)
|
||||||
* - items: lista de items (opcional)
|
* - items: lista de items (opcional)
|
||||||
*/
|
*/
|
||||||
@@ -64,8 +64,8 @@ class RoomLoader {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convierte un tilemap 2D a vector 1D flat
|
* @brief Convierte un tilemap 2D a vector 1D flat
|
||||||
* @param tilemap_2d Array 2D de tiles (24 rows × 40 cols)
|
* @param tilemap_2d Array 2D de tiles (20 rows × 40 cols)
|
||||||
* @return Vector 1D flat con 960 elementos
|
* @return Vector 1D flat con 800 elementos
|
||||||
*/
|
*/
|
||||||
static auto flattenTilemap(const std::vector<std::vector<int>>& tilemap_2d) -> std::vector<int>;
|
static auto flattenTilemap(const std::vector<std::vector<int>>& tilemap_2d) -> std::vector<int>;
|
||||||
|
|
||||||
|
|||||||
@@ -129,9 +129,9 @@ void Scoreboard::fillTexture() {
|
|||||||
// Limpia la textura
|
// Limpia la textura
|
||||||
surface_->clear(stringToColor("black"));
|
surface_->clear(stringToColor("black"));
|
||||||
|
|
||||||
// Anclas
|
// Anclas (ajustadas para scoreboard de 40px)
|
||||||
constexpr int LINE1 = Tile::SIZE;
|
constexpr int LINE1 = 6; // Reducido de 8 para ajuste proporcional
|
||||||
constexpr int LINE2 = 3 * Tile::SIZE;
|
constexpr int LINE2 = 20; // Reducido de 24 para ajuste proporcional
|
||||||
|
|
||||||
// Dibuja las vidas
|
// Dibuja las vidas
|
||||||
// Calcular desplazamiento basado en tiempo
|
// Calcular desplazamiento basado en tiempo
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ Game::Game(Mode mode)
|
|||||||
room_tracker_(std::make_shared<RoomTracker>()),
|
room_tracker_(std::make_shared<RoomTracker>()),
|
||||||
mode_(mode),
|
mode_(mode),
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
current_room_("03.yaml"),
|
current_room_("04.yaml"),
|
||||||
spawn_data_(Player::SpawnData(25 * Tile::SIZE, 21 * Tile::SIZE, 0, 0, 0, Player::State::ON_GROUND, Flip::LEFT))
|
spawn_data_(Player::SpawnData(25 * Tile::SIZE, PlayArea::BOTTOM - Player::HEIGHT - Tile::SIZE, 0, 0, 0, Player::State::ON_GROUND, Flip::LEFT))
|
||||||
#else
|
#else
|
||||||
current_room_("03.yaml"),
|
current_room_("04.yaml"),
|
||||||
spawn_data_(Player::SpawnData(25 * Tile::SIZE, 21 * Tile::SIZE, 0, 0, 0, Player::State::ON_GROUND, Flip::LEFT))
|
spawn_data_(Player::SpawnData(25 * Tile::SIZE, 21 * Tile::SIZE, 0, 0, 0, Player::State::ON_GROUND, Flip::LEFT))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ constexpr int HALF_SIZE = SIZE / 2;
|
|||||||
|
|
||||||
namespace GameCanvas {
|
namespace GameCanvas {
|
||||||
constexpr int WIDTH = 320;
|
constexpr int WIDTH = 320;
|
||||||
constexpr int HEIGHT = 240;
|
constexpr int HEIGHT = 200;
|
||||||
constexpr int CENTER_X = WIDTH / 2;
|
constexpr int CENTER_X = WIDTH / 2;
|
||||||
constexpr int FIRST_QUARTER_X = WIDTH / 4;
|
constexpr int FIRST_QUARTER_X = WIDTH / 4;
|
||||||
constexpr int THIRD_QUARTER_X = (WIDTH / 4) * 3;
|
constexpr int THIRD_QUARTER_X = (WIDTH / 4) * 3;
|
||||||
@@ -26,22 +26,22 @@ constexpr int Y = 0;
|
|||||||
|
|
||||||
// Dimensiones en tiles
|
// Dimensiones en tiles
|
||||||
constexpr int TILE_COLS = 40; // Ancho del mapa en tiles
|
constexpr int TILE_COLS = 40; // Ancho del mapa en tiles
|
||||||
constexpr int TILE_ROWS = 24; // Alto del mapa en tiles
|
constexpr int TILE_ROWS = 20; // Alto del mapa en tiles
|
||||||
constexpr int TILE_COUNT = TILE_COLS * TILE_ROWS; // 960 tiles totales
|
constexpr int TILE_COUNT = TILE_COLS * TILE_ROWS; // 800 tiles totales
|
||||||
|
|
||||||
// Dimensiones en pixels
|
// Dimensiones en pixels
|
||||||
constexpr int WIDTH = TILE_COLS * Tile::SIZE; // 320
|
constexpr int WIDTH = TILE_COLS * Tile::SIZE; // 320
|
||||||
constexpr int HEIGHT = TILE_ROWS * Tile::SIZE; // 192
|
constexpr int HEIGHT = TILE_ROWS * Tile::SIZE; // 160
|
||||||
|
|
||||||
// Bordes (derivados, útiles para colisiones)
|
// Bordes (derivados, útiles para colisiones)
|
||||||
constexpr int LEFT = X;
|
constexpr int LEFT = X;
|
||||||
constexpr int TOP = Y;
|
constexpr int TOP = Y;
|
||||||
constexpr int RIGHT = X + WIDTH; // 320
|
constexpr int RIGHT = X + WIDTH; // 320
|
||||||
constexpr int BOTTOM = Y + HEIGHT; // 192
|
constexpr int BOTTOM = Y + HEIGHT; // 160
|
||||||
|
|
||||||
// Puntos de referencia
|
// Puntos de referencia
|
||||||
constexpr int CENTER_X = X + (WIDTH / 2); // 160
|
constexpr int CENTER_X = X + (WIDTH / 2); // 160
|
||||||
constexpr int CENTER_Y = Y + (HEIGHT / 2); // 96
|
constexpr int CENTER_Y = Y + (HEIGHT / 2); // 80
|
||||||
constexpr int QUARTER_X = WIDTH / 4;
|
constexpr int QUARTER_X = WIDTH / 4;
|
||||||
constexpr int QUARTER_Y = HEIGHT / 4;
|
constexpr int QUARTER_Y = HEIGHT / 4;
|
||||||
} // namespace PlayArea
|
} // namespace PlayArea
|
||||||
@@ -49,17 +49,17 @@ constexpr int QUARTER_Y = HEIGHT / 4;
|
|||||||
namespace ScoreboardArea {
|
namespace ScoreboardArea {
|
||||||
// Origen (justo debajo de PlayArea)
|
// Origen (justo debajo de PlayArea)
|
||||||
constexpr int X = 0;
|
constexpr int X = 0;
|
||||||
constexpr int Y = PlayArea::BOTTOM; // 192
|
constexpr int Y = PlayArea::BOTTOM; // 160
|
||||||
|
|
||||||
// Dimensiones
|
// Dimensiones
|
||||||
constexpr int WIDTH = GameCanvas::WIDTH; // 320
|
constexpr int WIDTH = GameCanvas::WIDTH; // 320
|
||||||
constexpr int HEIGHT = (6 * Tile::SIZE); // 48
|
constexpr int HEIGHT = (5 * Tile::SIZE); // 40
|
||||||
|
|
||||||
// Bordes
|
// Bordes
|
||||||
constexpr int LEFT = X;
|
constexpr int LEFT = X;
|
||||||
constexpr int TOP = Y;
|
constexpr int TOP = Y;
|
||||||
constexpr int RIGHT = X + WIDTH;
|
constexpr int RIGHT = X + WIDTH;
|
||||||
constexpr int BOTTOM = Y + HEIGHT; // 240
|
constexpr int BOTTOM = Y + HEIGHT; // 200
|
||||||
} // namespace ScoreboardArea
|
} // namespace ScoreboardArea
|
||||||
|
|
||||||
namespace Collision {
|
namespace Collision {
|
||||||
|
|||||||
Reference in New Issue
Block a user