Better logging

This commit is contained in:
2020-03-20 00:02:27 +00:00
parent 5fccf97f4b
commit 576ac0570d
3 changed files with 12 additions and 2 deletions

View File

@@ -1,8 +1,10 @@
package assetstore
import (
"github.com/hajimehoshi/ebiten"
"image"
"log"
"github.com/hajimehoshi/ebiten"
"code.ur.gs/lupine/ordoor/internal/maps"
)
@@ -22,6 +24,7 @@ func (a *AssetStore) Map(name string) (*Map, error) {
if m, ok := a.maps[name]; ok {
return m, nil
}
log.Printf("Loading map %v", name)
mapFile, err := a.lookup(name, "map", "Maps", "MultiMaps")
if err != nil {
@@ -67,7 +70,7 @@ func (m *Map) ImagesForCell(x, y, z int) ([]*ebiten.Image, error) {
cell := m.raw.At(x, y, z)
images := make([]*ebiten.Image, 0, 4)
for _, ref := range []maps.ObjRef{cell.Surface, cell.Center, cell.Left, cell.Right} {
for _, ref := range []maps.ObjRef{cell.Surface, cell.Right, cell.Left, cell.Center} {
if !ref.IsActive() {
continue
}