BL_FLUSH, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD,
blPAD, blPAD, blPAD, blPAD }
};
- const enum statusfields (*fieldorder)[3][15];
+ const enum statusfields (*fieldorder)[15];
xchar spacing[MAXBLSTATS], valline[MAXBLSTATS];
enum statusfields fld, prev_fld;
char *text, *p, cbuf[BUFSZ], ebuf[STATVAL_WIDTH];
*/
number_of_lines = (iflags.wc2_statuslines < 3) ? 2 : 3;
- fieldorder = (number_of_lines != 3) ? &twolineorder : &threelineorder;
+ fieldorder = (number_of_lines != 3) ? twolineorder : threelineorder;
cbuf[0] = '\0';
x = y = border ? 1 : 0; /* origin; ignored by curs_stat_conds(0) */
/* simplify testing which fields reside on which lines; assume line #0 */
(void) memset((genericptr_t) valline, 0, sizeof valline);
for (j = 1; j < number_of_lines; ++j)
- for (i = 0; (fld = (*fieldorder)[j][i]) != BL_FLUSH; ++i)
+ for (i = 0; (fld = fieldorder[j][i]) != BL_FLUSH; ++i)
valline[fld] = j;
/* iterate 0 and 1 and maybe 2 for status lines 1 and 2 and maybe 3 */
(void) memset((genericptr_t) spacing, 0, sizeof spacing);
w = xtra = 0; /* w: width so far; xtra: number of extra spaces */
prev_fld = BL_FLUSH;
- for (i = 0; (fld = (*fieldorder)[j][i]) != BL_FLUSH; ++i) {
+ for (i = 0; (fld = fieldorder[j][i]) != BL_FLUSH; ++i) {
/* when the core marks a field as disabled, it doesn't call
status_update() to tell us to throw away the old value, so
polymorph leaves stale XP and rehumanize leaves stale HD */
/* second pass for line #j -- render it */
x = y = border ? 1 : 0;
wmove(win, y + j, x);
- for (i = 0; (fld = (*fieldorder)[j][i]) != BL_FLUSH; ++i) {
+ for (i = 0; (fld = fieldorder[j][i]) != BL_FLUSH; ++i) {
if (!status_activefields[fld])
continue;
-/* NetHack 3.6 wintty.c $NHDT-Date: 1554554181 2019/04/06 12:36:21 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.201 $ */
+/* NetHack 3.6 wintty.c $NHDT-Date: 1555702074 2019/04/19 19:27:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.202 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
{ BL_LEVELDESC, BL_TIME, BL_CONDITION, BL_FLUSH, blPAD, blPAD,
blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD }
};
-static const enum statusfields (*fieldorder)[3][MAX_PER_ROW];
+static const enum statusfields (*fieldorder)[MAX_PER_ROW];
static int finalx[3][2]; /* [rows][NOW or BEFORE] */
static boolean windowdata_init = FALSE;
int i, num_rows;
num_rows = (iflags.wc2_statuslines < 3) ? 2 : 3;
- fieldorder = (num_rows != 3) ? &twolineorder : &threelineorder;
+ fieldorder = (num_rows != 3) ? twolineorder : threelineorder;
for (i = 0; i < MAXBLSTATS; ++i) {
tty_status[NOW][i].idx = BL_FLUSH;
/* should be checking for first enabled field here rather than
just first field, but 'fieldorder' doesn't start any rows
with fields which can be disabled so [any_row][0] suffices */
- if (*fmt == ' ' && (fldidx == (*fieldorder)[0][0]
- || fldidx == (*fieldorder)[1][0]
- || fldidx == (*fieldorder)[2][0]))
+ if (*fmt == ' ' && (fldidx == fieldorder[0][0]
+ || fldidx == fieldorder[1][0]
+ || fldidx == fieldorder[2][0]))
++fmt; /* skip leading space for first field on line */
Sprintf(status_vals[fldidx], fmt, text);
tty_status[NOW][fldidx].idx = fldidx;
sz[row] = 0;
col = 1;
update_right = FALSE;
- for (i = 0; (idx = (*fieldorder)[row][i]) != BL_FLUSH; ++i) {
+ for (i = 0; (idx = fieldorder[row][i]) != BL_FLUSH; ++i) {
if (!status_activefields[idx])
continue;
if (!tty_status[NOW][idx].valid)
HUPSKIP();
y = row;
tty_curs(WIN_STATUS, 1, y);
- for (i = 0; (idx = (*fieldorder)[row][i]) != BL_FLUSH; ++i) {
+ for (i = 0; (idx = fieldorder[row][i]) != BL_FLUSH; ++i) {
if (!status_activefields[idx])
continue;
x = tty_status[NOW][idx].x;