X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain.cpp;h=d4444256f5d12f890541826411a1142c8144cff1;hb=113686335aed9484836f5034df5d886430d47095;hp=6f637a7f625cd1c943d121d947d11ca60a8a3f9f;hpb=fd987cc573ec47aa134b3bad46aa6ced9c6b6074;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 6f637a7..d444425 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -85,7 +85,6 @@ int main(int argc, char **argv) { ParsedSource source; Parser parser("test-data/test.l2s", source); parser.Parse(); - cout << source; Interpreter intp(source); intp.ReadSource(); @@ -106,41 +105,7 @@ int main(int argc, char **argv) { Monster monster(*intp.GetMonster("lizard")); Hero maxim(*intp.GetHero("maxim")); - - SDL_Surface *selanImg(IMG_Load("test-data/selan.png")); - Sprite selanSprite(selanImg, 64, 64); - Hero selan; - selan.SetName("Selan"); - selan.SetLevel(1); - selan.SetSprite(&selanSprite); - selan.SetMaxHealth(28); - selan.SetHealth(28); - selan.SetMaxMana(23); - selan.SetMana(23); - selan.SetIP(0); - selan.SetStats(Stats(23, 21, 23, 19, 22, 80, 13)); - ComplexAnimation selanAttackAnimation(&selanSprite, framerate); - selanAttackAnimation.AddFrames(1, 0, Vector(4, 0), 2); - selanAttackAnimation.AddFrame(1, 0, Vector(8, 2)); - selanAttackAnimation.AddFrame(2, 0, Vector(10, 4)); - selanAttackAnimation.AddFrame(2, 0, Vector(14, 4)); - selanAttackAnimation.AddFrames(2, 0, Vector(12, 2), 3); - selanAttackAnimation.AddFrames(2, 1, Vector(14, 2), 2); - selanAttackAnimation.AddFrame(2, 1, Vector(2, 0)); - selanAttackAnimation.AddFrame(2, 2, Vector(-2, -4)); - selanAttackAnimation.AddFrame(2, 2, Vector(-8, -8)); - selanAttackAnimation.AddFrame(2, 2); - selan.SetAttackAnimation(&selanAttackAnimation); - ComplexAnimation selanSpellAnimation(&selanSprite, framerate); - selanSpellAnimation.AddFrames(2, 0, Vector(), 3); - selanSpellAnimation.AddFrames(2, 1, Vector(), 2); - selanSpellAnimation.AddFrames(2, 2, Vector(), 3); - selanSpellAnimation.AddFrames(2, 3, Vector(), 2); - selan.SetSpellAnimation(&selanSpellAnimation); - SDL_Surface *selanMeleeImg(IMG_Load("test-data/melee-selan.png")); - Sprite selanMeleeSprite(selanMeleeImg, 96, 96); - SimpleAnimation selanMeleeAnimation(&selanMeleeSprite, 2 * framerate, 4); - selan.SetMeleeAnimation(&selanMeleeAnimation); + Hero selan(*intp.GetHero("selan")); SDL_Surface *guyImg(IMG_Load("test-data/guy.png")); Sprite guySprite(guyImg, 64, 64);