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

Function search_special

src/mkroom.c:764–780  ·  view source on GitHub ↗

* Search for a special room given its type (zoo, court, etc...) * Special values : * - ANY_SHOP * - ANY_TYPE */

Source from the content-addressed store, hash-verified

762 * - ANY_TYPE
763 */
764struct mkroom *
765search_special(schar type)
766{
767 struct mkroom *croom;
768
769 for (croom = &svr.rooms[0]; croom->hx >= 0; croom++)
770 if ((type == ANY_TYPE && croom->rtype != OROOM)
771 || (type == ANY_SHOP && croom->rtype >= SHOPBASE)
772 || croom->rtype == type)
773 return croom;
774 for (croom = &gs.subrooms[0]; croom->hx >= 0; croom++)
775 if ((type == ANY_TYPE && croom->rtype != OROOM)
776 || (type == ANY_SHOP && croom->rtype >= SHOPBASE)
777 || croom->rtype == type)
778 return croom;
779 return (struct mkroom *) 0;
780}
781
782struct permonst *
783courtmon(void)

Callers 5

vault_teleFunction · 0.85
mvault_teleFunction · 0.85
dosoundsFunction · 0.85
check_special_roomFunction · 0.85
shkgoneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected