summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.h
Commit message (Collapse)AuthorAgeFilesLines
* objstat: Item and monster generation statisticsgammafunk2014-06-251-0/+1
| | | | | | | | The -objstat command-line option will generate iterations of the given levels, compiling stats on every item and monster generated, and average the results over the iterations. It's only available in debug builds and uses the same map specification format as -mapstat. The default number of iterations is 100.
* New command: show weapons in viewport.Shmuale Mark2014-06-121-0/+1
| | | | | | | | If a monster has a weapon, and you press ctrl-t (by default), you will see, instead of its normal glyph, the glyph for the weapon it is holding. Since this information is already available with 'x' and even more easily in tiles, it's just an interface improvement, and as far as I can tell in my tests there is no information leaked.
* Fix spelling of "targeting" (#7837)Chris Campbell2013-12-101-2/+2
| | | | See Mantis for discussion.
* Revert "Delay more prompt until level has finished loading."Adam Borowski2013-12-031-2/+0
| | | | | | | | | | | | | | | | | | | While the problem this commit attempts to fix is real, I'm afraid it causes more breakage: * it removes debug messages from map generation * especially, infinite loops become extremely hard to debug * loses output that overflows * has issues with force_more * portal vault announcements are lost For example, a level with both a Lab and an Ice Cave shows just: "There is an entrance to an ice cave on this level. Hurry and find it before the portal melts!" even though there's no overflow. The rest (the main "wave of frost" message and anything about the Lab) are gone. I'm afraid some other approach is needed. Perhaps forcing a screen draw? This reverts commit 8471a022e76bae39918ba6eaa1fbbab5c7ceb64f.
* Delay more prompt until level has finished loading.Raphael Langella2013-11-301-0/+2
| | | | | | | | Getting a more prompt during level load results in a screen only partially updated and looking really bugged. It's especially bad since it happened during loading tutorial levels which is the very first thing many new player see. It also happened when entering a level with an announce portal. If there are more cases, I didn't test them.
* Fix cmdline --gdb not working outside of --test and friends.Adam Borowski2013-11-201-0/+1
| | | | | It can't be stored in the options struct, as it's re-initialized when a game starts, overwriting whatever came from the command line.
* "./crawl -test list" to enumerate available internal tests.Adam Borowski2013-10-281-0/+1
| | | | | | | | | | (We also got "canned" tests which are scripted using regular arena or game.) Our Makefile deserves a good heap of profanity, as you can't recurse nor run targets whose list of dependencies depends on something itself. This is because you can't just "make foo", you need to "make debug foo" or it will f*** up your build, and the list of such required extra arguments is hard to copy -- it can include compiler flags, EXTERNAL_DEFINES, etc.
* Put the Generating_Level global into crawl_state.Adam Borowski2013-10-031-0/+1
| | | | Also, drop the caps.
* Use std namespace.Raphael Langella2012-08-261-23/+23
| | | | | | | | | | | | | 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.
* Rename FixedBitArray to FixedBitVector.Adam Borowski2012-07-261-1/+1
|
* Remove the now-unused code for emergency saves.Adam Borowski2012-04-141-4/+0
| | | | | If we want them back for assertions, it'd be far better to save _before_ going into the crash handler.
* Revert "A bit of debug info about loaded translations, to help investigate CDO."Adam Borowski2012-03-291-2/+0
| | | | | Investigation done, breaking of all games without "language=pl" done as well. This reverts commit b65c0c250055b6b981a596c6369db8fef670e04f.
* A bit of debug info about loaded translations, to help investigate CDO.Adam Borowski2012-03-291-0/+2
| | | | | Somehow, they fail to load there, and I can't seem to be able to reproduce that locally, even in DGL mode.
* New ctrl+V command to show monster HP, and other HP colouring improvements. ↵Michael Gagno2012-03-071-0/+1
| | | | | | | | | | | | | | | | | | (nfogravity) https://crawl.develz.org/mantis/view.php?id=5376 Pressing ctrl+v in console will colour all monsters based on their HP. This can be useful when fighting large groups. This mode deactivates itself the next turn, or you can toggle it off manually by pressing ctrl+v again. Zombies and skeletons are given lightgrey colouring, since you can't determine their HP. There is also a new option, enemy_hp_colour, which lets you define custom colours (applies to the ctrl+v display and the regular monster list). The old ctrl+v command (show equipped weapons) has been removed.
* Get rid of USisms in spelling of -ll- and -tt-.Adam Borowski2012-01-251-2/+2
| | | | | This mostly reverts 78d8ab06 which replaced Commonwealth "targetting" with US "targeting", although there's also "cancelLing", "levelLing", "travelLing".
* Replace {get,set,}_{sprint,tutorial}_map() with crawl_state.map.Samuel Bronson2011-10-171-0/+2
|
* Make Webtiles output happen in parallel to the console display, and make the ↵Florian Diebold2011-10-151-1/+1
| | | | | | | | | | | | | | | | | | server record ttyrecs. Crawl compiled with WEBTILES=y should now be playable normally (i.e. indistinguishable from one compiled without WEBTILES) when run from a terminal. (This is not yet completely the case.) The Webtiles data is written on a Unix-domain datagram socket; the Crawl parameter -webtiles-socket determines a path on which the Crawl process receives control messages. The Webtiles server then runs Crawl in a pseudo-terminal and records its console output into a ttyrec file. The goal of all this is of course to be able to watch Webtiles games from ssh, and later the reverse.
* A lua hook to tell if we're currently being prompted for level up stat gain.Raphael Langella2011-08-241-0/+1
| | | | | For the Zot Bot. https://crawl.develz.org/tavern/viewtopic.php?f=22&t=2333
* A dlua function debug.disable() to turn off some parts of Crawl.Adam Borowski2011-07-121-0/+2
| | | | | | | | | Currently implemented: * spawns * mon_act * mon_regen * player_regen * hunger
* Some crude protection against infinite ready() loops.Adam Borowski2011-05-231-0/+1
|
* Fix incorrect darkening of range when a new-style targetter is used.Adam Borowski2011-05-171-2/+3
| | | | | | | | | | Old (beam) ranges use targetter_smite which is almost the same: it will mark scryed places as invalid. We can make it smarter (auto-hit beams, etc) later. Also, what's the reason Fedhas' spawn spores darkens view before showing the spores that will appear? It doesn't mark them differently from existing ones, it doesn't seem to do anything but hiding floor details. I did not migrate that behaviour to the new code -- should I?
* Merge branch 'unicode'.Adam Borowski2011-04-011-4/+0
|\ | | | | | | | | There are some issues left, like incorrect wrapping in some cases, but we can fix them later.
| * Merge branch 'master' into unicodeAdam Borowski2011-03-131-0/+9
| |\
| * \ Merge branch 'master' into unicodeAdam Borowski2011-01-111-0/+3
| |\ \ | | | | | | | | | | | | Conflicts galore...
| * \ \ Merge branch 'master' into unicodeAdam Borowski2010-12-121-0/+1
| |\ \ \
| * \ \ \ Merge branch 'master' into unicodeAdam Borowski2010-12-021-1/+1
| |\ \ \ \
| * | | | | Always use Unicode values for glyphs. Always use ncursesw on Unix console.Adam Borowski2010-09-261-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CSET_IBM and CSET_DEC are now merely presets and don't change the I/O encoding. Doing I/O using any encoding other than the one configured using LANG/LC_* is just wrong and no well-behaving program should do that. This does require changes on CAO/CDO, but they would fix problems with ttyrec and spectating as well. To fix: ncursesw replaces unrepresentable characters with spaces, we'll have to replace them by hand.
* | | | | | 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.
* | | | | Mention recent screen resizes in crash dumps.Adam Borowski2011-02-231-0/+1
| | | | |
* | | | | Apply galehar's "next map after winning" changes to the tutorial.Johanna Ploog2011-02-111-0/+5
| | | | |
* | | | | Map selection screen: defaults to next map if previous game was won.Raphael Langella2011-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It works with sprint but would be mostly useful for tutorial. Unfortunately, it seems tutorial maps don't even go through ouch(), so I don't know how to set last_game_won. I guess it should be done by a trigger on the exit stairs.
* | | | | After a tutorial or sprint map, go back to map screen instead of main screen.Raphael Langella2011-02-081-0/+1
| | | | |
* | | | | New game state function: game_is_hints_tutorial(), covering both.Johanna Ploog2011-01-231-0/+1
| |_|_|/ |/| | |
* | | | Allow maps to specify different CHANCE and WEIGHT for different depth ranges ↵Darshan Shaligram2010-12-241-0/+1
| | | | | | | | | | | | | | | | (Zaba).
* | | | Replace the tile_title_screen option by tile_skip_title.Raphael Langella2010-12-241-0/+2
| |_|/ |/| | | | | | | | | | | The title screen is always displayed. The option only controls wether or not to wait for a key when databases have finished loading.
* | | Fix broken Bazaar ability in zotdef (Zaba).Darshan Shaligram2010-12-081-0/+1
| |/ |/| | | | | This also disallows use of Trowel card in the alternative game modes (Sprint, etc.)
* | Merge branch 'zotdef-0.6' into zotdef-mastermark2010-11-101-1/+1
|\ \ | |/ |/| | | | | | | Much manual merging, and a few fixes for changes in the code (particularly monsters->monster and the like). Now compiles and seems to work. Zot Def added to start menu.
| * Merge of the original myzotdef branch into the Crawl 0.6Mark Mackey2010-05-051-0/+1
| | | | | | | | release branch. Quite a few edits required...
* | Merge branch 'save-package'Adam Borowski2010-09-061-0/+3
|\ \
| * | Merge TAG_YOU_*, split out TAG_CHR.Adam Borowski2010-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | No chunk bears multiple tags anymore. Splitting out the basic char data eliminated the need to allow loading only certain parts of the main subfile/chunk.
* | | Rename class "monsters" to "monster".Robert Vollmert2010-09-051-9/+9
|/ /
* | A compile option (-DDEBUG_GLOBALS) to let valgrind act on global classes.Adam Borowski2010-07-191-0/+3
| | | | | | | | | | | | It's not the default, even for debug builds, since it makes debugging with gdb nasty -- you have to refer to real_you->field when gdb mentions you.field. Even naming real_you just you would still force you to use "->" instead of ".".
* | Add ASSERT_SAVE macro for asserts where it should be safe to emergency-save ↵Darshan Shaligram2010-07-161-0/+5
| | | | | | | | | | | | | | the game when the assert fails (doy). ASSERT_SAVE is currently used only for term size checks, but it can be used any place if it's known that the game is safe to save at that point.
* | Add -sprint-map option to allow DGL admin to force the use of a particular ↵Darshan Shaligram2010-06-291-0/+2
| | | | | | | | Sprint map.
* | Include Crawl command-line arguments in crash dump.Darshan Shaligram2010-06-201-0/+2
| |
* | Move Sprint saves into $SAVEDIR/sprint.Darshan Shaligram2010-06-191-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the same character name to have ongoing Crawl and Sprint games without filename collisions. I'm using a subdirectory instead of a filename suffix (such as Foo-501-spr.chr) to avoid blowing DOS compatibility. Add GAME_TYPE_UNSPECIFIED as the uninitialised game_type. It's synonymous with GAME_TYPE_NORMAL, but allows the code to distinguish between a player having chosen the main game and the player not having made a choice yet. get_savefile_directory() returns the current savefile directory based on game type. Direct use of Options.save_dir should be avoided in new code. player_save_info now tracks game type as well.
* | Get rid of get_input_line.Robert Vollmert2010-05-151-3/+0
| | | | | | | | It's not used anymore, and was buggy on windows console.
* | Change the way command repetition is handled.Robert Vollmert2010-05-121-4/+0
| | | | | | | | | | | | | | | | | | Instead of implicitly making _input() loop by adding a synthetic key to the input buffer, _do_repeat_cmd() now explicitly handles the repeats in a for-loop that calls _input(). This is probably far from done, but it already works better than the current broken state, so I'm pushing it.
* | Reenable old tutorial as a hints mode.Robert Vollmert2010-04-281-0/+1
| | | | | | | | | | | | | | It's a new game type GAME_TYPE_HINTS. The hints mode probably needs a bit of updating. Certainly the character selection menu does.
* | Unify startup menu with rest of character choice.Robert Vollmert2010-04-271-9/+0
| | | | | | | | | | | | | | | | | | Game type is now also stored in newgame_def, and crawl remembers the last choice. We could now easily add a Tab key to the startup menu that functions like the species choice Tab but that includes filling out the same name.