mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[c] Closes 631, atlas page repeat modes weren't parsed properly
This commit is contained in:
parent
5e08751fb8
commit
f81d0aa1b3
@ -215,15 +215,19 @@ spAtlas* spAtlas_create (const char* begin, int length, const char* dir, void* r
|
|||||||
page->magFilter = (spAtlasFilter)indexOf(textureFilterNames, 7, tuple + 1);
|
page->magFilter = (spAtlasFilter)indexOf(textureFilterNames, 7, tuple + 1);
|
||||||
|
|
||||||
if (!readValue(&begin, end, &str)) return abortAtlas(self);
|
if (!readValue(&begin, end, &str)) return abortAtlas(self);
|
||||||
|
|
||||||
|
page->uWrap = SP_ATLAS_CLAMPTOEDGE;
|
||||||
|
page->vWrap = SP_ATLAS_CLAMPTOEDGE;
|
||||||
if (!equals(&str, "none")) {
|
if (!equals(&str, "none")) {
|
||||||
page->uWrap = SP_ATLAS_CLAMPTOEDGE;
|
if (str.end - str.begin == 1) {
|
||||||
page->vWrap = SP_ATLAS_CLAMPTOEDGE;
|
if (*str.begin == 'x')
|
||||||
if (*str.begin == 'x')
|
page->uWrap = SP_ATLAS_REPEAT;
|
||||||
|
else if (*str.begin == 'y')
|
||||||
|
page->vWrap = SP_ATLAS_REPEAT;
|
||||||
|
} else if (equals(&str, "xy")) {
|
||||||
page->uWrap = SP_ATLAS_REPEAT;
|
page->uWrap = SP_ATLAS_REPEAT;
|
||||||
else if (*str.begin == 'y')
|
|
||||||
page->vWrap = SP_ATLAS_REPEAT;
|
page->vWrap = SP_ATLAS_REPEAT;
|
||||||
else
|
}
|
||||||
page->uWrap = page->vWrap = SP_ATLAS_REPEAT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_spAtlasPage_createTexture(page, path);
|
_spAtlasPage_createTexture(page, path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user