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

Function getDownOffset

tools/extractors/extract_unit_animation_pack_multi.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 return offset_dir_map.at({x, y});
30}
31Vec2<float> getDownOffset(int x, int y)
32{
33 static const std::map<Vec2<int>, Vec2<float>> offset_dir_map = {
34 {{0, -1}, {-11, 6}}, {{1, -1}, {-23, 0}}, {{1, 0}, {-14, -6}}, {{1, 1}, {0, -11}},
35 {{0, 1}, {12, -5}}, {{-1, 1}, {24, 0}}, {{-1, 0}, {12, 7}}, {{-1, -1}, {0, 13}},
36 };
37
38 return offset_dir_map.at({x, y}) + getProneOffset(x, y);
39}
40
41void extractAnimationPackMultiInternal(sp<BattleUnitAnimationPack> p,
42 const std::vector<AnimationDataAD> &dataAD,

Callers 1

Calls 1

getProneOffsetFunction · 0.85

Tested by

no test coverage detected