Update of patch #2943 (project freeciv):
Status: None => Ready For Test
Planned Release: => 2.4.0
_______________________________________________________
Follow-up Comment #4:
OK, here is the patch - it was quite hard to rebase it and to check it. A
autogame with and without the patch results in the same savegame (no
differences but the event cache).
> Then how to you check if virtual tile is same as some real tile
> or another virtual tile? Just last week bugs caused by comparing
> pointers in such a case were fixed.
The tile index is used to compare tiles. All positions (map,native,...) can
be transformed to it.
Please (re)check the added macros and their use. I did only change the gtk2
client.
Patch comment:
shrink tile struct by removing x, y, nat_x, nat_y
* x, y => index_to_map_pos()
* x_nat, y_nat => index_to_native_pos()
* some optimization on top of it is still possible (use index instead of x,y
values)
Pro:
- save RAM
- cleanup of the code (only one id for tiles - the index)
Contra:
- extra calculations needed
- no intuitive coordinate value available; macros needed
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?2943>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev