diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-15 14:37:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-15 14:37:33 +0300 |
commit | 06a19f3327736f67907f012bd21bb1c0a21bb468 (patch) | |
tree | 73a958f3bee9997db99ebb54e4c949bc521abda5 /src/resources/map/map.cpp | |
parent | 11a02af132567b6ef709ce0b20113375dcad5db7 (diff) | |
download | manaplus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.gz manaplus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.bz2 manaplus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.xz manaplus-06a19f3327736f67907f012bd21bb1c0a21bb468.zip |
Add missing cost to map and maplayer.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r-- | src/resources/map/map.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 18e3dc7f5..14465956e 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -583,8 +583,9 @@ void Map::updateAmbientLayers(const float scrollX, const float scrollY) BLOCK_END("Map::updateAmbientLayers") } -void Map::drawAmbientLayers(Graphics *const graphics, const LayerType type, - const int detail) +void Map::drawAmbientLayers(Graphics *const graphics, + const LayerType type, + const int detail) const { BLOCK_START("Map::drawAmbientLayers") // Detail 0 = no ambient effects except background image @@ -595,7 +596,7 @@ void Map::drawAmbientLayers(Graphics *const graphics, const LayerType type, } // find out which layer list to draw - AmbientLayerVector *layers = nullptr; + const AmbientLayerVector *layers = nullptr; switch (type) { case FOREGROUND_LAYERS: @@ -980,18 +981,14 @@ Path Map::findPath(const int startX, const int startY, } void Map::addParticleEffect(const std::string &effectFile, - const int x, const int y, const int w, const int h) + const int x, const int y, + const int w, const int h) { - ParticleEffectData newEffect; - newEffect.file = effectFile; - newEffect.x = x; - newEffect.y = y; - newEffect.w = w; - newEffect.h = h; + ParticleEffectData newEffect(effectFile, x, y, w, h); mParticleEffects.push_back(newEffect); } -void Map::initializeParticleEffects(Particle *const engine) +void Map::initializeParticleEffects(Particle *const engine) const { BLOCK_START("Map::initializeParticleEffects") if (!engine) @@ -1142,7 +1139,8 @@ std::string Map::getUserMapDirectory() const } void Map::addRange(const std::string &name, const int type, - const int x, const int y, const int dx, const int dy) + const int x, const int y, + const int dx, const int dy) { if (!mObjects) return; @@ -1152,7 +1150,8 @@ void Map::addRange(const std::string &name, const int type, } void Map::addPortal(const std::string &name, const int type, - const int x, const int y, const int dx, const int dy) + const int x, const int y, + const int dx, const int dy) { addPortalTile(name, type, (x / mapTileSize) + (dx / mapTileSize / 2), (y / mapTileSize) + (dy / mapTileSize / 2)); |