Update of bug #17579 (project freeciv): Status: None => Confirmed Planned Release: 2.4.0 =>
_______________________________________________________ Follow-up Comment #2: I think this is still true. Looking at tilespec.c:scan_specfile(), there are a couple of things we can do about this. First, the tileset loading code already supports a way for multiple tags to share the same sprite in memory, but it needs explicit markup in the tilespec file -- you have to put all tags on the same line. See the following example. I've tested it works, but not that it saves memory. There are existing examples of this being used. --- a/data/amplio2/ancientcities.spec +++ b/data/amplio2/ancientcities.spec @@ -43,11 +43,7 @@ tiles = { "row", "column", "tag" ; used by all city styles - 2, 11, "city.asian_occupied_0" - 2, 11, "city.tropical_occupied_0" - 2, 11, "city.celtic_occupied_0" - 2, 11, "city.classical_occupied_0" - 2, 11, "city.babylonian_occupied_0" + 2, 11, "city.asian_occupied_0", "city.tropical_occupied_0", "city.celtic_occupied_0", "city.classical_occupied_0", "city.babylonian_occupied_0" ; However, that's not great for readability/maintainability of the tilespec file. I think it would be a simple matter to create a temporary hash of "small_sprite" structures in scan_specfile(), lasting for the lifetime of a grid_XXX section, and keyed by {row,column,hot_x,hot_y}. That would allow tags defined on separate lines to share the same graphics data in memory; the above example should start saving memory with no change to syntax. All the reference counting and many:1 tag:small_sprite mechanism is already in place and apparently working. However, this doesn't seem particularly urgent, so I'm removing the 2.4.0 target. _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?17579> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev