-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathArt.cpp
More file actions
96 lines (76 loc) · 2.44 KB
/
Copy pathArt.cpp
File metadata and controls
96 lines (76 loc) · 2.44 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include "Art.hpp"
#include "Utility/package.hpp"
//---------------------------------------------------------------------------------
// Written by Terence J. Grant - tjgrant [at] tatewake [dot] com
// Find the full tutorial at: http://gamedev.tutsplus.com/series/
//----------------------------------------------------------------------------------
Art::Art()
{
// TODO: RR: Create utility class to generate these strings.
//
#if EMSCRIPTEN
const std::string resourcesPath = "";
#else
const std::string resourcesPath = "./Resources/Sprites/";
#endif
mPlayer = new tTexture(tSurface(std::string(resourcesPath + "player.png")));
mSeeker = new tTexture(tSurface(std::string(resourcesPath + "seeker.png")));
mWanderer = new tTexture(tSurface(std::string(resourcesPath + "wanderer.png")));
mBullet = new tTexture(tSurface(std::string(resourcesPath + "bullet.png")));
mPointer = new tTexture(tSurface(std::string(resourcesPath + "pointer.png")));
mBlackHole = new tTexture(tSurface(std::string(resourcesPath + "blackhole.png")));
mFontTexture = new tTexture(tSurface(std::string(resourcesPath + "font.png")));
mVPadTop = new tTexture(tSurface(std::string(resourcesPath + "vpad_top.png")));
mVPadBottom = new tTexture(tSurface(std::string(resourcesPath + "vpad_bot.png")));
mLineParticle = new tTexture(tSurface(std::string(resourcesPath + "laser.png")));
mGlow = new tTexture(tSurface(std::string(resourcesPath + "glow.png")));
mPixel = new tTexture(tSurface(std::string(resourcesPath + "pixel.png")));
}
tTexture* Art::getPlayer() const
{
return mPlayer;
}
tTexture* Art::getSeeker() const
{
return mSeeker;
}
tTexture* Art::getWanderer() const
{
return mWanderer;
}
tTexture* Art::getBullet() const
{
return mBullet;
}
tTexture* Art::getPointer() const
{
return mPointer;
}
tTexture* Art::getBlackHole() const
{
return mBlackHole;
}
tTexture* Art::getLineParticle() const
{
return mLineParticle;
}
tTexture* Art::getGlow() const
{
return mGlow;
}
tTexture* Art::getPixel() const
{
return mPixel;
}
tTexture* Art::getVPadBottom() const
{
return mVPadBottom;
}
tTexture* Art::getVPadTop() const
{
return mVPadTop;
}
tSpriteFont Art::getFont() const
{
return tSpriteFont( mFontTexture, tTextSheet(tRectf( 0, 0, 256, 36), tDimension2f( 8, 12), tDimension2f( 6, 10 ), ' ', '~' ));
}