Cambiados muchos DEFINEs por variables de param

This commit is contained in:
2024-09-06 08:41:10 +02:00
parent c5bab7019c
commit 62b1ba84ac
23 changed files with 215 additions and 158 deletions

View File

@@ -5,35 +5,10 @@
// Tamaño de bloque
#define BLOCK 8
#define HALF_BLOCK BLOCK / 2
// Resolución nativa del juego
#define WIDTH 320
#define HEIGHT 240
// Zona de juego
const SDL_Rect windowArea = {0, 0, WIDTH, HEIGHT};
const SDL_Rect playArea = {0, 0, WIDTH, 200};
const int PLAY_AREA_TOP = 0;
const int PLAY_AREA_BOTTOM = playArea.h;
const int PLAY_AREA_LEFT = 0;
const int PLAY_AREA_RIGHT = playArea.w;
const int PLAY_AREA_WIDTH = playArea.w;
const int PLAY_AREA_HEIGHT = playArea.h;
const int PLAY_AREA_CENTER_X = PLAY_AREA_LEFT + (PLAY_AREA_WIDTH / 2);
const int PLAY_AREA_CENTER_FIRST_QUARTER_X = (PLAY_AREA_WIDTH / 4);
const int PLAY_AREA_CENTER_THIRD_QUARTER_X = (PLAY_AREA_WIDTH / 4) * 3;
const int PLAY_AREA_CENTER_Y = PLAY_AREA_TOP + (PLAY_AREA_HEIGHT / 2);
const int PLAY_AREA_FIRST_QUARTER_Y = PLAY_AREA_HEIGHT / 4;
const int PLAY_AREA_THIRD_QUARTER_Y = (PLAY_AREA_HEIGHT / 4) * 3;
// Anclajes de pantalla
const int GAMECANVAS_CENTER_X = WIDTH / 2;
const int GAMECANVAS_FIRST_QUARTER_X = WIDTH / 4;
const int GAMECANVAS_THIRD_QUARTER_X = (WIDTH / 4) * 3;
const int GAMECANVAS_CENTER_Y = HEIGHT / 2;
const int GAMECANVAS_FIRST_QUARTER_Y = HEIGHT / 4;
const int GAMECANVAS_THIRD_QUARTER_Y = (HEIGHT / 4) * 3;
// Para mejor visibilidad
#define PLAY_AREA_LEFT 0
#define PLAY_AREA_TOP 0
// Secciones del programa
#define SECTION_PROG_LOGO 0