Rename bsp -> packing

This commit is contained in:
Hajime Hoshi 2018-03-06 00:38:56 +09:00
parent 50be07355f
commit 7e70d5ca69
3 changed files with 9 additions and 9 deletions

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package bsp offers binary space partitioning algorithm.
package bsp
// Package packing offers a packing algorithm in 2D space.
package packing
import (
"github.com/hajimehoshi/ebiten/internal/sync"

View File

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package bsp_test
package packing_test
import (
"testing"
. "github.com/hajimehoshi/ebiten/internal/bsp"
. "github.com/hajimehoshi/ebiten/internal/packing"
)
func TestBSP(t *testing.T) {

View File

@ -15,14 +15,14 @@
package ebiten
import (
"github.com/hajimehoshi/ebiten/internal/bsp"
"github.com/hajimehoshi/ebiten/internal/packing"
"github.com/hajimehoshi/ebiten/internal/restorable"
"github.com/hajimehoshi/ebiten/internal/sync"
)
type sharedImage struct {
restorable *restorable.Image
page bsp.Page
page packing.Page
}
var (
@ -31,7 +31,7 @@ var (
type sharedImagePart struct {
sharedImage *sharedImage
node *bsp.Node
node *packing.Node
}
func (s *sharedImagePart) image() *restorable.Image {
@ -67,7 +67,7 @@ func newSharedImagePart(width, height int) *sharedImagePart {
sharedImageLock.Lock()
sharedImageLock.Unlock()
if width > bsp.MaxSize || height > bsp.MaxSize {
if width > packing.MaxSize || height > packing.MaxSize {
return nil
}
for _, s := range theSharedImages {
@ -79,7 +79,7 @@ func newSharedImagePart(width, height int) *sharedImagePart {
}
}
s := &sharedImage{
restorable: restorable.NewImage(bsp.MaxSize, bsp.MaxSize, false),
restorable: restorable.NewImage(packing.MaxSize, packing.MaxSize, false),
}
theSharedImages = append(theSharedImages, s)