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

Function get_wall_for_db

src/dbridge.c:210–227  ·  view source on GitHub ↗

* Find the drawbridge wall associated with a drawbridge. */

Source from the content-addressed store, hash-verified

208 * Find the drawbridge wall associated with a drawbridge.
209 */
210staticfn void
211get_wall_for_db(coordxy *x, coordxy *y)
212{
213 switch (levl[*x][*y].drawbridgemask & DB_DIR) {
214 case DB_NORTH:
215 (*y)--;
216 break;
217 case DB_SOUTH:
218 (*y)++;
219 break;
220 case DB_EAST:
221 (*x)++;
222 break;
223 case DB_WEST:
224 (*x)--;
225 break;
226 }
227}
228
229/*
230 * Creation of a drawbridge at pos x,y.

Callers 4

do_entityFunction · 0.85
close_drawbridgeFunction · 0.85
open_drawbridgeFunction · 0.85
destroy_drawbridgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected