summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.h
Commit message (Collapse)AuthorAgeFilesLines
* Move canned_message() from stuff.cc to message.ccNicholas Feinberg2014-07-271-0/+2
|
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-1/+1
|
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Revert "Delay more prompt until level has finished loading."Adam Borowski2013-12-031-1/+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.
* Make msgwin_line_length non-static.Neil Moore2013-11-301-0/+1
|
* Delay more prompt until level has finished loading.Raphael Langella2013-11-301-0/+1
| | | | | | | | 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.
* Allow specifying pre-filled text for {msgwin,cancelable}_get_line.Neil Moore2013-08-241-5/+6
| | | | Also remove an unused parameter.
* Fix a possible infinite loop when dumping.Adam Borowski2013-04-091-1/+1
| | | | | | | | If all messages in the buffer are not "dumpworthy" (MSGCH_EQUIPMENT, MSGCH_DIAGNOSTICS or MSGCH_TUTORIAL), it'll spin forever. This commit also removes such racism if the dump happens during a crash: we do want to see debug output.
* Webtiles: Do message scrolling etc. on the client side.Florian Diebold2012-11-231-0/+5
| | | | | | | | Previously, the message pane was rendered on the server side and its contents were sent to the client as they were displayed in the terminal. Now, messages are sent as separate objects. This also necessitates special handling of more prompts and line_reader for webtiles.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-1/+0
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Use std namespace.Raphael Langella2012-08-261-17/+17
| | | | | | | | | | | | | 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.
* Fix arena message dumps being inoperative.Adam Borowski2012-03-251-8/+2
| | | | | | Someone made it as a stub in early 2009, and never implemented (but documented as working!). This suggests this feature is not exactly needed, and perhaps could be axed?
* Let CHANNEL: prefixes use all types in both current uses.Adam Borowski2011-11-111-0/+2
|
* cppcheck: pass const strings by reference. Alloc + copy less.Adam Borowski2011-07-051-2/+2
|
* 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.
* Also reinitialize the message window and the notes for new games.Johanna Ploog2010-08-191-0/+1
|
* Add option restart_after_game to make Crawl return to the main menu after ↵Darshan Shaligram2010-07-041-0/+1
| | | | the game ends, enabled by default for tiles builds.
* Fix clang error due to input_class being used without being definedLuca Barbieri2010-05-021-1/+1
| | | | | | | gcc doesn't complain because the use is in a template. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Clean up message colour handling.Robert Vollmert2010-03-041-1/+1
| | | | | | | Also add tagstring.cc:colour_string that handles wrapping a string with appropriate colour strings. It would be nice to concentrate all the awful colour tagging code in tagstring and eventually replace it with a dedicated datatype.
* Redo handling of temporary messages.Robert Vollmert2010-02-081-0/+7
| | | | | | | | | Any number of temporary messages can now be printed by first setting a flag with msgwin_set_temporary(true). These messages may then be cleared from both history and message window by calling msgwin_clear_temporary. Calling msgwin_set_temporary(false) will make previously temporary messages permannet.
* Export effective message window height with msgwin_lines().Robert Vollmert2010-02-061-0/+2
|
* Add msgwin_got_input() to notify message window of input.Robert Vollmert2010-02-051-0/+4
|
* Fix message window underscores.Robert Vollmert2010-02-031-0/+2
| | | | | This is done by reintroducing msgwin_new_turn, called at turn start.
* An implementation of any_messages().Robert Vollmert2010-01-251-4/+2
| | | | This should fix the recently obnoxious paralysis behaviour.
* Change handling of delayed messaging leading dash.Robert Vollmert2010-01-251-0/+3
| | | | | | | | | | | This is now output throught msgwin_new_cmd, called from the main loop from input(). It outputs the normal light gray new turn dash if a turn has passed since the light command; this dash will move up through messages, indicating the last turn start. If no turn has passed, it outputs a dark gray dash.
* Replace tracking of turn_line by mesclr_line.Robert Vollmert2010-01-251-1/+0
| | | | | | | | The message window now tracks at which line it was last "cleared". This is to be able to implement any_messages() which will say whether there have been new messages since the last mesclr(). msgwin_new_turn is gone.
* msgwin_prompt and msgwin_reply to allow generic saving of replies.Robert Vollmert2010-01-211-0/+3
| | | | Rewrite msgwin_get_line to use these.
* Export function to scroll message window.Robert Vollmert2010-01-201-0/+2
|
* Make (some) more prompts respond to the same keys as they used to.Robert Vollmert2010-01-201-3/+1
| | | | | | | | That's space/enter/escape; also autoclear_more is there once more. Currently only for --more-- prompts issued through "void more()", not those issued for the full message window which will take any key.
* Output solitary leading dash on new turn.Robert Vollmert2010-01-191-0/+2
|
* Copy cancelable_get_line_autohist to msgwin_get_line.Robert Vollmert2010-01-181-0/+14
| | | | It's doubtful that this is the best way to do things.
* Use msgwin_get_line for note taking.Robert Vollmert2010-01-181-1/+2
|
* Add msgwin_get_line.Robert Vollmert2010-01-181-0/+6
| | | | | This wraps cancelable_get_line to write the reply to the message history.
* Display message window from redraw_screen.Robert Vollmert2010-01-041-0/+3
| | | | | Should fix the message window not filling after say leaving the inventory screen.
* Merge branch 'master' into messagewindowRobert Vollmert2010-01-031-1/+1
|\ | | | | | | | | Conflicts: crawl-ref/source/message.cc
| * 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>
* | Add message flushing and clearing.Robert Vollmert2009-12-151-5/+1
| | | | | | | | mesclr is still a dummy of sorts.
* | Some dummy implementations to fix the compile.Robert Vollmert2009-12-091-5/+18
| |
* | Remove unused message.h:set_colour.Robert Vollmert2009-12-091-2/+0
| |
* | Convert channel_to_colour to return msg_colour_type.Robert Vollmert2009-12-091-1/+1
|/
* 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