summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/place-info.cc
Commit message (Collapse)AuthorAgeFilesLines
* allow iterating over branches in a non-enum order (8742)Jesse Luehrs2014-08-021-2/+2
| | | | | | | | | | | | 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.
* Revert "Disable an assert."Adam Borowski2013-12-261-2/+2
| | | | | | | The chance to trigger the deleted-level-on-exiting-a-Zig bug was quite small, thus I believe all affected games should have moved on already. This reverts commit 7d816dcee34cf224c9f77a0d99a75f1ef375b05a.
* Disable an assert.Adam Borowski2013-12-201-2/+2
| | | | It's not a proper fix, but it at leasts allows affected games to continue.
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-1/+1
|
* Remove use of 'you' inside player member functionspubby2013-06-301-1/+1
| | | | | | 'you' seemed to be pointless in such context anyways, and lead to some const correctness bugs since '*this' could have a different const-ness from 'you'.
* Fix a misbuild with clang-3.3.Adam Borowski2013-04-261-9/+4
| | | | | | | | | | | Our fault: enum types are not guaranteed to allow storing any values outside defined values, and the compiler is allowed to reduce storage size if it wants to. Since version 3.3, clang prefers unsigned types here. We used -1 and -2 as magic values, which would then fail comparison. I did not preserve the value of PlaceInfo.branch of -2 (ie, uninitialized). The whole branch field is mostly redundant, though, and we can get rid of it once get_all_place_info() is refactored.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | 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-3/+3
|
* Some more return deparenthesization.Adam Borowski2012-07-051-2/+2
|
* Drop an overzealous assertion for portal levels.Adam Borowski2012-05-011-4/+1
| | | | | It's still too overzealous, but at least won't ever trigger during normal operation. It'd be nice to be able to delete levels from the outside.
* Fix Sprint crashing on references to non-existent branches.Adam Borowski2012-04-241-1/+4
|
* Merge branch 'master' into portal_branchesAdam Borowski2011-12-281-7/+5
|\
| * Remove "skill exp" from PlaceInfo and char dumps.Neil Moore2011-12-071-7/+5
| | | | | | | | | | | | | | | | It had not been useful since the 0.9 skill system overhaul, and often had negative values because training happened before calculating the gain. This removes the field entirely, as well as the associated column "F" of the kills_by_place table. The old column "G" is now calculated based on level XP only.
* | Split the branch data into read-only and mutable parts.Adam Borowski2011-11-041-2/+3
| | | | | | | | | | | | | | | | 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-66/+9
|/
* Purge save #ifdefs for TAG_MAJOR 29.Adam Borowski2010-09-061-2/+0
|
* Enclose df62c623 in ifdefs, so it gets auto-reverted on the next save break.Adam Borowski2010-08-191-2/+2
|
* Comment out the levels_seen/PlaceInfo assert.Johanna Ploog2010-08-191-0/+4
| | | | | | | | This will enable players who fell victim to the PlaceInfo bug to continue their games as soon as CDO updates trunk. This change should be reverted after some time has passed, preferably when the next major version change comes around.
* Reinit global_info (PlaceInfo) when starting a new game. Fixes crashes.Johanna Ploog2010-08-191-0/+9
| | | | | With thanks to Syllogism's throw-away comment on Something Awful. I hadn't realized it was _that_ easy. :)
* Move PlaceInfo to place-info.{cc,h}.Robert Vollmert2010-04-011-0/+185