summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/coord-circle.cc
Commit message (Collapse)AuthorAgeFilesLines
* Drop the now unused circle_iterator.Adam Borowski2013-12-021-5/+0
| | | | It turns out it was only an implementation detail of radius_iterator.
* More formatting fixes for return (...);Neil Moore2013-11-151-1/+1
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-1/+1
|
* Get rid of a strange accessor.Adam Borowski2013-11-051-1/+1
|
* Eradicate C_SQUARE/SH_SQUARE.Adam Borowski2013-11-051-20/+4
| | | | | circle_def can now be replaced by just a center + radius instead of a complex object.
* Shave some words off a few datatypes.Samuel Bronson2013-10-171-5/+5
| | | | (I wonder if this saves even one kilobyte?)
* Use std namespace.Raphael Langella2012-08-261-4/+4
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Remove parentheses around return (simple_function_call).Adam Borowski2012-07-051-2/+2
| | | | For way too paranoid and underinclusive values of "simple".
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-5/+5
|
* 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.
* Replace a bunch of floating-point sqrt()s by integer ones.Adam Borowski2011-11-131-3/+2
|
* Fix horrible coord-circle origin hack.Robert Vollmert2010-03-281-5/+6
| | | | | | | | | | | It's now tracking whether to check map_bounds explicitly; this is enabled or not depending on the used constructor. Fixes issue #1191 (crash on Shoals 5 when drawing water tiles near (0,0), where (0,0) had been magically detected. I'm not confident this doesn't cause other issues, however, since it seems too easy.
* msvc: fix ambiguous calls to sqrt(), log(), etcSteven Noonan2010-01-311-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Nuke a whole lot of old-style casts, and remove some casts completelyHaran Pilpel2010-01-291-1/+1
| | | | | (you don't need to cast an X* to a void* and you don't need to cast arguments to math.h functions such as sqrt.)
* Disambiguate uses of sqrt by casting to double.Robert Vollmert2010-01-241-1/+1
| | | | Should fix a a Visual Studio compile error (felirx).
* Fix compilation on gcc.Adam Borowski2009-11-181-0/+3
|
* Fix circle_def's ignoring global LOS radius.Robert Vollmert2009-11-181-1/+2
| | | | | | circle_def::contains was disregarding the los_radius field. This led to lantern of shadows not working (reported by peten on ##crawl).
* Add translating constructor to circle_def.Robert Vollmert2009-11-131-0/+13
|
* Make circle_def aware of map bounds.Robert Vollmert2009-11-131-0/+4
| | | | | circle_def now has two modes, depending on whether origin is set. This is a little ugly.
* Add method to intersect rectangles.Robert Vollmert2009-11-131-0/+15
| | | | | Also define rectangle RECT_MAP_BOUNDS and add containment check to rect_def.
* Reimplement radius_iterator on the basis of circle_def.Robert Vollmert2009-11-131-29/+10
|
* coord-circle.cc: set radius_sq before useMatthew Cline2009-11-111-1/+1
|
* Create coord-circle.cc containing circle_def.Robert Vollmert2009-11-081-0/+106
circle_def unifies the shapes that a radius_iterator can iterate over. It's meant to replace bounds_func in losparam.h and eventually provide a base for radius_iterator.