Jamie Slowgrove - PGG Assignment 1 - SDL
Main Page
Classes
Files
File List
All
Classes
Functions
PGGAssignment1SDL
entity.h
1
#pragma once
2
#ifndef ENTITY_H
3
#define ENTITY_H
4
5
#include <SDL.h>
6
#include "texture.h"
7
13
class
Entity
14
{
15
protected
:
16
/*the Texture variable*/
17
Texture
* texture;
18
/*variables for the source and destination dimensions*/
19
int
srcWidth;
20
int
srcHeight;
21
int
srcX;
22
int
srcY;
23
int
width;
24
int
height;
25
/*position*/
26
float
x;
27
float
y;
28
public
:
38
Entity
(
Texture
*,
float
,
float
,
int
,
int
);
39
44
~Entity
();
45
51
void
display
(SDL_Renderer *);
52
58
void
setX
(
float
);
59
65
void
setY
(
float
);
66
71
float
getX
();
72
77
float
getY
();
78
84
void
setSrcX
(
float
);
85
91
void
setSrcY
(
float
);
92
97
int
getSrcX
();
98
103
int
getSrcY
();
104
};
105
#endif
Entity::getX
float getX()
Definition:
entity.cpp:54
Entity::setY
void setY(float)
Definition:
entity.cpp:45
Entity::setX
void setX(float)
Definition:
entity.cpp:36
Entity::getSrcX
int getSrcX()
Definition:
entity.cpp:90
Entity::getSrcY
int getSrcY()
Definition:
entity.cpp:99
Entity::setSrcX
void setSrcX(float)
Definition:
entity.cpp:72
Entity::setSrcY
void setSrcY(float)
Definition:
entity.cpp:81
Entity
Creates an Entity object Creates an Entity object with a Texture (including variables for the source ...
Definition:
entity.h:13
Texture
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition:
texture.h:13
Entity::~Entity
~Entity()
Definition:
entity.cpp:20
Entity::Entity
Entity(Texture *, float, float, int, int)
Definition:
entity.cpp:6
Entity::display
void display(SDL_Renderer *)
Definition:
entity.cpp:27
Entity::getY
float getY()
Definition:
entity.cpp:63
Generated on Fri Jan 16 2015 17:55:16 for Jamie Slowgrove - PGG Assignment 1 - SDL by
1.8.8