summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.h
Commit message (Collapse)AuthorAgeFilesLines
* * Another patch by zebez: Display fountain tiles for magic mapping.j-p-e-g2009-07-241-0/+1
| | | | | | | | * Fix 2826781: Black background for Detect Items/Creatures tiles after magic mapping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10393 c06c8d41-db1a-0410-9941-cceddc491573
* Plug a couple of memory holes. Unfortunately, between libSDL andj-p-e-g2009-06-151-0/+1
| | | | | | | libfreetype there's loads of leakage that I can't do anything about. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9983 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix double prompts for inscription warnings when clicking on the tilesj-p-e-g2009-06-071-1/+1
| | | | | | | | | inventory. * Change exclusions from buggy los back to full radius, so as not to delay the release any further. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9916 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix _place_monster_aux() not interrupting autoexplore.j-p-e-g2009-04-261-0/+1
| | | | | | | | Apparently, monsters can be directly placed at the edge of los, after all. * Change Ctrl-X -> Ctrl-S, V -> Ctrl-X, not documented yet. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9696 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 [2646326]: restore LOS properly after using the applicator functionsharanp2009-02-271-0/+1
| | | | | | | to visit a different level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9264 c06c8d41-db1a-0410-9941-cceddc491573
* Change elemental type colour enum to use ETC_ prefix instead of EC_haranp2009-02-171-40/+40
| | | | | | | | prefix, which was conflicting with the Abyssal entry cause enum. Fixes [2605869]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9110 c06c8d41-db1a-0410-9941-cceddc491573
* Fix for [2054894]: LOS not being reset while building a new level.haranp2009-02-061-2/+0
| | | | | | | | | When I put this fix in a while ago, it caused lots of "floating monsters" when changing levels, but that doesn't seem to happen anymore. Hopefully that was due to a different bug which has been fixed meanwhile. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8927 c06c8d41-db1a-0410-9941-cceddc491573
* Move a bit more things to use coord_defs and iterators instead of x,y.haranp2009-02-041-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8892 c06c8d41-db1a-0410-9941-cceddc491573
* Code cleanups, mainly in clouds.haranp2009-01-311-39/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8865 c06c8d41-db1a-0410-9941-cceddc491573
* Various cleanups. (I can't run tiles, but it compiled fine, so I hope I didn'tharanp2009-01-271-0/+3
| | | | | | | introduce a subtle bug.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8811 c06c8d41-db1a-0410-9941-cceddc491573
* Make extra-sure that a monster won't be announced to have come into view, onlyzelgadis2009-01-201-0/+1
| | | | | | | | | | | | to immediately move out of view, by introducing the notion of the currently acting monster to crawl_state, and only flushing out the "comes into view" message in mpr() for the currently acting monster. Not sure if it's worth it just for the sake of avoiding doing a "has this monster just now come into view" check in every place that a monster might issue a message, but at least this way we won't miss any places such a check should be placed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8623 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify the code that issues the "comes into view" monster interrupt message,zelgadis2009-01-191-1/+1
| | | | | | | | so we don't have to check in multiple places to make sure that "comes into view" is given before any of the other monster messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8572 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed crawl -mapstat segfaulting.dshaligram2008-11-181-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7485 c06c8d41-db1a-0410-9941-cceddc491573
* Change floor_property (blood, sanctuary) to flags, and add two newj-p-e-g2008-11-071-1/+0
| | | | | | | | | | | | | | | settings: vault and highlight. Vault means a grid is part of a vault (set in dungeon.cc), and currently used to exempt vault grids when shifting labyrinths. Highlight is a meta flag currently only used to highlight labyrinth changes on the 'X' map in wizard mode, but I can think of a couple of other uses, mostly for debugging purposes. Also replace a few for loops in the lab shift function with rectangle_iterators. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7414 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix some bugs for the autoexclusion I forgot to commit last weekend.j-p-e-g2008-10-111-1/+2
| | | | | | | | * Mermaids now call nearby aquatic monsters (i.e. other merfolk and fish). * A few more songs for the Singing Sword. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7216 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2063470: =f inscription preventing wielding of stonesj-p-e-g2008-10-041-1/+2
| | | | | | | | | | | | | | | | Improve exclusion los behaviour. * now takes into account what the player knows of the map * don't autoremove exclusions if you don't know the monster died * the los gets updated as the player explores the area For some reason this doesn't work when you dig into an excluded area. FR 2006559: Sort monsters in description menu (?\) using the same measure as the monster list does. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7132 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor cleanups to prepare for the introduction of dolorous2008-09-251-0/+4
| | | | | | | | | | | Yred's injury mirroring: move the routine to make a visible monster flash a particular color into its own function, add an integer-based square root function based on Newton's method to stuff.cc, and adjust prayer lengths for Zin (1 turn), Yred (20 turns), Ely (same as Yred), and all gods who ignore prayers (same as Zin). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6982 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-5/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-1/+26
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* [2021061] Fixing Tiles exclusion issues.ennewalker2008-07-251-4/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6677 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-10/+10
| | | | | | | | most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
* Various code cleanups. Moving towards using coord_def()haranp2008-07-211-0/+2
| | | | | | | instead of x and y where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6630 c06c8d41-db1a-0410-9941-cceddc491573
* Large tiles-related changes. Platform-specific rendering removed and ↵ennewalker2008-07-151-0/+4
| | | | | | replaced with SDL/OpenGL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1945389: Detect Creatures not clearing monsters detected on changedj-p-e-g2008-07-061-1/+1
| | | | | | | terrain. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6419 c06c8d41-db1a-0410-9941-cceddc491573
* Many code cleanups, mostly involving using stack_iterator andharanp2008-07-021-0/+1
| | | | | | | radius_iterator instead of the previous setup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6347 c06c8d41-db1a-0410-9941-cceddc491573
* For (some) consistency, make monster::foe an unsigned short, since that dolorous2008-06-031-1/+1
| | | | | | | | matches player::pet_target, and because tags.cc seems to save monster::foe as a short anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5461 c06c8d41-db1a-0410-9941-cceddc491573
* I'm not sure I actually coded anything worthwhile, though I experimentedj-p-e-g2008-06-021-0/+2
| | | | | | | | | | | | | | | | a fair bit and as usually ended up doing lots of clean-up. Oh wait, I modified eat_from_floor prompts to only force a more if there was actually a message before trying the inventory (whoops), and also modified the corpses in pack hint to take into account that a saccing player won't be interested in butchering rotten corpses. Also implemented a modified FR 1981119: when Detect Creatures only detects plants already seen before, print a different message ("You detect no further creatures."). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5435 c06c8d41-db1a-0410-9941-cceddc491573
* When using gcc (the Linux/UNIX compiler) static class members must bezelgadis2008-05-301-5/+7
| | | | | | | | | initialized outside of the class declaration or they won't by defined in any of the object files, leading to "undefined reference" errors when linking. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5336 c06c8d41-db1a-0410-9941-cceddc491573
* Diversify patrol behaviour for monsters of different intelligence.j-p-e-g2008-05-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * I_NORMAL, I_HIGH: as before * I_ANIMAL: try to only move within LOS of the patrol point * I_INSECT: as animal, but patrol radius is 5 * I_PLANT : patrol radius is also 5, but there are some other differences: If the patrol point gets out of sight, zombies don't even attempt to get back. Instead they become confused (not literally, though) and reset their patrol point to 0 (if hostile, thus stop patrolling) or to their current position (to continue "waiting" if friendly). Also, while patrolling, if they reach their target there's a 50% chance of not moving this turn, and 50% the next turn, etc. Especially the latter needs testing. If it looks *too* stupid even for zombies I'll take it out again. These changes should also help to make patrolling a bit more efficient because for stupid monsters we have: - one los calculation instead of two (patrol point, monster) - smaller radius - no calculation at all if success is unlikely (distance check) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5335 c06c8d41-db1a-0410-9941-cceddc491573
* Implement a much more efficient version of the LOS testing used forj-p-e-g2008-05-291-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | monster patrolling. As before, ray casting is used to verify LOS but ray casting now only happens if a blocked grid is encountered when searching the surroundings in a growing spiral. If a blocked grid is found, all beams that might possibly go through this grid (heuristically tested, probably tests more than needed) are checked right away and all grids behind the blocked one are marked as well - this blocking can be reversed, if we later find another beam that unblocks it. A beam that was already tried isn't tried a second time. The values are stored in a (2*LOS_RANGE)^2 array and then directly compared when deciding where to send a patrolling monster next. In the worst case we still need to fire beams at each of the edge grids, but that probably can't be avoided entirely, though performance could obviously still be improved. The increase in speed is very much noticeable, i.e. for me Crawl runs smoothly again. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5330 c06c8d41-db1a-0410-9941-cceddc491573
* Add more noise-related cleanups.dolorous2008-05-281-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5318 c06c8d41-db1a-0410-9941-cceddc491573
* Modify num_feats_between to return early if a feature has beenj-p-e-g2008-05-271-1/+2
| | | | | | | | encountered and we're only interested in whether the path is clear or not. Also, more whitespace/comment changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5298 c06c8d41-db1a-0410-9941-cceddc491573
* Make patrolling monster movement more natural: don't always return toj-p-e-g2008-05-261-0/+2
| | | | | | | | | | | the patrol centre, make it more likely to return to the patrol area if the monster left it somehow but is still nearby, and make friendly monsters move around the player on their way to their target. Also, highlight wizard commands in the wizard help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5252 c06c8d41-db1a-0410-9941-cceddc491573
* Use #define HUD_VALUE_COLOR instead of hardcoding LIGHTGREY so Davidpauldubois2008-04-211-2/+0
| | | | | | | can experiment with using other colors like WHITE git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4436 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1943303: Prevention of barding generation in monsters equipment.j-p-e-g2008-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | And while I was at it... improved monster pickup handling. * Ranged spellcasters won't pick up missiles anymore (except throwing nets). * Allow monsters with behaviour != BEH_WANDER to pick up items again. (Restricted to scrolls, potions, wands and weapons, since these could be useful in a fight.) * Restrict monster pickup to items they may actually use (3 types of scrolls, six types of potions), though they may still pick up all types of wands, if only to annoy the player. As before, pickup only takes place if a monster happens to be on a square with items and only the top items of stashes are checked - monsters won't make a beeline for items or search stashes for goodies. Also, neutrals and friendlies still won't pick up anything at all; this might have to be changed. Unrelated: fixed an ASSERT for divine retribution during penance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4255 c06c8d41-db1a-0410-9941-cceddc491573
* + Implement most of the suggestions for HUD compression.pauldubois2008-04-021-6/+0
| | | | | | | | | | | | | | | | | | | | Didn't do anything with exp as there didn't seem to be consensus. + Enable the HP/Magic bars in non-tile builds; move them a little bit. I stumbled across these while looking into making HP/MP draw on a single line. I think it's a nice feature; worth at least an option, if they're not on all the time. + Fix bar-drawing bug (the "reduced" part was not drawing properly) + Reduce size of hud by 2, expand mlist by 2. Non-tile only; tile doesn't need the extra space and it uses GOTO_STAT for other things. I don't want to risk making it too small. Not implemented: - Monster list renders from the bottom up (tricky) - Use only 2 lines for warning lights git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4043 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more whitespace fixes.dolorous2008-03-311-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3989 c06c8d41-db1a-0410-9941-cceddc491573
* Finally allow ranged attacks (BEAM_MISSILE) and spells (BEAM_MMISSILE only)j-p-e-g2008-03-291-0/+1
| | | | | | | | | | | | | | | | | to also saturate the blood with floor. Add a basic blood scent effect: all hounds, vampires, and the mosquito get M_BLOOD_SCENT which will let them wake up when blood is spilled in their vicinity. smell_blood() is rather similar to noisy(), so monsters will try to seek the origin of the blood spilled. Player vampires now get a message if blood is spilled outside their LOS, "You smell fresh blood" with a distance estimate ("near-by", "in the distance") added for vampires that are (near) bloodless. Also, the radius a vampire will be capable of smelling blood will increase the thirstier he is. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3936 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-1/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Add gore and splatter to Crawl - in the form of Jarmo's j-p-e-g2008-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | (strongly modified, I admit) blood patch. Whenever the player or a monster capable of bleeding suffers damage (currently only in melee) or when you dissect a corpse there's a chance (depending on damage/corpse weight) that the square will turn bloody and be coloured red, with a much lower chance of additionally spattering some of the surrounding squares. These chances are probably still a bit too high for later values of possible damage dealt. Also, ranged and some of the magic attacks (earth-based, mostly) should also be able to send blood flying. :p For now, this is flavour only, but it shouldn't be too difficult to introduce relations to Necromancy or evil gods. Also consider dragons to be warm-blooded, like dinosaurs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3230 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* More tweaks of Zin:j-p-e-g2008-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 1. Let sanctuaries shrink during the last few turns rather than suddently disappear when it times out. 2. Introduce donations (and remove item sacrifice) I suppose abilities will now have to become more expensive pietywise. I raised the piety cost of the sanctuary from 10 to 15, but that probably won't be enough. For the piety gain I introduced a new duration, DUR_PIETY_POOL that is filled with gold/200 * log(gold) upon donation and then leaks with 5% chance per turn one piety point into the actual piety. All numbers are open for discussion and change. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3181 c06c8d41-db1a-0410-9941-cceddc491573
* A completely reworked version of Zin as per the lengthyj-p-e-g2007-12-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | discussion in October/November. Zin effects: - protection from harm (like all good gods) - feeding when starving (as before) - mutation resistance (chance of piety/200) Zin restrictions: - no cannibalism (like all good gods) - no attacking friends - no eating of intelligent beings' corpses - no deliberate mutating Zin invocations: - Smiting (general priestly ability?) - Revitalisation (Minor Healing + 5 mp) - Sanctuary (protection from attacks) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3164 c06c8d41-db1a-0410-9941-cceddc491573
* [1857669] Fixed books using the wrong glyph when thrown, removed SYM_foo ↵dshaligram2007-12-281-0/+1
| | | | | | enum and replaced it with dchars. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3130 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bad detect items behaviour on pre-mapped squares (Iaido).dshaligram2007-12-021-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2982 c06c8d41-db1a-0410-9941-cceddc491573
* [1837663] Fixed monsters' raise dead using player's LOS.dshaligram2007-11-281-8/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2920 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed stash-tracker seeing through walls (it was using stale LOS after ↵dshaligram2007-11-151-0/+1
| | | | | | blink/teleport), fixed shadow creatures crash in labyrinths, and fixed use of displayed stair glyph for handling selection of monsters placed on stairs (display glyphs can be changed by the user). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2855 c06c8d41-db1a-0410-9941-cceddc491573
* Beogh conversion fixes for trunk.j-p-e-g2007-10-291-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2660 c06c8d41-db1a-0410-9941-cceddc491573