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

Function get_unpacked_coord

src/sp_lev.c:1316–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1314}
1315
1316staticfn unpacked_coord
1317get_unpacked_coord(long loc, int defhumidity)
1318{
1319 static unpacked_coord c;
1320
1321 if (loc & SP_COORD_IS_RANDOM) {
1322 c.x = c.y = -1;
1323 c.is_random = 1;
1324 c.getloc_flags = (getloc_flags_t)(loc & ~SP_COORD_IS_RANDOM);
1325 if (!c.getloc_flags)
1326 c.getloc_flags = defhumidity;
1327 } else {
1328 c.is_random = 0;
1329 c.getloc_flags = defhumidity;
1330 c.x = SP_COORD_X(loc);
1331 c.y = SP_COORD_Y(loc);
1332 }
1333 return c;
1334}
1335
1336void
1337get_location_coord(

Callers 2

sp_lev.cFile · 0.85
get_location_coordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected