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

Method gPrOff

tools/extractors/extract_unit_animation_packs.cpp:136–140  ·  view source on GitHub ↗

Get Prone offset for facing

Source from the content-addressed store, hash-verified

134
135// Get Prone offset for facing
136Vec2<int> InitialGameStateExtractor::gPrOff(Vec2<int> facing) const
137{
138 // 48 = tile_x, 24 = tile_y
139 return {(facing.x - facing.y) * 48 / 8, (facing.x + facing.y) * 24 / 8};
140}
141
142sp<BattleUnitAnimationPack::AnimationEntry>
143InitialGameStateExtractor::makeUpAnimationEntry(int from, int count, int fromS, int countS,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected