mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 19:58:54 +01:00
internal/bsp: Refactoring
This commit is contained in:
parent
798a826e50
commit
f953afc518
@ -91,7 +91,6 @@ func (n *Node) alloc(width, height int) *Node {
|
|||||||
height: n.height,
|
height: n.height,
|
||||||
parent: n,
|
parent: n,
|
||||||
}
|
}
|
||||||
return n.child0.alloc(width, height)
|
|
||||||
} else {
|
} else {
|
||||||
// Split holizontally
|
// Split holizontally
|
||||||
n.child0 = &Node{
|
n.child0 = &Node{
|
||||||
@ -108,8 +107,8 @@ func (n *Node) alloc(width, height int) *Node {
|
|||||||
height: n.height - height,
|
height: n.height - height,
|
||||||
parent: n,
|
parent: n,
|
||||||
}
|
}
|
||||||
return n.child0.alloc(width, height)
|
|
||||||
}
|
}
|
||||||
|
return n.child0.alloc(width, height)
|
||||||
}
|
}
|
||||||
if n.child0 == nil || n.child1 == nil {
|
if n.child0 == nil || n.child1 == nil {
|
||||||
panic("not reached")
|
panic("not reached")
|
||||||
|
Loading…
Reference in New Issue
Block a user