diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-24 22:50:44 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-24 22:50:44 -0400 |
commit | 78af1d0420dfccbd27501e383553e58248229a37 (patch) | |
tree | f8b7f7c79f034b2c3da5ef29c26330bc9c4c65e1 /src/inventory.cpp | |
parent | 13236a26d3c1f4b09e105af42872ab4ad2753208 (diff) | |
parent | 2473bc452959f1c84b03c4b9202d601b3325143d (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 5 |
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) |