mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
Merge branch '3.8' into 4.0-beta
This commit is contained in:
commit
c7a210a391
@ -267,7 +267,7 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
|
||||
a1 = (a1 - os) * RAD_DEG + o1 - parent->arotation;
|
||||
if (a1 > 180) a1 -= 360;
|
||||
else if (a1 < -180) a1 += 360;
|
||||
spBone_updateWorldTransformWith(parent, px, py, parent->rotation + a1 * alpha, sx, parent->ascaleY, 0, 0);
|
||||
spBone_updateWorldTransformWith(parent, px, py, parent->arotation + a1 * alpha, sx, parent->ascaleY, 0, 0);
|
||||
a2 = ((a2 + os) * RAD_DEG - child->ashearX) * s2 + o2 - child->arotation;
|
||||
if (a2 > 180) a2 -= 360;
|
||||
else if (a2 < -180) a2 += 360;
|
||||
|
||||
@ -242,7 +242,7 @@ void IkConstraint::apply(Bone &parent, Bone &child, float targetX, float targetY
|
||||
a1 = (a1 - os) * MathUtil::Rad_Deg + o1 - parent._arotation;
|
||||
if (a1 > 180) a1 -= 360;
|
||||
else if (a1 < -180) a1 += 360;
|
||||
parent.updateWorldTransform(px, py, parent._rotation + a1 * alpha, sx, parent._ascaleY, 0, 0);
|
||||
parent.updateWorldTransform(px, py, parent._arotation + a1 * alpha, sx, parent._ascaleY, 0, 0);
|
||||
a2 = ((a2 + os) * MathUtil::Rad_Deg - child._ashearX) * s2 + o2 - child._arotation;
|
||||
if (a2 > 180) a2 -= 360;
|
||||
else if (a2 < -180) a2 += 360;
|
||||
|
||||
@ -37,7 +37,7 @@ using namespace spine;
|
||||
#include <memory>
|
||||
|
||||
template<typename T, typename... Args>
|
||||
unique_ptr<T> make_unique(Args&&... args) {
|
||||
unique_ptr<T> make_unique_test(Args&&... args) {
|
||||
return unique_ptr<T>(new T(forward<Args>(args)...));
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ void testcase (void func(SkeletonData* skeletonData, Atlas* atlas),
|
||||
const char* jsonName, const char* binaryName, const char* atlasName,
|
||||
float scale) {
|
||||
SFMLTextureLoader textureLoader;
|
||||
auto atlas = make_unique<Atlas>(atlasName, &textureLoader);
|
||||
auto atlas = make_unique_test<Atlas>(atlasName, &textureLoader);
|
||||
|
||||
auto skeletonData = readSkeletonJsonData(jsonName, atlas.get(), scale);
|
||||
func(skeletonData.get(), atlas.get());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user