| 66 | } |
| 67 | |
| 68 | int BattleUnitAnimationPack::getFrameCountBody(StateRef<AEquipmentType> heldItem, |
| 69 | BodyState currentBody, BodyState targetBody, |
| 70 | HandState currentHands, MovementState movement, |
| 71 | Vec2<int> facing) |
| 72 | { |
| 73 | sp<AnimationEntry> e; |
| 74 | if (currentBody == targetBody) |
| 75 | { |
| 76 | AnimationKey key = { |
| 77 | heldItem ? (heldItem->two_handed ? ItemWieldMode::TwoHanded : ItemWieldMode::OneHanded) |
| 78 | : ItemWieldMode::None, |
| 79 | currentHands, movement, currentBody}; |
| 80 | |
| 81 | e = standart_animations[key][facing]; |
| 82 | } |
| 83 | else |
| 84 | { |
| 85 | ChangingBodyStateAnimationKey key = { |
| 86 | heldItem ? (heldItem->two_handed ? ItemWieldMode::TwoHanded : ItemWieldMode::OneHanded) |
| 87 | : ItemWieldMode::None, |
| 88 | currentHands, movement, currentBody, targetBody}; |
| 89 | e = body_state_animations[key][facing]; |
| 90 | } |
| 91 | if (e) |
| 92 | return e->frame_count; |
| 93 | else |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | int BattleUnitAnimationPack::getFrameCountHands(StateRef<AEquipmentType> heldItem, |
| 98 | BodyState currentBody, HandState currentHands, |
no outgoing calls
no test coverage detected