Re-added the option to use vt100 escape codes
This commit is contained in:
parent
a2142a48b5
commit
2b27aef099
7 changed files with 244 additions and 26 deletions
57
ui_ncurses.c
57
ui_ncurses.c
|
|
@ -20,6 +20,51 @@
|
|||
#include <ncurses.h>
|
||||
#include <locale.h>
|
||||
|
||||
#ifndef INPUT_X
|
||||
#define INPUT_X 2
|
||||
#endif
|
||||
#ifndef INPUT_Y
|
||||
#define INPUT_Y 1
|
||||
#endif
|
||||
|
||||
#ifdef ARROWS
|
||||
|
||||
#ifndef SCOREBOARD_X
|
||||
#define SCOREBOARD_X 2
|
||||
#endif
|
||||
#ifndef SCOREBOARD_Y
|
||||
#define SCOREBOARD_Y 1
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef SCOREBOARD_X
|
||||
#define SCOREBOARD_X INPUT_X
|
||||
#endif
|
||||
#ifndef SCOREBOARD_Y
|
||||
#define SCOREBOARD_Y INPUT_Y + 2
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_X
|
||||
#define BOARD_X SCOREBOARD_X + 28
|
||||
#endif
|
||||
#ifndef BOARD_Y
|
||||
#define BOARD_Y SCOREBOARD_Y + 1
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_DX
|
||||
#define BOARD_DX 3
|
||||
#endif
|
||||
#ifndef BOARD_DY
|
||||
#define BOARD_DY 1
|
||||
#endif
|
||||
|
||||
#ifndef SCOREBOARD_HEIGTH
|
||||
#define SCOREBOARD_HEIGTH 10
|
||||
#endif
|
||||
|
||||
void initBoard( void ){
|
||||
setlocale(LC_ALL, "");
|
||||
initscr();
|
||||
|
|
@ -249,9 +294,19 @@ int askColumn(
|
|||
}
|
||||
|
||||
#ifndef ONLYPUT
|
||||
static move_t askMove( void ){
|
||||
move_t askMove( void ){
|
||||
move_t move = PUT;
|
||||
// TODO: actually ask what move
|
||||
return move;
|
||||
}
|
||||
#endif /* ! ONLYPUT */
|
||||
|
||||
#undef INPUT_X
|
||||
#undef INPUT_Y
|
||||
#undef SCOREBOARD_X
|
||||
#undef SCOREBOARD_Y
|
||||
#undef BOARD_X
|
||||
#undef BOARD_Y
|
||||
#undef BOARD_DX
|
||||
#undef BOARD_DY
|
||||
#undef SCOREBOARD_HEIGTH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue