summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-20 20:01:19 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-20 20:01:58 -0500
commite3a04ec3a1b79e8f8ae8937e3fe16552384e557b (patch)
tree899b4426d9cc3deef16e1ed1031c88df0f0c5054
parent00e0df0c6cfcd47a9f71bf1bbd211db340baaf06 (diff)
downloadcrawl-ref-e3a04ec3a1b79e8f8ae8937e3fe16552384e557b.tar.gz
crawl-ref-e3a04ec3a1b79e8f8ae8937e3fe16552384e557b.zip
Remove tabs, and add minor cosmetic fixes.
-rw-r--r--crawl-ref/source/abl-show.cc42
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/initfile.cc14
-rw-r--r--crawl-ref/source/libw32c.cc2
-rw-r--r--crawl-ref/source/makeitem.cc12
-rw-r--r--crawl-ref/source/religion.cc50
-rw-r--r--crawl-ref/source/spells3.cc2
-rw-r--r--crawl-ref/source/spells4.cc42
-rw-r--r--crawl-ref/source/tags.cc10
-rw-r--r--crawl-ref/source/tags.h2
-rw-r--r--crawl-ref/source/tilesdl.cc2
11 files changed, 92 insertions, 88 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 822b9dcc46..e8c880e9f8 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -148,7 +148,8 @@ ability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
{ABIL_FEAWN_SUNLIGHT, ABIL_FEAWN_PLANT_RING, ABIL_FEAWN_RAIN,
ABIL_FEAWN_SPAWN_SPORES, ABIL_FEAWN_EVOLUTION },
// Chronos
- { ABIL_CHRONOS_PONDEROUSIFY, ABIL_CHRONOS_TIME_STEP, ABIL_CHRONOS_TIME_BEND, ABIL_CHRONOS_SLOUCH },
+ { ABIL_CHRONOS_PONDEROUSIFY, ABIL_CHRONOS_TIME_STEP,
+ ABIL_CHRONOS_TIME_BEND, ABIL_CHRONOS_SLOUCH },
};
// The description screen was way out of date with the actual costs.
@@ -2099,26 +2100,29 @@ static bool _do_ability(const ability_def& abil)
break;
case ABIL_CHRONOS_TIME_BEND:
- {
+ {
mpr("The flow of time bends around you.");
- // TODO perhaps make power dependent on invocation?
- // if so, this spell must train invocations too
- // currently, has one-size-fits-all power level and duration,
- // as if a wand of slow monster was zapped at each target
- for ( adjacent_iterator ai; ai; ++ai )
- {
- // Tile occupied by monster
- monsters* mon = monster_at(*ai);
- if(mon != NULL) {
- mprf(MSGCH_GOD, "%s rebukes %s.",
- god_name(you.religion).c_str(),
- mon->name(DESC_NOCAP_THE).c_str());
- do_slow_monster(mon, KC_YOU);
- }
- }
- break;
- }
+ // TODO perhaps make power dependent on invocation?
+ // if so, this spell must train invocations too
+ // currently, has one-size-fits-all power level and duration,
+ // as if a wand of slow monster was zapped at each target
+ for (adjacent_iterator ai; ai; ++ai)
+ {
+ // Tile occupied by monster
+ monsters* mon = monster_at(*ai);
+ if (mon != NULL)
+ {
+ simple_god_message(
+ make_stringf("rebukes %s.",
+ mon->name(DESC_NOCAP_THE).c_str()).c_str(),
+ GOD_CHRONOS);
+ do_slow_monster(mon, KC_YOU);
+ }
+ }
+ break;
+ }
+
case ABIL_CHRONOS_SLOUCH:
mpr("You can feel time thicken.");
mprf(MSGCH_GOD, "your speed is %d", player_movement_speed());
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index ed597780e5..0e6bb50475 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -5096,7 +5096,7 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
return (MON_UNAFFECTED);
case BEAM_SLOW:
- obvious_effect = do_slow_monster(mon, whose_kill());
+ obvious_effect = do_slow_monster(mon, whose_kill());
return (MON_AFFECTED);
case BEAM_HASTE:
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index d91ecdd1c9..c54713e80a 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -968,22 +968,24 @@ void game_options::reset_options()
// If USE_8_COLOUR_TERM_MAP is defined, then we force 8 colors.
// Otherwise, do a check to see if we're using Apple_Terminal.
#ifndef USE_8_COLOUR_TERM_MAP
- const char *term_program = getenv("TERM_PROGRAM");
+ const char *term_program = getenv("TERM_PROGRAM");
if (term_program && strcmp(term_program, "Apple_Terminal") == 0) {
#endif
- for (int i = 0; i < 16; i++)
+ for (int i = 0; i < 16; ++i)
colour[i] = i % 8;
colour[ DARKGREY ] = COL_TO_REPLACE_DARKGREY;
#ifndef USE_8_COLOUR_TERM_MAP
- } else {
- for (int i = 0; i < 16; i++)
+ }
+ else
+ {
+ for (int i = 0; i < 16; ++i)
colour[i] = i;
- }
+ }
#endif
// map each channel to plain (well, default for now since I'm testing)
- for (int i = 0; i < NUM_MESSAGE_CHANNELS; i++)
+ for (int i = 0; i < NUM_MESSAGE_CHANNELS; ++i)
channels[i] = MSGCOL_DEFAULT;
// Clear vector options.
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index 565d94db1f..ceaf212a56 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -359,7 +359,7 @@ void init_libw32c(void)
exit(0);
}
- std::string title = CRAWL " " + Version::Long();
+ std::string title = CRAWL " " + Version::Long();
GetConsoleTitle( oldTitle, 78 );
SetConsoleTitle( title.c_str() );
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index d81ae9dce6..f1260fb600 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1423,11 +1423,11 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level)
else if (tmp < 500)
rc = SPWPN_FROST;
else if (tmp < 650)
- rc = SPWPN_PENETRATION;
- else if (tmp < 800)
- rc = SPWPN_SHADOW;
- else if (tmp < 920)
- rc = SPWPN_PROTECTION;
+ rc = SPWPN_PENETRATION;
+ else if (tmp < 800)
+ rc = SPWPN_SHADOW;
+ else if (tmp < 920)
+ rc = SPWPN_PROTECTION;
else if (tmp < 980)
rc = SPWPN_VORPAL;
else
@@ -2010,7 +2010,7 @@ static special_armour_type _determine_armour_ego(const item_def& item,
120, SPARM_POISON_RESISTANCE,
120, SPARM_POSITIVE_ENERGY,
480, SPARM_PROTECTION,
- 1000, SPARM_REFLECTION, //XXX: Testing
+ 1000, SPARM_REFLECTION, //XXX: Testing
0));
break;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 491461832f..eb435b17bd 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -406,12 +406,12 @@ const char* god_lose_power_messages[NUM_GODS][MAX_GOD_ABILITIES] =
"spawn explosive spores",
"induce evolution"
},
- // Chronos
- { "make your items ponderous",
- "Chronos slows your biology",
- "",
- "",
- ""
+ // Chronos
+ { "make your items ponderous",
+ "Chronos slows your biology",
+ "",
+ "",
+ ""
}
};
@@ -4914,17 +4914,16 @@ static bool _chronos_retribution()
mpr("You lose track of time.");
you.put_to_sleep();
break;
+
case 4:
if (you.duration[DUR_SLOW] < 90)
{
dec_penance(god, 1);
- mpr( "You feel the world leave you behind!", MSGCH_WARN );
+ mpr("You feel the world leave you behind!", MSGCH_WARN);
you.duration[DUR_EXHAUSTED] = 100;
slow_player(100);
}
break;
-
-
}
return (true);
@@ -7000,38 +6999,39 @@ bool ponderousify_armour(){
{
if (item_slot == -1)
{
- item_slot = prompt_invent_item("Make which item ponderous?", MT_INVLIST,
- OSEL_ENCH_ARM, true, true, false);
+ item_slot = prompt_invent_item("Make which item ponderous?",
+ MT_INVLIST, OSEL_ENCH_ARM, true, true, false);
}
+
if (prompt_failed(item_slot))
return (false);
item_def& arm(you.inv[item_slot]);
- if (!is_enchantable_armour(arm, true, true) ||
- get_armour_ego_type(arm) != SPARM_NORMAL)
+ if (!is_enchantable_armour(arm, true, true)
+ || get_armour_ego_type(arm) != SPARM_NORMAL)
{
mpr("Choose some type of armour to enchant, or Esc to abort.");
if (Options.auto_list)
more();
item_slot = -1;
- mpr("You can't enchant that."); //does not appear
+ mpr("You can't enchant that."); //does not appear
continue;
}
- //make item desc runed if desc was vanilla?
+ //make item desc runed if desc was vanilla?
set_item_ego_type(arm, OBJ_ARMOUR, SPARM_PONDEROUSNESS);
you.redraw_armour_class = true;
you.redraw_evasion = true;
- simple_god_message(" says: Dude, use this wisely!");
+ simple_god_message(" says: Dude, use this wisely!");
- return true;
+ return (true);
}
- while(true);
+ while (true);
return true;
}
@@ -7039,19 +7039,19 @@ bool ponderousify_armour(){
int _slouch_monsters(coord_def where, int pow, int, actor* agent)
{
monsters* mon = monster_at(where);
- if (NULL == mon){
+ if (mon == NULL)
return (0);
- }
int dmg = (mon->speed - player_movement_speed());
- dmg = (dmg > 0 ? dmg * dmg : 0);
+ dmg = (dmg > 0 ? dmg * dmg : 0);
mon->hurt(agent, dmg, BEAM_MMISSILE, true);
- return 1;
+ return (1);
}
-int chronos_slouch(int pow){
- return apply_area_visible(_slouch_monsters, pow);
+int chronos_slouch(int pow)
+{
+ return (apply_area_visible(_slouch_monsters, pow));
}
static bool _bless_weapon(god_type god, brand_type brand, int colour)
@@ -7190,7 +7190,7 @@ static void _print_sacrifice_message(god_type god, const item_def &item,
const char *tag_start, *tag_end;
switch (piety_gain)
{
- case PIETY_NONE:
+ case PIETY_NONE:
tag_start = "<lightgrey>";
tag_end = "</lightgrey>";
break;
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index cc86af4712..9fd1351592 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1290,7 +1290,7 @@ bool cast_haunt(int pow, const coord_def& where, god_type god)
: MONS_SPECTRAL_WARRIOR); // 12%
if ((chance == 3 || chance == 8) && player_see_invis())
- mon = MONS_SHADOW_WRAITH; // 0%/8%
+ mon = MONS_SHADOW_WRAITH; // 0%/8%
const int monster =
create_monster(
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 5ac7df2a32..42e99068d9 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -2044,26 +2044,24 @@ void cast_stoneskin(int pow)
bool do_slow_monster(monsters* mon, kill_category whose_kill)
{
- // Try to remove haste, if monster is hasted.
- if (mon->del_ench(ENCH_HASTE, true))
- {
- if (simple_monster_message(mon, " is no longer moving quickly."))
- {
- return true;
- }
- }
-
- // Not hasted, slow it.
- if (!mon->has_ench(ENCH_SLOW)
- && !mons_is_stationary(mon)
- && mon->add_ench(mon_enchant(ENCH_SLOW, 0, whose_kill)))
- {
- if (!mons_is_paralysed(mon) && !mons_is_petrified(mon)
- && simple_monster_message(mon, " seems to slow down."))
- {
- return true;
- }
- }
-
- return false;
+ // Try to remove haste, if monster is hasted.
+ if (mon->del_ench(ENCH_HASTE, true))
+ {
+ if (simple_monster_message(mon, " is no longer moving quickly."))
+ return (true);
+ }
+
+ // Not hasted, slow it.
+ if (!mon->has_ench(ENCH_SLOW)
+ && !mons_is_stationary(mon)
+ && mon->add_ench(mon_enchant(ENCH_SLOW, 0, whose_kill)))
+ {
+ if (!mons_is_paralysed(mon) && !mons_is_petrified(mon)
+ && simple_monster_message(mon, " seems to slow down."))
+ {
+ return (true);
+ }
+ }
+
+ return (false);
}
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index ac283fc6b5..d0b2ac4a7a 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1466,11 +1466,11 @@ static void tag_read_you(reader &th, char minorVersion)
UNUSED(rev_int);
}
- if (minorVersion >= TAG_MINOR_GITREV)
- {
- std::string rev_str = unmarshallString(th);
- UNUSED(rev_str);
- }
+ if (minorVersion >= TAG_MINOR_GITREV)
+ {
+ std::string rev_str = unmarshallString(th);
+ UNUSED(rev_str);
+ }
}
static void tag_read_you_items(reader &th, char minorVersion)
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index dc0bae621d..8d4f5e2e09 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -71,7 +71,7 @@ enum tag_minor_version
TAG_MINOR_UGLY = 21, // More ghost bits for (very) ugly things.
TAG_MINOR_ROTTING = 22, // Added monster-specific rotting resistance.
TAG_MINOR_TRANS = 23, // Keep track of cancellable transformations.
- TAG_MINOR_GITREV = 24, // Removed SVN revision and added Git revision.
+ TAG_MINOR_GITREV = 24, // Removed SVN revision and added Git revision.
TAG_MINOR_VERSION = 24 // Current version. (Keep equal to max.)
};
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index e36868d919..1e3628e75f 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -248,7 +248,7 @@ bool TilesFramework::initialise()
SDL_EnableUNICODE(true);
- std::string title = CRAWL " " + Version::Long();
+ std::string title = CRAWL " " + Version::Long();
SDL_WM_SetCaption(title.c_str(), CRAWL);
const char *icon_name =
#ifdef DATA_DIR_PATH