home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Engine / Classes / TerrainInfo.uc < prev    next >
Text File  |  2003-06-23  |  4KB  |  146 lines

  1. class TerrainInfo extends Info
  2.     noexport
  3.     showcategories(Movement,Collision,Lighting,LightColor,Karma,Force)
  4.     native
  5.     placeable;
  6.  
  7. #exec Texture Import File=Textures\Terrain_info.pcx Name=S_TerrainInfo Mips=Off MASKED=1
  8. #exec Texture Import File=Textures\S_WhiteCircle.pcx Name=S_WhiteCircle Mips=Off MASKED=1
  9. #exec Texture Import File=Textures\Bad.pcx Name=TerrainBad Mips=Off
  10. #exec Texture Import File=Textures\DecoPaint.pcx Name=DecoPaint Mips=Off
  11.  
  12. struct NormalPair
  13. {
  14.     var vector Normal1;
  15.     var vector Normal2;
  16. };
  17.  
  18. enum ETexMapAxis
  19. {
  20.     TEXMAPAXIS_XY,
  21.     TEXMAPAXIS_XZ,
  22.     TEXMAPAXIS_YZ,
  23. };
  24.  
  25. enum ESortOrder
  26. {
  27.     SORT_NoSort,
  28.     SORT_BackToFront,
  29.     SORT_FrontToBack
  30. };
  31.  
  32. struct TerrainLayer
  33. {
  34.     var() Material    Texture;
  35.     var() Texture    AlphaMap;
  36.     var() float        UScale;
  37.     var() float        VScale;
  38.     var() float        UPan;
  39.     var() float        VPan;
  40.     var() ETexMapAxis TextureMapAxis;
  41.     var() float        TextureRotation;
  42.     var() Rotator    LayerRotation;
  43.     var   Matrix    TerrainMatrix;
  44.     var() float        KFriction;
  45.     var() float        KRestitution;
  46.     var   Texture    LayerWeightMap;
  47. };
  48.  
  49. struct DecorationLayer
  50. {
  51.     var() int            ShowOnTerrain;
  52.     var() Texture        ScaleMap;
  53.     var() Texture        DensityMap;
  54.     var() Texture        ColorMap;
  55.     var() StaticMesh    StaticMesh;
  56.     var() rangevector    ScaleMultiplier;
  57.     var() range            FadeoutRadius;
  58.     var() range            DensityMultiplier;
  59.     var() int            MaxPerQuad;
  60.     var() int            Seed;
  61.     var() int            AlignToTerrain;
  62.     var() ESortOrder    DrawOrder;
  63.     var() int            ShowOnInvisibleTerrain;
  64.     var() int            LitDirectional;
  65.     var() int            DisregardTerrainLighting;
  66.     var() int            RandomYaw;
  67. };
  68.  
  69.  
  70. struct DecoInfo
  71. {
  72.     var vector    Location;
  73.     var rotator    Rotation;
  74.     var vector    Scale;
  75.     var vector    TempScale;
  76.     var color    Color;
  77.     var int        Distance;
  78. }; 
  79.  
  80. struct DecoSectorInfo
  81. {
  82.     var array<DecoInfo>    DecoInfo;
  83.     var vector            Location;
  84.     var float            Radius;
  85. };
  86.  
  87. struct DecorationLayerData
  88. {
  89.     var array<DecoSectorInfo> Sectors;
  90. };
  91.  
  92. var() int                        TerrainSectorSize;
  93. var() Texture                    TerrainMap;
  94. var() vector                    TerrainScale;
  95. var() TerrainLayer                Layers[32];
  96. var() array<DecorationLayer>    DecoLayers;
  97. var() float                        DecoLayerOffset;
  98. var() bool                        Inverted;
  99.  
  100. // This option means use half the graphics res for Karma collision.
  101. // Note - Karma ignores per-quad info (eg. 'invisible' and 'edge-turned') with this set to true.
  102. var() bool                        bKCollisionHalfRes;
  103.  
  104. //
  105. // Internal data
  106. //
  107. var transient int                            JustLoaded;
  108. var    native const array<DecorationLayerData> DecoLayerData;
  109. var native const array<TerrainSector>        Sectors;
  110. var native const array<vector>                Vertices;
  111. var native const int                        HeightmapX;
  112. var native const int                         HeightmapY;
  113. var native const int                         SectorsX;
  114. var native const int                         SectorsY;
  115. var native const TerrainPrimitive             Primitive;
  116. var native const array<NormalPair>            FaceNormals;
  117. var native const vector                        ToWorld[4];
  118. var native const vector                        ToHeightmap[4];
  119. var native const array<int>                    SelectedVertices;
  120. var native const int                        ShowGrid;
  121. var const array<int>                        QuadVisibilityBitmap;
  122. var const array<int>                        EdgeTurnBitmap;
  123. var const array<material> QuadDomMaterialBitmap;
  124. var native const array<int>                    RenderCombinations;
  125. var native const array<int>                    VertexStreams;
  126. var native const array<color>                VertexColors;
  127. var native const array<color>                PaintedColor;        // editor only
  128. var native const Texture CollapsedLayers;
  129.  
  130. // OLD
  131. var native const Texture OldTerrainMap;
  132. var native const array<byte> OldHeightmap;
  133.  
  134.  
  135. defaultproperties
  136. {
  137.     Texture=S_TerrainInfo
  138.     TerrainScale=(X=64,Y=64,Z=64)
  139.     bStatic=True
  140.     bStaticLighting=True
  141.     bWorldGeometry=true
  142.     bHidden=true
  143.     TerrainSectorSize=16
  144.     bKCollisionHalfRes=False
  145. }
  146.