X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHeroTag.cpp;h=f6682df4e5da9df1b424d65ceb3ca7ee07d96d71;hb=8a6225176cd0946363ac2d8219d54a13009de675;hp=d50b4132d85860f7556041794eac260793c92480;hpb=00b557a47e47d9410730d47d436f6158a3fb79f5;p=l2e.git diff --git a/src/battle/HeroTag.cpp b/src/battle/HeroTag.cpp index d50b413..f6682df 100644 --- a/src/battle/HeroTag.cpp +++ b/src/battle/HeroTag.cpp @@ -93,13 +93,13 @@ void HeroTag::Render(SDL_Surface *screen, int width, int height, Point posi } // 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 HeroTag::HeroOffset() const { return Vector( - (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); } }