-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcTexture.h
More file actions
33 lines (30 loc) · 1.13 KB
/
cTexture.h
File metadata and controls
33 lines (30 loc) · 1.13 KB
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
30
31
32
33
/*
=================
cTexture.h
- Header file for class definition - SPECIFICATION
- Header file for the cD3DXTexture class
=================
*/
#ifndef _CTEXTURE_H
#define _CTEXTURE_H
#include "GameConstants.h"
class cTexture
{
private:
SDL_Texture* sdlTextureID;
int textureWidth;
int textureHeight;
public:
cTexture();
cTexture(LPCSTR theFilename, SDL_Renderer *theRenderer);
~cTexture();
bool loadTexture(LPCSTR theFilename, SDL_Renderer *theRenderer); // create the texture for use.
bool loadTexture(SDL_Texture* theTexture); // create the texture for use.
void renderTexture(SDL_Renderer* theRenderer, SDL_Texture* ptheTexture, SDL_Rect* theSourceRect, SDL_Rect* theDestRect, FPoint theScaling);
void renderTexture(SDL_Renderer* theRenderer, SDL_Texture* ptheTexture, SDL_Rect* theSourceRect, SDL_Rect* theDestRect, double rotAngle, SDL_Point* spriteCentre, FPoint theScaling);
SDL_Texture* getTexture(); // return the texture.
int getTWidth(); // Return width of texture;
int getTHeight(); // Return height of texture;
SDL_Rect getTextureRect(); // get Texture dimensions
};
#endif