From 2c302cc6cb54881fbe354cc9d5a9997788f63e56 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Oct 2015 20:05:29 +0300 Subject: Add structure for tile object. Now it contains only image pointer. --- src/resources/map/maplayer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/resources/map/maplayer.h') diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index be17804d8..8c36fa771 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -29,6 +29,8 @@ #include "enums/resources/map/maptype.h" +#include "resources/map/tileinfo.h" + #include class Image; @@ -76,7 +78,7 @@ class MapLayer final: public ConfigListener * Set tile image with x + y * width already known. */ void setTile(const int index, Image *const img) - { mTiles[index] = img; } + { mTiles[index].image = img; } /** * Draws this layer to the given graphics context. The coordinates are @@ -157,7 +159,7 @@ class MapLayer final: public ConfigListener const int mY; const int mWidth; const int mHeight; - Image **const mTiles; + TileInfo *const mTiles; MapTypeT mDrawLayerFlags; const SpecialLayer *mSpecialLayer; const SpecialLayer *mTempLayer; -- cgit v1.2.3-60-g2f50