mirror of https://github.com/axmolengine/axmol.git
Update spine-3.8 runtime to latest
Maybe no further update until upgrade to spine-4.x
This commit is contained in:
parent
50c270e8f5
commit
5254edc733
|
@ -56,15 +56,10 @@ SpineSkeletonDataCache::SkeletonData* SpineSkeletonDataCache::addData(const char
|
|||
** Cache, we just need SkeletonData & atlas.
|
||||
*/
|
||||
if (fileExtension == ".skel") {
|
||||
/*auto binary = new (__FILE__, __LINE__) spine::SkeletonBinary(loader);
|
||||
if (nullptr == binary) {
|
||||
delete (atlas);
|
||||
break;
|
||||
}*/
|
||||
spine::SkeletonBinary binary(loader);
|
||||
|
||||
binary.setScale(scale);
|
||||
skeletonData = binary.readSkeletonDataFile(dataFile); // spSkeletonBinary_readSkeletonDataFile(binary, dataFile);
|
||||
skeletonData = binary.readSkeletonDataFile(dataFile);
|
||||
if ((!binary.getError().isEmpty())) {
|
||||
++failed;
|
||||
_reportError("#parse spine .skel data file failed, error:%s", binary.getError().buffer());
|
||||
|
@ -80,11 +75,6 @@ SpineSkeletonDataCache::SkeletonData* SpineSkeletonDataCache::addData(const char
|
|||
_reportError("#parse spine .json data file failed, error:%s", json.getError().buffer());
|
||||
}
|
||||
}
|
||||
|
||||
/*if ((loader->error1 != nullptr)) {
|
||||
++failed;
|
||||
_reportError("#parse spine attachment failed, error:%s%s", loader->error1, loader->error2);
|
||||
}*/
|
||||
|
||||
if (failed > 0) {
|
||||
if (skeletonData != nullptr)
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace spine {
|
|||
|
||||
explicit SkeletonBinary(Atlas* atlasArray);
|
||||
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader);
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonBinary();
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class SP_API SkeletonJson : public SpineObject {
|
|||
public:
|
||||
explicit SkeletonJson(Atlas *atlas);
|
||||
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader);
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonJson();
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ Json::Json(const char *value) :
|
|||
}
|
||||
|
||||
Json::~Json() {
|
||||
spine::Json* curr = nullptr;
|
||||
spine::Json* curr = NULL;
|
||||
spine::Json* next = _child;
|
||||
do {
|
||||
curr = next;
|
||||
|
|
|
@ -98,8 +98,8 @@ SkeletonBinary::SkeletonBinary(Atlas *atlasArray) : _attachmentLoader(
|
|||
|
||||
}
|
||||
|
||||
SkeletonBinary::SkeletonBinary(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _error(),
|
||||
_scale(1), _ownsLoader(false)
|
||||
SkeletonBinary::SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _error(),
|
||||
_scale(1), _ownsLoader(ownsLoader)
|
||||
{
|
||||
assert(_attachmentLoader != NULL);
|
||||
}
|
||||
|
|
|
@ -84,8 +84,8 @@ SkeletonJson::SkeletonJson(Atlas *atlas) : _attachmentLoader(new(__FILE__, __LIN
|
|||
_scale(1), _ownsLoader(true)
|
||||
{}
|
||||
|
||||
SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _scale(1),
|
||||
_ownsLoader(false)
|
||||
SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _scale(1),
|
||||
_ownsLoader(ownsLoader)
|
||||
{
|
||||
assert(_attachmentLoader != NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue