#include "../battle/Hero.h"
#include "../battle/Monster.h"
#include "../battle/PartyLayout.h"
+#include "../battle/Resources.h"
#include "../common/Ikari.h"
#include "../common/Item.h"
#include "../common/Spell.h"
namespace loader {
Interpreter::~Interpreter() {
+ for (vector<battle::Resources *>::const_iterator i(battleResources.begin()), end(battleResources.end()); i != end; ++i) {
+ delete *i;
+ }
for (vector<ComplexAnimation *>::const_iterator i(complexAnimations.begin()), end(complexAnimations.end()); i != end; ++i) {
delete *i;
}
}
}
+battle::Resources *Interpreter::GetBattleResources(const std::string &name) {
+ map<string, ParsedDefinition>::const_iterator i(parsedDefinitions.find(name));
+ if (i != parsedDefinitions.end()) {
+ if (i->second.type == BATTLE_RESOURCES) {
+ return battleResources[i->second.index];
+ } else {
+ throw Error("cannot cast " + i->second.dfn->TypeName() + " to BattleResources");
+ }
+ } else {
+ throw Error("access to undefined BattleResources " + name);
+ }
+}
+
bool Interpreter::GetBoolean(const std::string &name) const {
map<string, ParsedDefinition>::const_iterator i(parsedDefinitions.find(name));
if (i != parsedDefinitions.end()) {
}
}
+battle::Resources *Interpreter::GetBattleResources(const Value &v) {
+ if (v.IsLiteral()) {
+ battle::Resources *r(new battle::Resources);
+ ReadBattleResources(*r, *v.GetLiteral().GetProperties());
+ return r;
+ } else {
+ ReadDefinition(source.GetDefinition(v.GetIdentifier()));
+ return GetBattleResources(v.GetIdentifier());
+ }
+}
+
bool Interpreter::GetBoolean(const Value &v) {
if (v.IsLiteral()) {
return v.GetLiteral().GetBoolean();
void Interpreter::ReadObject(const Definition &dfn) {
- if (dfn.TypeName() == "ComplexAnimation") {
+ if (dfn.TypeName() == "BattleResources") {
+ battle::Resources *res(new battle::Resources);
+ int index(battleResources.size());
+ battleResources.push_back(res);
+ ReadBattleResources(*res, *dfn.GetProperties());
+ parsedDefinitions.insert(make_pair(dfn.Identifier(), ParsedDefinition(&dfn, BATTLE_RESOURCES, index)));
+ } else if (dfn.TypeName() == "ComplexAnimation") {
ComplexAnimation *animation(new ComplexAnimation);
int index(complexAnimations.size());
complexAnimations.push_back(animation);
}
+void Interpreter::ReadBattleResources(battle::Resources &res, const PropertyList &props) {
+ for (PropertyList::ConstIterator i(props.Begin()), end(props.End()); i != end; ++i) {
+ if (i->first == "swapCursor") {
+ res.swapCursor = GetSprite(*i->second);
+ } else if (i->first == "moveIcons") {
+ res.moveIcons = GetSprite(*i->second);
+ } else if (i->first == "attackIcons") {
+ res.attackIcons = GetSprite(*i->second);
+ } else if (i->first == "attackChoiceIcons") {
+ res.attackChoiceIcons = GetSprite(*i->second);
+ } else if (i->first == "titleFrame") {
+ res.titleFrame = GetFrame(*i->second);
+ } else if (i->first == "titleFont") {
+ res.titleFont = GetFont(*i->second);
+ } else if (i->first == "heroTagFrame") {
+ res.heroTagFrame = GetFrame(*i->second);
+ } else if (i->first == "activeHeroTagFrame") {
+ res.activeHeroTagFrame = GetFrame(*i->second);
+ } else if (i->first == "smallHeroTagFrame") {
+ res.smallHeroTagFrame = GetFrame(*i->second);
+ } else if (i->first == "lastSmallHeroTagFrame") {
+ res.lastSmallHeroTagFrame = GetFrame(*i->second);
+ } else if (i->first == "heroTagFont") {
+ res.heroTagFont = GetFont(*i->second);
+ } else if (i->first == "heroTagLabels") {
+ res.heroTagLabels = GetSprite(*i->second);
+ } else if (i->first == "healthGauge") {
+ res.healthGauge = GetGauge(*i->second);
+ } else if (i->first == "manaGauge") {
+ res.manaGauge = GetGauge(*i->second);
+ } else if (i->first == "ikariGauge") {
+ res.ikariGauge = GetGauge(*i->second);
+ } else if (i->first == "selectFrame") {
+ res.selectFrame = GetFrame(*i->second);
+ } else if (i->first == "normalFont") {
+ res.normalFont = GetFont(*i->second);
+ } else if (i->first == "disabledFont") {
+ res.disabledFont = GetFont(*i->second);
+ } else if (i->first == "menuCursor") {
+ res.menuCursor = GetSprite(*i->second);
+ } else if (i->first == "weaponTargetCursor") {
+ res.weaponTargetCursor = GetSprite(*i->second);
+ } else if (i->first == "magicTargetCursor") {
+ res.magicTargetCursor = GetSprite(*i->second);
+ } else if (i->first == "itemTargetCursor") {
+ res.itemTargetCursor = GetSprite(*i->second);
+ } else if (i->first == "spellMenuHeadline") {
+ res.spellMenuHeadline = GetString(*i->second);
+ } else if (i->first == "spellMenuProperties") {
+ res.spellMenuProperties = GetMenuProperties(*i->second);
+ } else if (i->first == "itemMenuHeadline") {
+ res.itemMenuHeadline = GetString(*i->second);
+ } else if (i->first == "itemMenuProperties") {
+ res.itemMenuProperties = GetMenuProperties(*i->second);
+ } else if (i->first == "ikariMenuHeadline") {
+ res.ikariMenuHeadline = GetString(*i->second);
+ } else if (i->first == "ikariMenuProperties") {
+ res.ikariMenuProperties = GetMenuProperties(*i->second);
+ } else if (i->first == "noEquipmentText") {
+ res.noEquipmentText = GetString(*i->second);
+ } else if (i->first == "escapeText") {
+ res.escapeText = GetString(*i->second);
+ } else if (i->first == "numberAnimationPrototype") {
+ res.numberAnimationPrototype = GetAnimation(*i->second);
+ } else if (i->first == "bigNumberSprite") {
+ res.bigNumberSprite = GetSprite(*i->second);
+ } else if (i->first == "greenNumberSprite") {
+ res.greenNumberSprite = GetSprite(*i->second);
+ } else if (i->first == "weaponMenuIcon") {
+ res.weaponMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "armorMenuIcon") {
+ res.armorMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "shieldMenuIcon") {
+ res.shieldMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "helmetMenuIcon") {
+ res.helmetMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "ringMenuIcon") {
+ res.ringMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "jewelMenuIcon") {
+ res.jewelMenuIcon = GetSprite(*i->second);
+ } else if (i->first == "levelLabelCol") {
+ res.levelLabelCol = GetNumber(*i->second);
+ } else if (i->first == "levelLabelRow") {
+ res.levelLabelRow = GetNumber(*i->second);
+ } else if (i->first == "healthLabelCol") {
+ res.healthLabelCol = GetNumber(*i->second);
+ } else if (i->first == "healthLabelRow") {
+ res.healthLabelRow = GetNumber(*i->second);
+ } else if (i->first == "manaLabelCol") {
+ res.manaLabelCol = GetNumber(*i->second);
+ } else if (i->first == "manaLabelRow") {
+ res.manaLabelRow = GetNumber(*i->second);
+ } else if (i->first == "moveLabelCol") {
+ res.moveLabelCol = GetNumber(*i->second);
+ } else if (i->first == "moveLabelRow") {
+ res.moveLabelRow = GetNumber(*i->second);
+ } else if (i->first == "ikariLabelCol") {
+ res.ikariLabelCol = GetNumber(*i->second);
+ } else if (i->first == "ikariLabelRow") {
+ res.ikariLabelRow = GetNumber(*i->second);
+ } else if (i->first == "heroesBgColor") {
+ res.heroesBgColor = GetColor(*i->second);
+ } else {
+ throw Error("unknown BattleResources property: " + i->first);
+ }
+ }
+}
+
void Interpreter::ReadComplexAnimation(ComplexAnimation &a, const PropertyList &props) {
for (PropertyList::ConstIterator i(props.Begin()), end(props.End()); i != end; ++i) {
if (i->first == "sprite") {
Hero guy(*intp.GetHero("guy"));
Hero dekar(*intp.GetHero("dekar"));
- battle::Resources battleRes;
-
- battleRes.swapCursor = intp.GetSprite("swapCursor");
- battleRes.attackIcons = intp.GetSprite("attackIcons");
- battleRes.attackChoiceIcons = intp.GetSprite("attackChoiceIcons");
- battleRes.moveIcons = intp.GetSprite("moveIcons");
- 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");
-
- battleRes.heroTagLabels = intp.GetSprite("heroTagLabels");
- battleRes.levelLabelCol = 0;
- battleRes.levelLabelRow = 0;
- battleRes.healthLabelCol = 0;
- battleRes.healthLabelRow = 1;
- battleRes.manaLabelCol = 0;
- battleRes.manaLabelRow = 2;
- battleRes.moveLabelCol = 0;
- battleRes.moveLabelRow = 3;
- battleRes.ikariLabelCol = 0;
- battleRes.ikariLabelRow = 4;
-
- 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 = intp.GetColor("heroesBgColor");
-
- 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");
+ battle::Resources *battleRes(intp.GetBattleResources("battleResources"));
maxim.AddSpell(intp.GetSpell("resetSpell"));
Spell *strongSpell(intp.GetSpell("strongSpell"));
maxim.AddSpell(valorSpell);
selan.AddSpell(valorSpell);
- battleRes.spellMenuHeadline = intp.GetString("spellMenuHeadline");
- battleRes.spellMenuProperties = intp.GetMenuProperties("spellMenuPrototype");
-
- battleRes.weaponMenuIcon = intp.GetSprite("swordIcon");
- battleRes.armorMenuIcon = intp.GetSprite("armorIcon");
- battleRes.shieldMenuIcon = intp.GetSprite("shieldIcon");
- battleRes.helmetMenuIcon = intp.GetSprite("helmetIcon");
- battleRes.ringMenuIcon = intp.GetSprite("ringIcon");
- battleRes.jewelMenuIcon = intp.GetSprite("jewelIcon");
-
Inventory inventory;
inventory.Add(intp.GetItem("antidoteItem"), 9);
inventory.Add(intp.GetItem("magicJarItem"), 4);
inventory.Add(intp.GetItem("powerPotionItem"), 4);
inventory.Add(intp.GetItem("escapeItem"), 2);
inventory.Add(intp.GetItem("sleepBallItem"), 1);
- battleRes.inventory = &inventory;
-
- battleRes.itemMenuHeadline = intp.GetString("itemMenuHeadline");
- battleRes.itemMenuProperties = intp.GetMenuProperties("itemMenuPrototype");
+ battleRes->inventory = &inventory;
maxim.SetWeapon(intp.GetItem("zircoSwordItem"));
maxim.SetArmor(intp.GetItem("zirconArmorItem"));
dekar.SetRing(intp.GetItem("rocketRingItem"));
dekar.SetJewel(intp.GetItem("krakenRockItem"));
- battleRes.ikariMenuHeadline = intp.GetString("ikariMenuHeadline");
- battleRes.noEquipmentText = intp.GetString("noEquipmentText");
- battleRes.ikariMenuProperties = intp.GetMenuProperties("ikariMenuPrototype");
- battleRes.escapeText = intp.GetString("escapeText");
-
- BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes));
+ BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, battleRes));
battleState->AddMonster(monster);
battleState->AddMonster(monster);
battleState->AddMonster(monster);
}
}
-export Sprite swapCursor {
- image: :"swap-cursor.png",
- size: <32,32>
-}
-export Sprite attackIcons {
- image: :"attack-type-icons.png",
- size: <32,32>
-}
-export Sprite attackChoiceIcons {
- image: :"attack-choice-icons.png",
- size: <16,16>
-}
-export Sprite moveIcons {
- image: :"move-icons.png",
+Sprite handCursor {
+ image: :"cursor-hand.png",
size: <32,32>
}
-export Frame titleFrame {
- image: :"title-frame.png",
- border: <16,16>
-}
-
-export Font largeFont {
- sprite: Sprite {
- image: :"large-font.png",
- size: <16,32>
- },
- rowoffset: -2
-}
-
-export ComplexAnimation numberAnimationPrototype {
- frametime: frameTime,
- repeat: false,
- frames: [
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0,-26> },
- { column: 0, row: 0, disposition: < 0,-42> },
- { column: 0, row: 0, disposition: < 0,-48> },
- { column: 0, row: 0, disposition: < 0,-42> },
- { column: 0, row: 0, disposition: < 0,-26> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0,-12> },
- { column: 0, row: 0, disposition: < 0,-20> },
- { column: 0, row: 0, disposition: < 0,-24> },
- { column: 0, row: 0, disposition: < 0,-20> },
- { column: 0, row: 0, disposition: < 0,-12> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, -6> },
- { column: 0, row: 0, disposition: < 0,-10> },
- { column: 0, row: 0, disposition: < 0,-12> },
- { column: 0, row: 0, disposition: < 0,-10> },
- { column: 0, row: 0, disposition: < 0, -6> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0, 0> },
- { column: 0, row: 0, disposition: < 0,-36> },
- { column: 0, row: 0, disposition: < 0,-32> },
- { column: 0, row: 0, disposition: < 0,-18> }
- ]
-}
-export Sprite bigNumbers {
- image: :"big-numbers.png",
- size: <16,32>
-}
-export Sprite bigGreenNumbers {
- image: :"big-green-numbers.png",
- size: <16,32>
-}
-
-export Sprite heroTagLabels {
- image: :"hero-tag-sprites.png",
- size: <32,16>
-}
-export Font heroTagFont {
- sprite: Sprite {
- image: :"numbers.png",
- size: <16,16>
- },
- rowoffset: -3
-}
-
-export Frame activeHeroTagFrame {
- image: :"tag-frames.png",
- border: <16,16>
-}
-export Frame heroTagFrame {
- image: :"tag-frames.png",
- border: <16,16>,
- offset: < 0,33>
-}
-
-export Frame smallHeroTagFrame {
- image: :"small-tag-frame.png",
- border: <8,16>
-}
-export Frame lastSmallHeroTagFrame {
- image: :"small-tag-frame.png",
- border: <8,16>,
- offset: <0,33>
-}
-export Color heroesBgColor (24, 40, 49)
-
-export Gauge healthGauge {
- image: :"gauges.png",
- full: <0,16>,
- empty: <0, 0>,
- height: 16,
- start: 6,
- repeat: 1,
- end: 6
-}
-export Gauge manaGauge {
- image: :"gauges.png",
- full: <0,32>,
- empty: <0, 0>,
- height: 16,
- start: 6,
- repeat: 1,
- end: 6
-}
-export Gauge ikariGauge {
- image: :"gauges.png",
- full: <0,48>,
- empty: <0, 0>,
- height: 16,
- start: 6,
- repeat: 1,
- end: 6
-}
-
-export Frame selectFrame {
- image: :"select-frame.png",
- border: <16,16>
-}
-export Font normalFont {
+Font normalFont {
sprite: Sprite {
image: :"normal-font.png",
size: <16,16>
},
rowoffset: -2
}
-export Font disabledFont {
+
+Font disabledFont {
sprite: Sprite {
image: :"disabled-font.png",
size: <16,16>
},
rowoffset: -2
}
-export Sprite handCursor {
- image: :"cursor-hand.png",
- size: <32,32>
-}
-
-export Sprite weaponTargetCursor {
- image: :"targeting-icons.png",
- size: <32,32>
-}
-export Sprite magicTargetCursor {
- image: :"targeting-icons.png",
- size: <32,32>,
- offset: <0,32>
-}
-export Sprite itemTargetCursor {
- image: :"targeting-icons.png",
- size: <32,32>,
- offset: <0,64>
-}
-export String spellMenuHeadline "Please choose a spell."
-export MenuProperties spellMenuPrototype {
- font: normalFont,
- disabledFont: disabledFont,
- cursor: handCursor,
- charsPerEntry: 9,
- rows: 6,
- rowGap: 8,
- iconSpace: 0,
- cols: 2,
- colGap: 32,
- charsPerNumber: 2,
- delimiter: ":"
-}
-
-export String itemMenuHeadline "Please choose an item."
-export MenuProperties itemMenuPrototype {
- font: normalFont,
- disabledFont: disabledFont,
- cursor: handCursor,
- charsPerEntry: 15,
- rows: 6,
- rowGap: 8,
- iconSpace: 16,
- cols: 1,
- colGap: 32,
- charsPerNumber: 2,
- delimiter: ":"
-}
-
-export String ikariMenuHeadline "Please choose equipment."
-export MenuProperties ikariMenuPrototype {
- font: normalFont,
+export BattleResources battleResources {
+ swapCursor: Sprite {
+ image: :"swap-cursor.png",
+ size: <32,32>
+ },
+ attackIcons: Sprite {
+ image: :"attack-type-icons.png",
+ size: <32,32>
+ },
+ attackChoiceIcons: Sprite {
+ image: :"attack-choice-icons.png",
+ size: <16,16>
+ },
+ moveIcons: Sprite {
+ image: :"move-icons.png",
+ size: <32,32>
+ },
+
+ titleFrame: Frame {
+ image: :"title-frame.png",
+ border: <16,16>
+ },
+ titleFont: Font {
+ sprite: Sprite {
+ image: :"large-font.png",
+ size: <16,32>
+ },
+ rowoffset: -2
+ },
+
+ numberAnimationPrototype: ComplexAnimation {
+ frametime: frameTime,
+ repeat: false,
+ frames: [
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-26> },
+ { column: 0, row: 0, disposition: < 0,-42> },
+ { column: 0, row: 0, disposition: < 0,-48> },
+ { column: 0, row: 0, disposition: < 0,-42> },
+ { column: 0, row: 0, disposition: < 0,-26> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0,-20> },
+ { column: 0, row: 0, disposition: < 0,-24> },
+ { column: 0, row: 0, disposition: < 0,-20> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, -6> },
+ { column: 0, row: 0, disposition: < 0,-10> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0,-10> },
+ { column: 0, row: 0, disposition: < 0, -6> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-36> },
+ { column: 0, row: 0, disposition: < 0,-32> },
+ { column: 0, row: 0, disposition: < 0,-18> }
+ ]
+ },
+ bigNumberSprite: Sprite {
+ image: :"big-numbers.png",
+ size: <16,32>
+ },
+ greenNumberSprite: Sprite {
+ image: :"big-green-numbers.png",
+ size: <16,32>
+ },
+
+ heroTagLabels: Sprite {
+ image: :"hero-tag-sprites.png",
+ size: <32,16>
+ },
+ levelLabelCol: 0,
+ levelLabelRow: 0,
+ healthLabelCol: 0,
+ healthLabelRow: 1,
+ manaLabelCol: 0,
+ manaLabelRow: 2,
+ moveLabelCol: 0,
+ moveLabelRow: 3,
+ ikariLabelCol: 0,
+ ikariLabelRow: 4,
+ heroTagFont: Font {
+ sprite: Sprite {
+ image: :"numbers.png",
+ size: <16,16>
+ },
+ rowoffset: -3
+ },
+
+ activeHeroTagFrame: Frame {
+ image: :"tag-frames.png",
+ border: <16,16>
+ },
+ heroTagFrame: Frame {
+ image: :"tag-frames.png",
+ border: <16,16>,
+ offset: < 0,33>
+ },
+
+ smallHeroTagFrame: Frame {
+ image: :"small-tag-frame.png",
+ border: <8,16>
+ },
+ lastSmallHeroTagFrame: Frame {
+ image: :"small-tag-frame.png",
+ border: <8,16>,
+ offset: <0,33>
+ },
+ heroesBgColor: (24, 40, 49),
+
+ healthGauge: Gauge {
+ image: :"gauges.png",
+ full: <0,16>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+ },
+ manaGauge: Gauge {
+ image: :"gauges.png",
+ full: <0,32>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+ },
+ ikariGauge: Gauge {
+ image: :"gauges.png",
+ full: <0,48>,
+ empty: <0, 0>,
+ height: 16,
+ start: 6,
+ repeat: 1,
+ end: 6
+ },
+
+ selectFrame: Frame {
+ image: :"select-frame.png",
+ border: <16,16>
+ },
+ normalFont: normalFont,
disabledFont: disabledFont,
- cursor: handCursor,
- charsPerEntry: 12,
- rows: 6,
- rowGap: 8,
- iconSpace: 16,
- cols: 1,
- colGap: 32,
- charsPerAdditionalText: 12,
- additionalTextGap: 16
-}
-export String noEquipmentText "No equip"
-
-export String escapeText "Escapes."
+ menuCursor: Sprite {
+ image: :"cursor-hand.png",
+ size: <32,32>
+ },
+
+ weaponTargetCursor: Sprite {
+ image: :"targeting-icons.png",
+ size: <32,32>
+ },
+ magicTargetCursor: Sprite {
+ image: :"targeting-icons.png",
+ size: <32,32>,
+ offset: <0,32>
+ },
+ itemTargetCursor: Sprite {
+ image: :"targeting-icons.png",
+ size: <32,32>,
+ offset: <0,64>
+ },
+
+ weaponMenuIcon: swordIcon,
+ armorMenuIcon: armorIcon,
+ shieldMenuIcon: shieldIcon,
+ helmetMenuIcon: helmetIcon,
+ ringMenuIcon: ringIcon,
+ jewelMenuIcon: jewelIcon,
+
+ spellMenuHeadline: "Please choose a spell.",
+ spellMenuProperties: MenuProperties {
+ font: normalFont,
+ disabledFont: disabledFont,
+ cursor: handCursor,
+ charsPerEntry: 9,
+ rows: 6,
+ rowGap: 8,
+ iconSpace: 0,
+ cols: 2,
+ colGap: 32,
+ charsPerNumber: 2,
+ delimiter: ":"
+ },
+
+ itemMenuHeadline: "Please choose an item.",
+ itemMenuProperties: MenuProperties {
+ font: normalFont,
+ disabledFont: disabledFont,
+ cursor: handCursor,
+ charsPerEntry: 15,
+ rows: 6,
+ rowGap: 8,
+ iconSpace: 16,
+ cols: 1,
+ colGap: 32,
+ charsPerNumber: 2,
+ delimiter: ":"
+ },
+
+ ikariMenuHeadline: "Please choose equipment.",
+ ikariMenuProperties: MenuProperties {
+ font: normalFont,
+ disabledFont: disabledFont,
+ cursor: handCursor,
+ charsPerEntry: 12,
+ rows: 6,
+ rowGap: 8,
+ iconSpace: 16,
+ cols: 1,
+ colGap: 32,
+ charsPerAdditionalText: 12,
+ additionalTextGap: 16
+ },
+ noEquipmentText: "No equip",
+
+ escapeText: "Escapes."
+}
\ No newline at end of file