summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2011-02-20 20:23:22 +0100
committerBardur Arantsson <bardur@scientician.net>2011-02-20 20:56:56 +0100
commitb35abe4978f83bee7eebdcce7df4228503086ed4 (patch)
treef39569937dab4769ad44526bf4b4861ccf0148f7
parent5fbe06613a8a9e5d8731a832ddff0e9bdce112bb (diff)
Avoid using C++ keywords as identifiers.
-rw-r--r--src/generate.c6
-rw-r--r--src/lua_bind.c4
-rw-r--r--src/monster2.c4
-rw-r--r--src/plots.c14
-rw-r--r--src/spells1.c8
-rw-r--r--src/xtra1.c6
6 files changed, 21 insertions, 21 deletions
diff --git a/src/generate.c b/src/generate.c
index 5d0f67c3..b3036e1d 100644
--- a/src/generate.c
+++ b/src/generate.c
@@ -7905,10 +7905,10 @@ static bool_ cave_gen(void)
{
int oy;
int ox;
- int m_idx, try = 10000;
+ int m_idx, tries = 10000;
/* Find a good position */
- while (try)
+ while (tries)
{
/* Get a random spot */
oy = randint(cur_hgt - 4) + 2;
@@ -7918,7 +7918,7 @@ static bool_ cave_gen(void)
if (cave_empty_bold(oy, ox)) break;
/* One less try */
- try--;
+ tries--;
}
/* Place the guardian */
diff --git a/src/lua_bind.c b/src/lua_bind.c
index 121e65d0..ccbaa921 100644
--- a/src/lua_bind.c
+++ b/src/lua_bind.c
@@ -199,11 +199,11 @@ bool_ summon_lua_okay(int r_idx)
return (ret);
}
-bool_ lua_summon_monster(int y, int x, int lev, bool_ friend, char *fct)
+bool_ lua_summon_monster(int y, int x, int lev, bool_ friend_, char *fct)
{
summon_lua_okay_fct = fct;
- if (!friend)
+ if (!friend_)
return summon_specific(y, x, lev, SUMMON_LUA);
else
return summon_specific_friendly(y, x, lev, SUMMON_LUA, TRUE);
diff --git a/src/monster2.c b/src/monster2.c
index 0f9d1dc6..841a6428 100644
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -59,9 +59,9 @@ void monster_check_experience(int m_idx, bool_ silent)
/* Gain melee power */
if (magik(30))
{
- int i = rand_int(3), try = 20;
+ int i = rand_int(3), tries = 20;
- while ((try--) && !m_ptr->blow[i].d_dice) i = rand_int(3);
+ while ((tries--) && !m_ptr->blow[i].d_dice) i = rand_int(3);
m_ptr->blow[i].d_dice++;
}
diff --git a/src/plots.c b/src/plots.c
index f48d5658..53d3e1bc 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -80,7 +80,7 @@ bool_ check_hook(int h_idx)
/* Add a hook */
hooks_chain* add_hook(int h_idx, hook_type hook, cptr name)
{
- hooks_chain *new, *c = hooks_heads[h_idx];
+ hooks_chain *new_, *c = hooks_heads[h_idx];
/* Find it */
while ((c != NULL) && (strcmp(c->name, name)))
@@ -91,16 +91,16 @@ hooks_chain* add_hook(int h_idx, hook_type hook, cptr name)
/* If not already in the list, add it */
if (c == NULL)
{
- MAKE(new, hooks_chain);
- new->hook = hook;
- sprintf(new->name, "%s", name);
+ MAKE(new_, hooks_chain);
+ new_->hook = hook;
+ sprintf(new_->name, "%s", name);
#ifdef DEBUG_HOOK
if (wizard) cmsg_format(TERM_VIOLET, "HOOK ADD: %s", name);
if (take_notes) add_note(format("HOOK ADD: %s", name), 'D');
#endif
- new->next = hooks_heads[h_idx];
- hooks_heads[h_idx] = new;
- return (new);
+ new_->next = hooks_heads[h_idx];
+ hooks_heads[h_idx] = new_;
+ return (new_);
}
else return (c);
}
diff --git a/src/spells1.c b/src/spells1.c
index b1e3500d..9e9fcff0 100644
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -3040,7 +3040,7 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
int x1 = randint(cur_wid) - 1;
int y2 = y1;
int x2 = x1;
- int try = 1000;
+ int tries = 1000;
/*
* Avoid "interesting" and/or permanent features
@@ -3053,18 +3053,18 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
(f_info[cave[y][x].feat].flags1 & FF1_PERMANENT)) break;
/* Destination shouldn't be "interesting" either */
- while (try &&
+ while (tries &&
(!cave_plain_floor_bold(y2, x2) ||
(f_info[cave[y2][x2].feat].flags1 & FF1_PERMANENT)))
{
y2 = y1 = randint(cur_hgt) - 1;
x2 = x1 = randint(cur_wid) - 1;
scatter(&y2, &x2, y1, x1, 20, 0);
- try --;
+ tries --;
}
/* No boarding grids found */
- if (!try) break;
+ if (!tries) break;
/* Place a pair of between gates */
cave_set_feat(y, x, FEAT_BETWEEN);
diff --git a/src/xtra1.c b/src/xtra1.c
index e881aa9f..def39271 100644
--- a/src/xtra1.c
+++ b/src/xtra1.c
@@ -1589,13 +1589,13 @@ static void calc_powers(void)
for (i = 0; i < power_max; i++)
{
s32b old = old_powers[i];
- s32b new = p_ptr->powers[i];
+ s32b new_ = p_ptr->powers[i];
- if (new > old)
+ if (new_ > old)
{
if (!calc_powers_silent) cmsg_print(TERM_GREEN, powers_type[i].gain_text);
}
- else if (new < old)
+ else if (new_ < old)
{
if (!calc_powers_silent) cmsg_print(TERM_RED, powers_type[i].lose_text);
}