delete any camera flash light sources and draw "remembered, unseen monster" glyph at locations where a monster was flagged for being visible during transient light movement but can't be seen now */
| 327 | monster" glyph at locations where a monster was flagged for being |
| 328 | visible during transient light movement but can't be seen now */ |
| 329 | void |
| 330 | transient_light_cleanup(void) |
| 331 | { |
| 332 | struct monst *mon; |
| 333 | int mtempcount; |
| 334 | |
| 335 | /* in case we're cleaning up a camera flash, remove all object light |
| 336 | sources which aren't associated with a specific object */ |
| 337 | discard_flashes(); |
| 338 | if (gv.vision_full_recalc) /* set by del_light_source() */ |
| 339 | vision_recalc(0); |
| 340 | |
| 341 | /* for thrown/kicked candle or lamp or for camera flash, some |
| 342 | monsters may have been mapped in light which has now gone away |
| 343 | so need to be replaced by "remembered, unseen monster" glyph */ |
| 344 | mtempcount = 0; |
| 345 | for (mon = fmon; mon; mon = mon->nmon) { |
| 346 | if (DEADMONSTER(mon)) |
| 347 | continue; |
| 348 | if (mon->mtemplit) { |
| 349 | mon->mtemplit = 0; |
| 350 | ++mtempcount; |
| 351 | if (!canspotmon(mon)) |
| 352 | map_invisible(mon->mx, mon->my); |
| 353 | } |
| 354 | } |
| 355 | if (mtempcount) |
| 356 | flush_screen(0); |
| 357 | } |
| 358 | |
| 359 | /* camera flashes have Null object; caller wants to get rid of them now */ |
| 360 | staticfn void |
no test coverage detected