| 47 | }; |
| 48 | |
| 49 | void CalculateFrameInformation( |
| 50 | FRAME_OUTPUT_INFO &info, CGameObject *obj, bool mirror, uint8_t animIndex) |
| 51 | { |
| 52 | const auto dir = g_AnimationManager.Anim.Direction; |
| 53 | const auto grp = g_AnimationManager.Anim.Group; |
| 54 | const AnimationState anim = { obj->GetGraphicForAnimation(), grp, dir }; |
| 55 | const auto dim = g_AnimationManager.GetAnimationDimensions( |
| 56 | obj->AnimIndex, anim, obj->IsMounted(), obj->IsCorpse()); |
| 57 | int y = -(dim.Height + dim.CenterY + 3); |
| 58 | int x = -dim.CenterX; |
| 59 | if (mirror) |
| 60 | { |
| 61 | x = -(dim.Width - dim.CenterX); |
| 62 | } |
| 63 | |
| 64 | if (x < info.StartX) |
| 65 | { |
| 66 | info.StartX = x; |
| 67 | } |
| 68 | |
| 69 | if (y < info.StartY) |
| 70 | { |
| 71 | info.StartY = y; |
| 72 | } |
| 73 | |
| 74 | if (info.EndX < x + dim.Width) |
| 75 | { |
| 76 | info.EndX = x + dim.Width; |
| 77 | } |
| 78 | |
| 79 | if (info.EndY < y + dim.Height) |
| 80 | { |
| 81 | info.EndY = y + dim.Height; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | const int CAnimationManager::m_UsedLayers[MAX_LAYER_DIRECTIONS][USED_LAYER_COUNT] = { |
| 86 | { |
no test coverage detected