Light up a Roguelike
GolfScript, 171 characters
.n?):L)[n*.]*1/:I'@'?{\+[{1$+}*]..{I=26,{65+}%&quot;#
&quot;+\?)}??)&lt;}+{[L~.).)1L)L.(-1L~]&gt;2&lt;`{[.[~\]]{1/~2$*+L*.-1%}%\;~}+L,%~}8,%%{|}*`{1$?)I@=.n=@|\.' '={;'.'}*' 'if}+I,,%''*n%n*

The input must be provided on STDIN.
The output for the examples given above is slightly different. I verified the responses by hand and think they are correct.
Example 1:
@.........
....K.....
.J.....   
..........
.. .L.....
..  . ....
... .. ...
...  .. ..
...   .  .
....  ..  

Example 2:
.B  #M      
.# ..   Z pq
.#.#.aaa..  
@..m.#      
#.##P#      
 .#         
 .#         
 M.         
  #         

Example 3:
   ..........  .....
    ......... ..... 
     O..l...gg..rT  
...QQL......Ag..#b..
...qqqqq.........XqQ
        #.f@aa......
   Y........aaa.....
...uU..E..l.TaKK....
      d..FF.d.op    
     .... .d. ...