| 1313 | } |
| 1314 | |
| 1315 | static inline int32_t GetNodeAnimationFrameInternal(InternalNode* in) |
| 1316 | { |
| 1317 | Node& n = in->m_Node; |
| 1318 | if(n.m_TextureType != NODE_TEXTURE_TYPE_TEXTURE_SET || n.m_TextureSetAnimDesc.m_TexCoords == 0x0) |
| 1319 | return -1; |
| 1320 | TextureSetAnimDesc* anim_desc = &n.m_TextureSetAnimDesc; |
| 1321 | int32_t anim_frames = anim_desc->m_State.m_End - anim_desc->m_State.m_Start; |
| 1322 | int32_t anim_frame = (int32_t) (n.m_FlipbookAnimPosition * (float)anim_frames); |
| 1323 | return anim_desc->m_State.m_Start + dmMath::Clamp(anim_frame, 0, anim_frames-1); |
| 1324 | } |
| 1325 | |
| 1326 | int32_t GetNodeAnimationFrame(HScene scene, HNode node) |
| 1327 | { |
no test coverage detected