-void SelectTarget::RenderCursors(SDL_Surface *screen, const math::Vector<int> &offset) {
- Vector<int> cursorOffset(cursorIcon->Width() / -2, cursorIcon->Height());
- // offset the indicator by 1/8th to the right and top
- Vector<int> indicatorOffset(cursorOffset + Vector<int>(cursorIcon->Width() / 8, cursorIcon->Height() / -8));
- vector<Vector<int> > positions;
- if (selection->TargetsMonsters()) {
- for (int i(0), end(battle->MaxMonsters()); i < end; ++i) {
- positions.push_back(battle->MonsterAt(i).Position());
- }
- } else {
- for (int i(0), end(battle->NumHeroes()); i < end; ++i) {
- positions.push_back(battle->HeroTagPositionAt(i) + battle->HeroTagAt(i).HeroOffset());
- }
- }
+void SelectTarget::RenderCursors(SDL_Surface *screen) {
+ vector<Vector<int> > &positions = selection->TargetsMonsters()
+ ? monsterPositions
+ : heroPositions;
+