| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Tiles only. Could also be another foreground feature (cloud) instead of
an item. This would happen when an out of LOS monster tile was removed.
Rename tile_clear_monster to tile_reset_fg and have it reset the
foreground tile, instead of just clearing it. Also make clear_map
function work properly on tiles even when clear_mons=false.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also remove some duplicated code.
|
|
|
|
|
|
|
|
|
| |
This avoids unnecessary non-inlined copies.
Also, we had a few large functions that had no reason for inlining, let's
have them be regular ones.
I also made "static inline" always use the same order, for easier grepping.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was another victim of the tile picking refactoring. The problem
was that tile_place_item tested if there were more items by checking
item.link, which doesn't work for an item from a map_cell.
While I was at it, I also removed a few outdated comments and made the
tile_place_* functions static.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem was that tile picking happened concurrently to the show
update, i.e. while the map cell was being built. This meant that when
placing the plant tile, the item wasn't yet in map_knowledge, so no
indicator was added.
I've refactored the code so that all tile picking happens at the end
of show_update_at. I fear this may lead to new bugs, but the
alternative (going back to directly accessing igrd) would have been
hacky and would likely have caused new (if small) information leaks.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead, it is regenerated from map_knowledge after loading.
(This commit reuses the minor version tag from the previous ones and
will thus crash on saves from the previous two commits.)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
actual cloud_struct.
This adds the cloud tile and the value of cloud.decay/20, clipped to
the range 0-3, to the map_knowledge, and organizes all cloud-related
data into a new cloud_info struct. Both of these are required for the
tile picking code.
(Doesn't introduce a new minor tag, so saves from the previous commit
will crash.)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
See #4280. This will allow regenerating tiles out of view from the
map_knowledge, and we won't need to save the mcache anymore.
There are still a few uses of monster in the interface code, which
will have to be hunted down.
|
| |/ |
|
|/ |
|
|
|
|
|
|
| |
Mantis #4361. When switching between console and tiles, sometimes the
monster isn't displayed at the same place. Might be a timing issue like
jpeg said on Mantis. Still much better than nothing.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directn.cc tried to assume everything is a beam, this make it impossible
to properly visualise spells/effects with different rules, like reaching,
clouds, IOOD, shotgun-targetted spells, cones, etc. This interface lets
every spell come with an object that answers the question: if I aim at X,
will location Y be affected?
There are three levels of aiming effect now:
* tracer only
* might be affected
* will be affected unless you miss
This means we can show spells that have randomized area: Freezing Cloud,
Fire Storm's radius, etc.
TODO: display in tiles.
The old targetter has a great number of special cases, I did not replace
it yet since it would be a large amount of work. The new code allows for
showing explosions and bounces, but I'd start with clouds and such first.
Fire Storm is a good sample.
Also, this commit fixes the targetter not allowing you to reach sqrt(8) via
'f' or '.'; you had to use '!' to do that. A number of places in the code
assumed that, with a special distinction for two modes of reaching.
|
|
|
|
| |
I'm unable to test optimized builds as clang (trunk) crashes during compilation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, viewgeom.h:struct_cell_t contained tile_fg and tile_bg
members. These were modified in tileview.cc:tile_apply_properties and
view.cc:viewwindow. Whenever a silenced, haloed, bloody or moldy area
was encountered, TILE_FLAG_x was OR'd into the tile_bg.
This functionality was perfect only until the tile_flags enum stayed
within the bounds of a 32 bit unsigned integer. We've now reached the
limit of tile_flags, so any further interaction would either have to be
done in the buffer (which would add more dependency on the game state to
the tiles code, which we're trying to avoid), or have more attributes
added into screen_cell_t and tilegdnbuf.h:packed_cell.
Hence, I went with the latter option: extend screen_cell_t to contained
boolean flags for silence, halo, etc. Instead of having to add new
members to screen_cell_t *and* packed_cell, I instead added a
packed_cell into screen_cell_t.
And it works now, hooray!
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
As tileidx_out_of_los now handles detected monsters implicitly, there's
no need to write monsters to env.tile_bk_fg or to handle detected
monsters at all except through map_knowledge.
|
| |
|
| |
|
| |
|
|
tileview.h/cc now contains all the functions that change what is shown to
the player via env. tilepick now contains only "const" functions to look
up tiles.
|