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

Function dirtocoord

src/cmd.c:3858–3865  ·  view source on GitHub ↗

convert a direction code into an x,y pair */

Source from the content-addressed store, hash-verified

3856
3857/* convert a direction code into an x,y pair */
3858void
3859dirtocoord(coord *cc, int dd)
3860{
3861 if (dd > DIR_ERR && dd < N_DIRS_Z) {
3862 cc->x = xdir[dd];
3863 cc->y = ydir[dd];
3864 }
3865}
3866
3867/* also sets u.dz, but returns false for <> */
3868int

Callers 4

landing_spotFunction · 0.85
set_msg_dirFunction · 0.85
dog_moveFunction · 0.85
hero_behind_chokepointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected