This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IMFApp Office


>>You will notice
>> that if a 44x48 image is used as a tile, it is trimmed to 32x32 size first.
>
>But why? If that's not the same size as the cell actually used
>with 32x32 views in Xconq, then what is the point?
>
>And I think you must mean "scaled" instead of "trimmed", because
>the bright "transparent" border colors outlining the hex were
>still showing. If cropping had taken place, then most, if not all, of
>that would have gone away. I will double-check to make sure that
>this is what I saw, but I am fairly certain.

No, the images are indeed cropped, not scaled. For example, you will notice
that the top and the bottom corners of the background hexes have been
trimmed off.

There are actually two completely different ways to draw terrain in Xconq:
as tiles or as individual images.

Tiled drawing always uses square images that are not necessarily lined up
with the hex grid. These square images are found either in special gif
files (sea.gif and advt32x32.gif) or in terrain.imf itself (everything
named "tile", e.g. (imf "plains" ((64 64 tile) ...

Non-tiled terrain drawing uses the 44x48 sized hexagons that you find in
files like advt44x48.gif. In this case, each individual cell is drawn
separately. The files usually contain a row of subimages that are used in a
semi-random way to provide some variety. If a non-tiled image is encoded
directly in an .imf file, it is called a "terrain" image instead of a
"tile" image.

Now, if IMFApp does not find a special "tile" image (which it will never do
in the case of a unit) it will make one from the available image and use it
as a tile. That is why the background unit images are trimmed to 32x32
size. They were converted to "tiles" before being used to draw the
background.

I would add that the whole tile drawing machinery is semi-obsolete, a
remnant from the time when Xconq did not have true images. The best way to
draw terrain is certainly the latter, on any platform that supports it
(meaning everything but cconq and xtconq). Tiled drawing is now mainly used
a small magnifications, usually in the world map, where there are no
hexagon images available (and where cells are square-shaped anyway).

One could of course make IMFApp draw backgrounds by using individual images
instead of tiles, but this would require a lot of work, so I did not assign
it a high priority.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]