1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/apps/openmw/mwrender/globalmap.hpp

52 lines
1001 B
C++
Raw Normal View History

2012-09-20 11:56:37 +00:00
#ifndef _GAME_RENDER_GLOBALMAP_H
#define _GAME_RENDER_GLOBALMAP_H
#include <string>
2012-11-04 11:13:04 +00:00
#include <OgreTexture.h>
namespace Loading
{
class Listener;
}
2012-09-20 11:56:37 +00:00
namespace MWRender
{
class GlobalMap
{
public:
GlobalMap(const std::string& cacheDir);
void render(Loading::Listener* loadingListener);
2012-09-20 11:56:37 +00:00
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);
2012-11-04 11:13:04 +00:00
void exploreCell (int cellX, int cellY);
2012-09-20 11:56:37 +00:00
private:
std::string mCacheDir;
2012-11-04 11:13:04 +00:00
std::vector< std::pair<int,int> > mExploredCells;
Ogre::TexturePtr mOverlayTexture;
std::vector<Ogre::uchar> mExploredBuffer;
int mWidth;
int mHeight;
int mMinX, mMaxX, mMinY, mMaxY;
2012-09-20 11:56:37 +00:00
};
}
#endif