mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -05:00
Add some more definitions, especially for the Curses library
This commit is contained in:
parent
9453cfc402
commit
ee94d86b57
@ -39,6 +39,9 @@
|
||||
* Constants and type declarations *
|
||||
************************************************************************/
|
||||
|
||||
#define MIN_COLUMNS (80) /* Minimum number of columns in terminal */
|
||||
#define MIN_LINES (24) /* Minimum number of lines in terminal */
|
||||
|
||||
#define MAX_X (38) /* Map dimensions MAP_X x MAP_Y */
|
||||
#define MAX_Y (12)
|
||||
#define STAR_RATIO (0.10) /* 10% of map should be stars */
|
||||
|
@ -70,6 +70,13 @@
|
||||
* Miscellaneous definitions *
|
||||
************************************************************************/
|
||||
|
||||
// Visibility of the cursor in Curses
|
||||
#define CURS_INVISIBLE (0)
|
||||
#define CURS_NORMAL (1)
|
||||
#define CURS_VISIBLE (1)
|
||||
#define CURS_VERYVISIBLE (2)
|
||||
|
||||
|
||||
// For future use in internationalisation
|
||||
#ifndef _
|
||||
# define _(x) (x)
|
||||
|
@ -62,6 +62,7 @@ int main (int argc, char *argv[])
|
||||
// Testing...
|
||||
initscr();
|
||||
noecho();
|
||||
curs_set(CURS_INVISIBLE);
|
||||
timeout(-1);
|
||||
keypad(stdscr, true);
|
||||
raw();
|
||||
@ -76,6 +77,8 @@ int main (int argc, char *argv[])
|
||||
|
||||
printw(_("Type some keys (^C to exit):\n\n"));
|
||||
|
||||
curs_set(CURS_VERYVISIBLE);
|
||||
|
||||
int c = 0;
|
||||
while ((c = getch()) != 3) {
|
||||
if ((c >= 0) && (c < 32)) {
|
||||
|
@ -35,7 +35,8 @@
|
||||
* Global definitions *
|
||||
************************************************************************/
|
||||
|
||||
#define GAME_FILE_API_VERSION "7.0" /* For game loads and saves */
|
||||
#define GAME_FILE_HEADER "Star Traders Saved Game"
|
||||
#define GAME_FILE_API_VERSION "7.0" /* For game loads and saves */
|
||||
|
||||
|
||||
/************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user