summaryrefslogtreecommitdiffstats
path: root/src/autoresearch.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/autoresearch.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/autoresearch.cpp')
-rw-r--r--src/autoresearch.cpp54
1 files changed, 34 insertions, 20 deletions
diff --git a/src/autoresearch.cpp b/src/autoresearch.cpp
index fcaa29e..852c4b9 100644
--- a/src/autoresearch.cpp
+++ b/src/autoresearch.cpp
@@ -1,4 +1,18 @@
-// autoresearch.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
@@ -32,7 +46,7 @@
-#define SEARCH_TIME 30.0f // durée d'une recherche
+#define SEARCH_TIME 30.0f // dur�e d'une recherche
@@ -62,7 +76,7 @@ CAutoResearch::~CAutoResearch()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoResearch::DeleteObject(BOOL bAll)
{
@@ -93,7 +107,7 @@ void CAutoResearch::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoResearch::EventProcess(const Event &event)
{
@@ -112,7 +126,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
if ( m_object->RetSelect() ) CreateInterface(TRUE);
}
- if ( m_object->RetSelect() && // centre sélectionné ?
+ if ( m_object->RetSelect() && // centre s�lectionn� ?
(event.event == EVENT_OBJECT_RTANK ||
event.event == EVENT_OBJECT_RFLY ||
event.event == EVENT_OBJECT_RTHUMP ||
@@ -177,7 +191,7 @@ BOOL CAutoResearch::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 )
{
@@ -197,7 +211,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
if ( m_phase == ALP_WAIT )
{
- FireStopUpdate(m_progress, FALSE); // éteint
+ FireStopUpdate(m_progress, FALSE); // �teint
return TRUE;
}
@@ -237,7 +251,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
}
else
{
- SetResearch(m_research); // recherche effectuée
+ SetResearch(m_research); // recherche effectu�e
m_displayText->DisplayError(INFO_RESEARCH, m_object);
message = ERR_OK;
@@ -267,7 +281,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoResearch::RetError()
{
@@ -301,7 +315,7 @@ Error CAutoResearch::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoResearch::CreateInterface(BOOL bSelect)
{
@@ -372,7 +386,7 @@ BOOL CAutoResearch::CreateInterface(BOOL bSelect)
return TRUE;
}
-// Met à jour l'état de tous les boutons de l'interface.
+// Met � jour l'�tat de tous les boutons de l'interface.
void CAutoResearch::UpdateInterface()
{
@@ -413,8 +427,8 @@ void CAutoResearch::UpdateInterface()
VisibleInterface(pw, EVENT_OBJECT_RATOMIC, !m_bBusy);
}
-// Met à jour l'état de tous les boutons de l'interface,
-// suite au temps qui s'écoule ...
+// Met � jour l'�tat de tous les boutons de l'interface,
+// suite au temps qui s'�coule ...
void CAutoResearch::UpdateInterface(float rTime)
{
@@ -446,7 +460,7 @@ void CAutoResearch::UpdateInterface(float rTime)
}
}
-// Indique les recherches déjà effectuées pour un bouton.
+// Indique les recherches d�j� effectu�es pour un bouton.
void CAutoResearch::OkayButton(CWindow *pw, EventMsg event)
{
@@ -459,7 +473,7 @@ void CAutoResearch::OkayButton(CWindow *pw, EventMsg event)
}
-// Teste si une recherche a déjà été effectuée.
+// Teste si une recherche a d�j� �t� effectu�e.
BOOL CAutoResearch::TestResearch(EventMsg event)
{
@@ -475,7 +489,7 @@ BOOL CAutoResearch::TestResearch(EventMsg event)
return FALSE;
}
-// Indique une recherche comme effectuée.
+// Indique une recherche comme effectu�e.
void CAutoResearch::SetResearch(EventMsg event)
{
@@ -498,7 +512,7 @@ void CAutoResearch::SetResearch(EventMsg event)
}
-// Met à jour les feux de stop.
+// Met � jour les feux de stop.
void CAutoResearch::FireStopUpdate(float progress, BOOL bLightOn)
{
@@ -517,7 +531,7 @@ void CAutoResearch::FireStopUpdate(float progress, BOOL bLightOn)
4.7f, -8.2f,
};
- if ( !bLightOn ) // éteint ?
+ if ( !bLightOn ) // �teint ?
{
for ( i=0 ; i<6 ; i++ )
{
@@ -563,7 +577,7 @@ void CAutoResearch::FireStopUpdate(float progress, BOOL bLightOn)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoResearch::Write(char *line)
{
@@ -591,7 +605,7 @@ BOOL CAutoResearch::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoResearch::Read(char *line)
{