Browse Source

First Person Tetris: trigger compile time error on non-square displays

feature/2015
Christian Kroll 11 years ago
parent
commit
f65ab6eeba
  1. 3
      src/games/tetris/variant_fp.c
  2. 15
      src/games/tetris/view.c

3
src/games/tetris/variant_fp.c

@ -32,6 +32,9 @@
#include "variant_std.h" #include "variant_std.h"
#include "variant_fp.h" #include "variant_fp.h"
#if (NUM_ROWS != NUM_COLS)
#error "First Person Tetris does not support non-square displays!"
#endif
/*************** /***************
* entry point * * entry point *

15
src/games/tetris/view.c

@ -52,23 +52,8 @@
/** color of line counter */ /** color of line counter */
#define TETRIS_VIEW_COLORCOUNTER 2 #define TETRIS_VIEW_COLORCOUNTER 2
#ifdef GAME_TETRIS_FP
#if NUM_ROWS < NUM_COLS
#define VIEWCOLS NUM_ROWS
#define VIEWROWS NUM_ROWS
#elif NUM_ROWS > NUM_COLS
#define VIEWCOLS NUM_COLS
#define VIEWROWS NUM_COLS
#else
#define VIEWCOLS NUM_COLS
#define VIEWROWS NUM_ROWS
#endif
#else
#define VIEWCOLS NUM_COLS #define VIEWCOLS NUM_COLS
#define VIEWROWS NUM_ROWS #define VIEWROWS NUM_ROWS
#endif
#if VIEWROWS >= 20 #if VIEWROWS >= 20
#define TETRIS_VIEW_YOFFSET_DUMP ((VIEWROWS - 20) / 2) #define TETRIS_VIEW_YOFFSET_DUMP ((VIEWROWS - 20) / 2)

Loading…
Cancel
Save