* block_point() * * Make the location opaque to light. */
| 862 | * Make the location opaque to light. |
| 863 | */ |
| 864 | void |
| 865 | block_point(int x, int y) |
| 866 | { |
| 867 | #ifdef DEBUG |
| 868 | /* set DEBUGFILES=seethru in environment to see through clouds & water */ |
| 869 | if (gs.seethru == 0) { /* init once */ |
| 870 | gs.seethru = (wizard && explicitdebug("seethru")) ? 1 : -1; |
| 871 | } |
| 872 | if (gs.seethru == 1) { |
| 873 | if (!does_block(x, y, &levl[x][y])) |
| 874 | return; |
| 875 | } |
| 876 | #endif |
| 877 | |
| 878 | fill_point(y, x); |
| 879 | |
| 880 | /* recalc light sources here? */ |
| 881 | |
| 882 | /* |
| 883 | * We have to do a full vision recalculation if we "could see" the |
| 884 | * location. Why? Suppose some monster opened a way so that the |
| 885 | * hero could see a lit room. However, the position of the opening |
| 886 | * was out of night-vision range of the hero. Suddenly the hero should |
| 887 | * see the lit room. |
| 888 | */ |
| 889 | if (gv.viz_array[y][x]) |
| 890 | gv.vision_full_recalc = 1; |
| 891 | } |
| 892 | |
| 893 | /* |
| 894 | * unblock_point() |
no test coverage detected