| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
See for example:
http://crawl.lantea.net/crawl/morgue/letownia/crash-letownia-20140224-004021.txt
Introduced by 0.14-a0-622-g0c137b5, which replaced radius_iterator with
C_SQUARE by rectangle_iterator. Unfortunately, the latter did not clip
the iterator to the map. Add a flag to do so: false by default because
iterated rectangles are not always in map coordinates.
|
|
|
|
| |
It turns out it was only an implementation detail of radius_iterator.
|
|
|
|
|
|
|
|
|
|
| |
No rectangle_iterator, no circle_iterator nor circle_def, no los_glob with
an internal radius_iterator then los_base; not even a single multiplication
inside a loop (although the last part is negligibly small compared to a
typical user).
And lookie at this such simple code. It is simple, without nothing naughty
behind these macros, right? Right???
|
|
|
|
|
|
|
|
|
|
| |
This hardly speeds up things, which I did not know as profile runs did not
help to tell these two apart and it turns out adjacent_iterator is not that
prominent... but hey, a 0.1% speedup for two pages of code might still be
better committed than not.
This speedup might disappear when I get around to the actual rewrite of
radius_iterator, though.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It was really weird: working on a square, but in almost all cases
restricting it to your view (a circle). Note this is _your_ view rather
than from the iterator's center -- which hasn't been used once in the
obvious interesting way.
As usual, this commit fixes a load of "act through glass" bugs, ando/or
using los modes that don't make sense in the context.
|
|
|
|
| |
So use the correct iterator. No functional changes.
|
| |
|
| |
|
|
|
|
| |
It was the only user of non-standard get_los().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During conversion, use the old code.
My target will have only two types of functionality:
* iterating over a circle of a given radius
* as above, with a LOS check towards the center
The current radius_iterator/circle_def/los_base tangle either takes a
majority of CPU time or at least a sizeable chunk in profile runs, due to
a bad case of OOP abuse in tight loops. This badly needs a rewrite. The
ability to pass it a square or someone else's los can be done using a
different iterator or checking los manually later, respectively.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 costly (the whole iterator is copied every time!) and we never use this.
|
|
|
|
|
|
|
|
|
| |
For the scroll, it makes no sense to not affect the whole map when you
happen to stand just near an edge.
Ashenzari and the mutation were fine.
For decks and the ball, it makes no sense to see further diagonally.
|
|
|
|
| |
directly.
|
|
|
|
|
|
|
|
| |
There's no separate cloud type yet (I want greyish but not blocking LOS ones),
and moving monsters/items is not implemented yet.
Pushing so people can suggest an improvement to visual effects which suck
currently.
|
|
|
|
| |
radius.
|
| |
|
| |
|
|
|
|
|
| |
It's not an actual spiral; rather, squares at equal distances are returned
in either a random or arbitrary order.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is all not very nice.
los_base is now an abstract base class for both los_def and
los_glob (global LOS-backed los_def variant), and interators
now take a *los_base.
actor::update_los is gone.
Arena LOS is quite probably broken again at the moment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Monsters that would qualify as followers but are incapable of
using stairs now also get the MF_TAKING_STAIRS flag. In files.cc,
_grab_follower_at() they get filtered out from transit, but this
way followers not adjacent to the player, but connected via other
allies can be considered anyway.
Tested for Beogh and Yredelemnul, without problems.
In practise this currently only matters for Yredelemnul if your
gifted undead are not adjacent to you, but rather standing behind
some zombies or skeletons. However, I am certain we'll find quickly
other applications, too. :)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also collect actor/player LOS code in actor-los.cc.
|
| |
|
|
|
|
|
|
|
|
|
| |
adjacent_iterator had a default center of you.pos(), which is now
gone (also the uses of).
I was running into circular header dependencies with actor.h
including los_def.h including coordit.h including player.h including
actor.h.
|
|
|
|
|
| |
This wasn't used anywhere and could easily be restored if
required.
|
|
New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
|