Global changes for qt, qt4, amiga, x11 and curses.

This commit is contained in:
Bart House
2018-12-24 21:28:44 -08:00
parent 8c1a4d9a97
commit 9069615861
13 changed files with 32 additions and 30 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ curses_character_input_dialog(const char *prompt, const char *choices,
boolean any_choice = FALSE;
boolean accept_count = FALSE;
if (invent || (moves > 1)) {
if (g.invent || (g.moves > 1)) {
curses_get_window_size(MAP_WIN, &map_height, &map_width);
} else {
map_height = term_rows;
@@ -623,7 +623,7 @@ curses_display_nhmenu(winid wid, int how, MENU_ITEM_P ** _selected)
menu_determine_pages(current_menu);
/* Display pre and post-game menus centered */
if (((moves <= 1) && !invent) || program_state.gameover) {
if (((g.moves <= 1) && !g.invent) || program_state.gameover) {
win = curses_create_window(current_menu->width,
current_menu->height, CENTER);
} else { /* Display during-game menus on the right out of the way */
+3 -3
View File
@@ -55,7 +55,7 @@ curses_message_win_puts(const char *message, boolean recursed)
return;
}
if (suppress_turn == moves) {
if (suppress_turn == g.moves) {
return;
}
@@ -94,7 +94,7 @@ curses_message_win_puts(const char *message, boolean recursed)
/* Pause until key is hit - Esc suppresses any further
messages that turn */
if (curses_more() == '\033') {
suppress_turn = moves;
suppress_turn = g.moves;
return;
}
} else {
@@ -566,7 +566,7 @@ mesg_add_line(char *mline)
nhprev_mesg *current_mesg = malloc(sizeof (nhprev_mesg));
current_mesg->str = curses_copy_of(mline);
current_mesg->turn = moves;
current_mesg->turn = g.moves;
current_mesg->next_mesg = NULL;
if (num_messages == 0) {
+6 -6
View File
@@ -1182,7 +1182,7 @@ draw_horizontal(int x, int y, int hp, int hpmax)
wprintw(win, "%s", buf);
print_statdiff("$", &prevau, money_cnt(invent), STAT_GOLD);
print_statdiff("$", &prevau, money_cnt(g.invent), STAT_GOLD);
/* HP/Pw use special coloring rules */
attr_t hpattr, pwattr;
@@ -1220,7 +1220,7 @@ draw_horizontal(int x, int y, int hp, int hpmax)
print_statdiff(" Exp:", &prevlevel, u.ulevel, STAT_OTHER);
if (flags.time)
print_statdiff(" T:", &prevtime, moves, STAT_TIME);
print_statdiff(" T:", &prevtime, g.moves, STAT_TIME);
curses_add_statuses(win, FALSE, FALSE, NULL, NULL);
}
@@ -1293,7 +1293,7 @@ draw_horizontal_new(int x, int y, int hp, int hpmax)
wprintw(win, "Pw:");
draw_bar(FALSE, u.uen, u.uenmax, NULL);
print_statdiff(" $", &prevau, money_cnt(invent), STAT_GOLD);
print_statdiff(" $", &prevau, money_cnt(g.invent), STAT_GOLD);
#ifdef SCORE_ON_BOTL
if (flags.showscore)
@@ -1301,7 +1301,7 @@ draw_horizontal_new(int x, int y, int hp, int hpmax)
#endif /* SCORE_ON_BOTL */
if (flags.time)
print_statdiff(" T:", &prevtime, moves, STAT_TIME);
print_statdiff(" T:", &prevtime, g.moves, STAT_TIME);
curses_add_statuses(win, TRUE, FALSE, &x, &y);
@@ -1409,7 +1409,7 @@ draw_vertical(int x, int y, int hp, int hpmax)
wprintw(win, "%d", depth(&u.uz));
wmove(win, y++, x);
print_statdiff("Gold: ", &prevau, money_cnt(invent), STAT_GOLD);
print_statdiff("Gold: ", &prevau, money_cnt(g.invent), STAT_GOLD);
wmove(win, y++, x);
/* HP/Pw use special coloring rules */
@@ -1453,7 +1453,7 @@ draw_vertical(int x, int y, int hp, int hpmax)
wmove(win, y++, x);
if (flags.time) {
print_statdiff("Time: ", &prevtime, moves, STAT_TIME);
print_statdiff("Time: ", &prevtime, g.moves, STAT_TIME);
wmove(win, y++, x);
}
+5 -5
View File
@@ -58,7 +58,7 @@ curses_create_window(int width, int height, orient orientation)
if ((orientation == UP) || (orientation == DOWN) ||
(orientation == LEFT) || (orientation == RIGHT)) {
if (invent || (moves > 1)) {
if (g.invent || (g.moves > 1)) {
map_border = curses_window_has_border(MAP_WIN);
curses_get_window_xy(MAP_WIN, &mapx, &mapy);
curses_get_window_size(MAP_WIN, &maph, &mapw);
@@ -92,7 +92,7 @@ curses_create_window(int width, int height, orient orientation)
starty = (term_rows / 2) - (height / 2);
break;
case UP:
if (invent || (moves > 1)) {
if (g.invent || (g.moves > 1)) {
startx = (mapw / 2) - (width / 2) + mapx + mapb_offset;
} else {
startx = 0;
@@ -101,7 +101,7 @@ curses_create_window(int width, int height, orient orientation)
starty = mapy + mapb_offset;
break;
case DOWN:
if (invent || (moves > 1)) {
if (g.invent || (g.moves > 1)) {
startx = (mapw / 2) - (width / 2) + mapx + mapb_offset;
} else {
startx = 0;
@@ -117,7 +117,7 @@ curses_create_window(int width, int height, orient orientation)
starty = term_rows - height;
break;
case RIGHT:
if (invent || (moves > 1)) {
if (g.invent || (g.moves > 1)) {
startx = (mapw + mapx + (mapb_offset * 2)) - width;
} else {
startx = term_cols - width;
@@ -167,7 +167,7 @@ curses_refresh_nethack_windows()
map_window = curses_get_nhwin(MAP_WIN);
inv_window = curses_get_nhwin(INV_WIN);
if ((moves <= 1) && !invent) {
if ((g.moves <= 1) && !g.invent) {
/* Main windows not yet displayed; refresh base window instead */
touchwin(stdscr);
refresh();