TiTRIS

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

commit 62be362ef164911e78148038923a1c008bd80646
parent 11df60c16d393acab9ec4d4a66e0d3a5b47ed728
Author: joshiemoore <jxm5210@g.rit.edu>
Date:   Thu, 27 Sep 2018 20:50:34 -0400

Add graphics.c

Diffstat:
MGAME_CONSTANTS.h | 3+++
Agraphics.c | 12++++++++++++
Agraphics.h | 18++++++++++++++++++
Mtitris.c | 2+-
4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/GAME_CONSTANTS.h b/GAME_CONSTANTS.h @@ -17,6 +17,9 @@ #define BOARD_WIDTH 10 #define BOARD_HEIGHT 20 +// TILE SIZE (square) +#define TILE_SIZE 12 + // PIECE IDs enum PIECE { PIECE_I, diff --git a/graphics.c b/graphics.c @@ -0,0 +1,11 @@ +/* + * graphics.c + * Joshua Moore, 2018 + * + */ + +#include "graphics.h" + +void drawBoard(SDL_Surface* screen) { + return; +}+ \ No newline at end of file diff --git a/graphics.h b/graphics.h @@ -0,0 +1,17 @@ +/* + * graphics.h + * Joshua Moore, 2018 + * + */ + +#ifndef _GRAPHICS +#define _GRAPHICS + +#include <SDL/SDL_gfxPrimitives.h> + +/** + * Draw the game board consisting of a simple grid of white lines. + */ +void drawBoard(SDL_Surface* screen); + +#endif+ \ No newline at end of file diff --git a/titris.c b/titris.c @@ -8,10 +8,10 @@ #include <os.h> #include <SDL/SDL_config.h> #include <SDL/SDL.h> -#include <SDL/SDL_gfxPrimitives.h> // TiTRIS includes #include "GAME_CONSTANTS.h" +#include "graphics.h" int main(void) { // init screen