int HeroStatus::Width() const {
- return hero->BattleSprite()->Width() + res->statusFont->CharWidth() * 10;
+ return hero->BattleSprite()->Width() + res->statusFont->CharWidth() * 11;
}
int HeroStatus::Height() const {
- return hero->BattleSprite()->Height();
+ return hero->BattleSprite()->Height() + res->statusFont->CharWidth();
}
void HeroStatus::Render(SDL_Surface *screen, const Vector<int> &offset) const {
if (!hero) return;
- hero->BattleSprite()->Draw(screen, position + offset, 0, 0);
+ hero->BattleSprite()->Draw(screen, offset, 0, 0);
// for some reason, fonts are shifted by one pixel in the original
Vector<int> nameOffset(
hero->BattleSprite()->Width(),
res->statusFont->CharHeight() * 7 / 8);
- nameOffset += position + offset;
+ nameOffset += offset;
res->statusFont->DrawString(hero->Name(), screen, nameOffset, 5);
Vector<int> levelLabelOffset(nameOffset.X() + 6 * res->statusFont->CharWidth(), nameOffset.Y());