Add project files.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
#ifndef _CANIMATEDSPRITE_HPP_
|
||||
#define _CANIMATEDSPRITE_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "cSprite.hpp"
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
namespace VideoEngine {
|
||||
class EXPORT_FROM_MYDLL cAnimatedSprite : public cSprite
|
||||
{
|
||||
public:
|
||||
cAnimatedSprite( const unsigned long int x = 0, const unsigned long int y = 0, const unsigned long int fps = 16 );
|
||||
/* Copy constructor */
|
||||
cAnimatedSprite( const cAnimatedSprite& copy );
|
||||
~cAnimatedSprite();
|
||||
|
||||
///Functions
|
||||
/* Runs down the image */
|
||||
void UptoDown();
|
||||
/* Runs up the image */
|
||||
void DowntoUp();
|
||||
/* Runs right of the image */
|
||||
void LefttoRight();
|
||||
/* Runs Left of the image */
|
||||
void RighttoLeft();
|
||||
|
||||
///Sets
|
||||
/* Sets the x increment */
|
||||
void setXIncrement( const unsigned long int x );
|
||||
/* Sets the y increment */
|
||||
void setYIncrement( const unsigned long int y );
|
||||
/* Sets the how fare the sprite should move along the image */
|
||||
void setIncrement( const unsigned long int x, const unsigned long int y );
|
||||
/* Sets the speed of going from one frame to the next */
|
||||
void setFPS( const unsigned long int fps = 16 );
|
||||
|
||||
///Gets
|
||||
/* Gets the x increment */
|
||||
const unsigned long int getXIncrement() const;
|
||||
/* Gets the y increment */
|
||||
const unsigned long int getYIncrement() const;
|
||||
/* Gets how fare the sprite should move along the image */
|
||||
void getIncrement( unsigned long int& x, unsigned long int& y ) const;
|
||||
|
||||
/* Gets the speed of going from one frame to the next */
|
||||
const unsigned long int getFPS() const;
|
||||
|
||||
private:
|
||||
const unsigned long int TimeLeft();
|
||||
void AddTimeandRate();
|
||||
|
||||
private:
|
||||
///Variables
|
||||
unsigned long int m_xIncrement;// = 0
|
||||
unsigned long int m_yIncrement;// = 0
|
||||
|
||||
unsigned long int m_fps;// = 16
|
||||
|
||||
unsigned long int m_nextTime;// = 0
|
||||
|
||||
unsigned long int m_RATE;// = 0
|
||||
|
||||
};/// END CLASS DEFINITION cAnimatedSprite
|
||||
}/// END NAMESPACE DEFINITION VideoEngine
|
||||
#endif/// END IFNDEF _CANIMATEDSPRITE_HPP_
|
||||
Reference in New Issue
Block a user