Definidas areas para cada zona del juego
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include "common/utils.h"
|
||||
#include "lang.h"
|
||||
|
||||
#ifndef CONST_H
|
||||
#define CONST_H
|
||||
@@ -11,20 +10,24 @@
|
||||
#define BLOCK 8
|
||||
#define HALF_BLOCK BLOCK / 2
|
||||
|
||||
// Tamaño de la pantalla virtual
|
||||
// Resolución nativa del juego
|
||||
#define GAMECANVAS_WIDTH 256
|
||||
#define GAMECANVAS_HEIGHT 192
|
||||
|
||||
// Marcador
|
||||
const int SCOREBOARD_HEIGHT = (4 * BLOCK);
|
||||
const int SCOREBOARD_WIDTH = GAMECANVAS_WIDTH;
|
||||
const int SCOREBOARD_HEIGHT = 32;
|
||||
const int SCOREBOARD_X = 0;
|
||||
const int SCOREBOARD_Y = GAMECANVAS_HEIGHT - SCOREBOARD_HEIGHT;
|
||||
|
||||
// Zona de juego
|
||||
const int PLAY_AREA_TOP = (0 * BLOCK);
|
||||
const int PLAY_AREA_BOTTOM = GAMECANVAS_HEIGHT - SCOREBOARD_HEIGHT;
|
||||
const int PLAY_AREA_LEFT = (0 * BLOCK);
|
||||
const int PLAY_AREA_RIGHT = GAMECANVAS_WIDTH - (0 * BLOCK);
|
||||
const int PLAY_AREA_WIDTH = PLAY_AREA_RIGHT - PLAY_AREA_LEFT;
|
||||
const int PLAY_AREA_HEIGHT = PLAY_AREA_BOTTOM - PLAY_AREA_TOP;
|
||||
const SDL_Rect playArea = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT - SCOREBOARD_HEIGHT};
|
||||
const int PLAY_AREA_TOP = playArea.y;
|
||||
const int PLAY_AREA_BOTTOM = playArea.y + playArea.h;
|
||||
const int PLAY_AREA_LEFT = playArea.x;
|
||||
const int PLAY_AREA_RIGHT = playArea.x + 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;
|
||||
@@ -64,5 +67,10 @@ const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3;
|
||||
const color_t bgColor = {0x27, 0x27, 0x36};
|
||||
const color_t noColor = {0xFF, 0xFF, 0xFF};
|
||||
const color_t shdwTxtColor = {0x43, 0x43, 0x4F};
|
||||
const color_t separator = {0x0D, 0x1A, 0x2B};
|
||||
const color_t scoreboardColor = {46, 63, 71};
|
||||
const color_t difficultyEasyColor = {75, 105, 47};
|
||||
const color_t difficultyNormalColor = {255, 122, 0};
|
||||
const color_t difficultyHardColor = {118, 66, 138};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user