Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] Graphics file format
Home

Re: [Freeciv-Dev] Graphics file format

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Graphics file format
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Wed, 28 Jul 1999 11:36:18 +1000 (EST)

falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx (Falk Hueffner) wrote:

> If we split the graphics, I would vote to have many, functionally
> seperated images, one for bars, one for numbers etc.

Another point in favour of splitting into more files is that
if we use a "binary" graphics format (note that xpm is really
an ascii format) then we probably have to store the files as
"binary" in cvs.  Which means any change to a file has to 
replace the whole file, which would be very inefficient if 
making a small change to a large file like tiles.xpm.

(One reason I've liked having relatively few graphics files
is that it makes it a bit easier to handle colormaps etc.  
But for a full color format that reason goes away.)

(Though if we change things too much it may be a bit 
complicated to convert back to xpm files if we still use 
those for the Xaw client.  Also xpm stores a colormap in
each file, making too many small files potentially 
inefficient.)

> Another
> possibility would be to have a config file which states for every tile
> the path/file and position where to find it.
> 
> It is currently a bit messy how the tiles are actually found,
> sometimes with a base and hardcoded offsets, dependend on the original
> image width. An idea would be to give a name to each tile and access
> them from the source only via that name; series of tiles would get
> numbers: "plains3", "special_wheat" etc. Something like this would be
> required if using config files.

Note that some of the hardcoded values have recently moved
into the terrain ruleset.  So any config-file method would 
have to interoperate with ruleset files.  Eg, perhaps the 
ruleset file specifies the tagname (+number?) for each type 
of tile, and then the tile config file says which file and 
offset that corresponds to...

Regards,
-- David

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