mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-13 02:28:44 +08:00
parent
6e09fb8512
commit
8ec8212c5d
@ -108,6 +108,7 @@ void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkel
|
||||
}
|
||||
|
||||
void SkeletonRenderer::initWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) {
|
||||
_atlas = atlas;
|
||||
_attachmentLoader = SUPER(Cocos2dAttachmentLoader_create(_atlas));
|
||||
|
||||
spSkeletonJson* json = spSkeletonJson_createWithLoader(_attachmentLoader);
|
||||
|
||||
@ -78,7 +78,7 @@ char* _spUtil_readFile (const char* path, int* length) {
|
||||
Data data = FileUtils::getInstance()->getDataFromFile(
|
||||
FileUtils::getInstance()->fullPathForFilename(path).c_str());
|
||||
if (data.isNull()) return 0;
|
||||
*length = data.getSize();
|
||||
*length = static_cast<int>(data.getSize());
|
||||
char* bytes = MALLOC(char, *length);
|
||||
memcpy(bytes, data.getBytes(), *length);
|
||||
return bytes;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user