summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-3/+4
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Move canned_message() from stuff.cc to message.ccNicholas Feinberg2014-07-271-0/+127
|
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-4/+4
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+1
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Correct some doxygen blocks.Neil Moore2014-05-291-1/+1
| | | | | Some of them were missing the /** (or /*!) that makes doxygen consider the comment in the first place.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Don't log DGL messages twice in certain instances (#8414).Shmuale Mark2014-04-231-1/+2
| | | | This was accomplished by adding a new message channel, MSGCH_DGL_MESSAGE.
* Give monster warnings their own channel.Steve Melenchuk2014-04-101-0/+1
| | | | | People who like setting force_mores on this can thus do so with one line for all possible variants on the message.
* Fix repeated messages lacking their x2 in character dumps (crate).elliptic2014-03-181-1/+9
|
* Don't sometimes wake the player on MSGCH_SOUND messages being printedDracoOmega2014-03-061-4/+0
| | | | | Not only is gameplay code being trigger in message handling kind of icky, but this was also nearly certain to never be relevant.
* Wrap more of message_store code within ifdef USE_TILE_WEB.Pekka Lampila2014-03-011-4/+7
|
* Fix messages sometimes being duplicated in WebTiles. (#8202)Pekka Lampila2014-03-011-23/+2
| | | | | | Lines not yet flushed were being sent to the client and in the case where more text got appended to that line (msg_condense_short) it was sent again (sometimes).
* Make arena_delay available outside of arena as view_delay.Steve Melenchuk2014-02-271-1/+1
| | | | | | | | | | So, if you're running a bot or you're generally annoyed by ranged/magical animations, you can set this to an appropriately low value. This also condenses a lot of code duplication related to arena_delay; a new function called scaled_delay is used for functions that should be impacted by this.
* Drop some useless parentheses around comparisons.Adam Borowski2014-01-101-1/+1
|
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-2/+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.
* Trim some extra spaces (ChrisOelmueller)Neil Moore2013-12-081-5/+5
| | | | | | Maybe the argp was supposed to line up with the next line, but that seems silly, and is inconsistent with the majority of our uses of va_list.
* Revert "Delay more prompt until level has finished loading."Adam Borowski2013-12-031-15/+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.
* Add mprf_nojoin().Neil Moore2013-11-301-11/+28
|
* Make msgwin_line_length non-static.Neil Moore2013-11-301-3/+1
|
* Delay more prompt until level has finished loading.Raphael Langella2013-11-301-0/+15
| | | | | | | | 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.
* Drop tagstring.{cc,h}Adam Borowski2013-11-291-1/+0
| | | | A whole file for four lines of code.
* Restrict mpr() to literals only.Adam Borowski2013-11-291-1/+1
| | | | | The translation project is stalled, but this makes all of such static strings trivially gatherable without any extra work.
* Remove mpr_nocap().Adam Borowski2013-11-291-5/+0
| | | | | No particular reason, other than consistency. And all but two used wasteful double-conversion, so this is not a speed regression.
* Reverse the order of arguments in mpr_nojoin().Adam Borowski2013-11-291-2/+2
| | | | | | | The old one was quite bizarre, inconsistent with mprf(). Only two cases used the default channel (mpr_nojoin() is quite special...), so I did not add an overload with the default.
* Remove the multi-argument version of mpr().Adam Borowski2013-11-291-6/+24
|
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-1/+1
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* More formatting fixes for return (...);Neil Moore2013-11-151-4/+4
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-10/+10
|
* Axe a buttload of useless #includes.Adam Borowski2013-11-031-1/+0
| | | | | Can't test Android, MSVC or Mac, but a very brief glance at the diff suggests it's unlikely they're affected.
* Condense some duplicated menu code for formatted_scrollerChris Oelmueller2013-09-211-3/+1
| | | | | | | | | Also re-align, and highlight input keys as in lots of other places. Show this improved -more- line for viewing character notes, too. The TODO was removed as well because the only effect of dynamically changing displayed "help" information like this is player confusion. Static information works better when it comes to legends.
* Cancel an american speling.Adam Borowski2013-08-241-1/+1
| | | | | | Looks like, unlike "target[t]ing" where a single t is used by many brits and even some aussies, "cancel[l]ing" has double l even for a good deal of americans.
* Allow specifying pre-filled text for {msgwin,cancelable}_get_line.Neil Moore2013-08-241-2/+2
| | | | Also remove an unused parameter.
* Give hell effects their own message channel.Adam Borowski2013-06-211-0/+1
| | | | | | There's too many of them do comfortably list in your config, some include "," which is a separator. Also, it's better to have them all on one colour rather than four.
* Turn pairs of assertions with x > min, x <= max into ASSERT_RANGE.Adam Borowski2013-06-081-4/+2
| | | | | The perl regexp to do so is: s&ASSERT\(([^\n]+) >= ([^\n]+)\);\s*ASSERT\(\1 < ([^\n]+)\);&ASSERT_RANGE($1, $2, $3);&sg;
* Fix WebTiles overflow more prompt losing one linePekka Lampila2013-05-211-4/+20
| | | | | Hold of sending the line that caused a more prompt until that prompt is cleared.
* Refactor ASSERT(a && b) -> ASSERT(a); ASSERT(b);Brendan Hickey2013-04-281-2/+4
| | | | | | | Convert conjunctive assertions into separate assertions. This ought to be correctness preserving. I ran the stress tests and didn't notice anything unusual. While I have confidence in it, if you are the slightest bit suspicious of this, please roll it back. Found instances with `ASSERT(\([^(|]*\) && \([^)|]*\))` Manually inspected each instance.
* Fix a possible infinite loop when dumping.Adam Borowski2013-04-091-5/+3
| | | | | | | | 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.
* Don't print the line number in -DDEBUG_FATAL messages.Adam Borowski2013-04-071-1/+1
| | | | | A line number in the error handler is useless, and the real line is lost (at least without traversing the stack).
* Add a comment to message_window::reset_temp().Samuel Bronson2013-03-291-0/+3
|
* Stop dropping lines from the message window due to an extra (nasal) -=.Samuel Bronson2013-03-291-1/+1
| | | | (Yes, I'm pretty sure this -= was causing undefined behaviour.)
* Fix a case of message not being sent to WebTilesPekka Lampila2013-03-201-5/+5
|
* Fix a console-in-webtiles hints regression vs console.Adam Borowski2012-12-181-3/+2
| | | | | (is_tiles() is constexpr, ie not any worse than #ifdefs in C++11, or in C++ < 11 optimized builds.)
* Brace and std:: removal.Adam Borowski2012-12-081-3/+1
|
* Indentation fixes.Adam Borowski2012-12-051-2/+2
|
* Webtiles: Do a complete update when the input mode changes.Florian Diebold2012-11-241-4/+7
| | | | Also, this refactors the more handling a bit, again.
* Refactor Webtiles more handling.Florian Diebold2012-11-231-22/+15
|
* Webtiles: Do message scrolling etc. on the client side.Florian Diebold2012-11-231-1/+94
| | | | | | | | 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-0/+1
| | | | | | | | | | 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.
* Rename struct glyph to cglyph_t.Adam Borowski2012-10-161-3/+3
| | | | Hard to come up with something less greppable...
* Allow making MSGCH_ERROR fatal.Adam Borowski2012-10-151-0/+5
| | | | | To do so, build with EXTERNAL_DEFINES=-DDEBUG_FATAL, like other debug fine-tuning defines.