Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#5101) improved dithering, made elegant
Home

[Freeciv-Dev] Re: (PR#5101) improved dithering, made elegant

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rt-guest@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5101) improved dithering, made elegant
From: "Daniel L Speyer" <dspeyer@xxxxxxxxxxx>
Date: Wed, 10 Sep 2003 07:20:56 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short wrote:

>Will someone review this patch?
>
>[dspeyer@xxxxxxxxxxx - Fri Sep  5 17:29:31 2003]:
>  
>
>>Jason Short wrote:
>>    
>>
>
>  
>
>>>I do have a couple of questions about the GUI parts, though:
>>>
>>>1. In GTK and GTK2, why the changes to pixmap_put_tile_iso?  Doesn't
>>>this mean you're drawing a dithered sprite, then drawing ocean on top
>>>      
>>>
>>of it?
>>    
>>
>>>      
>>>
>>Yes, that's exactly wat it does.  This means that the land can stretch
>>out toward the shore, instead of the embarrissingly full coastlines of
>>generic terrain we have now.
>>    
>>
>
>I don't understand this.  The ocean covers the entire tile, so won't
>anything drawn underneath it just be covered up and waste our time?
>
>And, why is there an ADD_SPRITE_SIMPLE(sprites.coast_color) in tilespec.c?
>
>What am I missing?
>  
>
The key point is that the coasts now have transparent sections.  This 
means that instead of the beach reaching slightly and awkwardly onto the 
land through dither (which looks rather ugly if you pay attention to it) 
the land can now spread out into the beach territory.

Admittedly, it's a waste underneath open ocean.  I considered not 
drawing it then, but it occurred to me that I haven't actualy measured 
the speed and it's just modifying caches anyway (none of this gets 
flushed even out of GTK, IIRC).  So rather than engage in premature 
optimization, I just drew the coast_color tile everywhere.

If a profiler shows this to have non-trivial cost, I'll gladly change it.

--Daniel

>jason
>
>
>  
>





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