diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-12 03:55:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-16 22:47:14 +0300 |
commit | d0e6d477d245610288ab622ecf47426a9dcbc400 (patch) | |
tree | e998d168d8eb4397602021b3b1411f80cc1466a9 /src/map.h | |
parent | 68b1e0ec82321757f2a29792d38d7eabb7d2cf98 (diff) | |
download | mv-d0e6d477d245610288ab622ecf47426a9dcbc400.tar.gz mv-d0e6d477d245610288ab622ecf47426a9dcbc400.tar.bz2 mv-d0e6d477d245610288ab622ecf47426a9dcbc400.tar.xz mv-d0e6d477d245610288ab622ecf47426a9dcbc400.zip |
Add tiles caching for software mode.
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 54 |
1 files changed, 47 insertions, 7 deletions
@@ -41,6 +41,7 @@ class Animation; class AmbientLayer; class Graphics; +class GraphicsVertexes; class MapLayer; class Particle; class SimpleAnimation; @@ -49,8 +50,22 @@ class SpecialLayer; class MapItem; class ObjectsLayer; +struct ImageVertexes; + typedef std::vector<Tileset*> Tilesets; typedef std::vector<MapLayer*> Layers; +typedef std::vector<ImageVertexes*> MepRowImages; + +class MapRowVertexes +{ + public: + MapRowVertexes() + { } + + ~MapRowVertexes(); + + MepRowImages images; +}; /** * A meta tile stores additional information about a location on a tile map. @@ -156,11 +171,29 @@ class MapLayer: public ConfigListener * The given actors are only drawn when this layer is the fringe * layer. */ - void draw(Graphics *graphics, - int startX, int startY, - int endX, int endY, - int scrollX, int scrollY, - int mDebugFlags) const; + void drawOGL(Graphics *graphics, + int startX, int startY, + int endX, int endY, + int scrollX, int scrollY, + int mDebugFlags); + + void drawSDL(Graphics *graphics, + int startX, int startY, + int endX, int endY, + int scrollX, int scrollY, + int mDebugFlags); + + void updateOGL(Graphics *graphics, + int startX, int startY, + int endX, int endY, + int scrollX, int scrollY, + int mDebugFlags); + + void updateSDL(Graphics *graphics, + int startX, int startY, + int endX, int endY, + int scrollX, int scrollY, + int mDebugFlags); void drawFringe(Graphics *graphics, int startX, int startY, @@ -204,6 +237,8 @@ class MapLayer: public ConfigListener // int *mTilesCount; SpecialLayer *mSpecialLayer; SpecialLayer *mTempLayer; + typedef std::vector<MapRowVertexes*> MapRows; + MapRows mTempRows; }; /** @@ -533,8 +568,8 @@ class Map : public Properties, public ConfigListener // Overlay data std::vector<AmbientLayer*> mBackgrounds; std::vector<AmbientLayer*> mForegrounds; - float mLastScrollX; - float mLastScrollY; + float mLastAScrollX; + float mLastAScrollY; // bool mSpritesUpdated; // Particle effect data @@ -567,6 +602,11 @@ class Map : public Properties, public ConfigListener SpecialLayer *mTempLayer; ObjectsLayer *mObjects; MapLayer *mFringeLayer; + + int mLastX; + int mLastY; + int mLastScrollX; + int mLastScrollY; }; |