summaryrefslogtreecommitdiff
path: root/src/resources/map/maplayer.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-16 15:07:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-16 15:31:05 +0300
commit0bfeccc16c5606cec5979b49c5d6b3bd298912fb (patch)
tree6294d19e429c3c6e9386f0e70260607bdfb7f315 /src/resources/map/maplayer.h
parent407a4233221c2280ef2a92914c8d23e463aa665c (diff)
downloadmanaplus-0bfeccc16c5606cec5979b49c5d6b3bd298912fb.tar.gz
manaplus-0bfeccc16c5606cec5979b49c5d6b3bd298912fb.tar.bz2
manaplus-0bfeccc16c5606cec5979b49c5d6b3bd298912fb.tar.xz
manaplus-0bfeccc16c5606cec5979b49c5d6b3bd298912fb.zip
Improve a bit map layers draw.
Also fix issue with some map draw modes.
Diffstat (limited to 'src/resources/map/maplayer.h')
-rw-r--r--src/resources/map/maplayer.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h
index 6eebe5713..d02f4f7b1 100644
--- a/src/resources/map/maplayer.h
+++ b/src/resources/map/maplayer.h
@@ -27,6 +27,8 @@
#include "being/actor.h"
+#include "resources/map/maptype.h"
+
#include <vector>
class Image;
@@ -86,8 +88,7 @@ class MapLayer final: public ConfigListener
*/
void draw(Graphics *const graphics,
int startX, int startY, int endX, int endY,
- const int scrollX, const int scrollY,
- const int layerDrawFlags) const;
+ const int scrollX, const int scrollY) const;
void drawSDL(Graphics *const graphics) const;
@@ -97,22 +98,20 @@ class MapLayer final: public ConfigListener
void updateOGL(Graphics *const graphics,
int startX, int startY,
int endX, int endY,
- const int scrollX, const int scrollY,
- const int layerDrawFlags);
+ const int scrollX, const int scrollY);
#endif
void updateSDL(const Graphics *const graphics,
int startX, int startY,
int endX, int endY,
- const int scrollX, const int scrollY,
- const int layerDrawFlags);
+ const int scrollX, const int scrollY);
void drawFringe(Graphics *const graphics,
int startX, int startY,
int endX, int endY,
const int scrollX, const int scrollY,
const Actors *const actors,
- const int layerDrawFlags, const int yFix) const;
+ const int yFix) const;
bool isFringeLayer() const A_WARN_UNUSED
{ return mIsFringeLayer; }
@@ -131,6 +130,8 @@ class MapLayer final: public ConfigListener
void optionChanged(const std::string &value) override final;
+ void setDrawLayerFlags(const MapType::MapType &n);
+
protected:
static int getTileDrawWidth(const Image *img,
const int endX,
@@ -142,6 +143,7 @@ class MapLayer final: public ConfigListener
const int mWidth;
const int mHeight;
Image **const mTiles;
+ MapType::MapType mDrawLayerFlags;
const SpecialLayer *mSpecialLayer;
const SpecialLayer *mTempLayer;
typedef std::vector<MapRowVertexes*> MapRows;
@@ -149,6 +151,7 @@ class MapLayer final: public ConfigListener
int mMask;
const bool mIsFringeLayer; /**< Whether the actors are drawn. */
bool mHighlightAttackRange;
+ bool mSpecialFlag;
};
#endif // RESOURCES_MAP_MAPLAYER_H