1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwrender/globalmap.hpp
scrawl d3d6dfbde8 Refactored loading screen
- Add loading progress for data files, global map, terrain
 - Refactored and improved cell loading progress
2013-08-27 15:48:13 +02:00

52 lines
1001 B
C++

#ifndef _GAME_RENDER_GLOBALMAP_H
#define _GAME_RENDER_GLOBALMAP_H
#include <string>
#include <OgreTexture.h>
namespace Loading
{
class Listener;
}
namespace MWRender
{
class GlobalMap
{
public:
GlobalMap(const std::string& cacheDir);
void render(Loading::Listener* loadingListener);
int getWidth() { return mWidth; }
int getHeight() { return mHeight; }
void worldPosToImageSpace(float x, float z, float& imageX, float& imageY);
///< @param x x ogre coords
/// @param z z ogre coords
void cellTopLeftCornerToImageSpace(int x, int y, float& imageX, float& imageY);
void exploreCell (int cellX, int cellY);
private:
std::string mCacheDir;
std::vector< std::pair<int,int> > mExploredCells;
Ogre::TexturePtr mOverlayTexture;
std::vector<Ogre::uchar> mExploredBuffer;
int mWidth;
int mHeight;
int mMinX, mMaxX, mMinY, mMaxY;
};
}
#endif