summaryrefslogtreecommitdiff
path: root/src/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resource.cpp')
-rw-r--r--src/resource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resource.cpp b/src/resource.cpp
index 5044760..e549214 100644
--- a/src/resource.cpp
+++ b/src/resource.cpp
@@ -12,6 +12,15 @@ Resource::Resource(Window m, std::string s) //Constructor
xPosition = xStart;
}
+Resource::Resource(Window m, std::string s, Location z)
+{
+ texture = loadTexture(s, m);
+ renderer = m.getRenderer();
+
+ yPosition = z.y;
+ xPosition = z.x;
+}
+
Location Resource::getLocation() //Returns resource object
{
Location L(xPosition,yPosition,2);