summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-04 22:28:19 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-04 22:31:43 +0200
commit924e0a887f87ce531bc5bd26cb55e410b7303383 (patch)
treea592304792e8ae877dabaa2062d6bdff1d406f02 /src/map.cpp
parentcff9f1947bac8fa49aaf6f846a6e4335a439ac2e (diff)
downloadmana-client-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.gz
mana-client-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.bz2
mana-client-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.xz
mana-client-924e0a887f87ce531bc5bd26cb55e410b7303383.zip
Introduced Net::LoginHandler::SetEmailOnRegister
This "optional action" specifies whether the server expects to get an email address during registration. It is used now instead of having the general handlers of eAthena and tmwserv set a pointer to an email string on the GUI dialogs (to keep things understandable, the dependency should preferably go one way).
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 2176327f..56e13697 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -292,13 +292,13 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY)
MapSprites::const_iterator si = mSprites.begin();
while (si != mSprites.end())
{
- if (*si)
- // For now, just draw sprites with only one layer.
+ if (Sprite *sprite = *si)
{
- if ((*si)->getNumberOfLayers() == 1)
+ // For now, just draw sprites with only one layer.
+ if (sprite->getNumberOfLayers() == 1)
{
- (*si)->setAlpha(0.3f);
- (*si)->draw(graphics, -scrollX, -scrollY);
+ sprite->setAlpha(0.3f);
+ sprite->draw(graphics, -scrollX, -scrollY);
}
}
si++;
@@ -398,7 +398,7 @@ void Map::drawOverlay(Graphics *graphics,
// Detail 1: only one overlay, higher: all overlays
if (detail == 1)
break;
- };
+ }
}
class ContainsGidFunctor
@@ -721,13 +721,8 @@ void Map::initializeParticleEffects(Particle *particleEngine)
}
}
-TileAnimation *Map::getAnimationForGid(int gid)
+TileAnimation *Map::getAnimationForGid(int gid) const
{
- std::map<int, TileAnimation*>::iterator i = mTileAnimations.find(gid);
- if (i == mTileAnimations.end())
- {
- return NULL;
- } else {
- return i->second;
- }
+ std::map<int, TileAnimation*>::const_iterator i = mTileAnimations.find(gid);
+ return (i == mTileAnimations.end()) ? NULL : i->second;
}