Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: small GUI unification: decrease_unit_hp_smooth (PR#109
Home

[Freeciv-Dev] Re: small GUI unification: decrease_unit_hp_smooth (PR#109

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: small GUI unification: decrease_unit_hp_smooth (PR#1099)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2001 16:45:25 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Dec 07, 2001 at 11:36:31AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> This small unification cuts off part of decrease_unit_hp_smooth (a 
> gui-specific function).  It creates a new function, decrease_unit_hp, 
> that takes care of the common case where do_combat_animation is turned 
> off, and only calls decrease_unit_hp_smooth if combat animation is enable.
> 
> It also adds comments for all these functions - including the GUI stub 
> function.  I think having comments for the GUI stub functions is 
> important, since most of the GUI's just seem to have cut-and-pasted 
> these functions (thus having to write comments themselves or go without 
> - usually the latter).
> 
> It's small, but not really related to anything else so here it is all alone.

Applied. I think that even more can be factored out. At least the
first do{}while loop looks very similar. And the second part can be
wrapped in a show_explosion_animation().

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "It is not yet possible to change operating system by writing
  to /proc/sys/kernel/ostype."              sysctl(2) man page


[Prev in Thread] Current Thread [Next in Thread]