Skip to content

imagePath to tiles with relative path is broken #177

@pozemka

Description

@pozemka

Hello! I have a project with following resource structure:

.
├── images
│   └── region_map
│       ├── terrain
│       │   ├── tile_01.png
│       │   ├── tile_02.png
├── maps
│   └── demo
│       ├── demo-region.tmx
│       ├── terrain.tsx

Path to tile images is a relative path with multiple ../ (terrain.tsx file fragment):
xml <tile id="0"> <image source="../../images/region_map/terrain/tile_01.png" width="128" height="128"/> </tile>

After loading Map, tile.imagePath contains maps/images/region_map/terrain/tile_01.png which is obviously wrong cause of maps in front. Possible good path would be images/region_map/terrain/tile_01.png or even ../../images/region_map/terrain/tile_01.png.

See also #160

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions