From a56283995b40d2697802ad22c6fab03ebaf16bce Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 9 Apr 2008 17:22:10 +0000 Subject: Add yet more whitespace fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4163 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/delay.cc | 50 ++++++++++++++++++++++---------------------- crawl-ref/source/mon-util.cc | 12 +++++------ crawl-ref/source/travel.cc | 8 +++---- 3 files changed, 35 insertions(+), 35 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index bc662d4332..5ae96beb7a 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -290,7 +290,7 @@ void start_delay( delay_type type, int turns, int parm1, int parm2 ) finish_delay(delay); return; } - push_delay( delay ); + push_delay( delay ); } void stop_delay( bool stop_stair_travel ) @@ -299,7 +299,7 @@ void stop_delay( bool stop_stair_travel ) if ( you.delay_queue.empty() ) return; - delay_queue_item delay = you.delay_queue.front(); + delay_queue_item delay = you.delay_queue.front(); ASSERT(!crawl_state.is_repeating_cmd() || delay.type == DELAY_MACRO); @@ -310,15 +310,15 @@ void stop_delay( bool stop_stair_travel ) const int butcher_swap_weapon = butcher_swap_warn? you.delay_queue[1].parm1 : -10; - - // At the very least we can remove any queued delays, right + + // At the very least we can remove any queued delays, right // now there is no problem with doing this... note that // any queuing here can only happen from a single command, // as the effect of a delay doesn't normally allow interaction // until it is done... it merely chains up individual actions // into a single action. -- bwr clear_pending_delays(); - + switch (delay.type) { case DELAY_BUTCHER: @@ -341,14 +341,14 @@ void stop_delay( bool stop_stair_travel ) break; case DELAY_MEMORISE: - // Losing work here is okay... having to start from + // Losing work here is okay... having to start from // scratch is a reasonable behaviour. -- bwr mpr( "Your memorisation is interrupted." ); pop_delay(); break; - case DELAY_PASSWALL: - // The lost work here is okay since this spell requires + case DELAY_PASSWALL: + // The lost work here is okay since this spell requires // the player to "attune to the rock". If changed, then // the delay should be increased to reduce the power of // this spell. -- bwr @@ -362,7 +362,7 @@ void stop_delay( bool stop_stair_travel ) mpr( "You stop dropping stuff." ); pop_delay(); break; - + case DELAY_RECITE: mprf(MSGCH_PLAIN, "You stop %s.", _get_recite_speech("other", you.num_turns + delay.duration)); @@ -378,7 +378,7 @@ void stop_delay( bool stop_stair_travel ) // Keep things consistent, otherwise disturbing phenomena can occur. // Note that runrest::stop() will turn around and call stop_delay() - // again, but that's okay because the delay is already popped off + // again, but that's okay because the delay is already popped off // the queue. if (is_run_delay(delay.type) && you.running) stop_running(); @@ -387,8 +387,8 @@ void stop_delay( bool stop_stair_travel ) // to the Lua function, it can't do damage. break; - case DELAY_INTERRUPTIBLE: - // always stoppable by definition... + case DELAY_INTERRUPTIBLE: + // always stoppable by definition... // try using a more specific type anyways. -- bwr pop_delay(); break; @@ -396,18 +396,18 @@ void stop_delay( bool stop_stair_travel ) case DELAY_EAT: // XXX: Large problems with object destruction here... food can // be from in the inventory or on the ground and these are - // still handled quite differently. Eventually we would like + // still handled quite differently. Eventually we would like // this to be stoppable, with partial food items implemented. -- bwr - break; + break; case DELAY_ARMOUR_ON: case DELAY_ARMOUR_OFF: // These two have the default action of not being interruptible, - // although they will often be chained (remove cloak, remove + // although they will often be chained (remove cloak, remove // armour, wear new armour, replace cloak), all of which can - // be stopped when complete. This is a fairly reasonable - // behaviour, although perhaps the character should have - // option of reversing the current action if it would take + // be stopped when complete. This is a fairly reasonable + // behaviour, although perhaps the character should have + // option of reversing the current action if it would take // less time to get out of the plate mail that's half on // than it would take to continue. Probably too much trouble, // and would have to have a prompt... this works just fine. -- bwr @@ -423,10 +423,10 @@ void stop_delay( bool stop_stair_travel ) pop_delay(); } break; - + case DELAY_WEAPON_SWAP: // one turn... too much trouble case DELAY_DROP_ITEM: // one turn... only used for easy armour drops - case DELAY_UNINTERRUPTIBLE: // never stoppable + case DELAY_UNINTERRUPTIBLE: // never stoppable case DELAY_JEWELLERY_ON: // one turn default: break; @@ -451,13 +451,13 @@ bool you_are_delayed( void ) delay_type current_delay_action( void ) /******************************/ { - return (you_are_delayed() ? you.delay_queue.front().type + return (you_are_delayed() ? you.delay_queue.front().type : DELAY_NOT_DELAYED); } bool is_run_delay(int delay) { - return (delay == DELAY_RUN || delay == DELAY_REST + return (delay == DELAY_RUN || delay == DELAY_REST || delay == DELAY_TRAVEL); } @@ -582,7 +582,7 @@ void handle_delay( void ) // Hack - allow autoprayer to trigger during run delays if ( do_autopray() ) return; - + handle_run_delays(delay); return; } @@ -1175,7 +1175,7 @@ static command_type get_running_command() { delay(Options.travel_delay); } - + return direction_to_command( you.running.x, you.running.y ); } @@ -1546,7 +1546,7 @@ const char *activity_interrupt_name(activity_interrupt_type ai) activity_interrupt_type get_activity_interrupt(const std::string &name) { - ASSERT( sizeof(activity_interrupt_names) + ASSERT( sizeof(activity_interrupt_names) / sizeof(*activity_interrupt_names) == NUM_AINTERRUPTS ); for (int i = 0; i < NUM_AINTERRUPTS; ++i) diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 805d7d09f9..a8fc3fbca9 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4488,7 +4488,7 @@ bool monsters::decay_enchantment(const mon_enchant &me, bool decay_degree) if (!decay_degree) return (false); - + // Decay degree so that higher degrees decay faster than lower // degrees, and a degree of 1 does not decay (it expires when the // duration runs out). @@ -4561,7 +4561,7 @@ void monsters::apply_enchantment(const mon_enchant &me) { break; } - + int net = get_trapping_net(x,y,true); if (net == NON_ITEM) // really shouldn't happen! @@ -4573,7 +4573,7 @@ void monsters::apply_enchantment(const mon_enchant &me) // handled in handle_pickup if (mons_itemuse(type) == MONUSE_EATS_ITEMS) break; - + // the enchantment doubles as the durability of a net // the more corroded it gets, the more easily it will break const int hold = mitm[net].plus; // this will usually be negative @@ -4654,7 +4654,7 @@ void monsters::apply_enchantment(const mon_enchant &me) damage = div_rand_round(damage * speed, spd); mitm[net].plus -= damage; - + if (mitm[net].plus < -7) { if (mons_near(this)) @@ -4716,7 +4716,7 @@ void monsters::apply_enchantment(const mon_enchant &me) else if (hit_points <= max_hit_points / 2) break; else if (((type == MONS_ELECTRICAL_EEL || type == MONS_LAVA_SNAKE) - && (one_chance_in(50) || (mons_near(this) + && (one_chance_in(50) || (mons_near(this) && hit_points == max_hit_points && !one_chance_in(10)))) || one_chance_in(200) @@ -5111,7 +5111,7 @@ void monsters::check_redraw(const coord_def &old) const void monsters::apply_location_effects() { dungeon_events.fire_position_event(DET_MONSTER_MOVED, pos()); - + // monsters stepping on traps: mons_trap(this); diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index dda809deb6..d393a829c7 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -1017,7 +1017,7 @@ void explore_pickup_event(int did_pickup, int tried_pickup) { if (!did_pickup && !tried_pickup) return; - + if (!you.running.is_explore()) return; @@ -3854,12 +3854,12 @@ bool runrest::run_grids_changed() const void runrest::stop() { - bool need_redraw = + bool need_redraw = runmode > 0 || (runmode < 0 && Options.travel_delay == -1); userdef_run_stoprunning_hook(); runmode = RMODE_NOT_RUNNING; - // Kill the delay; this is fine because it's not possible to stack + // Kill the delay; this is fine because it's not possible to stack // run/rest/travel on top of other delays. stop_delay(); @@ -3871,7 +3871,7 @@ void runrest::stop() bool runrest::is_rest() const { - return (runmode > 0 && !x && !y); + return (runmode > 0 && !x && !y); } bool runrest::is_explore() const -- cgit v1.2.3-54-g00ecf