Summary: Do not reserve space for S_OLD_FORTRESS &
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Sat 31 Mar 2012 05:18:12 PM EEST
                Category: general
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0



Special biths S_OLD_FORTRESS and S_OLD_AIRBASE exist only for compatibility
with pre-2.2 savegames. They are never used in running game. There's no point
in having bits reserved for them.

Attached, still almost untested, patch makes them special values ,used only
when loading old savegames, outside legal specials number range. I don't think
this alone gives any memory or savegame size savings as number of legal
specials goes from 11 to 9, still requiring 2*8 or 3*4 bits like before. But
at some poin gen-roads will make it possible to remove also S_ROAD and
S_RAILROAD moving us below the magic limit, and even leaving us one free bit
if we want to add some new special (Nets?)
tile_special_iterate() will generate slightly less and/or faster code when
S_OLD_FORTRESS and S_OLD_AIRBASE are not part of the iteration, I think.


File Attachments:

Date: Sat 31 Mar 2012 05:18:12 PM EEST  Name: FortressNoSpace.diff  Size: 4kB 
 By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to