summaryrefslogtreecommitdiffstats
path: root/src/object/task/taskgoto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/task/taskgoto.h')
-rw-r--r--src/object/task/taskgoto.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/object/task/taskgoto.h b/src/object/task/taskgoto.h
index d0e4953..97009d4 100644
--- a/src/object/task/taskgoto.h
+++ b/src/object/task/taskgoto.h
@@ -84,43 +84,43 @@ public:
bool EventProcess(const Event &event);
- Error Start(D3DVECTOR goal, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode);
+ Error Start(Math::Vector goal, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode);
Error IsEnded();
protected:
- CObject* WormSearch(D3DVECTOR &impact);
+ CObject* WormSearch(Math::Vector &impact);
void WormFrame(float rTime);
- CObject* SearchTarget(D3DVECTOR pos, float margin);
- bool AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance);
- bool AdjustBuilding(D3DVECTOR &pos, float margin, float &distance);
- bool GetHotPoint(CObject *pObj, D3DVECTOR &pos, bool bTake, float distance, float &suppl);
- bool LeakSearch(D3DVECTOR &pos, float &delay);
+ CObject* SearchTarget(Math::Vector pos, float margin);
+ bool AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance);
+ bool AdjustBuilding(Math::Vector &pos, float margin, float &distance);
+ bool GetHotPoint(CObject *pObj, Math::Vector &pos, bool bTake, float distance, float &suppl);
+ bool LeakSearch(Math::Vector &pos, float &delay);
void ComputeRepulse(Math::Point &dir);
void ComputeFlyingRepulse(float &dir);
int BeamShortcut();
void BeamStart();
void BeamInit();
- Error BeamSearch(const D3DVECTOR &start, const D3DVECTOR &goal, float goalRadius);
- Error BeamExplore(const D3DVECTOR &prevPos, const D3DVECTOR &curPos, const D3DVECTOR &goalPos, float goalRadius, float angle, int nbDiv, float step, int i, int nbIter);
- D3DVECTOR BeamPoint(const D3DVECTOR &startPoint, const D3DVECTOR &goalPoint, float angle, float step);
+ Error BeamSearch(const Math::Vector &start, const Math::Vector &goal, float goalRadius);
+ Error BeamExplore(const Math::Vector &prevPos, const Math::Vector &curPos, const Math::Vector &goalPos, float goalRadius, float angle, int nbDiv, float step, int i, int nbIter);
+ Math::Vector BeamPoint(const Math::Vector &startPoint, const Math::Vector &goalPoint, float angle, float step);
- void BitmapDebug(const D3DVECTOR &min, const D3DVECTOR &max, const D3DVECTOR &start, const D3DVECTOR &goal);
- bool BitmapTestLine(const D3DVECTOR &start, const D3DVECTOR &goal, float stepAngle, bool bSecond);
+ void BitmapDebug(const Math::Vector &min, const Math::Vector &max, const Math::Vector &start, const Math::Vector &goal);
+ bool BitmapTestLine(const Math::Vector &start, const Math::Vector &goal, float stepAngle, bool bSecond);
void BitmapObject();
- void BitmapTerrain(const D3DVECTOR &min, const D3DVECTOR &max);
+ void BitmapTerrain(const Math::Vector &min, const Math::Vector &max);
void BitmapTerrain(int minx, int miny, int maxx, int maxy);
bool BitmapOpen();
bool BitmapClose();
- void BitmapSetCircle(const D3DVECTOR &pos, float radius);
- void BitmapClearCircle(const D3DVECTOR &pos, float radius);
+ void BitmapSetCircle(const Math::Vector &pos, float radius);
+ void BitmapClearCircle(const Math::Vector &pos, float radius);
void BitmapSetDot(int rank, int x, int y);
void BitmapClearDot(int rank, int x, int y);
bool BitmapTestDot(int rank, int x, int y);
protected:
- D3DVECTOR m_goal;
- D3DVECTOR m_goalObject;
+ Math::Vector m_goal;
+ Math::Vector m_goalObject;
float m_angle;
float m_altitude;
TaskGotoCrash m_crashMode;
@@ -131,7 +131,7 @@ protected:
bool m_bTake;
float m_stopLength; // braking distance
float m_time;
- D3DVECTOR m_pos;
+ Math::Vector m_pos;
bool m_bWorm;
bool m_bApprox;
float m_wormLastTime;
@@ -145,18 +145,18 @@ protected:
int m_bmMaxX, m_bmMaxY;
int m_bmTotal; // number of points in m_bmPoints
int m_bmIndex; // index in m_bmPoints
- D3DVECTOR m_bmPoints[MAXPOINTS+2];
+ Math::Vector m_bmPoints[MAXPOINTS+2];
char m_bmIter[MAXPOINTS+2];
int m_bmIterCounter;
CObject* m_bmFretObject;
float m_bmFinalMove; // final advance distance
float m_bmFinalDist; // effective distance to advance
- D3DVECTOR m_bmFinalPos; // initial position before advance
+ Math::Vector m_bmFinalPos; // initial position before advance
float m_bmTimeLimit;
int m_bmStep;
- D3DVECTOR m_bmWatchDogPos;
+ Math::Vector m_bmWatchDogPos;
float m_bmWatchDogTime;
- D3DVECTOR m_leakPos; // initial position leak
+ Math::Vector m_leakPos; // initial position leak
float m_leakDelay;
float m_leakTime;
bool m_bLeakRecede;