Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: indefinite improvements
Home

[Freeciv-Dev] Re: indefinite improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: indefinite improvements
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 21 Aug 2000 09:14:43 -0400

At 2000/08/21 09:07 , David Pfitzner wrote:
>Jeff Mallatt <jjm@xxxxxxxxxxxx> wrote:
>> 
>> I changed WORKLIST_END to 0xFFFF, and simply changed the save-file loader
>> to translate 284 to (the new) WORKLIST_END when loading old save-files
>> (discriminated by a new SAVEFILE_OPTION, "new_worklist_end").  The rest of
>> the code shouldn't have to change.
>
>Hmm, shouldn't we also translate to/from 284 in the packet code, 
>for client/server combinations which disagree about the value 
>of WORKLIST_END?

Oops.  Yes.  There's already a capstr, so this is easy.

>(When we eventually do allow a different value for num_impr_types
>in the server, I guess we will need a mandatory capability?
>Thats what was done for units and techs.)

Yes.  (We're not ready for this step, yet. :)

>Also, I would prefer encoding WORKLIST_END as "-1" in the savefile
>(ie, use 0xFF elsewhere, but convert to/from -1 in the save/load 
>functions).  That would be shorter (pre-compression) and more 
>pleasant for humans inspecting the savefile, since tend to get 
>rows like:
>
>284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284
>
>compare:
>
>65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,655
35,65535,65535,65535
>
>vs 
>
>-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
>
>(Hmm, or (val+1)&WORKLIST_END: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 :-)

This is simple, so sure.  To ease human interpretation, I think "-1" is
better than having to remember to subtract one from every non-zero value to
figure out which type is meant.

jjm




[Prev in Thread] Current Thread [Next in Thread]