TiTRIS

unfinished Tetris clone for TI-nspire CX
git clone git://squid-tech.com/TiTRIS.git
Log | Files | Refs | README

commit 11df60c16d393acab9ec4d4a66e0d3a5b47ed728
parent 5a95755e68c1b74cf7d50afe2fdd323431ffdc84
Author: joshiemoore <jxm5210@g.rit.edu>
Date:   Thu, 27 Sep 2018 20:41:28 -0400

Reconfigure header file

Diffstat:
MGAME_CONSTANTS.h | 16+++++++++++++---
Mtitris.c | 2+-
2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/GAME_CONSTANTS.h b/GAME_CONSTANTS.h @@ -6,9 +6,16 @@ * */ -// board dimensions -const int BOARD_WIDTH = 10; -const int BOARD_HEIGHT = 20; +#ifndef _GAME_CONSTANTS +#define _GAME_CONSTANTS + +// SCREEN DIMENSIONS +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 240 + +// BOARD DIMENSIONS +#define BOARD_WIDTH 10 +#define BOARD_HEIGHT 20 // PIECE IDs enum PIECE { @@ -22,3 +29,6 @@ enum PIECE { }; // piece colors + + +#endif diff --git a/titris.c b/titris.c @@ -18,7 +18,7 @@ int main(void) { SDL_Surface* screen; SDL_Init(SDL_INIT_VIDEO); - screen = SDL_SetVideoMode(320, 240, has_colors ? 16 : 8, + screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, has_colors ? 16 : 8, SDL_SWSURFACE); // draw initial blank screen