summaryrefslogtreecommitdiffstats
path: root/src/autonuclear.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/autonuclear.cpp')
-rw-r--r--src/autonuclear.cpp44
1 files changed, 29 insertions, 15 deletions
diff --git a/src/autonuclear.cpp b/src/autonuclear.cpp
index b33dd4c..feeca81 100644
--- a/src/autonuclear.cpp
+++ b/src/autonuclear.cpp
@@ -1,4 +1,18 @@
-// autonuclear.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
@@ -31,7 +45,7 @@
-#define NUCLEAR_DELAY 30.0f // durée de la génération
+#define NUCLEAR_DELAY 30.0f // dur�e de la g�n�ration
@@ -55,7 +69,7 @@ CAutoNuclear::~CAutoNuclear()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoNuclear::DeleteObject(BOOL bAll)
{
@@ -66,7 +80,7 @@ void CAutoNuclear::DeleteObject(BOOL bAll)
fret = SearchUranium();
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit le métal
+ fret->DeleteObject(); // d�truit le m�tal
delete fret;
}
}
@@ -103,7 +117,7 @@ void CAutoNuclear::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoNuclear::EventProcess(const Event &event)
{
@@ -122,7 +136,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
- if ( m_object->RetVirusMode() ) // contaminé par un virus ?
+ if ( m_object->RetVirusMode() ) // contamin� par un virus ?
{
if ( m_timeVirus <= 0.0f )
{
@@ -137,7 +151,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- fret = SearchUranium(); // uranium à transformer ?
+ fret = SearchUranium(); // uranium � transformer ?
if ( fret == 0 || SearchVehicle() )
{
m_phase = ANUP_WAIT; // attend encore ...
@@ -233,12 +247,12 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
fret = SearchUranium();
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit l'uranium
+ fret->DeleteObject(); // d�truit l'uranium
delete fret;
m_object->SetPower(0);
}
- CreatePower(); // crée la pile atomique
+ CreatePower(); // cr�e la pile atomique
max = (int)(20.0f*m_engine->RetParticuleDensity());
for ( i=0 ; i<max ; i++ )
@@ -289,7 +303,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoNuclear::CreateInterface(BOOL bSelect)
{
@@ -331,7 +345,7 @@ CObject* CAutoNuclear::SearchUranium()
return 0;
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CAutoNuclear::SearchVehicle()
{
@@ -390,7 +404,7 @@ BOOL CAutoNuclear::SearchVehicle()
return FALSE;
}
-// Crée un objet pile.
+// Cr�e un objet pile.
void CAutoNuclear::CreatePower()
{
@@ -415,7 +429,7 @@ void CAutoNuclear::CreatePower()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoNuclear::RetError()
{
@@ -444,7 +458,7 @@ Error CAutoNuclear::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoNuclear::Write(char *line)
{
@@ -470,7 +484,7 @@ BOOL CAutoNuclear::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoNuclear::Read(char *line)
{