horizontal layout on 2 or 3 lines */
| 248 | |
| 249 | /* horizontal layout on 2 or 3 lines */ |
| 250 | static void |
| 251 | draw_horizontal(boolean border) |
| 252 | { |
| 253 | #define blPAD BL_FLUSH |
| 254 | /* almost all fields already come with a leading space; |
| 255 | "xspace" indicates places where we'll generate an extra one */ |
| 256 | static const enum statusfields |
| 257 | twolineorder[3][19] = { |
| 258 | { BL_TITLE, |
| 259 | /*xspace*/ BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, |
| 260 | /*xspace*/ BL_ALIGN, |
| 261 | /*xspace*/ BL_SCORE, |
| 262 | BL_FLUSH, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, |
| 263 | blPAD, blPAD, blPAD }, |
| 264 | { BL_LEVELDESC, |
| 265 | /*xspace*/ BL_GOLD, |
| 266 | /*xspace*/ BL_HP, BL_HPMAX, |
| 267 | /*xspace*/ BL_ENE, BL_ENEMAX, |
| 268 | /*xspace*/ BL_AC, |
| 269 | /*xspace*/ BL_XP, BL_EXP, BL_HD, |
| 270 | /*xspace*/ BL_TIME, |
| 271 | /*xspace*/ BL_HUNGER, BL_CAP, |
| 272 | BL_WEAPON, BL_ARMOR, BL_TERRAIN, BL_CONDITION, BL_VERS, |
| 273 | BL_FLUSH }, |
| 274 | { BL_FLUSH, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, |
| 275 | blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, |
| 276 | blPAD, blPAD, blPAD } |
| 277 | }, |
| 278 | threelineorder[3][19] = { /* moves align to line 2, leveldesc+ to 3 */ |
| 279 | { BL_TITLE, |
| 280 | /*xspace*/ BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, |
| 281 | /*xspace*/ BL_SCORE, |
| 282 | BL_FLUSH, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, |
| 283 | blPAD, blPAD, blPAD }, |
| 284 | { BL_ALIGN, |
| 285 | /*xspace*/ BL_GOLD, |
| 286 | /*xspace*/ BL_HP, BL_HPMAX, |
| 287 | /*xspace*/ BL_ENE, BL_ENEMAX, |
| 288 | /*xspace*/ BL_AC, |
| 289 | /*xspace*/ BL_XP, BL_EXP, BL_HD, |
| 290 | /*xspace*/ BL_HUNGER, BL_CAP, BL_WEAPON, BL_ARMOR, BL_TERRAIN, |
| 291 | BL_FLUSH, blPAD, blPAD, blPAD }, |
| 292 | { BL_LEVELDESC, |
| 293 | /*xspace*/ BL_TIME, |
| 294 | /*xspecial*/ BL_CONDITION, |
| 295 | /*xspecial*/ BL_VERS, |
| 296 | BL_FLUSH, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, |
| 297 | blPAD, blPAD, blPAD, blPAD, blPAD, blPAD, blPAD } |
| 298 | }; |
| 299 | const enum statusfields (*fieldorder)[19]; |
| 300 | coordxy spacing[MAXBLSTATS], valline[MAXBLSTATS]; |
| 301 | enum statusfields fld, prev_fld; |
| 302 | char *text, *p, cbuf[BUFSZ], ebuf[STATVAL_WIDTH]; |
| 303 | #ifdef SCORE_ON_BOTL |
| 304 | char *colon; |
| 305 | char sbuf[STATVAL_WIDTH]; |
| 306 | #endif |
| 307 | int i, j, number_of_lines, |
no test coverage detected