X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=1781e5fdc9b1b60b7e68b5bbe5bb749670a43fed;hb=c6156f6b3dc88a97a78694a2652dfbc874fcc8e4;hp=987a985cc74083e76a29953a357b490ea12947fe;hpb=9d5e525f2bd9035e9add815e287313d09c1bf0fd;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 987a985..1781e5f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -89,15 +89,20 @@ int main(int argc, char **argv) { heroesLayout.AddPosition(Point(160, 152)); SDL_Surface *monsterImg(IMG_Load("test-data/monster.png")); - Sprite dummySprite(monsterImg, 64, 64); + Sprite monsterSprite(monsterImg, 64, 64); Monster monster; monster.SetName("Lizard"); - monster.SetSprite(&dummySprite); + monster.SetSprite(&monsterSprite); monster.SetLevel(1); monster.SetMaxHealth(8); monster.SetHealth(8); monster.SetStats(Stats(14, 6, 6, 6, 6, 6, 6)); monster.SetReward(3, 5); + ComplexAnimation monsterAttackAnimation(&monsterSprite, 120); + monsterAttackAnimation.AddFrame(0, 1, Vector(16, 0)); + monsterAttackAnimation.AddFrame(0, 0, Vector(16, 0)); + monsterAttackAnimation.AddFrame(0, 1, Vector(16, 0)); + monster.SetAttackAnimation(&monsterAttackAnimation); SDL_Surface *maximImg(IMG_Load("test-data/maxim.png")); Sprite maximSprite(maximImg, 64, 64);