| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Ray length doesn't actually need to be computed; confirmed by the
assert introduced in the previous commit not triggering.
|
| |
|
|
|
|
|
| |
This was because directn.cc silently assumes find_ray returns
true when source == target...
|
| |
|
|
|
|
| |
Made some functions "static" and improved quadrant flipping.
|
|
|
|
|
| |
This is a working but temporary state, eventually to be integrated
with los_params or something derived.
|
|
|
|
|
|
|
| |
This was caused by an incorrectly inverted test.
Also update the find_ray binding so the findray test would have
found the bug.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
There are now defines LOS_MAX_ANGLE and LOS_INTERCEPT_MULT
that determine what rays are cast in the precomputation.
Current values should be the minimal correct ones.
Also check subray relationship both directions at once.
|
|
|
|
|
|
|
|
|
|
|
| |
Before Cellrays: 3709 Fullrays: 399 Compressed: 441
After Cellrays: 3709 Fullrays: 399 Minimal cellrays: 266
Slight speed up in both precomputation and LOS computation:
before after
all los tests 14s 12s
just los_maps test 1.7s 1.5s
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
|
|
| |
Rays weren't actually being registered; no idea how this got through.
|
| |
|
|
|
|
|
|
| |
Don't store ray lengths in a second array, instead store them in
the rays. Also store their starting index, which makes the
ray_coords indexing a little cleaner.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Notably, the 3D bit arrays are now recognizable as such.
Also various formatting fixes, and removed some "unsigned"'s that
were cluttering up the code.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The console version still compiles on Linux; both console and
tiles version compile in OS X. I haven't been able to test the
DOS and Windows compiles -- please fix or tell me about any
errors that show up.
|
|
|
|
| |
lines.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's now cell_see_cell which tests for visibility correctly,
albeit slowly. That's only used for placing features in the abyss
currently, but needs to be improved if it gets used more.
The second function used in monster movement was left as is, but
renamed to can_go_straight. This remains unreliable but probably
serves its purpose.
The grid_see_grid test is adapted to cell_see_cell; the
grid_see_grid lua binding is now actually useful.
Also reduce the number of tests in los_csc and los_symm.
|
|
|
|
| |
Also remove an obsoleted variant of grid_appearance.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parameters relevant to the LOS calculation are now passed as
an object los_param that takes care of coordinate translation,
bounds checking, opacity of cells and what is written to the
output array.
A check for in_bounds was changed to map_bounds for simlicity;
this should not have any effect.
Special casing for arena was removed from losight; instead
calc_show_los now calls the new losight_permissive.
|
| |
|
|
los.cc: basic raycasting algorithm; losight(), see_grid() etc.
ray.cc: ray_def implementation.
mon-los.cc: monster_los
This includes adding a bunch of #includes; there's probably some
obsolete includes of view.h now.
|