| 95 | } |
| 96 | |
| 97 | int BattleUnitAnimationPack::getFrameCountHands(StateRef<AEquipmentType> heldItem, |
| 98 | BodyState currentBody, HandState currentHands, |
| 99 | HandState targetHands, MovementState movement, |
| 100 | Vec2<int> facing) |
| 101 | { |
| 102 | sp<AnimationEntry> e; |
| 103 | if (currentHands == targetHands) |
| 104 | { |
| 105 | AnimationKey key = { |
| 106 | heldItem ? (heldItem->two_handed ? ItemWieldMode::TwoHanded : ItemWieldMode::OneHanded) |
| 107 | : ItemWieldMode::None, |
| 108 | currentHands, movement, currentBody}; |
| 109 | |
| 110 | e = standart_animations[key][facing]; |
| 111 | } |
| 112 | else |
| 113 | { |
| 114 | ChangingHandAnimationKey key = { |
| 115 | heldItem ? (heldItem->two_handed ? ItemWieldMode::TwoHanded : ItemWieldMode::OneHanded) |
| 116 | : ItemWieldMode::None, |
| 117 | currentHands, targetHands, movement, currentBody}; |
| 118 | e = hand_state_animations[key][facing]; |
| 119 | } |
| 120 | if (e) |
| 121 | return e->frame_count; |
| 122 | else |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | int BattleUnitAnimationPack::getFrameCountFiring(StateRef<AEquipmentType> heldItem, |
| 127 | BodyState currentBody, MovementState movement, |
no outgoing calls
no test coverage detected