summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Rewrite los_def to handle function parameters sensibly.Robert Vollmert2009-10-261-16/+43
| | | | | | | | | | | | | Previously, it was holding on to pointers to objects it didn't own, causing various bugs. los_def now copies the opacity_func and bounds_func parameters. Making them copyable required introducing opacity_func::clone(). Also implement los_def copy constructor and copy assignment operator. Finally, update travel exclusions and monster patrolling to these changes.
* Revert "Convert exclusions to los_def."Robert Vollmert2009-10-251-6/+6
| | | | | | | This reverts commit 7afa089db8b01b1810c5903309f7302545638550. los_def is currently buggy, leading to weird behaviour when deleting exclusions.
* FR 2792379: stop auto-explore on marked statuesMatthew Cline2009-10-251-1/+31
| | | | | Markers can be placed on statues or orcish idols to cause auto-explore to stop when those statues/idols are first found.
* Make FPROP_FORCE_EXCLUDE set an actual travel exclusion.Jude Brown2009-10-241-6/+2
| | | | | | | | | FPROP_FORCE_EXCLUDE now sets an actual travel exclusion rather than bypassing the travel exclusion system. Exclusions are single squares. Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net> Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Don't calculate LOS for radius-0 exclusions.Robert Vollmert2009-10-231-1/+4
|
* Get rid of player_monster_visible.Robert Vollmert2009-10-221-1/+1
| | | | | | The special casing for drowning monsters appears to have been obsoloted by checking ENCH_SUBMERGED instead of calling mons_is_submerged.
* Convert exclusions to los_def.Robert Vollmert2009-10-221-6/+6
|
* Documentation for KPROP. "force_exclude" for stopping auto-explore and ↵Jude Brown2009-10-211-0/+4
| | | | auto-travel across a single square.
* Simplify.Robert Vollmert2009-10-191-1/+1
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Show unknown stairs as unknown.Adam Borowski2009-10-171-1/+1
|
* Unify check for unknown staircases in is_unknown_staircase.Robert Vollmert2009-10-171-0/+7
|
* More renaming and reorganization of feature checks.Robert Vollmert2009-10-171-142/+14
| | | | | | | | | There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever.
* Naming consistency.Robert Vollmert2009-10-171-18/+18
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Globally replace see_grid by see_cell.Robert Vollmert2009-10-171-2/+2
|
* Get rid of los_param outside of los.cc/losparam.cc.Robert Vollmert2009-10-161-33/+15
| | | | | | | | | | | The nicer interface to losight is now void losight(env_show_grid& sh, const coord_def& center, const opacity_func &opc = opc_default, const bounds_func &bds = bds_default); bounds_func provides the LOS boundary (usually just a circle with radius the current LOS radius). opacity_func is a mapping of grid coordinates to opacity values.
* Update all exclusions' LOS from travel_init_new_level().Robert Vollmert2009-10-151-9/+3
| | | | | | | | | This fixes a bug related to BR 2849608: If you created an exclusion on a level, left that level, saved and restored off-level, and returned to the level, the exclusion filled the complete LOS radius. I'm not sure why it was even restricted to LOS radius, though, and didn't fill an entire ENV_SHOW_OFFSET-size square.
* Rewrite part of the exclusion code.Robert Vollmert2009-10-151-89/+101
| | | | | | | | | | | | * Exclusion radius 0 no longer encodes "no exclusion". * toggle_exclusion split into set_exclusion and del_exclusion: It was never used as a toggle. * Exclusion updates for changed cells unified in void update_exclusion_los(std::vector coord_def changed). Now doesn't leave invalidly non-uptodate exclusions laying around. Still need to find out why off-level exclusions aren't updated after restore.
* New option explore_delay, which lets you make the delay between auto-exploreMatthew Cline2009-10-131-1/+6
| | | | | | moves be different than the delay between the moves of other types of travel. By default (explore_delay == -1) the auto-explore delay is the same as travel_delay, preserving the old behaviour.
* los: provide explicit access specifiers for inherited structsSteven Noonan2009-10-131-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* MSVC: add tiles build supportSteven Noonan2009-10-121-0/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* project-wide: implement use of platform.h detection macrosSteven Noonan2009-10-101-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Use new losight() with custom los_param_excl for exclusions.Robert Vollmert2009-10-081-30/+29
|
* Split LOS code from view.cc.Robert Vollmert2009-10-081-0/+1
| | | | | | | | | los.cc: basic raycasting algorithm; losight(), see_grid() etc. ray.cc: ray_def implementation. mon-los.cc: monster_los This includes adding a bunch of #includes; there's probably some obsolete includes of view.h now.
* Convert varius occurrences of LOS_RADIUS * LOS_RADIUS.Robert Vollmert2009-10-061-1/+1
| | | | | LOS actually goes to LOS_RADIUS * LOS_RADIUS + 1. None of the occurrences are likely to have had a big effect, however.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Small bug fix in SAFE_EXPLORE code.Robert Vollmert2009-10-021-1/+1
| | | | | | | This prevented the diagonal check from working, so autoexplore would occasionally hang in front of closed doors. Signed-off-by: evktalo <evktalo@users.sourceforge.net>
* Move 'FixAry.h' -> 'fixary.h', 'FixVec.h' -> 'fixvec.h' for file naming ↵Steven Noonan2009-09-291-1/+1
| | | | | | consistency Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Add spelling fixes.David Lawrence Ramsey2009-09-231-1/+1
|
* Add some comments.j-p-e-g2009-09-201-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10761 c06c8d41-db1a-0410-9941-cceddc491573
* Small fix.j-p-e-g2009-09-201-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10760 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak autoexplore and travel to try to avoid moving adjacent to unseenj-p-e-g2009-09-201-4/+53
| | | | | | | | | | | | | | grids where monsters might be lurking waiting to instakill you, as suggested by Kenneth Boyd. Tested in wizard mode (though not in a test game) and it works really well. The code currently uses a #define flag, in case anyone wants to try both versions and compare, but I think it should either be replaced with a proper option or removed entirely. Either way, the new behaviour should be the default. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10759 c06c8d41-db1a-0410-9941-cceddc491573
* Smarter exclusions, yay!j-p-e-g2009-09-151-8/+82
| | | | | | | | | | | | | | | | | | * Exclusions are now treated similarly to annotations and automatically added to the overmap (with the monster name if centered on a monster). * Exclusions remember whether they were placed automatically and if so, what monster triggered it. * If a grid that was previously autoexcluded comes back into sight and no longer contains the monster that triggered the autoexclusion (dead, moved away or invisible), the autoexclusion is removed again. I updated the tags, so it should be save compatible but I'm not making any promises. Also fix the Wild magic card not being documented correctly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10679 c06c8d41-db1a-0410-9941-cceddc491573
* Fix explore being confused by exclusions containing items on the edge of the ↵dshaligram2009-09-061-13/+14
| | | | | | exclusion (elliptic). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10625 c06c8d41-db1a-0410-9941-cceddc491573
* Apply zebez' patch to differentiate gates some more from stairs.j-p-e-g2009-07-251-0/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10403 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2824313]: Fix messages when pacified monsters take escape shafts.dolorous2009-07-201-0/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10353 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak Shoals algorithm to place the islands a bit more central and away from j-p-e-g2009-07-141-1/+1
| | | | | | | | | | | | | | | the border (so they're not cut off anymore). Also add a new feature type DNGN_OPEN_SEA that is an impassible feature only intended for the Shoals border. Will need special handling for confusion, I guess. I've also tweaked the level generation, so Shoals vaults don't need to be connected anymore (the algorithm just adds superfluous floor corridors), but I still get loads of corridors on the bottom level - frustratingly enough only inside the map border, and they (usually) don't even contain any stairs or other features. It's maddening! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10213 c06c8d41-db1a-0410-9941-cceddc491573
* Detected secret doors are now treated as a distinct new door type, soj-p-e-g2009-07-111-1/+5
| | | | | | | | | | | | that stupid monsters will continue to ignore them as long as they've never been opened. Shifts wall and door types of existing save files. Also apply patch by one the "nobodies" to make bloody tiles show up again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10167 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r9873 to trunk.j-p-e-g2009-06-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9874 c06c8d41-db1a-0410-9941-cceddc491573
* Run some sanity checks when loading ghosts. If anything seems fishyj-p-e-g2009-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | * don't load the ghost(s) * print an error message mentioning the bones file * don't delete the bones file, so players can attach it to a bug report The last point means that the player (or admin, in the case of the servers) has to delete a buggy bones file themselves, but the benefits of making tracking down bugs easier should outweigh that inconvenience. Add a new wizmode command that calls debug_stethoscope even if the game is not compiled in debugging mode. Also, Stone Soup 0.5 bones files are now officially incompatible with 0.4. (The changes to the spell ids cause ghosts casting spells to crash the game.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9832 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2792807: Autoexplore attempting to open doors in bat form.j-p-e-g2009-05-171-0/+3
| | | | | | | Fix 2792782: vaults not initialising blood potions properly git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9790 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix 2744875 (mutation screen assert).j-p-e-g2009-04-111-2/+2
| | | | | | | | | | * Rename KeymapContext KC_* -> KMC_* to avoid overlap with kill_category KC_*. * Increase odds for chaos brands mimicking brands that hurt the defender. * Tweak chaos_affects_attacker(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9595 c06c8d41-db1a-0410-9941-cceddc491573
* * Use menu colours (rather than message colours) for item announcementsj-p-e-g2009-03-251-4/+5
| | | | | | | | | | | | and the like. * Fix 'V' if there are more than 52 monsters/items in the list. * Make Xom act more often, with the probability depending strongly on tension. Also tweak a few action probabilities according to tension, so that e.g. summons are more likely for high tension. * Fix monsters being created with large quantities of curare needles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9546 c06c8d41-db1a-0410-9941-cceddc491573
* Remove vestiges of a debugging attempt.j-p-e-g2009-03-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9542 c06c8d41-db1a-0410-9941-cceddc491573
* * Allow viewing of card descriptions from Triple Draw and Stack Deck.j-p-e-g2009-03-231-1/+1
| | | | | | | | | | * Sort items in 'V' screen according to pickup menu sort order. * Name Xom's randart book gifts more randomly. * Colour items seen by 'x' with message colour tags and same for pickup messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9541 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2604363]: stashes and autoexplore leaked information about mimics.haranp2009-02-171-5/+3
| | | | | | | | (Incidentally, if you walk into a mimic by accident, the stash won't go away until the next turn. Technically a bug, but a minor one.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9118 c06c8d41-db1a-0410-9941-cceddc491573
* Various cleanups, mostly having to do with coord_def().haranp2009-02-151-7/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9086 c06c8d41-db1a-0410-9941-cceddc491573
* More mgrd elimination and moving to coord_def().haranp2009-02-141-42/+38
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9084 c06c8d41-db1a-0410-9941-cceddc491573
* Fix nasty bug that I introduced in r9012: dungeon generation was relyingharanp2009-02-141-1/+2
| | | | | | | | on travel, so in those cases travel *should* know everything about the level. Fixes [2596125] and unbreaks cdo. Sorry about that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9071 c06c8d41-db1a-0410-9941-cceddc491573
* Remove a great many cases where mgrd is accessed directly in favourharanp2009-02-131-7/+3
| | | | | | | | | | | of monster_at(). The hope is to eventually remove mgrd completely (in favour of scanning through the monster list, or a different datastructure which gets updated automatically when monsters move), and thus fix all the mgrd-out-of-sync bugs in one fell swoop. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9056 c06c8d41-db1a-0410-9941-cceddc491573