mirror of
https://git.zap.org.au/git/trader.git
synced 2024-09-01 17:14:15 -04:00
Fix a couple of display bugs
Firstly, Ncurses addchstr() and family do not work, it seems, with multibyte strings, so use addch() instead. Secondly, PRINTABLE_MAP_VAL returns a wchar_t wide character, not a byte-sized char.
This commit is contained in:
parent
7fba9f8844
commit
74aa3e84df
@ -152,9 +152,8 @@ void exchange_stock (void)
|
||||
|
||||
for (line = 6, i = 0; i < MAX_COMPANIES; i++) {
|
||||
if (company[i].on_map) {
|
||||
mvwaddch(curwin, line, 2, PRINTABLE_MAP_VAL(COMPANY_TO_MAP(i))
|
||||
| attr_choice);
|
||||
|
||||
left(curwin, line, 2, attr_choice, 0, 0, 1, "%lc",
|
||||
(wint_t) PRINTABLE_MAP_VAL(COMPANY_TO_MAP(i)));
|
||||
left(curwin, line, 4, attr_normal, 0, 0, 1, "%ls",
|
||||
company[i].name);
|
||||
|
||||
|
@ -219,8 +219,12 @@ selection_t get_move (void)
|
||||
|
||||
// Display current move choices on the galaxy map
|
||||
for (int i = 0; i < NUMBER_MOVES; i++) {
|
||||
mvwaddchstr(curwin, game_move[i].y + 3, game_move[i].x * 2 + 2,
|
||||
CHTYPE_GAME_MOVE(i));
|
||||
chtype *movestr = CHTYPE_GAME_MOVE(i);
|
||||
|
||||
wmove(curwin, game_move[i].y + 3, game_move[i].x * 2 + 2);
|
||||
while (*movestr != 0) {
|
||||
waddch(curwin, *movestr++);
|
||||
}
|
||||
}
|
||||
wrefresh(curwin);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user