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

Function br_string2

src/dungeon.c:3387–3406  ·  view source on GitHub ↗

better br_string */

Source from the content-addressed store, hash-verified

3385
3386/* better br_string */
3387staticfn const char *
3388br_string2(branch *br)
3389{
3390 /* Special case: quest portal says closed if kicked from quest */
3391 boolean closed_portal = (br->end2.dnum == quest_dnum
3392 && u.uevent.qexpelled);
3393
3394 switch (br->type) {
3395 case BR_PORTAL:
3396 return closed_portal ? "Sealed portal" : "Portal";
3397 case BR_NO_END1:
3398 return "Connection";
3399 case BR_NO_END2:
3400 return br->end1_up ? "One way stairs up" : "One way stairs down";
3401 case BR_STAIR:
3402 return br->end1_up ? "Stairs up" : "Stairs down";
3403 }
3404
3405 return "(unknown)";
3406}
3407
3408/* get the name of an endgame level; topten.c does something similar */
3409const char *

Callers 1

print_mapseenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected