summaryrefslogtreecommitdiffstats
path: root/src/robotmain.cpp
diff options
context:
space:
mode:
authorProgramerus <alcadeias95@gmail.com>2012-04-08 00:02:06 +0300
committerProgramerus <alcadeias95@gmail.com>2012-04-08 00:02:06 +0300
commita70b3ebfa84317cd9d7cace5fc88f8e6225d812a (patch)
treed29bad1d22b61138799f65731b70f517cea90f16 /src/robotmain.cpp
parent00fddf5169c09c689c0c4893b49f51ef57494b97 (diff)
downloadcolobot-a70b3ebfa84317cd9d7cace5fc88f8e6225d812a.tar.gz
colobot-a70b3ebfa84317cd9d7cace5fc88f8e6225d812a.tar.bz2
colobot-a70b3ebfa84317cd9d7cace5fc88f8e6225d812a.zip
Comments translated from French to English. (partially)
Diffstat (limited to 'src/robotmain.cpp')
-rw-r--r--src/robotmain.cpp488
1 files changed, 245 insertions, 243 deletions
diff --git a/src/robotmain.cpp b/src/robotmain.cpp
index fc8e36a..7d956d3 100644
--- a/src/robotmain.cpp
+++ b/src/robotmain.cpp
@@ -12,7 +12,9 @@
// * 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/.// robotmain.cpp
+// * along with this program. If not, see http://www.gnu.org/licenses/.
+
+// robotmain.cpp
#define STRICT
#define D3D_OVERLOADS
@@ -78,18 +80,18 @@
-#define CBOT_STACK TRUE // enregistre le stack des programmes CBOT
+#define CBOT_STACK TRUE // saves the stack of programs CBOT
#define UNIT 4.0f
-// Variables globales.
+// Global variables.
-long g_id; // identificateur unique
-long g_build; // bâtiments constructibles
-long g_researchDone; // recherches effectuées
-long g_researchEnable; // recherches accessibles
-float g_unit; // facteur de conversion
+long g_id; // unique identifier
+long g_build; // constructible buildings
+long g_researchDone; // research done
+long g_researchEnable; // research available
+float g_unit; // conversion factor
@@ -97,43 +99,43 @@ float g_unit; // facteur de conversion
-// Compilation de la classe "point".
+// Compilation of class "point".
CBotTypResult cPoint(CBotVar* pThis, CBotVar* &var)
{
if ( !pThis->IsElemOfClass("point") ) return CBotTypResult(CBotErrBadNum);
- if ( var == NULL ) return CBotTypResult(0); // ok si aucun paramètre
+ if ( var == NULL ) return CBotTypResult(0); // ok if no parameter
- // Premier paramètre (x) :
+ // First parameter (x):
if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
var = var->GivNext();
- // Deuxième paramètre (y) :
+ // Second parameter (y):
if ( var == NULL ) return CBotTypResult(CBotErrLowParam);
if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
var = var->GivNext();
- // Troisième paramètre (z) :
- if ( var == NULL ) // seulement 2 paramètres ?
+ // Third parameter (z):
+ if ( var == NULL ) // only 2 parameters?
{
- return CBotTypResult(0); // cette fonction retourne void
+ return CBotTypResult(0); // this function returns void
}
if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
var = var->GivNext();
if ( var != NULL ) return CBotTypResult(CBotErrOverParam);
- return CBotTypResult(0); // cette fonction retourne void
+ return CBotTypResult(0); // this function returns void
}
-// Exécution de la classe "point".
+//Execution of the class "point".
BOOL rPoint(CBotVar* pThis, CBotVar* var, CBotVar* pResult, int& Exception)
{
CBotVar *pX, *pY, *pZ;
- if ( var == NULL ) return TRUE; // constructeur sans paramètres est ok
+ if ( var == NULL ) return TRUE; // constructor with no parameters is ok
if ( var->GivType() > CBotTypDouble )
{
@@ -168,7 +170,7 @@ BOOL rPoint(CBotVar* pThis, CBotVar* var, CBotVar* pResult, int& Exception)
if ( var == NULL )
{
- return TRUE; // ok avec seulement 2 paramètres
+ return TRUE; // ok with only two parameters
}
pZ = pThis->GivItem("z");
@@ -184,13 +186,13 @@ BOOL rPoint(CBotVar* pThis, CBotVar* var, CBotVar* pResult, int& Exception)
Exception = CBotErrOverParam; return FALSE;
}
- return TRUE; // pas d'interruption
+ return TRUE; // no interruption
}
-// Constructeur de l'application robot.
+// Constructor of robot application.
CRobotMain::CRobotMain(CInstanceManager* iMan)
{
@@ -288,7 +290,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
m_IOPublic = FALSE;
m_IODim = FPOINT(320.0f/640.0f, (121.0f+18.0f*8)/480.0f);
- m_IOPos.x = (1.0f-m_IODim.x)/2.0f; // au milieu
+ m_IOPos.x = (1.0f-m_IODim.x)/2.0f; // in the middle
m_IOPos.y = (1.0f-m_IODim.y)/2.0f;
if ( GetProfileInt ("Edit", "IOPublic", iValue) ) m_IOPublic = iValue;
@@ -307,7 +309,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
g_id = 0;
g_build = 0;
- g_researchDone = 0; // aucune recherche effectuée
+ g_researchDone = 0; // no research done
g_researchEnable = 0;
g_unit = 4.0f;
@@ -377,15 +379,15 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
CBotProgram::DefineNum("FilterOnlyLanding", FILTER_ONLYLANDING);
CBotProgram::DefineNum("FilterOnlyFliying", FILTER_ONLYFLYING);
- // Ajoute la classe Point.
+ // Add the class Point.
CBotClass* bc;
- bc = new CBotClass("point", NULL, TRUE); // classe intrinsèque
+ bc = new CBotClass("point", NULL, TRUE); // intrinsic class
bc->AddItem("x", CBotTypFloat);
bc->AddItem("y", CBotTypFloat);
bc->AddItem("z", CBotTypFloat);
bc->AddFunction("point", rPoint, cPoint);
- // Ajoute la classe Object.
+ // Adds the class Object.
bc = new CBotClass("object", NULL);
bc->AddItem("category", CBotTypResult(CBotTypInt), PR_READ);
bc->AddItem("position", CBotTypResult(CBotTypClass, "point"), PR_READ);
@@ -401,13 +403,13 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
bc->AddItem("energyCell", CBotTypResult(CBotTypPointer, "object"), PR_READ);
bc->AddItem("load", CBotTypResult(CBotTypPointer, "object"), PR_READ);
- // Initialise la classe FILE.
+ // Initializes the class FILE.
InitClassFILE();
CScript::InitFonctions();
}
-// Destructeur de l'application robot.
+// Destructor of robot application.
CRobotMain::~CRobotMain()
{
@@ -420,13 +422,13 @@ CRobotMain::~CRobotMain()
}
-// Crée le fichier colobot.ini la première fois.
+// Creates the file colobot.ini at the first time.
void CRobotMain::CreateIni()
{
int iValue;
- // colobot.ini inexistant ?
+ // colobot.ini don't exist?
if ( !GetProfileInt("Setup", "TotoMode", iValue) )
{
m_dialog->SetupMemorize();
@@ -434,7 +436,7 @@ void CRobotMain::CreateIni()
}
-// Change de phase.
+// Changes phase.
void CRobotMain::ChangePhase(Phase phase)
{
@@ -447,7 +449,7 @@ void CRobotMain::ChangePhase(Phase phase)
int rank, numTry;
BOOL bLoading;
- if ( m_phase == PHASE_SIMUL ) // termine une simulation ?
+ if ( m_phase == PHASE_SIMUL ) // ends a simulation?
{
SaveAllScript();
m_sound->StopMusic();
@@ -456,7 +458,7 @@ void CRobotMain::ChangePhase(Phase phase)
#if _SCHOOL
if ( TRUE )
#else
- if ( m_gameTime > 10.0f ) // a-t-on joué au moins 10 secondes ?
+ if ( m_gameTime > 10.0f ) // did you play at least 10 seconds?
#endif
{
rank = m_dialog->RetSceneRank();
@@ -466,15 +468,15 @@ void CRobotMain::ChangePhase(Phase phase)
}
}
- if ( phase == PHASE_WIN ) // gagné une simulation ?
+ if ( phase == PHASE_WIN ) // wins a simulation?
{
rank = m_dialog->RetSceneRank();
m_dialog->SetGamerInfoPassed(rank, TRUE);
- m_dialog->NextMission(); // passe à la mission suivante
+ m_dialog->NextMission(); // passes to the next mission
m_dialog->WriteGamerInfo();
}
- DeleteAllObjects(); // supprime toute la scène 3D actuelle
+ DeleteAllObjects(); // removes all the current 3D Scene
m_phase = phase;
m_winDelay = 0.0f;
@@ -524,7 +526,7 @@ void CRobotMain::ChangePhase(Phase phase)
m_cameraZoom = 0.0f;
m_bShortCut = TRUE;
- // Crée et cache la console de commande.
+ // Creates and hide the command console.
dim.x = 200.0f/640.0f;
dim.y = 18.0f/480.0f;
pos.x = 50.0f/640.0f;
@@ -532,9 +534,9 @@ void CRobotMain::ChangePhase(Phase phase)
pe = m_interface->CreateEdit(pos, dim, 0, EVENT_CMD);
if ( pe == 0 ) return;
pe->ClearState(STATE_VISIBLE);
- m_bCmdEdit = FALSE; // caché pour l'instant
+ m_bCmdEdit = FALSE; // hidden for now
- // Crée l'indicateur de vitesse.
+ // Creates the speedometer.
#if _TEEN
dim.x = 30.0f/640.0f;
dim.y = 20.0f/480.0f;
@@ -654,7 +656,7 @@ void CRobotMain::ChangePhase(Phase phase)
bLoading = (read[0] != 0);
m_map->CreateMap();
- CreateScene(m_dialog->RetSceneSoluce(), FALSE, FALSE); // scène interractive
+ CreateScene(m_dialog->RetSceneSoluce(), FALSE, FALSE); // interactive scene
if ( m_bMapImage )
{
m_map->SetFixImage(m_mapFilename);
@@ -669,7 +671,7 @@ void CRobotMain::ChangePhase(Phase phase)
if ( m_bImmediatSatCom && !bLoading &&
m_infoFilename[SATCOM_HUSTON][0] != 0 )
{
- StartDisplayInfo(SATCOM_HUSTON, FALSE); // affiche les instructions
+ StartDisplayInfo(SATCOM_HUSTON, FALSE); // shows the instructions
}
m_sound->StopMusic();
@@ -692,7 +694,7 @@ void CRobotMain::ChangePhase(Phase phase)
m_dialog->SetSceneName("win");
#endif
m_dialog->SetSceneRank(m_endingWinRank);
- CreateScene(FALSE, TRUE, FALSE); // scène fixe
+ CreateScene(FALSE, TRUE, FALSE); // sets scene
pos.x = ox+sx*1; pos.y = oy+sy*1;
ddim.x = dim.x*2; ddim.y = dim.y*2;
@@ -739,7 +741,7 @@ void CRobotMain::ChangePhase(Phase phase)
m_bWinTerminate = FALSE;
m_dialog->SetSceneName("lost");
m_dialog->SetSceneRank(m_endingLostRank);
- CreateScene(FALSE, TRUE, FALSE); // scène fixe
+ CreateScene(FALSE, TRUE, FALSE); // sets scene
pos.x = ox+sx*1; pos.y = oy+sy*1;
ddim.x = dim.x*2; ddim.y = dim.y*2;
@@ -771,7 +773,7 @@ void CRobotMain::ChangePhase(Phase phase)
}
-// Traite un événement.
+// Processes an event.
BOOL CRobotMain::EventProcess(const Event &event)
{
@@ -783,13 +785,13 @@ BOOL CRobotMain::EventProcess(const Event &event)
if ( event.event == EVENT_FRAME )
{
- if ( !m_movie->EventProcess(event) ) // fin du film ?
+ if ( !m_movie->EventProcess(event) ) // end of the movie?
{
type = m_movie->RetStopType();
if ( type == MM_SATCOMopen )
{
ChangePause(FALSE);
- SelectObject(m_infoObject, FALSE); // remet les boutons de commande
+ SelectObject(m_infoObject, FALSE); // hands over the command buttons
m_map->ShowMap(m_bMapShow);
m_displayText->HideText(FALSE);
i = m_movieInfoIndex;
@@ -803,14 +805,14 @@ BOOL CRobotMain::EventProcess(const Event &event)
RemoteCamera(m_cameraPan, m_cameraZoom, event.rTime);
m_interface->EventProcess(event);
- if ( m_displayInfo != 0 ) // édition en cours ?
+ if ( m_displayInfo != 0 ) // current edition?
{
m_displayInfo->EventProcess(event);
}
return EventFrame(event);
}
- // Gestion de la console de commande.
+ // Management of the console.
#if 0
if ( m_phase != PHASE_NAME &&
!m_movie->IsExist() &&
@@ -847,7 +849,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
return FALSE;
}
- // Gestion du changement de vitesse.
+ // Management of the speed change.
if ( event.event == EVENT_SPEED )
{
SetSpeed(1.0f);
@@ -874,7 +876,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
HiliteObject(event.pos);
}
- if ( m_displayInfo != 0 ) // info en cours ?
+ if ( m_displayInfo != 0 ) // current info?
{
m_displayInfo->EventProcess(event);
@@ -896,7 +898,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
return FALSE;
}
- // Phase de simulation du jeu.
+ // Simulation phase of the game
if ( m_phase == PHASE_SIMUL )
{
UpdateInfoText();
@@ -916,7 +918,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
m_particule->WriteWheelTrace("Savegame\\t.bmp", 256, 256, D3DVECTOR(16.0f, 0.0f, -368.0f), D3DVECTOR(140.0f, 0.0f, -248.0f));
return FALSE;
}
- if ( m_bEditLock ) // édition en cours ?
+ if ( m_bEditLock ) // current edition?
{
if ( event.param == m_engine->RetKey(KEYRANK_HELP, 0) ||
event.param == m_engine->RetKey(KEYRANK_HELP, 1) )
@@ -932,7 +934,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
}
break;
}
- if ( m_bMovieLock ) // film en cours ?
+ if ( m_bMovieLock ) // current movie?
{
if ( event.param == m_engine->RetKey(KEYRANK_QUIT, 0) ||
event.param == m_engine->RetKey(KEYRANK_QUIT, 1) ||
@@ -974,7 +976,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
}
else
{
- m_dialog->StartAbort(); // voulez-vous quitter ?
+ m_dialog->StartAbort(); // do you want to leave?
}
}
if ( event.param == VK_PAUSE )
@@ -1058,7 +1060,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
if ( !m_bShortCut ) pObj = 0;
if ( pObj != 0 && pObj->RetType() == OBJECT_TOTO )
{
- if ( m_displayInfo != 0 ) // info en cours ?
+ if ( m_displayInfo != 0 ) // current info?
{
StopDisplayInfo();
}
@@ -1096,7 +1098,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
}
else
{
- m_dialog->StartAbort(); // voulez-vous quitter ?
+ m_dialog->StartAbort(); // do you want to leave?
}
break;
@@ -1133,7 +1135,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
break;
case EVENT_OBJECT_DELETE:
- m_dialog->StartDeleteObject(); // voulez-vous détruire ?
+ m_dialog->StartDeleteObject(); // do you want to destroy it?
break;
case EVENT_OBJECT_BHELP:
@@ -1269,7 +1271,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
-// Exécute une commande.
+// Executes a command.
void CRobotMain::ExecuteCmd(char *cmd)
{
@@ -1312,7 +1314,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
{
Event newEvent;
- g_researchDone = -1; // toutes les recherches sont effectuées
+ g_researchDone = -1; // all research are done
m_event->MakeEvent(newEvent, EVENT_UPDINTERFACE);
m_event->AddEvent(newEvent);
@@ -1348,7 +1350,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
{
m_camera->SetType(CAMERA_FREE);
ChangePause(TRUE);
- DeselectAll(); // enlève les boutons de commande
+ DeselectAll(); // removes the control buttons
m_map->ShowMap(FALSE);
m_displayText->HideText(TRUE);
}
@@ -1579,7 +1581,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
-// Retourne le type de film en cours.
+// Returns the type of current movie.
MainMovieType CRobotMain::RetMainMovie()
{
@@ -1587,7 +1589,7 @@ MainMovieType CRobotMain::RetMainMovie()
}
-// Efface l'affichage d'instructions.
+// Clears the display of instructions.
void CRobotMain::FlushDisplayInfo()
{
@@ -1602,7 +1604,7 @@ void CRobotMain::FlushDisplayInfo()
m_infoIndex = 0;
}
-// Début de l'affichage d'instructions.
+// Beginning of the displaying of instructions.
// index: SATCOM_*
void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
@@ -1625,7 +1627,7 @@ void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
m_movie->Start(MM_SATCOMopen, 2.5f);
ChangePause(TRUE);
//? m_map->ShowMap(FALSE);
- m_infoObject = DeselectAll(); // enlève les boutons de commande
+ m_infoObject = DeselectAll(); // removes the control buttons
m_displayText->HideText(TRUE);
return;
}
@@ -1635,7 +1637,7 @@ void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
{
m_movie->Stop();
ChangePause(FALSE);
- SelectObject(m_infoObject, FALSE); // remet les boutons de commande
+ SelectObject(m_infoObject, FALSE); // hands over the command buttons
//? m_map->ShowMap(m_bMapShow);
m_displayText->HideText(FALSE);
}
@@ -1643,7 +1645,7 @@ void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
StartDisplayInfo(m_infoFilename[index], index);
}
-// Début de l'affichage d'instructions.
+// Beginning of the displaying of instructions.
void CRobotMain::StartDisplayInfo(char *filename, int index)
{
@@ -1653,12 +1655,12 @@ void CRobotMain::StartDisplayInfo(char *filename, int index)
if ( m_bCmdEdit ) return;
m_movieInfoIndex = -1;
- ClearInterface(); // enlève mise en évidence et tooltip
+ ClearInterface(); // removes setting evidence and tooltip
if ( !m_bEditLock )
{
//? m_map->ShowMap(FALSE);
- m_infoObject = DeselectAll(); // enlève les boutons de commande
+ m_infoObject = DeselectAll(); // removes the control buttons
m_displayText->HideText(TRUE);
m_sound->MuteAll(TRUE);
}
@@ -1681,13 +1683,13 @@ void CRobotMain::StartDisplayInfo(char *filename, int index)
}
}
-// Fin de l'affichage d'instructions.
+// End of displaying of instructions.
void CRobotMain::StopDisplayInfo()
{
CButton* pb;
- if ( m_movieInfoIndex != -1 ) // film pour lire le SatCom ?
+ if ( m_movieInfoIndex != -1 ) // film to read the SatCom?
{
m_movie->Start(MM_SATCOMclose, 2.0f);
}
@@ -1709,7 +1711,7 @@ void CRobotMain::StopDisplayInfo()
pb->SetState(STATE_VISIBLE);
}
- SelectObject(m_infoObject, FALSE); // remet les boutons de commande
+ SelectObject(m_infoObject, FALSE); // gives the command buttons
//? m_map->ShowMap(m_bMapShow);
m_displayText->HideText(FALSE);
@@ -1718,26 +1720,26 @@ void CRobotMain::StopDisplayInfo()
if ( m_infoUsed == 0 )
{
- m_displayText->ClearText(); // enlève message "voir SatCom ..."
+ m_displayText->ClearText(); // removes message "see SatCom ..."
}
m_infoUsed ++;
}
-// Retourne le nom du texte à afficher.
+// Returns the name of the text display.
char* CRobotMain::RetDisplayInfoName(int index)
{
return m_infoFilename[index];
}
-// Retourne le nom du texte à afficher.
+// Returns the name of the text display.
int CRobotMain::RetDisplayInfoPosition(int index)
{
return m_infoPos[index];
}
-// Retourne le nom du texte à afficher.
+// Returns the name of the text display.
void CRobotMain::SetDisplayInfoPosition(int index, int pos)
{
@@ -1745,14 +1747,14 @@ void CRobotMain::SetDisplayInfoPosition(int index, int pos)
}
-// Début d'un dialogue pendant le jeu,
+// Beginning of a dialogue during the game,
void CRobotMain::StartSuspend()
{
CButton* pb;
m_map->ShowMap(FALSE);
- m_infoObject = DeselectAll(); // enlève les boutons de commande
+ m_infoObject = DeselectAll(); // removes the control buttons
m_displayText->HideText(TRUE);
pb = (CButton*)m_interface->SearchControl(EVENT_BUTTON_QUIT);
@@ -1764,7 +1766,7 @@ void CRobotMain::StartSuspend()
m_bSuspend = TRUE;
}
-// Fin d'un dialogue pendant le jeu,
+// End of dialogue during the game,
void CRobotMain::StopSuspend()
{
@@ -1776,7 +1778,7 @@ void CRobotMain::StopSuspend()
pb->SetState(STATE_VISIBLE);
}
- SelectObject(m_infoObject, FALSE); // remet les boutons de commande
+ SelectObject(m_infoObject, FALSE); // gives the command buttons
m_map->ShowMap(m_bMapShow);
m_displayText->HideText(FALSE);
@@ -1784,7 +1786,7 @@ void CRobotMain::StopSuspend()
}
-// Retourne le temps absoul du jeu.
+// Returns the absolute time of the game
float CRobotMain::RetGameTime()
{
@@ -1793,7 +1795,7 @@ float CRobotMain::RetGameTime()
-// Gestion de la taille des caractères par défaut.
+// Managing the size of the default fonts.
void CRobotMain::SetFontSize(float size)
{
@@ -1806,7 +1808,7 @@ float CRobotMain::RetFontSize()
return m_fontSize;
}
-// Gestion de la taille de la fenêtre par défaut.
+// Managing the size of the default window.
void CRobotMain::SetWindowPos(FPOINT pos)
{
@@ -1833,7 +1835,7 @@ FPOINT CRobotMain::RetWindowDim()
}
-// Gestion des fenêtres ouvrir/enregistrer.
+// Managing windows open/save.
void CRobotMain::SetIOPublic(BOOL bMode)
{
@@ -1872,7 +1874,7 @@ FPOINT CRobotMain::RetIODim()
-// Début de la visite du lieu d'une erreur.
+// Start of the visit instead of an error.
void CRobotMain::StartDisplayVisit(EventMsg event)
{
@@ -1888,9 +1890,9 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2);
if ( pw == 0 ) return;
- if ( event == EVENT_NULL ) // visite par raccourci clavier ?
+ if ( event == EVENT_NULL ) // visit by keyboard shortcut?
{
- if ( m_visitLast != EVENT_NULL ) // déjà une visite en cours ?
+ if ( m_visitLast != EVENT_NULL ) // already a current visit?
{
i = m_visitLast-EVENT_DT_VISIT0;
}
@@ -1899,7 +1901,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
i = MAXDTLINE;
}
- // Cherche la précédente.
+ // Seeks the last.
for ( j=0 ; j<MAXDTLINE ; j++ )
{
i --;
@@ -1918,25 +1920,25 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
}
if ( event == EVENT_NULL )
{
- m_sound->Play(SOUND_TZOING); // rien à voir !
+ m_sound->Play(SOUND_TZOING); // nothing to do!
return;
}
m_visitLast = event;
- ClearInterface(); // enlève mise en évidence et tooltip
+ ClearInterface(); // removes setting evidence and tooltip
- if ( m_camera->RetType() == CAMERA_VISIT ) // déjà une visite en cours ?
+ if ( m_camera->RetType() == CAMERA_VISIT ) // already a current visit?
{
m_camera->StopVisit();
m_displayText->ClearVisit();
}
else
{
- m_visitObject = DeselectAll(); // enlève les boutons de commande
+ m_visitObject = DeselectAll(); // removes the control buttons
}
- // Crée le bouton "continuer".
+ // Creates the "continue" button.
if ( m_interface->SearchControl(EVENT_DT_END) == 0 )
{
pos.x = 10.0f/640.0f;
@@ -1946,7 +1948,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
m_interface->CreateButton(pos, dim, 16, EVENT_DT_END);
}
- // Crée la flèche pour montrer l'endroit.
+ // Creates the arrow to show the place.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -1972,7 +1974,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
ChangePause(TRUE);
}
-// Bouge la flèche de visite.
+// Move the arrow to visit.
void CRobotMain::FrameVisit(float rTime)
{
@@ -1982,7 +1984,7 @@ void CRobotMain::FrameVisit(float rTime)
if ( m_visitArrow == 0 ) return;
- // Bouge la flèche.
+ // Moves the arrow.
m_visitTime += rTime;
pos = m_visitPosArrow;
@@ -1990,7 +1992,7 @@ void CRobotMain::FrameVisit(float rTime)
m_visitArrow->SetPosition(0, pos);
m_visitArrow->SetAngleY(0, m_visitTime*2.0f);
- // Gère les particules "flèches".
+ // Manages the particles "arrows".
m_visitParticule -= rTime;
if ( m_visitParticule <= 0.0f )
{
@@ -1998,7 +2000,7 @@ void CRobotMain::FrameVisit(float rTime)
pos = m_visitPos;
level = m_terrain->RetFloorLevel(pos)+2.0f;
- if ( pos.y < level ) pos.y = level; // pas en-dessous du sol
+ if ( pos.y < level ) pos.y = level; // not below the ground
speed = D3DVECTOR(0.0f, 0.0f, 0.0f);
dim.x = 30.0f;
dim.y = dim.x;
@@ -2006,16 +2008,16 @@ void CRobotMain::FrameVisit(float rTime)
}
}
-// Fin de la visite du lieu d'une erreur.
+// End of the visit instead of an error.
void CRobotMain::StopDisplayVisit()
{
m_visitLast = EVENT_NULL;
- // Supprime le bouton.
+ // Removes the button.
m_interface->DeleteControl(EVENT_DT_END);
- // Supprime la flèche.
+ // Removes the arrow.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -2023,7 +2025,7 @@ void CRobotMain::StopDisplayVisit()
m_visitArrow = 0;
}
- // Supprime les particules "flèches".
+ // Removes particles "arrows".
m_particule->DeleteParticule(PARTISHOW);
m_camera->StopVisit();
@@ -2031,21 +2033,21 @@ void CRobotMain::StopDisplayVisit()
ChangePause(FALSE);
if ( m_visitObject != 0 )
{
- SelectObject(m_visitObject, FALSE); // remet les boutons de commande
+ SelectObject(m_visitObject, FALSE); // gives the command buttons
m_visitObject = 0;
}
}
-// Met à jour tous les raccourcis.
+// Updates all the shortcuts.
void CRobotMain::UpdateShortcuts()
{
m_short->UpdateShortcuts();
}
-// Retourne l'objet par défaut à sélectionner après la création d'une scène.
+// Returns the object that default was select after the creation of a scene.
CObject* CRobotMain::RetSelectObject()
{
@@ -2053,7 +2055,7 @@ CObject* CRobotMain::RetSelectObject()
return SearchHuman();
}
-// Désélectionne tout, et retourne l'objet qui était sélectionné.
+// Deselects everything, and returns the object that was selected.
CObject* CRobotMain::DeselectAll()
{
@@ -2073,7 +2075,7 @@ CObject* CRobotMain::DeselectAll()
return pPrev;
}
-// Sélectionne un objet, sans s'occuper de désélectionner le reste.
+// Selects an object, without attending to deselect the rest.
void CRobotMain::SelectOneObject(CObject* pObj, BOOL bDisplayError)
{
@@ -2133,7 +2135,7 @@ void CRobotMain::SelectOneObject(CObject* pObj, BOOL bDisplayError)
}
}
-// Sélectionne l'objet visé par la souris.
+// Selects the object aimed by the mouse.
BOOL CRobotMain::SelectObject(CObject* pObj, BOOL bDisplayError)
{
@@ -2160,7 +2162,7 @@ BOOL CRobotMain::SelectObject(CObject* pObj, BOOL bDisplayError)
return TRUE;
}
-// Désélectionne l'objet sélectionné.
+// Deselects the selected object.
BOOL CRobotMain::DeselectObject()
{
@@ -2195,7 +2197,7 @@ BOOL CRobotMain::DeselectObject()
return TRUE;
}
-// Supprime rapidement tous les objets.
+// Quickly removes all objects.
void CRobotMain::DeleteAllObjects()
{
@@ -2203,7 +2205,7 @@ void CRobotMain::DeleteAllObjects()
CObject* pObj;
int i;
- // Supprime tous les effets pyrotechniques en cours.
+ // Removes all pyrotechnic effects in progress.
while ( TRUE )
{
pyro = (CPyro*)m_iMan->SearchInstance(CLASS_PYRO, 0);
@@ -2213,7 +2215,7 @@ void CRobotMain::DeleteAllObjects()
delete pyro;
}
- // Supprime la flèche.
+ // Removes the arrow.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -2231,19 +2233,19 @@ void CRobotMain::DeleteAllObjects()
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, 0);
if ( pObj == 0 ) break;
- pObj->DeleteObject(TRUE); // détruit rapidement
+ pObj->DeleteObject(TRUE); // destroys rapidly
delete pObj;
}
}
-// Sélectionne l'homme.
+// Selects the human.
void CRobotMain::SelectHuman()
{
SelectObject(SearchHuman());
}
-// Retourne l'objet de l'homme.
+// Returns the object human.
CObject* CRobotMain::SearchHuman()
{
@@ -2265,7 +2267,7 @@ CObject* CRobotMain::SearchHuman()
return 0;
}
-// Retourne l'objet de toto.
+// Returns the object toto.
CObject* CRobotMain::SearchToto()
{
@@ -2287,7 +2289,7 @@ CObject* CRobotMain::SearchToto()
return 0;
}
-// Retourne l'objet sélectionnable le plus proche d'une position donnée.
+// Returns the nearest selectable object from a given position.
CObject* CRobotMain::SearchNearest(D3DVECTOR pos, CObject* pExclu)
{
@@ -2321,7 +2323,7 @@ CObject* CRobotMain::SearchNearest(D3DVECTOR pos, CObject* pExclu)
return pBest;
}
-// Retourne l'objet sélectionné.
+// Returns the selected object.
CObject* CRobotMain::RetSelect()
{
@@ -2359,7 +2361,7 @@ CObject* CRobotMain::SearchObject(ObjectType type)
return 0;
}
-// Détecte l'objet visé par la souris.
+// Detects the object aimed by the mouse.
CObject* CRobotMain::DetectObject(FPOINT pos)
{
@@ -2490,7 +2492,7 @@ CObject* CRobotMain::DetectObject(FPOINT pos)
}
else if ( (type == OBJECT_POWER ||
type == OBJECT_ATOMIC ) &&
- pObj->RetTruck() != 0 ) // pile utilisée ?
+ pObj->RetTruck() != 0 ) // battery used?
{
pTarget = pObj->RetTruck();
}
@@ -2511,7 +2513,7 @@ CObject* CRobotMain::DetectObject(FPOINT pos)
return 0;
}
-// Indique si un objet est sélectionnable.
+// Indicates whether an object is selectable.
BOOL CRobotMain::IsSelectable(CObject* pObj)
{
@@ -2587,7 +2589,7 @@ BOOL CRobotMain::IsSelectable(CObject* pObj)
}
-// Supprime l'objet sélectionné.
+// Deletes the selected object.
BOOL CRobotMain::DeleteObject()
{
@@ -2600,7 +2602,7 @@ BOOL CRobotMain::DeleteObject()
pyro = new CPyro(m_iMan);
pyro->Create(PT_FRAGT, pObj);
- pObj->SetSelect(FALSE); // désélectionne l'objet
+ pObj->SetSelect(FALSE); // deselects the object
m_camera->SetType(CAMERA_EXPLO);
DeselectAll();
pObj->DeleteDeselList(pObj);
@@ -2609,7 +2611,7 @@ BOOL CRobotMain::DeleteObject()
}
-// Enlève la mise en évidence de l'objet survolé par la souris.
+// Removes setting evidence of the object with the mouse hovers over.
void CRobotMain::HiliteClear()
{
@@ -2617,12 +2619,12 @@ void CRobotMain::HiliteClear()
int i;
ClearTooltip();
- m_tooltipName[0] = 0; // enlève vraiment le tooltip
+ m_tooltipName[0] = 0; // really removes the tooltip
if ( !m_bHilite ) return;
i = -1;
- m_engine->SetHiliteRank(&i); // plus rien de sélectionné
+ m_engine->SetHiliteRank(&i); // nothing more selected
for ( i=0 ; i<1000000 ; i++ )
{
@@ -2637,7 +2639,7 @@ void CRobotMain::HiliteClear()
m_bHilite = FALSE;
}
-// Met en évidence l'objet survolé par la souris.
+// Highlights the object with the mouse hovers over.
void CRobotMain::HiliteObject(FPOINT pos)
{
@@ -2650,7 +2652,7 @@ void CRobotMain::HiliteObject(FPOINT pos)
if ( m_movie->IsExist() ) return;
if ( m_engine->RetMouseHide() ) return;
- ClearInterface(); // enlève mise en évidence et tooltip
+ ClearInterface(); // removes setting evidence and tooltip
pObj = m_short->DetectShort(pos);
@@ -2700,7 +2702,7 @@ void CRobotMain::HiliteObject(FPOINT pos)
}
}
-// Met en évidence l'objet survolé par la souris.
+// Highlights the object with the mouse hovers over.
void CRobotMain::HiliteFrame(float rTime)
{
@@ -2719,7 +2721,7 @@ void CRobotMain::HiliteFrame(float rTime)
}
}
-// Crée un tooltip.
+// Creates a tooltip.
void CRobotMain::CreateTooltip(FPOINT pos, char* text)
{
@@ -2735,7 +2737,7 @@ void CRobotMain::CreateTooltip(FPOINT pos, char* text)
start.x -= 0.010f;
start.y -= 0.002f;
end.x += 0.010f;
- end.y += 0.004f; // ch'tite marge
+ end.y += 0.004f; // ch'tite (?) margin
pos.x = start.x;
pos.y = start.y;
@@ -2765,7 +2767,7 @@ void CRobotMain::CreateTooltip(FPOINT pos, char* text)
}
}
-// Efface le tooltip précédent.
+// Clears the previous tooltip.
void CRobotMain::ClearTooltip()
{
@@ -2773,7 +2775,7 @@ void CRobotMain::ClearTooltip()
}
-// Affiche l'aide pour un objet.
+// Displays help for an object.
void CRobotMain::HelpObject()
{
@@ -2790,7 +2792,7 @@ void CRobotMain::HelpObject()
}
-// Change le mode de la caméra.
+// Change the mode of the camera.
void CRobotMain::ChangeCamera()
{
@@ -2840,12 +2842,12 @@ void CRobotMain::ChangeCamera()
oType != OBJECT_MOBILEdr &&
oType != OBJECT_APOLLO2 ) return;
- if ( oType == OBJECT_MOBILEdr ) // dessinateur ?
+ if ( oType == OBJECT_MOBILEdr ) // designer?
{
if ( type == CAMERA_PLANE ) type = CAMERA_BACK;
else if ( type == CAMERA_BACK ) type = CAMERA_PLANE;
}
- else if ( pObj->RetTrainer() ) // entraînement ?
+ else if ( pObj->RetTrainer() ) // trainer?
{
if ( type == CAMERA_ONBOARD ) type = CAMERA_FIX;
else if ( type == CAMERA_FIX ) type = CAMERA_PLANE;
@@ -2864,7 +2866,7 @@ void CRobotMain::ChangeCamera()
}
}
-// Télécommande la caméra avec les touches flèches.
+// Remote control the camera using the arrow keys.
void CRobotMain::KeyCamera(EventMsg event, long param)
{
@@ -2898,7 +2900,7 @@ void CRobotMain::KeyCamera(EventMsg event, long param)
}
if ( m_phase != PHASE_SIMUL ) return;
- if ( m_bEditLock ) return; // édition en cours ?
+ if ( m_bEditLock ) return; // current edition?
if ( m_bTrainerPilot ) return;
pObj = RetSelect();
@@ -2933,7 +2935,7 @@ void CRobotMain::KeyCamera(EventMsg event, long param)
}
}
-// Effectue un panoramique avec la caméra si un bouton est enfoncé.
+// Panned with the camera if a button is pressed.
void CRobotMain::RemoteCamera(float pan, float zoom, float rTime)
{
@@ -2956,7 +2958,7 @@ void CRobotMain::RemoteCamera(float pan, float zoom, float rTime)
-// Annule le film en cours.
+// Cancels the current movie.
void CRobotMain::AbortMovie()
{
@@ -2981,7 +2983,7 @@ void CRobotMain::AbortMovie()
-// Met à jour le texte d'informations.
+// Updates the text information.
void CRobotMain::UpdateInfoText()
{
@@ -3002,7 +3004,7 @@ void CRobotMain::UpdateInfoText()
}
-// Initialise le point de vue.
+// Initializes the view.
void CRobotMain::InitEye()
{
@@ -3018,7 +3020,7 @@ void CRobotMain::InitEye()
}
}
-// Fait progresser toute la scène.
+// Advances the entire scene.
BOOL CRobotMain::EventFrame(const Event &event)
{
@@ -3036,7 +3038,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
m_gameTime > 0.1f && m_phase == PHASE_SIMUL )
{
m_displayText->DisplayError(INFO_BEGINSATCOM, D3DVECTOR(0.0f,0.0f,0.0f));
- m_bBeginSatCom = TRUE; // message affiché
+ m_bBeginSatCom = TRUE; // message appears
}
m_water->EventProcess(event);
@@ -3058,7 +3060,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
toto = 0;
if ( !m_bFreePhoto )
{
- // Fait progresser tous les robots, mais pas toto.
+ // Advances all the robots, but not toto.
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
@@ -3075,7 +3077,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
pObj->EventProcess(event);
}
}
- // Fait progresser tous les objets transportés par les robots.
+ // Advances all objects transported by robots.
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
@@ -3084,7 +3086,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
pObj->EventProcess(event);
}
- // Fait progresser les effets pyrotechniques.
+ // Advances pyrotechnic effects.
for ( i=0 ; i<1000000 ; i++ )
{
pPyro = (CPyro*)m_iMan->SearchInstance(CLASS_PYRO, i);
@@ -3099,8 +3101,8 @@ BOOL CRobotMain::EventFrame(const Event &event)
}
}
- // Fait bouger la caméra après les objets, car sa position peut
- // dépendre de l'objet sélectionné (CAMERA_ONBOARD ou CAMERA_BACK).
+ // Fait bouger la cam�ra apr�s les objets, car sa position peut
+ // d�pendre de l'objet s�lectionn� (CAMERA_ONBOARD ou CAMERA_BACK).
if ( m_phase == PHASE_SIMUL && !m_bEditFull )
{
m_camera->EventProcess(event);
@@ -3117,14 +3119,14 @@ BOOL CRobotMain::EventFrame(const Event &event)
m_camera->EventProcess(event);
}
- // Fait progresser toto après la caméra, car sa position dépend
- // de la caméra.
+ // Fait progresser toto apr�s la cam�ra, car sa position d�pend
+ // de la cam�ra.
if ( toto != 0 )
{
toto->EventProcess(event);
}
- // Fait progresser le modèle.
+ // Fait progresser le mod�le.
if ( m_phase == PHASE_MODEL )
{
m_model->ViewMove(event, 2.0f);
@@ -3160,8 +3162,8 @@ BOOL CRobotMain::EventFrame(const Event &event)
}
}
- // Fait bouger l'indicateur d'édition.
- if ( m_bEditLock || m_bPause ) // édition en cours ?
+ // Fait bouger l'indicateur d'�dition.
+ if ( m_bEditLock || m_bPause ) // �dition en cours ?
{
CControl* pc;
FPOINT pos, dim;
@@ -3195,7 +3197,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
}
}
- // Fait bouger la flèche de visite.
+ // Fait bouger la fl�che de visite.
if ( m_camera->RetType() == CAMERA_VISIT )
{
FrameVisit(event.rTime);
@@ -3261,7 +3263,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
return S_OK;
}
-// Donne l'événement à tous les robots.
+// Donne l'�v�nement � tous les robots.
BOOL CRobotMain::EventObject(const Event &event)
{
@@ -3289,7 +3291,7 @@ BOOL CRobotMain::EventObject(const Event &event)
}
-// Calcule le point d'arrivée de la caméra.
+// Calcule le point d'arriv�e de la cam�ra.
D3DVECTOR CRobotMain::LookatPoint(D3DVECTOR eye, float angleH, float angleV,
float length)
@@ -3314,7 +3316,7 @@ char* SkipNum(char *p)
return p;
}
-// Conversion des unités.
+// Conversion des unit�s.
void CRobotMain::Convert()
{
@@ -3511,13 +3513,13 @@ void CRobotMain::Convert()
fclose(file);
}
-// Charge la scène pour le personnage.
+// Charge la sc�ne pour le personnage.
void CRobotMain::ScenePerso()
{
CObject* pObj;
- DeleteAllObjects(); // supprime toute la scène 3D actuelle
+ DeleteAllObjects(); // supprime toute la sc�ne 3D actuelle
m_engine->FlushObject();
m_terrain->FlushRelief(); // tout plat
m_terrain->FlushBuildingLevel();
@@ -3531,7 +3533,7 @@ void CRobotMain::ScenePerso()
m_dialog->SetSceneName("perso");
m_dialog->SetSceneRank(0);
- CreateScene(FALSE, TRUE, FALSE); // scène fixe
+ CreateScene(FALSE, TRUE, FALSE); // sc�ne fixe
m_engine->SetDrawWorld(FALSE); // ne dessine rien sous l'interface
m_engine->SetDrawFront(TRUE); // dessine human sur l'interface
@@ -3550,7 +3552,7 @@ void CRobotMain::ScenePerso()
}
}
-// Crée toute la scène.
+// Cr�e toute la sc�ne.
void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
{
@@ -3585,7 +3587,7 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
if ( !bResetObject )
{
g_build = 0;
- g_researchDone = 0; // aucune recherche effectuée
+ g_researchDone = 0; // aucune recherche effectu�e
g_researchEnable = 0;
FlushDisplayInfo();
@@ -4087,7 +4089,7 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
pObj->SetInfo(i, info);
}
- // Met les paramètres de la ligne de commande.
+ // Met les param�tres de la ligne de commande.
p = SearchOp(line, "cmdline");
for ( i=0 ; i<OBJECTMAXCMDLINE ; i++ )
{
@@ -4168,7 +4170,7 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
{
if ( i != PARAM_FIXSCENE &&
!m_dialog->RetMovies() ) i = 0;
- pAuto->Start(i); // démarre le film
+ pAuto->Start(i); // d�marre le film
}
}
@@ -4435,7 +4437,7 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
if ( !bResetObject )
{
ChangeColor(); // change les couleurs des textures
- m_short->SetMode(FALSE); // véhicules
+ m_short->SetMode(FALSE); // v�hicules
}
CreateShortcuts();
@@ -4450,7 +4452,7 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
m_selectObject = pSel;
if ( !m_bBase && // pas de base principale ?
- !m_bFixScene ) // scène interractive ?
+ !m_bFixScene ) // sc�ne interractive ?
{
if ( pSel == 0 )
{
@@ -4482,13 +4484,13 @@ void CRobotMain::CreateScene(BOOL bSoluce, BOOL bFixScene, BOOL bResetObject)
SelectObject(pSel);
m_camera->SetObject(pSel);
- m_bBeginSatCom = TRUE; // message déjà affiché
+ m_bBeginSatCom = TRUE; // message d�j� affich�
}
m_dialog->SetSceneRead("");
m_dialog->SetStackRead("");
}
-// Crée un objet du décor mobile ou fixe.
+// Cr�e un objet du d�cor mobile ou fixe.
CObject* CRobotMain::CreateObject(D3DVECTOR pos, float angle, float zoom, float height,
ObjectType type, float power,
@@ -4503,7 +4505,7 @@ CObject* CRobotMain::CreateObject(D3DVECTOR pos, float angle, float zoom, float
if ( type == OBJECT_HUMAN ||
type == OBJECT_TECH )
{
- bTrainer = FALSE; // forcément
+ bTrainer = FALSE; // forc�ment
}
if ( type == OBJECT_PORTICO ||
@@ -4825,7 +4827,7 @@ CObject* CRobotMain::CreateObject(D3DVECTOR pos, float angle, float zoom, float
}
-// Crée le modèle éditable.
+// Cr�e le mod�le �ditable.
void CRobotMain::CreateModel()
{
@@ -4880,7 +4882,7 @@ void CRobotMain::CreateModel()
}
-// Crée une lumière directionnelle.
+// Cr�e une lumi�re directionnelle.
int CRobotMain::CreateLight(D3DVECTOR direction, D3DCOLORVALUE color)
{
@@ -4906,7 +4908,7 @@ int CRobotMain::CreateLight(D3DVECTOR direction, D3DCOLORVALUE color)
return obj;
}
-// Crée une lumière spot.
+// Cr�e une lumi�re spot.
int CRobotMain::CreateSpot(D3DVECTOR pos, D3DCOLORVALUE color)
{
@@ -4966,7 +4968,7 @@ void CRobotMain::ChangeColor()
exclu[0] = FPOINT(192.0f/256.0f, 0.0f/256.0f);
exclu[1] = FPOINT(256.0f/256.0f, 64.0f/256.0f); // crystaux + bombonnes
exclu[2] = FPOINT(208.0f/256.0f, 224.0f/256.0f);
- exclu[3] = FPOINT(256.0f/256.0f, 256.0f/256.0f); // écran SatCom
+ exclu[3] = FPOINT(256.0f/256.0f, 256.0f/256.0f); // �cran SatCom
exclu[4] = FPOINT(0.0f, 0.0f);
exclu[5] = FPOINT(0.0f, 0.0f); // terminateur
m_engine->ChangeColor("human.tga", colorRef1, colorNew1, colorRef2, colorNew2, 0.30f, 0.01f, ts, ti, exclu);
@@ -5063,7 +5065,7 @@ void CRobotMain::ChangeColor()
m_engine->ChangeColor("effect02.tga", m_colorRefWater, m_colorNewWater, colorRef2, colorNew2, 0.20f, -1.0f, ts, ti, 0, m_colorShiftWater, TRUE);
}
-// Met à jour le nombre d'objets non indispansables.
+// Met � jour le nombre d'objets non indispansables.
BOOL CRobotMain::TestGadgetQuantity(int rank)
{
@@ -5099,7 +5101,7 @@ BOOL CRobotMain::TestGadgetQuantity(int rank)
-// Calcule la distance jusqu'à l'objet le plus proche.
+// Calcule la distance jusqu'� l'objet le plus proche.
float CRobotMain::SearchNearestObject(D3DVECTOR center, CObject *exclu)
{
@@ -5116,7 +5118,7 @@ float CRobotMain::SearchNearestObject(D3DVECTOR center, CObject *exclu)
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet porté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet port� ?
if ( pObj == exclu ) continue;
type = pObj->RetType();
@@ -5164,7 +5166,7 @@ BOOL CRobotMain::FreeSpace(D3DVECTOR &center, float minRadius, float maxRadius,
FPOINT p;
float radius, ia, angle, dist, flat;
- if ( minRadius < maxRadius ) // de l'intérieur vers l'extérieur ?
+ if ( minRadius < maxRadius ) // de l'int�rieur vers l'ext�rieur ?
{
for ( radius=minRadius ; radius<=maxRadius ; radius+=space )
{
@@ -5191,7 +5193,7 @@ BOOL CRobotMain::FreeSpace(D3DVECTOR &center, float minRadius, float maxRadius,
}
}
}
- else // de l'extérieur vers l'intérieur ?
+ else // de l'ext�rieur vers l'int�rieur ?
{
for ( radius=maxRadius ; radius>=minRadius ; radius-=space )
{
@@ -5238,7 +5240,7 @@ float CRobotMain::RetFlatZoneRadius(D3DVECTOR center, float maxRadius,
}
-// Cache la zone constructible lorsqu'un cube de métal est repris.
+// Cache la zone constructible lorsqu'un cube de m�tal est repris.
void CRobotMain::HideDropZone(CObject* metal)
{
@@ -5255,7 +5257,7 @@ void CRobotMain::HideDropZone(CObject* metal)
}
}
-// Montre la zone constructible lorsqu'un cube de métal est déposé.
+// Montre la zone constructible lorsqu'un cube de m�tal est d�pos�.
void CRobotMain::ShowDropZone(CObject* metal, CObject* truck)
{
@@ -5270,14 +5272,14 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck)
center = metal->RetPosition(0);
// Calcule le rayon maximal possible en fonction des autres objets.
- oMax = 30.0f; // rayon permettant de construire le plus grand bâtiment
+ oMax = 30.0f; // rayon permettant de construire le plus grand b�timent
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet porté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet port� ?
if ( pObj == metal ) continue;
if ( pObj == truck ) continue;
@@ -5315,7 +5317,7 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck)
type == OBJECT_INFO ||
type == OBJECT_PARA ||
type == OBJECT_SAFE ||
- type == OBJECT_HUSTON ) // bâtiment ?
+ type == OBJECT_HUSTON ) // b�timent ?
{
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
@@ -5343,7 +5345,7 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck)
}
}
-// Efface les limites montrées.
+// Efface les limites montr�es.
void CRobotMain::FlushShowLimit(int i)
{
@@ -5367,7 +5369,7 @@ void CRobotMain::FlushShowLimit(int i)
m_showLimit[i].bUsed = FALSE;
}
-// Spécifie les limites à montrer.
+// Sp�cifie les limites � montrer.
void CRobotMain::SetShowLimit(int i, ParticuleType parti, CObject *pObj,
D3DVECTOR pos, float radius, float duration)
@@ -5406,14 +5408,14 @@ void CRobotMain::SetShowLimit(int i, ParticuleType parti, CObject *pObj,
}
}
-// Ajuste les limites à montrer.
+// Ajuste les limites � montrer.
void CRobotMain::AdjustShowLimit(int i, D3DVECTOR pos)
{
m_showLimit[i].pos = pos;
}
-// Monter les limites de l'objet sélectionné.
+// Monter les limites de l'objet s�lectionn�.
void CRobotMain::StartShowLimit()
{
@@ -5425,7 +5427,7 @@ void CRobotMain::StartShowLimit()
pObj->StartShowLimit();
}
-// Fait avancer les limites montrées.
+// Fait avancer les limites montr�es.
void CRobotMain::FrameShowLimit(float rTime)
{
@@ -5498,7 +5500,7 @@ char* SearchLastDir(char *filename)
char* p = filename;
while ( *p++ != 0 );
- p --; // ^sur le zéro terminateur
+ p --; // ^sur le z�ro terminateur
while ( p != filename )
{
@@ -5568,7 +5570,7 @@ void CRobotMain::CompileScript(BOOL bSoluce)
}
}
- // Démarre tous les programmes selon la commande "run".
+ // D�marre tous les programmes selon la commande "run".
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
@@ -5581,7 +5583,7 @@ void CRobotMain::CompileScript(BOOL bSoluce)
run = brain->RetScriptRun();
if ( run != -1 )
{
- brain->RunProgram(run); // démarre le programme
+ brain->RunProgram(run); // d�marre le programme
}
}
}
@@ -5677,7 +5679,7 @@ void CRobotMain::SaveAllScript()
}
// Sauve tous les programmes d'un robot.
-// Si un programme n'existe pas, le fichier correspondant est détruit.
+// Si un programme n'existe pas, le fichier correspondant est d�truit.
void CRobotMain::SaveOneScript(CObject *pObj)
{
@@ -5710,7 +5712,7 @@ void CRobotMain::SaveOneScript(CObject *pObj)
}
// Sauve tous les programmes d'un robot.
-// Si un programme n'existe pas, le fichier correspondant est détruit.
+// Si un programme n'existe pas, le fichier correspondant est d�truit.
void CRobotMain::SaveFileScript(CObject *pObj, char* filename, int objRank)
{
@@ -5743,7 +5745,7 @@ void CRobotMain::SaveFileScript(CObject *pObj, char* filename, int objRank)
}
}
-// Sauve le stack du programme en exécution d'un robot.
+// Sauve le stack du programme en ex�cution d'un robot.
BOOL CRobotMain::SaveFileStack(CObject *pObj, FILE *file, int objRank)
{
@@ -5761,7 +5763,7 @@ BOOL CRobotMain::SaveFileStack(CObject *pObj, FILE *file, int objRank)
return brain->WriteStack(file);
}
-// Reprend le stack du programme en exécution d'un robot.
+// Reprend le stack du programme en ex�cution d'un robot.
BOOL CRobotMain::ReadFileStack(CObject *pObj, FILE *file, int objRank)
{
@@ -5812,7 +5814,7 @@ BOOL CRobotMain::AddNewScriptName(ObjectType type, char *name)
return FALSE;
}
-// Cherche un nom de script pour un type donné.
+// Cherche un nom de script pour un type donn�.
char* CRobotMain::RetNewScriptName(ObjectType type, int rank)
{
@@ -5833,7 +5835,7 @@ char* CRobotMain::RetNewScriptName(ObjectType type, int rank)
}
-// Cherche si un objet est occupé dans une tâche, pour interdire
+// Cherche si un objet est occup� dans une t�che, pour interdire
// une sauvegarde de la partie.
BOOL CRobotMain::IsBusy()
@@ -5931,7 +5933,7 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd)
sprintf(name, " option=%d", pObj->RetOption());
strcat(line, name);
- if ( pObj == m_infoObject ) // objet sélectionné ?
+ if ( pObj == m_infoObject ) // objet s�lectionn� ?
{
sprintf(name, " select=1");
strcat(line, name);
@@ -5941,7 +5943,7 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd)
if ( pObj->RetType() == OBJECT_BASE )
{
- sprintf(name, " run=3"); // stoppé et ouvert (PARAM_FIXSCENE)
+ sprintf(name, " run=3"); // stopp� et ouvert (PARAM_FIXSCENE)
strcat(line, name);
}
@@ -6020,12 +6022,12 @@ BOOL CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
pPower = pObj->RetPower();
pFret = pObj->RetFret();
- if ( pFret != 0 ) // objet transporté ?
+ if ( pFret != 0 ) // objet transport� ?
{
IOWriteObject(file, pFret, "CreateFret");
}
- if ( pPower != 0 ) // pile transportée ?
+ if ( pPower != 0 ) // pile transport�e ?
{
IOWriteObject(file, pPower, "CreatePower");
}
@@ -6037,7 +6039,7 @@ BOOL CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
fclose(file);
#if CBOT_STACK
- // Ecrit le fichier des stacks d'exécution.
+ // Ecrit le fichier des stacks d'ex�cution.
file = fOpen(filecbot, "wb");
if ( file == NULL ) return FALSE;
@@ -6068,7 +6070,7 @@ BOOL CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
return TRUE;
}
-// Reprend un objet enregistré.
+// Reprend un objet enregistr�.
CObject* CRobotMain::IOReadObject(char *line, char* filename, int objRank)
{
@@ -6144,21 +6146,21 @@ CObject* CRobotMain::IOReadObject(char *line, char* filename, int objRank)
pBrain = pObj->RetBrain();
if ( pBrain != 0 )
{
- pBrain->RunProgram(run-1); // démarre le programme
+ pBrain->RunProgram(run-1); // d�marre le programme
}
#endif
pAuto = pObj->RetAuto();
if ( pAuto != 0 )
{
- pAuto->Start(run); // démarre le film
+ pAuto->Start(run); // d�marre le film
}
}
return pObj;
}
-// Reprend une partie enregistrée.
+// Reprend une partie enregistr�e.
CObject* CRobotMain::IOReadScene(char *filename, char *filecbot)
{
@@ -6271,7 +6273,7 @@ CObject* CRobotMain::IOReadScene(char *filename, char *filecbot)
}
while ( nbError > 0 && nbError != lastError );
- // Lit le fichier des stacks d'exécution.
+ // Lit le fichier des stacks d'ex�cution.
file = fOpen(filecbot, "rb");
if ( file != NULL )
{
@@ -6306,7 +6308,7 @@ CObject* CRobotMain::IOReadScene(char *filename, char *filecbot)
}
-// Ecrit les paramètres globaux pour le jeu libre.
+// Ecrit les param�tres globaux pour le jeu libre.
void CRobotMain::WriteFreeParam()
{
@@ -6328,7 +6330,7 @@ void CRobotMain::WriteFreeParam()
fclose(file);
}
-// Lit les paramètres globaux pour le jeu libre.
+// Lit les param�tres globaux pour le jeu libre.
void CRobotMain::ReadFreeParam()
{
@@ -6354,7 +6356,7 @@ void CRobotMain::ReadFreeParam()
}
-// Remet tous les objets à leur place initiale.
+// Remet tous les objets � leur place initiale.
void CRobotMain::ResetObject()
{
@@ -6449,7 +6451,7 @@ void CRobotMain::ResetObject()
#endif
}
-// Remet tous les objets à leur place initiale.
+// Remet tous les objets � leur place initiale.
void CRobotMain::ResetCreate()
{
@@ -6466,8 +6468,8 @@ void CRobotMain::ResetCreate()
m_particule->DeleteParticule(PARTIGUN3);
m_particule->DeleteParticule(PARTIGUN4);
- DeselectAll(); // enlève les boutons de commande
- DeleteAllObjects(); // supprime toute la scène 3D actuelle
+ DeselectAll(); // enl�ve les boutons de commande
+ DeleteAllObjects(); // supprime toute la sc�ne 3D actuelle
m_particule->FlushParticule();
m_terrain->FlushBuildingLevel();
@@ -6494,7 +6496,7 @@ void CRobotMain::ResetCreate()
}
}
-// Vérifie si la mission est terminée.
+// V�rifie si la mission est termin�e.
Error CRobotMain::CheckEndMission(BOOL bFrame)
{
@@ -6517,7 +6519,7 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
if ( pObj == 0 ) break;
// Ne pas utiliser RetActif(), car un ver invisible (sous terre)
- // doit être considéré comme existant ici !
+ // doit �tre consid�r� comme existant ici !
if ( pObj->RetLock() ) continue;
if ( pObj->RetRuin() ) continue;
if ( !pObj->RetEnable() ) continue;
@@ -6526,7 +6528,7 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
if ( type == OBJECT_SCRAP2 ||
type == OBJECT_SCRAP3 ||
type == OBJECT_SCRAP4 ||
- type == OBJECT_SCRAP5 ) // déchet ?
+ type == OBJECT_SCRAP5 ) // d�chet ?
{
type = OBJECT_SCRAP1;
}
@@ -6553,7 +6555,7 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
{
if ( m_lostDelay == 0.0f )
{
- m_lostDelay = 0.1f; // perdu immédiatement
+ m_lostDelay = 0.1f; // perdu imm�diatement
m_winDelay = 0.0f;
}
m_displayText->SetEnable(FALSE);
@@ -6581,11 +6583,11 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
{
if ( m_winDelay == 0.0f )
{
- m_winDelay = m_endTakeWinDelay; // gagné dans x seconde
+ m_winDelay = m_endTakeWinDelay; // gagn� dans x seconde
m_lostDelay = 0.0f;
}
m_displayText->SetEnable(FALSE);
- return ERR_OK; // mission terminée
+ return ERR_OK; // mission termin�e
}
}
@@ -6600,10 +6602,10 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
if ( m_endTakeWinDelay == -1.0f )
{
- m_winDelay = 1.0f; // gagné dans 1 seconde
+ m_winDelay = 1.0f; // gagn� dans 1 seconde
m_lostDelay = 0.0f;
m_displayText->SetEnable(FALSE);
- return ERR_OK; // mission terminée
+ return ERR_OK; // mission termin�e
}
if ( bFrame && m_bBase ) return ERR_MISSION_NOTERM;
@@ -6611,14 +6613,14 @@ Error CRobotMain::CheckEndMission(BOOL bFrame)
if ( m_winDelay == 0.0f )
{
m_displayText->DisplayError(INFO_WIN, D3DVECTOR(0.0f,0.0f,0.0f));
- m_winDelay = m_endTakeWinDelay; // gagné dans 2 secondes
+ m_winDelay = m_endTakeWinDelay; // gagn� dans 2 secondes
m_lostDelay = 0.0f;
}
m_displayText->SetEnable(FALSE);
- return ERR_OK; // mission terminée
+ return ERR_OK; // mission termin�e
}
-// Vérifie si la mission est terminée suite à l'affichage d'un message.
+// V�rifie si la mission est termin�e suite � l'affichage d'un message.
void CRobotMain::CheckEndMessage(char *message)
{
@@ -6631,7 +6633,7 @@ void CRobotMain::CheckEndMessage(char *message)
if ( strcmp(m_endTake[t].message, message) == 0 )
{
m_displayText->DisplayError(INFO_WIN, D3DVECTOR(0.0f,0.0f,0.0f));
- m_winDelay = m_endTakeWinDelay; // gagné dans 2 secondes
+ m_winDelay = m_endTakeWinDelay; // gagn� dans 2 secondes
m_lostDelay = 0.0f;
}
}
@@ -6652,7 +6654,7 @@ char* CRobotMain::RetObligatoryToken(int i)
return m_obligatoryToken[i];
}
-// Vérifie si une instruction fait partie de la liste obligatoire.
+// V�rifie si une instruction fait partie de la liste obligatoire.
int CRobotMain::IsObligatoryToken(char *token)
{
@@ -6668,7 +6670,7 @@ int CRobotMain::IsObligatoryToken(char *token)
return -1;
}
-// Vérifie si une instruction ne fait pas partie de la liste interdite.
+// V�rifie si une instruction ne fait pas partie de la liste interdite.
BOOL CRobotMain::IsProhibitedToken(char *token)
{
@@ -6685,14 +6687,14 @@ BOOL CRobotMain::IsProhibitedToken(char *token)
}
-// Indique s'il est possible de télécommander un robot d'entraînement.
+// Indique s'il est possible de t�l�commander un robot d'entra�nement.
BOOL CRobotMain::RetTrainerPilot()
{
return m_bTrainerPilot;
}
-// Indique si la scène est fixe, sans interraction.
+// Indique si la sc�ne est fixe, sans interraction.
BOOL CRobotMain::RetFixScene()
{
@@ -6800,28 +6802,28 @@ char* CRobotMain::RetGamerName()
}
-// Retourne la représentation à utiliser pour le joueur.
+// Retourne la repr�sentation � utiliser pour le joueur.
int CRobotMain::RetGamerFace()
{
return m_dialog->RetGamerFace();
}
-// Retourne la représentation à utiliser pour le joueur.
+// Retourne la repr�sentation � utiliser pour le joueur.
int CRobotMain::RetGamerGlasses()
{
return m_dialog->RetGamerGlasses();
}
-// Retourne le mode avec seulement la tête.
+// Retourne le mode avec seulement la t�te.
BOOL CRobotMain::RetGamerOnlyHead()
{
return m_dialog->RetGamerOnlyHead();
}
-// Retourne l'angle de présentation.
+// Retourne l'angle de pr�sentation.
float CRobotMain::RetPersoAngle()
{
@@ -6873,7 +6875,7 @@ float CRobotMain::RetSpeed()
}
-// Crée l'interface des raccourcis aux unités.
+// Cr�e l'interface des raccourcis aux unit�s.
BOOL CRobotMain::CreateShortcuts()
{
@@ -6882,7 +6884,7 @@ BOOL CRobotMain::CreateShortcuts()
return m_short->CreateShortcuts();
}
-// Met à jour la carte.
+// Met � jour la carte.
void CRobotMain::UpdateMap()
{
@@ -6932,7 +6934,7 @@ BOOL CRobotMain::RetSatComLock()
return m_bSatComLock;
}
-// Gestion du mode de blocage pendant l'édition.
+// Gestion du mode de blocage pendant l'�dition.
void CRobotMain::SetEditLock(BOOL bLock, BOOL bEdit)
{
@@ -6940,7 +6942,7 @@ void CRobotMain::SetEditLock(BOOL bLock, BOOL bEdit)
CreateShortcuts();
- // N'enlève pas la carte si elle contient une image fixe.
+ // N'enl�ve pas la carte si elle contient une image fixe.
if ( !bLock || !m_map->RetFixImage() )
{
m_map->ShowMap(!m_bEditLock && m_bMapShow);
@@ -6964,7 +6966,7 @@ BOOL CRobotMain::RetEditLock()
return m_bEditLock;
}
-// Gestion du mode plein écran pendant l'édition.
+// Gestion du mode plein �cran pendant l'�dition.
void CRobotMain::SetEditFull(BOOL bFull)
{
@@ -6997,7 +6999,7 @@ BOOL CRobotMain::RetFriendAim()
}
-// Gestion de la précision du dessin au sol.
+// Gestion de la pr�cision du dessin au sol.
void CRobotMain::SetTracePrecision(float factor)
{
@@ -7010,7 +7012,7 @@ float CRobotMain::RetTracePrecision()
}
-// Débute la musique d'une mission.
+// D�bute la musique d'une mission.
void CRobotMain::StartMusic()
{
@@ -7021,12 +7023,12 @@ void CRobotMain::StartMusic()
}
}
-// Enlève hilite et tooltip.
+// Enl�ve hilite et tooltip.
void CRobotMain::ClearInterface()
{
- HiliteClear(); // enlève la mise en évidence
- m_tooltipName[0] = 0; // enlève vraiment le tooltip
+ HiliteClear(); // enl�ve la mise en �vidence
+ m_tooltipName[0] = 0; // enl�ve vraiment le tooltip
}