[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]
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
|
|