Very Simple Graphic Library
sprite.h
00001 #ifndef SPRITE_H
00002 #define SPRITE_H
00003 #include <string>
00004 #include "oggettografico.h"
00005 
00006 using namespace std;
00007 
00008 class Sprite : public OggettoGrafico
00009 {
00010     public:
00011         Sprite(int x, int y,const string& filename):
00012         OggettoGrafico(x,y,NESSUN_COLORE),valida(false){
00013             carica(filename);
00014         }
00015 
00016         void disegna() const;
00017         void muovi(int x, int y);
00018         void disegnaSprite() const;
00019         bool isValida() const;
00020     protected:
00021     private:
00022         vector<ColorRGB> immagine;
00023         unsigned long altezza;
00024         unsigned long larghezza;
00025         bool valida;
00026         void carica(const string& filename);
00027 };
00028 
00029 #endif // SPRITE_H