From f48a6406b606abffbda354278d4a0c682725f8c4 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 19 Jun 2008 18:29:46 +0000 Subject: Add minor cosmetic fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5985 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 31 ++++++++++++++----------------- crawl-ref/source/beam.h | 6 +++--- crawl-ref/source/mstuff2.cc | 2 +- 3 files changed, 18 insertions(+), 21 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 81f36eb76b..b5eaa111f8 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1744,8 +1744,7 @@ static bool _affect_mon_in_wall(bolt &pbolt, item_def *item, int tx, int ty) * */ - -void fire_beam( bolt &pbolt, item_def *item, bool drop_item ) +void fire_beam(bolt &pbolt, item_def *item, bool drop_item) { bool beamTerminate; // Has beam been 'stopped' by something? int &tx(pbolt.pos.x), &ty(pbolt.pos.y); // test(new) x,y - integer @@ -1873,16 +1872,14 @@ void fire_beam( bolt &pbolt, item_def *item, bool drop_item ) do { do - { ray.regress(); - } while (grid_is_solid(grd(ray.pos()))); ray.advance_and_bounce(); --rangeRemaining; } - while ( rangeRemaining > 0 - && grid_is_solid(grd[ray.x()][ray.y()]) ); + while (rangeRemaining > 0 + && grid_is_solid(grd[ray.x()][ray.y()])); if (rangeRemaining < 1) break; @@ -1933,7 +1930,7 @@ void fire_beam( bolt &pbolt, item_def *item, bool drop_item ) } // Always decrease range by 1. - rangeRemaining -= 1; + rangeRemaining--; // Check for range termination. if (rangeRemaining <= 0) @@ -2000,7 +1997,7 @@ void fire_beam( bolt &pbolt, item_def *item, bool drop_item ) // Leave an object, if applicable. if (drop_item && item) - beam_drop_object( pbolt, item, tx, ty ); + beam_drop_object(pbolt, item, tx, ty); ASSERT(!drop_item || item); @@ -2055,8 +2052,8 @@ void fire_beam( bolt &pbolt, item_def *item, bool drop_item ) // Returns damage taken by a monster from a "flavoured" (fire, ice, etc.) // attack -- damage from clouds and branded weapons handled elsewhere. -int mons_adjust_flavoured( monsters *monster, bolt &pbolt, - int hurted, bool doFlavouredEffects ) +int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, + bool doFlavouredEffects) { // If we're not doing flavored effects, must be preliminary // damage check only. @@ -3518,21 +3515,21 @@ static int _beam_ouch_agent(const bolt &beam) } // A little helper function to handle the calling of ouch()... -static void _beam_ouch( int dam, bolt &beam ) +static void _beam_ouch(int dam, bolt &beam) { // The order of this is important. - if (YOU_KILL( beam.thrower ) && beam.aux_source.empty()) + if (YOU_KILL(beam.thrower) && beam.aux_source.empty()) { - ouch( dam, 0, KILLED_BY_TARGETTING ); + ouch(dam, 0, KILLED_BY_TARGETTING); } - else if (MON_KILL( beam.thrower )) + else if (MON_KILL(beam.thrower)) { if (beam.flavour == BEAM_SPORE) - ouch( dam, beam.beam_source, KILLED_BY_SPORE ); + ouch(dam, beam.beam_source, KILLED_BY_SPORE); else { - ouch( dam, beam.beam_source, KILLED_BY_BEAM, - beam.aux_source.c_str() ); + ouch(dam, beam.beam_source, KILLED_BY_BEAM, + beam.aux_source.c_str()); } } else // KILL_MISC || (YOU_KILL && aux_source) diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h index 315b37f427..04aee533df 100644 --- a/crawl-ref/source/beam.h +++ b/crawl-ref/source/beam.h @@ -176,7 +176,7 @@ bool test_beam_hit(int attack, int defence); /* *********************************************************************** * called from: bang - it_use2 - monstuff - mstuff2 * *********************************************************************** */ -void fire_beam( bolt &pbolt, item_def *item = NULL, bool drop_item = false ); +void fire_beam(bolt &pbolt, item_def *item = NULL, bool drop_item = false); // last updated 12may2000 {dlb} /* *********************************************************************** @@ -193,8 +193,8 @@ void explosion( bolt &pbolt, bool hole_in_the_middle = false, /* *********************************************************************** * called from: effects - spells2 - spells4 * *********************************************************************** */ -int mons_adjust_flavoured( monsters *monster, struct bolt &pbolt, - int hurted, bool doFlavouredEffects = true ); +int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, + bool doFlavouredEffects = true); /* *********************************************************************** diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 65d471311f..f58cc17f95 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1573,7 +1573,7 @@ bool mons_thrown_object_destroyed( item_def *item, int x, int y, } // XXX: Should really do something about mons_hit, but can't be bothered. -void spore_goes_pop(struct monsters *monster) +void spore_goes_pop(monsters *monster) { bolt beam; const int type = monster->type; -- cgit v1.2.3-54-g00ecf