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

This commit is contained in:
Christian Kroll 2014-05-18 02:10:07 +02:00
parent e05adbfb29
commit f65ab6eeba
2 changed files with 5 additions and 17 deletions

View File

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

View File

@ -52,23 +52,8 @@
/** color of line counter */
#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 VIEWROWS NUM_ROWS
#endif
#if VIEWROWS >= 20
#define TETRIS_VIEW_YOFFSET_DUMP ((VIEWROWS - 20) / 2)