Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 7bfd2c15e8a2e6eb8f651311cc22e276 > files > 24

asc-1.10.0-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>

<TITLE>ASC documentation: map graphics</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="asc.css">
</HEAD>

<BODY text="#000000" bgcolor="#ffffff">

<CENTER>
<H1>Advanced Strategic Command</H1>
<P>documentation<P>
<H2>map graphics</H2>
</CENTER>

There are two systems for storing graphics in ASC. Each terraintype, vehicletype, objecttype and buildingtype can store 
the graphics it uses in its own files. That was the original system. <P>
When we later did the transition from octagonal to hexagonal fields, we introduced the concept of graphic sets. Since we 
wanted  to import maps from Battle Isle, but were not allowed to use the original Battle Isle graphics due to their 
copyright, we introduced the graphic sets. They contain replacement graphics that are similar to the Battle Isle graphics 
and are arranged exactly like the original ones from Bluebyte. Instead of having its own image, a terraintype may just have 
a reference to "Battle Isle image #354" for example.<P>
This text discusses this system of graphic sets.<P>


Battle Isle has a set of 1674 graphics. Positions up to 1674 should only be used by graphics that are compatible with the 
original ones from Battle Isle, while later positions can be used without any restrictions. There is currently a upper limit
of 4000 graphics. <P>

<H3>MAKEGFX</H3>

Graphic sets are stored in files having the suffix <TT>.gfx</TT> and can be created with the program MAKEGFX. The syntax of
MAKEGFX is:<BR>
<CODE>MAKEGFX targetfile.gfx sourceimage1.pcx [...]</CODE><BR>
The source images must be in PCX format and must either be 24 bit images or 8 bit images. MAKEGFX does not perform any 
color palette adaption, so 8 bit images must already have the ASC palette. In general, 24 bit images should be preferred 
because some future ASC version may run with 24 bit graphics. Since it is not possible to store transparency information in
PCX images, the color 0xFEFEFE ( red : 254 , green : 254 , blue 254 ) will be treated as being transparent. This is just a quick hack and will be removed when 
the graphics engine of ASC will be rewritten.<P>
But 8 bit images are required for buildings, since the owner of buildings affects a certain range of color indices:
The colors 16 - 23 (red colortone) will be shifted depending on the player who owns the building. For the second player 
these colors will be shifted to 24 - 31 and so on. The color #255 is transparent. 
ASC does not perform any palette transformation for 8 bit images, so ensure that your images use the standard ASC palette.<P>

MAKEGFX accepts wildcards as parameter: To build the standard graphics set, you can simply type:<BR>
<CODE>MAKEGFX asc.gfx graphics/terrain/actual/*.pcx</CODE>.<P>
The filenames of the source images must reflect the position which they should occupy: The image that should be used on 
position #354 must be called <TT>354.PCX</TT>.<P>

Each graphic set is identified by an ID that works just like the <A HREF="editors.html#ID">IDs used by vehicles, buildings 
and objects</A>.


<H3>GFX2PCX</H3>
The purpose of this program is to generate an index image (called <TT>bi_graph.pcx</TT>) of pictures provided by a certain 
graphic set. It also lists for each picture the vehicles, buildings and objects that use this image. <P>
Additionally it writes all these information to a text file (called <TT>itemname.txt</TT>) for easier searching.<P>
Call <TT>GFX2PCX /?</TT> for a list of all program options.