<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40184 >

> [book - Wed Jun 11 19:56:11 2008]:
> 
> > [EMAIL PROTECTED] - Wed Jun 11 16:51:03 2008]:
> >
> >  - There's some new direct S_FORTRESS and S_AIRBASE references.
> > That goes against work for generic military bases. See common/
> > base.[ch] to see if better implementation is already possible.
> 
> That I did not know about. I'll look into using that code.
> 
> Most of the time I had problems trying to get a "generic" sprite
> for various objects (like roads or fortresses) so the added
> code in client/tilespec.c might not be the best possible approach.

Alright after examining the new generic military-base code I
have reached some conclusions regarding the use of S_FORTRESS
and S_AIRBASE in the editor code (off-topic rant about the
approach in general posted in PR#37356, which you can feel free
to ignore if you've heard before or just have not had time to
address the issues raised there).

Please correct me if I am wrong but the references to 
S_FORTRESS and S_AIRBASE that are being objected to are in
the function get_basic_special_sprite in client/tilespec.c.

My argument is that as long as S_FORTRESS and S_AIRBASE are
a part of enum tile_special_type this reference is simply
unavoidable. Furthermore if I were to say add some manner
of conversion function (e.g. base_by_special, special_is_base)
I would have to check for this and add annoying special-case
code every time I iterate over the special types (which is
very common considering the requirements of the editor).

In any case, changes will have to be made in the future
when military-base and special handling changes; I'll be
sure to update the editor code as that is finalized.

I will however look into using the {fore,middle,back}ground
sprites more intelligently (I suppose they should be combined
into one sprite to actually make the full representative
sprite of an airbase or fortress).

----------------------------------------------------------------------
誰があの余計なことに興味を持っているか

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to