summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_los.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-0/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-7/+7
|
* Make some more functions static/gone.Adam Borowski2012-03-251-3/+3
|
* Straighten the two cell_see_cell() confusion.Adam Borowski2011-09-051-1/+2
| | | | | | | | | | | | There were two functions: one used no cache and ignored clouds, another one has a cache and accepts different LOS models. I added a new cached model: LOS_SOLID (using opc_solid). All but one uses of opc_fullyopaque (two-argument cell_see_cell()) were bugs to me, so they were moved to a different model. This makes Refrigeration not work through glass walls anymore (it still works though clouds).
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+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.
* Remove libutil.h from AppHdr.h and include explicitly.Robert Vollmert2010-01-201-0/+1
| | | | | | | Also extract unwind_var template to unwind.h. The latter is now included from AppHdr.h, though it needn't really be. This means it's now possible to use coord_def in libutil.h.
* Remove a few obsolete includes.Robert Vollmert2009-11-101-1/+0
| | | | Also add a few previously indirect includes.
* Fix findray test.Robert Vollmert2009-11-081-1/+3
| | | | | | | There's a conflict between you.see_cell_no_trans and los.find_ray with default argument opc_solid. As a quick fix, make los.find_ray use opc_no_trans, but this doesn't increase the general usefulness of los.find_ray...
* Adapt l_los.cc to new ray_def and reenable.Robert Vollmert2009-11-011-28/+27
|
* Disable l_los.cc.Robert Vollmert2009-11-011-0/+10
| | | | Disabling the LOS lua bindings while ray.h changes.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Move more macros and functions to cluautil.cc.Robert Vollmert2009-10-211-1/+1
|
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-0/+1
| | | | | | | | cluautil.cc should eventually contain all of the functions for passing objects from and to lua, at least the shared ones. Also cut down on clua.cc include list.
* Move clua crawl_lib from clua to l_crawl.cc.Robert Vollmert2009-10-201-4/+3
| | | | To avoid name clashes, rename dlua libs from *_lib to *_dlib.
* Split file_lib out.Robert Vollmert2009-10-191-1/+3
| | | | | Move lua library headers to separate l_libs.h, fixing another compilation error...
* Split dgn_lib out of luadgn.cc; rename luadgn to dlua.Robert Vollmert2009-10-191-3/+1
|
* Move cell_see_cell from dgn_lib to los_lib.Robert Vollmert2009-10-191-0/+8
|
* Rewrite find_ray to use precomputed cellrays.Robert Vollmert2009-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | During precomputation, we store the minimal cellrays by target and sort them according to niceness. find_ray now simply picks the first non-blocked ray to a target, which means looping through the 10 or so minimal cellrays with that target -- this should be a lot more efficient. (An extended findray test went from 150s to 40s (debug) and 40s to 26s (profile)). The interface to find_ray has changed: cycle_dir=-1,0,1 was changed to cyle=false/true since we never cycle in the other direction anyway. find_shortest was removed: all rays to a target had the same length all along, but now we also return the straightest one automatically. The change also eliminates the duplicate corner-cutting code between ray_def::advance and find_ray as imbalance calculation now relies on ray_def::advance.
* Remove fallback calculation from find_ray.Robert Vollmert2009-10-151-1/+1
| | | | | | | | | | There is now a separate fallback_ray() that needs to be called explicitly. I've manually converted uses of find_ray with allow_fallback == true. find_ray with allow_fallback set always returned true, yet there were a number of places that used the return value, in particular in directn.cc. I'll check these later.
* Fix bug with find_ray always falling back.Robert Vollmert2009-10-141-1/+1
| | | | | | | This was caused by an incorrectly inverted test. Also update the find_ray binding so the findray test would have found the bug.
* Correct findray test.Robert Vollmert2009-10-141-3/+3
| | | | | Now only targets cells that are not blocked by transparent walls etc. find_ray can't currently check for real visibility.
* Lua bindings for find_ray test.Robert Vollmert2009-10-141-0/+97
Extra file to keep luadgn.cc from growing even larger.