URL:
<http://gna.org/patch/?2943>
Summary: Shave 8/24 bytes of struct tile
Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Aug 24 15:46:31 2011
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release:
_______________________________________________________
Details:
No map can be wider than 32k tiles.
+verbose+
struct tile {
- int x, y; /* Cartesian (map) coordinates of the tile. */
- int nat_x, nat_y; /* Native coordinates of the tile. */
+ u_int16_t x, y; /* Cartesian (map) coordinates of the tile. */
+ u_int16_t nat_x, nat_y; /* Native coordinates of the tile. */
-verbose-
these:
struct resource *resource;
struct terrain *terrain;
can also be decreased in size from 8 bytes on 64 bit platforms to 1 byte.
They can be an index in a table of resources, or terrains. What do you think?
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?2943>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev