summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 06:31:32 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 06:31:32 +0000
commit4d0033a9b385e5c492bb125dccb7c06f2c918fa3 (patch)
tree5e4142224e27c5678df0a26fbc16e69ff89e7898 /crawl-ref
parente8cd0a7f5fad0f0a7d70c4d936c7b09cfae8fa3c (diff)
downloadcrawl-ref-4d0033a9b385e5c492bb125dccb7c06f2c918fa3.tar.gz
crawl-ref-4d0033a9b385e5c492bb125dccb7c06f2c918fa3.zip
Backport the applicable parts of r10364.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10367 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/crawl.64
-rw-r--r--crawl-ref/source/AppHdr.h2
-rw-r--r--crawl-ref/source/command.cc4
-rw-r--r--crawl-ref/source/debug.cc4
-rw-r--r--crawl-ref/source/fight.cc5
-rw-r--r--crawl-ref/source/files.cc2
-rw-r--r--crawl-ref/source/misc.cc7
-rw-r--r--crawl-ref/source/mon-util.cc2
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/player.cc2
-rw-r--r--crawl-ref/source/spells3.cc13
-rw-r--r--crawl-ref/source/tilesdl.cc9
12 files changed, 40 insertions, 20 deletions
diff --git a/crawl-ref/docs/crawl.6 b/crawl-ref/docs/crawl.6
index 846a2e5e8c..c029c0ed64 100644
--- a/crawl-ref/docs/crawl.6
+++ b/crawl-ref/docs/crawl.6
@@ -1,11 +1,11 @@
.TH CRAWL 6
.SH NAME
-crawl - play the roguelike game of crawl
+crawl \- play the roguelike game of crawl
.SH SYNOPSIS
.BR crawl
[options]
.PP
-Use the "-help" option to get a list of command line options and their descriptions.
+Use the "\-help" option to get a list of command line options and their descriptions.
.SH DESCRIPTION
Crawl is a fun game in the grand tradition of games like Rogue, Hack, and
Moria. Your objective is to travel deep into a subterranean cave complex and
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h
index f417f201ab..3c91b2ef07 100644
--- a/crawl-ref/source/AppHdr.h
+++ b/crawl-ref/source/AppHdr.h
@@ -112,7 +112,9 @@
#define USE_MORE_SECURE_SEED
// Use POSIX regular expressions
+ #ifndef REGEX_PCRE
#define REGEX_POSIX
+ #endif
// If you have libpcre, you can use that instead of POSIX regexes -
// uncomment the line below and add -lpcre to your makefile.
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index bb0903cc9d..03523ec43f 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1655,8 +1655,8 @@ static bool _find_description(bool &again, std::string& error_inout)
else
{
error_inout = "No matching ";
- error_inout += type;
- error_inout += "s.";
+ error_inout += pluralise(type);
+ error_inout += ".";
}
return (false);
}
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 9812ae932f..4f0d65189a 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -6600,10 +6600,10 @@ void do_crash_dump()
fprintf(file, "dlua stack:" EOL);
print_dlua_stack();
- // Lastly try to dump the Lua persistant data and the contents of the Lua
+ // Lastly try to dump the Lua persistent data and the contents of the Lua
// markers, since actually running Lua code has the greatest chance of
// crashing.
- fprintf(file, "Lua persistant data:" EOL);
+ fprintf(file, "Lua persistent data:" EOL);
fprintf(file, "<<<<<<<<<<<<<<<<<<<<<<" EOL);
_debug_dump_lua_persist(file);
fprintf(file, ">>>>>>>>>>>>>>>>>>>>>>" EOL EOL);
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 4dd055e691..aa320f1f0b 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -3559,9 +3559,10 @@ void melee_attack::player_apply_staff_damage()
break;
default:
- mpr("You're wielding some staff I've never heard of! (fight.cc)");
+ mpr("You're wielding some staff I've never heard of! (fight.cc)",
+ MSGCH_ERROR);
break;
- } // end switch
+ }
if (special_damage > 0)
{
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index f73251a140..d4ea789274 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -460,8 +460,10 @@ void assert_read_safe_path(const std::string &path) throw (std::string)
throw make_stringf("\"%s\" is an absolute path.", path.c_str());
if (path.find("..") != std::string::npos)
+ {
throw make_stringf("\"%s\" contains \"..\" sequences.",
path.c_str());
+ }
#endif
// Path is okay.
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index b775941358..9b0bc8cdf1 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1473,7 +1473,7 @@ static void set_entry_cause(entry_cause_type default_cause,
}
}
-static int runes_in_pack()
+static int runes_in_pack(std::vector<int> &runes)
{
int num_runes = 0;
@@ -1484,6 +1484,8 @@ static int runes_in_pack()
&& you.inv[i].sub_type == MISC_RUNE_OF_ZOT)
{
num_runes += you.inv[i].quantity;
+ for (int q = 1; runes.size() < 3 && q < you.inv[i].quantity; ++q)
+ runes.push_back(you.inv[i].plus);
}
}
@@ -2128,7 +2130,8 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
if (stair_find == DNGN_ENTER_ZOT && !you.opened_zot)
{
- const int num_runes = runes_in_pack();
+ std::vector<int> runes;
+ const int num_runes = runes_in_pack(runes);
if (num_runes < NUMBER_OF_RUNES_NEEDED)
{
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 7d8113c6aa..c496f07e6c 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -7995,7 +7995,7 @@ int monsters::action_energy(energy_use_type et) const
// (HT_AMPHIBIOUS_LAND, such as hydras) and those that
// favour water (HT_AMPHIBIOUS_WATER, such as merfolk), but
// that's something we can think about.
- if (mons_class_amphibious(type))
+ if (mons_amphibious(this))
return div_rand_round(mu.swim * 7, 10);
else
return mu.swim;
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index df7a93a9d6..9cc1352311 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -3811,8 +3811,8 @@ static void _check_wander_target(monsters *mon, bool isPacified = false,
if (!can_move)
{
- can_move = (mons_amphibious(mon))
- ? DNGN_DEEP_WATER : DNGN_SHALLOW_WATER;
+ can_move = (mons_amphibious(mon) ? DNGN_DEEP_WATER
+ : DNGN_SHALLOW_WATER);
}
if (mon->is_travelling())
@@ -8390,7 +8390,7 @@ static bool _monster_move(monsters *monster)
if (monster->type == MONS_TRAPDOOR_SPIDER)
{
if (mons_is_submerged(monster))
- return (false);
+ return (false);
// Trapdoor spiders hide if they can't see their foe.
// (Note that friendly trapdoor spiders will thus hide even
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 1100a5a49e..96cbdb6ad0 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1886,7 +1886,7 @@ int player_prot_life(bool calc_unid, bool temp, bool items)
return (pl);
}
-// New player movement speed system... allows for a bit more that
+// New player movement speed system... allows for a bit more than
// "player runs fast" and "player walks slow" in that the speed is
// actually calculated (allowing for centaurs to get a bonus from
// swiftness and other such things). Levels of the mutation now
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 8838772700..895c6c87bf 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -815,7 +815,7 @@ void equip_undead(const coord_def &a, int corps, int monster, int monnum)
default:
continue;
- } // switch
+ }
// Two different items going into the same slot indicate that
// this and further items weren't equipment the monster died
@@ -825,10 +825,10 @@ void equip_undead(const coord_def &a, int corps, int monster, int monnum)
unwind_var<int> save_speedinc(mon->speed_increment);
mon->pickup_item(mitm[objl], false, true);
- } // while
+ }
}
-static bool _raise_remains(const coord_def &a, int corps, beh_type beha,
+static bool _raise_remains(const coord_def &pos, int corps, beh_type beha,
unsigned short hitting, god_type god, bool actual,
int* mon_index)
{
@@ -851,7 +851,14 @@ static bool _raise_remains(const coord_def &a, int corps, beh_type beha,
// Headless hydras cannot be raised, sorry.
if (zombie_type == MONS_HYDRA && number == 0)
+ {
+ if (see_grid(pos))
+ {
+ mpr("The zero-headed hydra corpse sways and immediately "
+ "collapses!");
+ }
return (false);
+ }
monster_type mon = MONS_PROGRAM_BUG;
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index ebae54a1a2..b93bd66495 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -232,11 +232,16 @@ bool TilesFramework::initialise()
SDL_EnableUNICODE(true);
SDL_WM_SetCaption(CRAWL " " VERSION, CRAWL);
+ const char *icon_name =
+#ifdef DATA_DIR_PATH
+ DATA_DIR_PATH
+#endif
#ifdef WIN32TILES
- const char *icon_name = "dat/tiles/stone_soup_icon-win32.png";
+ "dat/tiles/stone_soup_icon-win32.png";
#else
- const char *icon_name = "dat/tiles/stone_soup_icon-32x32.png";
+ "dat/tiles/stone_soup_icon-32x32.png";
#endif
+
SDL_Surface *icon = IMG_Load(icon_name);
if (!icon)
{