Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Suggestion concerning tile specs
Home

Re: [Freeciv-Dev] Suggestion concerning tile specs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sebauer@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Suggestion concerning tile specs
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 31 Aug 1999 14:54:02 +1000 (EST)

sebauer@xxxxxxxxxxx (Sebastian Bauer) wrote:

> Because of using so called datatypes for the amiga client
> it supports nearly any gfx file format. Because of this
> I don't want to use the xpm file format but maybe png.
> I simply could rename the .png files to .xpm files but
> really I don't like. So I think it would be the best
> to remove the file name extension .xpm in the specs.

Yeah, I changed the way this was done a few times during the
implementation, and I'm certainly not sure it right yet.
And now would be a good time to make such changes, before
this gets included in a general release.

One consideration is that you could at some point
have tiles.xpm and tiles.png which have _different_
spec files (eg, someone added a few tiles to one but
not yet to the other).  Though maybe thats a raw case,
but I thought it was safer this way (and not too
much trouble to copy the spec files and changes a
few lines?)

Also note that in principle you might want multiple
spec files for a single xpm, which is why I didn't
just have the spec/xpm files related implicitly by
filenames.  

> E.g. tiles.xpm.spec should be renamed to tiles.spec.
> Inside the specfile itself the gfx file should be
> referenced without any extension e.g.
>  xpm = "default/tiles"

But if its not really an xpm file, that should be
somethings else rather than "xpm =" ?

I was thinking new graphics formats would use
eg, "png = " in the spec file, but if you want the
same spec file to work for different formats thats
not so good.  Well, you could allow the spec file
to contain both "xpm = " and "png = " but you still
have to modify the spec file if you want to add more.

I guess its a tradeoff between convenience (letting
the user change the graphics format without modifying
the spec files) and generality (allowing multiple
files with different extensions be different and thus
have different spec files).  

> Then we can create a new gui depend function which
> simply returns the gfx file extension the client
> supports (maybe it could even return a string array,
> which defines all the extensions the client supports;
> if the first file with the first extension isn't found
> the second extension is tried...and so on).
> This function is used somewhere in tilespec_load_one()
> then.
> 
> What do you think?

Yeah, something like that is probably good.

-- David

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