Examples of HeightInfo


Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    ShapeProvider shapeProvider = generator.shapeProvider;
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
        if (current == null) {
         
          // what is the world location of the lot?
          int blockX = (originX + x) * SupportChunk.chunksBlockWidth;
          int blockZ = (originZ + z) * SupportChunk.chunksBlockWidth;
         
          // get the height info for this chunk
          heights = HeightInfo.getHeightsFaster(generator, blockX, blockZ);
          if (!heights.isBuildable()) {
           
            // our inner chunks?
            if (x > 0 && x < PlatMap.Width - 1 && z > 0 && z < PlatMap.Width - 1) {
             
              // floating building?
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    boolean didBunkerEntrance = false;
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
   
    // highest special place
    int maxHeight = Integer.MIN_VALUE;
    int maxHeightX = -1;
    int maxHeightZ = -1;
    HeightState maxState = HeightState.BUILDING;
   
    // lowest special place
    int minHeight = Integer.MAX_VALUE;
    int minHeightX = -1;
    int minHeightZ = -1;
    HeightState minState = HeightState.BUILDING;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
        if (current == null) {
         
          // what is the world location of the lot?
          int chunkX = originX + x;
          int chunkZ = originZ + z;
          int blockX = chunkX * SupportChunk.chunksBlockWidth;
          int blockZ = chunkZ * SupportChunk.chunksBlockWidth;
         
          // get the height info for this chunk
          heights = HeightInfo.getHeightsFaster(generator, blockX, blockZ);
          if (!heights.isBuildable()) {
           
            // our inner chunks?
            if (x > 0 && x < PlatMap.Width - 1 && z > 0 && z < PlatMap.Width - 1) {
             
              // extreme changes?
              if (heights.minHeight < minHeight) {
                minHeight = heights.minHeight;
                minHeightX = x;
                minHeightZ = z;
                minState = heights.state;
              }
              if (heights.maxHeight > maxHeight) {
                maxHeight = heights.maxHeight;
                maxHeightX = x;
                maxHeightZ = z;
                maxState = heights.state;
              }
             
              // innermost chunks?
              boolean potentialRoads = (x == (RoadLot.PlatMapRoadInset - 1) || x == (PlatMap.Width - RoadLot.PlatMapRoadInset)) &&
                           (z == (RoadLot.PlatMapRoadInset - 1) || z == (PlatMap.Width - RoadLot.PlatMapRoadInset));
              boolean doBunkerEntrance = doBunkers && !didBunkerEntrance && !potentialRoads;
             
              // what type of height are we talking about?
              switch (heights.state) {
              case MIDLAND:
               
//                // if not one of the innermost or the height isn't tall enough for bunkers
//                if (!innermost || minHeight < BunkerLot.calcBunkerMinHeight(generator)) {
//                  if (heights.isSortaFlat() && generator.shapeProvider.isIsolatedConstructAt(originX + x, originZ + z, oddsOfIsolatedConstructs))
//                    current = createSurfaceBuildingLot(generator, platmap, originX + x, originZ + z, heights);
//                 
//                  else if (doBunkers && innermost) {
//                    current = createBuriedBuildingLot(generator, platmap, chunkX, chunkZ, !didBunkers);
//                    didBunkers = true;
//                  }
//                }
               
                if (doBunkers && minHeight > BunkerLot.calcBunkerMinHeight(generator)) {
                  current = createBuriedBuildingLot(generator, platmap, chunkX, chunkZ, doBunkerEntrance);
                 
                 
                } else if (heights.isSortaFlat() && generator.shapeProvider.isIsolatedConstructAt(originX + x, originZ + z, oddsOfIsolatedConstructs)) {
                  current = createSurfaceBuildingLot(generator, platmap, originX + x, originZ + z, heights);
                }
               
                break;
              case HIGHLAND:
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    //mapsSchematics.populate(generator, platmap);
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    Odds odds = platmap.getOddsGenerator();
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    ShapeProvider shapeProvider = generator.shapeProvider;
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    boolean towerPlaced = false;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    //mapsSchematics.populate(generator, platmap);
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    //mapsSchematics.populate(generator, platmap);
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
        PlatLot current = platmap.getLot(x, z);
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    ShapeProvider shapeProvider = generator.shapeProvider;
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    boolean towerPlaced = false;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    Odds odds = platmap.getOddsGenerator();
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    boolean addingBases = false;
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.HeightInfo

    //mapsSchematics.populate(generator, platmap);
   
    // where it all begins
    int originX = platmap.originX;
    int originZ = platmap.originZ;
    HeightInfo heights;
    Odds odds = platmap.getOddsGenerator();
   
    // is this natural or buildable?
    for (int x = 0; x < PlatMap.Width; x++) {
      for (int z = 0; z < PlatMap.Width; z++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.