First Person Tetris: trigger compile time error on non-square displays
This commit is contained in:
parent
e05adbfb29
commit
f65ab6eeba
|
@ -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 *
|
||||||
|
|
|
@ -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 VIEWCOLS NUM_COLS
|
||||||
#define VIEWROWS NUM_ROWS
|
#define VIEWROWS NUM_ROWS
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define VIEWCOLS NUM_COLS
|
|
||||||
#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…
Reference in New Issue