1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00
Commit Graph

77 Commits

Author SHA1 Message Date
John Zaitseff
a75ec7479d Add center3(): centre three strings 2011-07-16 15:47:05 +10:00
John Zaitseff
b39a1a7567 Redefine CURS_ON to be CURS_NORMAL as this works better with xterm
If "-bc" (flash cursor) is passed to xterm, CURS_VISIBLE will stop it
from flashing--not the intended effect.  CURS_NORMAL will continue to
make the cursor flash with the "-bc" option.
2011-07-15 21:35:51 +10:00
John Zaitseff
4cca36441a Implement the show_status() and total_value() functions 2011-07-15 17:46:57 +10:00
John Zaitseff
34c787cc30 Correct some bugs in center(); add the center2() function 2011-07-15 14:55:56 +10:00
John Zaitseff
ab9a9359e2 Implement the show_map() function that displays the galaxy map 2011-07-15 11:19:14 +10:00
John Zaitseff
09d4455c3e Add window attributes for the galaxy map 2011-07-14 15:16:04 +10:00
John Zaitseff
c5eda1eaab Add code to the load_game() function
The load_game() function now checks for errors while opening the game
file.
2011-07-11 18:07:51 +10:00
John Zaitseff
89c3512a1b Modify the wait_for_key() routine to take a window attribute parameter 2011-07-11 17:57:52 +10:00
John Zaitseff
2a3ed550ad Remove the clrline parameter from the center() function 2011-07-11 15:56:01 +10:00
John Zaitseff
4a555235c9 Add the attr parameter to the center() function 2011-07-11 15:45:38 +10:00
John Zaitseff
20f6f6e73a Add the wait_for_key() function 2011-07-11 14:43:16 +10:00
John Zaitseff
5055ea57ac Rename get_yn_answer() to answer_yesno() 2011-07-11 14:23:16 +10:00
John Zaitseff
019734c8aa Rename the function getanswer() to get_yn_answer() 2011-07-11 13:37:48 +10:00
John Zaitseff
36a3811cd1 Add the gettxstring() function 2011-07-11 13:18:26 +10:00
John Zaitseff
60ab28c711 Add the modified status variable to gettxline()
Also correct a bug in gettxline() that always returned OK!
2011-07-11 12:28:13 +10:00
John Zaitseff
42e05ee20b Replace individual colour/window attributes with ATTR_ macros 2011-07-11 11:40:52 +10:00
John Zaitseff
dd281f795b Add gettxline() to read a line of input from the keyboard 2011-07-11 10:31:19 +10:00
John Zaitseff
1995a6a7b0 Remove the superfluous argument attr_end from attrpr()
Instead of using attr_end, simply restore the old window attributes after
printing the string.
2011-07-11 08:01:18 +10:00
John Zaitseff
ad4ed4d744 Add input routines gettxchar() and getanswer(); add various macros
In particular, add macros for KEY_TAB, KEY_RETURN and KEY_ESC, and for
CURS_ON and CURS_OFF (instead of using CURS_INVISIBLE and CURS_VISIBLE
directly: this allows redefining CURS_ON to be CURS_NORMAL).  Add more
colour pairs.
2011-07-04 22:02:01 +10:00
John Zaitseff
568c3738b2 Add the attrpr() function; add a missing va_end() call in center()
The attrpr() function prints a string with a particular set of Curses
attributes.
2011-07-04 19:41:55 +10:00
John Zaitseff
ca64093a07 Move definition of "enum curs_type"; rename CURS_VERYVISIBLE
Rename CURS_VERYVISIBLE to CURS_VISIBLE to match the system documentation
for Curses.
2011-07-04 19:15:38 +10:00
John Zaitseff
9f6c2af671 Define ATTR: select between attributes for colour and mono screens 2016-12-09 08:54:59 +11:00
John Zaitseff
10c4cb2a22 Add a "y" parameter to center(); add the COL_CENTER macro 2011-07-04 17:54:30 +10:00
John Zaitseff
4f62ef1b58 Add simple functions to manage a stack of Curses windows 2011-07-04 12:41:30 +10:00
John Zaitseff
d9ff917835 Rename MIN_COLUMNS to MIN_COLS for consistency with the COLS variable
Also define WIN_COLS and WIN_LINES: the current version of Star Traders
will only use this number of lines and columns in a terminal window.  All
calls to newwin() need to have COL_OFFSET and LINE_OFFSET added to the X
and Y starting positions to make this work.
2011-07-02 23:19:40 +10:00
John Zaitseff
abd196d2c5 Add the basic I/O functions init_screen(), end_screen() and center() 2011-07-02 21:25:57 +10:00
John Zaitseff
9e4e4b6d11 Add intf.h and intf.c: basic text input/output interface routines 2011-07-02 14:53:45 +10:00