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

Function get_location_coord

src/sp_lev.c:1336–1353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334}
1335
1336void
1337get_location_coord(
1338 coordxy *x, coordxy *y,
1339 int humidity,
1340 struct mkroom *croom,
1341 long crd)
1342{
1343 unpacked_coord c;
1344
1345 c = get_unpacked_coord(crd, humidity);
1346 *x = c.x;
1347 *y = c.y;
1348 get_location(x, y, c.getloc_flags | (c.is_random ? NO_LOC_WARN : 0),
1349 croom);
1350
1351 if (*x == -1 && *y == -1 && c.is_random)
1352 get_location(x, y, humidity, croom);
1353}
1354
1355/*
1356 * Get a relative position inside a room.

Callers 15

l_selection_setpointFunction · 0.85
l_selection_getpointFunction · 0.85
l_selection_lineFunction · 0.85
l_selection_rectFunction · 0.85
l_selection_fillrectFunction · 0.85
l_selection_randlineFunction · 0.85
l_selection_floodFunction · 0.85
l_selection_circleFunction · 0.85
l_selection_ellipseFunction · 0.85
get_free_room_locFunction · 0.85
create_trapFunction · 0.85
create_monsterFunction · 0.85

Calls 2

get_unpacked_coordFunction · 0.85
get_locationFunction · 0.85

Tested by

no test coverage detected