summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:02:46 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:02:46 +0000
commitb492473c4686dd26b50c4a5bb7a533ec105e7fde (patch)
tree232ac84ce7c636631ae0a87e120c5ba226b9cf60 /crawl-ref
parentd9f0ddab344ee7667c0e1f6dfb63b6af8b30bd5a (diff)
downloadcrawl-ref-b492473c4686dd26b50c4a5bb7a533ec105e7fde.tar.gz
crawl-ref-b492473c4686dd26b50c4a5bb7a533ec105e7fde.zip
Apply trunk r10409 to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10410 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/describe.cc7
-rw-r--r--crawl-ref/source/files.cc8
-rw-r--r--crawl-ref/source/menu.h5
-rw-r--r--crawl-ref/source/spl-book.cc4
-rw-r--r--crawl-ref/source/spl-util.cc2
-rw-r--r--crawl-ref/source/tilereg.h2
6 files changed, 17 insertions, 11 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index b90518f7e9..2b1f6cde6a 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1406,7 +1406,12 @@ static std::string _describe_armour( const item_def &item, bool verbose )
if (!is_known_artefact(item))
{
const int max_ench = armour_max_enchant(item);
- if (item.plus < max_ench || !item_ident( item, ISFLAG_KNOW_PLUSES ))
+ if (armour_is_hide(item))
+ {
+ description += "$Enchanting it will turn it into a suit of "
+ "magical armour.";
+ }
+ else if (item.plus < max_ench || !item_ident(item, ISFLAG_KNOW_PLUSES))
{
description += "$It can be maximally enchanted to +";
_append_value(description, max_ench, false);
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index d4ea789274..f8bb802873 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -622,14 +622,14 @@ std::vector<player_save_info> find_saved_characters()
for (unsigned int i = 0; i < allfiles.size(); ++i)
{
std::string filename = allfiles[i];
+
+ std::string::size_type point_pos = filename.find_last_of('.');
+ std::string basename = filename.substr(0, point_pos);
+
#ifdef LOAD_UNPACKAGE_CMD
if (!is_packed_save(filename))
continue;
- std::string basename =
- filename.substr(0,
- filename.length() - strlen(PACKAGE_SUFFIX));
-
const std::string zipname = get_savedir_path(basename);
// This is the filename we actually read ourselves.
diff --git a/crawl-ref/source/menu.h b/crawl-ref/source/menu.h
index 034c5df682..a6defc961e 100644
--- a/crawl-ref/source/menu.h
+++ b/crawl-ref/source/menu.h
@@ -62,8 +62,9 @@ int menu_colour(const std::string &itemtext,
const std::string &prefix = "",
const std::string &tag = "");
-struct MenuEntry
+class MenuEntry
{
+public:
std::string tag;
std::string text;
int quantity, selected_qty;
@@ -148,7 +149,7 @@ struct MenuEntry
#endif
};
-struct ToggleableMenuEntry : public MenuEntry
+class ToggleableMenuEntry : public MenuEntry
{
public:
std::string alt_text;
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 5cf25a4ab1..47a3c9dcdc 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1735,10 +1735,10 @@ static bool _compare_spells(spell_type a, spell_type b)
b_type = spelltype_name(mask);
}
ASSERT(a_type != NULL && b_type != NULL);
- return (strcmp(a_type, b_type));
+ return (strcmp(a_type, b_type) < 0);
}
- return (strcmp(spell_title(a), spell_title(b)));
+ return (strcmp(spell_title(a), spell_title(b)) < 0);
}
bool is_memorised(spell_type spell)
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index fea2e61aeb..805e2295de 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -781,7 +781,7 @@ const char* spelltype_short_name( int which_spelltype )
case SPTYP_ICE:
return ("Ice");
case SPTYP_TRANSMUTATION:
- return ("Tmgr");
+ return ("Trmt");
case SPTYP_NECROMANCY:
return ("Necr");
case SPTYP_HOLY:
diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h
index 15c7d3a886..e8d2523d27 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -32,7 +32,7 @@ public:
};
// Windows and internal regions (text, dungeon, map, etc.)
-class MouseEvent;
+struct MouseEvent;
class Region
{