summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.h
Commit message (Collapse)AuthorAgeFilesLines
* Add -script option to Crawl to run a Lua script. Scripts are similar to ↵Darshan Shaligram2010-01-091-0/+2
| | | | | | tests, but can be parameterised. Add a script to generate 150 level at a named place and report on all the monsters generated there.
* Remove multi-purpose Options.mlist_targetting.Robert Vollmert2009-11-231-0/+7
| | | | | | | | The option is now just a boolean option, and whether we're actively targetting with the mlist is stored in crawl_state.mlist_targetting. Also remove some duplication of mlist logic from direction().
* Add an option, -builddb, to build the database and exit.Adam Borowski2009-11-221-0/+1
|
* Remove unused crawl_exit_hook.Robert Vollmert2009-11-201-11/+0
|
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-1/+0
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Simplify out-of-range darkening.Robert Vollmert2009-11-161-0/+3
| | | | | | | | | | | | | | | Also fixes the range_view_annotator destructor clobbering option "darken_beyond_range". Options.target_range is now really an option, and called Options.darken_beyond_range. Current darkening range is now stored in crawl_state.darken_range. I can't reproduce SIGHUP retaining darkened range (BR 2151183) (why would it be saved?), so range_view_annotator is not a crawl_exit_hook anymore. crawl_exit_hook is not used anymore, but still present.
* Split actors and env from externs.h.Robert Vollmert2009-10-211-0/+1
|
* Add test for monster placement.Darshan Shaligram2009-10-181-0/+1
| | | | | | Adds test/monplace.lua to test placing monsters using the Lua direct monster creation binding (does not exercise all the map code). Allow choosing what tests to run with "crawl -test test1,test2".
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Set up a basic testing framework for LOS. ./crawl -test with a full debug ↵Darshan Shaligram2009-09-241-0/+2
| | | | build will run the test.
* Fix [2151183]: SIGHUP with the range view annotator active maintainedharanp2009-02-081-0/+11
| | | | | | | | | | | the annotated colours when saving. Fixed by adding the ability to store arbitrary exit hooks to be executed on (unusual) shutdown; for now they're executed FIFO, but it should probably be LIFO with a stack. Anyway the only thing that uses this now is the range view annotator. Oh, and it only works if you're using libunix.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8999 c06c8d41-db1a-0410-9941-cceddc491573
* Move the monster dumping code from state.cc to debug.cc, and dump to stderr tozelgadis2009-01-281-2/+1
| | | | | | | reduce the need to pass a file pointer all over the place. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8837 c06c8d41-db1a-0410-9941-cceddc491573
* Make extra-sure that a monster won't be announced to have come into view, onlyzelgadis2009-01-201-0/+35
| | | | | | | | | | | | 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
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573
* A limited set of commands are now available to use during arena mode:zelgadis2009-01-111-0/+2
| | | | | | | look around ('x'), message history (Control-P) and suspend game (Control-Z). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8408 c06c8d41-db1a-0410-9941-cceddc491573
* Add arena mode, activated on the command-line by 'crawl -arena "monster v ↵dshaligram2008-12-311-0/+2
| | | | | | monster"' (eg: crawl -arena "Sigmund v Jessica") to let monsters fight each other undisturbed by the player. Good to examine monster AI and monster behaviour when the player is AWOL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8059 c06c8d41-db1a-0410-9941-cceddc491573
* Fix re-do/repeat command not working with commands that targetted a monster.zelgadis2008-12-241-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7926 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
* Add more whitespace fixes.dolorous2008-06-101-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5682 c06c8d41-db1a-0410-9941-cceddc491573
* Fall back to ASCII if Unicode locale is unavailable (Guus). Also queue up ↵dshaligram2007-11-201-0/+6
| | | | | | startup error messages and display them before the newgame screen instead of emitting them to stderr. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2882 c06c8d41-db1a-0410-9941-cceddc491573
* Shaft traps (trap doors) [1792195] and level annotation [1769009]zelgadis2007-10-051-0/+2
| | | | | | | | | | added, with the shaft traps changed as per comments on SF; shafts aren't randomly generated yet, so this doesn't change gameplay. Changed DNGN_TRAP_III to DNGN_TRAP_NATURAL, of which trap type the shaft traps are the only current member. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2328 c06c8d41-db1a-0410-9941-cceddc491573
* Replaced inc_god_acting/dec_god_acting pairing with god_acting objects.dshaligram2007-10-021-0/+22
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2299 c06c8d41-db1a-0410-9941-cceddc491573
* crawl_state now keeps track of whether or not the current code is beingzelgadis2007-09-281-0/+28
| | | | | | | | | executed because of a god's actions, and if so which god (with "actions" not including god-supplied invocations). Currently only used to prevent Xom from being amused/stimulated by his own actions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2235 c06c8d41-db1a-0410-9941-cceddc491573
* Added new commands "re-do previous command" (bound to `) and "repeatzelgadis2007-09-191-8/+34
| | | | | | | | | | next command" (bound to 0). Though this is just an interface change, it changes code in the core input processing function (input() in acr.cc), and also messes around with the input buffer, so it could probably do with more testing before merging it into the 0.3 branch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2137 c06c8d41-db1a-0410-9941-cceddc491573
* Didn't have svn autoprops set properly for the new files that I addedzelgadis2007-09-161-1/+1
| | | | | | | for my code refactoring. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2103 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+58
crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573