| 116 | } |
| 117 | |
| 118 | void calclightsource(const persistent_entity &l, float fade = 1, bool flicker = true) |
| 119 | { |
| 120 | int reach = l.attr1; |
| 121 | int sx = l.x-reach; |
| 122 | int ex = l.x+reach; |
| 123 | int sy = l.y-reach; |
| 124 | int ey = l.y+reach; |
| 125 | |
| 126 | const float s = 0.8f; |
| 127 | |
| 128 | for(float sx2 = (float)sx; sx2<=ex; sx2+=s*2) { lightray(sx2, (float)sy, l, fade, flicker); lightray(sx2, (float)ey, l, fade, flicker); } |
| 129 | for(float sy2 = sy+s; sy2<=ey-s; sy2+=s*2) { lightray((float)sx, sy2, l, fade, flicker); lightray((float)ex, sy2, l, fade, flicker); } |
| 130 | } |
| 131 | |
| 132 | void postlightarealine(sqr *s, int len) |
| 133 | { |