]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
added simple font implementation
[l2e.git] / src / main.cpp
index 71a4afbd72287ef6934c28af54fc73c0db0c70cd..850907f59552e356d1992f67d13f2435f6d1dd08 100644 (file)
@@ -12,6 +12,7 @@
 #include "battle/Monster.h"
 #include "battle/PartyLayout.h"
 #include "geometry/Point.h"
+#include "graphics/Font.h"
 #include "graphics/Frame.h"
 #include "graphics/Gauge.h"
 #include "graphics/Sprite.h"
@@ -31,6 +32,7 @@ using battle::Hero;
 using battle::Monster;
 using battle::PartyLayout;
 using geometry::Point;
+using graphics::Font;
 using graphics::Frame;
 using graphics::Gauge;
 using graphics::Sprite;
@@ -88,6 +90,9 @@ int main(int argc, char **argv) {
                Sprite moveIconsSprite(moveIcons, 32, 32);
                SDL_Surface *heroTagSprites(IMG_Load("test-data/hero-tag-sprites.png"));
                Sprite heroTagSprite(heroTagSprites, 32, 16);
+               SDL_Surface *numbers(IMG_Load("test-data/numbers.png"));
+               Sprite numbersSprite(numbers, 16, 16);
+               Font heroTagFont(&numbersSprite);
                SDL_Surface *tagFrames(IMG_Load("test-data/tag-frames.png"));
                Frame heroTagFrame(tagFrames, 16, 16, 1, 1, 0, 33);
                Frame activeHeroTagFrame(tagFrames, 16, 16);
@@ -97,7 +102,7 @@ int main(int argc, char **argv) {
                Gauge manaGauge(gauges, 0, 32, 0, 0, 16, 6, 1, 6);
                Gauge ikariGauge(gauges, 0, 48, 0, 0, 16, 6, 1, 6);
 
-               BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &attackIconsSprite, &moveIconsSprite, &heroTagFrame, &activeHeroTagFrame, &healthGauge, &manaGauge, &ikariGauge, &heroTagSprite));
+               BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &attackIconsSprite, &moveIconsSprite, &heroTagFrame, &activeHeroTagFrame, &healthGauge, &manaGauge, &ikariGauge, &heroTagSprite, &heroTagFont));
                battleState->AddMonster(monster);
                battleState->AddMonster(monster);
                battleState->AddMonster(monster);