]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
fix bug in select attack type state that caused the tag positioning to go nuts
[l2e.git] / src / main.cpp
index cd76905d55b1371a02152d8248454c7996514cb0..5e14001b8454e922348c7260ffd7bbdec9b1e95b 100644 (file)
@@ -78,6 +78,8 @@ int main(int argc, char **argv) {
                Sprite dummySprite(monsterImg, 64, 64);
                Monster monster;
                monster.SetSprite(&dummySprite);
+               monster.SetMaxHealth(10);
+               monster.SetHealth(10);
 
                SDL_Surface *maximImg(IMG_Load("test-data/maxim.png"));
                Sprite maximSprite(maximImg, 64, 64);
@@ -193,6 +195,14 @@ int main(int argc, char **argv) {
                Sprite handCursorSprite(handCursorImg, 32, 32);
                battleRes.menuCursor = &handCursorSprite;
 
+               SDL_Surface *targetingIconsImg(IMG_Load("test-data/targeting-icons.png"));
+               Sprite weaponTargetCursor(targetingIconsImg, 32, 32);
+               battleRes.weaponTargetCursor = &weaponTargetCursor;
+               // TODO: add image for magic targeting cursor
+               battleRes.magicTargetCursor = &weaponTargetCursor;
+               // TODO: add image for item targeting cursor
+               battleRes.itemTargetCursor = &weaponTargetCursor;
+
                battleRes.spellMenuHeadline = "Please choose a spell.";
                battleRes.spellMenuPrototype = Menu</* Spell */ void *>(&normalFont, &disabledFont, &handCursorSprite, 12, 6, 8, 0, 2, 32);
                battleRes.spellMenuPrototype.Add("Reset    : 0", 0, false);
@@ -264,7 +274,7 @@ int main(int argc, char **argv) {
                battleRes.inventory = &inventory;
 
                battleRes.itemMenuHeadline = "Please choose an item.";
-               battleRes.itemMenuPrototype = Menu<const common::Item *>(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 16, 1, 32);
+               battleRes.itemMenuPrototype = Menu<const common::Item *>(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 16, 1, 32, 2, ':');
 
                battleRes.ikariMenuHeadline = "Please choose equipment.";
                battleRes.ikariMenuPrototype = Menu</* Item */ void *>(&normalFont, &disabledFont, &handCursorSprite, 26, 6, 8, 16, 1, 32);