summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-25 10:21:24 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-25 10:21:24 +0000
commit59accfe17512a663d852205dcbe7bc7547400bb3 (patch)
treed00baff7f1413090f07c086977e09d4d08f41c30 /src/engine.cpp
parent1c4742e530271e10ae949cf7e85402bee867e298 (diff)
downloadmana-59accfe17512a663d852205dcbe7bc7547400bb3.tar.gz
mana-59accfe17512a663d852205dcbe7bc7547400bb3.tar.bz2
mana-59accfe17512a663d852205dcbe7bc7547400bb3.tar.xz
mana-59accfe17512a663d852205dcbe7bc7547400bb3.zip
Added a logic method to the being manager.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 76ed7ac9..5da8621e 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -33,7 +33,6 @@
#include "graphics.h"
#include "localplayer.h"
#include "log.h"
-#include "main.h"
#include "map.h"
#include "sound.h"
@@ -94,7 +93,7 @@ Engine::~Engine()
std::map<int, Spriteset*>::iterator i;
for (i = monsterset.begin(); i != monsterset.end(); i++)
{
- delete (*i).second;
+ delete i->second;
}
monsterset.clear();
@@ -165,25 +164,7 @@ void Engine::changeMap(std::string mapPath)
void Engine::logic()
{
- Beings *beings = beingManager->getAll();
- // Update beings
- BeingIterator beingIterator = beings->begin();
- while (beingIterator != beings->end())
- {
- Being *being = (*beingIterator);
-
- being->logic();
-
- if (being->action == Being::MONSTER_DEAD && being->mFrame >= 20)
- {
- delete being;
- beingIterator = beings->erase(beingIterator);
- }
- else {
- beingIterator++;
- }
- }
-
+ beingManager->logic();
gui->logic();
}