summaryrefslogtreecommitdiffstats
path: root/src/script.cpp
diff options
context:
space:
mode:
authorKrzysztof H <krzys_h@interia.pl>2012-03-09 17:08:05 +0100
committerKrzysztof H <krzys_h@interia.pl>2012-03-09 17:08:05 +0100
commit84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71 (patch)
tree842825145ada8e6f53d1de9f100383cc028d2b46 /src/script.cpp
parenta4c804b49ec872b71bd5a0167c3ad45704a3cc30 (diff)
downloadcolobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.tar.gz
colobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.tar.bz2
colobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.zip
Added license info using a small program SrcHead.
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp184
1 files changed, 99 insertions, 85 deletions
diff --git a/src/script.cpp b/src/script.cpp
index 16ff612..0e5b89f 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1,4 +1,18 @@
-// script.cpp
+// * 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
+// * it under the terms of the GNU General Public License as published by
+// * the Free Software Foundation, either version 3 of the License, or
+// * (at your option) any later version.
+// *
+// * This program is distributed in the hope that it will be useful,
+// * but WITHOUT ANY WARRANTY; without even the implied warranty of
+// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// * 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 .
#define STRICT
#define D3D_OVERLOADS
@@ -45,7 +59,7 @@
-// Compilation d'une procédure sans ancun paramètre.
+// Compilation d'une proc�dure sans ancun param�tre.
CBotTypResult cNull(CBotVar* &var, void* user)
{
@@ -53,7 +67,7 @@ CBotTypResult cNull(CBotVar* &var, void* user)
return CBotTypResult(CBotTypFloat);
}
-// Compilation d'une procédure avec un seul nombre réel.
+// Compilation d'une proc�dure avec un seul nombre r�el.
CBotTypResult cOneFloat(CBotVar* &var, void* user)
{
@@ -64,7 +78,7 @@ CBotTypResult cOneFloat(CBotVar* &var, void* user)
return CBotTypResult(CBotTypFloat);
}
-// Compilation d'une procédure avec deux nombres réels.
+// Compilation d'une proc�dure avec deux nombres r�els.
CBotTypResult cTwoFloat(CBotVar* &var, void* user)
{
@@ -80,7 +94,7 @@ CBotTypResult cTwoFloat(CBotVar* &var, void* user)
return CBotTypResult(CBotTypFloat);
}
-// Compilation d'une procédure avec un "point".
+// Compilation d'une proc�dure avec un "point".
CBotTypResult cPoint(CBotVar* &var, void* user)
{
@@ -108,7 +122,7 @@ CBotTypResult cPoint(CBotVar* &var, void* user)
return CBotTypResult(CBotErrBadParam);
}
-// Compilation d'une procédure avec un seul "point".
+// Compilation d'une proc�dure avec un seul "point".
CBotTypResult cOnePoint(CBotVar* &var, void* user)
{
@@ -121,7 +135,7 @@ CBotTypResult cOnePoint(CBotVar* &var, void* user)
return CBotTypResult(CBotTypFloat);
}
-// Compilation d'une procédure avec une seule chaîne.
+// Compilation d'une proc�dure avec une seule cha�ne.
CBotTypResult cString(CBotVar* &var, void* user)
{
@@ -147,7 +161,7 @@ BOOL FindList(CBotVar* array, int type)
}
-// Donne un paramètre de type "point".
+// Donne un param�tre de type "point".
BOOL GetPoint(CBotVar* &var, int& exception, D3DVECTOR& pos)
{
@@ -192,7 +206,7 @@ BOOL GetPoint(CBotVar* &var, int& exception, D3DVECTOR& pos)
}
-// Instruction "sin(degrés)".
+// Instruction "sin(degr�s)".
BOOL rSin(CBotVar* var, CBotVar* result, int& exception, void* user)
{
@@ -203,7 +217,7 @@ BOOL rSin(CBotVar* var, CBotVar* result, int& exception, void* user)
return TRUE;
}
-// Instruction "cos(degrés)".
+// Instruction "cos(degr�s)".
BOOL rCos(CBotVar* var, CBotVar* result, int& exception, void* user)
{
@@ -214,7 +228,7 @@ BOOL rCos(CBotVar* var, CBotVar* result, int& exception, void* user)
return TRUE;
}
-// Instruction "tan(degrés)".
+// Instruction "tan(degr�s)".
BOOL rTan(CBotVar* var, CBotVar* result, int& exception, void* user)
{
@@ -400,7 +414,7 @@ BOOL rSearch(CBotVar* var, CBotVar* result, int& exception, void* user)
pObj = (CObject*)script->m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( !pObj->RetActif() ) continue;
oType = pObj->RetType();
@@ -418,15 +432,15 @@ BOOL rSearch(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( oType == OBJECT_SCRAP2 ||
oType == OBJECT_SCRAP3 ||
oType == OBJECT_SCRAP4 ||
- oType == OBJECT_SCRAP5 ) // déchet ?
+ oType == OBJECT_SCRAP5 ) // d�chet ?
{
- oType = OBJECT_SCRAP1; // n'importe quel déchet
+ oType = OBJECT_SCRAP1; // n'importe quel d�chet
}
if ( oType == OBJECT_BARRIER2 ||
- oType == OBJECT_BARRIER3 ) // barrière ?
+ oType == OBJECT_BARRIER3 ) // barri�re ?
{
- oType = OBJECT_BARRIER1; // n'importe quelle barrière
+ oType = OBJECT_BARRIER1; // n'importe quelle barri�re
}
if ( bArray )
@@ -590,7 +604,7 @@ BOOL rRadar(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( pObj == 0 ) break;
if ( pObj == pThis ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( !pObj->RetActif() ) continue;
if ( pObj->RetProxyActivate() ) continue;
@@ -609,15 +623,15 @@ BOOL rRadar(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( oType == OBJECT_SCRAP2 ||
oType == OBJECT_SCRAP3 ||
oType == OBJECT_SCRAP4 ||
- oType == OBJECT_SCRAP5 ) // déchet ?
+ oType == OBJECT_SCRAP5 ) // d�chet ?
{
- oType = OBJECT_SCRAP1; // n'importe quel déchet
+ oType = OBJECT_SCRAP1; // n'importe quel d�chet
}
if ( oType == OBJECT_BARRIER2 ||
- oType == OBJECT_BARRIER3 ) // barrière ?
+ oType == OBJECT_BARRIER3 ) // barri�re ?
{
- oType = OBJECT_BARRIER1; // n'importe quelle barrière
+ oType = OBJECT_BARRIER1; // n'importe quelle barri�re
}
if ( filter == FILTER_ONLYLANDING )
@@ -679,14 +693,14 @@ BOOL rRadar(CBotVar* var, CBotVar* result, int& exception, void* user)
}
-// Suivi d'une tâche.
+// Suivi d'une t�che.
BOOL Process(CScript* script, CBotVar* result, int &exception)
{
Error err;
err = script->m_primaryTask->IsEnded();
- if ( err != ERR_CONTINUE ) // tâche terminée ?
+ if ( err != ERR_CONTINUE ) // t�che termin�e ?
{
delete script->m_primaryTask;
script->m_primaryTask = 0;
@@ -738,7 +752,7 @@ BOOL rDetect(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
type = OBJECT_NULL;
angle = 0.0f;
@@ -777,7 +791,7 @@ BOOL rDetect(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( pObj == 0 ) break;
if ( pObj == pThis ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( !pObj->RetActif() ) continue;
if ( pObj->RetProxyActivate() ) continue;
@@ -796,15 +810,15 @@ BOOL rDetect(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( oType == OBJECT_SCRAP2 ||
oType == OBJECT_SCRAP3 ||
oType == OBJECT_SCRAP4 ||
- oType == OBJECT_SCRAP5 ) // déchet ?
+ oType == OBJECT_SCRAP5 ) // d�chet ?
{
- oType = OBJECT_SCRAP1; // n'importe quel déchet
+ oType = OBJECT_SCRAP1; // n'importe quel d�chet
}
if ( oType == OBJECT_BARRIER2 ||
- oType == OBJECT_BARRIER3 ) // barrière ?
+ oType == OBJECT_BARRIER3 ) // barri�re ?
{
- oType = OBJECT_BARRIER1; // n'importe quelle barrière
+ oType = OBJECT_BARRIER1; // n'importe quelle barri�re
}
if ( filter == FILTER_ONLYLANDING )
@@ -888,7 +902,7 @@ BOOL rDetect(CBotVar* var, CBotVar* result, int& exception, void* user)
return TRUE;
}
}
- if ( !Process(script, result, exception) ) return FALSE; // pas terminé
+ if ( !Process(script, result, exception) ) return FALSE; // pas termin�
result->SetValFloat(script->m_returnValue);
return TRUE;
}
@@ -1230,7 +1244,7 @@ BOOL rWait(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
value = var->GivValFloat();
@@ -1261,7 +1275,7 @@ BOOL rMove(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
value = var->GivValFloat();
@@ -1292,7 +1306,7 @@ BOOL rTurn(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
value = var->GivValFloat();
@@ -1352,7 +1366,7 @@ BOOL rGoto(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
if ( !GetPoint(var, exception, pos) ) return TRUE;
@@ -1415,7 +1429,7 @@ BOOL rFind(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
type = OBJECT_NULL;
angle = 0.0f;
@@ -1443,7 +1457,7 @@ BOOL rFind(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( pObj == 0 ) break;
if ( pObj == pThis ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( !pObj->RetActif() ) continue;
if ( pObj->RetProxyActivate() ) continue;
@@ -1462,15 +1476,15 @@ BOOL rFind(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( oType == OBJECT_SCRAP2 ||
oType == OBJECT_SCRAP3 ||
oType == OBJECT_SCRAP4 ||
- oType == OBJECT_SCRAP5 ) // déchet ?
+ oType == OBJECT_SCRAP5 ) // d�chet ?
{
- oType = OBJECT_SCRAP1; // n'importe quel déchet
+ oType = OBJECT_SCRAP1; // n'importe quel d�chet
}
if ( oType == OBJECT_BARRIER2 ||
- oType == OBJECT_BARRIER3 ) // barrière ?
+ oType == OBJECT_BARRIER3 ) // barri�re ?
{
- oType = OBJECT_BARRIER1; // n'importe quelle barrière
+ oType = OBJECT_BARRIER1; // n'importe quelle barri�re
}
if ( bArray )
@@ -1559,7 +1573,7 @@ BOOL rGrab(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
if ( var == 0 ) type = TMA_FFRONT;
@@ -1604,7 +1618,7 @@ BOOL rDrop(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
if ( var == 0 ) type = TMA_FFRONT;
@@ -1646,7 +1660,7 @@ BOOL rSniff(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
err = script->m_primaryTask->StartTaskSearch();
@@ -1695,7 +1709,7 @@ BOOL rReceive(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
@@ -1719,7 +1733,7 @@ BOOL rReceive(CBotVar* var, CBotVar* result, int& exception, void* user)
return TRUE;
}
}
- if ( !Process(script, result, exception) ) return FALSE; // pas terminé
+ if ( !Process(script, result, exception) ) return FALSE; // pas termin�
value = pThis->RetInfoReturn();
if ( value == NAN )
@@ -1766,7 +1780,7 @@ BOOL rSend(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
@@ -1974,7 +1988,7 @@ BOOL rThump(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
err = script->m_primaryTask->StartTaskTerraform();
@@ -2003,7 +2017,7 @@ BOOL rRecycle(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
err = script->m_primaryTask->StartTaskRecover();
@@ -2057,7 +2071,7 @@ BOOL rShield(CBotVar* var, CBotVar* result, int& exception, void* user)
if ( radius > 25.0f ) radius = 25.0f;
radius = (radius-10.0f)/15.0f;
- if ( *script->m_secondaryTask == 0 ) // bouclier replié ?
+ if ( *script->m_secondaryTask == 0 ) // bouclier repli� ?
{
if ( oper == 0.0f ) // down ?
{
@@ -2077,7 +2091,7 @@ BOOL rShield(CBotVar* var, CBotVar* result, int& exception, void* user)
}
}
}
- else // bouclier deployé ?
+ else // bouclier deploy� ?
{
if ( oper == 0.0f ) // down ?
{
@@ -2138,7 +2152,7 @@ BOOL rFire(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
@@ -2182,7 +2196,7 @@ BOOL rAim(CBotVar* var, CBotVar* result, int& exception, void* user)
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
script->m_primaryTask = new CTaskManager(script->m_iMan, script->m_object);
value = var->GivValFloat();
@@ -2406,7 +2420,7 @@ BOOL rAbsTime(CBotVar* var, CBotVar* result, int& exception, void* user)
}
-// Prépare un nom de fichier.
+// Pr�pare un nom de fichier.
void PrepareFilename(CBotString &filename, char *dir)
{
@@ -2415,7 +2429,7 @@ void PrepareFilename(CBotString &filename, char *dir)
pos = filename.ReverseFind('\\');
if ( pos > 0 )
{
- filename = filename.Mid(pos+1); // enlève les dossiers
+ filename = filename.Mid(pos+1); // enl�ve les dossiers
}
pos = filename.ReverseFind('/');
@@ -2427,7 +2441,7 @@ void PrepareFilename(CBotString &filename, char *dir)
pos = filename.ReverseFind(':');
if ( pos > 0 )
{
- filename = filename.Mid(pos+1); // enlève aussi la lettre d'unité C:
+ filename = filename.Mid(pos+1); // enl�ve aussi la lettre d'unit� C:
}
filename = CBotString(dir) + CBotString("\\") + filename;
@@ -2481,7 +2495,7 @@ BOOL rPenDown(CBotVar* var, CBotVar* result, int& exception, void* user)
{
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
if ( var != 0 )
{
@@ -2554,7 +2568,7 @@ BOOL rPenUp(CBotVar* var, CBotVar* result, int& exception, void* user)
{
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
pThis->SetTraceDown(FALSE);
@@ -2596,7 +2610,7 @@ BOOL rPenColor(CBotVar* var, CBotVar* result, int& exception, void* user)
{
exception = 0;
- if ( script->m_primaryTask == 0 ) // pas de tâche en cours ?
+ if ( script->m_primaryTask == 0 ) // pas de t�che en cours ?
{
color = var->GivValInt();
if ( color < 0 ) color = 0;
@@ -2750,7 +2764,7 @@ CScript::~CScript()
}
-// Donne le script éditable à un pavé de texte.
+// Donne le script �ditable � un pav� de texte.
void CScript::PutScript(CEdit* edit, char* name)
{
@@ -2767,7 +2781,7 @@ void CScript::PutScript(CEdit* edit, char* name)
edit->SetFocus(TRUE);
}
-// Reprend le script d'un pavé de texte.
+// Reprend le script d'un pav� de texte.
BOOL CScript::GetScript(CEdit* edit)
{
@@ -2802,7 +2816,7 @@ BOOL CScript::GetScript(CEdit* edit)
return TRUE;
}
-// Indique si un programme est correctement compilé.
+// Indique si un programme est correctement compil�.
BOOL CScript::RetCompile()
{
@@ -2823,7 +2837,7 @@ BOOL CScript::IsEmpty()
return TRUE;
}
-// Vérifie si un programme ne contient pas les instructions interdites
+// V�rifie si un programme ne contient pas les instructions interdites
// et s'il contient bien au moins une fois toutes les instructions
// obligatoires.
@@ -2844,7 +2858,7 @@ BOOL CScript::CheckToken()
for ( i=0 ; i<m_main->RetObligatoryToken() ; i++ )
{
- used[i] = 0; // token pas utilisé
+ used[i] = 0; // token pas utilis�
}
bt = CBotToken::CompileTokens(m_script, error);
@@ -2860,7 +2874,7 @@ BOOL CScript::CheckToken()
i = m_main->IsObligatoryToken((char*)token);
if ( i != -1 )
{
- used[i] = 1; // token utilisé
+ used[i] = 1; // token utilis�
}
if ( !m_main->IsProhibitedToken((char*)token) )
@@ -2879,7 +2893,7 @@ BOOL CScript::CheckToken()
// Au moins une fois chaque instruction obligatoire ?
for ( i=0 ; i<m_main->RetObligatoryToken() ; i++ )
{
- if ( used[i] == 0 ) // token pas utilisé ?
+ if ( used[i] == 0 ) // token pas utilis� ?
{
strcpy(m_token, m_main->RetObligatoryToken(i));
m_error = ERR_OBLIGATORYTOKEN;
@@ -2893,7 +2907,7 @@ BOOL CScript::CheckToken()
return TRUE;
}
-// Compile le script d'un pavé de texte.
+// Compile le script d'un pav� de texte.
BOOL CScript::Compile()
{
@@ -2974,7 +2988,7 @@ void CScript::GetTitle(char* buffer)
}
-// Choix du mode d'exécution.
+// Choix du mode d'ex�cution.
void CScript::SetStepMode(BOOL bStep)
{
@@ -2982,7 +2996,7 @@ void CScript::SetStepMode(BOOL bStep)
}
-// Lance le programme depuis le début.
+// Lance le programme depuis le d�but.
BOOL CScript::Run()
{
@@ -3007,8 +3021,8 @@ BOOL CScript::Run()
return TRUE;
}
-// Continue le programme en cours d'exécution.
-// Retourne TRUE lorsque l'exécution est terminée.
+// Continue le programme en cours d'ex�cution.
+// Retourne TRUE lorsque l'ex�cution est termin�e.
BOOL CScript::Continue(const Event &event)
{
@@ -3081,8 +3095,8 @@ BOOL CScript::Continue(const Event &event)
return FALSE;
}
-// Continue le programme en cours d'exécution.
-// Retourne TRUE lorsque l'exécution est terminée.
+// Continue le programme en cours d'ex�cution.
+// Retourne TRUE lorsque l'ex�cution est termin�e.
BOOL CScript::Step(const Event &event)
{
@@ -3122,7 +3136,7 @@ BOOL CScript::Step(const Event &event)
if ( m_bContinue ) // instuction "move", "goto", etc. ?
{
- m_engine->SetPause(FALSE); // enlève la pause
+ m_engine->SetPause(FALSE); // enl�ve la pause
}
return FALSE;
}
@@ -3163,7 +3177,7 @@ BOOL CScript::IsContinue()
}
-// Donne la position des curseurs pendant l'exécution.
+// Donne la position des curseurs pendant l'ex�cution.
BOOL CScript::GetCursor(int &cursor1, int &cursor2)
{
@@ -3207,7 +3221,7 @@ void PutList(char *baseName, BOOL bArray, CBotVar *var, CList *list, int &rankLi
while ( var != 0 )
{
var->Maj(NULL, FALSE);
- pStatic = var->GivStaticVar(); // retrouve l'élément static
+ pStatic = var->GivStaticVar(); // retrouve l'�l�ment static
bs = pStatic->GivName(); // nom de la variable
p = bs;
@@ -3300,7 +3314,7 @@ void CScript::UpdateList(CList* list)
PutList("", FALSE, var, list, rank);
}
- if ( total == list->RetTotal() ) // même total ?
+ if ( total == list->RetTotal() ) // m�me total ?
{
list->SetSelect(select);
}
@@ -3373,7 +3387,7 @@ void CScript::ColorizeScript(CEdit* edit)
// Cherche un token au hazard dans un script.
-// Retourne l'index du début du token trouvé, ou -1.
+// Retourne l'index du d�but du token trouv�, ou -1.
int SearchToken(char* script, char* token)
{
@@ -3409,7 +3423,7 @@ void DeleteToken(char* script, int pos, int len)
}
}
-// Insère un token dans un script.
+// Ins�re un token dans un script.
void InsertToken(char* script, int pos, char* token)
{
@@ -3477,7 +3491,7 @@ BOOL CScript::IntroduceVirus()
}
-// Retourne le numéro de l'erreur.
+// Retourne le num�ro de l'erreur.
int CScript::RetError()
{
@@ -3535,7 +3549,7 @@ void CScript::New(CEdit* edit, char* name)
if ( strcmp(text, res) == 0 )
{
cursor1 = 20;
- cursor2 = 20+strlen(text); // màj "Nouveau"
+ cursor2 = 20+strlen(text); // m�j "Nouveau"
}
else
{
@@ -3556,7 +3570,7 @@ void CScript::New(CEdit* edit, char* name)
edit->SetFocus(TRUE);
sf = m_main->RetScriptFile();
- if ( sf[0] != 0 ) // charge un programme vide spécifique ?
+ if ( sf[0] != 0 ) // charge un programme vide sp�cifique ?
{
strcpy(filename, "script\\");
strcat(filename, sf);
@@ -3623,7 +3637,7 @@ void CScript::New(CEdit* edit, char* name)
}
-// Fourni un script de toutes pièces.
+// Fourni un script de toutes pi�ces.
BOOL CScript::SendScript(char* text)
{
@@ -3704,7 +3718,7 @@ BOOL CScript::WriteScript(char* filename)
}
-// Lit un stack de script en exécution sous la forme d'un fichier.
+// Lit un stack de script en ex�cution sous la forme d'un fichier.
BOOL CScript::ReadStack(FILE *file)
{
@@ -3723,7 +3737,7 @@ BOOL CScript::ReadStack(FILE *file)
return TRUE;
}
-// Ecrit un stack de script en exécution sous la forme d'un fichier.
+// Ecrit un stack de script en ex�cution sous la forme d'un fichier.
BOOL CScript::WriteStack(FILE *file)
{
@@ -3748,7 +3762,7 @@ BOOL CScript::Compare(CScript* other)
}
-// Gestion du nom de fichier lorsque le script est sauvegardé.
+// Gestion du nom de fichier lorsque le script est sauvegard�.
void CScript::SetFilename(char *filename)
{