#ifndef SPRITE_H
#define SPRITE_H

#include "SDL.h"

class CSprite
{
    public:
    //Class stuff
    CSprite();
    CSprite(SDL_Surface* img, float x = 0.0, float y = 0.0, int framerate = 0, int maxframe = 1);
    virtual ~CSprite();
    void Init(SDL_Surface* img, float x = 0.0, float y = 0.0, int framerate = 0, int maxframe = 1);

    //Drawing stuff
    //Image* m_Img;
    SDL_Surface* m_Img; //temp
    float m_X;
    float m_Y;
    SDL_Rect m_DestRect;

    void Update( int deltaT );
    void Draw(SDL_Surface* screen);

    //Animation stuff
    int m_FrameRate;
    int m_CurrentFrame;
    int m_MaxFrame;
    int m_LastFrameTime;
    int m_NumOfLoops;
    bool m_PlayOnce;
    SDL_Rect m_FrameRect;

    //Collision stuff
    SDL_Rect m_CollisionRect;

    bool CheckCollision(CSprite* spr);


};

#endif // SPRITE_H
