public void addHeightRangesAsColumns(int debugInteger) { for (int i = 0; i < NoisePatch.patchDimensions.z / 4; ++i) { SimpleRange r = lightLevelTrapezoid.heightAt(i); // if (r.range > 0) // { ChunkManager.debugLinesAssistant.addColumn(r, new PTwo(xCoord, i), debugInteger); // } } }
public void addMingleLightWithAdjacentTrapezoid(LightLevelTrapezoid other) { for (int i = this.trapezoid.span.start; i < this.trapezoid.span.extent(); ++i) { SimpleRange otherHeightRange = other.heightAt(i); SimpleRange heightRange = this.heightAt(i); SimpleRange intersection = SimpleRange.IntersectingRange(otherHeightRange, heightRange); if (intersection.range > 0) { if (other.zLightLevels[i] > this.zLightLevels[i]) { this.zLightLevels[i] = (byte)Mathf.Max((int)this.zLightLevels[i], (other.zLightLevels[i] - Window.UNIT_FALL_OFF_BYTE)); } else if (other.zLightLevels[i] < this.zLightLevels[i]) { other.zLightLevels[i] = (byte)Mathf.Max((int)other.zLightLevels[i], (this.zLightLevels[i] - Window.UNIT_FALL_OFF_BYTE)); } } } }