
********************
*   Axis Roofing   *
********************

This functionality was added to Axis by Adron.

With this tool you can generate all slanted roof forms known to me. The 
tiles to use should be defined in the file rooftiles.cfg. You'll find a
short explanation of how to define them in there as well as the ones I
had the patience to type in.

To install it, simply copy the axis.exe and rooftiles.cfg found in the
archive to your Axis directory. If you want to be able to go back to
regular Axis you should make a backup of axis.exe first. When you run
the modified Axis you will find a Roofing button on the Misc page.
Clicking this button opens the Roofing dialog. There you define the 
roof that you want generated by specifying rectangular parts. T or X 
shaped roofs can be generated.

To increase the generation speed of roofs you should insert a special
function into your scripts. This function allows Roofing to specify 
locations for tiles with a single command. If you don't add this function
you will have to check the box "No script support", and roofing won't
be optimal. The function is f_roof_target, defined as follows:

[FUNCTION f_roof_target]
  SRC.NEWITEM=i_gold
  VAR.ACT=<SRC.ACT.UID>
  SRC.ACT.P=<ARGS>
  SRC.LAST
  TRY UID.<VAR.ACT>.REMOVE


******************
* Defining parts *
******************

The simplest way to define a roof part is to input the coordinates of
the north-west and south-east corner of it in the X1,Y1 and X2,Y2 boxes.
For a roof slanted to the east/west, check "Goes up". For a roof slanted
to the north/south, uncheck it. For a roof that slants in all directions
check Tent roof.

To find the coordinates, stand in the right spot and type ".where". The 
right coordinates to use in most cases are marked 1 and 2 here:

   ********************
   *1                 *
   *                  *
   *                  *
   *                  *
   ********************
                       2



For T parts that extend from the main roof there is an alternate way of 
defining them. If the roof defined above was to have a T part as 
pictured below, you could give the coordinates of 3 and 4.


   ********************
   *1                 *
   *                  *
   *                  *
   *                  *
   ******       *******
        *       *      2
        *       *
        *********
         3       4


When giving coordinates in the second way, "Goes up" specifies which
direction the roof goes from the line through 3 and 4. "Goes up" means
the roof proceeds in increasing X or Y, not "Goes up" means it goes
decreasing X or Y.

If you make a mistake adding a part you can remove it with Remove Last.
If you want to restart from scratch, use Clear.


***********************
* Generating the roof *
***********************

Once you have defined the roof parts and are happy with the way they 
look in the preview square, you can Generate the roof. To be able to
generate the roof, Roofing needs two more pieces of information: What
set of tiles to use, and what height to place the lowest roof tiles
at. Pick the tile set (as defined in rooftiles.cfg) and input the
height. Height 20 is normal roof height for houses with a floor at
height 0 and walls starting at height 1.

You can then either Generate the roof directly or do a Test generation
first. A Test generation will only place the corner tiles of the roof
so you can see if placement looks right. After placing the corner tiles
you have the option of placing the remaining tiles too or abort. You
will have to manually remove the corner tiles if you choose to abort.




******************
* Copyright info *
******************





 **********************************************************************
 * Copyright (C) Philip A. Esterle 1998-2002
 * Parts Copyright (C) Adron 2002
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 * 
 **********************************************************************
