summaryrefslogtreecommitdiffstats
path: root/src/taskgoto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/taskgoto.cpp')
-rw-r--r--src/taskgoto.cpp158
1 files changed, 79 insertions, 79 deletions
diff --git a/src/taskgoto.cpp b/src/taskgoto.cpp
index a90c216..931f2a3 100644
--- a/src/taskgoto.cpp
+++ b/src/taskgoto.cpp
@@ -1,4 +1,4 @@
-// * This file is part of the COLOBOT source code
+// * This file is part of the COLOBOT source code
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
// *
// * This program is free software: you can redistribute it and/or modify
@@ -12,7 +12,7 @@
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License
-// * along with this program. If not, see http://www.gnu.org/licenses/.
+// * along with this program. If not, see http://www.gnu.org/licenses/.// taskgoto.cpp
#define STRICT
#define D3D_OVERLOADS
@@ -38,7 +38,7 @@
#define FLY_DIST_GROUND 80.0f // distance minimale pour rester au sol
-#define FLY_DEF_HEIGHT 50.0f // hauteur de vol par d�faut
+#define FLY_DEF_HEIGHT 50.0f // hauteur de vol par défaut
#define BM_DIM_STEP 5.0f
@@ -62,7 +62,7 @@ CTaskGoto::~CTaskGoto()
}
-// Gestion d'un �v�nement.
+// Gestion d'un événement.
BOOL CTaskGoto::EventProcess(const Event &event)
{
@@ -74,7 +74,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
if ( m_engine->RetPause() ) return TRUE;
if ( event.event != EVENT_FRAME ) return TRUE;
- // Objet momentan�ment immobile (fourmi sur le dos) ?
+ // Objet momentanément immobile (fourmi sur le dos) ?
if ( m_object->RetFixed() )
{
m_physics->SetMotorSpeedX(0.0f); // stoppe l'avance
@@ -111,7 +111,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
a = NormAngle(a);
if ( a > PI*0.5f && a < PI*1.5f )
{
- linSpeed = 1.0f; // obstacle derri�re -> avance
+ linSpeed = 1.0f; // obstacle derrière -> avance
cirSpeed = -cirSpeed;
}
else
@@ -125,7 +125,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
cirSpeed = 0.0f;
}
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
m_physics->SetMotorSpeedX(linSpeed); // avance
return TRUE;
}
@@ -134,7 +134,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
{
if ( m_bmStep == 0 )
{
- // Lib�re la zone autour du d�part.
+ // Libère la zone autour du départ.
BitmapClearCircle(m_object->RetPosition(0), BM_DIM_STEP*1.8f);
}
@@ -193,12 +193,12 @@ BOOL CTaskGoto::EventProcess(const Event &event)
return TRUE;
}
- if ( m_phase == TGP_BEAMWCOLD ) // attend refroidissement r�acteur ?
+ if ( m_phase == TGP_BEAMWCOLD ) // attend refroidissement réacteur ?
{
return TRUE;
}
- if ( m_phase == TGP_BEAMUP ) // d�colle ?
+ if ( m_phase == TGP_BEAMUP ) // décolle ?
{
m_physics->SetMotorSpeedY(1.0f); // monte
return TRUE;
@@ -274,7 +274,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
}
else
{
- linSpeed = 1.0f; // fonce sans s'arr�ter
+ linSpeed = 1.0f; // fonce sans s'arrêter
}
linSpeed *= 1.0f-(1.0f-0.3f)*Abs(cirSpeed);
@@ -304,7 +304,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
return TRUE;
}
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
m_physics->SetMotorSpeedX(linSpeed); // avance
return TRUE;
}
@@ -358,7 +358,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
if ( cirSpeed > 1.0f ) cirSpeed = 1.0f;
if ( cirSpeed < -1.0f ) cirSpeed = -1.0f;
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
m_physics->SetMotorSpeedX(1.0f); // avance
return TRUE;
}
@@ -434,7 +434,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
//? if ( m_physics->RetType() == TYPE_FLYING &&
//? m_physics->RetLand() ) // volant au sol ?
//? {
-//? cirSpeed *= 4.0f; // plus de p�che
+//? cirSpeed *= 4.0f; // plus de pèche
//? }
if ( cirSpeed > 1.0f ) cirSpeed = 1.0f;
if ( cirSpeed < -1.0f ) cirSpeed = -1.0f;
@@ -444,7 +444,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
//? if ( m_physics->RetType() == TYPE_FLYING &&
//? m_physics->RetLand() ) // volant au sol ?
//? {
-//? linSpeed *= 8.0f; // plus de p�che
+//? linSpeed *= 8.0f; // plus de pèche
//? }
if ( linSpeed > 1.0f ) linSpeed = 1.0f;
@@ -456,13 +456,13 @@ BOOL CTaskGoto::EventProcess(const Event &event)
}
#endif
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
m_physics->SetMotorSpeedX(linSpeed); // avance
}
if ( m_phase == TGP_TURN || // tourne vers l'objet ?
- m_phase == TGP_CRTURN || // tourne apr�s collision ?
- m_phase == TGP_CLTURN ) // tourne apr�s collision ?
+ m_phase == TGP_CRTURN || // tourne après collision ?
+ m_phase == TGP_CLTURN ) // tourne après collision ?
{
a = m_object->RetAngleY(0);
g = m_angle;
@@ -470,18 +470,18 @@ BOOL CTaskGoto::EventProcess(const Event &event)
if ( cirSpeed > 1.0f ) cirSpeed = 1.0f;
if ( cirSpeed < -1.0f ) cirSpeed = -1.0f;
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
}
- if ( m_phase == TGP_CRWAIT || // attend apr�s collision ?
- m_phase == TGP_CLWAIT ) // attend apr�s collision ?
+ if ( m_phase == TGP_CRWAIT || // attend après collision ?
+ m_phase == TGP_CLWAIT ) // attend après collision ?
{
m_time += event.rTime;
m_physics->SetMotorSpeedX(0.0f); // stoppe l'avance
m_physics->SetMotorSpeedZ(0.0f); // stoppe la rotation
}
- if ( m_phase == TGP_CRADVANCE ) // avance apr�s collision ?
+ if ( m_phase == TGP_CRADVANCE ) // avance après collision ?
{
if ( m_physics->RetCollision() ) // collision ?
{
@@ -493,7 +493,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
m_physics->SetMotorSpeedX(0.5f); // avance mollo
}
- if ( m_phase == TGP_CLADVANCE ) // avance apr�s collision ?
+ if ( m_phase == TGP_CLADVANCE ) // avance après collision ?
{
if ( m_physics->RetCollision() ) // collision ?
{
@@ -579,7 +579,7 @@ CObject* CTaskGoto::WormSearch(D3DVECTOR &impact)
oType != OBJECT_SAFE &&
oType != OBJECT_HUSTON ) continue;
- if ( pObj->RetVirusMode() ) continue; // objet infect� ?
+ if ( pObj->RetVirusMode() ) continue; // objet infecté ?
if ( !pObj->GetCrashSphere(0, oPos, radius) ) continue;
distance = Length2d(oPos, iPos);
@@ -616,7 +616,7 @@ void CTaskGoto::WormFrame(float rTime)
dist = Length(pos, impact);
if ( dist <= 15.0f )
{
- pObj->SetVirusMode(TRUE); // paf, infect� !
+ pObj->SetVirusMode(TRUE); // paf, infecté !
}
}
}
@@ -624,9 +624,9 @@ void CTaskGoto::WormFrame(float rTime)
-// Assigne le but � atteindre.
-// "dist" est la distance de laquelle il faut s'�loigner pour
-// prendre ou d�poser un objet.
+// Assigne le but à atteindre.
+// "dist" est la distance de laquelle il faut s'éloigner pour
+// prendre ou déposer un objet.
Error CTaskGoto::Start(D3DVECTOR goal, float altitude,
TaskGotoGoal goalMode, TaskGotoCrash crashMode)
@@ -720,7 +720,7 @@ Error CTaskGoto::Start(D3DVECTOR goal, float altitude,
dist = 0.0f;
AdjustTarget(target, m_goal, dist);
}
- m_bTake = TRUE; // objet � prendre � l'arriv�e (rotation finale)
+ m_bTake = TRUE; // objet à prendre à l'arrivée (rotation finale)
}
}
@@ -743,23 +743,23 @@ Error CTaskGoto::Start(D3DVECTOR goal, float altitude,
dist = 4.0f;
if ( AdjustTarget(target, m_goal, dist) )
{
- m_bmFretObject = target; // fret pos� au sol
+ m_bmFretObject = target; // fret posé au sol
}
else
{
m_bmFinalMove = dist;
}
}
- m_bTake = TRUE; // objet � prendre � l'arriv�e (rotation finale)
+ m_bTake = TRUE; // objet à prendre à l'arrivée (rotation finale)
}
if ( m_physics->RetType() == TYPE_FLYING && m_altitude == 0.0f )
{
pos = m_object->RetPosition(0);
dist = Length2d(pos, m_goal);
- if ( dist > FLY_DIST_GROUND ) // plus de 20 m�tres ?
+ if ( dist > FLY_DIST_GROUND ) // plus de 20 mètres ?
{
- m_altitude = FLY_DEF_HEIGHT; // altitude par d�faut
+ m_altitude = FLY_DEF_HEIGHT; // altitude par défaut
}
}
@@ -769,7 +769,7 @@ Error CTaskGoto::Start(D3DVECTOR goal, float altitude,
{
x = (int)((m_goal.x+1600.0f)/BM_DIM_STEP);
y = (int)((m_goal.z+1600.0f)/BM_DIM_STEP);
- if ( BitmapTestDot(0, x, y) ) // arriv�e occup�e ?
+ if ( BitmapTestDot(0, x, y) ) // arrivée occupée ?
{
#if 0
D3DVECTOR min, max;
@@ -792,7 +792,7 @@ Error CTaskGoto::Start(D3DVECTOR goal, float altitude,
return ERR_OK;
}
-// Indique si l'action est termin�e.
+// Indique si l'action est terminée.
Error CTaskGoto::IsEnded()
{
@@ -821,14 +821,14 @@ Error CTaskGoto::IsEnded()
return ERR_CONTINUE;
}
- if ( m_phase == TGP_BEAMWCOLD ) // attend refroidissement r�acteur ?
+ if ( m_phase == TGP_BEAMWCOLD ) // attend refroidissement réacteur ?
{
if ( m_altitude != 0.0f &&
m_physics->RetReactorRange() < 1.0f ) return ERR_CONTINUE;
m_phase = TGP_BEAMUP;
}
- if ( m_phase == TGP_BEAMUP ) // d�colle ?
+ if ( m_phase == TGP_BEAMUP ) // décolle ?
{
if ( m_physics->RetType() == TYPE_FLYING && m_altitude > 0.0f )
{
@@ -838,7 +838,7 @@ Error CTaskGoto::IsEnded()
if ( h > limit ) h = limit;
if ( pos.y < h-1.0f ) return ERR_CONTINUE;
- m_physics->SetMotorSpeedY(0.0f); // stoppe la mont�e
+ m_physics->SetMotorSpeedY(0.0f); // stoppe la montée
}
m_phase = TGP_BEAMGOTO;
}
@@ -862,7 +862,7 @@ Error CTaskGoto::IsEnded()
else // en vol ?
{
limit = 2.0f;
- if ( m_bmIndex < m_bmTotal ) limit *= 2.0f; // point interm�diaire
+ if ( m_bmIndex < m_bmTotal ) limit *= 2.0f; // point intermédiaire
}
if ( m_bApprox ) limit = 2.0f;
@@ -969,7 +969,7 @@ Error CTaskGoto::IsEnded()
}
}
- if ( m_phase == TGP_CRWAIT ) // attend apr�s collision ?
+ if ( m_phase == TGP_CRWAIT ) // attend après collision ?
{
if ( m_crashMode == TGC_HALT )
{
@@ -981,15 +981,15 @@ Error CTaskGoto::IsEnded()
if ( m_time >= 1.0f )
{
if ( m_crashMode == TGC_RIGHTLEFT ||
- m_crashMode == TGC_RIGHT ) angle = PI/2.0f; // 90 � droite
- else angle = -PI/2.0f; // 90 � gauche
+ m_crashMode == TGC_RIGHT ) angle = PI/2.0f; // 90 à droite
+ else angle = -PI/2.0f; // 90 à gauche
m_angle = NormAngle(m_object->RetAngleY(0)+angle);
m_phase = TGP_CRTURN;
//? m_phase = TGP_ADVANCE;
}
}
- if ( m_phase == TGP_CRTURN ) // tourne apr�s collision ?
+ if ( m_phase == TGP_CRTURN ) // tourne après collision ?
{
angle = NormAngle(m_object->RetAngleY(0));
limit = 0.1f;
@@ -1001,7 +1001,7 @@ Error CTaskGoto::IsEnded()
}
}
- if ( m_phase == TGP_CRADVANCE ) // avance apr�s collision ?
+ if ( m_phase == TGP_CRADVANCE ) // avance après collision ?
{
if ( Length(pos, m_pos) >= 5.0f )
{
@@ -1009,7 +1009,7 @@ Error CTaskGoto::IsEnded()
}
}
- if ( m_phase == TGP_CLWAIT ) // attend apr�s collision ?
+ if ( m_phase == TGP_CLWAIT ) // attend après collision ?
{
if ( m_time >= 1.0f )
{
@@ -1022,7 +1022,7 @@ Error CTaskGoto::IsEnded()
}
}
- if ( m_phase == TGP_CLTURN ) // tourne apr�s collision ?
+ if ( m_phase == TGP_CLTURN ) // tourne après collision ?
{
angle = NormAngle(m_object->RetAngleY(0));
limit = 0.1f;
@@ -1034,7 +1034,7 @@ Error CTaskGoto::IsEnded()
}
}
- if ( m_phase == TGP_CLADVANCE ) // avance apr�s collision ?
+ if ( m_phase == TGP_CLADVANCE ) // avance après collision ?
{
if ( Length(pos, m_pos) >= 10.0f )
{
@@ -1062,7 +1062,7 @@ Error CTaskGoto::IsEnded()
}
-// Cherche l'objet � la position cible.
+// Cherche l'objet à la position cible.
CObject* CTaskGoto::SearchTarget(D3DVECTOR pos, float margin)
{
@@ -1079,7 +1079,7 @@ CObject* CTaskGoto::SearchTarget(D3DVECTOR pos, float margin)
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet port� ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet porté ?
oPos = pObj->RetPosition(0);
dist = Length2d(pos, oPos);
@@ -1095,8 +1095,8 @@ CObject* CTaskGoto::SearchTarget(D3DVECTOR pos, float margin)
}
// Ajuste la cible en fonction de l'objet.
-// Retourne TRUE s'il s'agit de fret pos� au sol, dont on peut
-// s'approcher par n'importe quel c�t�.
+// Retourne TRUE s'il s'agit de fret posé au sol, dont on peut
+// s'approcher par n'importe quel côté.
BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
{
@@ -1146,7 +1146,7 @@ BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
goal = pObj->RetPosition(0);
dist = Length(goal, pos);
pos = (pos-goal)*(TAKE_DIST+distance)/dist + goal;
- return TRUE; // approche par tous les c�t�s
+ return TRUE; // approche par tous les côtés
}
if ( type == OBJECT_BASE )
@@ -1155,7 +1155,7 @@ BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
goal = pObj->RetPosition(0);
dist = Length(goal, pos);
pos = (pos-goal)*(TAKE_DIST+distance)/dist + goal;
- return TRUE; // approche par tous les c�t�s
+ return TRUE; // approche par tous les côtés
}
if ( type == OBJECT_MOBILEfa ||
@@ -1206,8 +1206,8 @@ BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
return FALSE; // approche unique
}
-// S'il on est sur un objet produit par un b�timent (minerai produit
-// par derrick), modifie la position par-rapport au b�timent.
+// S'il on est sur un objet produit par un bâtiment (minerai produit
+// par derrick), modifie la position par-rapport au bâtiment.
BOOL CTaskGoto::AdjustBuilding(D3DVECTOR &pos, float margin, float &distance)
{
@@ -1222,7 +1222,7 @@ BOOL CTaskGoto::AdjustBuilding(D3DVECTOR &pos, float margin, float &distance)
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet port� ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet porté ?
if ( !GetHotPoint(pObj, oPos, FALSE, 0.0f, suppl) ) continue;
dist = Length2d(pos, oPos);
@@ -1236,7 +1236,7 @@ BOOL CTaskGoto::AdjustBuilding(D3DVECTOR &pos, float margin, float &distance)
return FALSE;
}
-// Retourne le point o� est produit ou pos� qq chose sur un b�timent.
+// Retourne le point où est produit ou posé qq chose sur un bâtiment.
BOOL CTaskGoto::GetHotPoint(CObject *pObj, D3DVECTOR &pos,
BOOL bTake, float distance, float &suppl)
@@ -1394,7 +1394,7 @@ BOOL CTaskGoto::LeakSearch(D3DVECTOR &pos, float &delay)
if ( pObj == m_object ) continue;
if ( !pObj->RetActif() ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet port� ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet porté ?
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
@@ -1428,7 +1428,7 @@ BOOL CTaskGoto::LeakSearch(D3DVECTOR &pos, float &delay)
}
-// Calcule la force de r�pulsion en fonction des obstacles.
+// Calcule la force de répulsion en fonction des obstacles.
// La longueur du vecteur rendu est comprise entre 0 et 1.
void CTaskGoto::ComputeRepulse(FPOINT &dir)
@@ -1489,7 +1489,7 @@ void CTaskGoto::ComputeRepulse(FPOINT &dir)
dir.x = 0.0f;
dir.y = 0.0f;
- // Le ver passe partout et � travers tout !
+ // Le ver passe partout et à travers tout !
iType = m_object->RetType();
if ( iType == OBJECT_WORM ) return;
@@ -1544,7 +1544,7 @@ void CTaskGoto::ComputeRepulse(FPOINT &dir)
add = 4.0f;
fac = 1.5f;
}
- if ( iType == OBJECT_BEE ) // gu�pe ?
+ if ( iType == OBJECT_BEE ) // guêpe ?
{
if ( m_physics->RetLand() )
{
@@ -1610,7 +1610,7 @@ void CTaskGoto::ComputeRepulse(FPOINT &dir)
if ( iType == OBJECT_BEE &&
oType == OBJECT_BEE )
{
- addi = 2.0f; // entre gu�pes, faut pas trop s'emb�ter
+ addi = 2.0f; // entre guèpes, faut pas trop s'embêter
}
j = 0;
@@ -1643,7 +1643,7 @@ void CTaskGoto::ComputeRepulse(FPOINT &dir)
#endif
}
-// Calcule la force de r�pulsion verticale en fonction des obstacles.
+// Calcule la force de répulsion verticale en fonction des obstacles.
// La longueur du vecteur rendu est comprise entre -1 et 1.
void CTaskGoto::ComputeFlyingRepulse(float &dir)
@@ -1697,8 +1697,8 @@ void CTaskGoto::ComputeFlyingRepulse(float &dir)
// Parmi tous les points suivants, cherche s'il en existe un qui
-// permet d'y aller directement � vol d'oiseau. Si oui, saute tous
-// les points interm�diaires inutiles.
+// permet d'y aller directement à vol d'oiseau. Si oui, saute tous
+// les points intermédiaires inutiles.
int CTaskGoto::BeamShortcut()
{
@@ -1708,14 +1708,14 @@ int CTaskGoto::BeamShortcut()
{
if ( BitmapTestLine(m_bmPoints[m_bmIndex], m_bmPoints[i], 0.0f, FALSE) )
{
- return i; // bingo, trouv�
+ return i; // bingo, trouvé
}
}
return m_bmIndex+1; // va simplement au point suivant
}
-// C'est le grand d�part.
+// C'est le grand départ.
void CTaskGoto::BeamStart()
{
@@ -1761,13 +1761,13 @@ void CTaskGoto::BeamInit()
m_bmStep = 0;
}
-// Calcule les points par o� passer pour aller de start � goal.
+// Calcule les points par où passer pour aller de start à goal.
// Retourne :
// ERR_OK si c'est bon
// ERR_GOTO_IMPOSSIBLE si impossible
-// ERR_GOTO_ITER si avort� car trop de r�cursions
+// ERR_GOTO_ITER si avorté car trop de récursions
// ERR_CONTINUE si pas encore fini
-// goalRadius: distance � laquelle il faut s'approcher du but
+// goalRadius: distance à laquelle il faut s'approcher du but
Error CTaskGoto::BeamSearch(const D3DVECTOR &start, const D3DVECTOR &goal,
float goalRadius)
@@ -1786,13 +1786,13 @@ Error CTaskGoto::BeamSearch(const D3DVECTOR &start, const D3DVECTOR &goal,
return BeamExplore(start, start, goal, goalRadius, 165.0f*PI/180.0f, 22, step, 0, nbIter);
}
-// prevPos: position pr�c�dente
+// prevPos: position précédente
// curPos: position courante
-// goalPos: position qu'on cherche � atteindre
+// goalPos: position qu'on cherche à atteindre
// angle: angle par rapport au but qu'on explore
// nbDiv: nombre du sous-divisions qu'on fait avec angle
// step longuer d'un pas
-// i nombre de r�cursions effectu�es
+// i nombre de récursions effectuées
// nbIter nombre max. d'iterations qu'on a le droit de faire avant d'interrompre provisoirement
Error CTaskGoto::BeamExplore(const D3DVECTOR &prevPos, const D3DVECTOR &curPos,
@@ -1805,7 +1805,7 @@ Error CTaskGoto::BeamExplore(const D3DVECTOR &prevPos, const D3DVECTOR &curPos,
int iDiv, iClear, iLar;
iLar = 0;
- if ( i >= MAXPOINTS ) return ERR_GOTO_ITER; // trop de r�cursion
+ if ( i >= MAXPOINTS ) return ERR_GOTO_ITER; // trop de récursion
if ( m_bmIter[i] == -1 )
{
@@ -1883,7 +1883,7 @@ Error CTaskGoto::BeamExplore(const D3DVECTOR &prevPos, const D3DVECTOR &curPos,
return ERR_GOTO_IMPOSSIBLE;
}
-// Soit une droite "start-goal". Calcule le point situ� � la distance
+// Soit une droite "start-goal". Calcule le point situé à la distance
// "step" du point "start" et faisant un angle "angle" avec la droite.
D3DVECTOR CTaskGoto::BeamPoint(const D3DVECTOR &startPoint,
@@ -2005,7 +2005,7 @@ BOOL CTaskGoto::BitmapTestLine(const D3DVECTOR &start, const D3DVECTOR &goal,
{
x = (int)((pos.x+1600.0f)/BM_DIM_STEP);
y = (int)((pos.z+1600.0f)/BM_DIM_STEP);
- BitmapSetDot(1, x, y); // met le flag du point de d�part
+ BitmapSetDot(1, x, y); // met le flag du point de départ
}
max = (int)(dist/step);
@@ -2015,7 +2015,7 @@ BOOL CTaskGoto::BitmapTestLine(const D3DVECTOR &start, const D3DVECTOR &goal,
{
if ( i == max-1 )
{
- pos = goal; // teste le point d'arriv�e
+ pos = goal; // teste le point d'arrivée
}
else
{
@@ -2290,7 +2290,7 @@ void CTaskGoto::BitmapSetCircle(const D3DVECTOR &pos, float radius)
}
}
-// Enl�ve un cercle dans le bitmap.
+// Enlève un cercle dans le bitmap.
void CTaskGoto::BitmapClearCircle(const D3DVECTOR &pos, float radius)
{
@@ -2323,7 +2323,7 @@ void CTaskGoto::BitmapSetDot(int rank, int x, int y)
m_bmArray[rank*m_bmLine*m_bmSize + m_bmLine*y + x/8] |= (1<<x%8);
}
-// Enl�ve un point dans le bitmap.
+// Enlève un point dans le bitmap.
// x:y: 0..m_bmSize-1
void CTaskGoto::BitmapClearDot(int rank, int x, int y)