void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset) {
// TODO: this should be related to the enemy's width
- Vector<int> cursorOffset(0, 0);
+ // offset the cursor by 1/8th to the left and bottom
+ Vector<int> cursorOffset(cursorIcon->Width() / -8, cursorIcon->Height() / 8);
Vector<int> indicatorOffset(0, 0);
vector<Point<int> > positions;
if (selection->TargetsEnemies()) {
} else {
for (vector<Hero>::size_type i(0), end(battle->Heroes().size()); i < end; ++i) {
Vector<int> positionCorrection(cursorIcon->Width() / 2, battle->HeroTagAt(i).HeroSprite()->Height() - cursorIcon->Height() / 2);
+ // indicator offsets are inverted for heroes
+ positionCorrection -= cursorOffset;
positions.push_back(battle->HeroTagPositionAt(i) + battle->HeroTagAt(i).HeroOffset() + positionCorrection);
}
}