[cpp] fix RGB2Timeline Applying wrong bezierValue

It looks like someone just copy and pasted RGBA2Timeline implementation to RGB2Timeline apply implementation.
In SkeletonBinary/Json parser assign r2, g2, b2 bezier value to 3, 4, 5
while current implementation is reading r2, g2, b2 from 4, 5, 6
see
 SkeletonBinary.cpp line 1034 ~ 1037
 SkeletonJson.cpp line 1088 ~ 1090
This commit is contained in:
pbk 2025-11-12 10:11:12 +09:00
parent d698e53e3e
commit a3e6229ded

View File

@ -458,11 +458,11 @@ void RGB2Timeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<
b = getBezierValue(time, i, RGB2Timeline::B,
curveType + RGB2Timeline::BEZIER_SIZE * 2 - RGB2Timeline::BEZIER);
r2 = getBezierValue(time, i, RGB2Timeline::R2,
curveType + RGB2Timeline::BEZIER_SIZE * 4 - RGB2Timeline::BEZIER);
curveType + RGB2Timeline::BEZIER_SIZE * 3 - RGB2Timeline::BEZIER);
g2 = getBezierValue(time, i, RGB2Timeline::G2,
curveType + RGB2Timeline::BEZIER_SIZE * 5 - RGB2Timeline::BEZIER);
curveType + RGB2Timeline::BEZIER_SIZE * 4 - RGB2Timeline::BEZIER);
b2 = getBezierValue(time, i, RGB2Timeline::B2,
curveType + RGB2Timeline::BEZIER_SIZE * 6 - RGB2Timeline::BEZIER);
curveType + RGB2Timeline::BEZIER_SIZE * 5 - RGB2Timeline::BEZIER);
}
}
Color &light = slot->_color, &dark = slot->_darkColor;