Files
jaildoctors_dilemma/source/defines.h
Sergio Valor 78c5333144 Redistribuits els .cpp en carpetes
Actualitzat cmake
Modificats els include de SDL2 a SDL3
2025-10-15 08:28:57 +02:00

45 lines
1.6 KiB
C++

#pragma once
#include <SDL3/SDL.h>
#include <string>
#include "utils.h"
// Textos
constexpr const char* WINDOW_CAPTION = "JailDoctor's Dilemma";
constexpr const char* TEXT_COPYRIGHT = "@2022 JailDesigner";
constexpr const char* VERSION = "1.10";
// Velocidad del juego
constexpr Uint32 GAME_SPEED = 15;
// Tamaño de bloque
constexpr int BLOCK = 8;
constexpr int HALF_BLOCK = 4;
// Tamaño de la pantalla virtual
constexpr int GAMECANVAS_WIDTH = 256;
constexpr int GAMECANVAS_HEIGHT = 192;
// Zona de juego
constexpr int PLAY_AREA_TOP = (0 * BLOCK);
constexpr int PLAY_AREA_BOTTOM = (16 * BLOCK);
constexpr int PLAY_AREA_LEFT = (0 * BLOCK);
constexpr int PLAY_AREA_RIGHT = (32 * BLOCK);
constexpr int PLAY_AREA_WIDTH = PLAY_AREA_RIGHT - PLAY_AREA_LEFT;
constexpr int PLAY_AREA_HEIGHT = PLAY_AREA_BOTTOM - PLAY_AREA_TOP;
constexpr int PLAY_AREA_CENTER_X = PLAY_AREA_LEFT + (PLAY_AREA_WIDTH / 2);
constexpr int PLAY_AREA_CENTER_FIRST_QUARTER_X = (PLAY_AREA_WIDTH / 4);
constexpr int PLAY_AREA_CENTER_THIRD_QUARTER_X = (PLAY_AREA_WIDTH / 4) * 3;
constexpr int PLAY_AREA_CENTER_Y = PLAY_AREA_TOP + (PLAY_AREA_HEIGHT / 2);
constexpr int PLAY_AREA_FIRST_QUARTER_Y = PLAY_AREA_HEIGHT / 4;
constexpr int PLAY_AREA_THIRD_QUARTER_Y = (PLAY_AREA_HEIGHT / 4) * 3;
// Anclajes de pantalla
constexpr int GAMECANVAS_CENTER_X = GAMECANVAS_WIDTH / 2;
constexpr int GAMECANVAS_FIRST_QUARTER_X = GAMECANVAS_WIDTH / 4;
constexpr int GAMECANVAS_THIRD_QUARTER_X = (GAMECANVAS_WIDTH / 4) * 3;
constexpr int GAMECANVAS_CENTER_Y = GAMECANVAS_HEIGHT / 2;
constexpr int GAMECANVAS_FIRST_QUARTER_Y = GAMECANVAS_HEIGHT / 4;
constexpr int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3;