diff options
author | tom <tom@ground-control> | 2015-05-08 08:07:11 -0500 |
---|---|---|
committer | tom <tom@ground-control> | 2015-05-08 08:07:11 -0500 |
commit | dddcaa7e5fa044972e25e456315c5cba361fc0f5 (patch) | |
tree | 299180915292000b2d5029888eb75178b81e8053 /src/resource.cpp | |
parent | 84f94931fa790572b3ce57d72e290f0bd860c661 (diff) | |
parent | c63d77ddddb69ef0f641d90a8c3922fdc356224c (diff) |
Merge branch 'master' of https://github.com/MajorTom6/natures
Conflicts:
src/list.cpp
Diffstat (limited to 'src/resource.cpp')
-rw-r--r-- | src/resource.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/resource.cpp b/src/resource.cpp index a087aca..c4a9341 100644 --- a/src/resource.cpp +++ b/src/resource.cpp @@ -1,17 +1,19 @@ #include "resource.hpp" -Resource::Resource(Window m, std::string s) +Resource::Resource(Window m, std::string s) //Constructor { texture = loadTexture(s, m); renderer = m.getRenderer(); - int zy = rand()%800; - int zx = rand()%1200; - y=zy; - x=zx; + + //Initialized random position coordinates + int yStart = rand()%800; + int xStart = rand()%1200; + yPosition = yStart; + xPosition = xStart; } -Location Resource::getLocation() +Location Resource::getLocation() //Returns resource location vector { - Location L(x,y,2); + Location L(xPosition,yPosition,2); return L; } |