summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-1/+2
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Override berserk/shadows in view terrain mode (twelwe).Neil Moore2014-07-011-3/+5
|
* Duvessa and Dowan cleanup.Mikko Vepsalainen2014-06-221-10/+15
| | | | | | | | | Avoid some code duplication, minor cleanup. Functional change: Dowan will haste even when invisible, if he's near when Duvessa dies (consistent with Duvessa's berserking). [Committer's note: Exported some properties to mon-death.h & added an attempt at save-compat... such as it is.]
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+1
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Assert rather than segfault in #8717Neil Moore2014-06-201-0/+1
|
* Correct some doxygen blocks.Neil Moore2014-05-291-1/+1
| | | | | Some of them were missing the /** (or /*!) that makes doxygen consider the comment in the first place.
* Trigger shoutitis on seeing enemies, not randomly (dck).Steve Melenchuk2014-05-231-0/+12
| | | | This should make it more relevant.
* Gozag: Don't let bribes take effect until the player spots the monster.Steve Melenchuk2014-05-071-0/+1
| | | | | Prevents abuses like clearing out the Orc:$ end entirely offscreen; also gives the opportunity for some nice dialogue.
* Gozag wrath: counter-bribe.Steve Melenchuk2014-05-071-0/+34
| | | | | When you spot monsters, Gozag can incite them against you, granting them one of a handful of beneficial effects.
* Always announce uniques by name when they come into view.nagdon2014-04-291-2/+7
| | | | | | | | This commit disallows bundling together uniques with other monsters of the same genus. (So "A goblin, 11 orcs, an ogre, and Nergalle come into view." is printed instead of "A goblin, 12 orcs and an ogre come into view.") Suggested at https://crawl.develz.org/tavern/viewtopic.php?f=8&t=11664.
* Don't turn holies neutral when worshipping a good godChris Campbell2014-04-281-1/+0
| | | | | | | | | | | | | | It's almost never relevant (with Mennas being possibly the only edge case), and has a number of negative effects: dungeon generation depending on the player's god in Pan, strange interactions with getting additional chances to convert on piety breakpoints, and generally a lot of code for a pretty questionable gain. Flavour-wise it seems perfectly reasonable that the holies in the dungeon just all see you as insufficiently pious, or some kind of a heretic (as is the case for non-holy religious monsters). Kept some of the holy speech for the case where an Elyvilon worshipper pacifies a holy.
* Remove the clean_map option.Shmuale Mark2014-04-171-5/+2
| | | | | | | It didn't have a very clear use case and if you really want to reproduce it, you can press ^C every so often. Also clean up the options documentation a bit.
* Give monster warnings their own channel.Steve Melenchuk2014-04-101-2/+3
| | | | | People who like setting force_mores on this can thus do so with one line for all possible variants on the message.
* Zin warns the player of shapeshifters.Steve Melenchuk2014-03-031-4/+22
| | | | | Since you can use Recite to pick them out anyway, we might as well just straight up tell the player.
* Make arena_delay available outside of arena as view_delay.Steve Melenchuk2014-02-271-8/+1
| | | | | | | | | | So, if you're running a bot or you're generally annoyed by ranged/magical animations, you can set this to an appropriately low value. This also condenses a lot of code duplication related to arena_delay; a new function called scaled_delay is used for functions that should be impacted by this.
* Remove Mislead.Adam Borowski2013-12-151-6/+1
| | | | | | It was a pure interface screw, and even worse, required a large amount of support code that's a maintenance burden, causing crashes we need to fix from time to time.
* Drop map_shadow, use a bitmap and update it incrementally.Adam Borowski2013-12-041-0/+3
| | | | | | | | | | | | | | | | | 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()
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-3/+3
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* More formatting fixes for return (...);Neil Moore2013-11-151-2/+2
|
* Re-implement xray vision.Adam Borowski2013-11-051-1/+1
|
* Update the whole arena.Adam Borowski2013-11-051-0/+9
| | | | It was the only user of non-standard get_los().
* Get rid of all external uses of get_los().Adam Borowski2013-11-051-1/+1
| | | | | This also fixes a bunch of "act through glass" or "doesn't obey nightstalker/ lantern of shadows" bugs.
* Rewrite monster_iterator.Adam Borowski2013-10-311-1/+0
| | | | | It degenerated to a simple loop over menv, hardly worth any syntactic sugar. I kept it for now, though.
* monster_near_iteratorAdam Borowski2013-10-311-7/+4
| | | | | | | | | | | | Does the "in view" part of functionality of monster_iterator, is simpler, allows using los models other than LOS_DEFAULT, and gets rid of a lot of uses of get_los(). The code is nearly identical as actor_near_iterator, but the old delegation used more code than either of those. Still, perhaps templating could work? This commit also fixes a buttload of ignoring invis / see invis / sense invis (ie, visible_to()) and act-through-glass bugs.
* Rewrite (x*y)/z as x*y/zAdam Borowski2013-10-261-2/+2
| | | | Also, simplify an expression such removal of parentheses revealed.
* Fix an info leak with passive mapping.Adam Borowski2013-10-061-1/+2
| | | | | | | | By comparing the mapped/non-mapped pattern you could tell where on the level are you, if boundaries are not yet known. This commit introduces per-game hash seeds. Weak monster invisibility already uses something similar, except for it being per-turn.
* Use a hash rather than the RNG for deterministic passive mapping. Refactor.Adam Borowski2013-10-061-13/+13
|
* Fix Webtiles view flash.Florian Diebold2013-06-061-4/+5
|
* Implement cloud alpha overlay tiles layerPete Hurst2013-05-251-1/+4
| | | | | | | | | | | 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
* Don't crash after some view-flashes while travelling.Neil Moore2013-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | We often pass the address of an auto-storage targetter to flash_view_delay (and once directly to flash_view). If the call to viewwindow() actually displays the flash, that's fine. However, if viewwindow returns early (for example, because the player is travelling with a delay of -1), the address in you.flash_where could stick around until the *next* call to viewwindow, at which point the targetter is out of scope and we get a crash. To reproduce: set runrest_ignore_monster += wretched:1 and travel_delay = -1 , create and alert a wretched star, and travel (x<movement><enter>) with it in view. It usually doesn't take long for the star to pulse with eldritch light and crash the game, at least in the webtiles build. Fix this by having flash_view_delay() reset the flash after the delay. Do the same in cast_los_attack_spell, after the more(); ignite_poison already did this, so doesn't need to be fixed.
* Make whole Zot Defence map visible at game start in tiles.Samuel Bronson2013-03-101-1/+4
| | | | | | | This was <https://crawl.develz.org/mantis/view.php?id=3026>. Thanks to |amethyst (Neil Moore) for pointing me towards the relevant code, which I had somehow missed in my greps.
* Don't crash 'monster' when monsters flash the view.Neil Moore2012-12-271-0/+4
|
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+1
| | | | | | | | | | 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.
* Rename struct glyph to cglyph_t.Adam Borowski2012-10-161-3/+3
| | | | Hard to come up with something less greppable...
* Don't crash when calling viewwindow() at (0,0).Neil Moore2012-10-111-1/+3
| | | | | | | | | This was happening (sometimes) when interlevel travel was interrupted by a MSGCH_ERROR message during level-gen. Now we treat this like the other case where your position is (0,0) (viz. step from time). The underlying problem causing those messages is still there, but now the user should get just an error message and not a crash.
* Fix monsters not being removed from the monster list (#6129).Florian Diebold2012-09-121-0/+4
| | | | | Because the cell didn't get marked dirty when the monster was killed, the change was never sent to the client.
* Merge branch 'master' into glasnostAdam Borowski2012-08-311-30/+34
|\ | | | | | | Yay for conflicts galore (wax removal, std:: purge, tileidx changes).
| * Use unique_ptr instead of auto_ptr (emulated for non-C++11).Adam Borowski2012-08-281-3/+3
| | | | | | | | | | | | 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.
| * Use std namespace.Raphael Langella2012-08-261-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-0/+2
| |
| * Keep player colour during flash, too (console).Neil Moore2012-07-231-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 41df555 made monsters keep their colour during flashes, most notably the persistent "flash" of lanterns of shadows. Players were not affected; this was particularly noticeable with use_fake_player_cursor (the cursor would not be drawn), but also when players used custom player glyph colours. Now the player glyph, like monsters, is unaffected by flashes in console. Fixes #4312.
| * Don't try to shout after leaving the level (#5785).Neil Moore2012-07-151-0/+5
| |
* | Runed doors.Adam Borowski2012-08-311-2/+2
| | | | | | | | | | | | They're meant to stop autoexplore, and maybe request a confirmation for being opened. This is not yet implemented, but we can use them for converting secret doors that were used for marking a place as interesting.
* | Let magic mapping detect stuff behind secret doors.Adam Borowski2012-07-111-49/+0
| | | | | | | | Because, you know, there are none anymore.
* | Drop the code for displaying/handling/etc secret doors.Adam Borowski2012-07-111-9/+3
|/
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* Remove parentheses around return (simple_function_call).Adam Borowski2012-07-051-1/+1
| | | | For way too paranoid and underinclusive values of "simple".
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-11/+11
|
* Change lantern of shadows effect to allow distinguishing LOS boundary and ↵Chris Campbell2012-06-301-5/+3
| | | | | | | | monster colours Lightgrey maybe isn't shadowy enough for the effect to be worth keeping, feel free to just disable the colour change if anyone thinks that'd be a better solution.
* Avoid unnecessary duplication of Ashenzari warning strings.David Lawrence Ramsey2012-05-301-1/+2
|