diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-12 16:12:48 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-12 16:12:48 +0000 |
commit | 81a485fb23d0139ce75ef4aa7059cff1742bc3b2 (patch) | |
tree | 2cd9ebde61ad9100d00828b437787e0d32ca2e12 | |
parent | 16cb089845b3adcdd605d138d903bd7ada0f9e03 (diff) | |
download | mana-81a485fb23d0139ce75ef4aa7059cff1742bc3b2.tar.gz mana-81a485fb23d0139ce75ef4aa7059cff1742bc3b2.tar.bz2 mana-81a485fb23d0139ce75ef4aa7059cff1742bc3b2.tar.xz mana-81a485fb23d0139ce75ef4aa7059cff1742bc3b2.zip |
Cleaned up some unused stuff.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | src/engine.cpp | 27 | ||||
-rw-r--r-- | src/npc.cpp | 1 |
4 files changed, 4 insertions, 27 deletions
@@ -15,6 +15,7 @@ * src/CMakeLists.txt, src/utils/base64.cpp, src/utils/base64.h, src/Makefile.am, src/resources/mapreader.cpp: Moved base64 module into utils directory. + * src/engine.cpp, src/npc.cpp: Cleaned up some unused stuff. 2006-12-12 Philipp Sehmisch <tmw@crushnet.org> @@ -39,7 +39,7 @@ you to figure this out. ========================================== 1) Go to the directory you have extracted the source to. -2) If you checked out from CVS, run "./autogen.sh" to generate configure. +2) If you checked out from SVN, run "./autogen.sh" to generate configure. 3) Run "./configure" 4) Run "make" 5) Run "make install" as root diff --git a/src/engine.cpp b/src/engine.cpp index c9c5dcba..bcf6ad8c 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -58,43 +58,20 @@ extern Minimap *minimap; char itemCurrenyQ[10] = "0"; Spriteset *emotionset; -Spriteset *npcset; -std::vector<Spriteset *> weaponset; Engine::Engine(Network *network): mCurrentMap(NULL), mNetwork(network) { - // Load the sprite sets + // Load the emotion set ResourceManager *resman = ResourceManager::getInstance(); - - npcset = resman->getSpriteset("graphics/sprites/npcs.png", 50, 80); - emotionset = resman->getSpriteset("graphics/sprites/emotions.png", - 30, 32); - for (int i = 0; i < 2; i++) - { - Spriteset *tmp = ResourceManager::getInstance()->getSpriteset( - "graphics/sprites/weapon" + toString(i) + ".png", 64, 64); - if (!tmp) { - logger->error("Unable to load weaponset"); - } else { - weaponset.push_back(tmp); - } - } - - if (!npcset) logger->error("Unable to load NPC spriteset!"); + emotionset = resman->getSpriteset("graphics/sprites/emotions.png", 30, 32); if (!emotionset) logger->error("Unable to load emotions spriteset!"); } Engine::~Engine() { - // Delete sprite sets - npcset->decRef(); emotionset->decRef(); - - std::for_each(weaponset.begin(), weaponset.end(), - std::mem_fun(&Spriteset::decRef)); - weaponset.clear(); } void Engine::changeMap(const std::string &mapPath) diff --git a/src/npc.cpp b/src/npc.cpp index a961420f..e96ad0b7 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -32,7 +32,6 @@ #include "gui/gui.h" class Spriteset; -extern Spriteset *npcset; NPC *current_npc = 0; |