mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 18:18:43 +08:00
Now I understand the origin of this deform2 and awkward memset function, haha
This commit is contained in:
parent
01ef0152b8
commit
e20382a304
@ -1201,35 +1201,35 @@ namespace Spine
|
||||
for (valueMap = timelineMap->_child, frameIndex = 0; valueMap; valueMap = valueMap->_next, ++frameIndex)
|
||||
{
|
||||
Json* vertices = Json::getItem(valueMap, "vertices");
|
||||
Vector<float> deform2;
|
||||
Vector<float> deform;
|
||||
if (!vertices)
|
||||
{
|
||||
if (weighted)
|
||||
{
|
||||
deform2 = tempDeform;
|
||||
deform = tempDeform;
|
||||
}
|
||||
else
|
||||
{
|
||||
deform2 = attachment->_vertices;
|
||||
deform = attachment->_vertices;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int v, start = Json::getInt(valueMap, "offset", 0);
|
||||
Json* vertex;
|
||||
deform2 = tempDeform;
|
||||
deform = tempDeform;
|
||||
if (_scale == 1)
|
||||
{
|
||||
for (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v)
|
||||
{
|
||||
deform2[v] = vertex->_valueFloat;
|
||||
deform[v] = vertex->_valueFloat;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v)
|
||||
{
|
||||
deform2[v] = vertex->_valueFloat * _scale;
|
||||
deform[v] = vertex->_valueFloat * _scale;
|
||||
}
|
||||
}
|
||||
if (!weighted)
|
||||
@ -1237,11 +1237,11 @@ namespace Spine
|
||||
Vector<float>& verticesAttachment = attachment->_vertices;
|
||||
for (v = 0; v < deformLength; ++v)
|
||||
{
|
||||
deform2[v] += verticesAttachment[v];
|
||||
deform[v] += verticesAttachment[v];
|
||||
}
|
||||
}
|
||||
}
|
||||
timeline->setFrame(frameIndex, Json::getFloat(valueMap, "time", 0), deform2);
|
||||
timeline->setFrame(frameIndex, Json::getFloat(valueMap, "time", 0), deform);
|
||||
readCurve(valueMap, timeline, frameIndex);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user