Debian Codegraph @

src/sprite.h

raw symbols SCIP
1 /***************************************************************************
2 sprite.h - description
3 -------------------
4 begin : Thu Jan 17 2002
5 copyright : (C) 2002 by Waldemar Baraldi
6 email : [email protected]
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18 #ifndef SPRITE_H
19 #define SPRITE_H
20
21 #include "graphic.h"
22 #include "str.h"
23 #include "SDL.h"
24
25 class List;
26 class Surface;
27 class ImageManager;
28 class Image;
29
30 class Sprite: public Graphic{
31
32 public:
33
34 /** Constructor.
35 @param filenamebase El sprite es cargado usando <filenamebase>.spr <filenamebase>.png
36 */
37 Sprite(Str * filenamebase, Str * filenameext, int nFrames, ImageManager * im);
38
39 /** Destructor.*/
40 virtual ~Sprite();
41
42 virtual int nFrames();
43
44 virtual int frameWidth(ImageManager * im);
45 virtual int frameHeight(ImageManager * im);
46
47 virtual Surface * frame(ImageManager * im, int n);
48
49
50 protected:
51 Image ** frames;
52 int n_frames;
53 Str * filenamebase;
54 Str * filenameext;
55 };
56 #endif