battleRes.lastSmallHeroTagFrame = intp.GetFrame("lastSmallHeroTagFrame");
battleRes.heroesBgColor = SDL_MapRGB(screen.Screen()->format, 0x18, 0x28, 0x31);
- SDL_Surface *gauges(IMG_Load("test-data/gauges.png"));
- Gauge healthGauge(gauges, 0, 16, 0, 0, 16, 6, 1, 6);
- battleRes.healthGauge = &healthGauge;
- Gauge manaGauge(gauges, 0, 32, 0, 0, 16, 6, 1, 6);
- battleRes.manaGauge = &manaGauge;
- Gauge ikariGauge(gauges, 0, 48, 0, 0, 16, 6, 1, 6);
- battleRes.ikariGauge = &ikariGauge;
-
- SDL_Surface *selectFrameImg(IMG_Load("test-data/select-frame.png"));
- 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, 0, -2);
- battleRes.normalFont = &normalFont;
-
- SDL_Surface *disabledFontImg(IMG_Load("test-data/disabled-font.png"));
- Sprite disabledFontSprite(disabledFontImg, 16, 16);
- Font disabledFont(&disabledFontSprite, 0, -2);
- battleRes.disabledFont = &disabledFont;
-
- SDL_Surface *handCursorImg(IMG_Load("test-data/cursor-hand.png"));
- Sprite handCursorSprite(handCursorImg, 32, 32);
- battleRes.menuCursor = &handCursorSprite;
-
- SDL_Surface *targetingIconsImg(IMG_Load("test-data/targeting-icons.png"));
- Sprite weaponTargetCursor(targetingIconsImg, 32, 32);
- Sprite magicTargetCursor(targetingIconsImg, 32, 32, 0, 32);
- Sprite itemTargetCursor(targetingIconsImg, 32, 32, 0, 64);
- battleRes.weaponTargetCursor = &weaponTargetCursor;
- battleRes.magicTargetCursor = &magicTargetCursor;
- battleRes.itemTargetCursor = &itemTargetCursor;
+ battleRes.healthGauge = intp.GetGauge("healthGauge");
+ battleRes.manaGauge = intp.GetGauge("manaGauge");
+ battleRes.ikariGauge = intp.GetGauge("ikariGauge");
+
+ battleRes.selectFrame = intp.GetFrame("selectFrame");
+ battleRes.normalFont = intp.GetFont("normalFont");
+ battleRes.disabledFont = intp.GetFont("disabledFont");
+ battleRes.menuCursor = intp.GetSprite("handCursor");
+
+ battleRes.weaponTargetCursor = intp.GetSprite("weaponTargetCursor");
+ battleRes.magicTargetCursor = intp.GetSprite("magicTargetCursor");
+ battleRes.itemTargetCursor = intp.GetSprite("itemTargetCursor");
Spell resetSpell;
resetSpell.SetName("Reset");
selan.AddSpell(&valorSpell);
battleRes.spellMenuHeadline = "Please choose a spell.";
- battleRes.spellMenuPrototype = Menu<const Spell *>(&normalFont, &disabledFont, &handCursorSprite, 9, 6, 8, 0, 2, 32, 2, ':');
+ battleRes.spellMenuPrototype = Menu<const Spell *>(intp.GetFont("normalFont"), intp.GetFont("disabledFont"), intp.GetSprite("handCursor"), 9, 6, 8, 0, 2, 32, 2, ':');
SDL_Surface *itemIcons(IMG_Load("test-data/item-icons.png"));
Sprite potionIcon(itemIcons, 16, 16);
battleRes.inventory = &inventory;
battleRes.itemMenuHeadline = "Please choose an item.";
- battleRes.itemMenuPrototype = Menu<const common::Item *>(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 16, 1, 32, 2, ':');
+ battleRes.itemMenuPrototype = Menu<const common::Item *>(intp.GetFont("normalFont"), intp.GetFont("disabledFont"), intp.GetSprite("handCursor"), 15, 6, 8, 16, 1, 32, 2, ':');
SDL_Surface *swordAttackImg(IMG_Load("test-data/attack-sword.png"));
Sprite swordAttackSprite(swordAttackImg, 96, 96);
battleRes.ikariMenuHeadline = "Please choose equipment.";
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.ikariMenuPrototype = Menu<const Item *>(intp.GetFont("normalFont"), intp.GetFont("disabledFont"), intp.GetSprite("handCursor"), 12, 6, intp.GetFont("normalFont")->CharHeight() / 2, intp.GetFont("normalFont")->CharWidth(), 1, intp.GetFont("normalFont")->CharWidth() * 2, 0, ':', 12, intp.GetFont("normalFont")->CharWidth());
battleRes.escapeText = "Escapes.";
image: "test-data/small-tag-frame.png",
border: <8,16>,
offset: <0,33>
-}
\ No newline at end of file
+}
+
+export Gauge healthGauge {
+ image: "test-data/gauges.png",
+ full: <0,16>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+}
+export Gauge manaGauge {
+ image: "test-data/gauges.png",
+ full: <0,32>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+}
+export Gauge ikariGauge {
+ image: "test-data/gauges.png",
+ full: <0,48>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+}
+
+export Frame selectFrame {
+ image: "test-data/select-frame.png",
+ border: <16,16>
+}
+export Font normalFont {
+ sprite: Sprite {
+ image: "test-data/normal-font.png",
+ size: <16,16>
+ },
+ rowoffset: -2
+}
+export Font disabledFont {
+ sprite: Sprite {
+ image: "test-data/disabled-font.png",
+ size: <16,16>
+ },
+ rowoffset: -2
+}
+export Sprite handCursor {
+ image: "test-data/cursor-hand.png",
+ size: <32,32>
+}
+
+export Sprite weaponTargetCursor {
+ image: "test-data/targeting-icons.png",
+ size: <32,32>
+}
+export Sprite magicTargetCursor {
+ image: "test-data/targeting-icons.png",
+ size: <32,32>,
+ offset: <0,32>
+}
+export Sprite itemTargetCursor {
+ image: "test-data/targeting-icons.png",
+ size: <32,32>,
+ offset: <0,64>
+}