~shevonar/widelands/reworking-menus

« back to all changes in this revision

Viewing changes to src/graphic/animation_gfx.h

  • Committer: Shevonar
  • Date: 2013-01-15 23:15:22 UTC
  • mfrom: (6432.1.56 trunk)
  • Revision ID: infomh@anmaruco.de-20130115231522-782njbcagjo6olef
mergedĀ currentĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef ANIMATION_GFX_H
21
21
#define ANIMATION_GFX_H
22
22
 
 
23
class IImageLoader;
 
24
class IPicture;
 
25
 
23
26
#include "animation.h"
24
27
#include "logic/widelands.h"
25
 
#include "picture_id.h"
26
28
#include "rgbcolor.h"
27
29
 
28
30
struct AnimationGfx { /// The graphics belonging to an animation.
29
 
        AnimationGfx(AnimationData const * data);
 
31
        AnimationGfx(const IImageLoader&, AnimationData const * data);
30
32
        ~AnimationGfx();
31
33
 
32
34
        const Point get_hotspot() const throw () {return m_hotspot;}
33
 
        typedef std::vector<PictureID> Frames;
 
35
        typedef std::vector<IPicture* > Frames;
34
36
        typedef Frames::size_type Index;
35
37
        Index nr_frames() const
36
38
        {
37
39
                assert((*m_plrframes)[0]); return m_plrframes[0].size();
38
40
        }
39
41
 
40
 
        const PictureID & get_frame
 
42
        const IPicture* get_frame
41
43
                (Index                    const i,
42
44
                 Widelands::Player_Number const player_number,
43
45
                 const RGBColor & playercolor)
54
56
                return m_plrframes[player_number][i];
55
57
        }
56
58
 
57
 
        const PictureID & get_frame(Index const i) const {
 
59
        const IPicture* get_frame(Index const i) const {
58
60
                assert(i < nr_frames());
59
61
                return m_plrframes[0][i];
60
62
        }