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

Function sel_set_door

src/sp_lev.c:4646–4662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644}
4645
4646staticfn void
4647sel_set_door(coordxy dx, coordxy dy, genericptr_t arg)
4648{
4649 coordxy typ = *(coordxy *) arg;
4650 coordxy x = dx, y = dy;
4651
4652 if (!IS_DOOR(levl[x][y].typ) && levl[x][y].typ != SDOOR)
4653 levl[x][y].typ = (typ & D_SECRET) ? SDOOR : DOOR;
4654 if (typ & D_SECRET) {
4655 typ &= ~D_SECRET;
4656 if (typ < D_CLOSED)
4657 typ = D_CLOSED;
4658 }
4659 set_door_orientation(x, y); /* set/clear levl[x][y].horizontal */
4660 levl[x][y].doormask = typ;
4661 SpLev_Map[x][y] = 1;
4662}
4663
4664DISABLE_WARNING_UNREACHABLE_CODE
4665

Callers 1

lspo_doorFunction · 0.85

Calls 1

set_door_orientationFunction · 0.85

Tested by

no test coverage detected