small fixes

This commit is contained in:
2025-09-21 12:57:17 +02:00
parent 720c9f305e
commit 8b0072d774
2 changed files with 6 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import (
"openquell/util"
"strings"
"github.com/alecthomas/repr"
"github.com/hajimehoshi/ebiten/v2"
"github.com/mlange-42/arche/ecs"
"github.com/solarlune/ldtkgo"
@@ -168,7 +169,7 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
case ldtkgo.LayerTypeEntity:
// load mobile tiles (they call them entities) using static map map.png.
tileset := assets.Assets["entitymap"]
tileset := assets.Assets["tilemap"]
for _, entity := range layer.Entities {
if entity.TileRect != nil {
@@ -197,6 +198,7 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
}
tileRect := entity.TileRect
repr.Println(tileRect)
tile.Sprite = tileset.SubImage(
image.Rect(tileRect.X, tileRect.Y,