#include "geometry/Vector.h"
#include "graphics/ComplexAnimation.h"
#include "graphics/Font.h"
#include "geometry/Vector.h"
#include "graphics/ComplexAnimation.h"
#include "graphics/Font.h"
#include "graphics/Menu.h"
#include "graphics/SimpleAnimation.h"
#include "graphics/Sprite.h"
#include "graphics/Menu.h"
#include "graphics/SimpleAnimation.h"
#include "graphics/Sprite.h"
InitSDL sdl;
InitImage image(IMG_INIT_PNG);
InitScreen screen(width, height);
InitSDL sdl;
InitImage image(IMG_INIT_PNG);
InitScreen screen(width, height);
- monstersLayout.AddPosition(Point<Uint8>(88, 88));
- monstersLayout.AddPosition(Point<Uint8>(128, 88));
- monstersLayout.AddPosition(Point<Uint8>(168, 88));
- monstersLayout.AddPosition(Point<Uint8>(208, 88));
+ monstersLayout.AddPosition(Vector<Uint8>(88, 88));
+ monstersLayout.AddPosition(Vector<Uint8>(128, 88));
+ monstersLayout.AddPosition(Vector<Uint8>(168, 88));
+ monstersLayout.AddPosition(Vector<Uint8>(208, 88));
- heroesLayout.AddPosition(Point<Uint8>(48, 136));
- heroesLayout.AddPosition(Point<Uint8>(128, 136));
- heroesLayout.AddPosition(Point<Uint8>(80, 152));
- heroesLayout.AddPosition(Point<Uint8>(160, 152));
+ heroesLayout.AddPosition(Vector<Uint8>(48, 136));
+ heroesLayout.AddPosition(Vector<Uint8>(128, 136));
+ heroesLayout.AddPosition(Vector<Uint8>(80, 152));
+ heroesLayout.AddPosition(Vector<Uint8>(160, 152));
SDL_Surface *monsterImg(IMG_Load("test-data/monster.png"));
Sprite monsterSprite(monsterImg, 64, 64);
SDL_Surface *monsterImg(IMG_Load("test-data/monster.png"));
Sprite monsterSprite(monsterImg, 64, 64);
maxim.SetIP(0);
maxim.SetStats(Stats(28, 22, 28, 17, 14, 100, 10));
ComplexAnimation maximAttackAnimation(&maximSprite, framerate);
maxim.SetIP(0);
maxim.SetStats(Stats(28, 22, 28, 17, 14, 100, 10));
ComplexAnimation maximAttackAnimation(&maximSprite, framerate);
- // TODO: cross check double frames; could be related to differences in framerates
- maximAttackAnimation.AddFrames(1, 0, Vector<int>(0, 0), 7); // TODO: maybe this could also be a pause before the battle animation
+ maximAttackAnimation.AddFrames(1, 0, Vector<int>(0, 0), 7);
maximAttackAnimation.AddFrames(1, 0, Vector<int>(4, -1), 2);
maximAttackAnimation.AddFrames(2, 0, Vector<int>(4, -2), 2);
maximAttackAnimation.AddFrames(2, 0, Vector<int>(6, -2), 2);
maximAttackAnimation.AddFrames(1, 0, Vector<int>(4, -1), 2);
maximAttackAnimation.AddFrames(2, 0, Vector<int>(4, -2), 2);
maximAttackAnimation.AddFrames(2, 0, Vector<int>(6, -2), 2);
maximAttackAnimation.AddFrames(2, 1, Vector<int>(0, 0), 1);
maximAttackAnimation.AddFrames(2, 2, Vector<int>(0, 0), 2);
maximAttackAnimation.AddFrames(2, 2, Vector<int>(2, 0), 1);
maximAttackAnimation.AddFrames(2, 1, Vector<int>(0, 0), 1);
maximAttackAnimation.AddFrames(2, 2, Vector<int>(0, 0), 2);
maximAttackAnimation.AddFrames(2, 2, Vector<int>(2, 0), 1);
- maximAttackAnimation.AddFrames(1, 0, Vector<int>(0, 0), 7); // TODO: maybe this could also be a pause between two animations
+ maximAttackAnimation.AddFrames(1, 0, Vector<int>(0, 0), 7);
maxim.SetAttackAnimation(&maximAttackAnimation);
ComplexAnimation maximSpellAnimation(&maximSprite, 5 * framerate);
maximSpellAnimation.AddFrames(3, 0, Vector<int>(), 2);
maxim.SetAttackAnimation(&maximAttackAnimation);
ComplexAnimation maximSpellAnimation(&maximSprite, 5 * framerate);
maximSpellAnimation.AddFrames(3, 0, Vector<int>(), 2);
ironBarrier.SetMagical();
megaShield.SetIkari(&ironBarrier);
guy.SetShield(&megaShield);
ironBarrier.SetMagical();
megaShield.SetIkari(&ironBarrier);
guy.SetShield(&megaShield);