| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copying the whole map_knowledge every turn was really costly. We don't care
about any fields of the map other than the "seen" flag, too. Thus, we can
move it into a bitmap and update only changes rather than everything.
This means we need to update the entire bitmap once exploration starts, but
that's a small fraction of the cost:
qw profiles:
before:
9.55% check_for_interesting_features()
0.18% start_explore(bool)
after:
0.29% start_explore(bool)
0.10% check_for_interesting_features()
|
|
|
|
| |
This introduces a new pseudo-agent, akin to ANON_FRIENDLY_MONSTER.
|
|
|
|
| |
For added insult, nothing used that list anymore.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This works very well for the most part with
two small problems:
- Webtiles will not support this yet (in probability,
this will stop any clouds showing in webtiles)
- Floor items interact strangely and will draw over
the top of clouds instead of behind them
|
| |
|
|
|
|
|
|
| |
Committer note: uniq_TAG and luniq_TAG still don't work properly with
subvaults, but this at least fixes the multiple-silver-rune problem (and
also duplicate quadrants in grunt_profane_halls).
|
|
|
|
|
|
|
|
|
|
| |
For most header files, this only saves on having to recompile a
small number of source files, but there are also a few headers
where small changes would now take significantly less time.
This is most obvious for the Tiles build for which the dependencies
have been greatly reduced, so that the only additional includes
when compared to console are strictly library or tile related.
|
| |
|
|
|
|
|
|
|
| |
Subvaults were registered as used the moment SUBVAULT clause resolved,
without a way to undo that registration (except for the whole level being
vetoed). The host vault was then properly given back, possibly resulting
in the subvault being exhausted if it had no allow_dup.
|
|
|
|
|
|
|
|
|
|
|
| |
_you_vault_list would overflow once you found 256 vaults that got shifted
away. env.props["level_{vaults,extra}_key"] could potentially overflow as
well, although the latter would require running with an amulet of statis on
as abyssal "new area" teleports cleared that prop.
This commit also fixes Pan vault info keeping only the last level generated;
Pan char dumps get quite spammy now. Perhaps refcounting them would be
better?
|
|
|
|
|
|
|
|
|
| |
This is mostly to avoid the bit-packing of the previous commit.
Admittedly, it's a bit overkill for that.
This could probably use some cleanup: currently we store attacker,
defender, and position in the base class, even though not all subclasses
have those.
|
|
|
|
|
|
| |
This stops the tons of warnings, while allowing building for both old
and new C++ standards. And if we wanted to use shared_ptr or something,
now we can without being ambiguous.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 highlights the path taken during the last exploration or travel,
and should help make travel_delay=-1 less disorienting. The path is
cleared when the player moves otherwise.
In console, it is indicated with COLFLAG_REVERSE, which I'm not sure
is the best option, but just changing the floor colour didn't seem
noticeable enough.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was strange that the light would magically follow everyone who was in the
initial spot for a duration -- with five independent spotlights no less.
Sunlight now creates a stationary halo instead.
Evaporating water is no longer instant, but the area potentially evaporated
is bigger, to compensate. The old cross-shaped area is guaranteed, the rest
of haloed stuff (ie, corners of the 3x3 space) have a 50% chance.
Also, the 1/100 chance to spawn a plant per evaporated square of shallow
water is no more, it was too obscure.
|
|\
| |
| |
| |
| | |
This includes fixes for 64834896234968 places in master that add new uses of
LEVEL_FOO and so on.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An imperial buttload of places assumes these to be 8 bits, which makes it
impossible to add support for 256 (or more!) colours. This commit tries
to allow expanding it in the future; sadly, it is badly incomplete. At
least, new code can use the new type.
Also, beware of "branded" colours which use bits above 8 for inverse,
underline, etc.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
It can be done better, but for now, I prefer a simpler solution. This can
be turned into an efficient no extra memory hash, etc, later.
Also, this is the only non-debug interface so it's trivial to change the
implementation.
|
|/
|
|
|
| |
The cached value intentionally is stored in env.absdepth0 rather than
you.absdepth0 to catch attempts to modify it.
|
|
|
|
|
|
|
|
|
|
| |
All platforms we support in 0.10 allow freely going tiles<->console, loading
or creating a save in console should still keep everything needed to display
tiles intact.
Left to go:
* monsters with multiple tiles
* player dolls
|
|
|
|
| |
The actual data isn't loaded or preserved yet.
|
|
|
|
| |
It is referenced many times for every monster per turn in ZotDef.
|
|
|
|
|
| |
Checking for those every turn costed 1% CPU time each on unwoken_rest, and
more on an empty level.
|
|
|
|
|
|
|
| |
Only happens in tiles builds and they're also not saved when
going Tiles -> console -> Tiles.
TODO: tile_default floor/wall settings
|
|
|
|
|
| |
This also lets them work with the new monster id system, as it's likely
they will be used together unless we decide to migrate completely.
|
|
|
|
|
| |
This lets one layout specify multiple layout types, which can be useful in
combination with layout_* vault tags. Nothing uses this as of yet.
|
|
|
|
|
| |
This is to avoid having several static shadow maps in different place of the
code.
|
| |
|
|
|
|
| |
monsters.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This should help against the signed char problems, and is good for
code readability. Now, if you have a char, it's either an untyped
in-memory byte, or a symbol inside a string. Small numbers are instead
[u]int8_t, ints, an enum type, or, in so many cases, bools.
I didn't touch any of the tiles code, as it's currently broken and I don't
want to risk making it unbroken harder.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently env.show stores information about the LOS rectangle, while
env.map_knowledge stores the rest of the map.
This unnecessarily complicates the code, makes serialization harder,
and makes it hard to change the LOS model.
This code uses map_knowledge for both kinds of data.
Regressions are quite possible.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
|
|
|
|
|
|
| |
It's not the default, even for debug builds, since it makes debugging with gdb
nasty -- you have to refer to real_you->field when gdb mentions you.field.
Even naming real_you just you would still force you to use "->" instead of ".".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
find_trap() used to take over 10% CPU in sprint.
The main optimization here is bailing out early when grd() says there
is no trap -- just that cuts the effort by a factor of several hundred.
That makes making the loopup O(1) mostly moot, but I included it anyway
since tgrid costs just 11KB of memory.
To not risk breaking something for the release, if tgrid is invalid, the
list of traps/shops will be searched the old way.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MAX_MONSTERS: 350 -> 700
MAX_ITEMS: 600 -> 1000
MAX_CLOUDS: 180 -> 600
MAX_TRAPS: 100 -> 400
MAX_SHOPS: 25 -> 100
Untied NON_MONSTER, NON_ITEM, EMPTY_CLOUD from the values of MAX_MONSTER, etc.
so that MAX_MONSTER and friends can be changed without breaking save
compatibility again.
|
|
|
|
| |
that to 10.
|
| |
|
|
|
|
|
|
| |
Vault metadata that was previously discarded at level generation time is now saved in the level file instead. This can be quite costly (~30k per level) if the level has large vaults.
The abyss can now use vaults as general scenery (tagged "abyss") or to place the rune ("abyss_rune"). abyss.des currently includes stub vaults for testing.
|
| |
|
|
|
|
|
|
|
|
| |
Clean up the code involved in generating and shifting the abyss. This is spadework in preparation for abyss vaults.
Fixes abyss shifts copying the area around the player to the centre of the abyss and not clearing the old area (irc conversation between Linley and dpeg confirms that the old behaviour of not clearing the duplicate shifted terrain is a bug).
Fixes abyssal runes being more likely to appear at the NW of the abyss level, particularly as time spent in the abyss increases.
|
|
|
|
|
|
|
|
| |
This new type defines to unsigned int, but it cleans up a lot of the
int/unsigned int/short confusion all over the codebase for tile indices.
This commit also cleans up tiles code to use coord_def more and to change
function signatures to pass const refs and non-const pointers.
|
| |
|
|
|
|
|
| |
Anything that had more than constructors, const or static member functions,
or operator definitions were considered acting like classes.
|
|
|
|
|
|
|
|
|
|
|
| |
In most places, they were stored as doubles (mantissa of 52 bits), but
often passed as floats (mantissa 23 bits). Such bugs were present in
stabwound's 92M turns game but in that version of Crawl we didn't use
absolute counters for much and turn count was (and is) an int so nothing
was visibly broken. In current Crawl, it would either crash or trigger
an assert due to counters not adding up.
This commit drops all abuses of double to store integer values.
|
| |
|
| |
|
| |
|