MCPcopy Create free account
hub / github.com/diasurgical/devilution / MonstPlace

Function MonstPlace

Source/monster.cpp:516–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516BOOL MonstPlace(int xp, int yp)
517{
518 char f;
519
520 if (xp < 0 || xp >= MAXDUNX
521 || yp < 0 || yp >= MAXDUNY
522 || dMonster[xp][yp]
523 || dPlayer[xp][yp]) {
524 return FALSE;
525 }
526
527 f = dFlags[xp][yp];
528
529 if (f & BFLAG_VISIBLE) {
530 return FALSE;
531 }
532
533 if (f & BFLAG_POPULATED) {
534 return FALSE;
535 }
536
537 return !SolidLoc(xp, yp);
538}
539
540void PlaceMonster(int i, int mtype, int x, int y)
541{

Callers 2

PlaceUniqueMonstFunction · 0.85
PlaceGroupFunction · 0.85

Calls 1

SolidLocFunction · 0.85

Tested by

no test coverage detected