#ifndef GAME_RENDER_GLOBALMAP_H #define GAME_RENDER_GLOBALMAP_H #include #include #include namespace osg { class Texture2D; } namespace Loading { class Listener; } namespace ESM { struct GlobalMap; } namespace MWRender { class GlobalMap { public: GlobalMap(); ~GlobalMap(); void render(Loading::Listener* loadingListener); int getWidth() const { return mWidth; } int getHeight() const { return mHeight; } int getCellSize() const { return mCellSize; } void worldPosToImageSpace(float x, float z, float& imageX, float& imageY); void cellTopLeftCornerToImageSpace(int x, int y, float& imageX, float& imageY); void exploreCell (int cellX, int cellY); /// Clears the overlay void clear(); void write (ESM::GlobalMap& map); void read (ESM::GlobalMap& map); osg::ref_ptr getBaseTexture(); //osg::ref_ptr getOverlayTexture(); private: int mCellSize; std::vector< std::pair > mExploredCells; osg::ref_ptr mBaseTexture; int mWidth; int mHeight; int mMinX, mMaxX, mMinY, mMaxY; }; } #endif