… | |
… | |
268 | if (dy <= 0) enqueue (dx, dy - 1, FLG_YI); |
268 | if (dy <= 0) enqueue (dx, dy - 1, FLG_YI); |
269 | } |
269 | } |
270 | } |
270 | } |
271 | } |
271 | } |
272 | |
272 | |
273 | /* returns true if op carries one or more lights |
|
|
274 | * This is a trivial function now days, but it used to |
|
|
275 | * be a bit longer. Probably better for callers to just |
|
|
276 | * check the op->glow_radius instead of calling this. |
|
|
277 | */ |
|
|
278 | int |
|
|
279 | has_carried_lights (const object *op) |
|
|
280 | { |
|
|
281 | /* op may glow! */ |
|
|
282 | if (op->glow_radius > 0) |
|
|
283 | return 1; |
|
|
284 | |
|
|
285 | return 0; |
|
|
286 | } |
|
|
287 | |
|
|
288 | /* radius, distance => lightness adjust */ |
273 | /* radius, distance => lightness adjust */ |
289 | static sint8 light_atten[MAX_LIGHT_RADIUS * 2 + 1][MAX_LIGHT_RADIUS * 3 / 2 + 1]; |
274 | static sint8 light_atten[MAX_LIGHT_RADIUS * 2 + 1][MAX_LIGHT_RADIUS * 3 / 2 + 1]; |
290 | static sint8 vision_atten[MAX_DARKNESS + SEE_IN_DARK_RADIUS + 1][(MAX_DARKNESS + SEE_IN_DARK_RADIUS) * 3 / 2 + 1]; |
275 | static sint8 vision_atten[MAX_DARKNESS + SEE_IN_DARK_RADIUS + 1][(MAX_DARKNESS + SEE_IN_DARK_RADIUS) * 3 / 2 + 1]; |
291 | |
276 | |
292 | static struct los_init |
277 | static struct los_init |