//*********************************************************************
//                                                                    *
// FILE:	    TERRAIN.INI                                           *
// AUTHOR:	    George Sutty                                          *
// VERSION:     V4.0 - Jul 18, 1997                                   *
// DESCRIPTION: Parameters for the terrain generation                 *
//                                                                    *
//*********************************************************************

[LODInfo]

textureCount  = 3		// Disable TEXTURE when this reached
textureRange  = 200
textureRadius = 50
   fillCount  = 20		// Disable SOLID polygon fill when this reached
   fillRange  = 200
   fillRadius = 10
 shadowCount  = 3		// Disable shadows when this reached
 shadowRange  = 100
 shadowRadius = 100
    bspCount  = 100		// Disable BSP polygon sort when this reached
    bspRange  = 1000
    bspRadius = 100
  lightCount  = 0		// Disable lighting when this reached
  lightRange  = 0
  lightRadius = 10000
    lodCount  = 1000	// Disable highest level LOD when this reached (use LOD1)
    lodRange  = 1000
    lodRadius = 0
subdivideDepth= 1		// Triangle subdivisions in when fill disabled

//*********************************************************************
// These parameters control terrain fog, 1x to 2x node subdivision, etc..
//*********************************************************************

[NormalView]

FogStart        = 160
FogEnd          = 250
FogBreak        = 60               // At x% between start & end, visibility drops to x%
VisibilityRange = 250
FlatRange       = 300
DitherRange     = 2000
FlatColor       = 144
Intensity       = 40
Ambient         = 0
VertexNormals   = 1
GridsPerTile    = 2
LavaSpeed       = 0

// MIPMAP transitions (based on 20x20 tile size)
// 640x480 screen => 256x256 tile is 1:1 at 25m & 2:1 at 50m
//                   128x128 tile is 1:1 at 50m and so on
//                    64x64  tile is 1:1 at 100m
//                    32x32  tile is 1:1 at 200m
// Make transitions half way between
MIP0 = 60
MIP1 = 120
MIP2 = 240
MIP3 = 4800

[SateliteView1]
VisibilityRange = 1000

//*********************************************************************
//
// NEW TERRAIN TEXTURE TILE DESCRIPTIONS
//
//*********************************************************************

// Each type J of material has it's own section [TextureTypeJ].  There can be
// upto x different materials.  Each material can have a solid
// tile, and two border tiles with another material.
// First border tile looks like a cap shape along one edge.
// The second tile looks like two caps along two adjacent
// edges filling area below diagonal.  For each of the three
// tile types (SOLID, CAP, DIAGONAL) there must be
// definition *for x MIP levels (although these could
// specify the same file for one or more MIP levels).
// Same material type can have several variants, upto x.
// MATERIAL TYPES = 8
// MIP LEVELS     = 2
// VARIANTS       = 4

// Solid[MIP level][Variant] , MIP:0,1,2,3,  Variant=0,1,2,3
// -------------------------
// These define all different variations and MIP levels of 
// the solid texture tile for Material Type 0
//   Solid00 = crackmud.map
//   Solid10 = crackmud.map

// CapTo[Type][MIP level][Variant]
// -------------------------------
// These define border tile with a small "cap" on top of the
// sepecified material.  E.G. CapOn3_10 is a cap of this material
// on top of material 3, with MIP level 1, and variation 0
// Note that cap from 0 to 1 is different than cap from 1 to 0!!!!
//   CapTo1_00 = cap.map
//   CapTo1_10 = cap.map

// DiagonalOn[Type][MIP level][Variant]
// ------------------------------------
// These define border tile with a area below lower-left "diagonal" 
// current texture tile on top of the
// sepecified material.  E.G. DiagonalOn3_10 is a texture of this
// material in lower left of the tile,
// on top of material 3, with MIP level 1, and variation 0
// Note that diagonal from 0 to 1 is different than from 1 to 0!!!!
//   DiagonalTo1_00 = diagonal.map
//   DiagonalTo1_10 = diagonal.map

// TODO: Post processing edges, editor

[TextureType0] // Sand
SolidA0        = ma00sA0.map
SolidA1        = ma00sA1.map
SolidA2        = ma00sA2.map
SolidA3        = ma00sA3.map
SolidB0        = ma00sA0.map
SolidB1        = ma00sA1.map
SolidB2        = ma00sA2.map
SolidB3        = ma00sA3.map
SolidC0        = ma00sA0.map
SolidC1        = ma00sA1.map
SolidC2        = ma00sA2.map
SolidC3        = ma00sA3.map
SolidD0        = ma00sA0.map
SolidD1        = ma00sA1.map
SolidD2        = ma00sA2.map
SolidD3        = ma00sA3.map

CapTo1_A0      = ma01cA0.map
CapTo1_A1      = ma01cA1.map
CapTo1_A2      = ma01cA2.map
CapTo1_A3      = ma01cA3.map

DiagonalTo1_A0 = ma01dA0.map
DiagonalTo1_A1 = ma01dA1.map
DiagonalTo1_A2 = ma01dA2.map
DiagonalTo1_A3 = ma01dA3.map

CapTo3_A0      = ma03cA0.map
CapTo3_A1      = ma03cA1.map
CapTo3_A2      = ma03cA2.map
CapTo3_A3      = ma03cA3.map

DiagonalTo3_A0 = ma03dA0.map
DiagonalTo3_A1 = ma03dA1.map
DiagonalTo3_A2 = ma03dA2.map
DiagonalTo3_A3 = ma03dA3.map

[TextureType1] // Lava

[TextureType2] // 

[TextureType3] // Rock
SolidA0        = ma33sA0.map
SolidA1        = ma33sA1.map
SolidA2        = ma33sA1.map
SolidA3        = 33solA2.map

[TextureType4] // 

[TextureType5]

[TextureType6]

//*********************************************************************
// Debug section
//*********************************************************************

[Debug]
SeparateDraw    = 0		// 0:Normal draw, 1=Draw terrain then draw all vehicles
						// this is used to benchmark terrain draw, and vehicle draw
TrackFPS        = 1		// Displays frame rate in upper right corner
Slope = 15

//*********************************************************************
//
//*********************************************************************

[AnimatedScrounge]

// Each type of surface material can have
// a separate set of animated scrounge maps.
// However, each set must have same number
// of animation frames, and each frame (map)
// must have as the last two digits the frame
// number (0 to n-1).  When more sets are
// created, then the third digit will have
// the set number.  For example to make two
// LAVA sets, the following line would be used:
// Type1 = LAVA_115.MAP
// That would indicate 2 sets, with 16 frames
// each.  First set is named LAVA_000.MAP through
// LAVA_015.MAP.  The second set is named
// LAVA_100.MAP through LAVA_115.MAP
//
// Currently there can be at most 8 animations per surface
// type.  And at most 64 simultaneous animations being
// displayed at one time.

Type0 =
Type1 = 
Type2 =
Type3 =
Type4 =

// These parameters control the distribution and size
// of the animations

Rate    =  50 // 50ms between frames
Size    =  250 // 2.50m high (must be integer!)
Count   =  16  // Maximum number of simultaneous animations
Diameter=  200 // New animations placed within 100m radius of camera point

//*********************************************************************
// These parameters control the lightning bolts
//*********************************************************************

[LightningBolt]

MinDelay = 1000		// At least 3s between bolts
MaxDelay = 20000	// At most 10s between bolts
Bolts    = 1		// One bolt at a time
Duration = 200		// Stays on screen for 200ms
Sound    = lstart.wav
Color    = 15		// Color 0
Distance = 150		// Shown at 150m from the viewer

//*********************************************************************
// These parameters control sky effects
//*********************************************************************

// These animations are "hanging" from the sky.
// There can be up-to 8 different animations,
// Anim0 through Anim7; each with it's own size
// and location (m below sky level)
// Each set of animations ANIMnn.MAP must have as
// last two digits of the name, the sequence number
// 1 to n.

[AnimatedSky]

// These control bitmap name, rate and height of the animations

Anim0 = 
Anim1 = 
Anim2 =
Anim3 =
Anim4 =
Anim5 =
Anim6 =
Anim7 =

// These control the distribution of the animations

MinDelay =    0	// Wait at least this long (ms) before displaying first frame
MaxDelay = 1500	// Wait at most this long before displaying
Count    =   32	// Maximum number of simultaneous animations
Diameter =  400	// New animations placed within this diameter of camera point

[SkyBackdrop]

Texture =
Distance= 400
Width   = 800
Height  = 100

//*********************************************************************
// These parameters control the texture tiles (solid as
// well as border tiles).
// OBSOLETE
//*********************************************************************

// All SOLID tiles must have 4 MIP levels 128x128, 64x64
// 32x32 and 16x16 named as follows: NAMEnnnC.MAP where
// nnn is one of [128, 064, 032, 016] and C is one of [a,p]
// The characters [a,p] are from the conventions used
// for the sixteen border tiles a-p.  Where 'a' is the
// solid BACKGROUND tile, and 'p' is the solid FOREGROUND
// tile, and the rest are all the mixes.
// All BORDER tiles must have 14 files named NAMEnnnC.MAP
// where the nnn is tile size, and the character C is one
// of [b, c, d, ..., o].

// Note: all tiles are specified in the form TypeNM where
// NM indicates type of FOREGROUND and BACKGROUND materials.
// N=M indicates SOLID tile, and N<M indicates BORDER TILES
// TypeNM followed by nothing, indicates that that combination
// is not supported.  Also notice that N<=M!

[TextureTiles]

// SOLID tiles (all must also have 128, 064, 032 and 016 for each)
Type00 = char128a.map	// Charcoal
Type11 = lava128p.map	// Lava (had missing 64,32,&16)
Type22 = sand128p.map	// Sand
Type33 = snow128p.map	// Snow
Type44 = crat128p.map	// Crater
Type66 = rock128p.map	// Wall/Cliff

// BORDER tiles (note that digits NM are N < M)
//              (files b-o must exist for each border set!!!!)
Type01 = lava128b.map
Type02 = sand128b.map
Type04 = crat128b.map
Type23 = snow128b.map

// MIPMAP transitions (based on new tile sizes)
// 640x480 screen => 64x64 tile is 1:1 at 50m & 2:1 at 100m
//                   32x32 tile is 1:1 at 100m and so on
// make transitions half way between
MIP0 = 75       // 64x64 upto this
MIP1 = 150      // 32x32 upto this
MIP2 = 300      // 16x16 upto this
MIP3 = 1200 	//  8x8  upto this (and beyond)
