Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Hex tileset
Home

Re: [Freeciv-Dev] Hex tileset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Artur Biesiadowski <abies@xxxxxxxxx>
Cc: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] Hex tileset
From: Jules Bean <jmlb2@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Aug 1999 10:11:15 +0100

Artur Biesiadowski wrote:
> 
> Jules Bean wrote:
> 
> >
> > The obvious drawing order is, for each hex, to draw the actual hex
> > first, and then draw all bits of adjacent hexes which overlap
> > (presumably transparent).  Finally, if implement, draw the 'on top'
> > layer (mountains, etc.)
> 
> Let's take squres for simplicty. On of them is
> 
>  xxx
>  xx
> 
> second
> yyy
>  yy
> 
> You have following layout
> 
> .....
> .xxyy.
> .xxyy.
> .....
> 
> Should you get
> 
> a)
> .....
> .xxxy.
> .xxyy.
> .....
> 
> or
> 
> b)
> .....
> .xyyy.
> .xxyy.
> .....
> 
> ?
> 
> It depends on painting order. With left to right order you get b always.
> With repaint myself then the neighbours you will get random one,
> dependent on which part of screen needs refresh (possibly even mixed
> pixels for toolkits that do strict clipping and unfortunate repaint
> requests will come)

You get

c)
.....
.xyxy
.xxyy
.....

At least, that's what I was trying to describe.

So the drawing order is this:


Draw cell x:

xx..
xx..

Draw overlaps from all neighbour into x (using alpha)

xy..
xx..

Draw cell y

xyyy
xxyy

Draw all overlaps from all neighbours into y using alpha

xyxy
xxyy

Jules




-- 
/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@xxxxxxxxxxxxxxx         |  6 Evelyn Rd        |
|  Jules aka     |                               |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@xxxxxxxxxxxxxxxx        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/

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