Load will load the xml file and the main image as well as add references for sub textures/images in engo.Files, subtextures keep their path url (with appended extension from main image path if it does not exist), the main image is loaded in reference to the directory of the xml file For example this
(url string, data io.Reader)
| 63 | // can be retrieved with this go code |
| 64 | // texture, err := common.LoadedSprite("subimg.png") |
| 65 | func (t *textureAtlasLoader) Load(url string, data io.Reader) error { |
| 66 | atlas, err := createAtlasFromXML(data, url) |
| 67 | if err != nil { |
| 68 | return err |
| 69 | } |
| 70 | |
| 71 | t.atlases[url] = atlas |
| 72 | return nil |
| 73 | } |
| 74 | |
| 75 | // Unload removes the preloaded atlass from the cache and clears |
| 76 | // references to all SubTextures from the image loader |
nothing calls this directly
no test coverage detected