-
Notifications
You must be signed in to change notification settings - Fork 0
/
Textures.cpp
77 lines (54 loc) · 1.96 KB
/
Textures.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "Textures.h"
//load all texture and insert into a vector
Textures::Textures(void)
{
//TODO: not hardcode how texture is loaded
sf::Texture texture1;
//load textures here in order of the enums
//example:
/*
texture1.loadFromFile("Assets/buttonSheet.png");
mSheets.insert(mSheets.end(), texture1);
*/
texture1.loadFromFile("Assets/buttonSheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/playerSheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/spacezombie.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/battery.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/engine.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/laser.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/batterymeter.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/healthmeter.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/hologramborder.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/titlebackground.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/gameover.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/paused.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/complete.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/wall.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/titlerobot.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/titlespaceship.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/hologramtriangle.png");
mSheets.insert(mSheets.end(), texture1);
}
Textures::~Textures(void)
{
}
sf::Texture* Textures::getTexture(SPRITESHEETS pSheet)
{
return &(mSheets.at(pSheet));
}