diff options
author | Ira Rice <irarice@gmail.com> | 2008-09-15 17:24:24 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-09-15 17:24:24 +0000 |
commit | 176e885ef6c5ae34c8c31c693b65e5a246146f3a (patch) | |
tree | a518013432ebd4f8e70a1240fe4c6931b3c7c459 | |
parent | 175a930a09c657525e67a1faccd1f9569ec4d28f (diff) | |
download | mana-client-176e885ef6c5ae34c8c31c693b65e5a246146f3a.tar.gz mana-client-176e885ef6c5ae34c8c31c693b65e5a246146f3a.tar.bz2 mana-client-176e885ef6c5ae34c8c31c693b65e5a246146f3a.tar.xz mana-client-176e885ef6c5ae34c8c31c693b65e5a246146f3a.zip |
Commented out getBeingByPixel because it really isn't used, nor is there
much sense to. Shouldn't make any visible changes to performance yet,
but I trimmed it out for now anyways.
-rw-r--r-- | src/beingmanager.cpp | 4 | ||||
-rw-r--r-- | src/beingmanager.h | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index d1a333d0..47729a92 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -124,7 +124,7 @@ Being* BeingManager::findBeing(Uint16 x, Uint16 y, Being::Type type) return (i == mBeings.end()) ? NULL : *i; } -Being* BeingManager::findBeingByPixel(Uint16 x, Uint16 y) +/*Being* BeingManager::findBeingByPixel(Uint16 x, Uint16 y) { BeingIterator itr = mBeings.begin(); BeingIterator itr_end = mBeings.end(); @@ -144,7 +144,7 @@ Being* BeingManager::findBeingByPixel(Uint16 x, Uint16 y) } return NULL; -} +}*/ Being* BeingManager::findBeingByName(std::string name, Being::Type type) { diff --git a/src/beingmanager.h b/src/beingmanager.h index ff2d1980..f8391855 100644 --- a/src/beingmanager.h +++ b/src/beingmanager.h @@ -67,7 +67,7 @@ class BeingManager * Return a being at specific coordinates. */ Being* findBeing(Uint16 x, Uint16 y, Being::Type type = Being::UNKNOWN); - Being* findBeingByPixel(Uint16 x, Uint16 y); + //Being* findBeingByPixel(Uint16 x, Uint16 y); /** * Return a being nearest to specific coordinates. diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e7fdb522..568c1ea3 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -384,10 +384,10 @@ Viewport::mousePressed(gcn::MouseEvent &event) FloorItem *item; // Interact with some being -// if ((being = beingManager->findBeing(tilex, tiley)) - int x = (int)((float) event.getX() + mPixelViewX); - int y = (int)((float) event.getY() + mPixelViewY); - if ((being = beingManager->findBeingByPixel(x, y))) +// int x = (int)((float) event.getX() + mPixelViewX); +// int y = (int)((float) event.getY() + mPixelViewY); +// if ((being = beingManager->findBeingByPixel(x, y))) + if ((being = beingManager->findBeing(tilex, tiley))) { switch (being->getType()) { |