summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los_def.cc
Commit message (Collapse)AuthorAgeFilesLines
* Drop los_glob.Adam Borowski2013-12-021-28/+0
|
* More formatting fixes for return (...);Neil Moore2013-11-151-2/+2
|
* Fix some assignment operators.Neil Moore2013-10-161-2/+5
| | | | These three did not properly handle self-assignment.
* Get rid of several C_SQUARE uses.Adam Borowski2012-11-181-14/+3
| | | | | | | An absolute majority of CPU use in about every test is wasted by radius_iterator and circle_def, which implement both Chebyshev and normal metrics as calls deep inside tight loops. Untangling them is a massive work, so I'm chipping at it by a little from time to time.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+1
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Some more return deparenthesization.Adam Borowski2012-07-051-4/+4
|
* Remove parentheses around return (simple_function_call).Adam Borowski2012-07-051-3/+3
| | | | For way too paranoid and underinclusive values of "simple".
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-1/+1
|
* Remove #define LOS_MAX_RADIUSAdam Borowski2012-06-241-1/+1
| | | | | | | Having both it and LOS_RADIUS is misleading, especially as they're arbitrarily used. This distinction doesn't make sense anyway, as any LOS changes need to be done at runtime, only the max matters during compilation.
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Update actor::get_los to use global LOS.Robert Vollmert2010-03-221-1/+29
| | | | | | | | | | | | This is all not very nice. los_base is now an abstract base class for both los_def and los_glob (global LOS-backed los_def variant), and interators now take a *los_base. actor::update_los is gone. Arena LOS is quite probably broken again at the moment.
* Hack monster LOS to reduce updates.Robert Vollmert2010-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | It's now only updated if the monster has moved or is in view of the player. That means it will not necessarily be accurate if terrain or clouds are LOS-affecting monsters change/move. I'm not sure that this is much better than just not updating LOS for sleeping monsters -- depends on to what extent monsters just stay in place. Previously, crawl spent a significant amount of time with the monster LOS updates. Other options: - Calculate monster LOS on-demand (unlikely to help much) - Reduce monster LOS range away from the player (this might require some changes to LOS code to actually save time) - Track LOS globally: for each cell, which other cells are visible? An estimated 200 kB of data. This would then only be updated if terrain/clouds/LOS-affecting monsters changed.
* Hack player::los for arena.Robert Vollmert2009-11-211-4/+15
| | | | | | This should fix recent arena display problems. Also fix los_def::in_bounds to translate coordinates.
* Add los_def::get_bounds.Robert Vollmert2009-11-131-0/+5
|
* Formatting; use better constant.Robert Vollmert2009-11-081-1/+1
|
* env_show_grid is now only used inside the LOS code.Robert Vollmert2009-11-081-1/+2
| | | | | It's also called los_grid, and is a SquareArray of boolean since it doesn't need to store "objects" any more.
* Replace bounds_func with circle_def.Robert Vollmert2009-11-081-13/+13
| | | | | | | The various LOS objects and functions now accept a circle_def instead of a bounds_func. This is a little less generic, but should eventually help with iterating over coordinates in any los_def.
* Split los_def implementation out into los_def.cc.Robert Vollmert2009-11-071-0/+79