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

Function DoUnLight

Source/lighting.cpp:635–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void DoUnLight(int nXPos, int nYPos, int nRadius)
636{
637 int x, y, min_x, min_y, max_x, max_y;
638
639 nRadius++;
640 min_y = nYPos - nRadius;
641 max_y = nYPos + nRadius;
642 min_x = nXPos - nRadius;
643 max_x = nXPos + nRadius;
644
645 if (min_y < 0) {
646 min_y = 0;
647 }
648 if (max_y > MAXDUNY) {
649 max_y = MAXDUNY;
650 }
651 if (min_x < 0) {
652 min_x = 0;
653 }
654 if (max_x > MAXDUNX) {
655 max_x = MAXDUNX;
656 }
657
658 for (y = min_y; y < max_y; y++) {
659 for (x = min_x; x < max_x; x++) {
660 if (x >= 0 && x < MAXDUNX && y >= 0 && y < MAXDUNY) {
661 dLight[x][y] = dPreLight[x][y];
662 }
663 }
664 }
665}
666
667void DoUnVision(int nXPos, int nYPos, int nRadius)
668{

Callers 1

ProcessLightListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected