From a246c08cef5e4d598fc07a681eb971bfbcf01519 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 7 Oct 2005 00:12:32 +0000 Subject: 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. --- src/engine.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/engine.cpp') 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 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::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::iterator i = beings.begin(); i != beings.end(); i++) { -- cgit v1.2.3-70-g09d2