MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getFrameCountFiring

Method getFrameCountFiring

game/state/rules/battle/battleunitanimationpack.cpp:126–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126int BattleUnitAnimationPack::getFrameCountFiring(StateRef<AEquipmentType> heldItem,
127 BodyState currentBody, MovementState movement,
128 Vec2<int> facing)
129{
130 sp<AnimationEntry> e;
131 {
132 AnimationKey key = {
133 heldItem ? (heldItem->two_handed ? ItemWieldMode::TwoHanded : ItemWieldMode::OneHanded)
134 : ItemWieldMode::None,
135 HandState::Firing, movement, currentBody};
136 e = standart_animations[key][facing];
137 }
138 if (e)
139 return e->frame_count;
140 else
141 return 0;
142}
143
144void BattleUnitAnimationPack::drawShadow(
145 Renderer &r, Vec2<float> screenPosition, StateRef<BattleUnitImagePack> shadow,

Callers 2

setHandStateMethod · 0.80
getWeaponDecisionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected