public Bitmap GetTerrainTextureByTextureId(uint textureId, uint lod)
        {
            var    lodInfo  = _terrainDB.TheaterDotLxFiles[lod];
            Bitmap toReturn = null;

            if (lod <= _terrainDB.TheaterDotMap.LastNearTiledLOD)
            {
                var textureBinInfo = _terrainDB.TextureDotBin;
                textureId -= lodInfo.minTexOffset;

                var setNum   = textureId / Constants.NUM_TEXTURES_PER_SET;
                var tileNum  = textureId % Constants.NUM_TEXTURES_PER_SET;
                var thisSet  = textureBinInfo.setRecords[setNum];
                var tileName = thisSet.tileRecords[tileNum].tileName;
                toReturn = _nearTileTextureLoader.LoadNearTileTexture(tileName);
            }
            else if (lod <= _terrainDB.TheaterDotMap.LastFarTiledLOD)
            {
                toReturn = _farTileTextureRetriever.GetFarTileTexture(textureId);
            }
            return(toReturn);
        }
Ejemplo n.º 2
0
 public Bitmap GetNearTileTexture(string tileName)
 {
     return(_nearTileTextureLoader.LoadNearTileTexture(tileName));
 }