mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[cpp] Fixed asserts in Atlas.cpp.
This commit is contained in:
parent
77d4dd5a41
commit
307230259e
@ -134,15 +134,15 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
||||
/* size is only optional for an atlas packed with an old TexturePacker. */
|
||||
page->width = toInt(tuple);
|
||||
page->height = toInt(tuple + 1);
|
||||
assert(readTuple(&begin, end, tuple));
|
||||
readTuple(&begin, end, tuple);
|
||||
|
||||
page->format = (Format) indexOf(formatNames, 8, tuple);
|
||||
|
||||
assert(readTuple(&begin, end, tuple));
|
||||
readTuple(&begin, end, tuple);
|
||||
page->minFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple);
|
||||
page->magFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple + 1);
|
||||
|
||||
assert(readValue(&begin, end, &str));
|
||||
readValue(&begin, end, &str);
|
||||
|
||||
page->uWrap = TextureWrap_ClampToEdge;
|
||||
page->vWrap = TextureWrap_ClampToEdge;
|
||||
@ -170,14 +170,14 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
||||
region->page = page;
|
||||
region->name = String(mallocString(&str), true);
|
||||
|
||||
assert(readValue(&begin, end, &str));
|
||||
readValue(&begin, end, &str);
|
||||
region->rotate = equals(&str, "true") ? true : false;
|
||||
|
||||
assert(readTuple(&begin, end, tuple) == 2);
|
||||
readTuple(&begin, end, tuple);
|
||||
region->x = toInt(tuple);
|
||||
region->y = toInt(tuple + 1);
|
||||
|
||||
assert(readTuple(&begin, end, tuple) == 2);
|
||||
readTuple(&begin, end, tuple);
|
||||
region->width = toInt(tuple);
|
||||
region->height = toInt(tuple + 1);
|
||||
|
||||
@ -213,7 +213,7 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
||||
region->pads[2] = toInt(tuple + 2);
|
||||
region->pads[3] = toInt(tuple + 3);
|
||||
|
||||
assert(readTuple(&begin, end, tuple));
|
||||
readTuple(&begin, end, tuple);
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
||||
region->offsetX = (float)toInt(tuple);
|
||||
region->offsetY = (float)toInt(tuple + 1);
|
||||
|
||||
assert(readValue(&begin, end, &str));
|
||||
readValue(&begin, end, &str);
|
||||
|
||||
region->index = toInt(&str);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user