+void PerformAttacks::RenderNumbers(SDL_Surface *screen, const Vector<int> &offset) const {
+ for (vector<NumberAnimation>::size_type i(0), end(numberAnimation.size()); i < end; ++i) {
+ if (numberAnimation[i].Running()) {
+ Vector<int> align(numberAnimation[i].Width() / -2, numberAnimation[i].Height() * -3 / 4);
+ numberAnimation[i].Draw(screen, numberPosition[i] + align + offset);
+ }
+ }
+}
+
+void PerformAttacks::RenderTargetAnimation(SDL_Surface *screen, const geometry::Vector<int> &offset) const {
+ if (!targetAnimation || !targetAnimation->Running()) return;
+ if (battle->CurrentAttack().isMonster) return; // no monsters for now
+ const TargetSelection &ts(battle->AttackChoiceAt(battle->CurrentAttack().index).Selection());
+ const vector<Point<int> > &positions(ts.TargetsHeroes() ? battle->HeroesPositions() : battle->MonsterPositions());
+ for (vector<Point<int> >::size_type i(0), end(positions.size()); i < end; ++i) {
+ if (ts.IsSelected(i)) {
+ targetAnimation->DrawCenter(screen, positions[i] + offset);
+ }
+ }
+}
+