aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-04-25 08:48:39 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-04-25 08:48:39 -0400
commitb7e31e8b7ce8f470a269c6bc17e6525c6f3a4d50 (patch)
tree476b444a70b39d9f84b6a39c926c110e2efaf473 /include
parent2473bc452959f1c84b03c4b9202d601b3325143d (diff)
fixed bugs
Diffstat (limited to 'include')
-rw-r--r--include/common.hpp4
-rw-r--r--include/inventory.hpp12
-rw-r--r--include/world.hpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/include/common.hpp b/include/common.hpp
index 7f36be2..5a0fcb2 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -103,6 +103,10 @@ struct _vec2 {
x = y = n;
return *this;
}
+ template<typename T>
+ const _vec2 operator+(const T &n) {
+ return _vec2 {x + n, y + n};
+ }
};
typedef struct _vec2 vec2;
diff --git a/include/inventory.hpp b/include/inventory.hpp
index 4fb45f9..ce887c3 100644
--- a/include/inventory.hpp
+++ b/include/inventory.hpp
@@ -11,19 +11,15 @@
class Item{
public:
std::string name, type;
+ std::string texloc;
+
+ Texturec *tex;
float width;
float height;
int maxStackSize;
float attribValue;
- std::string texloc;
- Texturec *tex;
-
- GLuint rtex()
- {
- return tex->image[0];
- }
};
class Currency{
@@ -44,7 +40,7 @@ public:
}
};
-struct item_t{
+struct item_t {
uint count;
uint id;
} __attribute__((packed));
diff --git a/include/world.hpp b/include/world.hpp
index c6eaf06..dc8d497 100644
--- a/include/world.hpp
+++ b/include/world.hpp
@@ -220,7 +220,7 @@ public:
bool goWorldLeft(NPC *e);
// attempts to enter a structure that the player would be standing in front of
- World *goInsideStructure(Player *p);
+ std::pair<World *, float> goInsideStructure(Player *p);
// adds a hole at the specified start and end x-coordinates
void addHole(unsigned int start,unsigned int end);