X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=eed7397ff548a4d65ce968dc4c07f37936ba8288;hb=e845e0acd0c097c84510499ebc17d74373db829f;hp=2901874172052e95fd7234e6787465b9777cf801;hpb=7cabfe225d70f2a7c0770fde3091e744fc0e4dd2;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 2901874..eed7397 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,8 @@ #include "sdl/InitScreen.h" #include "sdl/InitSDL.h" +#include +#include #include #include #include @@ -70,6 +72,8 @@ int main(int argc, char **argv) { const int framerate = 33; +// std::srand(std::time(0)); + try { InitSDL sdl; InitImage image(IMG_INIT_PNG); @@ -99,9 +103,9 @@ int main(int argc, char **argv) { monster.SetStats(Stats(14, 6, 6, 6, 6, 6, 6)); monster.SetReward(3, 5); ComplexAnimation monsterAttackAnimation(&monsterSprite, 4 * framerate); - monsterAttackAnimation.AddFrame(0, 1, Vector(16, 0)); - monsterAttackAnimation.AddFrame(0, 0, Vector(16, 0)); - monsterAttackAnimation.AddFrame(0, 1, Vector(16, 0)); + monsterAttackAnimation.AddFrame(0, 1, Vector(0, 16)); + monsterAttackAnimation.AddFrame(0, 0, Vector(0, 16)); + monsterAttackAnimation.AddFrame(0, 1, Vector(0, 16)); monster.SetAttackAnimation(&monsterAttackAnimation); SDL_Surface *monsterMeleeImg(IMG_Load("test-data/attack-monster.png")); Sprite monsterMeleeSprite(monsterMeleeImg, 96, 64); @@ -481,6 +485,7 @@ int main(int argc, char **argv) { Item zircoSword; zircoSword.SetName("Zirco sword"); zircoSword.SetMenuIcon(&swordIcon); + zircoSword.GetTargetingMode().TargetSingleEnemy(); Ikari firestorm; firestorm.SetName("Firestorm"); firestorm.SetCost(224); @@ -543,6 +548,7 @@ int main(int argc, char **argv) { Item zircoWhip; zircoWhip.SetName("Zirco whip"); zircoWhip.SetMenuIcon(&rodIcon); + zircoWhip.GetTargetingMode().TargetSingleEnemy(); Ikari thundershriek; thundershriek.SetName("Thundershriek"); thundershriek.SetCost(224); @@ -604,6 +610,7 @@ int main(int argc, char **argv) { Item zircoAx; zircoAx.SetName("Zirco ax"); zircoAx.SetMenuIcon(&axIcon); + zircoAx.GetTargetingMode().TargetSingleEnemy(); Ikari torrent; torrent.SetName("Torrent"); torrent.SetCost(224); @@ -648,6 +655,7 @@ int main(int argc, char **argv) { Item lizardBlow; lizardBlow.SetName("Lizard blow"); lizardBlow.SetMenuIcon(&swordIcon); + lizardBlow.GetTargetingMode().TargetSingleEnemy(); Ikari dragonRush; dragonRush.SetName("Dragon rush"); dragonRush.SetCost(164);