New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix spine binary data read issue. #4229
Conversation
auto _scaleX = readFloat(input); | ||
auto _scaleY = readFloat(input); | ||
auto _width = readFloat(input); | ||
auto _height = readFloat(input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
临时变量不要加 _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复
|
||
RegionAttachment *region = _attachmentLoader->newRegionAttachment(*skin, String(name), String(path)); | ||
if (region == NULL){ | ||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL -> nullptr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不做修改,保持与源文件的风格一样,如果要整改,应该整个 spine 扩展一起做下优化
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实,这个是spine官方的代码,无需修改.
region->_scaleY = _scaleY; | ||
region->_width = _width * _scale; | ||
region->_height = _height * _scale; | ||
region->_color = color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式得对齐一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
https://github.com/cocos-creator/3d-tasks/issues/10982