Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] SDL client: tilespec and themespec
Home

[Freeciv-Dev] SDL client: tilespec and themespec

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] SDL client: tilespec and themespec
From: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: 19 Dec 2002 00:13:36 -0500

I am strongly opposed to making sprite_hash available outside of
tilespec.c.  This allows GUIs to add things to the tileset, but there
will be no consistency or standardization.  If enough GUI authors take
advantage of this "feature", we will eventually finding these
non-standard additions conflicting with each other.

I used to be in favor of adding a .themespec "theme" file that can be
used on a per-GUI basis.  So data/sdl-theme.themespec would define the
top-level information for the "default" SDL theme.

But on continued reflection, I see that there is no real distinction
between the tileset and the theme.  The current tilesets include arrows
("s.right_arrow", in misc/small.png), which IMO should be part of the
theme.  It contains treaty window graphics (misc/treaty.png), intro
graphics (misc/intro.png and misc/radar.png), numbers and letters
(trident/tiles.png), government graphics, and flags.  Where do you draw
the line between "tileset" and "theme" graphics?

Additionally, the graphics themselves are closely tied to the tileset. 
If you change to using a larger-tiled tileset, you probably want to use
larger button graphics as well.

So the solution I'm now in favor of is making these graphics a defined
part of the tileset.  We add them to named_sprites and load them along
with all the other sprites.  The GUI code can use these sprites as
needed; the only disadvantage is that they will take up memory even if
not needed.  But I suspect GUIs can find a way to use them - for
instance gui-gtk-2.0 could easily use them as icon graphics in the menus
(although I don't know if this would actually look good).

As for the triplicate intro graphics, I think the best solution here is
to provide a single graphics file that has a smallish (510x300) content
area but has a large background.  Then the image can be displayed
*without scaling* so that the content area is centered, but as the
canvas gets larger more of the background is shown.  Imagine
freeciv-test's intro3.png with a more regular background, or
http://www.techdeck.org/freeciv-heb.jpg with the background texture
continuing as far outward as necessary.

jason



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