From 32ddb09f0132e3ef0f99092c7856a7f2e9b8563a Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 17 Aug 2007 16:21:27 +0000 Subject: [1775520] Sling bullets are no longer throwable. Fixed formatted_string's add_glyph methods not handling wide characters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2008 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/format.cc | 4 ++-- crawl-ref/source/item_use.cc | 4 +++- crawl-ref/source/itemprop.cc | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc index 2b77fc0bab..595d2a3f85 100644 --- a/crawl-ref/source/format.cc +++ b/crawl-ref/source/format.cc @@ -240,7 +240,7 @@ void formatted_string::add_glyph(const item_def *item) unsigned short col; get_item_glyph(item, &ch, &col); this->textcolor(col); - this->cprintf("%c", ch); + this->cprintf("%s", stringize_glyph(ch).c_str()); this->textcolor(last_col); } @@ -251,7 +251,7 @@ void formatted_string::add_glyph(const monsters *mons) unsigned short col; get_mons_glyph(mons, &ch, &col); this->textcolor(col); - this->cprintf("%c", ch); + this->cprintf("%s", stringize_glyph(ch).c_str()); this->textcolor(last_col); } diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 73a9300e2d..c41b24465a 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2169,7 +2169,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, #endif // create message - mprf( "You %s %s.", projected == LRET_LAUNCHED ? "shoot" : "throw", + mprf( "You %s%s %s.", + projected? "" : "awkwardly ", + projected == LRET_LAUNCHED ? "shoot" : "throw", item.name(DESC_NOCAP_A).c_str() ); // ensure we're firing a 'missile'-type beam diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index a74090d5fb..6cf6034f87 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -349,7 +349,7 @@ static missile_def Missile_prop[NUM_MISSILES] = { MI_ARROW, "arrow", 7, 5, false }, { MI_BOLT, "bolt", 9, 5, false }, { MI_LARGE_ROCK, "large rock", 20, 1000, true }, - { MI_SLING_BULLET, "sling bullet", 6, 4, true }, + { MI_SLING_BULLET, "sling bullet", 6, 4, false }, { MI_JAVELIN, "javelin", 10, 40, true }, }; -- cgit v1.2.3-54-g00ecf