summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.h
Commit message (Collapse)AuthorAgeFilesLines
* message.h: remove superfluous semicolonSteven Noonan2009-12-291-1/+1
| | | | | | This blows up on clang++ and pedantic GCC builds. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* reset_more_autoclear() -> set_more_autoclear()Matthew Cline2009-11-241-1/+1
| | | | | You can now also turn on autoclear-more status from outside message.cc, rather than just turning it off.
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-20/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Apply my recent commits to trunk.j-p-e-g2009-06-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9984 c06c8d41-db1a-0410-9941-cceddc491573
* Implement a very basic attempt at message condensation: Store the most j-p-e-g2009-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | recent message in prev_message and only output it when another non-matching message rolls in or the player gets a turn. Matching messages (must be identical and issued in direct succession, like is the case with the message history condensation) increase the counter, so you end up with messages like: You feel sick. The killer bee misses you. (x3) The killer bee stings you. The killer bee stings you but doesn't do any damage. The killer bee misses you. (x5) ...instead of the 11 lines it would have been in total. This behaviour is controlled by the same option as the condensation in the message history, msg_condense_repeats. There's definitely room for improvement. At the moment the bracketed information is written into the message itself, which will prevent further merging in the message history, or, probably worse, cause ugly double-merging like "The killer bee misses you. (x3) (x2)". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9262 c06c8d41-db1a-0410-9941-cceddc491573
* Properly use default parameters when displaying comma-separated lists.dolorous2009-02-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9048 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Disallowing mouse clicks on force_more messages to help avoid accidental deaths.ennewalker2009-01-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8451 c06c8d41-db1a-0410-9941-cceddc491573
* Added arena game options:zelgadis2009-01-011-0/+8
| | | | | | | | | | | | | | | | | * arena_dump_msgs, which if true will dump all mpr()'d messages into arena.result * arena_dump_msgs_all, which will cause arena_dump_msgs to dump all messages, not just ones considered "dump worthy" * arena_list_eq, which if true will cause all items the monsters came equipped with to be dumped to arena.result Also, made arena_delay option settable, so you can do "arena_delay = 0" to make the simulation zip by. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8071 c06c8d41-db1a-0410-9941-cceddc491573
* If a multi-line message matches message_colour or note_messages then apply themzelgadis2008-12-261-14/+0
| | | | | | | | | to the whole message before it gets split into lines, rather than to each individual line after it gets split. Breaks previous-messages savefile compatability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7984 c06c8d41-db1a-0410-9941-cceddc491573
* If the user presses ESC in response to --more-- then automatically clearzelgadis2008-12-211-0/+1
| | | | | | | | | | | all --more--s until the player can enter a command again, the player gets a prompt, or an error message is given. Move where activity is interrupted on error messages, and also do that for error messages sent through formatted_mpr(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7893 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
* FR 1969858: Store message history across saves.j-p-e-g2008-09-141-0/+3
| | | | | | | | Spin-off from BR 2085502: Don't autoswap weapons if a monster turns invisible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6924 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fixes.dolorous2008-06-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6137 c06c8d41-db1a-0410-9941-cceddc491573
* Add more whitespace fixes.dolorous2008-06-221-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6040 c06c8d41-db1a-0410-9941-cceddc491573
* Added option msg_condense_repeats (defaults to true) which causes messagezelgadis2008-06-081-1/+8
| | | | | | | | | | | history to condense repeated messages into a single line, so that (for example) if you hear a Zot trap go off five times in a row while resting, message history will show: You hear a distant "Zot!" (x5) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5575 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up and applied 1895117: formatted_string and tutorial polish.pauldubois2008-02-291-1/+2
| | | | | | | | | | | | | | - formatted_message_history handles linebreaks within color spans properly, and now makes print_formatted_paragraph redundant. (changed tutorial.cc to take advantage of this) - formatted_string handles <color></color> properly (with nesting) instead of reverting to lightgrey. (changed tutorial.cc to take advantage of this, too) - The part of 1895117 that dealt with dec glyphs was already addressed in a previous patch, in a more robust way, so that got cut. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3481 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-18/+2
| | | | | | | | | | | | | 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
* Implemented patch 1773718 (improved wizard commands) andj-p-e-g2007-09-021-0/+8
| | | | | | | patch 1783003 (ímproved menu sorting), both by zelgadis. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2041 c06c8d41-db1a-0410-9941-cceddc491573
* Type-safety on mpr() and friends channel argument.haranp2007-08-041-8/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1970 c06c8d41-db1a-0410-9941-cceddc491573
* When showing glyphs in messages (as in the tutorial), use stringize_glyph() todshaligram2007-06-081-1/+1
| | | | | | | | | convert Unicode glyphs to multibyte sequences. Added multibyte_strlen to calculate string lengths correctly when dealing with multibyte strings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1560 c06c8d41-db1a-0410-9941-cceddc491573
* monam(), moname() and ptr_monam() are gone.haranp2007-05-191-0/+1
| | | | | | | | | | The replacement is str_monam() and mons_type_name(). str_monam() should probably be folded into actor::name. I think. Deaths from zombies, skeletons and simulacra will not handle the name correctly; needs a further hack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1484 c06c8d41-db1a-0410-9941-cceddc491573
* Messaging improvements.haranp2007-05-071-43/+40
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1411 c06c8d41-db1a-0410-9941-cceddc491573
* Added an std::ostream, mpr_stream, to the message.h interface.haranp2007-04-281-0/+31
| | | | | | | | | | | The usage is along the lines of: mpr_stream << setchan(MSGCH_PROMPT) << "this will be output to prompt" << i << "/" << j << std::endl; This is very hacky at the moment, but at least it's much more type-safe than mprf()... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1389 c06c8d41-db1a-0410-9941-cceddc491573
* Made trap ammo dependent on T&D.haranp2007-04-231-0/+1
| | | | | | | | Old: 11 + G(1/3), bounded at 20 (G is the geometric distribution.) New: 10 + random2(T&D skill). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1353 c06c8d41-db1a-0410-9941-cceddc491573
* Added a funtion for formatted message history, and, while I was at it, j-p-e-g2007-03-201-1/+4
| | | | | | | | | | | | moved some overlapping parts of base_mpr and formatted_mpr into separate functions. This makes them more readable and avoids code duplication. I'm uncertain as to whether translating every string in replay_messages into a formatted string (just in case) would be overkill - so for now that only happens for messages of MSGCH_TUTORIAL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1071 c06c8d41-db1a-0410-9941-cceddc491573
* Added add_glyph methods to formatted string to show a monster or item glyph asdshaligram2007-01-281-0/+2
| | | | | | | | displayed on screen. Still is a bit messy to use, and you must initialise the formatted_string with a base colour before using add_glyph(), or the formatted_string will reset to lightgrey after the glyph. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@897 c06c8d41-db1a-0410-9941-cceddc491573
* Added formatted_mpr(), which gives (very!) basic support for formattedharanp2007-01-271-0/+5
| | | | | | | output in mpr(). This is an extreme hack, and should be redone better. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@891 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-0/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+83
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573