mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 09:20:17 +01:00
Unexport render internal methods.
This commit is contained in:
parent
6ab45d13c0
commit
67a16e2d3e
@ -275,17 +275,17 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (a Area) Contains(x, z int16) bool {
|
||||
func (a Area) contains(x, z int16) bool {
|
||||
return x >= a.X1 && x <= a.X2 && z >= a.Z1 && z <= a.Z2
|
||||
}
|
||||
|
||||
func (a Area) IsHigher() bool {
|
||||
func (a Area) higher() bool {
|
||||
return a.Z2-a.Z1 > a.X2-a.X1
|
||||
}
|
||||
|
||||
func areasContain(areas []Area, x, z int16) bool {
|
||||
for _, r := range areas {
|
||||
if r.Contains(x, z) {
|
||||
if r.contains(x, z) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@ -317,7 +317,7 @@ func (r *Renderer) UncoveredAreas(newAreas, oldAreas []Area) []Area {
|
||||
var xFirst bool
|
||||
// Try to extend in the direction with most gain
|
||||
// of blocks.
|
||||
if area.IsHigher() { // Higher means to win more blocks in x direction.
|
||||
if area.higher() { // Higher means to win more blocks in x direction.
|
||||
xFirst = true
|
||||
}
|
||||
dirs:
|
||||
|
Loading…
Reference in New Issue
Block a user