summaryrefslogtreecommitdiff
path: root/src/resources/map/maplayer.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-15 14:37:33 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-15 14:37:33 +0300
commit06a19f3327736f67907f012bd21bb1c0a21bb468 (patch)
tree73a958f3bee9997db99ebb54e4c949bc521abda5 /src/resources/map/maplayer.h
parent11a02af132567b6ef709ce0b20113375dcad5db7 (diff)
downloadplus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.gz
plus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.bz2
plus-06a19f3327736f67907f012bd21bb1c0a21bb468.tar.xz
plus-06a19f3327736f67907f012bd21bb1c0a21bb468.zip
Add missing cost to map and maplayer.
Diffstat (limited to 'src/resources/map/maplayer.h')
-rw-r--r--src/resources/map/maplayer.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h
index 4f06cddef..6eebe5713 100644
--- a/src/resources/map/maplayer.h
+++ b/src/resources/map/maplayer.h
@@ -54,7 +54,8 @@ class MapLayer final: public ConfigListener
* fringe layer. The fringe layer is the layer that draws the actors.
* There can be only one fringe layer per map.
*/
- MapLayer(const int x, const int y, const int width, const int height,
+ MapLayer(const int x, const int y,
+ const int width, const int height,
const bool isFringeLayer, const int mask);
A_DELETE_COPY(MapLayer)
@@ -88,10 +89,10 @@ class MapLayer final: public ConfigListener
const int scrollX, const int scrollY,
const int layerDrawFlags) const;
- void drawSDL(Graphics *const graphics);
+ void drawSDL(Graphics *const graphics) const;
#ifdef USE_OPENGL
- void drawOGL(Graphics *const graphics);
+ void drawOGL(Graphics *const graphics) const;
void updateOGL(Graphics *const graphics,
int startX, int startY,
@@ -130,22 +131,23 @@ class MapLayer final: public ConfigListener
void optionChanged(const std::string &value) override final;
+ protected:
static int getTileDrawWidth(const Image *img,
const int endX,
int &width) A_WARN_UNUSED;
private:
- int mX;
- int mY;
- int mWidth;
- int mHeight;
- Image **mTiles;
- SpecialLayer *mSpecialLayer;
- SpecialLayer *mTempLayer;
+ const int mX;
+ const int mY;
+ const int mWidth;
+ const int mHeight;
+ Image **const mTiles;
+ const SpecialLayer *mSpecialLayer;
+ const SpecialLayer *mTempLayer;
typedef std::vector<MapRowVertexes*> MapRows;
MapRows mTempRows;
int mMask;
- bool mIsFringeLayer; /**< Whether the actors are drawn. */
+ const bool mIsFringeLayer; /**< Whether the actors are drawn. */
bool mHighlightAttackRange;
};