Files
coffee_crisis_arcade_edition/source/const.h

77 lines
2.3 KiB
C

#pragma once
#include <SDL2/SDL.h>
#include "common/utils.h"
#ifndef CONST_H
#define CONST_H
// Tamaño de bloque
#define BLOCK 8
#define HALF_BLOCK BLOCK / 2
// Resolución nativa del juego
#define WIDTH 320
#define HEIGHT 240
// Marcador
const int SCOREBOARD_WIDTH = WIDTH;
const int SCOREBOARD_HEIGHT = 32;
const int SCOREBOARD_X = 0;
const int SCOREBOARD_Y = HEIGHT - SCOREBOARD_HEIGHT;
// Zona de juego
const SDL_Rect windowArea = {0, 0, WIDTH, HEIGHT};
const SDL_Rect playArea = {0, 0, WIDTH, HEIGHT - SCOREBOARD_HEIGHT};
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;
// Secciones del programa
#define SECTION_PROG_LOGO 0
#define SECTION_PROG_INTRO 1
#define SECTION_PROG_TITLE 2
#define SECTION_PROG_GAME 3
#define SECTION_PROG_QUIT 4
// Subsecciones
#define SUBSECTION_GAME_PLAY_1P 0
#define SUBSECTION_GAME_PLAY_2P 1
#define SUBSECTION_GAME_PAUSE 2
#define SUBSECTION_GAME_GAMEOVER 3
#define SUBSECTION_TITLE_1 3
#define SUBSECTION_TITLE_2 4
#define SUBSECTION_TITLE_INSTRUCTIONS 5
// Ningun tipo
#define NO_KIND 0
// Colores
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};
const color_t flashColor = {0xFF, 0xFF, 0xFF};
#endif