aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-04-24 22:50:44 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-04-24 22:50:44 -0400
commit78af1d0420dfccbd27501e383553e58248229a37 (patch)
treef8b7f7c79f034b2c3da5ef29c26330bc9c4c65e1 /src/inventory.cpp
parent13236a26d3c1f4b09e105af42872ab4ad2753208 (diff)
parent2473bc452959f1c84b03c4b9202d601b3325143d (diff)
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 4cf5fda..34d99ed 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -1,6 +1,7 @@
#include <inventory.hpp>
#include <entities.hpp>
#include <ui.hpp>
+#include <gametime.hpp>
#include <tinyxml2.h>
using namespace tinyxml2;
@@ -230,6 +231,8 @@ void Inventory::draw(void) {
static vec2 mouseStart = {0,0};
C("End define");
+ auto deltaTime = gtime::getDeltaTime();
+
for (auto &r : iray) {
r.start.x = player->loc.x + (player->width / 2);
r.start.y = player->loc.y + (player->height / 2);
@@ -594,7 +597,7 @@ int Inventory::useItem(void)
}
if (up)
- hangle += 0.325f * dir * deltaTime;
+ hangle += 0.325f * dir * gtime::getDeltaTime();
if (!player->left) {
if (hangle <= -90)