push 98438d20051787465e7a05f4aa66ab452afb1c14
[tagua/yd.git] / src / variants / chess / animator.h
blobc36143523f7328ddaf4b32dd0f0347afceffa6ef
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 */
10 #ifndef CHESS__ANIMATOR_H
11 #define CHESS__ANIMATOR_H
13 #include <core/baseanimator.h>
15 class NamedSprite;
16 class Piece;
18 namespace Chess {
20 class Animator : public BaseAnimator {
21 Q_OBJECT
22 IWarper* m_warper;
23 protected Q_SLOTS:
24 AnimationPtr movement(const NamedSprite& sprite, const Move& move) const;
25 public:
26 Animator(TaguaAPI* api, const INamer* namer);
28 void setWarper(IWarper* warper);
29 virtual AnimationPtr forward(const Move& move, const IState* state);
30 virtual AnimationPtr back(const Move& move, const IState* state);
33 class AnimatorFactory : public Component, public IAnimatorFactory {
34 Q_OBJECT
35 public:
36 virtual IAnimator* create(TaguaAPI* api, const INamer* namer) const;
39 } // namespace Chess
41 #endif // CHESS__ANIMATOR_H