| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Aiming cloud cone from (40,41) or (66,23) would crash because of rounding
errors. See for example:
http://dobrazupa.org/morgue/Rikonman/crash-Rikonman-20140425-000700.txt
Now consider numbers as large as 5e-5 to be zero, rather than requiring
1e-7 (for geom2d code) or 1e-5 (ray_def code). This means rays will be
snapped to the diamond grid more frequently, helping to avoid
inconsistencies among different ways of deciding what part of the cell a
ray falls on.
Someone with numerical analysis experience should really look at this
code.
|
|
|
|
|
|
|
| |
The {get,set}_degrees methods of ray_def were only used by the chaos
bouncing code, removed in 0.14-a0-1819-g38ea213. The functions
geom::degrees and geom::degree_to_vector were only used by those
ray_def methods.
|
|
|
|
|
| |
Sometimes, they're there to emphasize a break between two sections of code,
which is good. In a majority of cases, though, they're just inconsistent.
|
| |
|
| |
|
|
|
|
|
| |
Via externs.h -> bitary.h, it was effectively included by everything anyway,
and this way simplifies include chains.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is incomplete, partially because of me getting bored, partially because
of doubts about the point of leaving simple addition/etc in parentheses.
|
| |
|
|
|
|
| |
For way too paranoid and underinclusive values of "simple".
|
| |
|
|
|
|
|
|
|
| |
"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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
1. Add function to reflect vector at a line.
2. Implement scalar multiplication as external operator.
|
|
|
|
|
| |
Seems sensible given they modify the ray, even if it's not really
something intrinsic to a ray.
|
|
|
|
|
|
|
|
| |
ray_def should now deal with hitting corners gracefully, though the
raycasting will still discard such rays. If a ray hits a corner
between two diamonds, it will stay there, and calling ray_def::pos
will arbitrarily give one of the squares -- this is not optimal,
but these rays shouldn't usually show up anyway.
|
|
|
|
|
| |
Remove the unsure fudging. This does introduce the possiblity
of hanging in place.
|
|
Its point is to allow intersecting rays with grid lines and
advancing rays from one cell to the next.
|