summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:01:38 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:01:38 +0000
commit71b6b1d375ea617a5ca3057063ea76e97dbfbd8f (patch)
tree903d9e5054416840c24a7a79d6a0efaf86287f8b /crawl-ref/source
parent4b16c906a2ed48ff8a4ae682ad2e6c9615d3fe1b (diff)
downloadcrawl-ref-71b6b1d375ea617a5ca3057063ea76e97dbfbd8f.tar.gz
crawl-ref-71b6b1d375ea617a5ca3057063ea76e97dbfbd8f.zip
Apply kotk's minor fixes patch in [2827129], with minor tweaks.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10409 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-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 4049fd7ef3..c6863e4cb4 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1310,7 +1310,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 5ab9bb330f..67bf806c93 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -672,14 +672,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 5ad7ed620a..b2cc572c30 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 6678c51f08..88f2008a38 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1942,10 +1942,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 871f6a7ac9..0e9d3db292 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 4efce0130a..f6f687b84c 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -33,7 +33,7 @@ public:
};
// Windows and internal regions (text, dungeon, map, etc.)
-class MouseEvent;
+struct MouseEvent;
class Region
{