summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-07 00:12:32 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-07 00:12:32 +0000
commita246c08cef5e4d598fc07a681eb971bfbcf01519 (patch)
treeff1813b11379ddef2c5be627aafcf3329170a293 /src/engine.cpp
parent09db562f2fca5c49fa1a92ba0b6dc60db479ae08 (diff)
downloadmana-client-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.gz
mana-client-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.bz2
mana-client-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.xz
mana-client-a246c08cef5e4d598fc07a681eb971bfbcf01519.zip
Modified finding NPC as by timonator's suggestion in order to allow NPCs to be
clicked on their heads too. Also made start to tile engine improvement by adding the Sprite class that is now used by the floor items for being displayed on the map. Finally added documentation to Item class and splitted out Properties class from Map.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 1dd7c752..4d934504 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -65,6 +65,7 @@ gcn::Label *debugInfo;
std::map<int, Spriteset*> monsterset;
ItemManager *itemDb; /**< Item database object */
+Spriteset *itemset;
char hairtable[16][4][2] = {
// S(x,y) W(x,y) N(x,y) E(x,y)
@@ -294,20 +295,6 @@ void Engine::draw()
mCurrentMap->draw(graphics, map_x, map_y, 1);
}
- // Draw items
- for (std::list<FloorItem*>::iterator i = floorItems.begin(); i != floorItems.end(); i++)
- {
- FloorItem *floorItem = (*i);
- if (itemDb->getItemInfo(floorItem->getItemId())->getImage() > 0) {
- Image *image = itemset->spriteset[itemDb->getItemInfo(
- floorItem->getItemId())->getImage() - 1];
-
- graphics->drawImage(image,
- floorItem->getX() * 32 - map_x,
- floorItem->getY() * 32 - map_y);
- }
- }
-
// Draw nodes
for (std::list<Being*>::iterator i = beings.begin(); i != beings.end(); i++)
{