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

Function DoUnVision

Source/lighting.cpp:667–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667void DoUnVision(int nXPos, int nYPos, int nRadius)
668{
669 int i, j, x1, y1, x2, y2;
670
671 nRadius++;
672 y1 = nYPos - nRadius;
673 y2 = nYPos + nRadius;
674 x1 = nXPos - nRadius;
675 x2 = nXPos + nRadius;
676
677 if (y1 < 0) {
678 y1 = 0;
679 }
680 if (y2 > MAXDUNY) {
681 y2 = MAXDUNY;
682 }
683 if (x1 < 0) {
684 x1 = 0;
685 }
686 if (x2 > MAXDUNX) {
687 x2 = MAXDUNX;
688 }
689
690 for (i = x1; i < x2; i++) {
691 for (j = y1; j < y2; j++) {
692 dFlags[i][j] &= ~(BFLAG_VISIBLE | BFLAG_LIT);
693 }
694 }
695}
696
697void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
698{

Callers 2

ProcessVisionListFunction · 0.85
InitMonstersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected