diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-10-07 00:12:32 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-10-07 00:12:32 +0000 |
commit | a246c08cef5e4d598fc07a681eb971bfbcf01519 (patch) | |
tree | ff1813b11379ddef2c5be627aafcf3329170a293 /src/resources | |
parent | 09db562f2fca5c49fa1a92ba0b6dc60db479ae08 (diff) | |
download | mana-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.gz mana-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.bz2 mana-a246c08cef5e4d598fc07a681eb971bfbcf01519.tar.xz mana-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/resources')
-rw-r--r-- | src/resources/itemmanager.cpp | 10 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/resources/itemmanager.cpp b/src/resources/itemmanager.cpp index caa26f5b..6fac63fd 100644 --- a/src/resources/itemmanager.cpp +++ b/src/resources/itemmanager.cpp @@ -20,7 +20,7 @@ * * $Id$ */ - + #include <libxml/tree.h> #include "iteminfo.h" @@ -126,11 +126,15 @@ ItemManager::~ItemManager() delete unknown; } -ItemInfo *ItemManager::getItemInfo(int id) +ItemInfo* +ItemManager::getItemInfo(int id) { if (db.find(id) != db.end()) + { return db[id]; + } else + { return unknown; + } } - diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 4a8a010a..e9595093 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -31,7 +31,6 @@ #include "soundeffect.h" #include "../log.h" -#include "../gui/button.h" ResourceManager *ResourceManager::instance = NULL; @@ -50,7 +49,6 @@ ResourceManager::~ResourceManager() { Resource *res = resources.begin()->second; std::string id = res->getIdPath(); - int references = 0; do { |