MCPcopy Create free account
hub / github.com/NetHack/NetHack / t_warn

Function t_warn

src/display.c:3452–3498  ·  view source on GitHub ↗

Print out a T wall warning and all interesting info. */

Source from the content-addressed store, hash-verified

3450
3451/* Print out a T wall warning and all interesting info. */
3452staticfn void
3453t_warn(struct rm *lev)
3454{
3455 static const char warn_str[] = "wall_angle: %s: case %d: seenv = 0x%x";
3456 const char *wname;
3457
3458 /* 5.0: non-T_wall cases added after shop repair (via breaching a wall,
3459 using locking magic to put a door there, then unlocking the door;
3460 D_CLOSED carried over to the wall) triggered warning for "unknown" */
3461 switch (lev->typ) {
3462 case TUWALL:
3463 wname = "tuwall";
3464 break;
3465 case TLWALL:
3466 wname = "tlwall";
3467 break;
3468 case TRWALL:
3469 wname = "trwall";
3470 break;
3471 case TDWALL:
3472 wname = "tdwall";
3473 break;
3474 case VWALL:
3475 wname = "vwall";
3476 break;
3477 case HWALL:
3478 wname = "hwall";
3479 break;
3480 case TLCORNER:
3481 wname = "tlcorner";
3482 break;
3483 case TRCORNER:
3484 wname = "trcorner";
3485 break;
3486 case BLCORNER:
3487 wname = "blcorner";
3488 break;
3489 case BRCORNER:
3490 wname = "brcorner";
3491 break;
3492 default:
3493 wname = "unknown";
3494 break;
3495 }
3496 impossible(warn_str, wname, lev->wall_info & WM_MASK,
3497 (unsigned int) lev->seenv);
3498}
3499
3500/*
3501 * Return the correct graphics character index using wall type, wall mode,

Callers 1

wall_angleFunction · 0.85

Calls 1

impossibleFunction · 0.70

Tested by

no test coverage detected