* Get the offset in the fileContent which stores the animation data for a * given frame. * @param header The header of the WSA. * @param frame The frame of animation. * @return The offset for the animation from the beginning of the fileContent. */
| 78 | * @return The offset for the animation from the beginning of the fileContent. |
| 79 | */ |
| 80 | static uint32 WSA_GetFrameOffset_FromMemory(WSAHeader *header, uint16 frame) |
| 81 | { |
| 82 | uint16 lengthAnimation = 0; |
| 83 | uint32 animationFrame; |
| 84 | uint32 animation0; |
| 85 | |
| 86 | animationFrame = READ_LE_UINT32(header->fileContent + frame * 4); |
| 87 | |
| 88 | if (animationFrame == 0) return 0; |
| 89 | |
| 90 | animation0 = READ_LE_UINT32(header->fileContent); |
| 91 | if (animation0 != 0) { |
| 92 | lengthAnimation = READ_LE_UINT32(header->fileContent + 4) - animation0; |
| 93 | } |
| 94 | |
| 95 | return animationFrame - lengthAnimation - 10; |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Get the offset in the file which stores the animation data for a given |
no outgoing calls
no test coverage detected