[Freeciv-Dev] Re: Isometric mode screen updates.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Teemu Kurppa wrote:
I added support for tile markers for GTK-client isometric mode. There are
some problems in updating map canvas correctly. I have browsed code to
understand correctly, how drawing in isometric mode is done. But it would
be great help, if there exists some short introduction to
the implementation philosophy of isometric mode. Is there ?
Not AFAIK. For the most part the isometric changes are spread out and
gui-specific. Some of them have been unified.
Here's a start: when you call get_canvas_xy it will take your map
position and give you a canvas position. This canvas pos is the
top-left corner of the bounding box for the iso-tile; that is:
______
| /\ |
|/ \|
|\ /|
|_\/_|
the top-left corner is the canvas pos for the tile. The interior
rhombus is the iso-tile. NORMAL_TILE_WIDTH and NORMAL_TILE_HEIGTH are
the dimensions of the bounding box.
I don't know much about the actual drawing code. I think it uses the
sptite listings similarly to the flat-view code, but because the tiles
can overlap (a pretend 3-d effect even though the view is from overhead)
they must be drawn in a particular order. Therefore when you update one
tile you must (I think) update parts of the ones around it.
jason
|
|