summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/place.cc
Commit message (Collapse)AuthorAgeFilesLines
* allow iterating over branches in a non-enum order (8742)Jesse Luehrs2014-08-021-5/+3
| | | | | | | | | | | | This allows us to have a consistent and logical ordering of branches without requiring the branch enum itself to be reordered (which could have save compatibility implications). The new ordering of branches just moves Depths to the place in the ordering that it already is planned to go on the next major save compat bump, but other changes are possible, if desired. All places in the code that iterate over branches have been updated to use the new iterator except for code dealing with save files, which still uses enum order, so that we can change the display ordering without affecting saves.
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .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!
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-5/+5
|
* Use std namespace.Raphael Langella2012-08-261-11/+10
| | | | | | | | | | | | | 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.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-1/+1
|
* Don't let wandering monsters go to hell.Adam Borowski2012-05-181-1/+1
| | | | | This fixes a crash, since the stair destination would have to be special-cased. I opted to disable foreign spawns here instead.
* A range check assertion for invalid branches.Adam Borowski2012-05-071-0/+1
|
* Give branches explicit base absdepth, instead of using distance to D:1.Adam Borowski2012-04-261-7/+1
|
* Let ^F and item memory work in Labs and the Abyss.Adam Borowski2012-04-241-5/+0
| | | | | | It's a pain in the butt to have to return to every item you just ran past (LOS in the Abyss tends to be spotty). This commit makes the memory last until the map cell rots away.
* Assert out if you try to enter a level that's already on the stack.Adam Borowski2012-04-081-0/+9
| | | | No current disconnected level supports multiple copies.
* Use the level stack to save return target for portal vaults/Abyss/Pan/Zigs/Lab.Adam Borowski2012-04-071-26/+0
| | | | | | | | | Unlike the initial implementation that was talked about, this one nearly completely ignores what stair is used to do X, meaning you can exit a branch by any stair that goes up, etc. Also, this commit earns the prize of the most rebased and edited one. And it ended up a tiny fraction of its initial size, with far simpler code to boot.
* Remove special-casing of hell absdepth0.Adam Borowski2012-03-271-3/+0
|
* Make the difficulty of branches independent of where they generated.Adam Borowski2012-03-271-1/+1
|
* Reduce special-casing of hell depth code somewhat.Adam Borowski2012-01-081-1/+1
| | | | | | | Also, fix uninitialized starting depth. This makes an actual difference as absdepth will be one more in proper hells, but it's not used for anything but item properties on Hell:7.
* Cache absdepth0, now that it has to be calculated.Adam Borowski2012-01-031-1/+1
| | | | | The cached value intentionally is stored in env.absdepth0 rather than you.absdepth0 to catch attempts to modify it.
* Use branch depth rather than absolute depth as the authoritative one.Adam Borowski2012-01-031-31/+7
|
* Don't explicitely pass absdepth:branch in the dungeon builder.Adam Borowski2012-01-031-0/+5
| | | | | There's no support for producing maps for a level you're not on, around half of functions assumed this.
* Temporarily clamp place depth to legal values.Adam Borowski2011-11-041-1/+7
| | | | | Having absdepth0 be authoritative is broken. It was barely adequate when all branches formed a tree -- with hacks in Hell, but it totally falls apart now.
* Choose portal branch maps by DEPTH.Adam Borowski2011-11-041-1/+1
|
* Purge away attempts to retain save compat for level_type changes.Adam Borowski2011-11-041-58/+0
|
* Split the branch data into read-only and mutable parts.Adam Borowski2011-11-041-4/+4
| | | | | | | | As a side effect, branches can now be shortened without breaking major save compat. This commit itself doesn't preserve compat though, even though it'd be easy -- other parts are too nasty already.
* Get rid of level_type, unify BRANCH_*, LEVEL_* and portal vaults.Adam Borowski2011-11-041-75/+88
|
* Mostly correct uppercasing/lowercasing of Unicode strings. ij and ß are ↵Adam Borowski2011-10-011-1/+1
| | | | | | | | | still wrong. Ok, I can understand Germans having ß as a lowercase-only letter which can be at most approximated with SS/Ss when uppercased, but Dutch ij rather than ij is plain stupid. And it requires a thorough reworking, needing special libc functions just for one alleged "letter".
* Adjust some whitespace and formatting.Adam Borowski2011-07-081-1/+0
|
* More string width fixes.Adam Borowski2011-04-011-1/+1
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Refer to tutorial "lessons" rather than "maps" in the map choice menu.Johanna Ploog2011-01-161-1/+4
| | | | Also: A few typo and spacing fixes.
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-15/+15
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Rename chars used as numbers to int8_t/uint8_t. Fix some other type usage.Adam Borowski2010-07-301-1/+1
| | | | | | | | | | 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.
* Rename hilariously misnamed you.your_level to you.absdepth0.Adam Borowski2010-02-101-2/+2
|
* Remove libutil.h from AppHdr.h and include explicitly.Robert Vollmert2010-01-201-0/+1
| | | | | | | Also extract unwind_var template to unwind.h. The latter is now included from AppHdr.h, though it needn't really be. This means it's now possible to use coord_def in libutil.h.
* Replace static snprintf() with make_sprintf() where the result is ↵Adam Borowski2009-12-171-7/+4
| | | | | | immediately cast to std::string.
* Properly use you.level_type_origin instead.Jude Brown2009-12-051-8/+14
| | | | | | | When changing levels and generating a note, misc.cc uses you.level_type_origin. place_name uses you.level_type__name instead. As you.level_type_origin is set to a variant of you.level_type_name, use that instead! That makes no sense.
* FR 1837856: note vaults generated in dumpMatthew Cline2009-10-261-0/+13
| | | | | | | | | | Include new dump section "vaults", which for game-end dumps (or any wizard-mode dumps) will include a list (by place) of all the vaults generated in the game. The savefile now includes a player-associated CrawlHashTable (you.props), which can be used for storing player information which doesn't need to be accessed efficiently.
* Split actors and env from externs.h.Robert Vollmert2009-10-211-1/+2
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Add spelling fixes.David Lawrence Ramsey2009-09-231-1/+1
|
* * Call message flush before entering a shop.j-p-e-g2009-03-131-1/+1
| | | | | | | * Indent shopping commands correctly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9455 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Introduce a number of new uniques taken from a patch by castamir.j-p-e-g2009-01-041-1/+1
| | | | | | | | | | | | | | | | | | | These are: * Roxanne (statue spellcaster) * Sonja (Kobold assassin) * Eustachio (human summoner, was: Francisco) * Azrael (efreet, was: Abdul) * Ilsuiw (Merfolk witch * Prince Ribbit (blink frog prince) * Nergalle (orc sorceress) * Saint Roka (orc priest of Beogh) Tweaked make_book_theme_randart() to allow for one forced spell and owner's name. Used to occasionally give Roxanne a randart book containing Statue Form. (Was: always book of earth) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8207 c06c8d41-db1a-0410-9941-cceddc491573
* place_name(): use you.level_type_name_abbrev for the short form ofzelgadis2008-11-271-1/+1
| | | | | | | of a portal vault's name. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7650 c06c8d41-db1a-0410-9941-cceddc491573
* Show place as "Sewer" in the HUD and in character dumps for the sewer portal ↵dshaligram2008-11-181-6/+15
| | | | | | vaults (portal vault entry marker's dst field is used as the name). Portal vault entrance is replaced with stone arch on use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7474 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+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
* Since there's currently only one type of portal vault (labyrinths arej-p-e-g2008-07-021-5/+4
| | | | | | | | | | treated differently) change the gate description to "gateway to a bazaar", so the bazaar description can actually be searched for. Eventually we might like to include Labyrinths, portal vaults, the Abyss and Pandemonium in the branch descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6334 c06c8d41-db1a-0410-9941-cceddc491573
* Treat all bazaars as noteworthy, not just the first one.j-p-e-g2008-06-151-8/+11
| | | | | | | | | Since bazaars are currently the only type of portal chambers, just refer to them as bazaars in the notes. (The subchecks for the "bazaar" flag don't work with packed_place, unfortunately.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5848 c06c8d41-db1a-0410-9941-cceddc491573
* Renaming Portal Vaults to Bazaars. [FR 1824984]j-p-e-g2007-11-041-0/+3
| | | | | | | | Fix 1825526: not stepping into deep water costing a turn Fix 1825352: ?torment only being unholy if it wasn't known git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2753 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, was using UNIQ_LOST_IN_ABYSS wrongly.zelgadis2007-10-111-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2420 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed regex escapes for "." stash search.dshaligram2007-09-301-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2266 c06c8d41-db1a-0410-9941-cceddc491573
* [1800818] Fixed broken follower tagging for bazaars.dshaligram2007-09-281-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2247 c06c8d41-db1a-0410-9941-cceddc491573