Skip to content
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

Merged
merged 2 commits into from Feb 8, 2022
Merged

fix spine binary data read issue. #4229

merged 2 commits into from Feb 8, 2022

Conversation

xianyinchen
Copy link
Contributor

@xianyinchen xianyinchen changed the title fix binary data read issue. fix spine binary data read issue. Jan 27, 2022
@minggo minggo requested a review from zhakesi January 27, 2022 09:54
auto _scaleX = readFloat(input);
auto _scaleY = readFloat(input);
auto _width = readFloat(input);
auto _height = readFloat(input);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

临时变量不要加 _

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NULL -> nullptr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不做修改,保持与源文件的风格一样,如果要整改,应该整个 spine 扩展一起做下优化

Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

格式得对齐一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@minggo minggo merged commit c6f96d9 into cocos:v3.4.2 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants