-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpriteSheet.h
29 lines (26 loc) · 895 Bytes
/
SpriteSheet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
class SpriteSheetC
{
public:
SpriteSheetC();
SpriteSheetC(GLuint textureMapID, unsigned int spriteCount,
float spriteWidth, float spriteHeight);
SpriteSheetC(GLuint textureMapID, unsigned int spriteCount,
float spriteWidth, float spriteHeight, DWORD millisecondsBetweenFrames);
~SpriteSheetC() {};
void setSpriteSheet(GLuint textureMapID, unsigned int spriteCount,
float spriteWidth, float spriteHeight);
void setSpriteSheet(GLuint textureMapID, unsigned int spriteCount,
float spriteWidth, float spriteHeight, DWORD millisecondsBetweenFrames);
void render(Coord2D position);
void update(DWORD milliseconds);
void setSpriteSize(float spriteWidth, float spriteHeight);
private:
GLuint mTextureMapID;
unsigned int mSpriteCount;
unsigned int mCurrentSprite;
float mSpriteWidth;
float mSpriteHeight;
DWORD mMillisecondsBetweenFrames;
DWORD mAnimationTimer;
};