From 3275e9d0f89f2860f5e9dfd3ca2bf20e2d89d91a Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 18 Apr 2009 17:03:18 +0000 Subject: [2735312] Don't squelch multiple EOLs in the same cprintf for tiles. This should remove the inconsistency between tiles and console text printing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9628 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/decks.cc | 4 ---- crawl-ref/source/tilereg.cc | 8 +++++--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 76dec12063..b47442fe65 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -935,10 +935,6 @@ static void _describe_cards(std::vector cards) name = uppercase_first(name); data << "" << name << "\n" << get_linebreak_string(desc, get_number_of_cols()) -#ifdef USE_TILE - // For some reason we need another linebreak here, for the tiles version. - << EOL -#endif << EOL; } formatted_string fs = formatted_string::parse_string(data.str()); diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index e4173944f1..73992978f1 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -2172,12 +2172,14 @@ void TextRegion::addstr(char *buffer) { char c = buffer[i]; bool newline = false; - if (c == '\n' || c == '\r') + + if (c == '\r') + continue; + + if (c == '\n') { c = 0; newline = true; - if (buffer[i+1] == '\n' || buffer[i+1] == '\r') - i++; } buf2[j] = c; j++; -- cgit v1.2.3-54-g00ecf