summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_los.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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.