00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #if !defined(__COORD_H__)
00032 #define __COORD_H__
00033
00034
00035
00036 class cCoord;
00037
00038
00039
00040
00041
00042
00043 class cCoord
00044 {
00045 public:
00046 cCoord(void);
00047 cCoord(const cCoord& clCoord);
00048 cCoord(UI16, UI16, SI08 = 0, UI08 uiMap = 0, UI08 uiPlane = 0);
00049
00050 cCoord& operator= (const cCoord& clCoord);
00051 bool operator==(const cCoord&) const;
00052 bool operator!=(const cCoord&) const;
00053 cCoord operator+(const cCoord& src) const;
00054 cCoord operator-(const cCoord& src) const;
00055 bool cCoord::operator< (const cCoord& src) const;
00056 unsigned int distance( const cCoord &src) const;
00057 unsigned char direction( const cCoord &dest ) const;
00058 bool lineOfSight( const cCoord &target, bool touch = false );
00059 bool lineOfSight( const cCoord &target, UI16 targethight, bool touch = false );
00060 static UI32 distance ( const cCoord &a, const cCoord &b );
00061
00065 void effect( UI16 id, UI08 speed = 10, UI08 duration = 5, UI16 hue = 0, UI16 renderMode = 0 );
00066
00067 static cCoord null;
00068
00069 private:
00070 double specialFloor( const double value ) const;
00071
00072 public:
00073 UI16 x;
00074 UI16 y;
00075 SI08 z;
00076 UI08 map;
00077 };
00078
00079 #endif // __COORD_H__