]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
added escape title frame, text, and font
[l2e.git] / src / main.cpp
index 28656c3b050a475badb08489d236fb255faef1b7..e39d31830976b38b40e396da5f38a28dc114770a 100644 (file)
@@ -147,6 +147,24 @@ int main(int argc, char **argv) {
                SDL_Surface *moveIconsImg(IMG_Load("test-data/move-icons.png"));
                Sprite moveIconsSprite(moveIconsImg, 32, 32);
                battleRes.moveIcons = &moveIconsSprite;
+
+               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);
+               largeFont.MapRange('A', 'M', 0, 1);
+               largeFont.MapRange('N', 'Z', 0, 2);
+               largeFont.MapRange('a', 'm', 0, 3);
+               largeFont.MapRange('n', 'z', 0, 4);
+               largeFont.MapChar(':', 10, 0);
+               largeFont.MapChar('!', 11, 0);
+               largeFont.MapChar('?', 12, 0);
+               // TODO: add '.' and '-' characters
+               battleRes.titleFont = &largeFont;
+
                SDL_Surface *heroTagImg(IMG_Load("test-data/hero-tag-sprites.png"));
                Sprite heroTagSprite(heroTagImg, 32, 16);
                battleRes.heroTagLabels = &heroTagSprite;
@@ -540,6 +558,8 @@ int main(int argc, char **argv) {
                battleRes.noEquipmentText = "No equip";
                battleRes.ikariMenuPrototype = Menu<const Item *>(&normalFont, &disabledFont, &handCursorSprite, 12, 6, normalFont.CharHeight() / 2, normalFont.CharWidth(), 1, normalFont.CharWidth() * 2, 0, ':', 12, normalFont.CharWidth());
 
+               battleRes.escapeText = "Escapes.";
+
                BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes));
                battleState->AddMonster(monster);
                battleState->AddMonster(monster);