]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
added interpretation of Font and Frame objects
[l2e.git] / src / main.cpp
index 1c87e33ff95a3728cc006b0470591da0e1a45c72..e1969307c93ff83dff5c88adfda6f2066c1e0e2d 100644 (file)
@@ -107,16 +107,8 @@ int main(int argc, char **argv) {
                battleRes.attackIcons = intp.GetSprite("attackIcons");
                battleRes.attackChoiceIcons = intp.GetSprite("attackChoiceIcons");
                battleRes.moveIcons = intp.GetSprite("moveIcons");
-
-               SDL_Surface *titleFrameImg(IMG_Load("test-data/title-frame.png"));
-               Frame titleFrame(titleFrameImg, 16, 16);
-               battleRes.titleFrame = &titleFrame;
-
-               SDL_Surface *largeFontImg(IMG_Load("test-data/large-font.png"));
-               Sprite largeFontSprite(largeFontImg, 16, 32);
-               Font largeFont(&largeFontSprite, 0, -2);
-               battleRes.titleFont = &largeFont;
-
+               battleRes.titleFrame = intp.GetFrame("titleFrame");
+               battleRes.titleFont = intp.GetFont("largeFont");
                battleRes.numberAnimationPrototype = intp.GetAnimation("numberAnimationPrototype");
                battleRes.bigNumberSprite = intp.GetSprite("bigNumbers");
                battleRes.greenNumberSprite = intp.GetSprite("bigGreenNumbers");
@@ -133,20 +125,11 @@ int main(int argc, char **argv) {
                battleRes.ikariLabelCol = 0;
                battleRes.ikariLabelRow = 4;
 
-               SDL_Surface *numbersImg(IMG_Load("test-data/numbers.png"));
-               Sprite numbersSprite(numbersImg, 16, 16);
-               Font heroTagFont(&numbersSprite, 0, -3);
-               battleRes.heroTagFont = &heroTagFont;
-               SDL_Surface *tagFramesImg(IMG_Load("test-data/tag-frames.png"));
-               Frame heroTagFrame(tagFramesImg, 16, 16, 1, 1, 0, 33);
-               battleRes.heroTagFrame = &heroTagFrame;
-               Frame activeHeroTagFrame(tagFramesImg, 16, 16);
-               battleRes.activeHeroTagFrame = &activeHeroTagFrame;
-               SDL_Surface *smallTagFrameImg(IMG_Load("test-data/small-tag-frame.png"));
-               Frame smallTagFrame(smallTagFrameImg, 8, 16);
-               battleRes.smallHeroTagFrame = &smallTagFrame;
-               Frame lastSmallTagFrame(smallTagFrameImg, 8, 16, 1, 1, 0, 33);
-               battleRes.lastSmallHeroTagFrame = &lastSmallTagFrame;
+               battleRes.heroTagFont = intp.GetFont("heroTagFont");
+               battleRes.heroTagFrame = intp.GetFrame("heroTagFrame");
+               battleRes.activeHeroTagFrame = intp.GetFrame("activeHeroTagFrame");
+               battleRes.smallHeroTagFrame = intp.GetFrame("smallHeroTagFrame");
+               battleRes.lastSmallHeroTagFrame = intp.GetFrame("lastSmallHeroTagFrame");
                battleRes.heroesBgColor = SDL_MapRGB(screen.Screen()->format, 0x18, 0x28, 0x31);
 
                SDL_Surface *gauges(IMG_Load("test-data/gauges.png"));