From 06a19f3327736f67907f012bd21bb1c0a21bb468 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 15 May 2015 14:37:33 +0300 Subject: Add missing cost to map and maplayer. --- src/resources/map/maplayer.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/resources/map/maplayer.h') 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 MapRows; MapRows mTempRows; int mMask; - bool mIsFringeLayer; /**< Whether the actors are drawn. */ + const bool mIsFringeLayer; /**< Whether the actors are drawn. */ bool mHighlightAttackRange; }; -- cgit v1.2.3-70-g09d2