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

Function endgamelevelname

src/dungeon.c:3409–3437  ·  view source on GitHub ↗

get the name of an endgame level; topten.c does something similar */

Source from the content-addressed store, hash-verified

3407
3408/* get the name of an endgame level; topten.c does something similar */
3409const char *
3410endgamelevelname(char *outbuf, int indx)
3411{
3412 const char *planename = 0;
3413
3414 *outbuf = '\0';
3415 switch (indx) {
3416 case -5:
3417 Strcpy(outbuf, "Astral Plane");
3418 break;
3419 case -4:
3420 planename = "Water";
3421 break;
3422 case -3:
3423 planename = "Fire";
3424 break;
3425 case -2:
3426 planename = "Air";
3427 break;
3428 case -1:
3429 planename = "Earth";
3430 break;
3431 }
3432 if (planename)
3433 Sprintf(outbuf, "Plane of %s", planename);
3434 else if (!*outbuf)
3435 Sprintf(outbuf, "unknown plane #%d", indx);
3436 return outbuf;
3437}
3438
3439/* short shop description */
3440staticfn const char *

Callers 3

print_mapseenFunction · 0.85
describe_levelFunction · 0.85
background_enlightenmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected