summaryrefslogtreecommitdiff
path: root/src/resource.cpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-25 12:42:41 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:41 -0600
commitd10f3df359cbccd1d7ee13b7981fee575a90637f (patch)
treec6faefd9c6f24663b0ae4bdee505d6456e8208a1 /src/resource.cpp
parent86fba51a32de6528cead5fdf24846d1e0540cad9 (diff)
-began refractoring src
-reduced area creatures and resources spawn -everything should be on 8 spaces now -reorganized creatures action function to make more logical sense -stripped out unused parts of geoshader and spritebatch
Diffstat (limited to 'src/resource.cpp')
-rw-r--r--src/resource.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/resource.cpp b/src/resource.cpp
index 81fd6b7..c3e61d6 100644
--- a/src/resource.cpp
+++ b/src/resource.cpp
@@ -1,20 +1,15 @@
#include "resource.hpp"
-Resource::Resource(Rectangle t)
+Resource::Resource(Rectangle r)
{
- rect = t;
+ rect = r;
if(rect.x == 0 && rect.y == 0){
- rect.x = getRandom(50);
- rect.y = getRandom(50);
+ rect.x = getRandom(30);
+ rect.y = getRandom(30);
}
- gfxData.x = rect.x;
- gfxData.y = rect.y;
- gfxData.r = 0.0;
- gfxData.g = 1.0;
- gfxData.b = 0.0;
- gfxData.sides = 10.0;
+ gfxData = GraphicsData(rect.x, rect.y, 0, 1, 0, RESOURCE_SIDES);
type = RESOURCE_TYPE;
amount = RESOURCE_AMOUNT_START;