]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/HeroTag.cpp
removed invalid TODO :o
[l2e.git] / src / battle / HeroTag.cpp
index d50b4132d85860f7556041794eac260793c92480..228bfda4aef5e654a368c8c1634460f4ca890541 100644 (file)
@@ -87,19 +87,19 @@ void HeroTag::Render(SDL_Surface *screen, int width, int height, Point<int> posi
        r.normalFont->DrawString(hero.Name(), screen, position + frameOffset + alignOffset, 5);
 
        // attack icon
-       if (battle->AttackChoiceAt(index).GetType() != AttackChoice::UNDECIDED) {
+       if (battle->HeroAt(index).GetAttackChoice().GetType() != AttackChoice::UNDECIDED) {
                Vector<int> attackIconOffset(labelX + r.heroTagLabels->Width(), frameOffset.Y() + 3 * r.heroTagFont->CharHeight());
-               r.attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, battle->AttackChoiceAt(index).GetType());
+               r.attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, battle->HeroAt(index).GetAttackChoice().GetType());
        }
 
        // hero
-       HeroSprite()->Draw(screen, position + HeroOffset(), 0, battle->HeroAt(index).Health() > 0 ? 0 : 2);
+       HeroSprite()->DrawCenter(screen, position + HeroOffset(), 0, battle->HeroAt(index).Health() > 0 ? 0 : 2);
 }
 
 Vector<int> HeroTag::HeroOffset() const {
        return Vector<int>(
-                       (index % 2) ? battle->Res().normalFont->CharWidth() : 10 * battle->Res().normalFont->CharWidth(),
-                       battle->Res().normalFont->CharWidth());
+                       ((index % 2) ? battle->Res().normalFont->CharWidth() : 10 * battle->Res().normalFont->CharWidth()) + HeroSprite()->Width() / 2,
+                       battle->Res().normalFont->CharWidth() + HeroSprite()->Height() / 2);
 }
 
 }