aboutsummaryrefslogtreecommitdiff
path: root/src/shared/vmap/IVMapManager.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:51:44 -0700
committermaximius <none@none>2009-10-17 15:51:44 -0700
commite585187b248f48b3c6e9247b49fa07c6565d65e5 (patch)
tree637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/shared/vmap/IVMapManager.h
parent26b5e033ffde3d161382fc9addbfa99738379641 (diff)
*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
Diffstat (limited to 'src/shared/vmap/IVMapManager.h')
-rw-r--r--src/shared/vmap/IVMapManager.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/shared/vmap/IVMapManager.h b/src/shared/vmap/IVMapManager.h
index 40bb3164c0e..243a15aef73 100644
--- a/src/shared/vmap/IVMapManager.h
+++ b/src/shared/vmap/IVMapManager.h
@@ -17,36 +17,50 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#ifndef _IVMAPMANAGER_H
#define _IVMAPMANAGER_H
+
#include<string>
+
//===========================================================
+
/**
This is the minimum interface to the VMapMamager.
*/
+
namespace VMAP
{
+
enum VMAP_LOAD_RESULT
{
VMAP_LOAD_RESULT_ERROR,
VMAP_LOAD_RESULT_OK,
VMAP_LOAD_RESULT_IGNORED,
};
+
#define VMAP_INVALID_HEIGHT -100000.0f // for check
#define VMAP_INVALID_HEIGHT_VALUE -200000.0f // real assigned value in unknown height case
+
//===========================================================
class IVMapManager
{
private:
bool iEnableLineOfSightCalc;
bool iEnableHeightCalc;
+
public:
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) {}
+
virtual ~IVMapManager(void) {}
+
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
+
virtual bool existsMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
+
virtual void unloadMap(unsigned int pMapId, int x, int y) = 0;
virtual void unloadMap(unsigned int pMapId) = 0;
+
virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2) = 0;
virtual float getHeight(unsigned int pMapId, float x, float y, float z) = 0;
/**
@@ -58,6 +72,7 @@ namespace VMAP
send debug commands
*/
virtual bool processCommand(char *pCommand)= 0;
+
/**
Enable/disable LOS calculation
It is enabled by default. If it is enabled in mid game the maps have to loaded manualy
@@ -68,9 +83,11 @@ namespace VMAP
It is enabled by default. If it is enabled in mid game the maps have to loaded manualy
*/
void setEnableHeightCalc(bool pVal) { iEnableHeightCalc = pVal; }
+
bool isLineOfSightCalcEnabled() const { return(iEnableLineOfSightCalc); }
bool isHeightCalcEnabled() const { return(iEnableHeightCalc); }
bool isMapLoadingEnabled() const { return(iEnableLineOfSightCalc || iEnableHeightCalc ); }
+
virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const =0;
/**
Block maps from being used.
@@ -79,6 +96,7 @@ namespace VMAP
*/
virtual void preventMapsFromBeingUsed(const char* pMapIdString) =0;
};
+
}
#endif