// frame
const Frame *frame(active ? res->activeHeroTagFrame : res->heroTagFrame);
Vector<int> frameOffset(frame->BorderWidth(), frame->BorderHeight());
+ Vector<int> alignOffset(align == LEFT ? 4 * res->heroTagFont->CharWidth() : 0, 0);
frame->Draw(screen, position, width, height);
int yOffset((height - hero->Sprite()->Height()) / 2);
Vector<int> manaNumberOffset(labelX + res->heroTagLabels->Width(), manaLabelOffset.Y());
res->heroTagFont->DrawNumber(hero->Mana(), screen, position + manaNumberOffset, 3);
+ // name
+ res->normalFont->DrawString(hero->Name(), screen, position + frameOffset + alignOffset, 5);
+
// hero
Vector<int> heroOffset(
(align == LEFT) ? yOffset : width - hero->Sprite()->Width() - yOffset,
Frame selectFrame(selectFrameImg, 16, 16);
battleRes.selectFrame = &selectFrame;
+ SDL_Surface *normalFontImg(IMG_Load("test-data/normal-font.png"));
+ Sprite normalFontSprite(normalFontImg, 16, 16);
+ Font normalFont(&normalFontSprite);
+ normalFont.MapRange('A', 'M', 0, 1);
+ normalFont.MapRange('N', 'Z', 0, 2);
+ normalFont.MapRange('a', 'm', 0, 3);
+ normalFont.MapRange('n', 'z', 0, 4);
+ battleRes.normalFont = &normalFont;
+
BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes));
battleState->AddMonster(monster);
battleState->AddMonster(monster);