summaryrefslogtreecommitdiffstats
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
parenta4c804b49ec872b71bd5a0167c3ad45704a3cc30 (diff)
downloadcolobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.tar.gz
colobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.tar.bz2
colobot-84d1f79fdf02e0010e4b2d118458e8cd8ce0dd71.zip
Added license info using a small program SrcHead.
-rw-r--r--src/CBot/CBot.cpp669
-rw-r--r--src/CBot/CBot.h305
-rw-r--r--src/CBot/CBotAddExpr.cpp82
-rw-r--r--src/CBot/CBotClass.cpp136
-rw-r--r--src/CBot/CBotCompExpr.cpp55
-rw-r--r--src/CBot/CBotDll.h459
-rw-r--r--src/CBot/CBotFunction.cpp266
-rw-r--r--src/CBot/CBotIf.cpp77
-rw-r--r--src/CBot/CBotProgram.cpp143
-rw-r--r--src/CBot/CBotStack.cpp233
-rw-r--r--src/CBot/CBotString.cpp25
-rw-r--r--src/CBot/CBotToken.cpp113
-rw-r--r--src/CBot/CBotToken.h21
-rw-r--r--src/CBot/CBotTwoOpExpr ordre inversé.cpp134
-rw-r--r--src/CBot/CBotTwoOpExpr.cpp168
-rw-r--r--src/CBot/CBotVar.cpp162
-rw-r--r--src/CBot/CBotWhile.cpp392
-rw-r--r--src/CBot/ClassFILE.cpp164
-rw-r--r--src/CBot/Copie de CBotTwoOpExpr.cpp130
-rw-r--r--src/CBot/StringFunctions.cpp216
-rw-r--r--src/CBot/TestCBot/CBotConsoleDlg.cpp21
-rw-r--r--src/CBot/TestCBot/CBotConsoleDlg.h15
-rw-r--r--src/CBot/TestCBot/ChildFrm.cpp17
-rw-r--r--src/CBot/TestCBot/ChildFrm.h18
-rw-r--r--src/CBot/TestCBot/MainFrm.cpp17
-rw-r--r--src/CBot/TestCBot/MainFrm.h18
-rw-r--r--src/CBot/TestCBot/PerformDlg.cpp21
-rw-r--r--src/CBot/TestCBot/PerformDlg.h15
-rw-r--r--src/CBot/TestCBot/Routines.cpp41
-rw-r--r--src/CBot/TestCBot/StdAfx.cpp18
-rw-r--r--src/CBot/TestCBot/StdAfx.h19
-rw-r--r--src/CBot/TestCBot/TestCBot.cpp29
-rw-r--r--src/CBot/TestCBot/TestCBot.h17
-rw-r--r--src/CBot/TestCBot/TestCBotDoc.cpp55
-rw-r--r--src/CBot/TestCBot/TestCBotDoc.h22
-rw-r--r--src/CBot/TestCBot/TestCBotView.cpp19
-rw-r--r--src/CBot/TestCBot/TestCBotView.h18
-rw-r--r--src/CBot/TestCBot/resource.h19
-rw-r--r--src/CBot/old CBotAddExpr.cpp84
-rw-r--r--src/CBot/old CBotCompExpr.cpp57
-rw-r--r--src/CBot/old TstCBot/BotConsoleDlg.cpp21
-rw-r--r--src/CBot/old TstCBot/BotConsoleDlg.h15
-rw-r--r--src/CBot/old TstCBot/BotErrorDlg.cpp17
-rw-r--r--src/CBot/old TstCBot/BotErrorDlg.h15
-rw-r--r--src/CBot/old TstCBot/CMyThread.cpp19
-rw-r--r--src/CBot/old TstCBot/CMyThread.h18
-rw-r--r--src/CBot/old TstCBot/MainFrm.cpp17
-rw-r--r--src/CBot/old TstCBot/MainFrm.h18
-rw-r--r--src/CBot/old TstCBot/Resource.h19
-rw-r--r--src/CBot/old TstCBot/StdAfx.cpp18
-rw-r--r--src/CBot/old TstCBot/StdAfx.h19
-rw-r--r--src/CBot/old TstCBot/TstCBot.cpp71
-rw-r--r--src/CBot/old TstCBot/TstCBot.h17
-rw-r--r--src/CBot/old TstCBot/TstCBotDoc.cpp17
-rw-r--r--src/CBot/old TstCBot/TstCBotDoc.h18
-rw-r--r--src/CBot/old TstCBot/TstCBotView.cpp29
-rw-r--r--src/CBot/old TstCBot/TstCBotView.h22
-rw-r--r--src/CBot/resource.h19
-rw-r--r--src/ClassFILE.cpp164
-rw-r--r--src/Copie de taskgoto.cpp152
-rw-r--r--src/SrcHead.config19
-rw-r--r--src/SrcHead.exebin0 -> 12800 bytes
-rw-r--r--src/auto.cpp52
-rw-r--r--src/auto.h16
-rw-r--r--src/autobase.cpp140
-rw-r--r--src/autobase.h34
-rw-r--r--src/autoconvert.cpp44
-rw-r--r--src/autoconvert.h16
-rw-r--r--src/autoderrick.cpp44
-rw-r--r--src/autoderrick.h20
-rw-r--r--src/autodestroyer.cpp38
-rw-r--r--src/autodestroyer.h20
-rw-r--r--src/autoegg.cpp38
-rw-r--r--src/autoegg.h16
-rw-r--r--src/autoenergy.cpp58
-rw-r--r--src/autoenergy.h16
-rw-r--r--src/autofactory.cpp62
-rw-r--r--src/autofactory.h20
-rw-r--r--src/autoflag.cpp24
-rw-r--r--src/autoflag.h16
-rw-r--r--src/autohuston.cpp32
-rw-r--r--src/autohuston.h16
-rw-r--r--src/autoinfo.cpp40
-rw-r--r--src/autoinfo.h16
-rw-r--r--src/autojostle.cpp26
-rw-r--r--src/autojostle.h16
-rw-r--r--src/autokid.cpp22
-rw-r--r--src/autokid.h16
-rw-r--r--src/autolabo.cpp46
-rw-r--r--src/autolabo.h16
-rw-r--r--src/automush.cpp26
-rw-r--r--src/automush.h16
-rw-r--r--src/autonest.cpp30
-rw-r--r--src/autonest.h16
-rw-r--r--src/autonuclear.cpp44
-rw-r--r--src/autonuclear.h16
-rw-r--r--src/autopara.cpp34
-rw-r--r--src/autopara.h16
-rw-r--r--src/autoportico.cpp34
-rw-r--r--src/autoportico.h18
-rw-r--r--src/autoradar.cpp30
-rw-r--r--src/autoradar.h16
-rw-r--r--src/autorepair.cpp32
-rw-r--r--src/autorepair.h20
-rw-r--r--src/autoresearch.cpp54
-rw-r--r--src/autoresearch.h16
-rw-r--r--src/autoroot.cpp22
-rw-r--r--src/autoroot.h16
-rw-r--r--src/autosafe.cpp50
-rw-r--r--src/autosafe.h16
-rw-r--r--src/autostation.cpp40
-rw-r--r--src/autostation.h16
-rw-r--r--src/autotower.cpp46
-rw-r--r--src/autotower.h18
-rw-r--r--src/blitz.cpp40
-rw-r--r--src/blitz.h16
-rw-r--r--src/brain.cpp202
-rw-r--r--src/brain.h22
-rw-r--r--src/button.cpp28
-rw-r--r--src/button.h16
-rw-r--r--src/camera.cpp112
-rw-r--r--src/camera.h74
-rw-r--r--src/cbottoken.cpp26
-rw-r--r--src/cbottoken.h18
-rw-r--r--src/check.cpp24
-rw-r--r--src/check.h16
-rw-r--r--src/cloud.cpp22
-rw-r--r--src/cloud.h22
-rw-r--r--src/cmdtoken.cpp52
-rw-r--r--src/cmdtoken.h18
-rw-r--r--src/color.cpp20
-rw-r--r--src/color.h16
-rw-r--r--src/compass.cpp20
-rw-r--r--src/compass.h16
-rw-r--r--src/control.cpp56
-rw-r--r--src/control.h36
-rw-r--r--src/d3dapp.cpp72
-rw-r--r--src/d3dapp.h16
-rw-r--r--src/d3dengine.cpp312
-rw-r--r--src/d3dengine.h58
-rw-r--r--src/d3denum.cpp22
-rw-r--r--src/d3denum.h22
-rw-r--r--src/d3dframe.cpp22
-rw-r--r--src/d3dframe.h35
-rw-r--r--src/d3dmath.cpp22
-rw-r--r--src/d3dmath.h22
-rw-r--r--src/d3dres.h24
-rw-r--r--src/d3dtextr.cpp29
-rw-r--r--src/d3dtextr.h27
-rw-r--r--src/d3dutil.cpp23
-rw-r--r--src/d3dutil.h22
-rw-r--r--src/dd.cpp18
-rw-r--r--src/displayinfo.cpp42
-rw-r--r--src/displayinfo.h16
-rw-r--r--src/displaytext.cpp30
-rw-r--r--src/displaytext.h16
-rw-r--r--src/edit.cpp170
-rw-r--r--src/edit.h48
-rw-r--r--src/editvalue.cpp28
-rw-r--r--src/editvalue.h20
-rw-r--r--src/event.cpp24
-rw-r--r--src/event.h24
-rw-r--r--src/gauge.cpp20
-rw-r--r--src/gauge.h16
-rw-r--r--src/global.h36
-rw-r--r--src/group.cpp36
-rw-r--r--src/group.h16
-rw-r--r--src/header.txt15
-rw-r--r--src/image.cpp22
-rw-r--r--src/image.h16
-rw-r--r--src/iman.cpp20
-rw-r--r--src/iman.h16
-rw-r--r--src/interface.cpp60
-rw-r--r--src/interface.h16
-rw-r--r--src/joystick.cpp16
-rw-r--r--src/joystick.h16
-rw-r--r--src/key.cpp30
-rw-r--r--src/key.h16
-rw-r--r--src/label.cpp20
-rw-r--r--src/label.h16
-rw-r--r--src/language.h20
-rw-r--r--src/light.cpp58
-rw-r--r--src/light.h24
-rw-r--r--src/list.cpp52
-rw-r--r--src/list.h20
-rw-r--r--src/maindialog.cpp234
-rw-r--r--src/maindialog.h36
-rw-r--r--src/mainmap.cpp30
-rw-r--r--src/mainmap.h16
-rw-r--r--src/mainmovie.cpp26
-rw-r--r--src/mainmovie.h16
-rw-r--r--src/mainshort.cpp36
-rw-r--r--src/mainshort.h16
-rw-r--r--src/map.cpp82
-rw-r--r--src/map.h16
-rw-r--r--src/math3d.cpp78
-rw-r--r--src/math3d.h16
-rw-r--r--src/metafile.cpp24
-rw-r--r--src/metafile.h20
-rw-r--r--src/misc.cpp278
-rw-r--r--src/misc.h192
-rw-r--r--src/model.cpp372
-rw-r--r--src/model.h16
-rw-r--r--src/modfile.cpp34
-rw-r--r--src/modfile.h28
-rw-r--r--src/motion.cpp34
-rw-r--r--src/motion.h18
-rw-r--r--src/motionant.cpp108
-rw-r--r--src/motionant.h16
-rw-r--r--src/motionbee.cpp92
-rw-r--r--src/motionbee.h16
-rw-r--r--src/motionhuman.cpp132
-rw-r--r--src/motionhuman.h16
-rw-r--r--src/motionmother.cpp82
-rw-r--r--src/motionmother.h16
-rw-r--r--src/motionspider.cpp74
-rw-r--r--src/motionspider.h16
-rw-r--r--src/motiontoto.cpp80
-rw-r--r--src/motiontoto.h16
-rw-r--r--src/motionvehicle.cpp194
-rw-r--r--src/motionvehicle.h16
-rw-r--r--src/motionworm.cpp44
-rw-r--r--src/motionworm.h16
-rw-r--r--src/object.cpp400
-rw-r--r--src/object.h132
-rw-r--r--src/particule.cpp174
-rw-r--r--src/particule.h156
-rw-r--r--src/physics.cpp284
-rw-r--r--src/physics.h34
-rw-r--r--src/planet.cpp30
-rw-r--r--src/planet.h22
-rw-r--r--src/profile.cpp16
-rw-r--r--src/profile.h16
-rw-r--r--src/pyro.cpp162
-rw-r--r--src/pyro.h34
-rw-r--r--src/resource.h19
-rw-r--r--src/restext-old.cpp1284
-rw-r--r--src/restext.cpp1746
-rw-r--r--src/restext.h16
-rw-r--r--src/robotmain.cpp392
-rw-r--r--src/robotmain.h34
-rw-r--r--src/script.cpp184
-rw-r--r--src/script.h22
-rw-r--r--src/scroll.cpp22
-rw-r--r--src/scroll.h16
-rw-r--r--src/shortcut.cpp20
-rw-r--r--src/shortcut.h16
-rw-r--r--src/slider.cpp22
-rw-r--r--src/slider.h16
-rw-r--r--src/sound.cpp72
-rw-r--r--src/sound.h28
-rw-r--r--src/struct.h16
-rw-r--r--src/studio.cpp98
-rw-r--r--src/studio.h16
-rw-r--r--src/target.cpp32
-rw-r--r--src/target.h16
-rw-r--r--src/task.cpp20
-rw-r--r--src/task.h18
-rw-r--r--src/taskadvance.cpp24
-rw-r--r--src/taskadvance.h16
-rw-r--r--src/taskbuild.cpp72
-rw-r--r--src/taskbuild.h34
-rw-r--r--src/taskfire.cpp30
-rw-r--r--src/taskfire.h16
-rw-r--r--src/taskfireant.cpp32
-rw-r--r--src/taskfireant.h20
-rw-r--r--src/taskflag.cpp30
-rw-r--r--src/taskflag.h18
-rw-r--r--src/taskgoto.cpp170
-rw-r--r--src/taskgoto.h48
-rw-r--r--src/taskgungoal.cpp22
-rw-r--r--src/taskgungoal.h20
-rw-r--r--src/taskinfo.cpp36
-rw-r--r--src/taskinfo.h16
-rw-r--r--src/taskmanager.cpp34
-rw-r--r--src/taskmanager.h16
-rw-r--r--src/taskmanip.cpp154
-rw-r--r--src/taskmanip.h30
-rw-r--r--src/taskpen.cpp30
-rw-r--r--src/taskpen.h16
-rw-r--r--src/taskrecover.cpp48
-rw-r--r--src/taskrecover.h18
-rw-r--r--src/taskreset.cpp30
-rw-r--r--src/taskreset.h24
-rw-r--r--src/tasksearch.cpp28
-rw-r--r--src/tasksearch.h16
-rw-r--r--src/taskshield.cpp38
-rw-r--r--src/taskshield.h24
-rw-r--r--src/taskspiderexplo.cpp26
-rw-r--r--src/taskspiderexplo.h16
-rw-r--r--src/tasktake.cpp72
-rw-r--r--src/tasktake.h20
-rw-r--r--src/taskterraform.cpp30
-rw-r--r--src/taskterraform.h18
-rw-r--r--src/taskturn.cpp30
-rw-r--r--src/taskturn.h16
-rw-r--r--src/taskwait.cpp26
-rw-r--r--src/taskwait.h16
-rw-r--r--src/terrain.cpp140
-rw-r--r--src/terrain.h28
-rw-r--r--src/text.cpp394
-rw-r--r--src/text.h16
-rw-r--r--src/water.cpp40
-rw-r--r--src/water.h22
-rw-r--r--src/window.cpp90
-rw-r--r--src/window.h16
-rw-r--r--src/winmain.cpp17
307 files changed, 11882 insertions, 7787 deletions
diff --git a/src/CBot/CBot.cpp b/src/CBot/CBot.cpp
index 79a0b6f..02f6d50 100644
--- a/src/CBot/CBot.cpp
+++ b/src/CBot/CBot.cpp
@@ -1,12 +1,23 @@
-///////////////////////////////////////////////////////////////////////
-// compilation des diverses instructions
-// toutes les routines Compile sont statiques
-// et retournent un object selon ce qui a été trouvé comme instruction
+// * 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 .
// principe de compilation:
-// les routines Compile retournent un objet de la classe correspondant à l'opération trouvée
+// les routines Compile retournent un objet de la classe correspondant � l'op�ration trouv�e
// il s'agit toujours d'une classe fille de CBotInstr.
-// ( les objets CBotInstr ne sont jamais utilisés directement )
+// ( les objets CBotInstr ne sont jamais utilis�s directement )
// si la routine Compile retourne NULL, c'est que l'instruction est fausse
// ou incomprise.
@@ -16,7 +27,7 @@
#include "CBot.h"
// les divers constructeurs / destructeurs
-// pour libérer tout selon l'arbre établi
+// pour lib�rer tout selon l'arbre �tabli
CBotInstr::CBotInstr()
{
name = "CBotInstr";
@@ -34,8 +45,8 @@ CBotInstr::~CBotInstr()
delete m_next3b;
}
-// compteur de boucles imbriquées,
-// pour détermniner les break et continue valides
+// compteur de boucles imbriqu�es,
+// pour d�termniner les break et continue valides
// et liste des labels utilisables
int CBotInstr::m_LoopLvl = 0;
@@ -58,14 +69,14 @@ void CBotInstr::IncLvl()
m_LoopLvl++;
}
-// libère un niveau
+// lib�re un niveau
void CBotInstr::DecLvl()
{
m_LoopLvl--;
m_labelLvl[m_LoopLvl].Empty();
}
-// controle la validité d'un break ou continu
+// controle la validit� d'un break ou continu
BOOL CBotInstr::ChkLvl(CBotString& label, int type)
{
int i = m_LoopLvl;
@@ -87,7 +98,7 @@ BOOL CBotInstr::IsOfClass(CBotString n)
////////////////////////////////////////////////////////////////////////////
// gestion de base de la classe CBotInstr
-// définie le token correspondant à l'instruction
+// d�finie le token correspondant � l'instruction
void CBotInstr::SetToken(CBotToken* p)
{
@@ -100,21 +111,21 @@ void CBotInstr::SetToken(CBotString* name, int start, int end)
}
-// rend le type du token associé à l'instruction
+// rend le type du token associ� � l'instruction
int CBotInstr::GivTokenType()
{
return m_token.GivType();
}
-// rend le token associé
+// rend le token associ�
CBotToken* CBotInstr::GivToken()
{
return &m_token;
}
-// ajoute une instruction à la suite des autres
+// ajoute une instruction � la suite des autres
void CBotInstr::AddNext(CBotInstr* n)
{
@@ -155,10 +166,10 @@ CBotInstr* CBotInstr::GivNext3b()
}
///////////////////////////////////////////////////////////////////////////
-// compile une instruction, qui peut être
+// compile une instruction, qui peut �tre
// while, do, try, throw, if, for, switch, break, continu, return
// int, float, boolean, string,
-// déclaration d'une instance d'une classe
+// d�claration d'une instance d'une classe
// expression quelconque
CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack)
@@ -182,7 +193,7 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack)
}
}
- // appel la routine de compilation correspondant au token trouvé
+ // appel la routine de compilation correspondant au token trouv�
switch (type)
{
case ID_WHILE:
@@ -245,25 +256,25 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack)
pStack->SetStartError(p->GivStart());
- // ne doit pas être un mot réservé par DefineNum
+ // ne doit pas �tre un mot r�serv� par DefineNum
if ( p->GivType() == TokenTypDef )
{
pStack->SetError(TX_RESERVED, p);
return NULL;
}
- // ce peut être une définition d'instance de class
+ // ce peut �tre une d�finition d'instance de class
CBotToken* ppp = p;
if ( IsOfType( ppp, TokenTypVar ) /* && IsOfType( ppp, TokenTypVar )*/ )
{
if ( CBotClass::Find(p) != NULL )
{
- // oui, compile la déclaration de l'instance
+ // oui, compile la d�claration de l'instance
return CBotClassInst::Compile(p, pStack);
}
}
- // ce peut être une instruction arithmétique
+ // ce peut �tre une instruction arithm�tique
CBotInstr* inst = CBotExpression::Compile(p, pStack);
if (IsOfType(p, ID_SEP))
{
@@ -314,9 +325,9 @@ void CBotInstr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
__asm int 3; // papa sait pas faire, voir les filles
}
-// cette routine n'est définie que pour la classe fille CBotCase
+// cette routine n'est d�finie que pour la classe fille CBotCase
// cela permet de faire l'appel CompCase sur toutes les instructions
-// pour savoir s'il s'agit d'un case pour la valeur désirée.
+// pour savoir s'il s'agit d'un case pour la valeur d�sir�e.
BOOL CBotInstr::CompCase(CBotStack* &pj, int val)
{
@@ -330,7 +341,7 @@ BOOL CBotInstr::CompCase(CBotStack* &pj, int val)
// compile un bloc d'instruction " { i ; i ; } "
// cette classe n'a pas de constructeur, car il n'y a jamais d'instance de cette classe
-// l'objet retourné par Compile est généralement de type CBotListInstr
+// l'objet retourn� par Compile est g�n�ralement de type CBotListInstr
CBotInstr* CBotBlock::Compile(CBotToken* &p, CBotCStack* pStack, BOOL bLocal)
@@ -346,7 +357,7 @@ CBotInstr* CBotBlock::Compile(CBotToken* &p, CBotCStack* pStack, BOOL bLocal)
return inst;
}
- pStack->SetError(TX_CLOSEBLK, p->GivStart()); // manque la parenthèse
+ pStack->SetError(TX_CLOSEBLK, p->GivStart()); // manque la parenth�se
delete inst;
return NULL;
}
@@ -360,9 +371,9 @@ CBotInstr* CBotBlock::CompileBlkOrInst(CBotToken* &p, CBotCStack* pStack, BOOL b
// est-ce un nouveau bloc ?
if ( p->GivType() == ID_OPBLK ) return CBotBlock::Compile(p, pStack);
- // sinon, cherche une instruction unique à la place
+ // sinon, cherche une instruction unique � la place
- // pour gérer les cas avec définition local à l'instructin (*)
+ // pour g�rer les cas avec d�finition local � l'instructin (*)
CBotCStack* pStk = pStack->TokenStack(p, bLocal);
return pStack->Return( CBotInstr::Compile(p, pStk), // une instruction unique
@@ -371,14 +382,14 @@ CBotInstr* CBotBlock::CompileBlkOrInst(CBotToken* &p, CBotCStack* pStack, BOOL b
// (*) c'est le cas dans l'instruction suivante
// if ( 1 == 1 ) int x = 0;
-// où la variable x n'est connue que dans le bloc qui suit le if.
+// o� la variable x n'est connue que dans le bloc qui suit le if.
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// compile une liste d'instruction, séparés par des points-virgules
+// compile une liste d'instruction, s�par�s par des points-virgules
CBotListInstr::CBotListInstr()
{
@@ -401,8 +412,8 @@ CBotInstr* CBotListInstr::Compile(CBotToken* &p, CBotCStack* pStack, BOOL bLocal
{
if ( p == NULL ) break;
- if (IsOfType(p, ID_SEP)) continue; // instruction vide ignorée
- if ( p->GivType() == ID_CLBLK ) break; // déja plus d'instruction
+ if (IsOfType(p, ID_SEP)) continue; // instruction vide ignor�e
+ if ( p->GivType() == ID_CLBLK ) break; // d�ja plus d'instruction
if (IsOfType(p, 0))
{
@@ -420,12 +431,12 @@ CBotInstr* CBotListInstr::Compile(CBotToken* &p, CBotCStack* pStack, BOOL bLocal
}
if ( inst->m_Instr == NULL ) inst->m_Instr = i;
- else inst->m_Instr->AddNext(i); // ajoute à la suite
+ else inst->m_Instr->AddNext(i); // ajoute � la suite
}
return pStack->Return(inst, pStk);
}
-// exécute une liste d'instructions
+// ex�cute une liste d'instructions
BOOL CBotListInstr::Execute(CBotStack* &pj)
{
@@ -434,10 +445,10 @@ BOOL CBotListInstr::Execute(CBotStack* &pj)
if ( pile->StackOver() ) return pj->Return( pile );
- CBotInstr* p = m_Instr; // la première expression
+ CBotInstr* p = m_Instr; // la premi�re expression
int state = pile->GivState();
- while (state-->0) p = p->GivNext(); // revient sur l'opération interrompue
+ while (state-->0) p = p->GivNext(); // revient sur l'op�ration interrompue
if ( p != NULL ) while (TRUE)
{
@@ -446,7 +457,7 @@ BOOL CBotListInstr::Execute(CBotStack* &pj)
if ( !p->Execute(pile) ) return FALSE;
p = p->GivNext();
if ( p == NULL ) break;
- if (!pile->IncState()) ;//return FALSE; // prêt pour la suivante
+ if (!pile->IncState()) ;//return FALSE; // pr�t pour la suivante
}
return pj->Return( pile ); // transmet en dessous
@@ -459,13 +470,13 @@ void CBotListInstr::RestoreState(CBotStack* &pj, BOOL bMain)
CBotStack* pile = pj->RestoreStack(this);
if ( pile == NULL ) return;
- CBotInstr* p = m_Instr; // la première expression
+ CBotInstr* p = m_Instr; // la premi�re expression
int state = pile->GivState();
while ( p != NULL && state-- > 0)
{
p->RestoreState(pile, FALSE);
- p = p->GivNext(); // revient sur l'opération interrompue
+ p = p->GivNext(); // revient sur l'op�ration interrompue
}
if ( p != NULL ) p->RestoreState(pile, TRUE);
@@ -474,7 +485,7 @@ void CBotListInstr::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// compilation d'un élément se trouvant à gauche d'une assignation
+// compilation d'un �l�ment se trouvant � gauche d'une assignation
CBotLeftExprVar::CBotLeftExprVar()
{
@@ -489,7 +500,7 @@ CBotLeftExprVar::~CBotLeftExprVar()
CBotInstr* CBotLeftExprVar::Compile(CBotToken* &p, CBotCStack* pStack)
{
- // vérifie que le token est un nom de variable
+ // v�rifie que le token est un nom de variable
if (p->GivType() != TokenTypVar)
{
pStack->SetError( TX_NOVAR, p->GivStart());
@@ -503,7 +514,7 @@ CBotInstr* CBotLeftExprVar::Compile(CBotToken* &p, CBotCStack* pStack)
return inst;
}
-// crée une variable et lui assigne le résultat de la pile
+// cr�e une variable et lui assigne le r�sultat de la pile
BOOL CBotLeftExprVar::Execute(CBotStack* &pj)
{
CBotVar* var1;
@@ -516,7 +527,7 @@ BOOL CBotLeftExprVar::Execute(CBotStack* &pj)
var2 = pj->GivVar(); // resultat sur la pile
if ( var2 ) var1->SetVal(var2); // fait l'assignation
- return TRUE; // opération faite
+ return TRUE; // op�ration faite
}
void CBotLeftExprVar::RestoreState(CBotStack* &pj, BOOL bMain)
@@ -534,7 +545,7 @@ void CBotLeftExprVar::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'un tableau de n'importe quel type
+// d�finition d'un tableau de n'importe quel type
// int a[12];
// point x[];
@@ -556,15 +567,15 @@ CBotInstr* CBotInstArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
{
CBotCStack* pStk = pStack->TokenStack(p);
- CBotInstArray* inst = new CBotInstArray(); // crée l'objet
+ CBotInstArray* inst = new CBotInstArray(); // cr�e l'objet
CBotToken* vartoken = p;
inst->SetToken(vartoken);
- // détermine l'expression valable pour l'élément gauche
+ // d�termine l'expression valable pour l'�l�ment gauche
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable ?
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable ?
{
pStk->SetError(TX_REDEFVAR, vartoken);
goto error;
@@ -576,7 +587,7 @@ CBotInstr* CBotInstArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
if ( p->GivType() != ID_CLBRK )
i = CBotExpression::Compile( p, pStk ); // expression pour la valeur
else
- i = new CBotEmpty(); // spécial si pas de formule
+ i = new CBotEmpty(); // sp�cial si pas de formule
inst->AddNext3b(i); // construit une liste
type = CBotTypResult(CBotTypArrayPointer, type);
@@ -588,12 +599,12 @@ CBotInstr* CBotInstArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
}
}
- CBotVar* var = CBotVar::Create(vartoken, type); // crée avec une instance
+ CBotVar* var = CBotVar::Create(vartoken, type); // cr�e avec une instance
inst->m_typevar = type;
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
if ( IsOfType(p, ID_ASS) ) // avec une assignation
@@ -610,7 +621,7 @@ error:
}
-// exécute la définition d'un tableau
+// ex�cute la d�finition d'un tableau
BOOL CBotInstArray::Execute(CBotStack* &pj)
{
@@ -622,7 +633,7 @@ BOOL CBotInstArray::Execute(CBotStack* &pj)
if ( pile1->GivState() == 0 )
{
// cherche les dimensions max du tableau
- CBotInstr* p = GivNext3b(); // les différentes formules
+ CBotInstr* p = GivNext3b(); // les diff�rentes formules
int nb = 0;
while (p != NULL)
@@ -644,8 +655,8 @@ BOOL CBotInstArray::Execute(CBotStack* &pj)
while (p != NULL)
{
- pile = pile->AddStack(); // récupère la même petite place
- CBotVar* v = pile->GivVar(); // résultat
+ pile = pile->AddStack(); // r�cup�re la m�me petite place
+ CBotVar* v = pile->GivVar(); // r�sultat
max[n] = v->GivValInt(); // valeur
if (max[n]>MAXARRAYSIZE)
{
@@ -657,9 +668,9 @@ BOOL CBotInstArray::Execute(CBotStack* &pj)
}
while (n<100) max[n++] = 0;
- m_typevar.SetArray( max ); // mémorise les limitations
+ m_typevar.SetArray( max ); // m�morise les limitations
- // crée simplement un pointeur null
+ // cr�e simplement un pointeur null
CBotVar* var = CBotVar::Create(m_var->GivToken(), m_typevar);
var->SetPointer(NULL);
var->SetUniqNum(((CBotLeftExprVar*)m_var)->m_nIdent);
@@ -708,7 +719,7 @@ void CBotInstArray::RestoreState(CBotStack* &pj, BOOL bMain)
if ( pile1->GivState() == 0 )
{
// cherche les dimensions max du tableau
- CBotInstr* p = GivNext3b(); // les différentes formules
+ CBotInstr* p = GivNext3b(); // les diff�rentes formules
while (p != NULL)
{
@@ -747,7 +758,7 @@ void CBotEmpty :: RestoreState(CBotStack* &pj, BOOL bMain)
}
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'une liste d'initialisation pour un tableau
+// d�finition d'une liste d'initialisation pour un tableau
// int [ ] a [ ] = ( ( 1, 2, 3 ) , ( 3, 2, 1 ) ) ;
@@ -775,14 +786,14 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
inst->SetToken( pp );
// CBotVar* var = CBotVar::Create("", CBotTypNullPointer);
// pStk->SetVar(var);
- return pStack->Return(inst, pStk); // ok avec élément vide
+ return pStack->Return(inst, pStk); // ok avec �l�ment vide
}
- CBotListArray* inst = new CBotListArray(); // crée l'objet
+ CBotListArray* inst = new CBotListArray(); // cr�e l'objet
if ( IsOfType( p, ID_OPENPAR ) )
{
- // prend chaque élément l'un après l'autre
+ // prend chaque �l�ment l'un apr�s l'autre
if ( type.Eq( CBotTypArrayPointer ) )
{
type = type.GivTypElem();
@@ -793,7 +804,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
goto error;
}
- while ( IsOfType( p, ID_COMMA ) ) // d'autres éléments ?
+ while ( IsOfType( p, ID_COMMA ) ) // d'autres �l�ments ?
{
pStk->SetStartError(p->GivStart());
@@ -813,7 +824,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
{
goto error;
}
- CBotVar* pv = pStk->GivVar(); // le résultat de l'expression
+ CBotVar* pv = pStk->GivVar(); // le r�sultat de l'expression
if ( pv == NULL || !TypesCompatibles( type, pv->GivTypResult() )) // type compatible ?
{
@@ -821,7 +832,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
goto error;
}
- while ( IsOfType( p, ID_COMMA ) ) // d'autres éléments ?
+ while ( IsOfType( p, ID_COMMA ) ) // d'autres �l�ments ?
{
pStk->SetStartError(p->GivStart());
@@ -831,7 +842,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu
goto error;
}
- CBotVar* pv = pStk->GivVar(); // le résultat de l'expression
+ CBotVar* pv = pStk->GivVar(); // le r�sultat de l'expression
if ( pv == NULL || !TypesCompatibles( type, pv->GivTypResult() )) // type compatible ?
{
@@ -857,7 +868,7 @@ error:
}
-// exécute la définition d'un tableau
+// ex�cute la d�finition d'un tableau
BOOL CBotListArray::Execute(CBotStack* &pj, CBotVar* pVar)
{
@@ -875,7 +886,7 @@ BOOL CBotListArray::Execute(CBotStack* &pj, CBotVar* pVar)
pVar2 = pVar->GivItem(n, TRUE);
- if ( !p->Execute(pile1, pVar2) ) return FALSE; // évalue l'expression
+ if ( !p->Execute(pile1, pVar2) ) return FALSE; // �value l'expression
pile1->IncState();
}
@@ -903,12 +914,12 @@ void CBotListArray::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'une variable entière
+// d�finition d'une variable enti�re
// int a, b = 12;
CBotInt::CBotInt()
{
- m_next = NULL; // pour les définitions multiples
+ m_next = NULL; // pour les d�finitions multiples
m_var =
m_expr = NULL;
name = "CBotInt";
@@ -935,13 +946,13 @@ CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypRes
if ( inst != NULL || !pStack->IsOk() ) return inst;
}
- // compile une déclaration de tableau
+ // compile une d�claration de tableau
if (first) return NULL ;
CBotInstr* inst = CBotInstArray::Compile( p, pStack, type );
if ( inst == NULL ) return NULL;
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next2b = CBotInstArray::CompileArray(p, pStack, type, FALSE) )) // compile la suivante
{
@@ -951,7 +962,7 @@ CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypRes
return NULL;
}
- if (IsOfType(p, ID_SEP)) // instruction terminée
+ if (IsOfType(p, ID_SEP)) // instruction termin�e
{
return inst;
}
@@ -963,7 +974,7 @@ CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypRes
CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL noskip)
{
- CBotToken* pp = cont ? NULL : p; // pas de répétition du token "int"
+ CBotToken* pp = cont ? NULL : p; // pas de r�p�tition du token "int"
if (!cont && !IsOfType(p, ID_INT)) return NULL;
@@ -972,18 +983,18 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
CBotCStack* pStk = pStack->TokenStack(pp);
- inst = new CBotInt(); // crée l'objet
+ inst = new CBotInt(); // cr�e l'objet
inst->m_expr = NULL;
CBotToken* vartoken = p;
inst->SetToken( vartoken );
- // détermine l'expression valable pour l'élément gauche
+ // d�termine l'expression valable pour l'�l�ment gauche
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
((CBotLeftExprVar*)inst->m_var)->m_typevar = CBotTypInt;
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable
{
pStk->SetError(TX_REDEFVAR, vartoken);
goto error;
@@ -994,7 +1005,7 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
delete inst; // n'est pas de type CBotInt
p = vartoken; // revient sur le nom de la variable
- // compile une déclaration de tableau
+ // compile une d�claration de tableau
CBotInstr* inst2 = CBotInstArray::Compile( p, pStk, CBotTypInt );
@@ -1004,7 +1015,7 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
goto error;
}
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst2->m_next2b = CBotInt::Compile(p, pStk, TRUE, noskip) )) // compile la suivante
{
@@ -1012,7 +1023,7 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
}
}
inst = (CBotInt*)inst2;
- goto suite; // pas d'assignation, variable déjà créée
+ goto suite; // pas d'assignation, variable d�j� cr��e
}
if (IsOfType(p, ID_ASS)) // avec une assignation ?
@@ -1029,15 +1040,15 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
}
{
- CBotVar* var = CBotVar::Create(vartoken, CBotTypInt);// crée la variable (après l'assignation évaluée)
- var->SetInit(inst->m_expr != NULL); // la marque initialisée si avec assignation
+ CBotVar* var = CBotVar::Create(vartoken, CBotTypInt);// cr�e la variable (apr�s l'assignation �valu�e)
+ var->SetInit(inst->m_expr != NULL); // la marque initialis�e si avec assignation
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
}
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next2b = CBotInt::Compile(p, pStk, TRUE, noskip) )) // compile la suivante
{
@@ -1045,7 +1056,7 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL n
}
}
suite:
- if (noskip || IsOfType(p, ID_SEP)) // instruction terminée
+ if (noskip || IsOfType(p, ID_SEP)) // instruction termin�e
{
return pStack->Return(inst, pStk);
}
@@ -1058,7 +1069,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// exécute la définition de la variable entière
+// ex�cute la d�finition de la variable enti�re
BOOL CBotInt::Execute(CBotStack* &pj)
{
@@ -1068,7 +1079,7 @@ BOOL CBotInt::Execute(CBotStack* &pj)
if ( pile->GivState()==0)
{
if (m_expr && !m_expr->Execute(pile)) return FALSE; // valeur initiale // interrompu?
- m_var->Execute( pile ); // crée et fait l'assigation du résultat
+ m_var->Execute( pile ); // cr�e et fait l'assigation du r�sultat
if (!pile->SetState(1)) return FALSE;
}
@@ -1076,7 +1087,7 @@ BOOL CBotInt::Execute(CBotStack* &pj)
if ( pile->IfStep() ) return FALSE;
if ( m_next2b &&
- !m_next2b->Execute(pile)) return FALSE; // autre(s) définition(s)
+ !m_next2b->Execute(pile)) return FALSE; // autre(s) d�finition(s)
return pj->Return( pile ); // transmet en dessous
}
@@ -1098,14 +1109,14 @@ void CBotInt::RestoreState(CBotStack* &pj, BOOL bMain)
m_var->RestoreState(pile, bMain);
- if ( m_next2b ) m_next2b->RestoreState(pile, bMain); // autre(s) définition(s)
+ if ( m_next2b ) m_next2b->RestoreState(pile, bMain); // autre(s) d�finition(s)
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'une variable booléen
+// d�finition d'une variable bool�en
// int a, b = false;
CBotBoolean::CBotBoolean()
@@ -1143,7 +1154,7 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
((CBotLeftExprVar*)inst->m_var)->m_typevar = CBotTypBoolean;
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable
{
pStk->SetError(TX_REDEFVAR, vartoken);
goto error;
@@ -1154,7 +1165,7 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
delete inst; // n'est pas de type CBotInt
p = vartoken; // revient sur le nom de la variable
- // compile une déclaration de tableau
+ // compile une d�claration de tableau
inst = (CBotBoolean*)CBotInstArray::Compile( p, pStk, CBotTypBoolean );
@@ -1163,7 +1174,7 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
pStk->SetError(TX_CLBRK, p->GivStart());
goto error;
}
- goto suite; // pas d'assignation, variable déjà créée
+ goto suite; // pas d'assignation, variable d�j� cr��e
}
if (IsOfType(p, ID_ASS)) // avec une assignation ?
@@ -1179,14 +1190,14 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
}
}
- var = CBotVar::Create(vartoken, CBotTypBoolean);// crée la variable (après l'assignation évaluée)
- var->SetInit(inst->m_expr != NULL); // la marque initialisée si avec assignation
+ var = CBotVar::Create(vartoken, CBotTypBoolean);// cr�e la variable (apr�s l'assignation �valu�e)
+ var->SetInit(inst->m_expr != NULL); // la marque initialis�e si avec assignation
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
suite:
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next2b = CBotBoolean::Compile(p, pStk, TRUE, noskip) )) // compile la suivante
{
@@ -1194,7 +1205,7 @@ suite:
}
}
- if (noskip || IsOfType(p, ID_SEP)) // instruction terminée
+ if (noskip || IsOfType(p, ID_SEP)) // instruction termin�e
{
return pStack->Return(inst, pStk);
}
@@ -1207,7 +1218,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// exécute une définition de variable booléenne
+// ex�cute une d�finition de variable bool�enne
BOOL CBotBoolean::Execute(CBotStack* &pj)
{
@@ -1217,7 +1228,7 @@ BOOL CBotBoolean::Execute(CBotStack* &pj)
if ( pile->GivState()==0)
{
if (m_expr && !m_expr->Execute(pile)) return FALSE; // valeur initiale // interrompu?
- m_var->Execute( pile ); // crée et fait l'assigation du résultat
+ m_var->Execute( pile ); // cr�e et fait l'assigation du r�sultat
if (!pile->SetState(1)) return FALSE;
}
@@ -1225,7 +1236,7 @@ BOOL CBotBoolean::Execute(CBotStack* &pj)
if ( pile->IfStep() ) return FALSE;
if ( m_next2b &&
- !m_next2b->Execute(pile)) return FALSE; // autre(s) définition(s)
+ !m_next2b->Execute(pile)) return FALSE; // autre(s) d�finition(s)
return pj->Return( pile ); // transmet en dessous
}
@@ -1248,14 +1259,14 @@ void CBotBoolean::RestoreState(CBotStack* &pj, BOOL bMain)
m_var->RestoreState( pile, bMain ); //
if ( m_next2b )
- m_next2b->RestoreState(pile, bMain); // autre(s) définition(s)
+ m_next2b->RestoreState(pile, bMain); // autre(s) d�finition(s)
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'une variable réelle
+// d�finition d'une variable r�elle
// int a, b = 12.4;
CBotFloat::CBotFloat()
@@ -1293,7 +1304,7 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
((CBotLeftExprVar*)inst->m_var)->m_typevar = CBotTypFloat;
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable
{
pStk->SetStartError(vartoken->GivStart());
pStk->SetError(TX_REDEFVAR, vartoken->GivEnd());
@@ -1305,7 +1316,7 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL
delete inst; // n'est pas de type CBotInt
p = vartoken; // revient sur le nom de la variable
- // compile une déclaration de tableau
+ // compile une d�claration de tableau
inst = (CBotFloat*)CBotInstArray::Compile( p, pStk, CBotTypFloat );
@@ -1314,7 +1325,7 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL
pStk->SetError(TX_CLBRK, p->GivStart());
goto error;
}
- goto suite; // pas d'assignation, variable déjà créée
+ goto suite; // pas d'assignation, variable d�j� cr��e
}
if (IsOfType(p, ID_ASS)) // avec une assignation ?
@@ -1330,14 +1341,14 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BOOL
}
}
- var = CBotVar::Create(vartoken, CBotTypFloat); // crée la variable (après l'assignation évaluée)
- var->SetInit(inst->m_expr != NULL); // la marque initialisée si avec assignation
+ var = CBotVar::Create(vartoken, CBotTypFloat); // cr�e la variable (apr�s l'assignation �valu�e)
+ var->SetInit(inst->m_expr != NULL); // la marque initialis�e si avec assignation
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
suite:
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next2b = CBotFloat::Compile(p, pStk, TRUE, noskip) )) // compile la suivante
{
@@ -1345,7 +1356,7 @@ suite:
}
}
- if (noskip || IsOfType(p, ID_SEP)) // instruction terminée
+ if (noskip || IsOfType(p, ID_SEP)) // instruction termin�e
{
return pStack->Return(inst, pStk);
}
@@ -1358,7 +1369,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// exécute la défintion de la variable réelle
+// ex�cute la d�fintion de la variable r�elle
BOOL CBotFloat::Execute(CBotStack* &pj)
{
@@ -1368,7 +1379,7 @@ BOOL CBotFloat::Execute(CBotStack* &pj)
if ( pile->GivState()==0)
{
if (m_expr && !m_expr->Execute(pile)) return FALSE; // valeur initiale // interrompu?
- m_var->Execute( pile ); // crée et fait l'assigation du résultat
+ m_var->Execute( pile ); // cr�e et fait l'assigation du r�sultat
if (!pile->SetState(1)) return FALSE;
}
@@ -1376,7 +1387,7 @@ BOOL CBotFloat::Execute(CBotStack* &pj)
if ( pile->IfStep() ) return FALSE;
if ( m_next2b &&
- !m_next2b->Execute(pile)) return FALSE; // autre(s) définition(s)
+ !m_next2b->Execute(pile)) return FALSE; // autre(s) d�finition(s)
return pj->Return( pile ); // transmet en dessous
}
@@ -1399,14 +1410,14 @@ void CBotFloat::RestoreState(CBotStack* &pj, BOOL bMain)
m_var->RestoreState( pile, bMain ); //
if ( m_next2b )
- m_next2b->RestoreState(pile, bMain); // autre(s) définition(s)
+ m_next2b->RestoreState(pile, bMain); // autre(s) d�finition(s)
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// définition d'une variable chaîne de caractères
+// d�finition d'une variable cha�ne de caract�res
// int a, b = "salut";
CBotIString::CBotIString()
@@ -1443,7 +1454,7 @@ CBotInstr* CBotIString::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
((CBotLeftExprVar*)inst->m_var)->m_typevar = CBotTypString;
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable
{
pStk->SetStartError(vartoken->GivStart());
pStk->SetError(TX_REDEFVAR, vartoken->GivEnd());
@@ -1463,14 +1474,14 @@ CBotInstr* CBotIString::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
}*/
}
- CBotVar* var = CBotVar::Create(vartoken, CBotTypString); // crée la variable (après l'assignation évaluée)
- var->SetInit(inst->m_expr != NULL); // la marque initialisée si avec assignation
+ CBotVar* var = CBotVar::Create(vartoken, CBotTypString); // cr�e la variable (apr�s l'assignation �valu�e)
+ var->SetInit(inst->m_expr != NULL); // la marque initialis�e si avec assignation
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next2b = CBotIString::Compile(p, pStk, TRUE, noskip) )) // compile la suivante
{
@@ -1478,7 +1489,7 @@ CBotInstr* CBotIString::Compile(CBotToken* &p, CBotCStack* pStack, BOOL cont, BO
}
}
- if (noskip || IsOfType(p, ID_SEP)) // instruction terminée
+ if (noskip || IsOfType(p, ID_SEP)) // instruction termin�e
{
return pStack->Return(inst, pStk);
}
@@ -1491,7 +1502,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// exécute la définition de la variable string
+// ex�cute la d�finition de la variable string
BOOL CBotIString::Execute(CBotStack* &pj)
{
@@ -1501,7 +1512,7 @@ BOOL CBotIString::Execute(CBotStack* &pj)
if ( pile->GivState()==0)
{
if (m_expr && !m_expr->Execute(pile)) return FALSE; // valeur initiale // interrompu?
- m_var->Execute( pile ); // crée et fait l'assigation du résultat
+ m_var->Execute( pile ); // cr�e et fait l'assigation du r�sultat
if (!pile->SetState(1)) return FALSE;
}
@@ -1509,7 +1520,7 @@ BOOL CBotIString::Execute(CBotStack* &pj)
if ( pile->IfStep() ) return FALSE;
if ( m_next2b &&
- !m_next2b->Execute(pile)) return FALSE; // autre(s) définition(s)
+ !m_next2b->Execute(pile)) return FALSE; // autre(s) d�finition(s)
return pj->Return( pile ); // transmet en dessous
}
@@ -1533,7 +1544,7 @@ void CBotIString::RestoreState(CBotStack* &pj, BOOL bMain)
m_var->RestoreState( pile, bMain ); //
if ( m_next2b )
- m_next2b->RestoreState(pile, bMain); // autre(s) définition(s)
+ m_next2b->RestoreState(pile, bMain); // autre(s) d�finition(s)
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -1589,7 +1600,7 @@ CBotInstr* CBotExpression::Compile(CBotToken* &p, CBotCStack* pStack)
CBotTypResult type1 = pStack->GivTypResult();
- // récupère la variable pour la marquer assignée
+ // r�cup�re la variable pour la marquer assign�e
CBotVar* var = NULL;
inst->m_leftop->ExecuteVar(var, pStack);
if ( var == NULL )
@@ -1617,7 +1628,7 @@ CBotInstr* CBotExpression::Compile(CBotToken* &p, CBotCStack* pStack)
{
/* CBotClass* c1 = type1.GivClass();
CBotClass* c2 = type2.GivClass();
- if ( !c1->IsChildOf(c2) ) type2.SetType(-1); // pas la même classe
+ if ( !c1->IsChildOf(c2) ) type2.SetType(-1); // pas la m�me classe
//- if ( !type1.Eq(CBotTypClass) ) var->SetPointer(pStack->GivVar()->GivPointer());*/
var->SetInit(2);
}
@@ -1651,7 +1662,7 @@ CBotInstr* CBotExpression::Compile(CBotToken* &p, CBotCStack* pStack)
// p = p->GivNext();
int start, end, error = pStack->GivError(start, end);
- p = pp; // revient au début
+ p = pp; // revient au d�but
pStack->SetError(0,0); // oublie l'erreur
// return CBotTwoOpExpr::Compile(p, pStack); // essaie sans assignation
@@ -1661,7 +1672,7 @@ CBotInstr* CBotExpression::Compile(CBotToken* &p, CBotCStack* pStack)
return i;
}
-// exécute une expression avec assignation
+// ex�cute une expression avec assignation
BOOL CBotExpression::Execute(CBotStack* &pj)
{
@@ -1676,8 +1687,8 @@ BOOL CBotExpression::Execute(CBotStack* &pj)
BOOL IsInit = TRUE;
CBotVar* result = NULL;
- // doit être fait avant pour les indices éventuels (pile peut être changée)
- if ( !m_leftop->ExecuteVar(pVar, pile, NULL, FALSE) ) return FALSE; // variable avant évaluation de la valeur droite
+ // doit �tre fait avant pour les indices �ventuels (pile peut �tre chang�e)
+ if ( !m_leftop->ExecuteVar(pVar, pile, NULL, FALSE) ) return FALSE; // variable avant �valuation de la valeur droite
// DEBUG( "CBotExpression::Execute", -1, pj);
if ( pile1->GivState()==0)
@@ -1700,7 +1711,7 @@ BOOL CBotExpression::Execute(CBotStack* &pj)
// DEBUG( "CBotExpression::Execute", -3, pj);
if ( m_token.GivType() != ID_ASS )
{
- pVar = pile1->GivVar(); // récupére si interrompu
+ pVar = pile1->GivVar(); // r�cup�re si interrompu
IsInit = pVar->GivInit();
if ( IsInit == IS_NAN )
{
@@ -1716,51 +1727,51 @@ BOOL CBotExpression::Execute(CBotStack* &pj)
break;
case ID_ASSADD:
result->Add(pile1->GivVar(), pile2->GivVar()); // additionne
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSSUB:
result->Sub(pile1->GivVar(), pile2->GivVar()); // soustrait
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSMUL:
result->Mul(pile1->GivVar(), pile2->GivVar()); // multiplie
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSDIV:
if (IsInit &&
result->Div(pile1->GivVar(), pile2->GivVar())) // divise
pile2->SetError(TX_DIVZERO, &m_token);
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSMODULO:
if (IsInit &&
result->Modulo(pile1->GivVar(), pile2->GivVar())) // reste de la division
pile2->SetError(TX_DIVZERO, &m_token);
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSAND:
result->And(pile1->GivVar(), pile2->GivVar()); // multiplie
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSXOR:
result->XOr(pile1->GivVar(), pile2->GivVar());
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSOR:
result->Or(pile1->GivVar(), pile2->GivVar());
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSSL:
result->SL(pile1->GivVar(), pile2->GivVar());
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSSR:
result->SR(pile1->GivVar(), pile2->GivVar());
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
case ID_ASSASR:
result->ASR(pile1->GivVar(), pile2->GivVar());
- pile2->SetVar(result); // re-place le résultat
+ pile2->SetVar(result); // re-place le r�sultat
break;
default:
__asm int 3;
@@ -1773,7 +1784,7 @@ BOOL CBotExpression::Execute(CBotStack* &pj)
// DEBUG( "CBotExpression::Execute", -4, pj);
if ( !m_leftop->Execute( pile2, pile1 ) )
- return FALSE; // crée et fait l'assigation du résultat
+ return FALSE; // cr�e et fait l'assigation du r�sultat
return pj->Return( pile2 ); // transmet en dessous
}
@@ -1794,11 +1805,11 @@ void CBotExpression::RestoreState(CBotStack* &pj, BOOL bMain)
if ( pile1->GivState()==0)
{
- m_leftop->RestoreStateVar(pile, TRUE); // variable avant évaluation de la valeur droite
+ m_leftop->RestoreStateVar(pile, TRUE); // variable avant �valuation de la valeur droite
return;
}
- m_leftop->RestoreStateVar(pile, FALSE); // variable avant évaluation de la valeur droite
+ m_leftop->RestoreStateVar(pile, FALSE); // variable avant �valuation de la valeur droite
CBotStack* pile2 = pile->RestoreStack(); // attention pile et surtout pas pile1
if ( pile2 == NULL ) return;
@@ -1816,10 +1827,10 @@ void CBotExpression::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
// compile une instruction de type " ( condition ) "
-// la condition doit être de type booléen
+// la condition doit �tre de type bool�en
// cette classe n'a pas de constructeur, car il n'y a jamais d'instance de cette classe
-// l'objet retourné par Compile est généralement de type CBotExpression
+// l'objet retourn� par Compile est g�n�ralement de type CBotExpression
CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack)
{
@@ -1833,12 +1844,12 @@ CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack)
{
return inst;
}
- pStack->SetError(TX_CLOSEPAR, p->GivStart()); // manque la parenthèse
+ pStack->SetError(TX_CLOSEPAR, p->GivStart()); // manque la parenth�se
}
delete inst;
}
- pStack->SetError(TX_OPENPAR, p->GivStart()); // manque la parenthèse
+ pStack->SetError(TX_OPENPAR, p->GivStart()); // manque la parenth�se
return NULL;
}
@@ -1846,10 +1857,10 @@ CBotInstr* CBotCondition::Compile(CBotToken* &p, CBotCStack* pStack)
//////////////////////////////////////////////////////////////////////////////////////
// compile une instruction de type " condition "
-// la condition doit être de type booléen
+// la condition doit �tre de type bool�en
// cette classe n'a pas de constructeur, car il n'y a jamais d'instance de cette classe
-// l'objet retourné par Compile est généralement de type CBotExpression
+// l'objet retourn� par Compile est g�n�ralement de type CBotExpression
CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
@@ -1863,7 +1874,7 @@ CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
return inst;
}
- pStack->SetError(TX_NOTBOOL, p->GivStart()); // n'est pas un booléan
+ pStack->SetError(TX_NOTBOOL, p->GivStart()); // n'est pas un bool�an
}
delete inst;
@@ -1875,17 +1886,17 @@ CBotInstr* CBotBoolExpr::Compile(CBotToken* &p, CBotCStack* pStack)
//////////////////////////////////////////////////////////////////////////////////////
// compile soit :
-// une instruction entre parenthèses (...)
-// une expression unaire (négatif, not)
+// une instruction entre parenth�ses (...)
+// une expression unaire (n�gatif, not)
// nom de variable
-// les variables prè et post incrémentées ou décrémentées
-// un nombre donné par DefineNum
+// les variables pr� et post incr�ment�es ou d�cr�ment�es
+// un nombre donn� par DefineNum
// une constante
-// un appel de procédure
+// un appel de proc�dure
// l'instruction new
// cette classe n'a pas de constructeur, car il n'y a jamais d'instance de cette classe
-// l'objet retourné par Compile est de la classe correspondant à l'instruction
+// l'objet retourn� par Compile est de la classe correspondant � l'instruction
CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
@@ -1893,7 +1904,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
pStk->SetStartError(p->GivStart());
- // est-ce une expression entre parenthèse ?
+ // est-ce une expression entre parenth�se ?
if (IsOfType(p, ID_OPENPAR))
{
CBotInstr* inst = CBotExpression::Compile( p, pStk );
@@ -1910,7 +1921,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(NULL, pStk);
}
- // est-ce une opération unaire ?
+ // est-ce une op�ration unaire ?
CBotInstr* inst = CBotExprUnaire::Compile(p, pStk);
if (inst != NULL || !pStk->IsOk())
return pStack->Return(inst, pStk);
@@ -1918,12 +1929,12 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
// est-ce un nom de variable ?
if (p->GivType() == TokenTypVar)
{
- // c'est peut-être un appel de méthode sans le "this." devant
+ // c'est peut-�tre un appel de m�thode sans le "this." devant
inst = CBotExprVar::CompileMethode(p, pStk);
if ( inst != NULL ) return pStack->Return(inst, pStk);
- // est-ce un appel de procédure ?
+ // est-ce un appel de proc�dure ?
inst = CBotInstrCall::Compile(p, pStk);
if ( inst != NULL || !pStk->IsOk() )
return pStack->Return(inst, pStk);
@@ -1934,7 +1945,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
inst = CBotExprVar::Compile(p, pStk);
CBotToken* pp = p;
- // post incrémenté ou décrémenté ?
+ // post incr�ment� ou d�cr�ment� ?
if (IsOfType(p, ID_INC, ID_DEC))
{
if ( pStk->GivType() >= CBotTypBoolean )
@@ -1952,13 +1963,13 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
CBotPostIncExpr* i = new CBotPostIncExpr();
i->SetToken(pp);
- i->m_Instr = inst; // instruction associée
+ i->m_Instr = inst; // instruction associ�e
return pStack->Return(i, pStk);
}
return pStack->Return(inst, pStk);
}
- // est-ce une variable préincrémentée ou prédécrémentée ?
+ // est-ce une variable pr�incr�ment�e ou pr�d�cr�ment�e ?
CBotToken* pp = p;
if (IsOfType(p, ID_INC, ID_DEC))
{
@@ -1997,7 +2008,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(inst, pStk);
}
- // est un élément "true" ou "false"
+ // est un �l�ment "true" ou "false"
if (p->GivType() == ID_TRUE ||
p->GivType() == ID_FALSE )
{
@@ -2005,7 +2016,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(inst, pStk);
}
- // est un objet à créer avec new
+ // est un objet � cr�er avec new
if (p->GivType() == ID_NEW)
{
CBotInstr* inst = CBotNew::Compile( p, pStk );
@@ -2040,9 +2051,9 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack)
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// gestion du post et pré- incrément/décrément
+// gestion du post et pr�- incr�ment/d�cr�ment
-// il n'y a pas de routine Compile, l'objet est créé directement
+// il n'y a pas de routine Compile, l'objet est cr�� directement
// dans CBotParExpr::Compile
CBotPostIncExpr::CBotPostIncExpr()
@@ -2074,10 +2085,10 @@ BOOL CBotPostIncExpr::Execute(CBotStack* &pj)
CBotVar* var1 = NULL;
- if ( !((CBotExprVar*)m_Instr)->ExecuteVar(var1, pile2, NULL, TRUE) ) return FALSE; // récupère la variable selon champs et index
+ if ( !((CBotExprVar*)m_Instr)->ExecuteVar(var1, pile2, NULL, TRUE) ) return FALSE; // r�cup�re la variable selon champs et index
pile1->SetState(1);
- pile1->SetCopyVar(var1); // place le résultat (avant incrémentation);
+ pile1->SetCopyVar(var1); // place le r�sultat (avant incr�mentation);
CBotStack* pile3 = pile2->AddStack(this);
if ( pile3->IfStep() ) return FALSE;
@@ -2095,7 +2106,7 @@ BOOL CBotPostIncExpr::Execute(CBotStack* &pj)
if (GivTokenType() == ID_INC) var1->Inc();
else var1->Dec();
- return pj->Return(pile1); // opération faite, résultat sur pile2
+ return pj->Return(pile1); // op�ration faite, r�sultat sur pile2
}
void CBotPostIncExpr::RestoreState(CBotStack* &pj, BOOL bMain)
@@ -2122,19 +2133,19 @@ BOOL CBotPreIncExpr::Execute(CBotStack* &pj)
if ( pile->GivState() == 0 )
{
CBotStack* pile2 = pile;
- if ( !((CBotExprVar*)m_Instr)->ExecuteVar(var1, pile2, NULL, TRUE) ) return FALSE; // récupère la variable selon champs et index
- // pile2 est modifié en retour
+ if ( !((CBotExprVar*)m_Instr)->ExecuteVar(var1, pile2, NULL, TRUE) ) return FALSE; // r�cup�re la variable selon champs et index
+ // pile2 est modifi� en retour
if ( var1->GivInit() == IS_NAN )
{
pile->SetError( TX_OPNAN, &m_token );
- return pj->Return(pile); // opération faite
+ return pj->Return(pile); // op�ration faite
}
if ( var1->GivInit() != IS_DEF )
{
pile->SetError( TX_NOTINIT, &m_token );
- return pj->Return(pile); // opération faite
+ return pj->Return(pile); // op�ration faite
}
if (GivTokenType() == ID_INC) var1->Inc();
@@ -2144,7 +2155,7 @@ BOOL CBotPreIncExpr::Execute(CBotStack* &pj)
}
if ( !m_Instr->Execute(pile) ) return FALSE;
- return pj->Return(pile); // opération faite
+ return pj->Return(pile); // op�ration faite
}
@@ -2202,9 +2213,9 @@ CBotInstr* CBotExprUnaire::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(inst, pStk);
if ( op == ID_NOT && pStk->GivType() < CBotTypFloat ) // seulement avec des entiers
return pStack->Return(inst, pStk);
- if ( op == ID_LOG_NOT && pStk->GivTypResult().Eq(CBotTypBoolean) )// seulement avec des booléens
+ if ( op == ID_LOG_NOT && pStk->GivTypResult().Eq(CBotTypBoolean) )// seulement avec des bool�ens
return pStack->Return(inst, pStk);
- if ( op == ID_TXT_NOT && pStk->GivTypResult().Eq(CBotTypBoolean) )// seulement avec des booléens
+ if ( op == ID_TXT_NOT && pStk->GivTypResult().Eq(CBotTypBoolean) )// seulement avec des bool�ens
return pStack->Return(inst, pStk);
pStk->SetError(TX_BADTYPE, &inst->m_token);
@@ -2213,7 +2224,7 @@ CBotInstr* CBotExprUnaire::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(NULL, pStk);
}
-// exécute l'expresson unaire
+// ex�cute l'expresson unaire
BOOL CBotExprUnaire::Execute(CBotStack* &pj)
{
@@ -2229,7 +2240,7 @@ BOOL CBotExprUnaire::Execute(CBotStack* &pj)
CBotStack* pile2 = pile->AddStack();
if ( pile2->IfStep() ) return FALSE;
- CBotVar* var = pile->GivVar(); // récupère le résultat sur la pile
+ CBotVar* var = pile->GivVar(); // r�cup�re le r�sultat sur la pile
switch (GivTokenType())
{
@@ -2279,14 +2290,14 @@ CBotIndexExpr::~CBotIndexExpr()
delete m_expr;
}
-// trouve un champ à partir de l'instance à la compilation
+// trouve un champ � partir de l'instance � la compilation
BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
{
if ( pVar->GivType(1) != CBotTypArrayPointer )
__asm int 3;
- pVar = ((CBotVarArray*)pVar)->GivItem(0, FALSE); // à la compilation rend l'élément [0]
+ pVar = ((CBotVarArray*)pVar)->GivItem(0, FALSE); // � la compilation rend l'�l�ment [0]
if ( pVar == NULL )
{
pile->SetError(TX_OUTARRAY, m_token.GivEnd());
@@ -2296,9 +2307,9 @@ BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
return TRUE;
}
-// idem à l'exécution
-// attention, modifie le pointeur à la pile volontairement
-// place les index calculés sur la pile supplémentaire
+// idem � l'ex�cution
+// attention, modifie le pointeur � la pile volontairement
+// place les index calcul�s sur la pile suppl�mentaire
BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, BOOL bStep, BOOL bExtend)
{
@@ -2318,7 +2329,7 @@ BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prev
}
// traite les tableaux
- CBotVar* p = pile->GivVar(); // résultat sur la pile
+ CBotVar* p = pile->GivVar(); // r�sultat sur la pile
if ( p == NULL || p->GivType() > CBotTypDouble )
{
@@ -2345,8 +2356,8 @@ BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prev
!m_next3->ExecuteVar(pVar, pile, prevToken, bStep, bExtend) ) return FALSE;
// DEBUG( "CBotIndexExpr::ExecuteVar", -4 , pj);
- return TRUE; // ne libère pas la pile
- // pour éviter de recalculer les index deux fois le cas échéant
+ return TRUE; // ne lib�re pas la pile
+ // pour �viter de recalculer les index deux fois le cas �ch�ant
}
void CBotIndexExpr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
@@ -2367,7 +2378,7 @@ void CBotIndexExpr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// gestion des champs dans une instance (opérateur point)
+// gestion des champs dans une instance (op�rateur point)
// toto.x
@@ -2387,7 +2398,7 @@ void CBotFieldExpr::SetUniqNum(int num)
}
-// trouve un champ à partir de l'instance à la compilation
+// trouve un champ � partir de l'instance � la compilation
BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
{
@@ -2408,7 +2419,7 @@ BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
return TRUE;
}
-// idem à l'exécution
+// idem � l'ex�cution
BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, BOOL bStep, BOOL bExtend)
{
@@ -2446,20 +2457,20 @@ BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prev
if ( pVar->IsStatic() )
{
// DEBUG( "IsStatic", 0, pj) ;
- // pour une variable statique, la prend dans la classe elle-même
+ // pour une variable statique, la prend dans la classe elle-m�me
CBotClass* pClass = pItem->GivClass();
pVar = pClass->GivItem(m_token.GivString());
// DEBUG( "done "+pVar->GivName(), 0, pj) ;
}
- // demande la mise à jour de l'élément, s'il y a lieu
+ // demande la mise � jour de l'�l�ment, s'il y a lieu
pVar->Maj(pile->GivPUser(), TRUE);
if ( m_next3 != NULL &&
!m_next3->ExecuteVar(pVar, pile, &m_token, bStep, bExtend) ) return FALSE;
- return TRUE; // ne libère pas la pile
- // pour conserver l'état SetState() correspondant à l'étape
+ return TRUE; // ne lib�re pas la pile
+ // pour conserver l'�tat SetState() correspondant � l'�tape
}
void CBotFieldExpr::RestoreStateVar(CBotStack* &pj, BOOL bMain)
@@ -2474,7 +2485,7 @@ void CBotFieldExpr::RestoreStateVar(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
-// compile un opérande gauche pour une assignation
+// compile un op�rande gauche pour une assignation
CBotLeftExpr::CBotLeftExpr()
{
@@ -2486,8 +2497,8 @@ CBotLeftExpr::~CBotLeftExpr()
{
}
-// compile une expression pour un left-opérande ( à gauche d'une assignation)
-// cela peut être
+// compile une expression pour un left-op�rande ( � gauche d'une assignation)
+// cela peut �tre
// toto
// toto[ 3 ]
// toto.x
@@ -2505,7 +2516,7 @@ CBotLeftExpr* CBotLeftExpr::Compile(CBotToken* &p, CBotCStack* pStack)
// est-ce un nom de variable ?
if (p->GivType() == TokenTypVar)
{
- CBotLeftExpr* inst = new CBotLeftExpr(); // crée l'objet
+ CBotLeftExpr* inst = new CBotLeftExpr(); // cr�e l'objet
inst->SetToken(p);
@@ -2522,15 +2533,15 @@ CBotLeftExpr* CBotLeftExpr::Compile(CBotToken* &p, CBotCStack* pStack)
pStk->SetError( TX_PRIVATE, p );
goto err;
}
- // il s'agit d'un élement de la classe courante
- // ajoute l'équivalent d'un this. devant
+ // il s'agit d'un �lement de la classe courante
+ // ajoute l'�quivalent d'un this. devant
CBotToken pthis("this");
inst->SetToken(&pthis);
inst->m_nIdent = -2; // ident pour this
- CBotFieldExpr* i = new CBotFieldExpr(); // nouvel élément
+ CBotFieldExpr* i = new CBotFieldExpr(); // nouvel �l�ment
i->SetToken( p ); // garde le nom du token
- inst->AddNext3(i); // ajoute à la suite
+ inst->AddNext3(i); // ajoute � la suite
var = pStk->FindVar(pthis);
var = var->GivItem(p->GivString());
@@ -2546,7 +2557,7 @@ CBotLeftExpr* CBotLeftExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotIndexExpr* i = new CBotIndexExpr();
i->m_expr = CBotExpression::Compile(p, pStk); // compile la formule
- inst->AddNext3(i); // ajoute à la chaine
+ inst->AddNext3(i); // ajoute � la chaine
var = ((CBotVarArray*)var)->GivItem(0,TRUE); // donne le composant [0]
@@ -2571,13 +2582,13 @@ CBotLeftExpr* CBotLeftExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotToken* pp = p;
- CBotFieldExpr* i = new CBotFieldExpr(); // nouvel élément
+ CBotFieldExpr* i = new CBotFieldExpr(); // nouvel �l�ment
i->SetToken( pp ); // garde le nom du token
- inst->AddNext3(i); // ajoute à la suite
+ inst->AddNext3(i); // ajoute � la suite
- if ( p->GivType() == TokenTypVar ) // doit être un nom
+ if ( p->GivType() == TokenTypVar ) // doit �tre un nom
{
- var = var->GivItem(p->GivString()); // récupère l'item correpondant
+ var = var->GivItem(p->GivString()); // r�cup�re l'item correpondant
if ( var != NULL )
{
if ( var->IsPrivate(PR_READ) &&
@@ -2612,7 +2623,7 @@ err:
return (CBotLeftExpr*) pStack->Return(NULL, pStk);
}
-// exécute, trouve une variable et lui assigne le résultat de la pile
+// ex�cute, trouve une variable et lui assigne le r�sultat de la pile
BOOL CBotLeftExpr::Execute(CBotStack* &pj, CBotStack* array)
{
@@ -2631,7 +2642,7 @@ BOOL CBotLeftExpr::Execute(CBotStack* &pj, CBotStack* array)
if ( var1 )
{
- var2 = pj->GivVar(); // resultat sur la pile d'entrée
+ var2 = pj->GivVar(); // resultat sur la pile d'entr�e
if ( var2 )
{
CBotTypResult t1 = var1->GivTypResult();
@@ -2644,16 +2655,16 @@ BOOL CBotLeftExpr::Execute(CBotStack* &pj, CBotStack* array)
{
CBotToken* pt = &m_token;
pile->SetError(TX_BADTYPE, pt);
- return pj->Return(pile); // opération faite
+ return pj->Return(pile); // op�ration faite
}
}
var1->SetVal(var2); // fait l'assignation
}
- pile->SetCopyVar( var1 ); // remplace sur la pile par une copie de la variable elle-même
+ pile->SetCopyVar( var1 ); // remplace sur la pile par une copie de la variable elle-m�me
// (pour avoir le nom)
}
- return pj->Return(pile); // opération faite
+ return pj->Return(pile); // op�ration faite
}
// retrouve une variable pendant la compilation
@@ -2669,11 +2680,11 @@ BOOL CBotLeftExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
return TRUE;
}
-// retrouve une variable à l'exécution
+// retrouve une variable � l'ex�cution
BOOL CBotLeftExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, BOOL bStep)
{
- pile = pile->AddStack( this ); // déplace la pile
+ pile = pile->AddStack( this ); // d�place la pile
pVar = pile->FindVar(m_nIdent);
if ( pVar == NULL )
@@ -2695,7 +2706,7 @@ BOOL CBotLeftExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevT
void CBotLeftExpr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
{
- pile = pile->RestoreStack( this ); // déplace la pile
+ pile = pile->RestoreStack( this ); // d�place la pile
if ( pile == NULL ) return;
if ( m_next3 != NULL )
@@ -2704,8 +2715,8 @@ void CBotLeftExpr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
-// transforme une chaîne en nombre entier
-// peut être de la forme 0xabc123
+// transforme une cha�ne en nombre entier
+// peut �tre de la forme 0xabc123
long GivNumInt( const char* p )
{
@@ -2740,7 +2751,7 @@ long GivNumInt( const char* p )
return num;
}
-// transforme une chaîne en un nombre réel
+// transforme une cha�ne en un nombre r�el
extern float GivNumFloat( const char* p )
{
@@ -2805,7 +2816,7 @@ extern float GivNumFloat( const char* p )
//////////////////////////////////////////////////////////////////////////////////////
-// compile un token représentant un nombre
+// compile un token repr�sentant un nombre
CBotExprNum::CBotExprNum()
{
@@ -2854,7 +2865,7 @@ CBotInstr* CBotExprNum::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(NULL, pStk);
}
-// exécute, retourne le nombre correspondant
+// ex�cute, retourne le nombre correspondant
BOOL CBotExprNum::Execute(CBotStack* &pj)
{
@@ -2895,7 +2906,7 @@ void CBotExprNum::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
-// compile un token représentant une chaine de caractères
+// compile un token repr�sentant une chaine de caract�res
CBotExprAlpha::CBotExprAlpha()
{
@@ -2921,7 +2932,7 @@ CBotInstr* CBotExprAlpha::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(inst, pStk);
}
-// exécute, retourne la chaîne correspondante
+// ex�cute, retourne la cha�ne correspondante
BOOL CBotExprAlpha::Execute(CBotStack* &pj)
{
@@ -2933,7 +2944,7 @@ BOOL CBotExprAlpha::Execute(CBotStack* &pj)
CBotVar* var = CBotVar::Create((CBotToken*)NULL, CBotTypString);
CBotString chaine = m_token.GivString();
- chaine = chaine.Mid(1, chaine.GivLength()-2); // enlève les guillemets
+ chaine = chaine.Mid(1, chaine.GivLength()-2); // enl�ve les guillemets
var->SetValString( chaine ); // valeur du nombre
@@ -2951,7 +2962,7 @@ void CBotExprAlpha::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
-// compile un token représentant true ou false
+// compile un token repr�sentant true ou false
CBotExprBool::CBotExprBool()
{
@@ -2971,7 +2982,7 @@ CBotInstr* CBotExprBool::Compile(CBotToken* &p, CBotCStack* pStack)
p->GivType() == ID_FALSE )
{
inst = new CBotExprBool();
- inst->SetToken(p); // mémorise l'opération false ou true
+ inst->SetToken(p); // m�morise l'op�ration false ou true
p = p->GivNext();
CBotVar* var = CBotVar::Create((CBotToken*)NULL, CBotTypBoolean);
@@ -2981,7 +2992,7 @@ CBotInstr* CBotExprBool::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(inst, pStk);
}
-// exécute, retourne true ou false
+// ex�cute, retourne true ou false
BOOL CBotExprBool::Execute(CBotStack* &pj)
{
@@ -3006,7 +3017,7 @@ void CBotExprBool::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
-// gestion de l'opérande "null"
+// gestion de l'op�rande "null"
CBotExprNull::CBotExprNull()
{
@@ -3017,7 +3028,7 @@ CBotExprNull::~CBotExprNull()
{
}
-// exécute, retourne un pointeur vide
+// ex�cute, retourne un pointeur vide
BOOL CBotExprNull::Execute(CBotStack* &pj)
{
@@ -3039,7 +3050,7 @@ void CBotExprNull::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
-// gestion de l'opérande "nan"
+// gestion de l'op�rande "nan"
CBotExprNan::CBotExprNan()
{
@@ -3050,7 +3061,7 @@ CBotExprNan::~CBotExprNan()
{
}
-// exécute, retourne un pointeur vide
+// ex�cute, retourne un pointeur vide
BOOL CBotExprNan::Execute(CBotStack* &pj)
{
@@ -3072,8 +3083,8 @@ void CBotExprNan::RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
// compile un nom de variable
-// vérifie qu'elle est connue sur la pile
-// et qu'elle a été initialisée
+// v�rifie qu'elle est connue sur la pile
+// et qu'elle a �t� initialis�e
CBotExprVar::CBotExprVar()
{
@@ -3095,7 +3106,7 @@ CBotInstr* CBotExprVar::Compile(CBotToken* &p, CBotCStack* pStack, int privat)
// est-ce un nom de variable ?
if (p->GivType() == TokenTypVar)
{
- CBotInstr* inst = new CBotExprVar(); // crée l'objet
+ CBotInstr* inst = new CBotExprVar(); // cr�e l'objet
inst->SetToken(p);
@@ -3104,7 +3115,7 @@ CBotInstr* CBotExprVar::Compile(CBotToken* &p, CBotCStack* pStack, int privat)
if ( NULL != (var = pStk->FindVar(p)) ) // cherche si variable connue
{
int ident = var->GivUniqNum();
- ((CBotExprVar*)inst)->m_nIdent = ident; // l'identifie par son numéro
+ ((CBotExprVar*)inst)->m_nIdent = ident; // l'identifie par son num�ro
if (ident > 0 && ident < 9000)
{
@@ -3115,15 +3126,15 @@ CBotInstr* CBotExprVar::Compile(CBotToken* &p, CBotCStack* pStack, int privat)
goto err;
}
- // il s'agit d'un élement de la classe courante
- // ajoute l'équivalent d'un this. devant
+ // il s'agit d'un �lement de la classe courante
+ // ajoute l'�quivalent d'un this. devant
inst->SetToken(&CBotToken("this"));
((CBotExprVar*)inst)->m_nIdent = -2; // ident pour this
- CBotFieldExpr* i = new CBotFieldExpr(); // nouvel élément
+ CBotFieldExpr* i = new CBotFieldExpr(); // nouvel �l�ment
i->SetToken( p ); // garde le nom du token
i->SetUniqNum(ident);
- inst->AddNext3(i); // ajoute à la suite
+ inst->AddNext3(i); // ajoute � la suite
}
p = p->GivNext(); // token suivant
@@ -3136,7 +3147,7 @@ CBotInstr* CBotExprVar::Compile(CBotToken* &p, CBotCStack* pStack, int privat)
{
CBotIndexExpr* i = new CBotIndexExpr();
i->m_expr = CBotExpression::Compile(p, pStk); // compile la formule
- inst->AddNext3(i); // ajoute à la chaine
+ inst->AddNext3(i); // ajoute � la chaine
var = ((CBotVarArray*)var)->GivItem(0,TRUE); // donne le composant [0]
@@ -3160,21 +3171,21 @@ CBotInstr* CBotExprVar::Compile(CBotToken* &p, CBotCStack* pStack, int privat)
{
CBotToken* pp = p;
- if ( p->GivType() == TokenTypVar ) // doit être un nom
+ if ( p->GivType() == TokenTypVar ) // doit �tre un nom
{
- if ( p->GivNext()->GivType() == ID_OPENPAR )// un appel de méthode ?
+ if ( p->GivNext()->GivType() == ID_OPENPAR )// un appel de m�thode ?
{
CBotInstr* i = CBotInstrMethode::Compile(p, pStk, var);
if ( !pStk->IsOk() ) goto err;
- inst->AddNext3(i); // ajoute à la suite
+ inst->AddNext3(i); // ajoute � la suite
return pStack->Return(inst, pStk);
}
else
{
- CBotFieldExpr* i = new CBotFieldExpr(); // nouvel élément
+ CBotFieldExpr* i = new CBotFieldExpr(); // nouvel �l�ment
i->SetToken( pp ); // garde le nom du token
- inst->AddNext3(i); // ajoute à la suite
- var = var->GivItem(p->GivString()); // récupère l'item correpondant
+ inst->AddNext3(i); // ajoute � la suite
+ var = var->GivItem(p->GivString()); // r�cup�re l'item correpondant
if ( var != NULL )
{
i->SetUniqNum(var->GivUniqNum());
@@ -3230,27 +3241,27 @@ CBotInstr* CBotExprVar::CompileMethode(CBotToken* &p, CBotCStack* pStack)
CBotVar* var = pStk->FindVar(pthis);
if ( var == 0 ) return pStack->Return(NULL, pStk);
- CBotInstr* inst = new CBotExprVar(); // crée l'objet
+ CBotInstr* inst = new CBotExprVar(); // cr�e l'objet
- // il s'agit d'un élement de la classe courante
- // ajoute l'équivalent d'un this. devant
+ // il s'agit d'un �lement de la classe courante
+ // ajoute l'�quivalent d'un this. devant
inst->SetToken(&pthis);
((CBotExprVar*)inst)->m_nIdent = -2; // ident pour this
CBotToken* pp = p;
- if ( pp->GivType() == TokenTypVar ) // doit être un nom
+ if ( pp->GivType() == TokenTypVar ) // doit �tre un nom
{
- if ( pp->GivNext()->GivType() == ID_OPENPAR ) // un appel de méthode ?
+ if ( pp->GivNext()->GivType() == ID_OPENPAR ) // un appel de m�thode ?
{
CBotInstr* i = CBotInstrMethode::Compile(pp, pStk, var);
if ( pStk->IsOk() )
{
- inst->AddNext3(i); // ajoute à la suite
- p = pp; // instructions passées
+ inst->AddNext3(i); // ajoute � la suite
+ p = pp; // instructions pass�es
return pStack->Return(inst, pStk);
}
- pStk->SetError(0,0); // l'erreur n'est pas traitée ici
+ pStk->SetError(0,0); // l'erreur n'est pas trait�e ici
}
}
delete inst;
@@ -3259,7 +3270,7 @@ CBotInstr* CBotExprVar::CompileMethode(CBotToken* &p, CBotCStack* pStack)
}
-// exécute, rend la valeur d'une variable
+// ex�cute, rend la valeur d'une variable
BOOL CBotExprVar::Execute(CBotStack* &pj)
{
@@ -3273,19 +3284,19 @@ BOOL CBotExprVar::Execute(CBotStack* &pj)
if ( pile1->GivState() == 0 )
{
- if ( !ExecuteVar(pVar, pile, NULL, TRUE) ) return FALSE; // récupère la variable selon champs et index
+ if ( !ExecuteVar(pVar, pile, NULL, TRUE) ) return FALSE; // r�cup�re la variable selon champs et index
// DEBUG("CBotExprVar::Execute", 1 , pj);
if ( pVar ) pile1->SetCopyVar(pVar); // la place une copie sur la pile
else
{
-//-- pile1->SetVar(NULL); // la pile contient déjà le resultat (méthode)
+//-- pile1->SetVar(NULL); // la pile contient d�j� le resultat (m�thode)
return pj->Return(pile1);
}
pile1->IncState();
}
- pVar = pile1->GivVar(); // récupère si interrompu
+ pVar = pile1->GivVar(); // r�cup�re si interrompu
if ( pVar == NULL )
{
@@ -3300,7 +3311,7 @@ BOOL CBotExprVar::Execute(CBotStack* &pj)
pile1->SetError(TX_NOTINIT, pt);
return pj->Return(pile1);
}
- return pj->Return(pile1); // opération faite
+ return pj->Return(pile1); // op�ration faite
}
void CBotExprVar::RestoreState(CBotStack* &pj, BOOL bMain)
@@ -3314,12 +3325,12 @@ void CBotExprVar::RestoreState(CBotStack* &pj, BOOL bMain)
if ( pile1->GivState() == 0 )
{
- RestoreStateVar(pile, bMain); // récupère la variable selon champs et index
+ RestoreStateVar(pile, bMain); // r�cup�re la variable selon champs et index
return;
}
}
-// retrouve une variable à l'exécution
+// retrouve une variable � l'ex�cution
BOOL CBotExprVar::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToken, BOOL bStep)
{
@@ -3328,7 +3339,7 @@ BOOL CBotExprVar::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToke
if ( bStep && m_nIdent>0 && pj->IfStep() ) return FALSE;
- pVar = pj->FindVar(m_nIdent, TRUE); // cherche la variable avec mise à jour si nécessaire
+ pVar = pj->FindVar(m_nIdent, TRUE); // cherche la variable avec mise � jour si n�cessaire
if ( pVar == NULL )
{
#ifdef _DEBUG
@@ -3339,13 +3350,13 @@ BOOL CBotExprVar::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToke
}
if ( m_next3 != NULL &&
!m_next3->ExecuteVar(pVar, pj, &m_token, bStep, FALSE) )
- return FALSE; // Champs d'une instance, tableau, méthode ?
+ return FALSE; // Champs d'une instance, tableau, m�thode ?
- return pile->ReturnKeep( pj ); // ne rend pas la pile mais récupère le résultat si une méthode a été appelée
+ return pile->ReturnKeep( pj ); // ne rend pas la pile mais r�cup�re le r�sultat si une m�thode a �t� appel�e
}
-// retrouve une variable à l'exécution
+// retrouve une variable � l'ex�cution
void CBotExprVar::RestoreStateVar(CBotStack* &pj, BOOL bMain)
{
@@ -3358,12 +3369,12 @@ void CBotExprVar::RestoreStateVar(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////////
-// compile une liste de paramètres
+// compile une liste de param�tres
CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars)
{
BOOL first = TRUE;
- CBotInstr* ret = NULL; // pour la liste à retourner
+ CBotInstr* ret = NULL; // pour la liste � retourner
// pStack->SetStartError(p->GivStart());
CBotCStack* pile = pStack;
@@ -3375,7 +3386,7 @@ CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars)
if (!IsOfType(p, ID_CLOSEPAR)) while (TRUE)
{
start = p->GivStart();
- pile = pile->TokenStack(); // garde les résultats sur la pile
+ pile = pile->TokenStack(); // garde les r�sultats sur la pile
if ( first ) pStack->SetStartError(start);
first = FALSE;
@@ -3420,7 +3431,7 @@ CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars)
//////////////////////////////////////////////////////////////////////////////////////
-// compile un appel d'une méthode
+// compile un appel d'une m�thode
CBotInstrMethode::CBotInstrMethode()
{
@@ -3451,17 +3462,17 @@ CBotInstr* CBotInstrMethode::Compile(CBotToken* &p, CBotCStack* pStack, CBotVar*
{
inst->m_NomMethod = pp->GivString();
- // compile la liste des paramètres
+ // compile la liste des param�tres
CBotVar* ppVars[1000];
inst->m_Parameters = CompileParams(p, pStack, ppVars);
if ( pStack->IsOk() )
{
- CBotClass* pClass = var->GivClass(); // pointeur à la classe
+ CBotClass* pClass = var->GivClass(); // pointeur � la classe
inst->m_ClassName = pClass->GivName(); // le nom de la classe
CBotTypResult r = pClass->CompileMethode(inst->m_NomMethod, var, ppVars,
pStack, inst->m_MethodeIdent);
- delete pStack->TokenStack(); // libères les paramètres encore sur la pile
+ delete pStack->TokenStack(); // lib�res les param�tres encore sur la pile
inst->m_typRes = r;
if (inst->m_typRes.GivType() > 20)
@@ -3470,7 +3481,7 @@ CBotInstr* CBotInstrMethode::Compile(CBotToken* &p, CBotCStack* pStack, CBotVar*
delete inst;
return NULL;
}
- // met un résultat sur la pile pour avoir quelque chose
+ // met un r�sultat sur la pile pour avoir quelque chose
if (inst->m_typRes.GivType() > 0)
{
CBotVar* pResult = CBotVar::Create("", inst->m_typRes);
@@ -3492,7 +3503,7 @@ CBotInstr* CBotInstrMethode::Compile(CBotToken* &p, CBotCStack* pStack, CBotVar*
return NULL;
}
-// exécute l'appel de méthode
+// ex�cute l'appel de m�thode
BOOL CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToken, BOOL bStep, BOOL bExtend)
{
@@ -3509,13 +3520,13 @@ BOOL CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* pre
if ( pile1->IfStep() ) return FALSE;
- CBotStack* pile2 = pile1->AddStack(); // et pour les paramètres à venir
+ CBotStack* pile2 = pile1->AddStack(); // et pour les param�tres � venir
if ( pile1->GivState() == 0)
{
CBotVar* pThis = CBotVar::Create(pVar);
pThis->Copy(pVar);
- // la valeur de This doit être prise avant l'évaluation des paramètres
+ // la valeur de This doit �tre prise avant l'�valuation des param�tres
// Test.Action( Test = Autre );
// Action doit agir sur la valeur avant Test = Autre !!
pThis->SetName("this");
@@ -3527,18 +3538,18 @@ BOOL CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* pre
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
if ( pile2->GivState() == 0 )
{
if (!p->Execute(pile2)) return FALSE; // interrompu ici ?
- if (!pile2->SetState(1)) return FALSE; // marque spéciale pour reconnaîre les paramètres
+ if (!pile2->SetState(1)) return FALSE; // marque sp�ciale pour reconna�re les param�tres
}
ppVars[i++] = pile2->GivVar(); // construit la liste des pointeurs
- pile2 = pile2->AddStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->AddStack(); // de la place sur la pile pour les r�sultats
p = p->GivNext();
if ( p == NULL) break;
}
@@ -3561,7 +3572,7 @@ BOOL CBotInstrMethode::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* pre
if (pRes != pResult) delete pRes;
pVar = NULL; // ne retourne pas une valeur par cela
- return pj->Return(pile2); // libère toute la pile
+ return pj->Return(pile2); // lib�re toute la pile
}
void CBotInstrMethode::RestoreStateVar(CBotStack* &pile, BOOL bMain)
@@ -3572,7 +3583,7 @@ void CBotInstrMethode::RestoreStateVar(CBotStack* &pile, BOOL bMain)
CBotStack* pile1 = pile->RestoreStack(this); // une place pour la copie de This
if ( pile1 == NULL ) return;
- CBotStack* pile2 = pile1->RestoreStack(); // et pour les paramètres à venir
+ CBotStack* pile2 = pile1->RestoreStack(); // et pour les param�tres � venir
if ( pile2 == NULL ) return;
CBotVar* pThis = pile1->FindVar("this");
@@ -3582,9 +3593,9 @@ void CBotInstrMethode::RestoreStateVar(CBotStack* &pile, BOOL bMain)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
if ( pile2->GivState() == 0 )
@@ -3619,12 +3630,12 @@ BOOL CBotInstrMethode::Execute(CBotStack* &pj)
if ( pile1->IfStep() ) return FALSE;
- CBotStack* pile2 = pile1->AddStack(); // et pour les paramètres à venir
+ CBotStack* pile2 = pile1->AddStack(); // et pour les param�tres � venir
if ( pile1->GivState() == 0)
{
CBotVar* pThis = pile1->CopyVar(m_token);
- // la valeur de This doit être prise avant l'évaluation des paramètres
+ // la valeur de This doit �tre prise avant l'�valuation des param�tres
// Test.Action( Test = Autre );
// Action doit agir sur la valeur avant Test = Autre !!
pThis->SetName("this");
@@ -3634,18 +3645,18 @@ BOOL CBotInstrMethode::Execute(CBotStack* &pj)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
if ( pile2->GivState() == 0 )
{
if (!p->Execute(pile2)) return FALSE; // interrompu ici ?
- if (!pile2->SetState(1)) return FALSE; // marque spéciale pour reconnaîre les paramètres
+ if (!pile2->SetState(1)) return FALSE; // marque sp�ciale pour reconna�re les param�tres
}
ppVars[i++] = pile2->GivVar(); // construit la liste des pointeurs
- pile2 = pile2->AddStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->AddStack(); // de la place sur la pile pour les r�sultats
p = p->GivNext();
if ( p == NULL) break;
}
@@ -3666,13 +3677,13 @@ BOOL CBotInstrMethode::Execute(CBotStack* &pj)
pThis, ppVars,
pResult, pile2, GivToken())) return FALSE; // interrompu
- // met la nouvelle valeur de this à la place de l'ancienne variable
+ // met la nouvelle valeur de this � la place de l'ancienne variable
CBotVar* old = pile1->FindVar(m_token);
old->Copy(pThis, FALSE);
if (pRes != pResult) delete pRes;
- return pj->Return(pile2); // libère toute la pile
+ return pj->Return(pile2); // lib�re toute la pile
}
///////////////////////////////////////////////////////////////////////////
@@ -3697,7 +3708,7 @@ CBotInstr* CBotNew::Compile(CBotToken* &p, CBotCStack* pStack)
CBotToken* pp = p;
if ( !IsOfType(p, ID_NEW) ) return NULL;
- // vérifie que le token est un nom de classe
+ // v�rifie que le token est un nom de classe
if (p->GivType() != TokenTypVar) return NULL;
CBotClass* pClass = CBotClass::Find(p);
@@ -3718,15 +3729,15 @@ CBotInstr* CBotNew::Compile(CBotToken* &p, CBotCStack* pStack)
inst->m_vartoken = p;
p = p->GivNext();
- // crée l'objet sur le "tas"
+ // cr�e l'objet sur le "tas"
// avec un pointeur sur cet objet
CBotVar* pVar = CBotVar::Create("", pClass);
// inst->m_nThisIdent = CBotVar::NextUniqNum();
- // fait l'appel du créateur
+ // fait l'appel du cr�ateur
CBotCStack* pStk = pStack->TokenStack();
{
- // regarde s'il y a des paramètres
+ // regarde s'il y a des param�tres
CBotVar* ppVars[1000];
inst->m_Parameters = CompileParams(p, pStk, ppVars);
if ( !pStk->IsOk() ) goto error;
@@ -3734,10 +3745,10 @@ CBotInstr* CBotNew::Compile(CBotToken* &p, CBotCStack* pStack)
// le constructeur existe-il ?
// CBotString noname;
CBotTypResult r = pClass->CompileMethode(pClass->GivName(), pVar, ppVars, pStk, inst->m_nMethodeIdent);
- delete pStk->TokenStack(); // libère le supplément de pile
+ delete pStk->TokenStack(); // lib�re le suppl�ment de pile
int typ = r.GivType();
- // s'il n'y a pas de constructeur, et pas de paramètres non plus, c'est ok
+ // s'il n'y a pas de constructeur, et pas de param�tres non plus, c'est ok
if ( typ == TX_UNDEFCALL && inst->m_Parameters == NULL ) typ = 0;
pVar->SetInit(TRUE); // marque l'instance comme init
@@ -3747,14 +3758,14 @@ CBotInstr* CBotNew::Compile(CBotToken* &p, CBotCStack* pStack)
goto error;
}
- // si le constructeur n'existe pas, mais qu'il y a des paramètres
+ // si le constructeur n'existe pas, mais qu'il y a des param�tres
if (typ<0 && inst->m_Parameters != NULL)
{
pStk->SetError(TX_NOCONST, &inst->m_vartoken);
goto error;
}
- // rend le pointeur à l'objet sur la pile
+ // rend le pointeur � l'objet sur la pile
pStk->SetVar(pVar);
return pStack->Return(inst, pStk);
}
@@ -3763,7 +3774,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// exécute une instruction "new"
+// ex�cute une instruction "new"
BOOL CBotNew::Execute(CBotStack* &pj)
{
@@ -3779,12 +3790,12 @@ BOOL CBotNew::Execute(CBotStack* &pj)
CBotToken* pt = &m_vartoken;
CBotClass* pClass = CBotClass::Find(pt);
- // crée la variable "this" de type pointeur à l'objet
+ // cr�e la variable "this" de type pointeur � l'objet
if ( pile->GivState()==0)
{
- // crée une instance de la classe demandée
- // et initialise le pointeur à cet objet
+ // cr�e une instance de la classe demand�e
+ // et initialise le pointeur � cet objet
pThis = CBotVar::Create("this", pClass);
// pThis->SetUniqNum( m_nThisIdent ) ;
@@ -3794,16 +3805,16 @@ BOOL CBotNew::Execute(CBotStack* &pj)
pile->IncState();
}
- // retrouve le pointeur this si on a été interrompu
+ // retrouve le pointeur this si on a �t� interrompu
if ( pThis == NULL)
{
pThis = pile1->GivVar(); // retrouve le pointeur
}
- // y a-t-il une assignation ou des paramètres (constructeur)
+ // y a-t-il une assignation ou des param�tres (constructeur)
if ( pile->GivState()==1)
{
- // évalue le constructeur de l'instance
+ // �value le constructeur de l'instance
CBotVar* ppVars[1000];
CBotStack* pile2 = pile;
@@ -3811,13 +3822,13 @@ BOOL CBotNew::Execute(CBotStack* &pj)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile2 = pile2->AddStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->AddStack(); // de la place sur la pile pour les r�sultats
if ( pile2->GivState() == 0 )
{
if (!p->Execute(pile2)) return FALSE; // interrompu ici ?
@@ -3829,15 +3840,15 @@ BOOL CBotNew::Execute(CBotStack* &pj)
}
ppVars[i] = NULL;
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* pResult = NULL; // constructeurs toujours void
if ( !pClass->ExecuteMethode(m_nMethodeIdent, pClass->GivName(),
pThis, ppVars,
pResult, pile2, GivToken())) return FALSE; // interrompu
- pThis->ConstructorSet(); // signale que le constructeur a été appelé
-// pile->Return(pile2); // libère un bout de pile
+ pThis->ConstructorSet(); // signale que le constructeur a �t� appel�
+// pile->Return(pile2); // lib�re un bout de pile
// pile->IncState();
}
@@ -3857,7 +3868,7 @@ void CBotNew::RestoreState(CBotStack* &pj, BOOL bMain)
CBotToken* pt = &m_vartoken;
CBotClass* pClass = CBotClass::Find(pt);
- // crée la variable "this" de type pointeur à l'objet
+ // cr�e la variable "this" de type pointeur � l'objet
if ( pile->GivState()==0)
{
@@ -3868,10 +3879,10 @@ void CBotNew::RestoreState(CBotStack* &pj, BOOL bMain)
// pThis->SetUniqNum( m_nThisIdent );
pThis->SetUniqNum( -2 );
- // y a-t-il une assignation ou des paramètres (constructeur)
+ // y a-t-il une assignation ou des param�tres (constructeur)
if ( pile->GivState()==1)
{
- // évalue le constructeur de l'instance
+ // �value le constructeur de l'instance
CBotVar* ppVars[1000];
CBotStack* pile2 = pile;
@@ -3879,13 +3890,13 @@ void CBotNew::RestoreState(CBotStack* &pj, BOOL bMain)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile2 = pile2->RestoreStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->RestoreStack(); // de la place sur la pile pour les r�sultats
if ( pile2 == NULL ) return;
if ( pile2->GivState() == 0 )
@@ -3905,7 +3916,7 @@ void CBotNew::RestoreState(CBotStack* &pj, BOOL bMain)
}
/////////////////////////////////////////////////////////////
-// regarde si deux résultats sont compatibles pour faire une opération
+// regarde si deux r�sultats sont compatibles pour faire une op�ration
BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op )
{
@@ -3914,9 +3925,9 @@ BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op )
int max = (t1 > t2) ? t1 : t2;
- if ( max == 99 ) return FALSE; // un résultat est void ?
+ if ( max == 99 ) return FALSE; // un r�sultat est void ?
- // cas particulier pour les concaténation de chaînes
+ // cas particulier pour les concat�nation de cha�nes
if (op == ID_ADD && max >= CBotTypString) return TRUE;
if (op == ID_ASSADD && max >= CBotTypString) return TRUE;
if (op == ID_ASS && t1 == CBotTypString) return TRUE;
@@ -3941,8 +3952,8 @@ BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op )
CBotClass* c2 = type2.GivClass();
return c1->IsChildOf(c2) || c2->IsChildOf(c1);
- // accepte le caste à l'envers,
- // l'opération sera refusée à l'exécution si le pointeur n'est pas compatible
+ // accepte le caste � l'envers,
+ // l'op�ration sera refus�e � l'ex�cution si le pointeur n'est pas compatible
}
return TRUE;
@@ -3953,7 +3964,7 @@ BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op )
return TRUE;
}
-// regarde si deux variables sont compatible pour un passage de paramètre
+// regarde si deux variables sont compatible pour un passage de param�tre
BOOL TypesCompatibles( CBotTypResult& type1, CBotTypResult& type2 )
{
@@ -3965,7 +3976,7 @@ BOOL TypesCompatibles( CBotTypResult& type1, CBotTypResult& type2 )
int max = (t1 > t2) ? t1 : t2;
- if ( max == 99 ) return FALSE; // un résultat est void ?
+ if ( max == 99 ) return FALSE; // un r�sultat est void ?
if ( max >= CBotTypBoolean )
{
@@ -3986,7 +3997,7 @@ BOOL TypesCompatibles( CBotTypResult& type1, CBotTypResult& type2 )
/////////////////////////////////////////////////////////////////////////////////////
// Gestion des fichiers
-// nécessaire car il n'est pas possible de faire le fopen dans le programme principal
+// n�cessaire car il n'est pas possible de faire le fopen dans le programme principal
// et les fwrite ou fread dans une dll en utilisant le FILE* rendu.
FILE* fOpen(const char* name, const char* mode)
diff --git a/src/CBot/CBot.h b/src/CBot/CBot.h
index bf95c90..0189cf3 100644
--- a/src/CBot/CBot.h
+++ b/src/CBot/CBot.h
@@ -1,29 +1,42 @@
-////////////////////////////////////////////////////////////////////
-// interpréteur pour le language CBot du jeu COLOBOT
-
-// dernière révision : 03/10/2002 DD
+// * 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 .
+
+// derni�re r�vision : 03/10/2002 DD
#define EXTENDS TRUE
#include "resource.h"
-#include "CBotDll.h" // définitions publiques
+#include "CBotDll.h" // d�finitions publiques
#include "CBotToken.h" // gestion des tokens
-#define STACKRUN TRUE // reprise de l'exécution direct sur une routine suspendue
-#define STACKMEM TRUE // préréserve la mémoire pour la pile d'exécution
-#define MAXSTACK 990 // taille du stack réservé
+#define STACKRUN TRUE // reprise de l'ex�cution direct sur une routine suspendue
+#define STACKMEM TRUE // pr�r�serve la m�moire pour la pile d'ex�cution
+#define MAXSTACK 990 // taille du stack r�serv�
-#define EOX (CBotStack*)-1 // marqueur condition spéciale
+#define EOX (CBotStack*)-1 // marqueur condition sp�ciale
/////////////////////////////////////////////////////////////////////
-// résumé des classes utilisées, définies ci-après
+// r�sum� des classes utilis�es, d�finies ci-apr�s
class CBotCompExpr; // une expression telle que
// () <= ()
class CBotAddExpr; // une expression telle que
// () + ()
-class CBotParExpr; // un élément de base ou entre parenthèse
+class CBotParExpr; // un �l�ment de base ou entre parenth�se
// Toto.truc
// 12.5
// "chaine"
@@ -33,17 +46,17 @@ class CBotExprVar; // un nom de variable tel que
// chose.truc.machin
class CBotWhile; // while (...) {...};
class CBotIf; // if (...) {...} else {...}
-class CBotDefParam; // liste de paramètres d'une fonction
+class CBotDefParam; // liste de param�tres d'une fonction
class CBotRepeat; // repeat (nb) {...}
////////////////////////////////////////////////////////////////////////
-// Gestion de la pile d'exécution
+// Gestion de la pile d'ex�cution
////////////////////////////////////////////////////////////////////////
// en fait, en externe, la seule chose qu'il est possible de faire
-// c'est de créer une instance d'une pile
+// c'est de cr�er une instance d'une pile
// pour l'utiliser pour la routine CBotProgram::Execute(CBotStack)
class CBotStack
@@ -63,15 +76,15 @@ private:
static int m_start;
static int m_end;
static
- CBotVar* m_retvar; // résultat d'un return
+ CBotVar* m_retvar; // r�sultat d'un return
- CBotVar* m_var; // résultat des opérations
- CBotVar* m_listVar; // les variables déclarées à ce niveau
+ CBotVar* m_var; // r�sultat des op�rations
+ CBotVar* m_listVar; // les variables d�clar�es � ce niveau
- BOOL m_bBlock; // fait partie d'un bloc (variables sont locales à ce bloc)
+ BOOL m_bBlock; // fait partie d'un bloc (variables sont locales � ce bloc)
BOOL m_bOver; // limites de la pile ?
-// BOOL m_bDontDelete; // spécial, ne pas détruire les variables au delete
- CBotProgram* m_prog; // les fonctions définies par user
+// BOOL m_bDontDelete; // sp�cial, ne pas d�truire les variables au delete
+ CBotProgram* m_prog; // les fonctions d�finies par user
static
int m_initimer;
@@ -83,7 +96,7 @@ private:
void* m_pUser;
CBotInstr* m_instr; // l'instruction correspondante
- BOOL m_bFunc; // une entrée d'une fonction ?
+ BOOL m_bFunc; // une entr�e d'une fonction ?
CBotCall* m_call; // point de reprise dans un call extern
friend class CBotTry;
@@ -98,10 +111,10 @@ public:
BOOL StackOver();
int GivError(int& start, int& end);
- int GivError(); // rend le numéro d'erreur retourné
+ int GivError(); // rend le num�ro d'erreur retourn�
- void Reset(void* pUser); // plus d'erreur, timer au début
- void SetType(CBotTypResult& type); // détermine le type
+ void Reset(void* pUser); // plus d'erreur, timer au d�but
+ void SetType(CBotTypResult& type); // d�termine le type
int GivType(int mode = 0); // donne le type de valeur sur le stack
CBotTypResult GivTypResult(int mode = 0); // donne le type complet de valeur sur le stack
@@ -120,25 +133,25 @@ public:
CBotVar* CopyVar(CBotToken& Token, BOOL bUpdate = FALSE); // trouve et rend une copie
- CBotStack* AddStack(CBotInstr* instr = NULL, BOOL bBlock = FALSE); // étend le stack
- CBotStack* AddStackEOX(CBotCall* instr = NULL, BOOL bBlock = FALSE); // étend le stack
+ CBotStack* AddStack(CBotInstr* instr = NULL, BOOL bBlock = FALSE); // �tend le stack
+ CBotStack* AddStackEOX(CBotCall* instr = NULL, BOOL bBlock = FALSE); // �tend le stack
CBotStack* RestoreStack(CBotInstr* instr = NULL);
CBotStack* RestoreStackEOX(CBotCall* instr = NULL);
- CBotStack* AddStack2(BOOL bBlock = FALSE); // étend le stack
- BOOL Return(CBotStack* pFils); // transmet le résultat au dessus
- BOOL ReturnKeep(CBotStack* pFils); // transmet le résultat sans réduire la pile
+ CBotStack* AddStack2(BOOL bBlock = FALSE); // �tend le stack
+ BOOL Return(CBotStack* pFils); // transmet le r�sultat au dessus
+ BOOL ReturnKeep(CBotStack* pFils); // transmet le r�sultat sans r�duire la pile
BOOL BreakReturn(CBotStack* pfils, const char* name = NULL);
- // en cas de break éventuel
+ // en cas de break �ventuel
BOOL IfContinue(int state, const char* name);
// ou de "continue"
BOOL IsOk();
- BOOL SetState(int n, int lim = -10); // sélectionne un état
- int GivState(); // dans quel état j'ère ?
- BOOL IncState(int lim = -10); // passe à l'état suivant
- BOOL IfStep(); // faire du pas à pas ?
+ BOOL SetState(int n, int lim = -10); // s�lectionne un �tat
+ int GivState(); // dans quel �tat j'�re ?
+ BOOL IncState(int lim = -10); // passe � l'�tat suivant
+ BOOL IfStep(); // faire du pas � pas ?
BOOL Execute();
void SetVar( CBotVar* var );
@@ -177,7 +190,7 @@ public:
int m_temp;
};
-// les routines inline doivent être déclarées dans le fichier .h
+// les routines inline doivent �tre d�clar�es dans le fichier .h
inline BOOL CBotStack::IsOk()
{
@@ -211,13 +224,13 @@ private:
int m_end;
int m_start;
- CBotVar* m_var; // résultat des opérations
+ CBotVar* m_var; // r�sultat des op�rations
- BOOL m_bBlock; // fait partie d'un bloc (variables sont locales à ce bloc)
+ BOOL m_bBlock; // fait partie d'un bloc (variables sont locales � ce bloc)
CBotVar* m_listVar;
static
- CBotProgram* m_prog; // liste des fonctions compilées
+ CBotProgram* m_prog; // liste des fonctions compil�es
static
CBotTypResult m_retTyp;
// static
@@ -230,9 +243,9 @@ public:
BOOL IsOk();
int GivError();
int GivError(int& start, int& end);
- // rend le numéro d'erreur retourné
+ // rend le num�ro d'erreur retourn�
- void SetType(CBotTypResult& type);// détermine le type
+ void SetType(CBotTypResult& type);// d�termine le type
CBotTypResult GivTypResult(int mode = 0); // donne le type de valeur sur le stack
int GivType(int mode = 0); // donne le type de valeur sur le stack
CBotClass* GivClass(); // donne la classe de la valeur sur le stack
@@ -244,8 +257,8 @@ public:
CBotVar* CopyVar(CBotToken& Token); // trouve et rend une copie
CBotCStack* TokenStack(CBotToken* pToken = NULL, BOOL bBlock = FALSE);
- CBotInstr* Return(CBotInstr* p, CBotCStack* pParent); // transmet le résultat au dessus
- CBotFunction* ReturnFunc(CBotFunction* p, CBotCStack* pParent); // transmet le résultat au dessus
+ CBotInstr* Return(CBotInstr* p, CBotCStack* pParent); // transmet le r�sultat au dessus
+ CBotFunction* ReturnFunc(CBotFunction* p, CBotCStack* pParent); // transmet le r�sultat au dessus
void SetVar( CBotVar* var );
void SetCopyVar( CBotVar* var );
@@ -273,7 +286,7 @@ extern BOOL SaveVar(FILE* pf, CBotVar* pVar);
/////////////////////////////////////////////////////////////////////
-// classes définissant une instruction
+// classes d�finissant une instruction
class CBotInstr
{
private:
@@ -283,15 +296,15 @@ private:
protected:
CBotToken m_token; // conserve le token
CBotString name; // debug
- CBotInstr* m_next; // instructions chaînées
- CBotInstr* m_next2b; // seconde liste pour définition en chaîne
- CBotInstr* m_next3; // troisième liste pour les indices et champs
- CBotInstr* m_next3b; // nécessaire pour la déclaration des tableaux
+ CBotInstr* m_next; // instructions cha�n�es
+ CBotInstr* m_next2b; // seconde liste pour d�finition en cha�ne
+ CBotInstr* m_next3; // troisi�me liste pour les indices et champs
+ CBotInstr* m_next3b; // n�cessaire pour la d�claration des tableaux
/*
par exemple, le programme suivant
int x[]; x[1] = 4;
int y[x[1]][10], z;
- va généré
+ va g�n�r�
CBotInstrArray
m_next3b-> CBotEmpty
m_next->
@@ -368,7 +381,7 @@ class CBotWhile : public CBotInstr
private:
CBotInstr* m_Condition; // la condition
CBotInstr* m_Block; // les instructions
- CBotString m_label; // une étiquette s'il y a
+ CBotString m_label; // une �tiquette s'il y a
public:
CBotWhile();
@@ -382,9 +395,9 @@ public:
class CBotRepeat : public CBotInstr
{
private:
- CBotInstr* m_NbIter; // le nombre d'itération
+ CBotInstr* m_NbIter; // le nombre d'it�ration
CBotInstr* m_Block; // les instructions
- CBotString m_label; // une étiquette s'il y a
+ CBotString m_label; // une �tiquette s'il y a
public:
CBotRepeat();
@@ -400,7 +413,7 @@ class CBotDo : public CBotInstr
private:
CBotInstr* m_Block; // les instructions
CBotInstr* m_Condition; // la condition
- CBotString m_label; // une étiquette s'il y a
+ CBotString m_label; // une �tiquette s'il y a
public:
CBotDo();
@@ -416,9 +429,9 @@ class CBotFor : public CBotInstr
private:
CBotInstr* m_Init; // intruction initiale
CBotInstr* m_Test; // la condition de test
- CBotInstr* m_Incr; // instruction pour l'incrément
+ CBotInstr* m_Incr; // instruction pour l'incr�ment
CBotInstr* m_Block; // les instructions
- CBotString m_label; // une étiquette s'il y a
+ CBotString m_label; // une �tiquette s'il y a
public:
CBotFor();
@@ -432,7 +445,7 @@ public:
class CBotBreak : public CBotInstr
{
private:
- CBotString m_label; // une étiquette s'il y a
+ CBotString m_label; // une �tiquette s'il y a
public:
CBotBreak();
@@ -446,7 +459,7 @@ public:
class CBotReturn : public CBotInstr
{
private:
- CBotInstr* m_Instr; // le paramètre à retourner
+ CBotInstr* m_Instr; // le param�tre � retourner
public:
CBotReturn();
@@ -461,7 +474,7 @@ public:
class CBotSwitch : public CBotInstr
{
private:
- CBotInstr* m_Value; // value à chercher
+ CBotInstr* m_Value; // value � chercher
CBotInstr* m_Block; // les instructions
public:
@@ -477,7 +490,7 @@ public:
class CBotCase : public CBotInstr
{
private:
- CBotInstr* m_Value; // valeur à comparer
+ CBotInstr* m_Value; // valeur � comparer
public:
CBotCase();
@@ -527,7 +540,7 @@ public:
class CBotThrow : public CBotInstr
{
private:
- CBotInstr* m_Value; // la valeur à envoyer
+ CBotInstr* m_Value; // la valeur � envoyer
public:
CBotThrow();
@@ -569,14 +582,14 @@ public:
};
-// définition d'un nombre entier
+// d�finition d'un nombre entier
class CBotInt : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
- CBotInstr* m_expr; // la valeur à mettre, s'il y a
-/// CBotInstr* m_next; // plusieurs définitions enchaînées
+ CBotInstr* m_var; // la variable � initialiser
+ CBotInstr* m_expr; // la valeur � mettre, s'il y a
+/// CBotInstr* m_next; // plusieurs d�finitions encha�n�es
public:
CBotInt();
@@ -587,15 +600,15 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// définition d'un tableau
+// d�finition d'un tableau
class CBotInstArray : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
+ CBotInstr* m_var; // la variable � initialiser
CBotInstr* m_listass; // liste d'assignations pour le tableau
CBotTypResult
- m_typevar; // type d'éléments
+ m_typevar; // type d'�l�ments
// CBotString m_ClassName;
public:
@@ -608,14 +621,14 @@ public:
};
-// définition d'une liste d'assignation pour un tableau
+// d�finition d'une liste d'assignation pour un tableau
// int [ ] a [ ] = ( ( 1, 2, 3 ) , ( 3, 2, 1 ) ) ;
class CBotListArray : public CBotInstr
{
private:
- CBotInstr* m_expr; // expression pour un élément
- // les autres sont chaînés avec CBotInstr::m_next3;
+ CBotInstr* m_expr; // expression pour un �l�ment
+ // les autres sont cha�n�s avec CBotInstr::m_next3;
public:
CBotListArray();
~CBotListArray();
@@ -632,13 +645,13 @@ class CBotEmpty : public CBotInstr
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// définition d'un booléen
+// d�finition d'un bool�en
class CBotBoolean : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
- CBotInstr* m_expr; // la valeur à mettre, s'il y a
+ CBotInstr* m_var; // la variable � initialiser
+ CBotInstr* m_expr; // la valeur � mettre, s'il y a
public:
CBotBoolean();
@@ -650,13 +663,13 @@ public:
};
-// définition d'un nombre réel
+// d�finition d'un nombre r�el
class CBotFloat : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
- CBotInstr* m_expr; // la valeur à mettre, s'il y a
+ CBotInstr* m_var; // la variable � initialiser
+ CBotInstr* m_expr; // la valeur � mettre, s'il y a
public:
CBotFloat();
@@ -667,13 +680,13 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// définition d'un elément string
+// d�finition d'un el�ment string
class CBotIString : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
- CBotInstr* m_expr; // la valeur à mettre, s'il y a
+ CBotInstr* m_var; // la variable � initialiser
+ CBotInstr* m_expr; // la valeur � mettre, s'il y a
public:
CBotIString();
@@ -684,16 +697,16 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// définition d'un elément dans une classe quelconque
+// d�finition d'un el�ment dans une classe quelconque
class CBotClassInst : public CBotInstr
{
private:
- CBotInstr* m_var; // la variable à initialiser
- CBotClass* m_pClass; // référence à la classe
- CBotInstr* m_Parameters; // les paramètres à évaluer pour le constructeur
- CBotInstr* m_expr; // la valeur à mettre, s'il y a
- BOOL m_hasParams; // il y a des paramètres ?
+ CBotInstr* m_var; // la variable � initialiser
+ CBotClass* m_pClass; // r�f�rence � la classe
+ CBotInstr* m_Parameters; // les param�tres � �valuer pour le constructeur
+ CBotInstr* m_expr; // la valeur � mettre, s'il y a
+ BOOL m_hasParams; // il y a des param�tres ?
long m_nMethodeIdent;
public:
@@ -716,8 +729,8 @@ public:
};
-// left opérande
-// n'accepte que les expressions pouvant être à gauche d'une assignation
+// left op�rande
+// n'accepte que les expressions pouvant �tre � gauche d'une assignation
class CBotLeftExpr : public CBotInstr
{
@@ -782,8 +795,8 @@ public:
class CBotExpression : public CBotInstr
{
private:
- CBotLeftExpr* m_leftop; // élément de gauche
- CBotInstr* m_rightop; // élément de droite
+ CBotLeftExpr* m_leftop; // �l�ment de gauche
+ CBotInstr* m_rightop; // �l�ment de droite
public:
CBotExpression();
@@ -797,7 +810,7 @@ public:
class CBotListExpression : public CBotInstr
{
private:
- CBotInstr* m_Expr; // la 1ère expression à évaluer
+ CBotInstr* m_Expr; // la 1�re expression � �valuer
public:
CBotListExpression();
@@ -811,9 +824,9 @@ public:
class CBotLogicExpr : public CBotInstr
{
private:
- CBotInstr* m_condition; // test à évaluer
- CBotInstr* m_op1; // élément de gauche
- CBotInstr* m_op2; // élément de droite
+ CBotInstr* m_condition; // test � �valuer
+ CBotInstr* m_op1; // �l�ment de gauche
+ CBotInstr* m_op2; // �l�ment de droite
friend class CBotTwoOpExpr;
public:
@@ -838,9 +851,9 @@ public:
-// une expression éventuellement entre parenthèses ( ... )
+// une expression �ventuellement entre parenth�ses ( ... )
// il n'y a jamais d'instance de cette classe
-// l'objet retourné étant le contenu de la parenthése
+// l'objet retourn� �tant le contenu de la parenth�se
class CBotParExpr : public CBotInstr
{
private:
@@ -854,7 +867,7 @@ public:
class CBotExprUnaire : public CBotInstr
{
private:
- CBotInstr* m_Expr; // l'expression à évaluer
+ CBotInstr* m_Expr; // l'expression � �valuer
public:
CBotExprUnaire();
~CBotExprUnaire();
@@ -864,13 +877,13 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// toutes les opérations à 2 opérandes
+// toutes les op�rations � 2 op�randes
class CBotTwoOpExpr : public CBotInstr
{
private:
- CBotInstr* m_leftop; // élément de gauche
- CBotInstr* m_rightop; // élément de droite
+ CBotInstr* m_leftop; // �l�ment de gauche
+ CBotInstr* m_rightop; // �l�ment de droite
public:
CBotTwoOpExpr();
~CBotTwoOpExpr();
@@ -900,7 +913,7 @@ public:
class CBotListInstr : public CBotInstr
{
private:
- CBotInstr* m_Instr; // les instructions à faire
+ CBotInstr* m_Instr; // les instructions � faire
public:
CBotListInstr();
@@ -915,11 +928,11 @@ public:
class CBotInstrCall : public CBotInstr
{
private:
- CBotInstr* m_Parameters; // les paramètres à évaluer
-// int m_typeRes; // type du résultat
-// CBotString m_RetClassName; // class du résultat
+ CBotInstr* m_Parameters; // les param�tres � �valuer
+// int m_typeRes; // type du r�sultat
+// CBotString m_RetClassName; // class du r�sultat
CBotTypResult
- m_typRes; // type complet du résultat
+ m_typRes; // type complet du r�sultat
long m_nFuncIdent; // id de la fonction
public:
@@ -931,19 +944,19 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// un appel d'une méthode
+// un appel d'une m�thode
class CBotInstrMethode : public CBotInstr
{
private:
- CBotInstr* m_Parameters; // les paramètres à évaluer
-// int m_typeRes; // type du résultat
-// CBotString m_RetClassName; // class du résultat
+ CBotInstr* m_Parameters; // les param�tres � �valuer
+// int m_typeRes; // type du r�sultat
+// CBotString m_RetClassName; // class du r�sultat
CBotTypResult
- m_typRes; // type complet du résultat
+ m_typRes; // type complet du r�sultat
- CBotString m_NomMethod; // nom de la méthode
- long m_MethodeIdent; // identificateur de la méthode
+ CBotString m_NomMethod; // nom de la m�thode
+ long m_MethodeIdent; // identificateur de la m�thode
// long m_nThisIdent; // identificateur pour "this"
CBotString m_ClassName; // nom de la classe
@@ -1017,7 +1030,7 @@ class CBotLeftExprVar : public CBotInstr
private:
public:
CBotTypResult
- m_typevar; // type de variable déclarée
+ m_typevar; // type de variable d�clar�e
long m_nIdent; // identificateur unique pour cette variable
public:
@@ -1072,7 +1085,7 @@ public:
class CBotNew : public CBotInstr
{
private:
- CBotInstr* m_Parameters; // les paramètres à évaluer
+ CBotInstr* m_Parameters; // les param�tres � �valuer
long m_nMethodeIdent;
// long m_nThisIdent;
CBotToken m_vartoken;
@@ -1087,7 +1100,7 @@ public:
void RestoreState(CBotStack* &pj, BOOL bMain);
};
-// expression représentant un nombre
+// expression repr�sentant un nombre
class CBotExprNum : public CBotInstr
{
@@ -1107,7 +1120,7 @@ public:
-// expression représentant une chaine de caractères
+// expression repr�sentant une chaine de caract�res
class CBotExprAlpha : public CBotInstr
{
@@ -1131,7 +1144,7 @@ class CBotVarInt : public CBotVar
{
private:
int m_val; // la valeur
- CBotString m_defnum; // le nom si donné par DefineNum
+ CBotString m_defnum; // le nom si donn� par DefineNum
friend class CBotVar;
public:
@@ -1179,7 +1192,7 @@ public:
};
-// classe pour la gestion des nombres réels (float)
+// classe pour la gestion des nombres r�els (float)
class CBotVarFloat : CBotVar
{
private:
@@ -1220,7 +1233,7 @@ public:
};
-// classe pour la gestion des chaînes (String)
+// classe pour la gestion des cha�nes (String)
class CBotVarString : CBotVar
{
private:
@@ -1281,19 +1294,19 @@ class CBotVarClass : public CBotVar
{
private:
static
- CBotVarClass* m_ExClass; // liste des instances existantes à un moment donné
- CBotVarClass* m_ExNext; // pour cette liste générale
- CBotVarClass* m_ExPrev; // pour cette liste générale
+ CBotVarClass* m_ExClass; // liste des instances existantes � un moment donn�
+ CBotVarClass* m_ExNext; // pour cette liste g�n�rale
+ CBotVarClass* m_ExPrev; // pour cette liste g�n�rale
private:
- CBotClass* m_pClass; // la définition de la classe
+ CBotClass* m_pClass; // la d�finition de la classe
CBotVarClass* m_pParent; // l'instance dans la classe parent
CBotVar* m_pVar; // contenu
friend class CBotVar; // mon papa est un copain
friend class CBotVarPointer; // et le pointeur aussi
int m_CptUse; // compteur d'utilisation
long m_ItemIdent; // identificateur (unique) de l'instance
- BOOL m_bConstructor; // set si un constructeur a été appelé
+ BOOL m_bConstructor; // set si un constructeur a �t� appel�
public:
CBotVarClass( const CBotToken* name, CBotTypResult& type );
@@ -1304,7 +1317,7 @@ public:
void Copy(CBotVar* pSrc, BOOL bName=TRUE);
void SetClass(CBotClass* pClass); //, int &nIdent);
CBotClass* GivClass();
- CBotVar* GivItem(const char* name); // rend un élément d'une classe selon son nom (*)
+ CBotVar* GivItem(const char* name); // rend un �l�ment d'une classe selon son nom (*)
CBotVar* GivItemRef(int nIdent);
CBotVar* GivItem(int n, BOOL bExtend);
@@ -1315,8 +1328,8 @@ public:
BOOL Save1State(FILE* pf);
void Maj(void* pUser, BOOL bContinue);
- void IncrementUse(); // une référence en plus
- void DecrementUse(); // une référence en moins
+ void IncrementUse(); // une r�f�rence en plus
+ void DecrementUse(); // une r�f�rence en moins
CBotVarClass*
GivPointer();
@@ -1338,13 +1351,13 @@ public:
};
-// classe pour la gestion des pointeurs à une instances de classe
+// classe pour la gestion des pointeurs � une instances de classe
class CBotVarPointer : public CBotVar
{
private:
CBotVarClass*
m_pVarClass; // contenu
- CBotClass* m_pClass; // la classe prévue pour ce pointeur
+ CBotClass* m_pClass; // la classe pr�vue pour ce pointeur
friend class CBotVar; // mon papa est un copain
public:
@@ -1354,7 +1367,7 @@ public:
void Copy(CBotVar* pSrc, BOOL bName=TRUE);
void SetClass(CBotClass* pClass);
CBotClass* GivClass();
- CBotVar* GivItem(const char* name); // rend un élément d'une classe selon son nom (*)
+ CBotVar* GivItem(const char* name); // rend un �l�ment d'une classe selon son nom (*)
CBotVar* GivItemRef(int nIdent);
CBotVar* GivItemList();
@@ -1363,8 +1376,8 @@ public:
CBotVarClass*
GivPointer();
- void SetIdent(long n); // associe un numéro d'identification (unique)
- long GivIdent(); // donne le numéro d'identification associé
+ void SetIdent(long n); // associe un num�ro d'identification (unique)
+ long GivIdent(); // donne le num�ro d'identification associ�
void ConstructorSet();
BOOL Save1State(FILE* pf);
@@ -1383,7 +1396,7 @@ class CBotVarArray : public CBotVar
{
private:
CBotVarClass*
- m_pInstance; // instance gérant le tableau
+ m_pInstance; // instance g�rant le tableau
friend class CBotVar; // papa est un copain
@@ -1396,12 +1409,12 @@ public:
GivPointer();
void Copy(CBotVar* pSrc, BOOL bName=TRUE);
- CBotVar* GivItem(int n, BOOL bGrow=FALSE); // rend un élément selon son index numérique
- // agrandi le tableau si nécessaire si bExtend
-// CBotVar* GivItem(const char* name); // rend un élément selon son index litéral
- CBotVar* GivItemList(); // donne le premier élément de la liste
+ CBotVar* GivItem(int n, BOOL bGrow=FALSE); // rend un �l�ment selon son index num�rique
+ // agrandi le tableau si n�cessaire si bExtend
+// CBotVar* GivItem(const char* name); // rend un �l�ment selon son index lit�ral
+ CBotVar* GivItemList(); // donne le premier �l�ment de la liste
- CBotString GivValString(); // donne le contenu du tableau dans une chaîne
+ CBotString GivValString(); // donne le contenu du tableau dans une cha�ne
BOOL Save1State(FILE* pf);
};
@@ -1482,7 +1495,7 @@ public:
static void Free();
};
-// classe gérant les méthodes déclarées par AddFunction sur une classe
+// classe g�rant les m�thodes d�clar�es par AddFunction sur une classe
class CBotCallMethode
{
@@ -1514,15 +1527,15 @@ public:
};
-// une liste de paramètres
+// une liste de param�tres
class CBotDefParam
{
private:
- CBotToken m_token; // nom du paramètre
+ CBotToken m_token; // nom du param�tre
CBotString m_typename; // nom du type
- CBotTypResult m_type; // type de paramètre
- CBotDefParam* m_next; // paramètre suivant
+ CBotTypResult m_type; // type de param�tre
+ CBotDefParam* m_next; // param�tre suivant
long m_nIdent;
public:
@@ -1542,7 +1555,7 @@ public:
};
-// une déclaration de fonction
+// une d�claration de fonction
class CBotFunction : CBotInstr
{
@@ -1555,18 +1568,18 @@ private:
friend class CBotCStack;
// long m_nThisIdent;
long m_nFuncIdent;
- BOOL m_bSynchro; // méthode synchronisée ?
+ BOOL m_bSynchro; // m�thode synchronis�e ?
private:
- CBotDefParam* m_Param; // liste des paramètres
+ CBotDefParam* m_Param; // liste des param�tres
CBotInstr* m_Block; // le bloc d'instructions
CBotFunction* m_next;
CBotToken m_retToken; // si retourne un CBotTypClass
- CBotTypResult m_retTyp; // type complet du résultat
+ CBotTypResult m_retTyp; // type complet du r�sultat
BOOL m_bPublic; // fonction publique
BOOL m_bExtern; // fonction extern
- CBotString m_MasterClass; // nom de la classe qu'on dérive
+ CBotString m_MasterClass; // nom de la classe qu'on d�rive
CBotProgram* m_pProg;
friend class CBotProgram;
friend class CBotClass;
diff --git a/src/CBot/CBotAddExpr.cpp b/src/CBot/CBotAddExpr.cpp
index 1d2555a..067aa88 100644
--- a/src/CBot/CBotAddExpr.cpp
+++ b/src/CBot/CBotAddExpr.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 + Opérande2
-// Opérande1 - Opérande2
+// * 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 .
#include "CBot.h"
@@ -26,9 +38,9 @@ CBotInstr* CBotAddExpr::Compile(CBotToken* &p, CBotStack* pStack)
{
CBotStack* pStk = pStack->TokenStack(); // un bout de pile svp
- // cherche des instructions qui peuvent convenir à gauche de l'opération + ou -
+ // cherche des instructions qui peuvent convenir � gauche de l'op�ration + ou -
- CBotInstr* left = CBotMulExpr::Compile( p, pStk ); // expression A * B à gauche
+ CBotInstr* left = CBotMulExpr::Compile( p, pStk ); // expression A * B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // si erreur, la transmet
// est-ce qu'on a le token + ou - ensuite ?
@@ -36,80 +48,80 @@ CBotInstr* CBotAddExpr::Compile(CBotToken* &p, CBotStack* pStack)
if ( p->GetType() == ID_ADD ||
p->GetType() == ID_SUB) // plus ou moins
{
- CBotAddExpr* inst = new CBotAddExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotAddExpr* inst = new CBotAddExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
int type1, type2;
- type1 = pStack->GetType(); // de quel type le premier opérande ?
+ type1 = pStack->GetType(); // de quel type le premier op�rande ?
- p = p->Next(); // saute le token de l'opération
+ p = p->Next(); // saute le token de l'op�ration
- // cherche des instructions qui peuvent convenir à droite
+ // cherche des instructions qui peuvent convenir � droite
- if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression (...) à droite
+ if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression (...) � droite
{
- // il y a un second opérande acceptable
+ // il y a un second op�rande acceptable
- type2 = pStack->GetType(); // de quel type le résultat ?
+ type2 = pStack->GetType(); // de quel type le r�sultat ?
- if ( type1 == type2 ) // les résultats sont-ils compatibles
+ if ( type1 == type2 ) // les r�sultats sont-ils compatibles
{
- // si ok, enregistre l'opérande dans l'objet
+ // si ok, enregistre l'op�rande dans l'objet
inst->m_leftop = left;
- // et rend l'object à qui l'a demandé
+ // et rend l'object � qui l'a demand�
return pStack->Return(inst, pStk);
}
}
- // en cas d'erreur, libère les éléments
+ // en cas d'erreur, lib�re les �l�ments
delete left;
delete inst;
// et transmet l'erreur qui se trouve sur la pile
return pStack->Return(NULL, pStk);
}
- // si on n'a pas affaire à une opération + ou -
- // rend à qui l'a demandé, l'opérande (de gauche) trouvé
- // à la place de l'objet "addition"
+ // si on n'a pas affaire � une op�ration + ou -
+ // rend � qui l'a demand�, l'op�rande (de gauche) trouv�
+ // � la place de l'objet "addition"
return pStack->Return(left, pStk);
}
-// fait l'opération d'addition ou de soustraction
+// fait l'op�ration d'addition ou de soustraction
BOOL CBotAddExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pSk1 == EOX ) return TRUE;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GetState() == 0 && // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GetState() == 0 && // 1er �tat, �value l'op�rande de gauche
!m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- // passe à l'étape suivante
- pStk1->SetState(1); // prêt pour la suite
+ // passe � l'�tape suivante
+ pStk1->SetState(1); // pr�t pour la suite
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
// qui se trouve sur la pile, justement.
- CBotStack* pStk2 = pStk1->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
- int type1 = pStk1->GetType(); // de quels types les résultats ?
+ int type1 = pStk1->GetType(); // de quels types les r�sultats ?
int type2 = pStk2->GetType();
- // crée une variable temporaire pour y mettre le résultat
+ // cr�e une variable temporaire pour y mettre le r�sultat
CBotVar* result = new CBotVar( NULL, MAX(type1, type2));
- // fait l'opération selon la demande
+ // fait l'op�ration selon la demande
switch (GetTokenType())
{
case ID_ADD:
@@ -119,10 +131,10 @@ BOOL CBotAddExpr::Execute(CBotStack* &pStack)
result->Sub(pStk1->GetVar(), pStk2->GetVar()); // soustrait
break;
}
- pStk2->SetVar(result); // met le résultat sur la pile
+ pStk2->SetVar(result); // met le r�sultat sur la pile
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index 180faf3..7f1fd3f 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////////////////////////
-// Gestion des variables de type classe
-//
+// * 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 .
#include "CBot.h"
@@ -50,7 +62,7 @@ CBotClass::~CBotClass()
delete m_pCalls;
delete m_pMethod;
- delete m_next; // libère toutes celle de ce niveau
+ delete m_next; // lib�re toutes celle de ce niveau
}
@@ -77,7 +89,7 @@ void CBotClass::Purge()
m_nbVar = m_pParent == NULL ? 0 : m_pParent->m_nbVar;
m_next->Purge();
- m_next = NULL; // n'appartient plus à cette chaîne
+ m_next = NULL; // n'appartient plus � cette cha�ne
}
BOOL CBotClass::Lock(CBotProgram* p)
@@ -93,7 +105,7 @@ BOOL CBotClass::Lock(CBotProgram* p)
if ( p == m_ProgInLock[0] )
{
m_cptOne++;
- m_cptLock--; // a déjà été compté
+ m_cptLock--; // a d�j� �t� compt�
return TRUE;
}
@@ -102,7 +114,7 @@ BOOL CBotClass::Lock(CBotProgram* p)
if ( p == m_ProgInLock[j] )
{
m_cptLock--;
- return FALSE; // déjà en attente
+ return FALSE; // d�j� en attente
}
}
@@ -279,7 +291,7 @@ BOOL CBotClass::AddFunction(const char* name,
BOOL rExec (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception),
CBotTypResult rCompile (CBotVar* pThis, CBotVar* &pVar))
{
- // mémorise les pointeurs aux deux fonctions
+ // m�morise les pointeurs aux deux fonctions
CBotCallMethode* p = m_pCalls;
CBotCallMethode* pp = NULL;
@@ -299,7 +311,7 @@ BOOL CBotClass::AddFunction(const char* name,
p = new CBotCallMethode(name, rExec, rCompile);
if (m_pCalls == NULL) m_pCalls = p;
- else m_pCalls->AddNext(p); // ajoute à la liste
+ else m_pCalls->AddNext(p); // ajoute � la liste
return TRUE;
}
@@ -310,21 +322,21 @@ BOOL CBotClass::AddUpdateFunc( void rMaj ( CBotVar* pThis, void* pUser ) )
return TRUE;
}
-// compile une méthode associée à une instance de classe
-// la méthode peut être déclarée par AddFunction ou par l'utilisateur
+// compile une m�thode associ�e � une instance de classe
+// la m�thode peut �tre d�clar�e par AddFunction ou par l'utilisateur
CBotTypResult CBotClass::CompileMethode(const char* name,
CBotVar* pThis, CBotVar** ppParams,
CBotCStack* pStack, long& nIdent)
{
- nIdent = 0; // oublie le précédent s'il y a lieu
+ nIdent = 0; // oublie le pr�c�dent s'il y a lieu
- // recherche dans les méthodes déclarées par AddFunction
+ // recherche dans les m�thodes d�clar�es par AddFunction
CBotTypResult r = m_pCalls->CompileCall(name, pThis, ppParams, pStack, nIdent);
if ( r.GivType() >= 0) return r;
- // recherche dans les méthodes déclarées par l'utilisateur
+ // recherche dans les m�thodes d�clar�es par l'utilisateur
r = m_pMethod->CompileCall(name, ppParams, nIdent);
if ( r.Eq(TX_UNDEFCALL) && m_pParent != NULL )
@@ -332,7 +344,7 @@ CBotTypResult CBotClass::CompileMethode(const char* name,
return r;
}
-// exécute une méthode
+// ex�cute une m�thode
BOOL CBotClass::ExecuteMethode(long& nIdent, const char* name,
CBotVar* pThis, CBotVar** ppParams,
@@ -346,7 +358,7 @@ BOOL CBotClass::ExecuteMethode(long& nIdent, const char* name,
return ret;
}
-// rétabli la pile d'exécution
+// r�tabli la pile d'ex�cution
void CBotClass::RestoreMethode(long& nIdent, const char* name, CBotVar* pThis,
CBotVar** ppParams, CBotStack* &pStack)
@@ -361,7 +373,7 @@ BOOL CBotClass::SaveStaticState(FILE* pf)
{
if (!WriteWord( pf, CBOTVERSION*2)) return FALSE;
- // sauve l'état des variables statiques dans les classes
+ // sauve l'�tat des variables statiques dans les classes
CBotClass* p = m_ExClass;
while ( p != NULL )
@@ -378,7 +390,7 @@ BOOL CBotClass::SaveStaticState(FILE* pf)
if (!WriteWord( pf, 1)) return FALSE;
if (!WriteString( pf, pv->GivName() )) return FALSE;
- if ( !pv->Save0State(pf)) return FALSE; // entête commune
+ if ( !pv->Save0State(pf)) return FALSE; // ent�te commune
if ( !pv->Save1State(pf) ) return FALSE; // sauve selon la classe fille
if ( !WriteWord( pf, 0)) return FALSE;
}
@@ -450,7 +462,7 @@ CBotClassInst::~CBotClassInst()
// delete m_next; // fait par le destructeur de la classe de base ~CBotInstr()
}
-// définition de pointeur(s) à un objet
+// d�finition de pointeur(s) � un objet
// du style
// CPoint A, B ;
@@ -463,7 +475,7 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
pClass = CBotClass::Find(p);
if ( pClass == NULL )
{
- // pas trouvé ? c'est bizare
+ // pas trouv� ? c'est bizare
pStack->SetError(TX_NOCLASS, p);
return NULL;
}
@@ -487,7 +499,7 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
if ( NULL != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )) )
{
((CBotLeftExprVar*)inst->m_var)->m_typevar = type;
- if (pStk->CheckVarLocal(vartoken)) // redéfinition de la variable
+ if (pStk->CheckVarLocal(vartoken)) // red�finition de la variable
{
pStk->SetStartError(vartoken->GivStart());
pStk->SetError(TX_REDEFVAR, vartoken->GivEnd());
@@ -499,7 +511,7 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
delete inst; // n'est pas de type CBotInt
p = vartoken; // revient sur le nom de la variable
- // compile une déclaration de tableau
+ // compile une d�claration de tableau
inst = (CBotClassInst*)CBotInstArray::Compile( p, pStk, type );
@@ -508,27 +520,27 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
pStk->SetError(TX_CLBRK, p->GivStart());
goto error;
}
- goto suite; // pas d'assignation, variable déjà créée
+ goto suite; // pas d'assignation, variable d�j� cr��e
}
CBotVar* var;
- var = CBotVar::Create(vartoken->GivString(), type); // crée l'instance
+ var = CBotVar::Create(vartoken->GivString(), type); // cr�e l'instance
// var->SetClass(pClass);
var->SetUniqNum(
((CBotLeftExprVar*)inst->m_var)->m_nIdent = CBotVar::NextUniqNum());
- // lui attribut un numéro unique
+ // lui attribut un num�ro unique
pStack->AddVar(var); // la place sur la pile
- // regarde s'il y a des paramètres
+ // regarde s'il y a des param�tres
inst->m_hasParams = (p->GivType() == ID_OPENPAR);
CBotVar* ppVars[1000];
inst->m_Parameters = CompileParams(p, pStk, ppVars);
if ( !pStk->IsOk() ) goto error;
- // s'il y a des paramètres, fait l'équivalent de l'instruction new
- // CPoint A ( 0, 0 ) est équivalent à
+ // s'il y a des param�tres, fait l'�quivalent de l'instruction new
+ // CPoint A ( 0, 0 ) est �quivalent �
// CPoint A = new CPoint( 0, 0 )
// if ( NULL != inst->m_Parameters )
@@ -537,13 +549,13 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
// le constructeur existe-il ?
// CBotString noname;
CBotTypResult r = pClass->CompileMethode(pClass->GivName(), var, ppVars, pStk, inst->m_nMethodeIdent);
- delete pStk->TokenStack(); // libère le supplément de pile
+ delete pStk->TokenStack(); // lib�re le suppl�ment de pile
int typ = r.GivType();
if (typ == TX_UNDEFCALL)
{
// si le constructeur n'existe pas
- if (inst->m_Parameters != NULL) // avec des paramètres
+ if (inst->m_Parameters != NULL) // avec des param�tres
{
pStk->SetError(TX_NOCONST, vartoken);
goto error;
@@ -582,27 +594,27 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass*
// if ( !bIntrinsic ) var->SetPointer(pStk->GivVar()->GivPointer());
if ( !bIntrinsic )
{
- // n'utilise pas le résultat sur la pile, pour imposer la classe
+ // n'utilise pas le r�sultat sur la pile, pour imposer la classe
CBotVar* pvar = CBotVar::Create("", pClass);
- var->SetPointer( pvar ); // var déjà déclarée pointe l'instance
+ var->SetPointer( pvar ); // var d�j� d�clar�e pointe l'instance
delete pvar; // supprime le second pointeur
}
var->SetInit(TRUE); // marque le pointeur comme init
}
else if (inst->m_hasParams)
{
- // crée l'objet sur le "tas"
+ // cr�e l'objet sur le "tas"
// avec un pointeur sur cet objet
if ( !bIntrinsic )
{
CBotVar* pvar = CBotVar::Create("", pClass);
- var->SetPointer( pvar ); // var déjà déclarée pointe l'instance
+ var->SetPointer( pvar ); // var d�j� d�clar�e pointe l'instance
delete pvar; // supprime le second pointeur
}
var->SetInit(2); // marque le pointeur comme init
}
suite:
- if (IsOfType(p, ID_COMMA)) // plusieurs définitions enchaînées
+ if (IsOfType(p, ID_COMMA)) // plusieurs d�finitions encha�n�es
{
if ( NULL != ( inst->m_next = CBotClassInst::Compile(p, pStk, pClass) )) // compile la suivante
{
@@ -610,7 +622,7 @@ suite:
}
}
- if (IsOfType(p, ID_SEP)) // instruction terminée
+ if (IsOfType(p, ID_SEP)) // instruction termin�e
{
return pStack->Return(inst, pStk);
}
@@ -623,7 +635,7 @@ error:
return pStack->Return(NULL, pStk);
}
-// déclaration de l'instance d'une classe, par exemple:
+// d�claration de l'instance d'une classe, par exemple:
// CPoint A, B;
BOOL CBotClassInst::Execute(CBotStack* &pj)
@@ -638,7 +650,7 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
BOOL bIntrincic = pClass->IsIntrinsic();
- // crée la variable de type pointeur à l'objet
+ // cr�e la variable de type pointeur � l'objet
if ( pile->GivState()==0)
{
@@ -652,7 +664,7 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
pThis = CBotVar::Create(name, CBotTypResult( CBotTypPointer, pClass ));
}
- pThis->SetUniqNum(((CBotLeftExprVar*)m_var)->m_nIdent); // lui attribut un numéro unique
+ pThis->SetUniqNum(((CBotLeftExprVar*)m_var)->m_nIdent); // lui attribut un num�ro unique
pile->AddVar(pThis); // la place sur la pile
pile->IncState();
}
@@ -661,13 +673,13 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
if ( pile->GivState()<3)
{
- // y a-t-il une assignation ou des paramètres (constructeur)
+ // y a-t-il une assignation ou des param�tres (constructeur)
// CBotVarClass* pInstance = NULL;
if ( m_expr != NULL )
{
- // évalue l'expression pour l'assignation
+ // �value l'expression pour l'assignation
if (!m_expr->Execute(pile)) return FALSE;
if ( bIntrincic )
@@ -691,14 +703,14 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
else if ( m_hasParams )
{
- // évalue le constructeur d'une instance
+ // �value le constructeur d'une instance
if ( !bIntrincic && pile->GivState() == 1)
{
CBotToken* pt = &m_token;
CBotClass* pClass = CBotClass::Find(pt);
- // crée une instance de la classe demandée
+ // cr�e une instance de la classe demand�e
CBotVarClass* pInstance;
pInstance = (CBotVarClass*)CBotVar::Create("", pClass);
@@ -714,13 +726,13 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile2 = pile2->AddStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->AddStack(); // de la place sur la pile pour les r�sultats
if ( pile2->GivState() == 0 )
{
if (!p->Execute(pile2)) return FALSE; // interrompu ici ?
@@ -732,7 +744,7 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
}
ppVars[i] = NULL;
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* pResult = NULL; // constructeurs toujours void
if ( !pClass->ExecuteMethode(m_nMethodeIdent, pClass->GivName(),
@@ -740,8 +752,8 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
pResult, pile2, GivToken())) return FALSE; // interrompu
pThis->SetInit(TRUE);
- pThis->ConstructorSet(); // signale que le constructeur a été appelé
- pile->Return(pile2); // libère un bout de pile
+ pThis->ConstructorSet(); // signale que le constructeur a �t� appel�
+ pile->Return(pile2); // lib�re un bout de pile
// pInstance = pThis->GivPointer();
@@ -755,7 +767,7 @@ BOOL CBotClassInst::Execute(CBotStack* &pj)
if ( pile->IfStep() ) return FALSE;
if ( m_next2b != NULL &&
- !m_next2b->Execute(pile)) return FALSE; // autre(s) définition(s)
+ !m_next2b->Execute(pile)) return FALSE; // autre(s) d�finition(s)
return pj->Return( pile ); // transmet en dessous
}
@@ -770,11 +782,11 @@ void CBotClassInst::RestoreState(CBotStack* &pj, BOOL bMain)
if ( bMain ) pile = pj->RestoreStack(this);
if ( pile == NULL ) return;
- // crée la variable de type pointeur à l'objet
+ // cr�e la variable de type pointeur � l'objet
{
CBotString name = m_var->m_token.GivString();
pThis = pile->FindVar(name);
- pThis->SetUniqNum(((CBotLeftExprVar*)m_var)->m_nIdent); // lui attribut un numéro unique
+ pThis->SetUniqNum(((CBotLeftExprVar*)m_var)->m_nIdent); // lui attribut un num�ro unique
}
CBotToken* pt = &m_token;
@@ -783,20 +795,20 @@ void CBotClassInst::RestoreState(CBotStack* &pj, BOOL bMain)
if ( bMain && pile->GivState()<3)
{
- // y a-t-il une assignation ou des paramètres (constructeur)
+ // y a-t-il une assignation ou des param�tres (constructeur)
// CBotVarClass* pInstance = NULL;
if ( m_expr != NULL )
{
- // évalue l'expression pour l'assignation
+ // �value l'expression pour l'assignation
m_expr->RestoreState(pile, bMain);
return;
}
else if ( m_hasParams )
{
- // évalue le constructeur d'une instance
+ // �value le constructeur d'une instance
if ( !bIntrincic && pile->GivState() == 1)
{
@@ -809,13 +821,13 @@ void CBotClassInst::RestoreState(CBotStack* &pj, BOOL bMain)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile2 = pile2->RestoreStack(); // de la place sur la pile pour les résultats
+ pile2 = pile2->RestoreStack(); // de la place sur la pile pour les r�sultats
if ( pile2 == NULL ) return;
if ( pile2->GivState() == 0 )
@@ -829,7 +841,7 @@ void CBotClassInst::RestoreState(CBotStack* &pj, BOOL bMain)
}
ppVars[i] = NULL;
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* pResult = NULL; // constructeurs toujours void
pClass->RestoreMethode(m_nMethodeIdent, pClass->GivName(), pThis, ppVars, pile2);
@@ -838,11 +850,11 @@ void CBotClassInst::RestoreState(CBotStack* &pj, BOOL bMain)
}
if ( m_next2b != NULL )
- m_next2b->RestoreState(pile, bMain); // autre(s) définition(s)
+ m_next2b->RestoreState(pile, bMain); // autre(s) d�finition(s)
}
-// test si un nom de procédure est déjà défini quelque part
+// test si un nom de proc�dure est d�j� d�fini quelque part
BOOL CBotClass::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
{
@@ -855,7 +867,7 @@ BOOL CBotClass::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
{
if ( pToken->GivString() == pp->GivName() )
{
- // les paramètres sont-ils exactement les mêmes ?
+ // les param�tres sont-ils exactement les m�mes ?
if ( pp->CheckParam( pParam ) )
return TRUE;
}
diff --git a/src/CBot/CBotCompExpr.cpp b/src/CBot/CBotCompExpr.cpp
index 99abfb9..7618e4a 100644
--- a/src/CBot/CBotCompExpr.cpp
+++ b/src/CBot/CBotCompExpr.cpp
@@ -1,7 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 > Opérande2
-// Opérande1 != Opérande2
-// etc.
+// * 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 .
#include "CBot.h"
@@ -28,7 +39,7 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotCStack* pStk = pStack->AddStack();
- CBotInstr* left = CBotAddExpr::Compile( p, pStk ); // expression A + B à gauche
+ CBotInstr* left = CBotAddExpr::Compile( p, pStk ); // expression A + B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // erreur
if ( p->GetType() == ID_HI ||
@@ -38,22 +49,22 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
p->GetType() == ID_EQ ||
p->GetType() == ID_NE) // les diverses comparaisons
{
- CBotCompExpr* inst = new CBotCompExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotCompExpr* inst = new CBotCompExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
int type1, type2;
type1 = pStack->GetType();
p = p->Next();
- if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression A + B à droite
+ if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression A + B � droite
{
type2 = pStack->GetType();
- // les résultats sont-ils compatibles
+ // les r�sultats sont-ils compatibles
if ( type1 == type2 )
{
inst->m_leftop = left;
pStk->SetVar(new CBotVar(NULL, CBotTypBoolean));
- // le résultat est un boolean
+ // le r�sultat est un boolean
return pStack->Return(inst, pStk);
}
}
@@ -67,7 +78,7 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
}
-// fait l'opération
+// fait l'op�ration
BOOL CBotCompExpr::Execute(CBotStack* &pStack)
{
@@ -76,9 +87,9 @@ BOOL CBotCompExpr::Execute(CBotStack* &pStack)
if ( pStk1->GetState() == 0 && !m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- pStk1->SetState(1); // opération terminée
+ pStk1->SetState(1); // op�ration termin�e
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
CBotStack* pStk2 = pStk1->AddStack();
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
@@ -91,27 +102,27 @@ BOOL CBotCompExpr::Execute(CBotStack* &pStack)
switch (GetTokenType())
{
case ID_LO:
- result->Lo(pStk1->GetVar(), pStk2->GetVar()); // inférieur
+ result->Lo(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur
break;
case ID_HI:
- result->Hi(pStk1->GetVar(), pStk2->GetVar()); // supérieur
+ result->Hi(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur
break;
case ID_LS:
- result->Ls(pStk1->GetVar(), pStk2->GetVar()); // inférieur ou égal
+ result->Ls(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur ou �gal
break;
case ID_HS:
- result->Hs(pStk1->GetVar(), pStk2->GetVar()); // supérieur ou égal
+ result->Hs(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur ou �gal
break;
case ID_EQ:
- result->Eq(pStk1->GetVar(), pStk2->GetVar()); // égal
+ result->Eq(pStk1->GetVar(), pStk2->GetVar()); // �gal
break;
case ID_NE:
- result->Ne(pStk1->GetVar(), pStk2->GetVar()); // différent
+ result->Ne(pStk1->GetVar(), pStk2->GetVar()); // diff�rent
break;
}
- pStk2->SetVar(result); // met le résultat sur la pile
+ pStk2->SetVar(result); // met le r�sultat sur la pile
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/CBotDll.h b/src/CBot/CBotDll.h
index 4e0c5b1..973ccdb 100644
--- a/src/CBot/CBotDll.h
+++ b/src/CBot/CBotDll.h
@@ -1,7 +1,18 @@
-////////////////////////////////////////////////////////////////////////
-// Librairie pour l'interprétation du language CBOT
-// pour le jeu COLOBOT
-//
+// * 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 .
//#include "stdafx.h"
@@ -13,26 +24,26 @@
#define CBOTVERSION 104
////////////////////////////////////////////////////////////////////////
-// quelques classes définies par ailleurs
+// quelques classes d�finies par ailleurs
-class CBotToken; // programme transformé en "jetons"
-class CBotStack; // pile pour l'exécution
+class CBotToken; // programme transform� en "jetons"
+class CBotStack; // pile pour l'ex�cution
class CBotClass; // classe d'object
-class CBotInstr; // instruction à exécuter
+class CBotInstr; // instruction � ex�cuter
class CBotFunction; // les fonctions user
class CBotVar; // les variables
class CBotVarClass; // une instance de classe
-class CBotVarPointer; // pointeur à une instance de classe
+class CBotVarPointer; // pointeur � une instance de classe
class CBotCall; // les fonctions
-class CBotCallMethode; // les méthodes
-class CBotDefParam; // liste de paramètres
+class CBotCallMethode; // les m�thodes
+class CBotDefParam; // liste de param�tres
////////////////////////////////////////////////////////////////////////
// Gestion des variables
////////////////////////////////////////////////////////////////////////
-// ces types sont calqués sur les types Java
+// ces types sont calqu�s sur les types Java
// ne pas changer l'ordre de ces types
enum CBotType
@@ -40,24 +51,24 @@ enum CBotType
CBotTypVoid = 0, // fonction retournant void
CBotTypByte = 1, //n // nombre entier ( 8 bits)
CBotTypShort = 2, //n // nombre entier (16 bits)
- CBotTypChar = 3, //n // caractère "unicode" (16 bits)
+ CBotTypChar = 3, //n // caract�re "unicode" (16 bits)
CBotTypInt = 4, // nombre entier (32 bits)
CBotTypLong = 5, //n // nombre entier (64 bits)
- CBotTypFloat = 6, // nombre décimal (32 bits)
- CBotTypDouble = 7, //n // nombre décimal (64 bits)
+ CBotTypFloat = 6, // nombre d�cimal (32 bits)
+ CBotTypDouble = 7, //n // nombre d�cimal (64 bits)
CBotTypBoolean = 8, // true ou false exclusivement
- CBotTypString = 9, // chaine de caractère
+ CBotTypString = 9, // chaine de caract�re
CBotTypArrayPointer = 10, // un tableau de variables
- CBotTypArrayBody = 11, // idem mais crée l'instance
+ CBotTypArrayBody = 11, // idem mais cr�e l'instance
- CBotTypPointer = 12, // pointeur à une instance
- CBotTypNullPointer = 13, // pointeur null est spécial
+ CBotTypPointer = 12, // pointeur � une instance
+ CBotTypNullPointer = 13, // pointeur null est sp�cial
CBotTypClass = 15, // instance d'une classe
- CBotTypIntrinsic = 16 // instance d'une classe intrinsèque
+ CBotTypIntrinsic = 16 // instance d'une classe intrins�que
};
- //n = non encore implémenté
+ //n = non encore impl�ment�
// pour SetUserPtr lors de la suppression d'un objet
#define OBJECTDELETED ((void*)-1)
@@ -65,13 +76,13 @@ enum CBotType
#define OBJECTCREATED ((void*)-2)
-// classe permettant de définir le type complet d'un résultat
+// classe permettant de d�finir le type complet d'un r�sultat
class CBotTypResult
{
private:
int m_type;
CBotTypResult* m_pNext; // pour les types de types
- CBotClass* m_pClass; // pour les dérivés de classe
+ CBotClass* m_pClass; // pour les d�riv�s de classe
int m_limite; // limitation des tableaux
friend class CBotVarClass;
friend class CBotVarPointer;
@@ -80,13 +91,13 @@ public:
// divers constructeurs selon les besoins
DllExport
CBotTypResult(int type);
- // pour les types simples (CBotTypInt à CBotTypString)
+ // pour les types simples (CBotTypInt � CBotTypString)
DllExport
CBotTypResult(int type, const char* name);
// pour les types pointeur et classe intrinsic
DllExport
CBotTypResult(int type, CBotClass* pClass);
- // idem à partir de l'instance d'une classe
+ // idem � partir de l'instance d'une classe
DllExport
CBotTypResult(int type, CBotTypResult elem);
// pour les tableaux de variables
@@ -96,20 +107,20 @@ public:
// pour les assignations
DllExport
CBotTypResult();
- // pour par défaut
+ // pour par d�faut
DllExport
~CBotTypResult();
DllExport
int GivType(int mode = 0);
- // rend le type CBotTyp* du résultat
+ // rend le type CBotTyp* du r�sultat
void SetType(int n);
// modifie le type
DllExport
CBotClass* GivClass();
- // rend le pointeur à la classe (pour les CBotTypClass, CBotTypPointer)
+ // rend le pointeur � la classe (pour les CBotTypClass, CBotTypPointer)
DllExport
int GivLimite();
@@ -124,7 +135,7 @@ public:
DllExport
CBotTypResult& GivTypElem();
- // rend le type des éléments du tableau (CBotTypArray)
+ // rend le type des �l�ments du tableau (CBotTypArray)
DllExport
BOOL Compare(CBotTypResult& typ);
@@ -140,7 +151,7 @@ public:
};
/*
-// pour définir un résultat en sortie, utiliser par exemple
+// pour d�finir un r�sultat en sortie, utiliser par exemple
// pour rendre un simple Float
return CBotTypResult( CBotTypFloat );
@@ -157,16 +168,16 @@ public:
////////////////////////////////////////////////////////////////////////
-// Gestion des erreurs compilation et exécution
+// Gestion des erreurs compilation et ex�cution
////////////////////////////////////////////////////////////////////////
-// voici la liste des erreurs pouvant être retournées par le module
+// voici la liste des erreurs pouvant �tre retourn�es par le module
// pour la compilation
-#define CBotErrOpenPar 5000 // manque la parenthèse ouvrante
-#define CBotErrClosePar 5001 // manque la parenthèse fermante
-#define CBotErrNotBoolean 5002 // l'expression doit être un boolean
-#define CBotErrUndefVar 5003 // variable non déclarée
+#define CBotErrOpenPar 5000 // manque la parenth�se ouvrante
+#define CBotErrClosePar 5001 // manque la parenth�se fermante
+#define CBotErrNotBoolean 5002 // l'expression doit �tre un boolean
+#define CBotErrUndefVar 5003 // variable non d�clar�e
#define CBotErrBadLeft 5004 // assignation impossible ( 5 = ... )
#define CBotErrNoTerminator 5005 // point-virgule attendu
#define CBotErrCaseOut 5006 // case en dehors d'un switch
@@ -175,8 +186,8 @@ public:
#define CBotErrElseWhitoutIf 5009 // else sans if correspondant
#define CBotErrOpenBlock 5010 // manque " { "
#define CBotErrBadType1 5011 // mauvais type pour l'assignation
-#define CBotErrRedefVar 5012 // redéfinition de la variable
-#define CBotErrBadType2 5013 // 2 opérandes de type incompatibles
+#define CBotErrRedefVar 5012 // red�finition de la variable
+#define CBotErrBadType2 5013 // 2 op�randes de type incompatibles
#define CBotErrUndefCall 5014 // routine inconnue
#define CBotErrNoDoubleDots 5015 // " : " attendu
// CBotErrWhile 5016, plus utile
@@ -186,63 +197,63 @@ public:
#define CBotErrNoCase 5020 // manque " case "
#define CBotErrBadNum 5021 // nombre attendu
#define CBotErrVoid 5022 // " void " pas possible ici
-#define CBotErrNoType 5023 // déclaration de type attendue
+#define CBotErrNoType 5023 // d�claration de type attendue
#define CBotErrNoVar 5024 // nom de variable attendu
#define CBotErrNoFunc 5025 // nom de fonction attendu
-#define CBotErrOverParam 5026 // trop de paramètres
-#define CBotErrRedefFunc 5027 // cette fonction existe déjà
-#define CBotErrLowParam 5028 // pas assez de paramètres
-#define CBotErrBadParam 5029 // mauvais types de paramètres
-#define CBotErrNbParam 5030 // mauvais nombre de paramètres
-#define CBotErrUndefItem 5031 // élément n'existe pas dans la classe
+#define CBotErrOverParam 5026 // trop de param�tres
+#define CBotErrRedefFunc 5027 // cette fonction existe d�j�
+#define CBotErrLowParam 5028 // pas assez de param�tres
+#define CBotErrBadParam 5029 // mauvais types de param�tres
+#define CBotErrNbParam 5030 // mauvais nombre de param�tres
+#define CBotErrUndefItem 5031 // �l�ment n'existe pas dans la classe
#define CBotErrUndefClass 5032 // variable n'est pas une classe
-#define CBotErrNoConstruct 5033 // pas de constructeur approprié
-#define CBotErrRedefClass 5034 // classe existe déjà
+#define CBotErrNoConstruct 5033 // pas de constructeur appropri�
+#define CBotErrRedefClass 5034 // classe existe d�j�
#define CBotErrCloseIndex 5035 // " ] " attendu
-#define CBotErrReserved 5036 // mot réservé (par un DefineNum)
-#define CBotErrBadNew 5037 // mauvais paramètre pour new
+#define CBotErrReserved 5036 // mot r�serv� (par un DefineNum)
+#define CBotErrBadNew 5037 // mauvais param�tre pour new
#define CBotErrOpenIndex 5038 // " [ " attendu
-#define CBotErrBadString 5039 // chaîne de caractère attendue
+#define CBotErrBadString 5039 // cha�ne de caract�re attendue
#define CBotErrBadIndex 5040 // mauvais type d'index "[ false ]"
-#define CBotErrPrivate 5041 // élément protégé
+#define CBotErrPrivate 5041 // �l�ment prot�g�
#define CBotErrNoPublic 5042 // manque le mot "public"
-// voici la liste des erreurs pouvant être retournées par le module
-// pour l'exécution
+// voici la liste des erreurs pouvant �tre retourn�es par le module
+// pour l'ex�cution
-#define CBotErrZeroDiv 6000 // division par zéro
-#define CBotErrNotInit 6001 // variable non initialisée
-#define CBotErrBadThrow 6002 // throw d'une valeur négative
-#define CBotErrNoRetVal 6003 // fonction n'a pas retourné de résultat
+#define CBotErrZeroDiv 6000 // division par z�ro
+#define CBotErrNotInit 6001 // variable non initialis�e
+#define CBotErrBadThrow 6002 // throw d'une valeur n�gative
+#define CBotErrNoRetVal 6003 // fonction n'a pas retourn� de r�sultat
#define CBotErrNoRun 6004 // Run() sans fonction active
#define CBotErrUndefFunc 6005 // appel d'une fonction qui n'existe plus
#define CBotErrNotClass 6006 // cette classe n'existe pas
#define CBotErrNull 6007 // pointeur null
#define CBotErrNan 6008 // calcul avec un NAN
#define CBotErrOutArray 6009 // index hors du tableau
-#define CBotErrStackOver 6010 // dépassement de la pile
-#define CBotErrDeletedPtr 6011 // pointeur à un objet détruit
+#define CBotErrStackOver 6010 // d�passement de la pile
+#define CBotErrDeletedPtr 6011 // pointeur � un objet d�truit
#define CBotErrFileOpen 6012 // ouverture du fichier impossible
#define CBotErrNotOpen 6013 // canal pas ouvert
-#define CBotErrRead 6014 // erreur à la lecture
-#define CBotErrWrite 6015 // erreur à l'écriture
+#define CBotErrRead 6014 // erreur � la lecture
+#define CBotErrWrite 6015 // erreur � l'�criture
-// d'autres valeurs peuvent être rendues
+// d'autres valeurs peuvent �tre rendues
// par exemple les exceptions rendues par les routines externes
// et les " throw " avec un nombre quelconque.
////////////////////////////////////////////////////////////////////////
-// définie une classe pour l'utilisation des strings
-// car CString fait partie de MFC pas utilisé ici.
+// d�finie une classe pour l'utilisation des strings
+// car CString fait partie de MFC pas utilis� ici.
//
-// ( toutes les fonctions ne sont pas encore implémentées )
+// ( toutes les fonctions ne sont pas encore impl�ment�es )
class CBotString
{
private:
- char* m_ptr; // pointeur à la chaine
+ char* m_ptr; // pointeur � la chaine
int m_lg; // longueur de la chaine
static
HINSTANCE m_hInstance;
@@ -349,9 +360,9 @@ public:
class CBotStringArray : public CBotString
{
private:
- int m_nSize; // nombre d'éléments
- int m_nMaxSize; // taille réservée
- CBotString* m_pData; // ^aux données
+ int m_nSize; // nombre d'�l�ments
+ int m_nMaxSize; // taille r�serv�e
+ CBotString* m_pData; // ^aux donn�es
public:
DllExport
@@ -371,7 +382,7 @@ public:
CBotString& ElementAt(int nIndex);
};
-// différents mode pour GetPosition
+// diff�rents mode pour GetPosition
enum CBotGet
{
GetPosExtern = 1,
@@ -381,16 +392,16 @@ enum CBotGet
};
////////////////////////////////////////////////////////////////////
-// classe principale gérant un programme CBot
+// classe principale g�rant un programme CBot
//
class CBotProgram
{
private:
- CBotFunction* m_Prog; // les fonctions définies par l'utilisateur
- CBotFunction* m_pRun; // la fonction de base pour l'exécution
- CBotClass* m_pClass; // les classes définies dans cette partie
- CBotStack* m_pStack; // la pile d'exécution
+ CBotFunction* m_Prog; // les fonctions d�finies par l'utilisateur
+ CBotFunction* m_pRun; // la fonction de base pour l'ex�cution
+ CBotClass* m_pClass; // les classes d�finies dans cette partie
+ CBotStack* m_pStack; // la pile d'ex�cution
CBotVar* m_pInstance; // instance de la classe parent
friend class CBotFunction;
@@ -398,12 +409,12 @@ private:
int m_ErrorStart;
int m_ErrorEnd;
- long m_Ident; // identificateur associé
+ long m_Ident; // identificateur associ�
public:
static
CBotString m_DebugVarStr; // a fin de debug
- BOOL m_bDebugDD; // idem déclanchable par robot
+ BOOL m_bDebugDD; // idem d�clanchable par robot
BOOL m_bCompileClass;
@@ -411,12 +422,12 @@ public:
DllExport
static
void Init();
- // initialise le module (défini les mots clefs pour les erreurs)
- // doit être fait une fois (et une seule) au tout début
+ // initialise le module (d�fini les mots clefs pour les erreurs)
+ // doit �tre fait une fois (et une seule) au tout d�but
DllExport
static
void Free();
- // libère les zones mémoires statiques
+ // lib�re les zones m�moires statiques
DllExport
static
@@ -433,11 +444,11 @@ public:
DllExport
BOOL Compile( const char* program, CBotStringArray& ListFonctions, void* pUser = NULL);
- // compile le programme donné en texte
- // retourne FALSE s'il y a une erreur à la compilation
- // voir GetCompileError() pour récupérer l'erreur
- // ListFonctions retourne le nom des fonctions déclarées extern
- // pUser permet de passer un pointeur pour les routines définies par AddFunction
+ // compile le programme donn� en texte
+ // retourne FALSE s'il y a une erreur � la compilation
+ // voir GetCompileError() pour r�cup�rer l'erreur
+ // ListFonctions retourne le nom des fonctions d�clar�es extern
+ // pUser permet de passer un pointeur pour les routines d�finies par AddFunction
DllExport
void SetIdent(long n);
@@ -454,10 +465,10 @@ public:
DllExport
BOOL GetError(int& code, int& start, int& end, CBotProgram* &pProg);
// si TRUE
- // donne l'erreur trouvée à la compilation
- // ou à l'exécution
- // start et end délimite le bloc où se trouve l'erreur
- // pProg permet de savoir dans quel "module" s'est produite l'erreur d'exécution
+ // donne l'erreur trouv�e � la compilation
+ // ou � l'ex�cution
+ // start et end d�limite le bloc o� se trouve l'erreur
+ // pProg permet de savoir dans quel "module" s'est produite l'erreur d'ex�cution
DllExport
static
CBotString GivErrorText(int code);
@@ -465,42 +476,42 @@ public:
DllExport
BOOL Start(const char* name);
- // définie quelle fonction doit être exécutée
- // retourne FALSE si la fontion name n'est pas trouvée
+ // d�finie quelle fonction doit �tre ex�cut�e
+ // retourne FALSE si la fontion name n'est pas trouv�e
// le programme ne fait rien, il faut appeller Run() pour cela
DllExport
BOOL Run(void* pUser = NULL, int timer = -1);
- // exécute le programme
- // retourne FALSE si le programme a été suspendu
- // retourne TRUE si le programme s'est terminé avec ou sans erreur
- // timer = 0 permet de faire une avance pas à pas
+ // ex�cute le programme
+ // retourne FALSE si le programme a �t� suspendu
+ // retourne TRUE si le programme s'est termin� avec ou sans erreur
+ // timer = 0 permet de faire une avance pas � pas
DllExport
BOOL GetRunPos(const char* &FunctionName, int &start, int &end);
- // donne la position dans le programme en exécution
- // retourne FALSE si on n'est pas en exécution (programme terminé)
+ // donne la position dans le programme en ex�cution
+ // retourne FALSE si on n'est pas en ex�cution (programme termin�)
// FunctionName est un pointeur rendu sur le nom de la fonction
// start et end la position dans le texte du token en traitement
DllExport
CBotVar* GivStackVars(const char* &FunctionName, int level);
- // permet d'obtenir le pointeur aux variables sur la pile d'exécution
- // level est un paramètre d'entrée, 0 pour le dernier niveau, -1, -2, etc pour les autres niveau
- // la valeur retournée (CBotVar*) est une liste de variable (ou NULL)
- // qui peut être traité que la liste des paramètres reçu par une routine
- // FunctionName donne le nom de la fonction où se trouvent ces variables
+ // permet d'obtenir le pointeur aux variables sur la pile d'ex�cution
+ // level est un param�tre d'entr�e, 0 pour le dernier niveau, -1, -2, etc pour les autres niveau
+ // la valeur retourn�e (CBotVar*) est une liste de variable (ou NULL)
+ // qui peut �tre trait� que la liste des param�tres re�u par une routine
+ // FunctionName donne le nom de la fonction o� se trouvent ces variables
// FunctionName == NULL signifiant qu'on est plus dans le programme (selon level)
DllExport
void Stop();
- // arrête l'exécution du programme
+ // arr�te l'ex�cution du programme
// quitte donc le mode "suspendu"
DllExport
static
void SetTimer(int n);
- // défini le nombre de pas (parties d'instructions) à faire
+ // d�fini le nombre de pas (parties d'instructions) � faire
// dans Run() avant de rendre la main "FALSE"
DllExport
@@ -508,7 +519,7 @@ public:
BOOL AddFunction(const char* name,
BOOL rExec (CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser),
CBotTypResult rCompile (CBotVar* &pVar, void* pUser));
- // cet appel permet d'ajouter de manière externe (**)
+ // cet appel permet d'ajouter de mani�re externe (**)
// une nouvelle fonction utilisable par le programme CBot
DllExport
@@ -517,20 +528,20 @@ public:
DllExport
BOOL SaveState(FILE* pf);
- // sauvegarde l'état d'exécution dans le fichier
- // le fichier doit avoir été ouvert avec l'appel fopen de cette dll
- // sinon le système plante
+ // sauvegarde l'�tat d'ex�cution dans le fichier
+ // le fichier doit avoir �t� ouvert avec l'appel fopen de cette dll
+ // sinon le syst�me plante
DllExport
BOOL RestoreState(FILE* pf);
- // rétablie l'état de l'exécution depuis le fichier
- // le programme compilé doit évidemment être identique
+ // r�tablie l'�tat de l'ex�cution depuis le fichier
+ // le programme compil� doit �videmment �tre identique
DllExport
BOOL GetPosition(const char* name, int& start, int& stop,
CBotGet modestart = GetPosExtern,
CBotGet modestop = GetPosBloc);
// donne la position d'une routine dans le texte d'origine
- // le mode permet de choisir l'élément à trouver pour le début et la fin
+ // le mode permet de choisir l'�l�ment � trouver pour le d�but et la fin
// voir les modes ci-dessus dans CBotGet
@@ -553,21 +564,21 @@ public:
#if 0
/*
(**) Note:
- Pour définir une fonction externe, il faut procéder ainsi:
+ Pour d�finir une fonction externe, il faut proc�der ainsi:
- a) définir une routine pour la compilation
- cette routine reçois la liste des paramètres (sans valeurs)
- et retourne soit un type de résultat (CBotTyp... ou 0 = void)
- soit un numéro d'erreur
- b) définir une routine pour l'exécution
- cette rourine reCoit la liste des paramètres (avec valeurs),
- une variable pour stocker le résultat (selon le type donné à la compilation)
+ a) d�finir une routine pour la compilation
+ cette routine re�ois la liste des param�tres (sans valeurs)
+ et retourne soit un type de r�sultat (CBotTyp... ou 0 = void)
+ soit un num�ro d'erreur
+ b) d�finir une routine pour l'ex�cution
+ cette rourine reCoit la liste des param�tres (avec valeurs),
+ une variable pour stocker le r�sultat (selon le type donn� � la compilation)
- Par exemple, une routine qui calcule la moyenne d'une liste de paramètres */
+ Par exemple, une routine qui calcule la moyenne d'une liste de param�tres */
int cMoyenne(CBotVar* &pVar, CBotString& ClassName)
{
- if ( pVar == NULL ) return 6001; // il n'y a aucun paramètre !
+ if ( pVar == NULL ) return 6001; // il n'y a aucun param�tre !
while ( pVar != NULL )
{
@@ -575,7 +586,7 @@ int cMoyenne(CBotVar* &pVar, CBotString& ClassName)
pVar = pVar -> GivNext();
}
- return CBotTypFloat; // le type du résultat pourrait dépendre des paramètres !
+ return CBotTypFloat; // le type du r�sultat pourrait d�pendre des param�tres !
}
@@ -591,7 +602,7 @@ BOOL rMoyenne(CBotVar* pVar, CBotVar* pResult, int& Exception)
}
pResult->SetValFloat(total/nb); // retourne la valeur moyenne
- return TRUE; // opération totalement terminée
+ return TRUE; // op�ration totalement termin�e
}
#endif
@@ -599,20 +610,20 @@ BOOL rMoyenne(CBotVar* pVar, CBotVar* pResult, int& Exception)
/////////////////////////////////////////////////////////////////////////////////
// Classe pour la gestion des variables
-// les méthodes marquées DllExport
-// peuvent être utile à l'exterieur du module
-// ( il n'est pour l'instant pas prévu de pouvoir créer ces objets en externe )
+// les m�thodes marqu�es DllExport
+// peuvent �tre utile � l'exterieur du module
+// ( il n'est pour l'instant pas pr�vu de pouvoir cr�er ces objets en externe )
-// résultats pour GivInit()
-#define IS_UNDEF 0 // variable indéfinie
-#define IS_DEF 1 // variable définie
-#define IS_NAN 999 // variable définie comme étant not a number
+// r�sultats pour GivInit()
+#define IS_UNDEF 0 // variable ind�finie
+#define IS_DEF 1 // variable d�finie
+#define IS_NAN 999 // variable d�finie comme �tant not a number
// type de variable SetPrivate / IsPrivate
#define PR_PUBLIC 0 // variable publique
#define PR_READ 1 // read only
-#define PR_PROTECT 2 // protected (héritage)
-#define PR_PRIVATE 3 // strictement privée
+#define PR_PROTECT 2 // protected (h�ritage)
+#define PR_PRIVATE 3 // strictement priv�e
class CBotVar
{
@@ -627,11 +638,11 @@ protected:
CBotTypResult m_type; // type de valeur
- int m_binit; // pas initialisée ?
- CBotVarClass* m_pMyThis; // ^élément this correspondant
- void* m_pUserPtr; // ^données user s'il y a lieu
- BOOL m_bStatic; // élément static (dans une classe)
- int m_mPrivate; // élément public, protected ou private ?
+ int m_binit; // pas initialis�e ?
+ CBotVarClass* m_pMyThis; // ^�l�ment this correspondant
+ void* m_pUserPtr; // ^donn�es user s'il y a lieu
+ BOOL m_bStatic; // �l�ment static (dans une classe)
+ int m_mPrivate; // �l�ment public, protected ou private ?
CBotInstr* m_InitExpr; // expression pour le contenu initial
CBotInstr* m_LimExpr; // liste des limites pour un tableau
@@ -651,12 +662,12 @@ virtual ~CBotVar( ); // destructeur
/* DllExport
static
CBotVar* Create( const char* name, int type, const char* ClassName = NULL);
- // crée une variable selon son type,*/
+ // cr�e une variable selon son type,*/
DllExport
static
CBotVar* Create( const char* name, CBotTypResult type);
- // idem à partir du type complet
+ // idem � partir du type complet
DllExport
static
@@ -677,16 +688,16 @@ virtual ~CBotVar( ); // destructeur
DllExport
void SetUserPtr(void* pUser);
- // associe un pointeur utilisateur à une instance
+ // associe un pointeur utilisateur � une instance
DllExport
virtual void SetIdent(long UniqId);
- // associe un identificateur unique à une instance
- // ( c'est à l'utilisateur de s'assurer que l'id est unique)
+ // associe un identificateur unique � une instance
+ // ( c'est � l'utilisateur de s'assurer que l'id est unique)
DllExport
void* GivUserPtr();
- // rend le pointeur associé à la variable
+ // rend le pointeur associ� � la variable
DllExport
CBotString GivName(); // le nom de la variable, s'il est connu
@@ -705,10 +716,10 @@ virtual ~CBotVar( ); // destructeur
void SetType(CBotTypResult& type);
DllExport
- void SetInit(int bInit); // met la variable dans l'état IS_UNDEF, IS_DEF, IS_NAN
+ void SetInit(int bInit); // met la variable dans l'�tat IS_UNDEF, IS_DEF, IS_NAN
DllExport
- int GivInit(); // donne l'état de la variable
+ int GivInit(); // donne l'�tat de la variable
DllExport
void SetStatic(BOOL bStatic);
@@ -729,9 +740,9 @@ virtual ~CBotVar( ); // destructeur
DllExport
virtual
- CBotVar* GivItem(const char* name); // rend un élément d'une classe selon son nom (*)
+ CBotVar* GivItem(const char* name); // rend un �l�ment d'une classe selon son nom (*)
virtual
- CBotVar* GivItemRef(int nIdent); // idem à partir du n° ref
+ CBotVar* GivItemRef(int nIdent); // idem � partir du n� ref
DllExport
virtual
@@ -739,18 +750,18 @@ virtual ~CBotVar( ); // destructeur
DllExport
virtual
- CBotVar* GivItemList(); // donne la liste des éléments
+ CBotVar* GivItemList(); // donne la liste des �l�ments
DllExport
- CBotVar* GivStaticVar(); // rend le pointeur à la variable si elle est statique
+ CBotVar* GivStaticVar(); // rend le pointeur � la variable si elle est statique
DllExport
BOOL IsElemOfClass(const char* name);
- // dit si l'élément appartient à la classe "name"
+ // dit si l'�l�ment appartient � la classe "name"
// rend TRUE si l'objet est d'une classe fille
DllExport
- CBotVar* GivNext(); // prochaine variable dans la liste (paramètres)
+ CBotVar* GivNext(); // prochaine variable dans la liste (param�tres)
////////////////////////////////////////////////////////////////////////////////////////////
void AddNext(CBotVar* pVar); // ajoute dans une liste
@@ -760,27 +771,27 @@ virtual ~CBotVar( ); // destructeur
DllExport
virtual void SetValInt(int val, const char* name = NULL);
- // initialise avec une valeur entière (#)
+ // initialise avec une valeur enti�re (#)
/////////////////////////////////////////////////////////////////////////////////
DllExport
- virtual void SetValFloat(float val); // initialise avec une valeur réelle (#)
+ virtual void SetValFloat(float val); // initialise avec une valeur r�elle (#)
////////////////////////////////////////////////////////////////////////////////
DllExport
- virtual void SetValString(const char* p);// initialise avec une valeur chaîne (#)
+ virtual void SetValString(const char* p);// initialise avec une valeur cha�ne (#)
////////////////////////////////////////////////////////////////////////////////
DllExport
- virtual int GivValInt(); // demande la valeur entière (#)
+ virtual int GivValInt(); // demande la valeur enti�re (#)
////////////////////////////////////////////////////////////////////////
DllExport
- virtual float GivValFloat(); // demande la valeur réelle (#)
+ virtual float GivValFloat(); // demande la valeur r�elle (#)
///////////////////////////////////////////////////////////////////////
virtual
- CBotString GivValString(); // demande la valeur chaîne (#)
+ CBotString GivValString(); // demande la valeur cha�ne (#)
///////////////////////////////////////////////////////////////////////
virtual void SetClass(CBotClass* pClass);
@@ -839,16 +850,16 @@ virtual ~CBotVar( ); // destructeur
};
/* NOTE (#)
- les méthodes SetValInt() SetValFloat() et SetValString()
- ne peuvent êtes appellées qu'avec des objets respectivement entier, réelle ou chaîne
- toujours s'assurer du type de la variable avant d'appeller ces méthodes
+ les m�thodes SetValInt() SetValFloat() et SetValString()
+ ne peuvent �tes appell�es qu'avec des objets respectivement entier, r�elle ou cha�ne
+ toujours s'assurer du type de la variable avant d'appeller ces m�thodes
if ( pVar->GivType() == CBotInt() ) pVar->SetValFloat( 3.3 ); // plante !!
- les méthodes GivValInt(), GivValFloat() et GivValString()
+ les m�thodes GivValInt(), GivValFloat() et GivValString()
font des conversions de valeur,
- GivValString() fonctionne sur des nombres (rend la chaîne correspondante)
- par contre il ne faut pas faire de GivValInt() avec une variable de type chaîne !
+ GivValString() fonctionne sur des nombres (rend la cha�ne correspondante)
+ par contre il ne faut pas faire de GivValInt() avec une variable de type cha�ne !
*/
@@ -857,41 +868,41 @@ virtual ~CBotVar( ); // destructeur
// Gestion des classes
////////////////////////////////////////////////////////////////////////
-// classe pour définir de nouvelle classes dans le language CBOT
-// par exemple pour définir la classe CPoint (x,y)
+// classe pour d�finir de nouvelle classes dans le language CBOT
+// par exemple pour d�finir la classe CPoint (x,y)
class CBotClass
{
private:
static
- CBotClass* m_ExClass; // liste des classes existante à un moment donné
- CBotClass* m_ExNext; // pour cette liste générale
- CBotClass* m_ExPrev; // pour cette liste générale
+ CBotClass* m_ExClass; // liste des classes existante � un moment donn�
+ CBotClass* m_ExNext; // pour cette liste g�n�rale
+ CBotClass* m_ExPrev; // pour cette liste g�n�rale
private:
CBotClass* m_pParent; // classe parent
CBotString m_name; // nom de cette classe-ci
- int m_nbVar; // nombre de variables dans la chaîne
+ int m_nbVar; // nombre de variables dans la cha�ne
CBotVar* m_pVar; // contenu de la classe
- BOOL m_bIntrinsic; // classe intrinsèque
+ BOOL m_bIntrinsic; // classe intrins�que
CBotClass* m_next; // chaine les classe
- CBotCallMethode* m_pCalls; // liste des méthodes définie en externe
- CBotFunction* m_pMethod; // liste des méthodes compilées
+ CBotCallMethode* m_pCalls; // liste des m�thodes d�finie en externe
+ CBotFunction* m_pMethod; // liste des m�thodes compil�es
void (*m_rMaj) ( CBotVar* pThis, void* pUser );
friend class CBotVarClass;
int m_cptLock; // pour Lock / UnLock
- int m_cptOne; // pour réentrance Lock
+ int m_cptOne; // pour r�entrance Lock
CBotProgram* m_ProgInLock[5];// processus en attente pour synchro
public:
- BOOL m_IsDef; // marque si est définie ou pas encore
+ BOOL m_IsDef; // marque si est d�finie ou pas encore
DllExport
CBotClass( const char* name,
CBotClass* pParent, BOOL bIntrinsic = FALSE ); // constructeur
- // Dès qu'une classe est créée, elle est connue
+ // D�s qu'une classe est cr��e, elle est connue
// partout dans CBot
- // le mode intrinsic donne une classe qui n'est pas gérée par des pointeurs
+ // le mode intrinsic donne une classe qui n'est pas g�r�e par des pointeurs
DllExport
~CBotClass( ); // destructeur
@@ -900,41 +911,41 @@ public:
BOOL AddFunction(const char* name,
BOOL rExec (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception),
CBotTypResult rCompile (CBotVar* pThis, CBotVar* &pVar));
- // cet appel permet d'ajouter de manière externe (**)
- // une nouvelle méthode utilisable par les objets de cette classe
+ // cet appel permet d'ajouter de mani�re externe (**)
+ // une nouvelle m�thode utilisable par les objets de cette classe
DllExport
BOOL AddUpdateFunc( void rMaj ( CBotVar* pThis, void* pUser ) );
- // défini la routine qui sera appellée pour mettre à jour les élements de la classe
+ // d�fini la routine qui sera appell�e pour mettre � jour les �lements de la classe
DllExport
BOOL AddItem(CBotString name, CBotTypResult type, int mPrivate = PR_PUBLIC);
- // ajoute un élément à la classe
+ // ajoute un �l�ment � la classe
// DllExport
// BOOL AddItem(CBotString name, CBotClass* pClass);
- // idem pour des éléments appartenant à pClass
+ // idem pour des �l�ments appartenant � pClass
DllExport
BOOL AddItem(CBotVar* pVar);
- // idem en passant le pointeur à une instance d'une variable
- // l'objet est pris tel quel, il ne faut donc pas le détruire
+ // idem en passant le pointeur � une instance d'une variable
+ // l'objet est pris tel quel, il ne faut donc pas le d�truire
- // idem en donnant un élément de type CBotVar
+ // idem en donnant un �l�ment de type CBotVar
void AddNext(CBotClass* pClass);
DllExport
CBotString GivName(); // rend le nom de la classe
DllExport
- CBotClass* GivParent(); // donne la classe père (ou NULL)
+ CBotClass* GivParent(); // donne la classe p�re (ou NULL)
- // dit si une classe est dérivée (Extends) d'une autre
+ // dit si une classe est d�riv�e (Extends) d'une autre
// rend TRUE aussi si les classes sont identiques
DllExport
BOOL IsChildOf(CBotClass* pClass);
static
- CBotClass* Find(CBotToken* &pToken); // trouve une classe d'après son nom
+ CBotClass* Find(CBotToken* &pToken); // trouve une classe d'apr�s son nom
DllExport
static
@@ -950,7 +961,7 @@ public:
BOOL ExecuteMethode(long& nIdent, const char* name, CBotVar* pThis, CBotVar** ppParams, CBotVar* &pResult, CBotStack* &pStack, CBotToken* pToken);
void RestoreMethode(long& nIdent, const char* name, CBotVar* pThis, CBotVar** ppParams, CBotStack* &pStack);
- // compile une classe déclarée par l'utilisateur
+ // compile une classe d�clar�e par l'utilisateur
static
CBotClass* Compile(CBotToken* &p, CBotCStack* pStack);
static
@@ -992,9 +1003,9 @@ public:
#define TokenTypDef 5 // une valeur selon DefineNum
#define TokenKeyWord 2000 // les mots clefs du langage
-#define TokenKeyDeclare 2100 // mots clefs pour déclarations (int, float,..)
-#define TokenKeyVal 2200 // les mots représentant une "valeur" (true, false, null, nan)
-#define TokenKeyOp 2300 // les opérateurs
+#define TokenKeyDeclare 2100 // mots clefs pour d�clarations (int, float,..)
+#define TokenKeyVal 2200 // les mots repr�sentant une "valeur" (true, false, null, nan)
+#define TokenKeyOp 2300 // les op�rateurs
class CBotToken
@@ -1006,19 +1017,19 @@ private:
int m_ListIdKeyWords[200]; // les codes correspondants
static
- CBotStringArray m_ListKeyDefine; // les noms définis par un DefineNum
+ CBotStringArray m_ListKeyDefine; // les noms d�finis par un DefineNum
static
- long m_ListKeyNums[MAXDEFNUM]; // les valeurs associées
+ long m_ListKeyNums[MAXDEFNUM]; // les valeurs associ�es
private:
CBotToken* m_next; // suivant dans la liste
CBotToken* m_prev;
int m_type; // type de Token
- long m_IdKeyWord; // numéro du mot clef si c'en est un
+ long m_IdKeyWord; // num�ro du mot clef si c'en est un
// ou valeur du "define"
- CBotString m_Text; // mot trouvé comme token
- CBotString m_Sep; // séparateurs qui suivent
+ CBotString m_Text; // mot trouv� comme token
+ CBotString m_Sep; // s�parateurs qui suivent
int m_start; // position dans le texte d'origine (programme)
int m_end; // itou pour la fin du token
@@ -1043,20 +1054,20 @@ public:
int GivType(); // rend le type du token
DllExport
- CBotString& GivString(); // rend la chaine correspondant à ce token
+ CBotString& GivString(); // rend la chaine correspondant � ce token
DllExport
- CBotString& GivSep(); // rend le séparateur suivant le token
+ CBotString& GivSep(); // rend le s�parateur suivant le token
DllExport
- int GivStart(); // position du début dans le texte
+ int GivStart(); // position du d�but dans le texte
DllExport
int GivEnd(); // position de fin dans le texte
DllExport
CBotToken* GivNext(); // rend le suivant dans la liste
DllExport
- CBotToken* GivPrev(); // rend le Précédent dans la liste
+ CBotToken* GivPrev(); // rend le Pr�c�dent dans la liste
DllExport
static
@@ -1064,7 +1075,7 @@ public:
// transforme tout le programme
DllExport
static
- void Delete(CBotToken* pToken); // libère la liste
+ void Delete(CBotToken* pToken); // lib�re la liste
// fonctions non utiles en export
@@ -1091,10 +1102,10 @@ public:
#if 0
////////////////////////////////////////////////////////////////////////
// Exemples d'utilisation
-// Définition de classes et de fonctions
+// D�finition de classes et de fonctions
-// définie la classe globale CPoint
+// d�finie la classe globale CPoint
// --------------------------------
m_pClassPoint = new CBotClass("CPoint", NULL);
// ajoute le composant ".x"
@@ -1104,17 +1115,17 @@ public:
// le joueur peut alors utiliser les instructions
// CPoint position; position.x = 12; position.y = -13.6
-// définie la classe CColobotObject
+// d�finie la classe CColobotObject
// --------------------------------
-// cette classe gère tous les objets dans le monde de COLOBOT
-// le programme utilisateur "main" appartient à cette classe
+// cette classe g�re tous les objets dans le monde de COLOBOT
+// le programme utilisateur "main" appartient � cette classe
m_pClassObject = new CBotClass("CColobotObject", m_pClassBase);
// ajoute le composant ".position"
m_pClassObject->AddItem("position", m_pClassPoint);
// ajoute le composant ".type"
m_pClassObject->AddItem("type", CBotTypResult(CBotTypShort));
- // ajoute une définition de constante
- m_pClassObject->AddConst("ROBOT", CBotTypShort, 1); // ROBOT équivalent à la valeur 1
+ // ajoute une d�finition de constante
+ m_pClassObject->AddConst("ROBOT", CBotTypShort, 1); // ROBOT �quivalent � la valeur 1
// ajoute la routine FIND
m_pClassObject->AddFunction( rCompFind, rDoFind );
// le joueur peut maintenant utiliser les instructions
@@ -1122,9 +1133,9 @@ public:
-// définie la classe CColobotRobot dérivée de CColobotObject
+// d�finie la classe CColobotRobot d�riv�e de CColobotObject
// ---------------------------------------------------------
-// les programmes "main" associés aux robots font partie de cette classe
+// les programmes "main" associ�s aux robots font partie de cette classe
m_pClassRobot = new CBotClass("CColobotRobot", m_pClassObject);
// ajoute la routine GOTO
m_pClassRobot->AddFunction( rCompGoto, rDoGoto );
@@ -1132,49 +1143,49 @@ public:
// GOTO( FIND ( ROBOT ) );
-// crée une instance de la classe Robot
+// cr�e une instance de la classe Robot
// ------------------------------------
-// par exemple un nouveau robot qui vient d'être fabriqué
+// par exemple un nouveau robot qui vient d'�tre fabriqu�
CBotVar* m_pMonRobot = new CBotVar("MonRobot", m_pClassRobot);
-// compile le programme main pour ce robot-là
+// compile le programme main pour ce robot-l�
// ------------------------------------------
CString LeProgramme( "void main() {GOTO(0, 0); return 0;}" );
if ( !m_pMonRobot->Compile( LeProgramme ) ) {gestion d'erreur...};
-// construit une pile pour l'interpréteur
+// construit une pile pour l'interpr�teur
// --------------------------------------
CBotStack* pStack = new CBotStack(NULL);
-// exécute le programme main
+// ex�cute le programme main
// -------------------------
while( FALSE = m_pMonRobot->Execute( "main", pStack ))
{
// programme suspendu
- // on pourrait passer la main à un autre (en sauvegardant pStack pour ce robot-là)
+ // on pourrait passer la main � un autre (en sauvegardant pStack pour ce robot-l�)
};
- // programme "main" terminé !
+ // programme "main" termin� !
-// routine implémentant l'instruction GOTO( CPoint pos )
+// routine impl�mentant l'instruction GOTO( CPoint pos )
BOOL rDoGoto( CBotVar* pVar, CBotVar* pResult, int& exception )
{
if (pVar->GivType() != CBotTypeClass ||
pVar->IsElemOfClas("CPoint") ) { exception = 6522; return FALSE; )
- // le paramètre n'est pas de la bonne classe ?
- // NB en fait ce contrôle est déjà fait par la routine pour la compilation
+ // le param�tre n'est pas de la bonne classe ?
+ // NB en fait ce contr�le est d�j� fait par la routine pour la compilation
- m_PosToGo.Copy( pVar ); // garde la position à atteindre (object type CBotVar)
+ m_PosToGo.Copy( pVar ); // garde la position � atteindre (object type CBotVar)
// ou alors
CBotVar* temp;
- temp = pVar->GivItem("x"); // trouve forcément pour un object de type "CPoint"
+ temp = pVar->GivItem("x"); // trouve forc�ment pour un object de type "CPoint"
ASSERT (temp != NULL && temp->GivType() == CBotTypFloat);
m_PosToGo.x = temp->GivValFloat();
- temp = pVar->GivItem("y"); // trouve forcément pour un object de type "CPoint"
+ temp = pVar->GivItem("y"); // trouve forc�ment pour un object de type "CPoint"
ASSERT (temp != NULL && temp->GivType() == CBotTypFloat);
m_PosToGo.y = temp->GivValFloat();
@@ -1182,4 +1193,4 @@ BOOL rDoGoto( CBotVar* pVar, CBotVar* pResult, int& exception )
// rend FALSE s'il faut patienter encore
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/CBot/CBotFunction.cpp b/src/CBot/CBotFunction.cpp
index 43dbc83..426824e 100644
--- a/src/CBot/CBotFunction.cpp
+++ b/src/CBot/CBotFunction.cpp
@@ -1,16 +1,28 @@
-///////////////////////////////////////////////////////////////////////
-// compilation des diverses fonctions déclarées par l'utilisateur
-//
+// * 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 .
#include "CBot.h"
// les divers constructeurs / destructeurs
-// pour libérer tout selon l'arbre établi
+// pour lib�rer tout selon l'arbre �tabli
CBotFunction::CBotFunction()
{
- m_Param = NULL; // liste des paramètres vide
+ m_Param = NULL; // liste des param�tres vide
m_Block = NULL; // le bloc d'instructions
- m_next = NULL; // les fonctions peuvent être chaînées
+ m_next = NULL; // les fonctions peuvent �tre cha�n�es
m_bPublic = FALSE; // fonction non publique
m_bExtern = FALSE; // fonction non externe
m_nextpublic = NULL;
@@ -25,11 +37,11 @@ CBotFunction* CBotFunction::m_listPublic = NULL;
CBotFunction::~CBotFunction()
{
- delete m_Param; // liste des paramètres vide
+ delete m_Param; // liste des param�tres vide
delete m_Block; // le bloc d'instructions
delete m_next;
- // enlève de la liste publique s'il y a lieu
+ // enl�ve de la liste publique s'il y a lieu
if ( m_bPublic )
{
if ( m_nextpublic != NULL )
@@ -42,7 +54,7 @@ CBotFunction::~CBotFunction()
}
else
{
- // si prev = next = null peut ne pas être dans la liste !
+ // si prev = next = null peut ne pas �tre dans la liste !
if ( m_listPublic == this ) m_listPublic = m_nextpublic;
}
}
@@ -152,8 +164,8 @@ CBotTypResult TypeParam(CBotToken* &p, CBotCStack* pile)
}
// compile une nouvelle fonction
-// bLocal permet de mettre la déclaration des paramètres au même niveau
-// que le éléments appartenant à la classe pour les méthodes
+// bLocal permet de mettre la d�claration des param�tres au m�me niveau
+// que le �l�ments appartenant � la classe pour les m�thodes
CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunction* finput, BOOL bLocal)
{
CBotToken* pp;
@@ -184,7 +196,7 @@ CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunct
func->m_retToken = *p;
// CBotClass* pClass;
- func->m_retTyp = TypeParam(p, pStk); // type du résultat
+ func->m_retTyp = TypeParam(p, pStk); // type du r�sultat
if (func->m_retTyp.GivType() >= 0)
{
@@ -197,10 +209,10 @@ CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunct
func->m_token = d;
}
- // un nom de fonction est-il là ?
+ // un nom de fonction est-il l� ?
if (IsOfType(p, TokenTypVar))
{
- if ( IsOfType( p, ID_DBLDOTS ) ) // méthode pour une classe
+ if ( IsOfType( p, ID_DBLDOTS ) ) // m�thode pour une classe
{
func->m_MasterClass = pp->GivString();
CBotClass* pClass = CBotClass::Find(pp);
@@ -228,8 +240,8 @@ CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunct
pStk->AddVar(pThis);
// initialise les variables selon This
- // n'enregistre que le pointeur à la première,
- // le reste est chainé
+ // n'enregistre que le pointeur � la premi�re,
+ // le reste est chain�
CBotVar* pv = pThis->GivItemList();
// int num = 1;
while (pv != NULL)
@@ -266,7 +278,7 @@ bad:
return pStack->ReturnFunc(NULL, pStk);
}
-// pré-compile une nouvelle fonction
+// pr�-compile une nouvelle fonction
CBotFunction* CBotFunction::Compile1(CBotToken* &p, CBotCStack* pStack, CBotClass* pClass)
{
CBotFunction* func = new CBotFunction();
@@ -290,16 +302,16 @@ CBotFunction* CBotFunction::Compile1(CBotToken* &p, CBotCStack* pStack, CBotClas
}
func->m_retToken = *p;
- func->m_retTyp = TypeParam(p, pStack); // type du résultat
+ func->m_retTyp = TypeParam(p, pStack); // type du r�sultat
if (func->m_retTyp.GivType() >= 0)
{
CBotToken* pp = p;
func->m_token = *p;
- // un nom de fonction est-il là ?
+ // un nom de fonction est-il l� ?
if (IsOfType(p, TokenTypVar))
{
- if ( IsOfType( p, ID_DBLDOTS ) ) // méthode pour une classe
+ if ( IsOfType( p, ID_DBLDOTS ) ) // m�thode pour une classe
{
func->m_MasterClass = pp->GivString();
CBotClass* pClass = CBotClass::Find(pp);
@@ -355,14 +367,14 @@ static int xx = 0;
BOOL CBotFunction::Execute(CBotVar** ppVars, CBotStack* &pj, CBotVar* pInstance)
{
- CBotStack* pile = pj->AddStack(this, 2); // un bout de pile local à cette fonction
+ CBotStack* pile = pj->AddStack(this, 2); // un bout de pile local � cette fonction
// if ( pile == EOX ) return TRUE;
pile->SetBotCall(m_pProg); // bases pour les routines
if ( pile->GivState() == 0 )
{
- if ( !m_Param->Execute(ppVars, pile) ) return FALSE; // défini les paramètres
+ if ( !m_Param->Execute(ppVars, pile) ) return FALSE; // d�fini les param�tres
pile->IncState();
}
@@ -405,7 +417,7 @@ BOOL CBotFunction::Execute(CBotVar** ppVars, CBotStack* &pj, CBotVar* pInstance)
void CBotFunction::RestoreState(CBotVar** ppVars, CBotStack* &pj, CBotVar* pInstance)
{
- CBotStack* pile = pj->RestoreStack(this); // un bout de pile local à cette fonction
+ CBotStack* pile = pj->RestoreStack(this); // un bout de pile local � cette fonction
if ( pile == NULL ) return;
CBotStack* pile2 = pile;
@@ -413,13 +425,13 @@ void CBotFunction::RestoreState(CBotVar** ppVars, CBotStack* &pj, CBotVar* pInst
if ( pile->GivBlock() < 2 )
{
- CBotStack* pile2 = pile->RestoreStack(NULL); // un bout de pile local à cette fonction
+ CBotStack* pile2 = pile->RestoreStack(NULL); // un bout de pile local � cette fonction
if ( pile2 == NULL ) return;
pile->SetState(pile->GivState() + pile2->GivState());
pile2->Delete();
}
- m_Param->RestoreState(pile2, TRUE); // les paramètres
+ m_Param->RestoreState(pile2, TRUE); // les param�tres
if ( !m_MasterClass.IsEmpty() )
{
@@ -451,7 +463,7 @@ CBotTypResult CBotFunction::CompileCall(const char* name, CBotVar** ppVars, long
// trouve une fonction selon son identificateur unique
-// si l'identificateur n'est pas trouvé, cherche selon le nom et les paramètres
+// si l'identificateur n'est pas trouv�, cherche selon le nom et les param�tres
CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CBotVar** ppVars, CBotTypResult& TypeOrError, BOOL bPublic)
{
@@ -484,7 +496,7 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
if ( name == NULL ) return NULL;
int delta = 99999; // cherche la signature la plus faible
- CBotFunction* pFunc = NULL; // la meilleure fonction trouvée
+ CBotFunction* pFunc = NULL; // la meilleure fonction trouv�e
if ( this != NULL )
{
@@ -493,10 +505,10 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
if ( pt->m_token.GivString() == name )
{
int i = 0;
- int alpha = 0; // signature des paramètres
- // les paramètres sont-ils compatibles ?
- CBotDefParam* pv = pt->m_Param; // liste des paramètres attendus
- CBotVar* pw = ppVars[i++]; // liste des paramètres fournis
+ int alpha = 0; // signature des param�tres
+ // les param�tres sont-ils compatibles ?
+ CBotDefParam* pv = pt->m_Param; // liste des param�tres attendus
+ CBotVar* pw = ppVars[i++]; // liste des param�tres fournis
while ( pv != NULL && pw != NULL)
{
if (!TypesCompatibles(pv->GivTypResult(), pw->GivTypResult()))
@@ -505,7 +517,7 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
break;
}
int d = pv->GivType() - pw->GivType(2);
- alpha += d>0 ? d : -10*d; // perte de qualité, 10 fois plus cher !!
+ alpha += d>0 ? d : -10*d; // perte de qualit�, 10 fois plus cher !!
pv = pv->GivNext();
pw = ppVars[i++];
@@ -515,14 +527,14 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
if ( pFunc != NULL ) continue;
if ( TypeOrError.Eq(TX_LOWPARAM) ) TypeOrError.SetType(TX_NUMPARAM);
if ( TypeOrError.Eq(TX_UNDEFCALL)) TypeOrError.SetType(TX_OVERPARAM);
- continue; // trop de paramètres
+ continue; // trop de param�tres
}
if ( pv != NULL )
{
if ( pFunc != NULL ) continue;
if ( TypeOrError.Eq(TX_OVERPARAM) ) TypeOrError.SetType(TX_NUMPARAM);
if ( TypeOrError.Eq(TX_UNDEFCALL) ) TypeOrError.SetType(TX_LOWPARAM);
- continue; // pas assez de paramètres
+ continue; // pas assez de param�tres
}
if (alpha == 0) // signature parfaite
@@ -548,10 +560,10 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
if ( pt->m_token.GivString() == name )
{
int i = 0;
- int alpha = 0; // signature des paramètres
- // les paramètres sont-ils compatibles ?
- CBotDefParam* pv = pt->m_Param; // liste des paramètres attendus
- CBotVar* pw = ppVars[i++]; // liste des paramètres fournis
+ int alpha = 0; // signature des param�tres
+ // les param�tres sont-ils compatibles ?
+ CBotDefParam* pv = pt->m_Param; // liste des param�tres attendus
+ CBotVar* pw = ppVars[i++]; // liste des param�tres fournis
while ( pv != NULL && pw != NULL)
{
if (!TypesCompatibles(pv->GivTypResult(), pw->GivTypResult()))
@@ -560,7 +572,7 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
break;
}
int d = pv->GivType() - pw->GivType(2);
- alpha += d>0 ? d : -10*d; // perte de qualité, 10 fois plus cher !!
+ alpha += d>0 ? d : -10*d; // perte de qualit�, 10 fois plus cher !!
pv = pv->GivNext();
pw = ppVars[i++];
@@ -570,14 +582,14 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
if ( pFunc != NULL ) continue;
if ( TypeOrError.Eq(TX_LOWPARAM) ) TypeOrError.SetType(TX_NUMPARAM);
if ( TypeOrError.Eq(TX_UNDEFCALL)) TypeOrError.SetType(TX_OVERPARAM);
- continue; // trop de paramètres
+ continue; // trop de param�tres
}
if ( pv != NULL )
{
if ( pFunc != NULL ) continue;
if ( TypeOrError.Eq(TX_OVERPARAM) ) TypeOrError.SetType(TX_NUMPARAM);
if ( TypeOrError.Eq(TX_UNDEFCALL) ) TypeOrError.SetType(TX_LOWPARAM);
- continue; // pas assez de paramètres
+ continue; // pas assez de param�tres
}
if (alpha == 0) // signature parfaite
@@ -606,7 +618,7 @@ CBotFunction* CBotFunction::FindLocalOrPublic(long& nIdent, const char* name, CB
}
-// fait un appel à une fonction
+// fait un appel � une fonction
int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar** ppVars, CBotStack* pStack, CBotToken* pToken)
{
@@ -620,13 +632,13 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar** ppVars, CBotS
CBotStack* pStk1 = pStack->AddStack(pt, 2); // pour mettre "this"
// if ( pStk1 == EOX ) return TRUE;
- pStk1->SetBotCall(pt->m_pProg); // on a peut-être changé de module
+ pStk1->SetBotCall(pt->m_pProg); // on a peut-�tre chang� de module
if ( pStk1->IfStep() ) return FALSE;
- CBotStack* pStk3 = pStk1->AddStack(NULL, TRUE); // paramètres
+ CBotStack* pStk3 = pStk1->AddStack(NULL, TRUE); // param�tres
- // prépare les paramètres sur la pile
+ // pr�pare les param�tres sur la pile
if ( pStk1->GivState() == 0 )
{
@@ -652,15 +664,15 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar** ppVars, CBotS
}
- // initialise les variables selon paramètres
- pt->m_Param->Execute(ppVars, pStk3); // ne peut pas être interrompu
+ // initialise les variables selon param�tres
+ pt->m_Param->Execute(ppVars, pStk3); // ne peut pas �tre interrompu
pStk1->IncState();
}
- // finalement exécute la fonction trouvée
+ // finalement ex�cute la fonction trouv�e
- if ( !pStk3->GivRetVar( // remet le résultat sur la pile
+ if ( !pStk3->GivRetVar( // remet le r�sultat sur la pile
pt->m_Block->Execute(pStk3) )) // GivRetVar dit si c'est interrompu
{
if ( !pStk3->IsOk() && pt->m_pProg != m_pProg )
@@ -668,7 +680,7 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar** ppVars, CBotS
#ifdef _DEBUG
if ( m_pProg->GivFunctions()->GivName() == "LaCommande" ) return FALSE;
#endif
- pStk3->SetPosError(pToken); // indique l'erreur sur l'appel de procédure
+ pStk3->SetPosError(pToken); // indique l'erreur sur l'appel de proc�dure
}
return FALSE; // interrompu !
}
@@ -694,11 +706,11 @@ void CBotFunction::RestoreCall(long& nIdent, const char* name, CBotVar** ppVars,
pStk1 = pStack->RestoreStack(pt);
if ( pStk1 == NULL ) return;
- pStk1->SetBotCall(pt->m_pProg); // on a peut-être changé de module
+ pStk1->SetBotCall(pt->m_pProg); // on a peut-�tre chang� de module
if ( pStk1->GivBlock() < 2 )
{
- CBotStack* pStk2 = pStk1->RestoreStack(NULL); // plus utilisé
+ CBotStack* pStk2 = pStk1->RestoreStack(NULL); // plus utilis�
if ( pStk2 == NULL ) return;
pStk3 = pStk2->RestoreStack(NULL);
if ( pStk3 == NULL ) return;
@@ -709,7 +721,7 @@ void CBotFunction::RestoreCall(long& nIdent, const char* name, CBotVar** ppVars,
if ( pStk3 == NULL ) return;
}
- // prépare les paramètres sur la pile
+ // pr�pare les param�tres sur la pile
{
if ( !pt->m_MasterClass.IsEmpty() )
@@ -728,7 +740,7 @@ void CBotFunction::RestoreCall(long& nIdent, const char* name, CBotVar** ppVars,
return;
}
- // initialise les variables selon paramètres
+ // initialise les variables selon param�tres
pt->m_Param->RestoreState(pStk3, FALSE);
pt->m_Block->RestoreState(pStk3, TRUE);
}
@@ -736,8 +748,8 @@ void CBotFunction::RestoreCall(long& nIdent, const char* name, CBotVar** ppVars,
-// fait un appel d'une méthode
-// note : this est déjà sur la pile, le pointeur pThis est juste là pour simplifier
+// fait un appel d'une m�thode
+// note : this est d�j� sur la pile, le pointeur pThis est juste l� pour simplifier
int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBotVar** ppVars, CBotStack* pStack, CBotToken* pToken, CBotClass* pClass)
{
@@ -753,17 +765,17 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBotVar
CBotStack* pStk = pStack->AddStack(pt, 2);
// if ( pStk == EOX ) return TRUE;
- pStk->SetBotCall(pt->m_pProg); // on a peut-être changé de module
- CBotStack* pStk3 = pStk->AddStack(NULL, TRUE); // pour mettre les paramètres passés
+ pStk->SetBotCall(pt->m_pProg); // on a peut-�tre chang� de module
+ CBotStack* pStk3 = pStk->AddStack(NULL, TRUE); // pour mettre les param�tres pass�s
- // prépare les paramètres sur la pile
+ // pr�pare les param�tres sur la pile
if ( pStk->GivState() == 0 )
{
// met la variable "this" sur la pile
CBotVar* pthis = CBotVar::Create("this", CBotTypNullPointer);
pthis->Copy(pThis, FALSE);
- pthis->SetUniqNum(-2); // valeur spéciale
+ pthis->SetUniqNum(-2); // valeur sp�ciale
pStk->AddVar(pthis);
CBotClass* pClass = pThis->GivClass()->GivParent();
@@ -771,12 +783,12 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBotVar
{
// met la variable "super" sur la pile
CBotVar* psuper = CBotVar::Create("super", CBotTypNullPointer);
- psuper->Copy(pThis, FALSE); // en fait identique à "this"
- psuper->SetUniqNum(-3); // valeur spéciale
+ psuper->Copy(pThis, FALSE); // en fait identique � "this"
+ psuper->SetUniqNum(-3); // valeur sp�ciale
pStk->AddVar(psuper);
}
- // initialise les variables selon paramètres
- pt->m_Param->Execute(ppVars, pStk3); // ne peut pas être interrompu
+ // initialise les variables selon param�tres
+ pt->m_Param->Execute(ppVars, pStk3); // ne peut pas �tre interrompu
pStk->IncState();
}
@@ -789,21 +801,21 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBotVar
}
pStk->IncState();
}
- // finalement appelle la fonction trouvée
+ // finalement appelle la fonction trouv�e
- if ( !pStk3->GivRetVar( // remet le résultat sur la pile
+ if ( !pStk3->GivRetVar( // remet le r�sultat sur la pile
pt->m_Block->Execute(pStk3) )) // GivRetVar dit si c'est interrompu
{
if ( !pStk3->IsOk() )
{
if ( pt->m_bSynchro )
{
- pClass->Unlock(); // libère la fonction
+ pClass->Unlock(); // lib�re la fonction
}
if ( pt->m_pProg != pProgCurrent )
{
- pStk3->SetPosError(pToken); // indique l'erreur sur l'appel de procédure
+ pStk3->SetPosError(pToken); // indique l'erreur sur l'appel de proc�dure
}
}
return FALSE; // interrompu !
@@ -811,7 +823,7 @@ int CBotFunction::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBotVar
if ( pt->m_bSynchro )
{
- pClass->Unlock(); // libère la fonction
+ pClass->Unlock(); // lib�re la fonction
}
return pStack->Return( pStk3 );
@@ -828,30 +840,30 @@ void CBotFunction::RestoreCall(long& nIdent, const char* name, CBotVar* pThis, C
{
CBotStack* pStk = pStack->RestoreStack(pt);
if ( pStk == NULL ) return;
- pStk->SetBotCall(pt->m_pProg); // on a peut-être changé de module
+ pStk->SetBotCall(pt->m_pProg); // on a peut-�tre chang� de module
CBotVar* pthis = pStk->FindVar("this");
pthis->SetUniqNum(-2);
- CBotStack* pStk3 = pStk->RestoreStack(NULL); // pour mettre les paramètres passés
+ CBotStack* pStk3 = pStk->RestoreStack(NULL); // pour mettre les param�tres pass�s
if ( pStk3 == NULL ) return;
- pt->m_Param->RestoreState(pStk3, TRUE); // les paramètres
+ pt->m_Param->RestoreState(pStk3, TRUE); // les param�tres
- if ( pStk->GivState() > 1 && // vérouillage est effectif ?
+ if ( pStk->GivState() > 1 && // v�rouillage est effectif ?
pt->m_bSynchro )
{
CBotProgram* pProgBase = pStk->GivBotCall(TRUE);
- pClass->Lock(pProgBase); // vérouille la classe
+ pClass->Lock(pProgBase); // v�rouille la classe
}
- // finalement appelle la fonction trouvée
+ // finalement appelle la fonction trouv�e
pt->m_Block->RestoreState(pStk3, TRUE); // interrompu !
}
}
-// regarde si la "signature" des paramètres est identique
+// regarde si la "signature" des param�tres est identique
BOOL CBotFunction::CheckParam(CBotDefParam* pParam)
{
CBotDefParam* pp = m_Param;
@@ -876,7 +888,7 @@ CBotString CBotFunction::GivParams()
if ( m_Param == NULL ) return CBotString("()");
CBotString params = "( ";
- CBotDefParam* p = m_Param; // liste des paramètres
+ CBotDefParam* p = m_Param; // liste des param�tres
while (p != NULL)
{
@@ -907,7 +919,7 @@ void CBotFunction::AddPublic(CBotFunction* func)
/////////////////////////////////////////////////////////////////////////
-// gestion des paramètres
+// gestion des param�tres
CBotDefParam::CBotDefParam()
@@ -922,11 +934,11 @@ CBotDefParam::~CBotDefParam()
}
-// compile une liste de paramètres
+// compile une liste de param�tres
CBotDefParam* CBotDefParam::Compile(CBotToken* &p, CBotCStack* pStack)
{
// surtout pas de pStack->TokenStack ici
- // les variables déclarées doivent rester visibles par la suite
+ // les variables d�clar�es doivent rester visibles par la suite
pStack->SetStartError(p->GivStart());
@@ -938,12 +950,12 @@ CBotDefParam* CBotDefParam::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotDefParam* param = new CBotDefParam();
if (list == NULL) list = param;
- else list->AddNext(param); // ajoute à la liste
+ else list->AddNext(param); // ajoute � la liste
CBotClass* pClass = NULL;//= CBotClass::Find(p);
param->m_typename = p->GivString();
CBotTypResult type = param->m_type = TypeParam(p, pStack);
-// if ( type == CBotTypPointer ) type = CBotTypClass; // il faut créer un nouvel objet
+// if ( type == CBotTypPointer ) type = CBotTypClass; // il faut cr�er un nouvel objet
if (param->m_type.GivType() > 0)
{
@@ -952,7 +964,7 @@ CBotDefParam* CBotDefParam::Compile(CBotToken* &p, CBotCStack* pStack)
if (pStack->IsOk() && IsOfType(p, TokenTypVar) )
{
- // variable déjà déclarée ?
+ // variable d�j� d�clar�e ?
if (pStack->CheckVarLocal(pp))
{
pStack->SetError(TX_REDEFVAR, pp);
@@ -960,9 +972,9 @@ CBotDefParam* CBotDefParam::Compile(CBotToken* &p, CBotCStack* pStack)
}
if ( type.Eq(CBotTypArrayPointer) ) type.SetType(CBotTypArrayBody);
- CBotVar* var = CBotVar::Create(pp->GivString(), type); // crée la variable
+ CBotVar* var = CBotVar::Create(pp->GivString(), type); // cr�e la variable
// if ( pClass ) var->SetClass(pClass);
- var->SetInit(2); // la marque initialisée
+ var->SetInit(2); // la marque initialis�e
param->m_nIdent = CBotVar::NextUniqNum();
var->SetUniqNum(param->m_nIdent);
pStack->AddVar(var); // la place sur la pile
@@ -998,10 +1010,10 @@ BOOL CBotDefParam::Execute(CBotVar** ppVars, CBotStack* &pj)
while ( p != NULL )
{
- // crée une variable locale sur la pile
+ // cr�e une variable locale sur la pile
CBotVar* newvar = CBotVar::Create(p->m_token.GivString(), p->m_type);
- // procède ainsi pour faire la transformation des types :
+ // proc�de ainsi pour faire la transformation des types :
if ( ppVars != NULL && ppVars[i] != NULL )
{
switch (p->m_type.GivType())
@@ -1047,7 +1059,7 @@ void CBotDefParam::RestoreState(CBotStack* &pj, BOOL bMain)
while ( p != NULL )
{
- // crée une variable locale sur la pile
+ // cr�e une variable locale sur la pile
CBotVar* var = pj->FindVar(p->m_token.GivString());
var->SetUniqNum(p->m_nIdent);
p = p->m_next;
@@ -1083,7 +1095,7 @@ CBotString CBotDefParam::GivParamString()
//////////////////////////////////////////////////////////////////////////
-// retour des paramètres
+// retour des param�tres
CBotReturn::CBotReturn()
{
@@ -1102,7 +1114,7 @@ CBotInstr* CBotReturn::Compile(CBotToken* &p, CBotCStack* pStack)
if (!IsOfType(p, ID_RETURN)) return NULL; // ne devrait jamais arriver
- CBotReturn* inst = new CBotReturn(); // crée l'objet
+ CBotReturn* inst = new CBotReturn(); // cr�e l'objet
inst->SetToken( pp );
CBotTypResult type = pStack->GivRetType();
@@ -1139,8 +1151,8 @@ BOOL CBotReturn::Execute(CBotStack* &pj)
if ( pile->GivState() == 0 )
{
- if ( m_Instr != NULL && !m_Instr->Execute(pile) ) return FALSE; // évalue le résultat
- // le résultat est sur la pile
+ if ( m_Instr != NULL && !m_Instr->Execute(pile) ) return FALSE; // �value le r�sultat
+ // le r�sultat est sur la pile
pile->IncState();
}
@@ -1158,13 +1170,13 @@ void CBotReturn::RestoreState(CBotStack* &pj, BOOL bMain)
if ( pile->GivState() == 0 )
{
- if ( m_Instr != NULL ) m_Instr->RestoreState(pile, bMain); // évalue le résultat
+ if ( m_Instr != NULL ) m_Instr->RestoreState(pile, bMain); // �value le r�sultat
return;
}
}
////////////////////////////////////////////////////////////////////////////////
-// Les appels à ces fonctions
+// Les appels � ces fonctions
CBotInstrCall::CBotInstrCall()
{
@@ -1196,11 +1208,11 @@ CBotInstr* CBotInstrCall::Compile(CBotToken* &p, CBotCStack* pStack)
CBotInstrCall* inst = new CBotInstrCall();
inst->SetToken(pp);
- // compile la liste des paramètres
+ // compile la liste des param�tres
if (!IsOfType(p, ID_CLOSEPAR)) while (TRUE)
{
start = p->GivStart();
- pile = pile->TokenStack(); // garde les résultats sur la pile
+ pile = pile->TokenStack(); // garde les r�sultats sur la pile
CBotInstr* param = CBotExpression::Compile(p, pile);
end = p->GivStart();
@@ -1253,7 +1265,7 @@ CBotInstr* CBotInstrCall::Compile(CBotToken* &p, CBotCStack* pStack)
if ( inst->m_typRes.GivType() > 0 )
{
CBotVar* pRes = CBotVar::Create("", inst->m_typRes);
- pStack->SetVar(pRes); // pour connaître le type du résultat
+ pStack->SetVar(pRes); // pour conna�tre le type du r�sultat
}
else pStack->SetVar(NULL); // routine retourne void
@@ -1275,16 +1287,16 @@ BOOL CBotInstrCall::Execute(CBotStack* &pj)
int i = 0;
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile = pile->AddStack(); // de la place sur la pile pour les résultats
+ pile = pile->AddStack(); // de la place sur la pile pour les r�sultats
if ( pile->GivState() == 0 )
{
if (!p->Execute(pile)) return FALSE; // interrompu ici ?
- pile->SetState(1); // marque spéciale pour reconnaîre les paramètres
+ pile->SetState(1); // marque sp�ciale pour reconna�re les param�tres
}
ppVars[i++] = pile->GivVar();
p = p->GivNext();
@@ -1297,7 +1309,7 @@ BOOL CBotInstrCall::Execute(CBotStack* &pj)
if ( !pile2->ExecuteCall(m_nFuncIdent, GivToken(), ppVars, m_typRes)) return FALSE; // interrompu
- return pj->Return(pile2); // libère toute la pile
+ return pj->Return(pile2); // lib�re toute la pile
}
void CBotInstrCall::RestoreState(CBotStack* &pj, BOOL bMain)
@@ -1312,19 +1324,19 @@ void CBotInstrCall::RestoreState(CBotStack* &pj, BOOL bMain)
int i = 0;
CBotVar* ppVars[1000];
CBotInstr* p = m_Parameters;
- // évalue les paramètres
+ // �value les param�tres
// et place les valeurs sur la pile
- // pour pouvoir être interrompu n'importe quand
+ // pour pouvoir �tre interrompu n'importe quand
if ( p != NULL) while ( TRUE )
{
- pile = pile->RestoreStack(); // de la place sur la pile pour les résultats
+ pile = pile->RestoreStack(); // de la place sur la pile pour les r�sultats
if ( pile == NULL ) return;
if ( pile->GivState() == 0 )
{
p->RestoreState(pile, bMain); // interrompu ici !
return;
}
- ppVars[i++] = pile->GivVar(); // construit la liste des paramètres
+ ppVars[i++] = pile->GivVar(); // construit la liste des param�tres
p = p->GivNext();
if ( p == NULL) break;
}
@@ -1337,10 +1349,10 @@ void CBotInstrCall::RestoreState(CBotStack* &pj, BOOL bMain)
}
//////////////////////////////////////////////////////////////////////////////
-// déclaration des classes par l'utilisateur
+// d�claration des classes par l'utilisateur
-// pré-compile une nouvelle class
-// l'analyse est complète à l'execption du corps des routines
+// pr�-compile une nouvelle class
+// l'analyse est compl�te � l'execption du corps des routines
CBotClass* CBotClass::Compile1(CBotToken* &p, CBotCStack* pStack)
{
@@ -1361,7 +1373,7 @@ CBotClass* CBotClass::Compile1(CBotToken* &p, CBotCStack* pStack)
return NULL;
}
- // un nom pour la classe est-il là ?
+ // un nom pour la classe est-il l� ?
if (IsOfType(p, TokenTypVar))
{
CBotClass* pPapa = NULL;
@@ -1379,8 +1391,8 @@ CBotClass* CBotClass::Compile1(CBotToken* &p, CBotCStack* pStack)
}
#endif
CBotClass* classe = (pOld == NULL) ? new CBotClass(name, pPapa) : pOld;
- classe->Purge(); // vide les anciennes définitions
- classe->m_IsDef = FALSE; // définition en cours
+ classe->Purge(); // vide les anciennes d�finitions
+ classe->m_IsDef = FALSE; // d�finition en cours
if ( !IsOfType( p, ID_OPBLK) )
{
@@ -1419,7 +1431,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
if ( IsOfType(p, ID_STATIC) ) bStatic = TRUE;
// CBotClass* pClass = NULL;
- type = TypeParam(p, pStack); // type du résultat
+ type = TypeParam(p, pStack); // type du r�sultat
if ( type.Eq(-1) )
{
@@ -1430,7 +1442,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
while (pStack->IsOk())
{
CBotToken* pp = p;
- IsOfType(p, ID_NOT); // saute le ~ éventuel (destructeur)
+ IsOfType(p, ID_NOT); // saute le ~ �ventuel (destructeur)
if (IsOfType(p, TokenTypVar))
{
@@ -1442,7 +1454,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
if ( p->GivType() != ID_CLBRK )
i = CBotExpression::Compile( p, pStack ); // expression pour la valeur
else
- i = new CBotEmpty(); // spécial si pas de formule
+ i = new CBotEmpty(); // sp�cial si pas de formule
type = CBotTypResult(CBotTypArrayPointer, type);
@@ -1478,7 +1490,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
}
else
{
- // retrouve la méthode précompilée en passe 1
+ // retrouve la m�thode pr�compil�e en passe 1
CBotFunction* pf = m_pMethod;
CBotFunction* prev = NULL;
while ( pf != NULL )
@@ -1523,7 +1535,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
my = my->m_pParent;
}
- // compile une méthode
+ // compile une m�thode
p = pBase;
CBotFunction* f =
CBotFunction::Compile(p, pile, NULL/*, FALSE*/);
@@ -1532,7 +1544,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
{
f->m_pProg = pStack->GivBotCall();
f->m_bSynchro = bSynchro;
- // remplace l'élément dans la chaîne
+ // remplace l'�l�ment dans la cha�ne
f->m_next = pf->m_next;
pf->m_next = NULL;
delete pf;
@@ -1545,7 +1557,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
return pStack->IsOk();
}
- // définition d'un élément
+ // d�finition d'un �l�ment
if (type.Eq(0))
{
pStack->SetError(TX_ENDOF, p);
@@ -1561,7 +1573,7 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
}
else
{
- // il y a une assignation à calculer
+ // il y a une assignation � calculer
i = CBotTwoOpExpr::Compile(p, pStack);
}
if ( !pStack->IsOk() ) return FALSE;
@@ -1582,8 +1594,8 @@ BOOL CBotClass::CompileDefItem(CBotToken* &p, CBotCStack* pStack, BOOL bSecond)
if ( pv->IsStatic() && pv->m_InitExpr != NULL )
{
- CBotStack* pile = CBotStack::FirstStack(); // une pile indépendante
- while(pile->IsOk() && !pv->m_InitExpr->Execute(pile)); // évalue l'expression sans timer
+ CBotStack* pile = CBotStack::FirstStack(); // une pile ind�pendante
+ while(pile->IsOk() && !pv->m_InitExpr->Execute(pile)); // �value l'expression sans timer
pv->SetVal( pile->GivVar() ) ;
pile->Delete();
}
@@ -1607,26 +1619,26 @@ CBotClass* CBotClass::Compile(CBotToken* &p, CBotCStack* pStack)
CBotString name = p->GivString();
- // un nom pour la classe est-il là ?
+ // un nom pour la classe est-il l� ?
if (IsOfType(p, TokenTypVar))
{
- // la classe à été créée par Compile1
+ // la classe � �t� cr��e par Compile1
CBotClass* pOld = CBotClass::Find(name);
#if EXTENDS
if ( IsOfType( p, ID_EXTENDS ) )
{
- IsOfType(p, TokenTypVar); // forcément
+ IsOfType(p, TokenTypVar); // forc�ment
}
#endif
- IsOfType( p, ID_OPBLK); // forcément
+ IsOfType( p, ID_OPBLK); // forc�ment
while ( pStack->IsOk() && !IsOfType( p, ID_CLBLK ) )
{
pOld->CompileDefItem(p, pStack, TRUE);
}
- pOld->m_IsDef = TRUE; // définition terminée
+ pOld->m_IsDef = TRUE; // d�finition termin�e
if (pStack->IsOk()) return pOld;
}
pStack->SetError(TX_ENDOF, p);
diff --git a/src/CBot/CBotIf.cpp b/src/CBot/CBotIf.cpp
index c0f561a..1a53aeb 100644
--- a/src/CBot/CBotIf.cpp
+++ b/src/CBot/CBotIf.cpp
@@ -1,5 +1,18 @@
-///////////////////////////////////////////////////////////////////////
-// instruction if (condition) opération1 else opération2;
+// * 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 .
#include "CBot.h"
@@ -14,23 +27,23 @@ CBotIf::CBotIf()
CBotIf::~CBotIf()
{
- delete m_Condition; // libère la condition
- delete m_Block; // libère le bloc d'instruction1
- delete m_BlockElse; // libère le bloc d'instruction2
+ delete m_Condition; // lib�re la condition
+ delete m_Block; // lib�re le bloc d'instruction1
+ delete m_BlockElse; // lib�re le bloc d'instruction2
}
// compilation (routine statique)
-// appelé lorsque le token "if" a été trouvé
+// appel� lorsque le token "if" a �t� trouv�
CBotInstr* CBotIf::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotToken* pp = p; // conserve le ^au token (début instruction)
+ CBotToken* pp = p; // conserve le ^au token (d�but instruction)
if (!IsOfType(p, ID_IF)) return NULL; // ne doit jamais arriver
CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp
- CBotIf* inst = new CBotIf(); // crée l'object
+ CBotIf* inst = new CBotIf(); // cr�e l'object
inst->SetToken( pp );
if ( NULL != (inst->m_Condition = CBotCondition::Compile( p, pStk )) )
@@ -40,7 +53,7 @@ CBotInstr* CBotIf::Compile(CBotToken* &p, CBotCStack* pStack)
inst->m_Block = CBotBlock::CompileBlkOrInst( p, pStk, TRUE );
if ( pStk->IsOk() )
{
- // le bloc d'instruction est ok (peut être vide)
+ // le bloc d'instruction est ok (peut �tre vide)
// regarde si l'instruction suivante est le token "else"
if (IsOfType(p, ID_ELSE))
@@ -49,57 +62,57 @@ CBotInstr* CBotIf::Compile(CBotToken* &p, CBotCStack* pStack)
inst->m_BlockElse = CBotBlock::CompileBlkOrInst( p, pStk, TRUE );
if (!pStk->IsOk())
{
- // il n'y a pas de bloc correct après le else
- // libère l'objet, et transmet l'erreur qui est sur la pile
+ // il n'y a pas de bloc correct apr�s le else
+ // lib�re l'objet, et transmet l'erreur qui est sur la pile
delete inst;
return pStack->Return(NULL, pStk);
}
}
- // rend l'object correct à qui le demande.
+ // rend l'object correct � qui le demande.
return pStack->Return(inst, pStk);
}
}
- // erreur, libère l'objet
+ // erreur, lib�re l'objet
delete inst;
// et transmet l'erreur qui se trouve sur la pile.
return pStack->Return(NULL, pStk);
}
-// exécution de l'instruction
+// ex�cution de l'instruction
BOOL CBotIf :: Execute(CBotStack* &pj)
{
- CBotStack* pile = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pile == EOX ) return TRUE;
if ( pile->IfStep() ) return FALSE;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
if( pile->GivState() == 0 )
{
- // évalue la condition
+ // �value la condition
if ( !m_Condition->Execute(pile) ) return FALSE; // interrompu ici ?
// termine s'il y a une erreur
if ( !pile->IsOk() )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
- // passe dans le second état
- if (!pile->SetState(1)) return FALSE; // prêt pour la suite
+ // passe dans le second �tat
+ if (!pile->SetState(1)) return FALSE; // pr�t pour la suite
}
- // second état, évalue les instructions associées
- // le résultat de la condition est sur la pile
+ // second �tat, �value les instructions associ�es
+ // le r�sultat de la condition est sur la pile
- if ( pile->GivVal() == TRUE ) // condition était vraie ?
+ if ( pile->GivVal() == TRUE ) // condition �tait vraie ?
{
- if ( m_Block != NULL && // bloc peut être absent
+ if ( m_Block != NULL && // bloc peut �tre absent
!m_Block->Execute(pile) ) return FALSE; // interrompu ici ?
}
else
@@ -108,7 +121,7 @@ BOOL CBotIf :: Execute(CBotStack* &pj)
!m_BlockElse->Execute(pile) ) return FALSE; // interrompu ici
}
- // transmet le résultat et libère la pile
+ // transmet le r�sultat et lib�re la pile
return pj->Return(pile);
}
@@ -117,23 +130,23 @@ void CBotIf :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile == NULL ) return;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
if( pile->GivState() == 0 )
{
- // évalue la condition
+ // �value la condition
m_Condition->RestoreState(pile, bMain); // interrompu ici !
return;
}
- // second état, évalue les instructions associées
- // le résultat de la condition est sur la pile
+ // second �tat, �value les instructions associ�es
+ // le r�sultat de la condition est sur la pile
- if ( pile->GivVal() == TRUE ) // condition était vraie ?
+ if ( pile->GivVal() == TRUE ) // condition �tait vraie ?
{
- if ( m_Block != NULL ) // bloc peut être absent
+ if ( m_Block != NULL ) // bloc peut �tre absent
m_Block->RestoreState(pile, bMain); // interrompu ici !
}
else
diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp
index ba14f89..1b770e8 100644
--- a/src/CBot/CBotProgram.cpp
+++ b/src/CBot/CBotProgram.cpp
@@ -1,5 +1,18 @@
-//////////////////////////////////////////////////////////////////////
-// gestion de base d'un programme CBot
+// * 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 .
#include "CBot.h"
#include <stdio.h>
@@ -54,8 +67,8 @@ BOOL CBotProgram::Compile( const char* program, CBotStringArray& ListFonctions,
Stop();
// delete m_pClass;
- m_pClass->Purge(); // purge les anciennes définitions des classes
- // mais sans détruire l'object
+ m_pClass->Purge(); // purge les anciennes d�finitions des classes
+ // mais sans d�truire l'object
m_pClass = NULL;
delete m_Prog; m_Prog= NULL;
@@ -71,12 +84,12 @@ BOOL CBotProgram::Compile( const char* program, CBotStringArray& ListFonctions,
CBotCStack* pStack = new CBotCStack(NULL);
- CBotToken* p = pBaseToken->GivNext(); // saute le 1er token (séparateur)
+ CBotToken* p = pBaseToken->GivNext(); // saute le 1er token (s�parateur)
- pStack->SetBotCall(this); // défini les routines utilisables
+ pStack->SetBotCall(this); // d�fini les routines utilisables
CBotCall::SetPUser(pUser);
- // fait une première passe rapide juste pour prendre les entêtes de routines et de classes
+ // fait une premi�re passe rapide juste pour prendre les ent�tes de routines et de classes
while ( pStack->IsOk() && p != NULL && p->GivType() != 0)
{
if ( IsOfType(p, ID_SEP) ) continue; // des point-virgules qui trainent
@@ -107,7 +120,7 @@ BOOL CBotProgram::Compile( const char* program, CBotStringArray& ListFonctions,
// CBotFunction* temp = NULL;
CBotFunction* next = m_Prog; // reprend la liste
- p = pBaseToken->GivNext(); // revient au début
+ p = pBaseToken->GivNext(); // revient au d�but
while ( pStack->IsOk() && p != NULL && p->GivType() != 0 )
{
@@ -117,7 +130,7 @@ BOOL CBotProgram::Compile( const char* program, CBotStringArray& ListFonctions,
( p->GivType() == ID_PUBLIC && p->GivNext()->GivType() == ID_CLASS ))
{
m_bCompileClass = TRUE;
- CBotClass::Compile(p, pStack); // complète la définition de la classe
+ CBotClass::Compile(p, pStack); // compl�te la d�finition de la classe
}
else
{
@@ -129,7 +142,7 @@ BOOL CBotProgram::Compile( const char* program, CBotStringArray& ListFonctions,
}
}
-// delete m_Prog; // la liste de la 1ère passe
+// delete m_Prog; // la liste de la 1�re passe
// m_Prog = temp; // la liste de la seconde passe
if ( !pStack->IsOk() )
@@ -171,12 +184,12 @@ BOOL CBotProgram::Start(const char* name)
#if STACKMEM
m_pStack = CBotStack::FirstStack();
#else
- m_pStack = new CBotStack(NULL); // crée une pile d'exécution
+ m_pStack = new CBotStack(NULL); // cr�e une pile d'ex�cution
#endif
m_pStack->SetBotCall(this); // bases pour les routines
- return TRUE; // on est prêt pour un Run()
+ return TRUE; // on est pr�t pour un Run()
}
BOOL CBotProgram::GetPosition(const char* name, int& start, int& stop, CBotGet modestart, CBotGet modestop)
@@ -204,13 +217,13 @@ BOOL CBotProgram::Run(void* pUser, int timer)
if (m_pInstance != NULL && m_pInstance->m_pUserPtr != NULL)
pUser = m_pInstance->m_pUserPtr;
- m_pStack->Reset(pUser); // vide l'éventuelle erreur précédente, et remet le timer
+ m_pStack->Reset(pUser); // vide l'�ventuelle erreur pr�c�dente, et remet le timer
if ( timer >= 0 ) m_pStack->SetTimer(timer);
m_pStack->SetBotCall(this); // bases pour les routines
#if STACKRUN
- // reprend l'exécution sur le haut de la pile
+ // reprend l'ex�cution sur le haut de la pile
ok = m_pStack->Execute();
if ( ok )
{
@@ -221,7 +234,7 @@ BOOL CBotProgram::Run(void* pUser, int timer)
ppVar[2] = NULL;
ok = m_pRun->Execute(ppVar, m_pStack, m_pInstance);
#else
- // revient sur l'exécution normale
+ // revient sur l'ex�cution normale
ok = m_pRun->Execute(NULL, m_pStack, m_pInstance);
#endif
}
@@ -229,7 +242,7 @@ BOOL CBotProgram::Run(void* pUser, int timer)
ok = m_pRun->Execute(NULL, m_pStack, m_pInstance);
#endif
- // terminé sur une erreur ?
+ // termin� sur une erreur ?
if (!ok && !m_pStack->IsOk())
{
m_ErrorCode = m_pStack->GivError(m_ErrorStart, m_ErrorEnd);
@@ -239,10 +252,10 @@ BOOL CBotProgram::Run(void* pUser, int timer)
delete m_pStack;
#endif
m_pStack = NULL;
- return TRUE; // exécution terminée !!
+ return TRUE; // ex�cution termin�e !!
}
- if ( ok ) m_pRun = NULL; // plus de fonction en exécution
+ if ( ok ) m_pRun = NULL; // plus de fonction en ex�cution
return ok;
error:
@@ -332,7 +345,7 @@ CBotString CBotProgram::GivErrorText(int code)
if (TextError.IsEmpty())
{
char buf[100];
- sprintf(buf, "Exception numéro %d.", code);
+ sprintf(buf, "Exception num�ro %d.", code);
TextError = buf;
}
return TextError;
@@ -348,7 +361,7 @@ BOOL CBotProgram::AddFunction(const char* name,
BOOL rExec (CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser),
CBotTypResult rCompile (CBotVar* &pVar, void* pUser))
{
- // mémorise les pointeurs aux deux fonctions
+ // m�morise les pointeurs aux deux fonctions
return CBotCall::AddFunction(name, rExec, rCompile);
}
@@ -531,12 +544,12 @@ BOOL CBotProgram::RestoreState(FILE* pf)
#endif
m_pStack = NULL;
- // récupère la pile depuis l'enregistrement
- // utilise un pointeur NULL (m_pStack) mais c'est ok comme ça
+ // r�cup�re la pile depuis l'enregistrement
+ // utilise un pointeur NULL (m_pStack) mais c'est ok comme �a
if (!m_pStack->RestoreState(pf, m_pStack)) return FALSE;
m_pStack->SetBotCall(this); // bases pour les routines
- // rétabli certains états dans la pile selon la structure
+ // r�tabli certains �tats dans la pile selon la structure
m_pRun->RestoreState(NULL, m_pStack, m_pInstance);
return TRUE;
}
@@ -584,16 +597,16 @@ BOOL CBotCall::AddFunction(const char* name,
{
if ( p->GivName() == name )
{
- // libère une fonction qu'on redéfini
+ // lib�re une fonction qu'on red�fini
if ( pp ) pp->m_next = p->m_next;
else m_ListCalls = p->m_next;
pp = p;
p = p->m_next;
- pp->m_next = NULL; // ne pas détruire la suite de la liste
+ pp->m_next = NULL; // ne pas d�truire la suite de la liste
delete pp;
continue;
}
- pp = p; // pointeur précédent
+ pp = p; // pointeur pr�c�dent
p = p->m_next;
}
@@ -607,7 +620,7 @@ BOOL CBotCall::AddFunction(const char* name,
// transforme le tableau de pointeurs aux variables
-// en une liste de variables chaînées
+// en une liste de variables cha�n�es
CBotVar* MakeListVars(CBotVar** ppVars, BOOL bSetVal=FALSE)
{
int i = 0;
@@ -631,8 +644,8 @@ CBotVar* MakeListVars(CBotVar** ppVars, BOOL bSetVal=FALSE)
return pVar;
}
-// trouve un appel acceptable selon le nom de la procédure
-// et les paramètres donnés
+// trouve un appel acceptable selon le nom de la proc�dure
+// et les param�tres donn�s
CBotTypResult CBotCall::CompileCall(CBotToken* &p, CBotVar** ppVar, CBotCStack* pStack, long& nIdent)
{
@@ -649,7 +662,7 @@ CBotTypResult CBotCall::CompileCall(CBotToken* &p, CBotVar** ppVar, CBotCStack*
CBotTypResult r = pt->m_rComp(pVar2, m_pUser);
int ret = r.GivType();
- // si une classe est retournée, c'est en fait un pointeur
+ // si une classe est retourn�e, c'est en fait un pointeur
if ( ret == CBotTypClass ) r.SetType( ret = CBotTypPointer );
if ( ret > 20 )
@@ -730,19 +743,19 @@ int CBotCall::DoCall(long& nIdent, CBotToken* token, CBotVar** ppVar, CBotStack*
fund:
#if !STACKRUN
- // fait la liste des paramètres selon le contenu de la pile (pStackVar)
+ // fait la liste des param�tres selon le contenu de la pile (pStackVar)
CBotVar* pVar = MakeListVars(ppVar, TRUE);
CBotVar* pVarToDelete = pVar;
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* pResult = rettype.Eq(0) ? NULL : CBotVar::Create("", rettype);
CBotVar* pRes = pResult;
int Exception = 0;
int res = pt->m_rExec(pVar, pResult, Exception, pStack->GivPUser());
- if ( pResult != pRes ) delete pRes; // si résultat différent rendu
+ if ( pResult != pRes ) delete pRes; // si r�sultat diff�rent rendu
delete pVarToDelete;
if (res == FALSE)
@@ -768,12 +781,12 @@ fund:
CBotStack* pile = pStack->AddStackEOX(pt);
if ( pile == EOX ) return TRUE;
- // fait la liste des paramètres selon le contenu de la pile (pStackVar)
+ // fait la liste des param�tres selon le contenu de la pile (pStackVar)
CBotVar* pVar = MakeListVars(ppVar, TRUE);
CBotVar* pVarToDelete = pVar;
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* pResult = rettype.Eq(0) ? NULL : CBotVar::Create("", rettype);
pile->SetVar( pVar );
@@ -834,12 +847,12 @@ BOOL CBotCall::Run(CBotStack* pStack)
{
pStack->SetError(Exception);
}
- if ( pResult != pRes ) delete pResult; // si résultat différent rendu
+ if ( pResult != pRes ) delete pResult; // si r�sultat diff�rent rendu
return FALSE;
}
if ( pResult != NULL ) pStack->SetCopyVar( pResult );
- if ( pResult != pRes ) delete pResult; // si résultat différent rendu
+ if ( pResult != pRes ) delete pResult; // si r�sultat diff�rent rendu
return TRUE;
}
@@ -865,8 +878,8 @@ CBotCallMethode::~CBotCallMethode()
m_next = NULL;
}
-// trouve un appel acceptable selon le nom de la procédure
-// et les paramètres donnés
+// trouve un appel acceptable selon le nom de la proc�dure
+// et les param�tres donn�s
CBotTypResult CBotCallMethode::CompileCall(const char* name, CBotVar* pThis,
CBotVar** ppVar, CBotCStack* pStack,
@@ -926,7 +939,7 @@ int CBotCallMethode::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBot
{
if ( pt->m_nFuncIdent == nIdent )
{
- // fait la liste des paramètres selon le contenu de la pile (pStackVar)
+ // fait la liste des param�tres selon le contenu de la pile (pStackVar)
CBotVar* pVar = MakeListVars(ppVars, TRUE);
CBotVar* pVarToDelete = pVar;
@@ -959,7 +972,7 @@ int CBotCallMethode::DoCall(long& nIdent, const char* name, CBotVar* pThis, CBot
{
if ( pt->m_name == name )
{
- // fait la liste des paramètres selon le contenu de la pile (pStackVar)
+ // fait la liste des param�tres selon le contenu de la pile (pStackVar)
CBotVar* pVar = MakeListVars(ppVars, TRUE);
CBotVar* pVarToDelete = pVar;
@@ -1025,10 +1038,10 @@ BOOL rCBotDebug( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cCBotDebug( CBotVar* &pVar, void* pUser )
{
- // pas de paramètre
+ // pas de param�tre
if ( pVar != NULL ) return CBotTypResult( TX_OVERPARAM );
- // la fonction retourne un résultat "string"
+ // la fonction retourne un r�sultat "string"
return CBotTypResult( CBotTypString );
}
@@ -1037,10 +1050,10 @@ CBotTypResult cCBotDebug( CBotVar* &pVar, void* pUser )
void CBotProgram::Init()
{
- CBotToken::DefineNum( "CBotErrOpenPar", 5000) ; // manque la parenthèse ouvrante
- CBotToken::DefineNum( "CBotErrClosePar", 5001) ; // manque la parenthèse fermante
- CBotToken::DefineNum( "CBotErrNotBoolean", 5002) ; // l'expression doit être un boolean
- CBotToken::DefineNum( "CBotErrUndefVar", 5003) ; // variable non déclarée
+ CBotToken::DefineNum( "CBotErrOpenPar", 5000) ; // manque la parenth�se ouvrante
+ CBotToken::DefineNum( "CBotErrClosePar", 5001) ; // manque la parenth�se fermante
+ CBotToken::DefineNum( "CBotErrNotBoolean", 5002) ; // l'expression doit �tre un boolean
+ CBotToken::DefineNum( "CBotErrUndefVar", 5003) ; // variable non d�clar�e
CBotToken::DefineNum( "CBotErrBadLeft", 5004) ; // assignation impossible ( 5 = ... )
CBotToken::DefineNum( "CBotErrNoTerminator", 5005) ;// point-virgule attendu
CBotToken::DefineNum( "CBotErrCaseOut", 5006) ; // case en dehors d'un switch
@@ -1048,8 +1061,8 @@ void CBotProgram::Init()
CBotToken::DefineNum( "CBotErrElseWhitoutIf", 5009) ;// else sans if correspondant
CBotToken::DefineNum( "CBotErrOpenBlock", 5010) ; // manque " { "
CBotToken::DefineNum( "CBotErrBadType1", 5011) ; // mauvais type pour l'assignation
- CBotToken::DefineNum( "CBotErrRedefVar", 5012) ; // redéfinition de la variable
- CBotToken::DefineNum( "CBotErrBadType2", 5013) ; // 2 opérandes de type incompatibles
+ CBotToken::DefineNum( "CBotErrRedefVar", 5012) ; // red�finition de la variable
+ CBotToken::DefineNum( "CBotErrBadType2", 5013) ; // 2 op�randes de type incompatibles
CBotToken::DefineNum( "CBotErrUndefCall", 5014) ; // routine inconnue
CBotToken::DefineNum( "CBotErrNoDoubleDots", 5015) ;// " : " attendu
CBotToken::DefineNum( "CBotErrBreakOutside", 5017) ;// break en dehors d'une boucle
@@ -1058,28 +1071,28 @@ void CBotProgram::Init()
CBotToken::DefineNum( "CBotErrNoCase", 5020) ; // manque " case "
CBotToken::DefineNum( "CBotErrBadNum", 5021) ; // nombre attendu
CBotToken::DefineNum( "CBotErrVoid", 5022) ; // " void " pas possible ici
- CBotToken::DefineNum( "CBotErrNoType", 5023) ; // déclaration de type attendue
+ CBotToken::DefineNum( "CBotErrNoType", 5023) ; // d�claration de type attendue
CBotToken::DefineNum( "CBotErrNoVar", 5024) ; // nom de variable attendu
CBotToken::DefineNum( "CBotErrNoFunc", 5025) ; // nom de fonction attendu
- CBotToken::DefineNum( "CBotErrOverParam", 5026) ; // trop de paramètres
- CBotToken::DefineNum( "CBotErrRedefFunc", 5027) ; // cette fonction existe déjà
- CBotToken::DefineNum( "CBotErrLowParam", 5028) ; // pas assez de paramètres
- CBotToken::DefineNum( "CBotErrBadParam", 5029) ; // mauvais types de paramètres
- CBotToken::DefineNum( "CBotErrNbParam", 5030) ; // mauvais nombre de paramètres
- CBotToken::DefineNum( "CBotErrUndefItem", 5031) ; // élément n'existe pas dans la classe
+ CBotToken::DefineNum( "CBotErrOverParam", 5026) ; // trop de param�tres
+ CBotToken::DefineNum( "CBotErrRedefFunc", 5027) ; // cette fonction existe d�j�
+ CBotToken::DefineNum( "CBotErrLowParam", 5028) ; // pas assez de param�tres
+ CBotToken::DefineNum( "CBotErrBadParam", 5029) ; // mauvais types de param�tres
+ CBotToken::DefineNum( "CBotErrNbParam", 5030) ; // mauvais nombre de param�tres
+ CBotToken::DefineNum( "CBotErrUndefItem", 5031) ; // �l�ment n'existe pas dans la classe
CBotToken::DefineNum( "CBotErrUndefClass", 5032) ; // variable n'est pas une classe
- CBotToken::DefineNum( "CBotErrNoConstruct", 5033) ; // pas de constructeur approprié
- CBotToken::DefineNum( "CBotErrRedefClass", 5034) ; // classe existe déjà
+ CBotToken::DefineNum( "CBotErrNoConstruct", 5033) ; // pas de constructeur appropri�
+ CBotToken::DefineNum( "CBotErrRedefClass", 5034) ; // classe existe d�j�
CBotToken::DefineNum( "CBotErrCloseIndex", 5035) ; // " ] " attendu
- CBotToken::DefineNum( "CBotErrReserved", 5036) ; // mot réservé (par un DefineNum)
+ CBotToken::DefineNum( "CBotErrReserved", 5036) ; // mot r�serv� (par un DefineNum)
-// voici la liste des erreurs pouvant être retournées par le module
-// pour l'exécution
+// voici la liste des erreurs pouvant �tre retourn�es par le module
+// pour l'ex�cution
- CBotToken::DefineNum( "CBotErrZeroDiv", 6000) ; // division par zéro
- CBotToken::DefineNum( "CBotErrNotInit", 6001) ; // variable non initialisée
- CBotToken::DefineNum( "CBotErrBadThrow", 6002) ; // throw d'une valeur négative
- CBotToken::DefineNum( "CBotErrNoRetVal", 6003) ; // fonction n'a pas retourné de résultat
+ CBotToken::DefineNum( "CBotErrZeroDiv", 6000) ; // division par z�ro
+ CBotToken::DefineNum( "CBotErrNotInit", 6001) ; // variable non initialis�e
+ CBotToken::DefineNum( "CBotErrBadThrow", 6002) ; // throw d'une valeur n�gative
+ CBotToken::DefineNum( "CBotErrNoRetVal", 6003) ; // fonction n'a pas retourn� de r�sultat
CBotToken::DefineNum( "CBotErrNoRun", 6004) ; // Run() sans fonction active
CBotToken::DefineNum( "CBotErrUndefFunc", 6005) ; // appel d'une fonction qui n'existe plus
diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index c313a8b..4809f66 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -1,5 +1,18 @@
-//////////////////////////////////////////////////////////////////////
-// gestion de la pile (stack)
+// * 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 .
#include "CBot.h"
@@ -7,7 +20,7 @@
#define ITIMER 100
////////////////////////////////////////////////////////////////////////////
-// gestion de la pile d'exécution
+// gestion de la pile d'ex�cution
////////////////////////////////////////////////////////////////////////////
int CBotStack::m_initimer = ITIMER; // init la variable statique
@@ -28,14 +41,14 @@ CBotStack* CBotStack::FirstStack()
long size = sizeof(CBotStack);
size *= (MAXSTACK+10);
- // demande une tranche mémoire pour la pile
+ // demande une tranche m�moire pour la pile
p = (CBotStack*)malloc(size);
// la vide totalement
memset(p, 0, size);
p-> m_bBlock = TRUE;
- m_timer = m_initimer; // met le timer au début
+ m_timer = m_initimer; // met le timer au d�but
CBotStack* pp = p;
pp += MAXSTACK;
@@ -54,19 +67,19 @@ CBotStack* CBotStack::FirstStack()
}
#endif
- m_error = 0; // évite des blocages car m_error est static
+ m_error = 0; // �vite des blocages car m_error est static
return p;
}
CBotStack::CBotStack(CBotStack* ppapa)
{
- // constructeur doit exister, sinon le destructeur n'est jamais appelé !
+ // constructeur doit exister, sinon le destructeur n'est jamais appel� !
__asm int 3;
}
CBotStack::~CBotStack()
{
- __asm int 3; // utiliser Delete() à la place
+ __asm int 3; // utiliser Delete() � la place
}
void CBotStack::Delete()
@@ -79,10 +92,10 @@ void CBotStack::Delete()
if (m_prev != NULL)
{
if ( m_prev->m_next == this )
- m_prev->m_next = NULL; // enlève de la chaîne
+ m_prev->m_next = NULL; // enl�ve de la cha�ne
if ( m_prev->m_next2 == this )
- m_prev->m_next2 = NULL; // enlève de la chaîne
+ m_prev->m_next2 = NULL; // enl�ve de la cha�ne
}
delete m_var;
@@ -94,7 +107,7 @@ void CBotStack::Delete()
int n = m_index;
#endif
- // efface le bloc libéré
+ // efface le bloc lib�r�
memset(this, 0, sizeof(CBotStack));
m_bOver = bOver;
#ifdef _DEBUG
@@ -106,7 +119,7 @@ void CBotStack::Delete()
}
-// routine optimisée
+// routine optimis�e
CBotStack* CBotStack::AddStack(CBotInstr* instr, BOOL bBlock)
{
if (m_next != NULL)
@@ -127,7 +140,7 @@ CBotStack* CBotStack::AddStack(CBotInstr* instr, BOOL bBlock)
}
while ( p->m_prev != NULL );
- m_next = p; // chaîne l'élément
+ m_next = p; // cha�ne l'�l�ment
p->m_bBlock = bBlock;
p->m_instr = instr;
p->m_prog = m_prog;
@@ -152,7 +165,7 @@ CBotStack* CBotStack::AddStackEOX(CBotCall* instr, BOOL bBlock)
}
CBotStack* p = AddStack(NULL, bBlock);
p->m_call = instr;
- p->m_bFunc = 2; // spécial
+ p->m_bFunc = 2; // sp�cial
return p;
}
@@ -160,7 +173,7 @@ CBotStack* CBotStack::AddStack2(BOOL bBlock)
{
if (m_next2 != NULL)
{
- m_next2->m_prog = m_prog; // spécial évite un RestoreStack2
+ m_next2->m_prog = m_prog; // sp�cial �vite un RestoreStack2
return m_next2; // reprise dans une pile existante
}
@@ -171,7 +184,7 @@ CBotStack* CBotStack::AddStack2(BOOL bBlock)
}
while ( p->m_prev != NULL );
- m_next2 = p; // chaîne l'élément
+ m_next2 = p; // cha�ne l'�l�ment
p->m_prev = this;
p->m_bBlock = bBlock;
p->m_prog = m_prog;
@@ -186,13 +199,13 @@ BOOL CBotStack::GivBlock()
BOOL CBotStack::Return(CBotStack* pfils)
{
- if ( pfils == this ) return TRUE; // spécial
+ if ( pfils == this ) return TRUE; // sp�cial
- if (m_var != NULL) delete m_var; // valeur remplacée ?
- m_var = pfils->m_var; // résultat transmis
- pfils->m_var = NULL; // ne pas détruire la variable
+ if (m_var != NULL) delete m_var; // valeur remplac�e ?
+ m_var = pfils->m_var; // r�sultat transmis
+ pfils->m_var = NULL; // ne pas d�truire la variable
- m_next->Delete();m_next = NULL; // libère la pile au dessus
+ m_next->Delete();m_next = NULL; // lib�re la pile au dessus
m_next2->Delete();m_next2 = NULL; // aussi la seconde pile (catch)
return (m_error == 0); // interrompu si erreur
@@ -200,11 +213,11 @@ BOOL CBotStack::Return(CBotStack* pfils)
BOOL CBotStack::ReturnKeep(CBotStack* pfils)
{
- if ( pfils == this ) return TRUE; // spécial
+ if ( pfils == this ) return TRUE; // sp�cial
- if (m_var != NULL) delete m_var; // valeur remplacée ?
- m_var = pfils->m_var; // résultat transmis
- pfils->m_var = NULL; // ne pas détruire la variable
+ if (m_var != NULL) delete m_var; // valeur remplac�e ?
+ m_var = pfils->m_var; // r�sultat transmis
+ pfils->m_var = NULL; // ne pas d�truire la variable
return (m_error == 0); // interrompu si erreur
}
@@ -229,7 +242,7 @@ CBotStack::CBotStack(CBotStack* ppapa)
m_state = 0;
m_step = 1;
- if (ppapa == NULL) m_timer = m_initimer; // met le timer au début
+ if (ppapa == NULL) m_timer = m_initimer; // met le timer au d�but
m_listVar = NULL;
m_bDontDelete = FALSE;
@@ -247,13 +260,13 @@ CBotStack::~CBotStack()
if ( m_next != EOX) delete m_next;
delete m_next2;
if (m_prev != NULL && m_prev->m_next == this )
- m_prev->m_next = NULL; // enlève de la chaîne
+ m_prev->m_next = NULL; // enl�ve de la cha�ne
delete m_var;
if ( !m_bDontDelete ) delete m_listVar;
}
-// routine à optimiser
+// routine � optimiser
CBotStack* CBotStack::AddStack(CBotInstr* instr, BOOL bBlock)
{
if (m_next != NULL)
@@ -261,7 +274,7 @@ CBotStack* CBotStack::AddStack(CBotInstr* instr, BOOL bBlock)
return m_next; // reprise dans une pile existante
}
CBotStack* p = new CBotStack(this);
- m_next = p; // chaîne l'élément
+ m_next = p; // cha�ne l'�l�ment
p->m_bBlock = bBlock;
p->m_instr = instr;
p->m_prog = m_prog;
@@ -281,12 +294,12 @@ CBotStack* CBotStack::AddStackEOX(CBotCall* instr, BOOL bBlock)
return m_next; // reprise dans une pile existante
}
CBotStack* p = new CBotStack(this);
- m_next = p; // chaîne l'élément
+ m_next = p; // cha�ne l'�l�ment
p->m_bBlock = bBlock;
p->m_call = instr;
p->m_prog = m_prog;
p->m_step = 0;
- p->m_bFunc = 2; // spécial
+ p->m_bFunc = 2; // sp�cial
return p;
}
@@ -294,12 +307,12 @@ CBotStack* CBotStack::AddStack2(BOOL bBlock)
{
if (m_next2 != NULL)
{
- m_next2->m_prog = m_prog; // spécial évite un RestoreStack2
+ m_next2->m_prog = m_prog; // sp�cial �vite un RestoreStack2
return m_next2; // reprise dans une pile existante
}
CBotStack* p = new CBotStack(this);
- m_next2 = p; // chaîne l'élément
+ m_next2 = p; // cha�ne l'�l�ment
p->m_bBlock = bBlock;
p->m_prog = m_prog;
p->m_step = 0;
@@ -309,13 +322,13 @@ CBotStack* CBotStack::AddStack2(BOOL bBlock)
BOOL CBotStack::Return(CBotStack* pfils)
{
- if ( pfils == this ) return TRUE; // spécial
+ if ( pfils == this ) return TRUE; // sp�cial
- if (m_var != NULL) delete m_var; // valeur remplacée ?
- m_var = pfils->m_var; // résultat transmis
- pfils->m_var = NULL; // ne pas détruite la variable
+ if (m_var != NULL) delete m_var; // valeur remplac�e ?
+ m_var = pfils->m_var; // r�sultat transmis
+ pfils->m_var = NULL; // ne pas d�truite la variable
- if ( m_next != EOX ) delete m_next; // libère la pile au dessus
+ if ( m_next != EOX ) delete m_next; // lib�re la pile au dessus
delete m_next2;m_next2 = NULL; // aussi la seconde pile (catch)
return (m_error == 0); // interrompu si erreur
@@ -323,7 +336,7 @@ BOOL CBotStack::Return(CBotStack* pfils)
BOOL CBotStack::StackOver()
{
- return FALSE; // pas de test de débordement dans cette version
+ return FALSE; // pas de test de d�bordement dans cette version
}
#endif
@@ -345,7 +358,7 @@ CBotStack* CBotStack::RestoreStack(CBotInstr* instr)
{
if (m_next != NULL)
{
- m_next->m_instr = instr; // réinit (si reprise après restitution)
+ m_next->m_instr = instr; // r�init (si reprise apr�s restitution)
m_next->m_prog = m_prog;
return m_next; // reprise dans une pile existante
}
@@ -361,7 +374,7 @@ CBotStack* CBotStack::RestoreStackEOX(CBotCall* instr)
-// routine pour l'exécution pas à pas
+// routine pour l'ex�cution pas � pas
BOOL CBotStack::IfStep()
{
if ( m_initimer > 0 || m_step++ > 0 ) return FALSE;
@@ -389,7 +402,7 @@ BOOL CBotStack::IfContinue(int state, const char* name)
if (!m_labelBreak.IsEmpty() && (name == NULL || m_labelBreak != name))
return FALSE; // c'est pas pour moi
- m_state = state; // où reprendre ?
+ m_state = state; // o� reprendre ?
m_error = 0;
m_labelBreak.Empty();
if ( m_next != EOX ) m_next->Delete(); // purge la pile au dessus
@@ -398,7 +411,7 @@ BOOL CBotStack::IfContinue(int state, const char* name)
void CBotStack::SetBreak(int val, const char* name)
{
- m_error = -val; // réagit comme une Exception
+ m_error = -val; // r�agit comme une Exception
m_labelBreak = name;
if (val == 3) // pour un return
{
@@ -407,7 +420,7 @@ void CBotStack::SetBreak(int val, const char* name)
}
}
-// remet sur la pile la valeur calculée par le dernier CBotReturn
+// remet sur la pile la valeur calcul�e par le dernier CBotReturn
BOOL CBotStack::GivRetVar(BOOL bRet)
{
@@ -453,7 +466,7 @@ void CBotStack::SetType(CBotTypResult& type)
// trouve une variable par son token
-// ce peut être une variable composée avec un point
+// ce peut �tre une variable compos�e avec un point
CBotVar* CBotStack::FindVar(CBotToken* &pToken, BOOL bUpdate, BOOL bModif)
{
CBotStack* p = this;
@@ -497,7 +510,7 @@ CBotVar* CBotStack::FindVar(const char* name)
return NULL;
}
-// retrouve une variable sur la pile selon son numéro d'identification
+// retrouve une variable sur la pile selon son num�ro d'identification
// ce qui va plus vite que de comparer les noms.
CBotVar* CBotStack::FindVar(long ident, BOOL bUpdate, BOOL bModif)
@@ -546,22 +559,22 @@ BOOL CBotStack::SetState(int n, int limite)
{
m_state = n;
- m_timer--; // décompte les opérations
- return ( m_timer > limite ); // interrompu si timer passé
+ m_timer--; // d�compte les op�rations
+ return ( m_timer > limite ); // interrompu si timer pass�
}
BOOL CBotStack::IncState(int limite)
{
m_state++;
- m_timer--; // décompte les opérations
- return ( m_timer > limite ); // interrompu si timer passé
+ m_timer--; // d�compte les op�rations
+ return ( m_timer > limite ); // interrompu si timer pass�
}
void CBotStack::SetError(int n, CBotToken* token)
{
- if ( n!= 0 && m_error != 0) return; // ne change pas une erreur déjà existante
+ if ( n!= 0 && m_error != 0) return; // ne change pas une erreur d�j� existante
m_error = n;
if (token != NULL)
{
@@ -590,7 +603,7 @@ void CBotStack::SetTimer(int n)
BOOL CBotStack::Execute()
{
- CBotCall* instr = NULL; // instruction la plus élevée
+ CBotCall* instr = NULL; // instruction la plus �lev�e
CBotStack* pile;
CBotStack* p = this;
@@ -606,9 +619,9 @@ BOOL CBotStack::Execute()
p = p->m_next;
}
- if ( instr == NULL ) return TRUE; // exécution normale demandée
+ if ( instr == NULL ) return TRUE; // ex�cution normale demand�e
- if (!instr->Run(pile)) return FALSE; // exécution à partir de là
+ if (!instr->Run(pile)) return FALSE; // ex�cution � partir de l�
#if STACKMEM
pile->m_next->Delete();
@@ -616,11 +629,11 @@ BOOL CBotStack::Execute()
delete pile->m_next;
#endif
- pile->m_next = EOX; // spécial pour reprise
+ pile->m_next = EOX; // sp�cial pour reprise
return TRUE;
}
-// met sur le stack le pointeur à une variable
+// met sur le stack le pointeur � une variable
void CBotStack::SetVar( CBotVar* var )
{
if (m_var) delete m_var; // remplacement d'une variable
@@ -644,7 +657,7 @@ CBotVar* CBotStack::GivVar()
CBotVar* CBotStack::GivPtVar()
{
CBotVar* p = m_var;
- m_var = NULL; // ne sera pas détruit donc
+ m_var = NULL; // ne sera pas d�truit donc
return p;
}
@@ -669,7 +682,7 @@ void CBotStack::AddVar(CBotVar* pVar)
{
CBotStack* p = this;
- // revient sur l'élement père
+ // revient sur l'�lement p�re
while (p != NULL && p->m_bBlock == 0) p = p->m_prev;
if ( p == NULL ) return;
@@ -679,7 +692,7 @@ void CBotStack::AddVar(CBotVar* pVar)
CBotVar** pp = &p->m_listVar;
while ( *pp != NULL ) pp = &(*pp)->m_next;
- *pp = pVar; // ajoute à la suite
+ *pp = pVar; // ajoute � la suite
#ifdef _DEBUG
if ( pVar->GivUniqNum() == 0 ) __asm int 3;
@@ -725,7 +738,7 @@ BOOL CBotStack::ExecuteCall(long& nIdent, CBotToken* token, CBotVar** ppVar, CBo
res = m_prog->GivFunctions()->DoCall(nIdent, NULL, ppVar, this, token );
if (res.GivType() >= 0) return res.GivType();
- // si pas trouvé (recompilé ?) cherche selon le nom
+ // si pas trouv� (recompil� ?) cherche selon le nom
nIdent = 0;
res = CBotCall::DoCall(nIdent, token, ppVar, this, rettype );
@@ -756,7 +769,7 @@ BOOL SaveVar(FILE* pf, CBotVar* pVar)
return WriteWord(pf, 0); // met un terminateur
}
- if ( !pVar->Save0State(pf)) return FALSE; // entête commune
+ if ( !pVar->Save0State(pf)) return FALSE; // ent�te commune
if ( !pVar->Save1State(pf) ) return FALSE; // sauve selon la classe fille
pVar = pVar->GivNext();
@@ -767,8 +780,8 @@ void CBotStack::GetRunPos(const char* &FunctionName, int &start, int &end)
{
CBotProgram* prog = m_prog; // programme courrant
- CBotInstr* funct = NULL; // fonction trouvée
- CBotInstr* instr = NULL; // instruction la plus élevée
+ CBotInstr* funct = NULL; // fonction trouv�e
+ CBotInstr* instr = NULL; // instruction la plus �lev�e
CBotStack* p = this;
@@ -814,7 +827,7 @@ CBotVar* CBotStack::GivStackVars(const char* &FunctionName, int level)
}
- // descend sur les éléments de block
+ // descend sur les �l�ments de block
while ( p != NULL && !p->m_bBlock ) p = p->m_prev;
while ( p != NULL && level++ < 0 )
@@ -858,12 +871,12 @@ BOOL CBotStack::SaveState(FILE* pf)
if (!WriteWord(pf, 1)) return FALSE; // une marque de poursuite
}
if (!WriteWord(pf, m_bBlock)) return FALSE; // est-ce un bloc local
- if (!WriteWord(pf, m_state)) return FALSE; // dans quel état
- if (!WriteWord(pf, 0)) return FALSE; // par compatibilité m_bDontDelete
- if (!WriteWord(pf, m_step)) return FALSE; // dans quel état
+ if (!WriteWord(pf, m_state)) return FALSE; // dans quel �tat
+ if (!WriteWord(pf, 0)) return FALSE; // par compatibilit� m_bDontDelete
+ if (!WriteWord(pf, m_step)) return FALSE; // dans quel �tat
- if (!SaveVar(pf, m_var)) return FALSE; // le résultat courant
+ if (!SaveVar(pf, m_var)) return FALSE; // le r�sultat courant
if (!SaveVar(pf, m_listVar)) return FALSE; // les variables locales
return m_next->SaveState(pf); // enregistre la suite
@@ -893,13 +906,13 @@ BOOL CBotStack::RestoreState(FILE* pf, CBotStack* &pStack)
if (!ReadWord(pf, w)) return FALSE; // est-ce un bloc local
pStack->m_bBlock = w;
- if (!ReadWord(pf, w)) return FALSE; // dans quel état j'ère ?
- pStack->SetState((short)w); // dans le bon état
+ if (!ReadWord(pf, w)) return FALSE; // dans quel �tat j'�re ?
+ pStack->SetState((short)w); // dans le bon �tat
if (!ReadWord(pf, w)) return FALSE; // dont delete ?
- // plus utilisé
+ // plus utilis�
- if (!ReadWord(pf, w)) return FALSE; // pas à pas
+ if (!ReadWord(pf, w)) return FALSE; // pas � pas
pStack->m_step = w;
if (!CBotVar::RestoreState(pf, pStack->m_var)) return FALSE; // la variable temp
@@ -911,10 +924,10 @@ BOOL CBotStack::RestoreState(FILE* pf, CBotStack* &pStack)
BOOL CBotVar::Save0State(FILE* pf)
{
- if (!WriteWord(pf, 100+m_mPrivate))return FALSE; // variable privée ?
+ if (!WriteWord(pf, 100+m_mPrivate))return FALSE; // variable priv�e ?
if (!WriteWord(pf, m_bStatic))return FALSE; // variable static ?
if (!WriteWord(pf, m_type.GivType()))return FALSE; // enregiste le type (toujours non nul)
- if (!WriteWord(pf, m_binit))return FALSE; // variable définie ?
+ if (!WriteWord(pf, m_binit))return FALSE; // variable d�finie ?
return WriteString(pf, m_token->GivString()); // et le nom de la variable
}
@@ -922,7 +935,7 @@ BOOL CBotVarInt::Save0State(FILE* pf)
{
if ( !m_defnum.IsEmpty() )
{
- if(!WriteWord(pf, 200 )) return FALSE; // marqueur spécial
+ if(!WriteWord(pf, 200 )) return FALSE; // marqueur sp�cial
if(!WriteString(pf, m_defnum)) return FALSE; // nom de la valeur
}
@@ -971,9 +984,9 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
CBotVar* pNew = NULL;
CBotVar* pPrev = NULL;
- while ( TRUE ) // recupère toute une liste
+ while ( TRUE ) // recup�re toute une liste
{
- if (!ReadWord(pf, w)) return FALSE; // privé ou type ?
+ if (!ReadWord(pf, w)) return FALSE; // priv� ou type ?
if ( w == 0 ) return TRUE;
CBotString defnum;
@@ -991,7 +1004,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
if (!ReadWord(pf, w)) return FALSE; // type
}
- if ( w == CBotTypClass ) w = CBotTypIntrinsic; // forcément intrinsèque
+ if ( w == CBotTypClass ) w = CBotTypIntrinsic; // forc�ment intrins�que
if (!ReadWord(pf, wi)) return FALSE; // init ?
@@ -1003,22 +1016,22 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
{
case CBotTypInt:
case CBotTypBoolean:
- pNew = CBotVar::Create(&token, w); // crée une variable
+ pNew = CBotVar::Create(&token, w); // cr�e une variable
if (!ReadWord(pf, w)) return FALSE;
pNew->SetValInt((short)w, defnum);
break;
case CBotTypFloat:
- pNew = CBotVar::Create(&token, w); // crée une variable
+ pNew = CBotVar::Create(&token, w); // cr�e une variable
if (!ReadFloat(pf, ww)) return FALSE;
pNew->SetValFloat(ww);
break;
case CBotTypString:
- pNew = CBotVar::Create(&token, w); // crée une variable
+ pNew = CBotVar::Create(&token, w); // cr�e une variable
if (!ReadString(pf, s)) return FALSE;
pNew->SetValString(s);
break;
- // restitue un objet intrinsic ou un élément d'un array
+ // restitue un objet intrinsic ou un �l�ment d'un array
case CBotTypIntrinsic:
case CBotTypArrayBody:
{
@@ -1032,7 +1045,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
CBotVar* p = NULL;
if ( id ) p = CBotVarClass::Find(id) ;
- pNew = new CBotVarClass(&token, r); // crée directement une instance
+ pNew = new CBotVarClass(&token, r); // cr�e directement une instance
// attention cptuse = 0
if ( !RestoreState(pf, ((CBotVarClass*)pNew)->m_pVar)) return FALSE;
pNew->SetIdent(id);
@@ -1040,7 +1053,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
if ( p != NULL )
{
delete pNew;
- pNew = p; // reprend l'élément connu
+ pNew = p; // reprend l'�l�ment connu
}
}
}
@@ -1050,7 +1063,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
case CBotTypNullPointer:
if (!ReadString(pf, s)) return FALSE;
{
- pNew = CBotVar::Create(&token, CBotTypResult(w, s));// crée une variable
+ pNew = CBotVar::Create(&token, CBotTypResult(w, s));// cr�e une variable
CBotVarClass* p = NULL;
long id;
ReadLong(pf, id);
@@ -1061,7 +1074,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
if ( !CBotVar::RestoreState( pf, pInstance ) ) return FALSE;
((CBotVarPointer*)pNew)->SetPointer( pInstance ); // et pointe dessus
-// if ( p != NULL ) ((CBotVarPointer*)pNew)->SetPointer( p ); // plutôt celui-ci !
+// if ( p != NULL ) ((CBotVarPointer*)pNew)->SetPointer( p ); // plut�t celui-ci !
}
break;
@@ -1071,7 +1084,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
CBotTypResult r;
if (!ReadType(pf, r)) return FALSE;
- pNew = CBotVar::Create(&token, r); // crée une variable
+ pNew = CBotVar::Create(&token, r); // cr�e une variable
// restitue une copie de l'instance d'origine
CBotVar* pInstance = NULL;
@@ -1098,7 +1111,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
////////////////////////////////////////////////////////////////////////////
-// gestion de la pile à la compilation
+// gestion de la pile � la compilation
////////////////////////////////////////////////////////////////////////////
CBotProgram* CBotCStack::m_prog = NULL; // init la variable statique
@@ -1134,19 +1147,19 @@ CBotCStack::CBotCStack(CBotCStack* ppapa)
CBotCStack::~CBotCStack()
{
if (m_next != NULL) delete m_next;
- if (m_prev != NULL) m_prev->m_next = NULL; // enlève de la chaîne
+ if (m_prev != NULL) m_prev->m_next = NULL; // enl�ve de la cha�ne
delete m_var;
delete m_listVar;
}
-// utilisé uniquement à la compilation
+// utilis� uniquement � la compilation
CBotCStack* CBotCStack::TokenStack(CBotToken* pToken, BOOL bBlock)
{
if (m_next != NULL) return m_next; // reprise dans une pile existante
CBotCStack* p = new CBotCStack(this);
- m_next = p; // chaîne l'élément
+ m_next = p; // cha�ne l'�l�ment
p->m_bBlock = bBlock;
if (pToken != NULL) p->SetStartError(pToken->GivStart());
@@ -1159,13 +1172,13 @@ CBotInstr* CBotCStack::Return(CBotInstr* inst, CBotCStack* pfils)
{
if ( pfils == this ) return inst;
- if (m_var != NULL) delete m_var; // valeur remplacée ?
- m_var = pfils->m_var; // résultat transmis
- pfils->m_var = NULL; // ne pas détruire la variable
+ if (m_var != NULL) delete m_var; // valeur remplac�e ?
+ m_var = pfils->m_var; // r�sultat transmis
+ pfils->m_var = NULL; // ne pas d�truire la variable
if (m_error)
{
- m_start = pfils->m_start; // récupère la position de l'erreur
+ m_start = pfils->m_start; // r�cup�re la position de l'erreur
m_end = pfils->m_end;
}
@@ -1175,13 +1188,13 @@ CBotInstr* CBotCStack::Return(CBotInstr* inst, CBotCStack* pfils)
CBotFunction* CBotCStack::ReturnFunc(CBotFunction* inst, CBotCStack* pfils)
{
- if (m_var != NULL) delete m_var; // valeur remplacée ?
- m_var = pfils->m_var; // résultat transmis
- pfils->m_var = NULL; // ne pas détruire la variable
+ if (m_var != NULL) delete m_var; // valeur remplac�e ?
+ m_var = pfils->m_var; // r�sultat transmis
+ pfils->m_var = NULL; // ne pas d�truire la variable
if (m_error)
{
- m_start = pfils->m_start; // récupère la position de l'erreur
+ m_start = pfils->m_start; // r�cup�re la position de l'erreur
m_end = pfils->m_end;
}
@@ -1235,7 +1248,7 @@ void CBotCStack::SetType(CBotTypResult& type)
}
// cherche une variable sur la pile
-// le token peut être une suite de TokenTypVar (objet d'une classe)
+// le token peut �tre une suite de TokenTypVar (objet d'une classe)
// ou un pointeur dans le source
CBotVar* CBotCStack::FindVar(CBotToken* &pToken)
@@ -1284,20 +1297,20 @@ BOOL CBotCStack::IsOk()
void CBotCStack::SetStartError( int pos )
{
- if ( m_error != 0) return; // ne change pas une erreur déjà existante
+ if ( m_error != 0) return; // ne change pas une erreur d�j� existante
m_start = pos;
}
void CBotCStack::SetError(int n, int pos)
{
- if ( n!= 0 && m_error != 0) return; // ne change pas une erreur déjà existante
+ if ( n!= 0 && m_error != 0) return; // ne change pas une erreur d�j� existante
m_error = n;
m_end = pos;
}
void CBotCStack::SetError(int n, CBotToken* p)
{
- if (m_error) return; // ne change pas une erreur déjà existante
+ if (m_error) return; // ne change pas une erreur d�j� existante
m_error = n;
m_start = p->GivStart();
m_end = p->GivEnd();
@@ -1366,7 +1379,7 @@ void CBotCStack::AddVar(CBotVar* pVar)
{
CBotCStack* p = this;
- // revient sur l'élement père
+ // revient sur l'�lement p�re
while (p != NULL && p->m_bBlock == 0) p = p->m_prev;
if ( p == NULL ) return;
@@ -1374,14 +1387,14 @@ void CBotCStack::AddVar(CBotVar* pVar)
CBotVar** pp = &p->m_listVar;
while ( *pp != NULL ) pp = &(*pp)->m_next;
- *pp = pVar; // ajoute à la suite
+ *pp = pVar; // ajoute � la suite
#ifdef _DEBUG
if ( pVar->GivUniqNum() == 0 ) __asm int 3;
#endif
}
-// test si une variable est déjà définie localement
+// test si une variable est d�j� d�finie localement
BOOL CBotCStack::CheckVarLocal(CBotToken* &pToken)
{
@@ -1414,7 +1427,7 @@ CBotTypResult CBotCStack::CompileCall(CBotToken* &p, CBotVar** ppVars, long& nId
val = m_prog->GivFunctions()->CompileCall(p->GivString(), ppVars, nIdent);
if ( val.GivType() < 0 )
{
- // pVar = NULL; // l'erreur n'est pas sur un paramètre en particulier
+ // pVar = NULL; // l'erreur n'est pas sur un param�tre en particulier
SetError( -val.GivType(), p );
val.SetType(-val.GivType());
return val;
@@ -1423,7 +1436,7 @@ CBotTypResult CBotCStack::CompileCall(CBotToken* &p, CBotVar** ppVars, long& nId
return val;
}
-// test si un nom de procédure est déjà défini quelque part
+// test si un nom de proc�dure est d�j� d�fini quelque part
BOOL CBotCStack::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
{
@@ -1436,7 +1449,7 @@ BOOL CBotCStack::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
{
if ( pToken->GivString() == pp->GivName() )
{
- // les paramètres sont-ils exactement les mêmes ?
+ // les param�tres sont-ils exactement les m�mes ?
if ( pp->CheckParam( pParam ) )
return TRUE;
}
@@ -1448,7 +1461,7 @@ BOOL CBotCStack::CheckCall(CBotToken* &pToken, CBotDefParam* pParam)
{
if ( pToken->GivString() == pp->GivName() )
{
- // les paramètres sont-ils exactement les mêmes ?
+ // les param�tres sont-ils exactement les m�mes ?
if ( pp->CheckParam( pParam ) )
return TRUE;
}
diff --git a/src/CBot/CBotString.cpp b/src/CBot/CBotString.cpp
index bcbe399..09c45fb 100644
--- a/src/CBot/CBotString.cpp
+++ b/src/CBot/CBotString.cpp
@@ -1,13 +1,24 @@
-/////////////////////////////////////////////////////
-// gestion de chaine
-// basé sur le CString de MFC
-// mais moins complet
+// * 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 .
#include "CBot.h"
#include <string.h>
-HINSTANCE CBotString::m_hInstance = (HINSTANCE)LoadLibrary("Cbot.dll"); // comment le récupérer autrement ??
+HINSTANCE CBotString::m_hInstance = (HINSTANCE)LoadLibrary("Cbot.dll"); // comment le r�cup�rer autrement ??
CBotString::CBotString()
@@ -438,7 +449,7 @@ CBotStringArray::CBotStringArray()
CBotStringArray::~CBotStringArray()
{
- SetSize(0); // détruit les données !
+ SetSize(0); // d�truit les donn�es !
}
@@ -503,7 +514,7 @@ static void CopyElements(CBotString* pDest, CBotString* pSrc, int nCount)
-// sélect la taille du tableau
+// s�lect la taille du tableau
void CBotStringArray::SetSize(int nNewSize)
{
diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp
index 4e99cf9..6fd9e33 100644
--- a/src/CBot/CBotToken.cpp
+++ b/src/CBot/CBotToken.cpp
@@ -1,10 +1,21 @@
-//////////////////////////////////////////////////////////////////
-// Gestion des Tokens
-// le texte d'un programme est d'abord transformé
-// en une suite de tokens pour facilité l'interprétation
+// * 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 .
// il faudra traiter le seul cas d'erreur possible
-// qui est un caractère illégal dans une string
+// qui est un caract�re ill�gal dans une string
#include "CBot.h"
@@ -20,7 +31,7 @@ CBotToken::CBotToken()
m_next = NULL;
m_prev = NULL;
- m_type = TokenTypVar; // à priori un nom d'une variable
+ m_type = TokenTypVar; // � priori un nom d'une variable
m_IdKeyWord = -1;
}
@@ -53,14 +64,14 @@ CBotToken::CBotToken(const CBotToken* pSrc)
CBotToken::CBotToken(CBotString& mot, CBotString& sep, int start, int end)
{
- m_Text = mot; // mot trouvé comme token
- m_Sep = sep; // séparateurs qui suivent
+ m_Text = mot; // mot trouv� comme token
+ m_Sep = sep; // s�parateurs qui suivent
m_next = NULL;
m_prev = NULL;
m_start = start;
m_end = end;
- m_type = TokenTypVar; // à priori un nom d'une variable
+ m_type = TokenTypVar; // � priori un nom d'une variable
m_IdKeyWord = -1;
}
@@ -71,13 +82,13 @@ CBotToken::CBotToken(const char* mot, const char* sep)
m_next = NULL;
m_prev = NULL;
- m_type = TokenTypVar; // à priori un nom d'une variable
+ m_type = TokenTypVar; // � priori un nom d'une variable
m_IdKeyWord = -1;
}
CBotToken::~CBotToken()
{
- delete m_next; // récursif
+ delete m_next; // r�cursif
m_next = NULL;
}
@@ -199,54 +210,54 @@ BOOL Char2InList(const char c, const char cc, const char* list)
}
static char* sep1 = " \r\n\t,:()[]{}-+*/=;><!~^|&%.";
-static char* sep2 = " \r\n\t"; // séparateurs pures
-static char* sep3 = ",:()[]{}-+*/=;<>!~^|&%."; // séparateurs opérationnels
-static char* num = "0123456789"; // le point (unique) est testé séparément
+static char* sep2 = " \r\n\t"; // s�parateurs pures
+static char* sep3 = ",:()[]{}-+*/=;<>!~^|&%."; // s�parateurs op�rationnels
+static char* num = "0123456789"; // le point (unique) est test� s�par�ment
static char* hexnum = "0123456789ABCDEFabcdef";
-static char* nch = "\"\r\n\t"; // refusé dans les chaines
+static char* nch = "\"\r\n\t"; // refus� dans les chaines
-//static char* duo = "+=-=*=/===!=<=>=++--///**/||&&";// les opérateurs doubles
+//static char* duo = "+=-=*=/===!=<=>=++--///**/||&&";// les op�rateurs doubles
// cherche le prochain token dans une phrase
-// ne doit pas commencer par des séparateurs
-// qui sont pris avec le token précédent
+// ne doit pas commencer par des s�parateurs
+// qui sont pris avec le token pr�c�dent
CBotToken* CBotToken::NextToken(char* &program, int& error, BOOL first)
{
- CBotString mot; // le mot trouvé
- CBotString sep; // les séparateurs qui le suivent
+ CBotString mot; // le mot trouv�
+ CBotString sep; // les s�parateurs qui le suivent
char c;
BOOL stop = first;
if (*program == 0) return NULL;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
if (!first)
{
mot = c; // construit le mot
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
- // cas particulier pour les chaînes de caractères
+ // cas particulier pour les cha�nes de caract�res
if ( mot[0] == '\"' )
{
while (c != 0 && !CharInList(c, nch))
{
mot += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
if ( c == '\\' )
{
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
if ( c == 'n' ) c = '\n';
if ( c == 'r' ) c = '\r';
if ( c == 't' ) c = '\t';
mot += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
}
if ( c == '\"' )
{
- mot += c; // chaîne complète
- c = *(program++); // prochain caractère
+ mot += c; // cha�ne compl�te
+ c = *(program++); // prochain caract�re
}
stop = TRUE;
}
@@ -254,30 +265,30 @@ CBotToken* CBotToken::NextToken(char* &program, int& error, BOOL first)
// cas particulier pour les nombres
if ( CharInList(mot[0], num ))
{
- BOOL bdot = FALSE; // trouvé un point ?
- BOOL bexp = FALSE; // trouvé un exposant ?
+ BOOL bdot = FALSE; // trouv� un point ?
+ BOOL bexp = FALSE; // trouv� un exposant ?
char* liste = num;
- if (mot[0] == '0' && c == 'x') // valeur hexadécimale ?
+ if (mot[0] == '0' && c == 'x') // valeur hexad�cimale ?
{
mot += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
liste = hexnum;
}
cw:
while (c != 0 && CharInList(c, liste))
{
cc: mot += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
- if ( liste == num ) // pas pour les exadécimaux
+ if ( liste == num ) // pas pour les exad�cimaux
{
if ( !bdot && c == '.' ) { bdot = TRUE; goto cc; }
if ( !bexp && ( c == 'e' || c == 'E' ) )
{
bexp = TRUE;
mot += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
if ( c == '-' ||
c == '+' ) goto cc;
goto cw;
@@ -287,13 +298,13 @@ cc: mot += c;
stop = TRUE;
}
- if (CharInList(mot[0], sep3)) // un séparateur opérationnel ?
+ if (CharInList(mot[0], sep3)) // un s�parateur op�rationnel ?
{
CBotString motc = mot;
- while (motc += c, c != 0 && GivKeyWords(motc)>0) // cherche l'opérande le plus long possible
+ while (motc += c, c != 0 && GivKeyWords(motc)>0) // cherche l'op�rande le plus long possible
{
mot += c; // construit le mot
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
stop = TRUE;
@@ -310,7 +321,7 @@ cc: mot += c;
bis:
while (CharInList(c, sep2))
{
- sep += c; // tous les séparateurs qui suivent
+ sep += c; // tous les s�parateurs qui suivent
c = *(program++);
}
if (c == '/' && *program == '/') // un commentaire dans le tas ?
@@ -318,7 +329,7 @@ bis:
while( c != '\n' && c != 0 )
{
sep += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
goto bis;
}
@@ -328,14 +339,14 @@ bis:
while( c != 0 && (c != '*' || *program != '/'))
{
sep += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
if ( c != 0 )
{
sep += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
sep += c;
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
goto bis;
}
@@ -356,7 +367,7 @@ bis:
}
mot += c; // construit le mot
- c = *(program++); // prochain caractère
+ c = *(program++); // prochain caract�re
}
}
@@ -379,12 +390,12 @@ CBotToken* CBotToken::CompileTokens(const char* program, int& error)
char* pp = p;
while (NULL != (nxt = NextToken(p, error)))
{
- prv->m_next = nxt; // ajoute à la suite
+ prv->m_next = nxt; // ajoute � la suite
nxt->m_prev = prv;
prv = nxt; // avance
nxt->m_start = pos;
-/* pos += nxt->m_Text.GivLength(); // la chaîne peut être plus courte (BOA supprimés)
+/* pos += nxt->m_Text.GivLength(); // la cha�ne peut �tre plus courte (BOA supprim�s)
nxt->m_end = pos;
pos += nxt->m_Sep.GivLength();*/
pos += (p - pp); // taille totale
@@ -393,10 +404,10 @@ CBotToken* CBotToken::CompileTokens(const char* program, int& error)
}
// ajoute un token comme terminateur
- // ( utile pour avoir le précédent )
+ // ( utile pour avoir le pr�c�dent )
nxt = new CBotToken();
nxt->m_type = 0;
- prv->m_next = nxt; // ajoute à la suite
+ prv->m_next = nxt; // ajoute � la suite
nxt->m_prev = prv;
return tokenbase;
@@ -417,7 +428,7 @@ int CBotToken::GivKeyWords(const char* w)
if (l == 0)
{
- LoadKeyWords(); // prend la liste la première fois
+ LoadKeyWords(); // prend la liste la premi�re fois
l = m_ListKeyWords.GivSize();
}
@@ -511,8 +522,8 @@ BOOL IsOfType(CBotToken* &p, int type1, int type2)
return FALSE;
}
-// idem avec un nombre indéfini d'arguments
-// il faut mettre un zéro comme dernier argument
+// idem avec un nombre ind�fini d'arguments
+// il faut mettre un z�ro comme dernier argument
BOOL IsOfTypeList(CBotToken* &p, int type1, ...)
{
int i = type1;
diff --git a/src/CBot/CBotToken.h b/src/CBot/CBotToken.h
index 2715dd5..5c54c55 100644
--- a/src/CBot/CBotToken.h
+++ b/src/CBot/CBotToken.h
@@ -1,12 +1,25 @@
-////////////////////////////////////////////////////////////////////
-// interpréteur pour le language CBot du jeu COLOBOT
+// * 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 .
-// un programme écrit est tout d'abord transformé en une liste de tokens
+// un programme �crit est tout d'abord transform� en une liste de tokens
// avant d'aborder le compilateur proprement dit
// par exemple
// int var = 3 * ( pos.y + x )
-// est décomposé en (chaque ligne est un token)
+// est d�compos� en (chaque ligne est un token)
// int
// var
// =
diff --git a/src/CBot/CBotTwoOpExpr ordre inversé.cpp b/src/CBot/CBotTwoOpExpr ordre inversé.cpp
index 65adcba..7ef646e 100644
--- a/src/CBot/CBotTwoOpExpr ordre inversé.cpp
+++ b/src/CBot/CBotTwoOpExpr ordre inversé.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 + Opérande2
-// Opérande1 > Opérande2
+// * 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 .
#include "CBot.h"
@@ -19,14 +31,14 @@ CBotTwoOpExpr::~CBotTwoOpExpr()
delete m_rightop;
}
-// type d'opérandes acceptés par les opérations
+// type d'op�randes accept�s par les op�rations
#define ENTIER ((1<<CBotTypByte)|(1<<CBotTypShort)|(1<<CBotTypChar)|(1<<CBotTypInt)|(1<<CBotTypLong))
#define FLOTANT ((1<<CBotTypFloat)|(1<<CBotTypDouble))
#define BOOLEEN (1<<CBotTypBoolean)
#define CHAINE (1<<CBotTypString)
#define CLASSE (1<<CBotTypClass)
-// liste des opérations (précéance)
+// liste des op�rations (pr�c�ance)
static int ListOp[] =
{
BOOLEEN, ID_LOG_OR, 0,
@@ -82,40 +94,40 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
CBotCStack* pStk = pStack->TokenStack(); // un bout de pile svp
- // cherche des instructions qui peuvent convenir à gauche de l'opération
- CBotInstr* left = CBotParExpr::Compile( p, pStk ) ; // expression (...) à gauche
+ // cherche des instructions qui peuvent convenir � gauche de l'op�ration
+ CBotInstr* left = CBotParExpr::Compile( p, pStk ) ; // expression (...) � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // si erreur, la transmet
CBotToken* pp = p;
- int TypeOp = pp->GetType(); // type d'opération
- p = p->Next(); // saute le token de l'opération
+ int TypeOp = pp->GetType(); // type d'op�ration
+ p = p->Next(); // saute le token de l'op�ration
- // cherche des instructions qui peuvent convenir à droite
+ // cherche des instructions qui peuvent convenir � droite
CBotInstr* right = (*pOp == 0) ?
- CBotParExpr::Compile( p, pStk ) : // expression (...) à droite
- CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A op B à droite
+ CBotParExpr::Compile( p, pStk ) : // expression (...) � droite
+ CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A op B � droite
- if (right == NULL) return pStack->Return(left, pStk); // pas d'opérande à droite ?
+ if (right == NULL) return pStack->Return(left, pStk); // pas d'op�rande � droite ?
- // est-ce qu'on a l'opération prévue entre les deux ?
+ // est-ce qu'on a l'op�ration pr�vue entre les deux ?
if ( IsInList( TypeOp, pOperations, typemasque ) )
{
- CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // élément pour opération
- inst->SetToken(pp); // mémorise l'opération
+ CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // �l�ment pour op�ration
+ inst->SetToken(pp); // m�morise l'op�ration
int type1, type2;
- type1 = pStk->GetType(); // de quel type le premier opérande ?
+ type1 = pStk->GetType(); // de quel type le premier op�rande ?
inst->m_rightop = right;
{
- // il y a un second opérande acceptable
+ // il y a un second op�rande acceptable
- type2 = pStk->GetType(); // de quel type le résultat ?
+ type2 = pStk->GetType(); // de quel type le r�sultat ?
- // quel est le type du résultat ?
+ // quel est le type du r�sultat ?
int TypeRes = MAX( type1, type2 );
if (!TypeOk( TypeRes, typemasque )) type1 = 99; // erreur de type
@@ -131,83 +143,83 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
case ID_LS:
TypeRes = CBotTypBoolean;
}
- if ( TypeCompatible (type1, type2) || // les résultats sont-ils compatibles
- // cas particulier pour les concaténation de chaînes
+ if ( TypeCompatible (type1, type2) || // les r�sultats sont-ils compatibles
+ // cas particulier pour les concat�nation de cha�nes
(TypeOp == ID_ADD && (type1 == CBotTypString || type2 == CBotTypString)))
{
- // si ok, enregistre l'opérande dans l'objet
+ // si ok, enregistre l'op�rande dans l'objet
inst->m_leftop = left;
- // met une variable sur la pile pour avoir le type de résultat
+ // met une variable sur la pile pour avoir le type de r�sultat
pStk->SetVar(new CBotVar(NULL, TypeRes));
- // et rend l'object à qui l'a demandé
+ // et rend l'object � qui l'a demand�
return pStack->Return(inst, pStk);
}
pStk->SetError(TX_BAD2TYPE, &inst->m_token);
}
- // en cas d'erreur, libère les éléments
+ // en cas d'erreur, lib�re les �l�ments
delete left;
delete inst;
// et transmet l'erreur qui se trouve sur la pile
return pStack->Return(NULL, pStk);
}
- // si on n'a pas affaire à une opération + ou -
- // rend à qui l'a demandé, l'opérande (de gauche) trouvé
- // à la place de l'objet "addition"
+ // si on n'a pas affaire � une op�ration + ou -
+ // rend � qui l'a demand�, l'op�rande (de gauche) trouv�
+ // � la place de l'objet "addition"
return pStack->Return(left, pStk);
}
-// fait l'opération d'addition ou de soustraction
+// fait l'op�ration d'addition ou de soustraction
BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pStk1 == EOX ) return TRUE;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GetState() == 0 && // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GetState() == 0 && // 1er �tat, �value l'op�rande de gauche
!m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- // passe à l'étape suivante
- pStk1->SetState(1); // prêt pour la suite
+ // passe � l'�tape suivante
+ pStk1->SetState(1); // pr�t pour la suite
- // pour les OU et ET logique, n'évalue pas la seconde expression si pas nécessaire
+ // pour les OU et ET logique, n'�value pas la seconde expression si pas n�cessaire
if ( GetTokenType() == ID_LOG_AND && pStk1->GetVal() == FALSE )
{
CBotVar* res = CBotVar::Create( NULL, CBotTypBoolean);
res->SetValInt(FALSE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
if ( GetTokenType() == ID_LOG_OR && pStk1->GetVal() == TRUE )
{
CBotVar* res = CBotVar::Create( NULL, CBotTypBoolean);
res->SetValInt(TRUE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
// qui se trouve sur la pile, justement.
- CBotStack* pStk2 = pStk1->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
- int type1 = pStk1->GetType(); // de quels types les résultats ?
+ int type1 = pStk1->GetType(); // de quels types les r�sultats ?
int type2 = pStk2->GetType();
- // crée une variable temporaire pour y mettre le résultat
- // quel est le type du résultat ?
+ // cr�e une variable temporaire pour y mettre le r�sultat
+ // quel est le type du r�sultat ?
int TypeRes = MAX(type1, type2);
switch ( GetTokenType() )
{
@@ -225,7 +237,7 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
CBotVar* temp = CBotVar::Create( NULL, MAX(type1, type2) );
int err = 0;
- // fait l'opération selon la demande
+ // fait l'op�ration selon la demande
switch (GetTokenType())
{
case ID_ADD:
@@ -244,28 +256,28 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
err = result->Modulo(pStk1->GetVar(), pStk2->GetVar());// reste de division
break;
case ID_LO:
- temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inférieur
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_HI:
- temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // supérieur
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_LS:
- temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inférieur ou égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur ou �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_HS:
- temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // supérieur ou égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur ou �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_EQ:
- temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_NE:
- temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // différent
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // diff�rent
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_LOG_AND:
case ID_AND:
@@ -292,11 +304,11 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
}
delete temp;
- pStk2->SetVar(result); // met le résultat sur la pile
- if ( err ) pStk2->SetError(err, &m_token); // et l'erreur éventuelle (division par zéro)
+ pStk2->SetVar(result); // met le r�sultat sur la pile
+ if ( err ) pStk2->SetError(err, &m_token); // et l'erreur �ventuelle (division par z�ro)
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/CBotTwoOpExpr.cpp b/src/CBot/CBotTwoOpExpr.cpp
index bc06873..d86b444 100644
--- a/src/CBot/CBotTwoOpExpr.cpp
+++ b/src/CBot/CBotTwoOpExpr.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 + Opérande2
-// Opérande1 > Opérande2
+// * 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 .
#include "CBot.h"
@@ -35,7 +47,7 @@ CBotLogicExpr::~CBotLogicExpr()
}
-// type d'opérandes acceptés par les opérations
+// type d'op�randes accept�s par les op�rations
#define ENTIER ((1<<CBotTypByte)|(1<<CBotTypShort)|(1<<CBotTypChar)|(1<<CBotTypInt)|(1<<CBotTypLong))
#define FLOTANT ((1<<CBotTypFloat)|(1<<CBotTypDouble))
#define BOOLEEN (1<<CBotTypBoolean)
@@ -43,9 +55,9 @@ CBotLogicExpr::~CBotLogicExpr()
#define POINTER (1<<CBotTypPointer)
#define INSTANCE (1<<CBotTypClass)
-// liste des opérations (précéance)
-// type acceptable, opérande
-// le zéro termine un niveau de précéance
+// liste des op�rations (pr�c�ance)
+// type acceptable, op�rande
+// le z�ro termine un niveau de pr�c�ance
static int ListOp[] =
{
@@ -112,21 +124,21 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
CBotCStack* pStk = pStack->TokenStack(); // un bout de pile svp
- // cherche des instructions qui peuvent convenir à gauche de l'opération
+ // cherche des instructions qui peuvent convenir � gauche de l'op�ration
CBotInstr* left = (*pOp == 0) ?
- CBotParExpr::Compile( p, pStk ) : // expression (...) à gauche
- CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A * B à gauche
+ CBotParExpr::Compile( p, pStk ) : // expression (...) � gauche
+ CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A * B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // si erreur, la transmet
- // est-ce qu'on a l'opérande prévu ensuite ?
+ // est-ce qu'on a l'op�rande pr�vu ensuite ?
int TypeOp = p->GivType();
if ( IsInList( TypeOp, pOperations, typemasque ) )
{
CBotTypResult type1, type2;
- type1 = pStk->GivTypResult(); // de quel type le premier opérande ?
+ type1 = pStk->GivTypResult(); // de quel type le premier op�rande ?
- if ( TypeOp == ID_LOGIC ) // cas spécial pour condition ? op1 : op2 ;
+ if ( TypeOp == ID_LOGIC ) // cas sp�cial pour condition ? op1 : op2 ;
{
if ( !type1.Eq(CBotTypBoolean) )
{
@@ -136,7 +148,7 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
CBotLogicExpr* inst = new CBotLogicExpr();
inst->m_condition = left;
- p = p->GivNext(); // saute le token de l'opération
+ p = p->GivNext(); // saute le token de l'op�ration
inst->m_op1 = CBotExpression::Compile(p, pStk);
CBotToken* pp = p;
if ( inst->m_op1 == NULL || !IsOfType( p, ID_DOTS ) )
@@ -167,32 +179,32 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
return pStack->Return(inst, pStk);
}
- CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
- p = p->GivNext(); // saute le token de l'opération
+ p = p->GivNext(); // saute le token de l'op�ration
- // cherche des instructions qui peuvent convenir à droite
+ // cherche des instructions qui peuvent convenir � droite
if ( NULL != (inst->m_rightop = CBotTwoOpExpr::Compile( p, pStk, pOp )) )
- // expression (...) à droite
+ // expression (...) � droite
{
- // il y a un second opérande acceptable
+ // il y a un second op�rande acceptable
- type2 = pStk->GivTypResult(); // de quel type le résultat ?
+ type2 = pStk->GivTypResult(); // de quel type le r�sultat ?
- // quel est le type du résultat ?
+ // quel est le type du r�sultat ?
int TypeRes = MAX( type1.GivType(3), type2.GivType(3) );
if ( TypeOp == ID_ADD && type1.Eq(CBotTypString) )
{
TypeRes = CBotTypString;
- type2 = type1; // tout type convertible en chaîne
+ type2 = type1; // tout type convertible en cha�ne
}
else if ( TypeOp == ID_ADD && type2.Eq(CBotTypString) )
{
TypeRes = CBotTypString;
- type1 = type2; // tout type convertible en chaîne
+ type1 = type2; // tout type convertible en cha�ne
}
else if (!TypeOk( TypeRes, typemasque )) type1.SetType(99);// erreur de type
@@ -210,25 +222,25 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
case ID_LS:
TypeRes = CBotTypBoolean;
}
- if ( TypeCompatible (type1, type2, TypeOp ) ) // les résultats sont-ils compatibles
+ if ( TypeCompatible (type1, type2, TypeOp ) ) // les r�sultats sont-ils compatibles
{
- // si ok, enregistre l'opérande dans l'objet
+ // si ok, enregistre l'op�rande dans l'objet
inst->m_leftop = left;
- // spécial pour évaluer les opérations de même niveau de gauche à droite
- while ( IsInList( p->GivType(), pOperations, typemasque ) ) // même(s) opération(s) suit ?
+ // sp�cial pour �valuer les op�rations de m�me niveau de gauche � droite
+ while ( IsInList( p->GivType(), pOperations, typemasque ) ) // m�me(s) op�ration(s) suit ?
{
TypeOp = p->GivType();
- CBotTwoOpExpr* i = new CBotTwoOpExpr(); // élément pour opération
- i->SetToken(p); // mémorise l'opération
- i->m_leftop = inst; // opérande de gauche
+ CBotTwoOpExpr* i = new CBotTwoOpExpr(); // �l�ment pour op�ration
+ i->SetToken(p); // m�morise l'op�ration
+ i->m_leftop = inst; // op�rande de gauche
type1 = TypeRes;
- p = p->GivNext(); // avance à la suite
+ p = p->GivNext(); // avance � la suite
i->m_rightop = CBotTwoOpExpr::Compile( p, pStk, pOp );
type2 = pStk->GivTypResult();
- if ( !TypeCompatible (type1, type2, TypeOp) ) // les résultats sont-ils compatibles
+ if ( !TypeCompatible (type1, type2, TypeOp) ) // les r�sultats sont-ils compatibles
{
pStk->SetError(TX_BAD2TYPE, &i->m_token);
delete i;
@@ -242,25 +254,25 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
CBotTypResult t(type1);
t.SetType(TypeRes);
- // met une variable sur la pile pour avoir le type de résultat
+ // met une variable sur la pile pour avoir le type de r�sultat
pStk->SetVar(CBotVar::Create((CBotToken*)NULL, t));
- // et rend l'object à qui l'a demandé
+ // et rend l'object � qui l'a demand�
return pStack->Return(inst, pStk);
}
pStk->SetError(TX_BAD2TYPE, &inst->m_token);
}
- // en cas d'erreur, libère les éléments
+ // en cas d'erreur, lib�re les �l�ments
delete left;
delete inst;
// et transmet l'erreur qui se trouve sur la pile
return pStack->Return(NULL, pStk);
}
- // si on n'a pas affaire à une opération + ou -
- // rend à qui l'a demandé, l'opérande (de gauche) trouvé
- // à la place de l'objet "addition"
+ // si on n'a pas affaire � une op�ration + ou -
+ // rend � qui l'a demand�, l'op�rande (de gauche) trouv�
+ // � la place de l'objet "addition"
return pStack->Return(left, pStk);
}
@@ -276,62 +288,62 @@ BOOL IsNan(CBotVar* left, CBotVar* right, int* err = NULL)
}
-// fait l'opération sur 2 opérandes
+// fait l'op�ration sur 2 op�randes
BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pStk1 == EOX ) return TRUE;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GivState() == 0 ) // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GivState() == 0 ) // 1er �tat, �value l'op�rande de gauche
{
if (!m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- // pour les OU et ET logique, n'évalue pas la seconde expression si pas nécessaire
+ // pour les OU et ET logique, n'�value pas la seconde expression si pas n�cessaire
if ( (GivTokenType() == ID_LOG_AND || GivTokenType() == ID_TXT_AND ) && pStk1->GivVal() == FALSE )
{
CBotVar* res = CBotVar::Create( (CBotToken*)NULL, CBotTypBoolean);
res->SetValInt(FALSE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
if ( (GivTokenType() == ID_LOG_OR||GivTokenType() == ID_TXT_OR) && pStk1->GivVal() == TRUE )
{
CBotVar* res = CBotVar::Create( (CBotToken*)NULL, CBotTypBoolean);
res->SetValInt(TRUE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
- // passe à l'étape suivante
- pStk1->SetState(1); // prêt pour la suite
+ // passe � l'�tape suivante
+ pStk1->SetState(1); // pr�t pour la suite
}
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
// qui se trouve sur la pile, justement.
- CBotStack* pStk2 = pStk1->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( pStk2->GivState() == 0 )
{
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
pStk2->IncState();
}
- CBotTypResult type1 = pStk1->GivTypResult(); // de quels types les résultats ?
+ CBotTypResult type1 = pStk1->GivTypResult(); // de quels types les r�sultats ?
CBotTypResult type2 = pStk2->GivTypResult();
- CBotStack* pStk3 = pStk2->AddStack(this); // ajoute un élément à la pile
- if ( pStk3->IfStep() ) return FALSE; // montre l'opération si step by step
+ CBotStack* pStk3 = pStk2->AddStack(this); // ajoute un �l�ment � la pile
+ if ( pStk3->IfStep() ) return FALSE; // montre l'op�ration si step by step
- // crée une variable temporaire pour y mettre le résultat
- // quel est le type du résultat ?
+ // cr�e une variable temporaire pour y mettre le r�sultat
+ // quel est le type du r�sultat ?
int TypeRes = MAX(type1.GivType(), type2.GivType());
if ( GivTokenType() == ID_ADD && type1.Eq(CBotTypString) )
@@ -357,10 +369,10 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
TypeRes = MAX(TypeRes, CBotTypFloat);
}
- // crée une variable pour le résultat
+ // cr�e une variable pour le r�sultat
CBotVar* result = CBotVar::Create( (CBotToken*)NULL, TypeRes);
- // crée une variable pour effectuer le calcul dans le type adapté
+ // cr�e une variable pour effectuer le calcul dans le type adapt�
TypeRes = MAX(type1.GivType(), type2.GivType());
if ( GivTokenType() == ID_ADD && type1.Eq(CBotTypString) )
@@ -375,7 +387,7 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
else temp = CBotVar::Create( (CBotToken*)NULL, TypeRes );
int err = 0;
- // fait l'opération selon la demande
+ // fait l'op�ration selon la demande
CBotVar* left = pStk1->GivVar();
CBotVar* right = pStk2->GivVar();
@@ -401,31 +413,31 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
break;
case ID_LO:
if ( !IsNan(left, right, &err) )
- result->SetValInt(temp->Lo(left , right)); // inférieur
+ result->SetValInt(temp->Lo(left , right)); // inf�rieur
break;
case ID_HI:
if ( !IsNan(left, right, &err) )
- result->SetValInt(temp->Hi(left , right)); // supérieur
+ result->SetValInt(temp->Hi(left , right)); // sup�rieur
break;
case ID_LS:
if ( !IsNan(left, right, &err) )
- result->SetValInt(temp->Ls(left , right)); // inférieur ou égal
+ result->SetValInt(temp->Ls(left , right)); // inf�rieur ou �gal
break;
case ID_HS:
if ( !IsNan(left, right, &err) )
- result->SetValInt(temp->Hs(left , right)); // supérieur ou égal
+ result->SetValInt(temp->Hs(left , right)); // sup�rieur ou �gal
break;
case ID_EQ:
if ( IsNan(left, right) )
result->SetValInt(left->GivInit() == right->GivInit()) ;
else
- result->SetValInt(temp->Eq(left , right)); // égal
+ result->SetValInt(temp->Eq(left , right)); // �gal
break;
case ID_NE:
if ( IsNan(left, right) )
result->SetValInt(left ->GivInit() != right->GivInit()) ;
else
- result->SetValInt(temp->Ne(left , right)); // différent
+ result->SetValInt(temp->Ne(left , right)); // diff�rent
break;
case ID_TXT_AND:
case ID_LOG_AND:
@@ -454,31 +466,31 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
}
delete temp;
- pStk2->SetVar(result); // met le résultat sur la pile
- if ( err ) pStk2->SetError(err, &m_token); // et l'erreur éventuelle (division par zéro)
+ pStk2->SetVar(result); // met le r�sultat sur la pile
+ if ( err ) pStk2->SetError(err, &m_token); // et l'erreur �ventuelle (division par z�ro)
-// pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk2); // transmet le résultat
+// pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk2); // transmet le r�sultat
}
void CBotTwoOpExpr::RestoreState(CBotStack* &pStack, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pStk1 = pStack->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pStk1 == NULL ) return;
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GivState() == 0 ) // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GivState() == 0 ) // 1er �tat, �value l'op�rande de gauche
{
m_leftop->RestoreState(pStk1, bMain); // interrompu ici !
return;
}
- CBotStack* pStk2 = pStk1->RestoreStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->RestoreStack(); // ajoute un �l�ment � la pile
if ( pStk2 == NULL ) return;
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( pStk2->GivState() == 0 )
{
m_rightop->RestoreState(pStk2, bMain); // interrompu ici !
@@ -489,7 +501,7 @@ void CBotTwoOpExpr::RestoreState(CBotStack* &pStack, BOOL bMain)
BOOL CBotLogicExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pStk1 == EOX ) return TRUE;
@@ -508,14 +520,14 @@ BOOL CBotLogicExpr::Execute(CBotStack* &pStack)
if ( !m_op2->Execute(pStk1) ) return FALSE;
}
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
void CBotLogicExpr::RestoreState(CBotStack* &pStack, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pStk1 = pStack->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pStk1 == NULL ) return;
if ( pStk1->GivState() == 0 )
@@ -549,4 +561,4 @@ void t(BOOL t)
x = 1 + t ? 1 : 3 + 4 * 2 ;
t ? 0 : "test";
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/CBot/CBotVar.cpp b/src/CBot/CBotVar.cpp
index bd5e889..bd6fe31 100644
--- a/src/CBot/CBotVar.cpp
+++ b/src/CBot/CBotVar.cpp
@@ -1,8 +1,20 @@
-////////////////////////////////////////////////////////////////////
-// Définition pour la classe CBotVar
-// gestion des variables du langage CBot
-
-// on ne crée jamais d'instance de la class mère CBotVar
+// * 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 .
+
+// on ne cr�e jamais d'instance de la class m�re CBotVar
#include "CBot.h"
@@ -106,7 +118,7 @@ CBotVarClass::CBotVarClass( const CBotToken* name, CBotTypResult& type) //, int
void CBotVarClass::InitCBotVarClass( const CBotToken* name, CBotTypResult& type ) //, int &nIdent )
{*/
if ( !type.Eq(CBotTypClass) &&
- !type.Eq(CBotTypIntrinsic) && // par comodité accepte ces types
+ !type.Eq(CBotTypIntrinsic) && // par comodit� accepte ces types
!type.Eq(CBotTypPointer) &&
!type.Eq(CBotTypArrayPointer) &&
!type.Eq(CBotTypArrayBody)) __asm int 3;
@@ -142,7 +154,7 @@ void CBotVarClass::InitCBotVarClass( const CBotToken* name, CBotTypResult& type
CBotClass* pClass2 = pClass->GivParent();
if ( pClass2 != NULL )
{
- // crée également une instance dans la classe père
+ // cr�e �galement une instance dans la classe p�re
m_pParent = new CBotVarClass(name, CBotTypResult(type.GivType(),pClass2) ); //, nIdent);
}
@@ -158,7 +170,7 @@ CBotVarClass::~CBotVarClass( )
if ( m_pParent ) delete m_pParent;
m_pParent = NULL;
- // libère l'objet indirect s'il y a lieu
+ // lib�re l'objet indirect s'il y a lieu
// if ( m_Indirect != NULL )
// m_Indirect->DecrementUse();
@@ -248,7 +260,7 @@ void* CBotVar::GivUserPtr()
BOOL CBotVar::Save1State(FILE* pf)
{
- // cette routine "virtual" ne doit jamais être appellée,
+ // cette routine "virtual" ne doit jamais �tre appell�e,
// il doit y avoir une routine pour chaque classe fille (CBotVarInt, CBotVarFloat, etc)
// ( voir le type dans m_type )
__asm int 3;
@@ -262,7 +274,7 @@ void CBotVar::Maj(void* pUser, BOOL bContinu)
}
-// crée une variable selon son type
+// cr�e une variable selon son type
CBotVar* CBotVar::Create(const CBotToken* name, int type )
{
@@ -290,7 +302,7 @@ CBotVar* CBotVar::Create(const CBotToken* name, CBotTypResult type)
return new CBotVarClass(name, type);
case CBotTypClass:
- // crée une nouvelle instance d'une classe
+ // cr�e une nouvelle instance d'une classe
// et retourne le POINTER sur cette instance
{
CBotVarClass* instance = new CBotVarClass(name, type);
@@ -312,7 +324,7 @@ CBotVar* CBotVar::Create(const CBotToken* name, CBotTypResult type)
while (type.Eq(CBotTypArrayBody))
{
type = type.GivTypElem();
- pv = ((CBotVarArray*)pv)->GivItem(0, TRUE); // crée au moins l'élément [0]
+ pv = ((CBotVarArray*)pv)->GivItem(0, TRUE); // cr�e au moins l'�l�ment [0]
}
return array;
@@ -360,7 +372,7 @@ CBotVar* CBotVar::Create( const char* n, CBotTypResult type)
}
case CBotTypClass:
- // crée une nouvelle instance d'une classe
+ // cr�e une nouvelle instance d'une classe
// et retourne le POINTER sur cette instance
{
CBotVarClass* instance = new CBotVarClass(&name, type);
@@ -383,7 +395,7 @@ CBotVar* CBotVar::Create( const char* n, CBotTypResult type)
while (type.Eq(CBotTypArrayBody))
{
type = type.GivTypElem();
- pv = ((CBotVarArray*)pv)->GivItem(0, TRUE); // crée au moins l'élément [0]
+ pv = ((CBotVarArray*)pv)->GivItem(0, TRUE); // cr�e au moins l'�l�ment [0]
}
return array;
@@ -452,7 +464,7 @@ void CBotVar::SetType(CBotTypResult& type)
int CBotVar::GivInit()
{
- if ( m_type.Eq(CBotTypClass) ) return IS_DEF; // toujours défini !
+ if ( m_type.Eq(CBotTypClass) ) return IS_DEF; // toujours d�fini !
return m_binit;
}
@@ -460,7 +472,7 @@ int CBotVar::GivInit()
void CBotVar::SetInit(BOOL bInit)
{
m_binit = bInit;
- if ( bInit == 2 ) m_binit = IS_DEF; // cas spécial
+ if ( bInit == 2 ) m_binit = IS_DEF; // cas sp�cial
if ( m_type.Eq(CBotTypPointer) && bInit == 2 )
{
@@ -525,7 +537,7 @@ CBotVar* CBotVar::GivItem(int row, BOOL bGrow)
return NULL;
}
-// dit si une variable appartient à une classe donnée
+// dit si une variable appartient � une classe donn�e
BOOL CBotVar::IsElemOfClass(const char* name)
{
CBotClass* pc = NULL;
@@ -551,7 +563,7 @@ BOOL CBotVar::IsElemOfClass(const char* name)
CBotVar* CBotVar::GivStaticVar()
{
- // rend le pointeur à la variable si elle est statique
+ // rend le pointeur � la variable si elle est statique
if ( m_bStatic == 0 || m_pMyThis == NULL ) return this;
CBotClass* pClass = m_pMyThis->GivClass();
@@ -604,7 +616,7 @@ void CBotVar::SetVal(CBotVar* var)
__asm int 3;
}
- m_binit = var->m_binit; // copie l'état nan s'il y a
+ m_binit = var->m_binit; // copie l'�tat nan s'il y a
}
void CBotVar::SetStatic(BOOL bStatic)
@@ -644,8 +656,8 @@ CBotVarClass* CBotVar::GivPointer()
return NULL;
}
-// toutes ces fonctions doivent être définies dans les classes filles
-// dérivées de la classe CBotVar
+// toutes ces fonctions doivent �tre d�finies dans les classes filles
+// d�riv�es de la classe CBotVar
int CBotVar::GivValInt()
{
@@ -834,7 +846,7 @@ void CBotVarInt::Copy(CBotVar* pSrc, BOOL bName)
m_pMyThis = NULL;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
m_defnum = p->m_defnum;
@@ -1047,7 +1059,7 @@ void CBotVarFloat::Copy(CBotVar* pSrc, BOOL bName)
m_pMyThis = NULL;//p->m_pMyThis;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
}
@@ -1208,7 +1220,7 @@ void CBotVarBoolean::Copy(CBotVar* pSrc, BOOL bName)
m_pMyThis = NULL;//p->m_pMyThis;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
}
@@ -1306,7 +1318,7 @@ void CBotVarString::Copy(CBotVar* pSrc, BOOL bName)
m_pMyThis = NULL;//p->m_pMyThis;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
}
@@ -1379,7 +1391,7 @@ BOOL CBotVarString::Hs(CBotVar* left, CBotVar* right)
// copie une variable dans une autre
void CBotVarClass::Copy(CBotVar* pSrc, BOOL bName)
{
- pSrc = pSrc->GivPointer(); // si source donné par un pointeur
+ pSrc = pSrc->GivPointer(); // si source donn� par un pointeur
if ( pSrc->GivType() != CBotTypClass )
__asm int 3;
@@ -1402,7 +1414,7 @@ __asm int 3; "que faire du pParent";
m_pMyThis = NULL;//p->m_pMyThis;
m_ItemIdent = p->m_ItemIdent;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
delete m_pVar;
@@ -1439,7 +1451,7 @@ void CBotVarClass::SetClass(CBotClass* pClass)//, int &nIdent)
m_pClass = pClass;
- // initialise les variables associées à cette classe
+ // initialise les variables associ�es � cette classe
delete m_pVar;
m_pVar = NULL;
@@ -1449,24 +1461,24 @@ void CBotVarClass::SetClass(CBotClass* pClass)//, int &nIdent)
while ( pv != NULL )
{
// cherche les dimensions max du tableau
- CBotInstr* p = pv->m_LimExpr; // les différentes formules
+ CBotInstr* p = pv->m_LimExpr; // les diff�rentes formules
if ( p != NULL )
{
- CBotStack* pile = CBotStack::FirstStack(); // une pile indépendante
+ CBotStack* pile = CBotStack::FirstStack(); // une pile ind�pendante
int n = 0;
int max[100];
while (p != NULL)
{
while( pile->IsOk() && !p->Execute(pile) ) ; // calcul de la taille sans interruptions
- CBotVar* v = pile->GivVar(); // résultat
+ CBotVar* v = pile->GivVar(); // r�sultat
max[n] = v->GivValInt(); // valeur
n++;
p = p->GivNext3();
}
while (n<100) max[n++] = 0;
- pv->m_type.SetArray( max ); // mémorise les limitations
+ pv->m_type.SetArray( max ); // m�morise les limitations
pile->Delete();
}
@@ -1477,20 +1489,20 @@ void CBotVarClass::SetClass(CBotClass* pClass)//, int &nIdent)
if ( pv->m_InitExpr != NULL ) // expression pour l'initialisation ?
{
#if STACKMEM
- CBotStack* pile = CBotStack::FirstStack(); // une pile indépendante
+ CBotStack* pile = CBotStack::FirstStack(); // une pile ind�pendante
- while(pile->IsOk() && !pv->m_InitExpr->Execute(pile, pn)); // évalue l'expression sans timer
+ while(pile->IsOk() && !pv->m_InitExpr->Execute(pile, pn)); // �value l'expression sans timer
pile->Delete();
#else
- CBotStack* pile = new CBotStack(NULL); // une pile indépendante
- while(!pv->m_InitExpr->Execute(pile)); // évalue l'expression sans timer
+ CBotStack* pile = new CBotStack(NULL); // une pile ind�pendante
+ while(!pv->m_InitExpr->Execute(pile)); // �value l'expression sans timer
pn->SetVal( pile->GivVar() ) ;
delete pile;
#endif
}
-// pn->SetUniqNum(CBotVar::NextUniqNum()); // numérote les éléments
+// pn->SetUniqNum(CBotVar::NextUniqNum()); // num�rote les �l�ments
pn->SetUniqNum(pv->GivUniqNum()); //++nIdent
pn->m_pMyThis = this;
@@ -1511,12 +1523,12 @@ void CBotVarClass::Maj(void* pUser, BOOL bContinu)
/* if (!bContinu && m_pMyThis != NULL)
m_pMyThis->Maj(pUser, TRUE);*/
- // une routine de mise à jour existe-elle ?
+ // une routine de mise � jour existe-elle ?
if ( m_pClass->m_rMaj == NULL ) return;
- // récupère le pointeur user selon la classe
- // ou selon le paramètre passé au CBotProgram::Run()
+ // r�cup�re le pointeur user selon la classe
+ // ou selon le param�tre pass� au CBotProgram::Run()
if ( m_pUserPtr != NULL) pUser = m_pUserPtr;
if ( pUser == OBJECTDELETED ||
@@ -1553,7 +1565,7 @@ CBotVar* CBotVarClass::GivItemRef(int nIdent)
}
// pour la gestion d'un tableau
-// bExtend permet d'agrandir le tableau, mais pas au dela de la taille fixée par SetArray()
+// bExtend permet d'agrandir le tableau, mais pas au dela de la taille fix�e par SetArray()
CBotVar* CBotVarClass::GivItem(int n, BOOL bExtend)
{
@@ -1597,7 +1609,7 @@ CBotString CBotVarClass::GivValString()
CBotString res;
- if ( m_pClass != NULL ) // pas utilisé pour un array
+ if ( m_pClass != NULL ) // pas utilis� pour un array
{
res = m_pClass->GivName() + "( ";
@@ -1658,7 +1670,7 @@ void CBotVarClass::DecrementUse()
if ( m_CptUse == 0 )
{
// s'il y en a un, appel le destructeur
- // mais seulement si un constructeur avait été appelé.
+ // mais seulement si un constructeur avait �t� appel�.
if ( m_bConstructor )
{
m_CptUse++; // ne revient pas dans le destructeur
@@ -1667,7 +1679,7 @@ void CBotVarClass::DecrementUse()
// sauve la valeur pour la remettre ensuite
int err, start, end;
CBotStack* pile = NULL;
- err = pile->GivError(start,end); // pile == NULL ça ne derange pas !!
+ err = pile->GivError(start,end); // pile == NULL �a ne derange pas !!
pile = CBotStack::FirstStack(); // efface l'erreur
CBotVar* ppVars[1];
@@ -1689,7 +1701,7 @@ void CBotVarClass::DecrementUse()
m_CptUse--;
}
- delete this; // s'auto-détruit !!
+ delete this; // s'auto-d�truit !!
}
}
@@ -1699,7 +1711,7 @@ CBotVarClass* CBotVarClass::GivPointer()
}
-// trouve une instance selon son numéro unique
+// trouve une instance selon son num�ro unique
CBotVarClass* CBotVarClass::Find(long id)
{
@@ -1726,7 +1738,7 @@ BOOL CBotVarClass::Eq(CBotVar* left, CBotVar* right)
r = r->GivNext();
}
- // devrait toujours arrivé simultanément au bout (mêmes classes)
+ // devrait toujours arriv� simultan�ment au bout (m�mes classes)
return l == r;
}
@@ -1742,7 +1754,7 @@ BOOL CBotVarClass::Ne(CBotVar* left, CBotVar* right)
r = r->GivNext();
}
- // devrait toujours arrivé simultanément au bout (mêmes classes)
+ // devrait toujours arriv� simultan�ment au bout (m�mes classes)
return l != r;
}
@@ -1763,12 +1775,12 @@ CBotVarArray::CBotVarArray(const CBotToken* name, CBotTypResult& type )
m_type.SetType(CBotTypArrayPointer);
m_binit = FALSE;
- m_pInstance = NULL; // la liste des éléments du tableau
+ m_pInstance = NULL; // la liste des �l�ments du tableau
}
CBotVarArray::~CBotVarArray()
{
- if ( m_pInstance != NULL ) m_pInstance->DecrementUse(); // une référence en moins
+ if ( m_pInstance != NULL ) m_pInstance->DecrementUse(); // une r�f�rence en moins
}
// copie une variable dans une autre
@@ -1784,34 +1796,34 @@ void CBotVarArray::Copy(CBotVar* pSrc, BOOL bName)
m_pInstance = p->GivPointer();
if ( m_pInstance != NULL )
- m_pInstance->IncrementUse(); // une référence en plus
+ m_pInstance->IncrementUse(); // une r�f�rence en plus
m_binit = p->m_binit;
//- m_bStatic = p->m_bStatic;
m_pMyThis = NULL;//p->m_pMyThis;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
}
void CBotVarArray::SetPointer(CBotVar* pVarClass)
{
- m_binit = TRUE; // init, même sur un pointeur null
+ m_binit = TRUE; // init, m�me sur un pointeur null
- if ( m_pInstance == pVarClass) return; // spécial, ne pas décrémenter et réincrémenter
- // car le décrément peut détruire l'object
+ if ( m_pInstance == pVarClass) return; // sp�cial, ne pas d�cr�menter et r�incr�menter
+ // car le d�cr�ment peut d�truire l'object
if ( pVarClass != NULL )
{
if ( pVarClass->GivType() == CBotTypArrayPointer )
- pVarClass = pVarClass->GivPointer(); // le vrai pointeur à l'objet
+ pVarClass = pVarClass->GivPointer(); // le vrai pointeur � l'objet
if ( !pVarClass->m_type.Eq(CBotTypClass) &&
!pVarClass->m_type.Eq(CBotTypArrayBody))
__asm int 3;
- ((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
+ ((CBotVarClass*)pVarClass)->IncrementUse(); // une r�f�rence en plus
}
if ( m_pInstance != NULL ) m_pInstance->DecrementUse();
@@ -1830,7 +1842,7 @@ CBotVar* CBotVarArray::GivItem(int n, BOOL bExtend)
if ( m_pInstance == NULL )
{
if ( !bExtend ) return NULL;
- // crée une instance pour le tableau
+ // cr�e une instance pour le tableau
CBotVarClass* instance = new CBotVarClass(NULL, m_type);
SetPointer( instance );
@@ -1853,18 +1865,18 @@ CBotString CBotVarArray::GivValString()
BOOL CBotVarArray::Save1State(FILE* pf)
{
if ( !WriteType(pf, m_type) ) return FALSE;
- return SaveVar(pf, m_pInstance); // sauve l'instance qui gère le tableau
+ return SaveVar(pf, m_pInstance); // sauve l'instance qui g�re le tableau
}
/////////////////////////////////////////////////////////////////////////////
-// gestion des pointeurs à une instance donnée
+// gestion des pointeurs � une instance donn�e
CBotVarPointer::CBotVarPointer(const CBotToken* name, CBotTypResult& type )
{
if ( !type.Eq(CBotTypPointer) &&
!type.Eq(CBotTypNullPointer) &&
- !type.Eq(CBotTypClass) && // par commodité accepte Class et Intrinsic
+ !type.Eq(CBotTypClass) && // par commodit� accepte Class et Intrinsic
!type.Eq(CBotTypIntrinsic) ) __asm int 3;
m_token = new CBotToken(name);
@@ -1877,14 +1889,14 @@ CBotVarPointer::CBotVarPointer(const CBotToken* name, CBotTypResult& type )
m_type.SetType(CBotTypPointer); // quoi qu'il en soit, c'est un pointeur
m_binit = FALSE;
m_pClass = NULL;
- m_pVarClass = NULL; // sera défini par un SetPointer()
+ m_pVarClass = NULL; // sera d�fini par un SetPointer()
SetClass(type.GivClass() );
}
CBotVarPointer::~CBotVarPointer()
{
- if ( m_pVarClass != NULL ) m_pVarClass->DecrementUse(); // une référence en moins
+ if ( m_pVarClass != NULL ) m_pVarClass->DecrementUse(); // une r�f�rence en moins
}
@@ -1899,7 +1911,7 @@ void CBotVarPointer::Maj(void* pUser, BOOL bContinu)
CBotVar* CBotVarPointer::GivItem(const char* name)
{
if ( m_pVarClass == NULL) // pas d'instance existant ?
- return m_pClass->GivItem(name); // rend le pointeur dans la classe elle-même
+ return m_pClass->GivItem(name); // rend le pointeur dans la classe elle-m�me
return m_pVarClass->GivItem(name);
}
@@ -1907,7 +1919,7 @@ CBotVar* CBotVarPointer::GivItem(const char* name)
CBotVar* CBotVarPointer::GivItemRef(int nIdent)
{
if ( m_pVarClass == NULL) // pas d'instance existant ?
- return m_pClass->GivItemRef(nIdent);// rend le pointeur dans la classe elle-même
+ return m_pClass->GivItemRef(nIdent);// rend le pointeur dans la classe elle-m�me
return m_pVarClass->GivItemRef(nIdent);
}
@@ -1936,21 +1948,21 @@ void CBotVarPointer::ConstructorSet()
void CBotVarPointer::SetPointer(CBotVar* pVarClass)
{
- m_binit = TRUE; // init, même sur un pointeur null
+ m_binit = TRUE; // init, m�me sur un pointeur null
- if ( m_pVarClass == pVarClass) return; // spécial, ne pas décrémenter et réincrémenter
- // car le décrément peut détruire l'object
+ if ( m_pVarClass == pVarClass) return; // sp�cial, ne pas d�cr�menter et r�incr�menter
+ // car le d�cr�ment peut d�truire l'object
if ( pVarClass != NULL )
{
if ( pVarClass->GivType() == CBotTypPointer )
- pVarClass = pVarClass->GivPointer(); // le vrai pointeur à l'objet
+ pVarClass = pVarClass->GivPointer(); // le vrai pointeur � l'objet
// if ( pVarClass->GivType() != CBotTypClass )
if ( !pVarClass->m_type.Eq(CBotTypClass) )
__asm int 3;
- ((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
+ ((CBotVarClass*)pVarClass)->IncrementUse(); // une r�f�rence en plus
m_pClass = ((CBotVarClass*)pVarClass)->m_pClass;
m_pUserPtr = pVarClass->m_pUserPtr; // pas vraiment indispensable
m_type = CBotTypResult(CBotTypPointer, m_pClass); // un pointeur de quel genre
@@ -2006,7 +2018,7 @@ BOOL CBotVarPointer::Save1State(FILE* pf)
if (!WriteString(pf, "")) return FALSE;
}
- if (!WriteLong(pf, GivIdent())) return FALSE; // la référence unique
+ if (!WriteLong(pf, GivIdent())) return FALSE; // la r�f�rence unique
// sauve aussi une copie de l'instance
return SaveVar(pf, GivPointer());
@@ -2027,7 +2039,7 @@ void CBotVarPointer::Copy(CBotVar* pSrc, BOOL bName)
m_pVarClass = p->GivPointer();
if ( m_pVarClass != NULL )
- m_pVarClass->IncrementUse(); // une référence en plus
+ m_pVarClass->IncrementUse(); // une r�f�rence en plus
m_pClass = p->m_pClass;
m_binit = p->m_binit;
@@ -2036,7 +2048,7 @@ void CBotVarPointer::Copy(CBotVar* pSrc, BOOL bName)
m_pMyThis = NULL;//p->m_pMyThis;
m_pUserPtr = p->m_pUserPtr;
- // garde le même idendificateur (par défaut)
+ // garde le m�me idendificateur (par d�faut)
if (m_ident == 0 ) m_ident = p->m_ident;
}
@@ -2065,7 +2077,7 @@ BOOL CBotVarPointer::Ne(CBotVar* left, CBotVar* right)
///////////////////////////////////////////////////////
-// gestion des types de résultats
+// gestion des types de r�sultats
CBotTypResult::CBotTypResult(int type)
@@ -2185,7 +2197,7 @@ void CBotTypResult::SetArray( int* max )
m_limite = *max;
if (m_limite < 1) m_limite = -1;
- if ( m_pNext != NULL ) // dernière dimension ?
+ if ( m_pNext != NULL ) // derni�re dimension ?
{
m_pNext->SetArray( max+1 );
}
diff --git a/src/CBot/CBotWhile.cpp b/src/CBot/CBotWhile.cpp
index 7a1ca1f..7ed857c 100644
--- a/src/CBot/CBotWhile.cpp
+++ b/src/CBot/CBotWhile.cpp
@@ -1,14 +1,18 @@
-///////////////////////////////////////////////////////////////////////
-// ce fichier défini les instructions suivantes:
-// CBotWhile "while (condition) {instructions}"
-// CBotDo "do {instructions} while (condition)"
-// CBotFor "for (init, condition, incr) {instructions}"
-// CBotSwitch "switch (val) {instructions}"
-// CBotCase "case val:"
-// CBotBreak "break", "break label", "continu", "continu label"
-// CBotTry "try {instructions}"
-// CBotCatch "catch (condition) {instructions}" ou "finally"
-// CBotThrow "throw execption"
+// * 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 .
#include "CBot.h"
@@ -27,14 +31,14 @@ CBotWhile::CBotWhile()
CBotWhile::~CBotWhile()
{
- delete m_Condition; // libère la condition
- delete m_Block; // libère le bloc d'instruction
+ delete m_Condition; // lib�re la condition
+ delete m_Block; // lib�re le bloc d'instruction
}
CBotInstr* CBotWhile::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotWhile* inst = new CBotWhile(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotWhile* inst = new CBotWhile(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
if ( IsOfType( p, TokenTypVar ) &&
IsOfType( p, ID_DOTS ) )
@@ -57,57 +61,57 @@ CBotInstr* CBotWhile::Compile(CBotToken* &p, CBotCStack* pStack)
if ( pStk->IsOk() )
{
- // le bloc d'instruction est ok (il peut être vide !
+ // le bloc d'instruction est ok (il peut �tre vide !
- return pStack->Return(inst, pStk); // rend l'objet à qui le demande
+ return pStack->Return(inst, pStk); // rend l'objet � qui le demande
}
}
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute une instruction "while"
+// ex�cute une instruction "while"
BOOL CBotWhile :: Execute(CBotStack* &pj)
{
- CBotStack* pile = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pile == EOX ) return TRUE;
if ( pile->IfStep() ) return FALSE;
- while( TRUE ) switch( pile->GivState() ) // exécute la boucle
- { // il y a 2 états possibles (selon reprise)
+ while( TRUE ) switch( pile->GivState() ) // ex�cute la boucle
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // évalue la condition
+ // �value la condition
if ( !m_Condition->Execute(pile) ) return FALSE; // interrompu ici ?
- // le résultat de la condition est sur la pile
+ // le r�sultat de la condition est sur la pile
// termine s'il y a une erreur ou si la condition est fausse
if ( !pile->IsOk() || pile->GivVal() != TRUE )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
// la condition est vrai, passe dans le second mode
- if (!pile->SetState(1)) return FALSE; // prêt pour la suite
+ if (!pile->SetState(1)) return FALSE; // pr�t pour la suite
case 1:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL &&
!m_Block->Execute(pile) )
{
if (pile->IfContinue(0, m_label)) continue; // si continue, repasse au test
- return pj->BreakReturn(pile, m_label); // transmet le résultat et libère la pile
+ return pj->BreakReturn(pile, m_label); // transmet le r�sultat et lib�re la pile
}
// termine s'il y a une erreur
if ( !pile->IsOk() )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
// repasse au test pour recommencer
@@ -119,18 +123,18 @@ BOOL CBotWhile :: Execute(CBotStack* &pj)
void CBotWhile :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile == NULL ) return;
switch( pile->GivState() )
- { // il y a 2 états possibles (selon reprise)
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // évalue la condition
+ // �value la condition
m_Condition->RestoreState(pile, bMain);
return;
case 1:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL ) m_Block->RestoreState(pile, bMain);
return;
}
@@ -151,14 +155,14 @@ CBotRepeat::CBotRepeat()
CBotRepeat::~CBotRepeat()
{
- delete m_NbIter; // libère la condition
- delete m_Block; // libère le bloc d'instruction
+ delete m_NbIter; // lib�re la condition
+ delete m_Block; // lib�re le bloc d'instruction
}
CBotInstr* CBotRepeat::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotRepeat* inst = new CBotRepeat(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotRepeat* inst = new CBotRepeat(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
if ( IsOfType( p, TokenTypVar ) &&
IsOfType( p, ID_DOTS ) )
@@ -173,7 +177,7 @@ CBotInstr* CBotRepeat::Compile(CBotToken* &p, CBotCStack* pStack)
if ( IsOfType(p, ID_OPENPAR ) )
{
- CBotToken* ppp = p; // conserve le ^au token (position début)
+ CBotToken* ppp = p; // conserve le ^au token (position d�but)
if ( NULL != (inst->m_NbIter = CBotExpression::Compile( p, pStk )) )
{
if ( pStk->GivType() < CBotTypLong )
@@ -187,9 +191,9 @@ CBotInstr* CBotRepeat::Compile(CBotToken* &p, CBotCStack* pStack)
if ( pStk->IsOk() )
{
- // le bloc d'instruction est ok (il peut être vide !
+ // le bloc d'instruction est ok (il peut �tre vide !
- return pStack->Return(inst, pStk); // rend l'objet à qui le demande
+ return pStack->Return(inst, pStk); // rend l'objet � qui le demande
}
}
pStack->SetError(TX_CLOSEPAR, p->GivStart());
@@ -199,59 +203,59 @@ CBotInstr* CBotRepeat::Compile(CBotToken* &p, CBotCStack* pStack)
}
pStack->SetError(TX_ENDOF, p);
}
- pStack->SetError(TX_OPENPAR, p->GivStart()); // manque la parenthèse
+ pStack->SetError(TX_OPENPAR, p->GivStart()); // manque la parenth�se
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute une instruction "repeat"
+// ex�cute une instruction "repeat"
BOOL CBotRepeat :: Execute(CBotStack* &pj)
{
- CBotStack* pile = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pile == EOX ) return TRUE;
if ( pile->IfStep() ) return FALSE;
- while( TRUE ) switch( pile->GivState() ) // exécute la boucle
- { // il y a 2 états possibles (selon reprise)
+ while( TRUE ) switch( pile->GivState() ) // ex�cute la boucle
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // évalue le nombre d'itération
+ // �value le nombre d'it�ration
if ( !m_NbIter->Execute(pile) ) return FALSE; // interrompu ici ?
- // le résultat de la condition est sur la pile
+ // le r�sultat de la condition est sur la pile
// termine s'il y a une erreur ou si la condition est fausse
int n;
if ( !pile->IsOk() || ( n = pile->GivVal() ) < 1 )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
- // met le nombre d'itération +1 dans le "state"
+ // met le nombre d'it�ration +1 dans le "state"
- if (!pile->SetState(n+1)) return FALSE; // prêt pour la suite
- continue; // passe à la suite
+ if (!pile->SetState(n+1)) return FALSE; // pr�t pour la suite
+ continue; // passe � la suite
case 1:
// fin normale de la boucle
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
default:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL &&
!m_Block->Execute(pile) )
{
if (pile->IfContinue(pile->GivState()-1, m_label)) continue; // si continue, repasse au test
- return pj->BreakReturn(pile, m_label); // transmet le résultat et libère la pile
+ return pj->BreakReturn(pile, m_label); // transmet le r�sultat et lib�re la pile
}
// termine s'il y a une erreur
if ( !pile->IsOk() )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
// repasse au test pour recommencer
@@ -263,18 +267,18 @@ BOOL CBotRepeat :: Execute(CBotStack* &pj)
void CBotRepeat :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile == NULL ) return;
switch( pile->GivState() )
- { // il y a 2 états possibles (selon reprise)
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // évalue la condition
+ // �value la condition
m_NbIter->RestoreState(pile, bMain);
return;
case 1:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL ) m_Block->RestoreState(pile, bMain);
return;
}
@@ -294,15 +298,15 @@ CBotDo::CBotDo()
CBotDo::~CBotDo()
{
- delete m_Condition; // libère la condition
- delete m_Block; // libère le bloc d'instruction
+ delete m_Condition; // lib�re la condition
+ delete m_Block; // lib�re le bloc d'instruction
}
CBotInstr* CBotDo::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotDo* inst = new CBotDo(); // crée l'objet
+ CBotDo* inst = new CBotDo(); // cr�e l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
if ( IsOfType( p, TokenTypVar ) &&
IsOfType( p, ID_DOTS ) )
@@ -316,7 +320,7 @@ CBotInstr* CBotDo::Compile(CBotToken* &p, CBotCStack* pStack)
CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp
- // cherche un bloc d'instruction après le do
+ // cherche un bloc d'instruction apr�s le do
IncLvl(inst->m_label);
inst->m_Block = CBotBlock::CompileBlkOrInst( p, pStk, TRUE );
DecLvl();
@@ -330,7 +334,7 @@ CBotInstr* CBotDo::Compile(CBotToken* &p, CBotCStack* pStack)
// la condition existe
if (IsOfType(p, ID_SEP))
{
- return pStack->Return(inst, pStk); // rend l'objet à qui le demande
+ return pStack->Return(inst, pStk); // rend l'objet � qui le demande
}
pStk->SetError(TX_ENDOF, p->GivStart());
}
@@ -338,49 +342,49 @@ CBotInstr* CBotDo::Compile(CBotToken* &p, CBotCStack* pStack)
pStk->SetError(TX_WHILE, p->GivStart());
}
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute une instruction "do"
+// ex�cute une instruction "do"
BOOL CBotDo :: Execute(CBotStack* &pj)
{
- CBotStack* pile = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->AddStack(this); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
// if ( pile == EOX ) return TRUE;
if ( pile->IfStep() ) return FALSE;
- while( TRUE ) switch( pile->GivState() ) // exécute la boucle
- { // il y a 2 états possibles (selon reprise)
+ while( TRUE ) switch( pile->GivState() ) // ex�cute la boucle
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL &&
!m_Block->Execute(pile) )
{
if (pile->IfContinue(1, m_label)) continue; // si continue, repasse au test
- return pj->BreakReturn(pile, m_label); // transmet le résultat et libère la pile
+ return pj->BreakReturn(pile, m_label); // transmet le r�sultat et lib�re la pile
}
// termine s'il y a une erreur
if ( !pile->IsOk() )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
- if (!pile->SetState(1)) return FALSE; // prêt pour la suite
+ if (!pile->SetState(1)) return FALSE; // pr�t pour la suite
case 1:
- // évalue la condition
+ // �value la condition
if ( !m_Condition->Execute(pile) ) return FALSE; // interrompu ici ?
- // le résultat de la condition est sur la pile
+ // le r�sultat de la condition est sur la pile
// termine s'il y a une erreur ou si la condition est fausse
if ( !pile->IsOk() || pile->GivVal() != TRUE )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
// repasse au bloc d'instruction pour recommencer
@@ -393,13 +397,13 @@ void CBotDo :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile == NULL ) return;
switch( pile->GivState() )
- { // il y a 2 états possibles (selon reprise)
+ { // il y a 2 �tats possibles (selon reprise)
case 0:
- // restitue le bloc d'instruction associé
+ // restitue le bloc d'instruction associ�
if ( m_Block != NULL ) m_Block->RestoreState(pile, bMain);
return;
@@ -430,13 +434,13 @@ CBotFor::~CBotFor()
delete m_Init;
delete m_Test;
delete m_Incr;
- delete m_Block; // libère le bloc d'instruction
+ delete m_Block; // lib�re le bloc d'instruction
}
CBotInstr* CBotFor::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotFor* inst = new CBotFor(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotFor* inst = new CBotFor(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
if ( IsOfType( p, TokenTypVar ) &&
IsOfType( p, ID_DOTS ) )
@@ -447,7 +451,7 @@ CBotInstr* CBotFor::Compile(CBotToken* &p, CBotCStack* pStack)
inst->SetToken(p);
if (!IsOfType(p, ID_FOR)) return NULL; // ne devrait jamais arriver
- if ( !IsOfType(p, ID_OPENPAR)) // manque la parenthèse ?
+ if ( !IsOfType(p, ID_OPENPAR)) // manque la parenth�se ?
{
pStack->SetError(TX_OPENPAR, p->GivStart());
return NULL;
@@ -477,7 +481,7 @@ CBotInstr* CBotFor::Compile(CBotToken* &p, CBotCStack* pStack)
inst->m_Incr = CBotListExpression::Compile( p, pStk );
if ( pStk->IsOk() )
{
- if ( IsOfType(p, ID_CLOSEPAR)) // manque la parenthèse ?
+ if ( IsOfType(p, ID_CLOSEPAR)) // manque la parenth�se ?
{
IncLvl(inst->m_label);
inst->m_Block = CBotBlock::CompileBlkOrInst( p, pStk, TRUE );
@@ -490,65 +494,65 @@ CBotInstr* CBotFor::Compile(CBotToken* &p, CBotCStack* pStack)
}
}
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute l'instruction "for"
+// ex�cute l'instruction "for"
BOOL CBotFor :: Execute(CBotStack* &pj)
{
- CBotStack* pile = pj->AddStack(this, TRUE); // ajoute un élément à la pile (variables locales)
+ CBotStack* pile = pj->AddStack(this, TRUE); // ajoute un �l�ment � la pile (variables locales)
// ou le retrouve en cas de reprise
// if ( pile == EOX ) return TRUE;
if ( pile->IfStep() ) return FALSE;
- while( TRUE ) switch( pile->GivState() ) // exécute la boucle
- { // il y a 4 états possibles (selon reprise)
+ while( TRUE ) switch( pile->GivState() ) // ex�cute la boucle
+ { // il y a 4 �tats possibles (selon reprise)
case 0:
- // évalue l'initialisation
+ // �value l'initialisation
if ( m_Init != NULL &&
!m_Init->Execute(pile) ) return FALSE; // interrompu ici ?
- if (!pile->SetState(1)) return FALSE; // prêt pour la suite
+ if (!pile->SetState(1)) return FALSE; // pr�t pour la suite
case 1:
- // évalue la condition
+ // �value la condition
if ( m_Test != NULL ) // pas de condition ? -> vrai !
{
if (!m_Test->Execute(pile) ) return FALSE; // interrompu ici ?
- // le résultat de la condition est sur la pile
+ // le r�sultat de la condition est sur la pile
// termine s'il y a une erreur ou si la condition est fausse
if ( !pile->IsOk() || pile->GivVal() != TRUE )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
}
- // la condition est vrai, passe à la suite
- if (!pile->SetState(2)) return FALSE; // prêt pour la suite
+ // la condition est vrai, passe � la suite
+ if (!pile->SetState(2)) return FALSE; // pr�t pour la suite
case 2:
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL &&
!m_Block->Execute(pile) )
{
- if (pile->IfContinue(3, m_label)) continue; // si continue, passe à l'incrémentation
- return pj->BreakReturn(pile, m_label); // transmet le résultat et libère la pile
+ if (pile->IfContinue(3, m_label)) continue; // si continue, passe � l'incr�mentation
+ return pj->BreakReturn(pile, m_label); // transmet le r�sultat et lib�re la pile
}
// termine s'il y a une erreur
if ( !pile->IsOk() )
{
- return pj->Return(pile); // transmet le résultat et libère la pile
+ return pj->Return(pile); // transmet le r�sultat et lib�re la pile
}
- if (!pile->SetState(3)) return FALSE; // prêt pour la suite
+ if (!pile->SetState(3)) return FALSE; // pr�t pour la suite
case 3:
- // évalue l'incrémentation
+ // �value l'incr�mentation
if ( m_Incr != NULL &&
!m_Incr->Execute(pile) ) return FALSE; // interrompu ici ?
@@ -562,34 +566,34 @@ void CBotFor :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile = pj->RestoreStack(this); // ajoute un élément à la pile (variables locales)
+ CBotStack* pile = pj->RestoreStack(this); // ajoute un �l�ment � la pile (variables locales)
if ( pile == NULL ) return;
switch( pile->GivState() )
- { // il y a 4 états possibles (selon reprise)
+ { // il y a 4 �tats possibles (selon reprise)
case 0:
- // évalue l'initialisation
+ // �value l'initialisation
if ( m_Init != NULL ) m_Init->RestoreState(pile, TRUE); // interrompu ici !
return;
case 1:
- if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // définitions variables
+ if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // d�finitions variables
- // évalue la condition
+ // �value la condition
if ( m_Test != NULL ) m_Test->RestoreState(pile, TRUE); // interrompu ici !
return;
case 2:
- if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // définitions variables
+ if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // d�finitions variables
- // évalue le bloc d'instruction associé
+ // �value le bloc d'instruction associ�
if ( m_Block != NULL ) m_Block->RestoreState(pile, TRUE);
return;
case 3:
- if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // définitions variables
+ if ( m_Init != NULL ) m_Init->RestoreState(pile, FALSE); // d�finitions variables
- // évalue l'incrémentation
+ // �value l'incr�mentation
if ( m_Incr != NULL ) m_Incr->RestoreState(pile, TRUE); // interrompu ici !
return;
}
@@ -597,8 +601,8 @@ void CBotFor :: RestoreState(CBotStack* &pj, BOOL bMain)
//////////////////////////////////////////////////////////////////////////////////////
// compile une liste d'expression
-// n'est utilisé que pour l'instruction for
-// dans l'intitialisation et dans l'incrémentation
+// n'est utilis� que pour l'instruction for
+// dans l'intitialisation et dans l'incr�mentation
CBotListExpression::CBotListExpression()
{
@@ -611,14 +615,14 @@ CBotListExpression::~CBotListExpression()
delete m_Expr;
}
-// cherche une déclaration de variable ou une expression
+// cherche une d�claration de variable ou une expression
static CBotInstr* CompileInstrOrDefVar(CBotToken* &p, CBotCStack* pStack)
{
- CBotInstr* i = CBotInt::Compile( p, pStack, FALSE, TRUE ); // est-ce une déclaration d'un entier ?
- if ( i== NULL ) i = CBotFloat::Compile( p, pStack, FALSE, TRUE ); // ou d'un nombre réel ?
- if ( i== NULL ) i = CBotBoolean::Compile( p, pStack, FALSE, TRUE ); // ou d'un booléen ?
- if ( i== NULL ) i = CBotIString::Compile( p, pStack, FALSE, TRUE ); // ou d'une chaîne ?
+ CBotInstr* i = CBotInt::Compile( p, pStack, FALSE, TRUE ); // est-ce une d�claration d'un entier ?
+ if ( i== NULL ) i = CBotFloat::Compile( p, pStack, FALSE, TRUE ); // ou d'un nombre r�el ?
+ if ( i== NULL ) i = CBotBoolean::Compile( p, pStack, FALSE, TRUE ); // ou d'un bool�en ?
+ if ( i== NULL ) i = CBotIString::Compile( p, pStack, FALSE, TRUE ); // ou d'une cha�ne ?
if ( i== NULL ) i = CBotExpression::Compile( p, pStack ); // compile une expression
return i;
}
@@ -627,13 +631,13 @@ CBotInstr* CBotListExpression::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotListExpression* inst = new CBotListExpression();
- inst->m_Expr = CompileInstrOrDefVar( p, pStack ); // compile la première expression de la liste
+ inst->m_Expr = CompileInstrOrDefVar( p, pStack ); // compile la premi�re expression de la liste
if (pStack->IsOk())
{
while ( IsOfType(p, ID_COMMA) ) // plusieurs instructions ?
{
- CBotInstr* i = CompileInstrOrDefVar( p, pStack ); // est-ce une déclaration d'un entier ?
- inst->m_Expr->AddNext(i); // ajoute à la suite
+ CBotInstr* i = CompileInstrOrDefVar( p, pStack ); // est-ce une d�claration d'un entier ?
+ inst->m_Expr->AddNext(i); // ajoute � la suite
if ( !pStack->IsOk() )
{
delete inst;
@@ -649,17 +653,17 @@ CBotInstr* CBotListExpression::Compile(CBotToken* &p, CBotCStack* pStack)
BOOL CBotListExpression::Execute(CBotStack* &pj)
{
CBotStack* pile = pj->AddStack();// indispensable
- CBotInstr* p = m_Expr; // la première expression
+ CBotInstr* p = m_Expr; // la premi�re expression
int state = pile->GivState();
- while (state-->0) p = p->GivNext(); // revient sur l'opération interrompue
+ while (state-->0) p = p->GivNext(); // revient sur l'op�ration interrompue
if ( p != NULL ) while (TRUE)
{
if ( !p->Execute(pile) ) return FALSE;
p = p->GivNext();
if ( p == NULL ) break;
- if (!pile->IncState()) return FALSE; // prêt pour la suivante
+ if (!pile->IncState()) return FALSE; // pr�t pour la suivante
}
return pj->Return(pile);
}
@@ -676,12 +680,12 @@ void CBotListExpression::RestoreState(CBotStack* &pj, BOOL bMain)
state = pile->GivState();
}
- CBotInstr* p = m_Expr; // la première expression
+ CBotInstr* p = m_Expr; // la premi�re expression
while (p != NULL && state-->0)
{
p->RestoreState(pile, FALSE);
- p = p->GivNext(); // revient sur l'opération interrompue
+ p = p->GivNext(); // revient sur l'op�ration interrompue
}
if ( p != NULL )
@@ -704,15 +708,15 @@ CBotSwitch::CBotSwitch()
CBotSwitch::~CBotSwitch()
{
- delete m_Value; // libère la valeur
- delete m_Block; // libère le bloc d'instruction
+ delete m_Value; // lib�re la valeur
+ delete m_Block; // lib�re le bloc d'instruction
}
CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotSwitch* inst = new CBotSwitch(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotSwitch* inst = new CBotSwitch(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
inst->SetToken(p);
if (!IsOfType(p, ID_SWITCH)) return NULL; // ne devrait jamais arriver
@@ -780,7 +784,7 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack)
return pStack->Return(NULL, pStk);
}
// le bloc d'instruction est ok
- return pStack->Return(inst, pStk); // rend l'objet à qui le demande
+ return pStack->Return(inst, pStk); // rend l'objet � qui le demande
}
pStk->SetError( TX_OPENBLK, p->GivStart() );
}
@@ -791,18 +795,18 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack)
}
pStk->SetError( TX_OPENPAR, p->GivStart());
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute une instruction "switch"
+// ex�cute une instruction "switch"
BOOL CBotSwitch :: Execute(CBotStack* &pj)
{
- CBotStack* pile1 = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile1 = pj->AddStack(this); // ajoute un �l�ment � la pile
// if ( pile1 == EOX ) return TRUE;
- CBotInstr* p = m_Block; // la première expression
+ CBotInstr* p = m_Block; // la premi�re expression
int state = pile1->GivState();
if (state == 0)
@@ -816,23 +820,23 @@ BOOL CBotSwitch :: Execute(CBotStack* &pj)
if ( state == -1 )
{
state = 0;
- int val = pile1->GivVal(); // résultat de la valeur
+ int val = pile1->GivVal(); // r�sultat de la valeur
CBotStack* pile2 = pile1->AddStack();
while ( p != NULL ) // recherche le case correspondant dans la liste
{
state++;
- if ( p->CompCase( pile2, val ) ) break; // trouvé le case
+ if ( p->CompCase( pile2, val ) ) break; // trouv� le case
p = p->GivNext();
}
pile2->Delete();
- if ( p == NULL ) return pj->Return(pile1); // terminé si plus rien
+ if ( p == NULL ) return pj->Return(pile1); // termin� si plus rien
if ( !pile1->SetState(state) ) return FALSE;
}
- p = m_Block; // revient au début
+ p = m_Block; // revient au d�but
while (state-->0) p = p->GivNext(); // avance dans la liste
while( p != NULL )
@@ -848,10 +852,10 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( !bMain ) return;
- CBotStack* pile1 = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile1 = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile1 == NULL ) return;
- CBotInstr* p = m_Block; // la première expression
+ CBotInstr* p = m_Block; // la premi�re expression
int state = pile1->GivState();
if (state == 0)
@@ -865,7 +869,7 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, BOOL bMain)
return;
}
-// p = m_Block; // revient au début
+// p = m_Block; // revient au d�but
while ( p != NULL && state-- > 0 )
{
p->RestoreState(pile1, FALSE);
@@ -883,7 +887,7 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, BOOL bMain)
///////////////////////////////////////////////////////////////////////////
// compile une instruction "case"
-// on est forcément dans un bloc d'instruction "switch"
+// on est forc�ment dans un bloc d'instruction "switch"
CBotCase::CBotCase()
{
@@ -893,14 +897,14 @@ CBotCase::CBotCase()
CBotCase::~CBotCase()
{
- delete m_Value; // libère la valeur
+ delete m_Value; // lib�re la valeur
}
CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotCase* inst = new CBotCase(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotCase* inst = new CBotCase(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
inst->SetToken(p);
if (!IsOfType(p, ID_CASE, ID_DEFAULT)) return NULL; // ne devrait jamais arriver
@@ -926,7 +930,7 @@ CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack)
return inst;
}
-// exécution de l'instruction "case"
+// ex�cution de l'instruction "case"
BOOL CBotCase::Execute(CBotStack* &pj)
{
@@ -937,15 +941,15 @@ void CBotCase::RestoreState(CBotStack* &pj, BOOL bMain)
{
}
-// routine permettant de trouver le point d'entrée "case"
-// correspondant à la valeur cherchée
+// routine permettant de trouver le point d'entr�e "case"
+// correspondant � la valeur cherch�e
BOOL CBotCase::CompCase(CBotStack* &pile, int val)
{
if ( m_Value == NULL ) return TRUE; // cas pour "default"
while (!m_Value->Execute(pile)); // met sur la pile la valeur correpondant (sans interruption)
- return (pile->GivVal() == val); // compare avec la valeur cherchée
+ return (pile->GivVal() == val); // compare avec la valeur cherch�e
}
///////////////////////////////////////////////////////////////////////////
@@ -964,7 +968,7 @@ CBotBreak::~CBotBreak()
CBotInstr* CBotBreak::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
int type = p->GivType();
if (!IsOfType(p, ID_BREAK, ID_CONTINUE)) return NULL; // ne devrait jamais arriver
@@ -975,8 +979,8 @@ CBotInstr* CBotBreak::Compile(CBotToken* &p, CBotCStack* pStack)
return NULL; // pas d'objet, l'erreur est sur la pile
}
- CBotBreak* inst = new CBotBreak(); // crée l'objet
- inst->SetToken(pp); // garde l'opération
+ CBotBreak* inst = new CBotBreak(); // cr�e l'objet
+ inst->SetToken(pp); // garde l'op�ration
pp = p;
if ( IsOfType( p, TokenTypVar ) )
@@ -992,7 +996,7 @@ CBotInstr* CBotBreak::Compile(CBotToken* &p, CBotCStack* pStack)
if (IsOfType(p, ID_SEP))
{
- return inst; // et le donne à qui veux
+ return inst; // et le donne � qui veux
}
delete inst;
@@ -1000,7 +1004,7 @@ CBotInstr* CBotBreak::Compile(CBotToken* &p, CBotCStack* pStack)
return NULL; // pas d'objet, l'erreur est sur la pile
}
-// exécution l'instructino "break" ou "continu"
+// ex�cution l'instructino "break" ou "continu"
BOOL CBotBreak :: Execute(CBotStack* &pj)
{
@@ -1034,15 +1038,15 @@ CBotTry::CBotTry()
CBotTry::~CBotTry()
{
- delete m_ListCatch; // libère la liste
- delete m_Block; // libère le bloc d'instruction
+ delete m_ListCatch; // lib�re la liste
+ delete m_Block; // lib�re le bloc d'instruction
delete m_FinalInst;
}
CBotInstr* CBotTry::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotTry* inst = new CBotTry(); // crée l'objet
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotTry* inst = new CBotTry(); // cr�e l'objet
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
inst->SetToken(p);
if (!IsOfType(p, ID_TRY)) return NULL; // ne devrait jamais arriver
@@ -1066,28 +1070,28 @@ CBotInstr* CBotTry::Compile(CBotToken* &p, CBotCStack* pStack)
if (pStk->IsOk())
{
- return pStack->Return(inst, pStk); // rend l'objet à qui le demande
+ return pStack->Return(inst, pStk); // rend l'objet � qui le demande
}
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return pStack->Return(NULL, pStk); // pas d'objet, l'erreur est sur la pile
}
-// exécute l'instruction Try
-// gère le retour d'exceptions
-// les arrêts par suspension
+// ex�cute l'instruction Try
+// g�re le retour d'exceptions
+// les arr�ts par suspension
// et les "finaly"
BOOL CBotTry :: Execute(CBotStack* &pj)
{
int val;
- CBotStack* pile1 = pj->AddStack(this); // ajoute un élément à la pile
+ CBotStack* pile1 = pj->AddStack(this); // ajoute un �l�ment � la pile
// if ( pile1 == EOX ) return TRUE;
if ( pile1->IfStep() ) return FALSE;
// ou le retrouve en cas de reprise
- CBotStack* pile0 = pj->AddStack2(); // ajoute un élément à la pile secondaire
+ CBotStack* pile0 = pj->AddStack2(); // ajoute un �l�ment � la pile secondaire
CBotStack* pile2 = pile0->AddStack();
if ( pile1->GivState() == 0 )
@@ -1103,7 +1107,7 @@ BOOL CBotTry :: Execute(CBotStack* &pj)
return FALSE; // ne fait pas le catch
pile1->IncState();
- pile2->SetState(val); // mémorise le numéro de l'erreur
+ pile2->SetState(val); // m�morise le num�ro de l'erreur
pile1->SetError(0); // pour l'instant il n'y a plus d'erreur !
if ( val == 0 && CBotStack::m_initimer < 0 ) // en mode de step ?
@@ -1114,7 +1118,7 @@ BOOL CBotTry :: Execute(CBotStack* &pj)
// voir de quoi il en retourne
CBotCatch* pc = m_ListCatch;
- int state = (short)pile1->GivState(); // où en étions-nous ?
+ int state = (short)pile1->GivState(); // o� en �tions-nous ?
val = pile2->GivState(); // pour quelle erreur ?
pile0->SetState(1); // marquage pour GetRunPos
@@ -1122,7 +1126,7 @@ BOOL CBotTry :: Execute(CBotStack* &pj)
{
if ( --state <= 0 )
{
- // demande au bloc catch s'il se sent concerné
+ // demande au bloc catch s'il se sent concern�
if ( !pc->TestCatch(pile2, val) ) return FALSE; // suspendu !
pile1->IncState();
}
@@ -1132,7 +1136,7 @@ BOOL CBotTry :: Execute(CBotStack* &pj)
{
// pile0->SetState(1);
- if ( !pc->Execute(pile2) ) return FALSE; // exécute l'opération
+ if ( !pc->Execute(pile2) ) return FALSE; // ex�cute l'op�ration
if ( m_FinalInst == NULL )
return pj->Return(pile2); // termine le try
@@ -1156,8 +1160,8 @@ BOOL CBotTry :: Execute(CBotStack* &pj)
return pj->Return(pile2);
}
- pile1->SetState(0); // revient à l'évaluation
- pile0->SetState(0); // revient à l'évaluation
+ pile1->SetState(0); // revient � l'�valuation
+ pile0->SetState(0); // revient � l'�valuation
if ( val != 0 && m_ListCatch == NULL && m_FinalInst == NULL )
return pj->Return(pile2); // termine le try sans exception aucune
@@ -1171,10 +1175,10 @@ void CBotTry :: RestoreState(CBotStack* &pj, BOOL bMain)
if ( !bMain ) return;
int val;
- CBotStack* pile1 = pj->RestoreStack(this); // ajoute un élément à la pile
+ CBotStack* pile1 = pj->RestoreStack(this); // ajoute un �l�ment � la pile
if ( pile1 == NULL ) return;
// ou le retrouve en cas de reprise
- CBotStack* pile0 = pj->AddStack2(); // ajoute un élément à la pile secondaire
+ CBotStack* pile0 = pj->AddStack2(); // ajoute un �l�ment � la pile secondaire
if ( pile0 == NULL ) return;
CBotStack* pile2 = pile0->RestoreStack();
@@ -1190,14 +1194,14 @@ void CBotTry :: RestoreState(CBotStack* &pj, BOOL bMain)
// voir de quoi il en retourne
CBotCatch* pc = m_ListCatch;
- int state = pile1->GivState(); // où en étions-nous ?
+ int state = pile1->GivState(); // o� en �tions-nous ?
val = pile2->GivState(); // pour quelle erreur ?
if ( val >= 0 && state > 0 ) while ( pc != NULL )
{
if ( --state <= 0 )
{
- // demande au bloc catch s'il se sent concerné
+ // demande au bloc catch s'il se sent concern�
pc->RestoreCondState(pile2, bMain); // suspendu !
return;
}
@@ -1205,7 +1209,7 @@ void CBotTry :: RestoreState(CBotStack* &pj, BOOL bMain)
{
if ( pile2->GivVal() == TRUE )
{
- pc->RestoreState(pile2, bMain); // exécute l'opération
+ pc->RestoreState(pile2, bMain); // ex�cute l'op�ration
return;
}
}
@@ -1235,14 +1239,14 @@ CBotCatch::CBotCatch()
CBotCatch::~CBotCatch()
{
- delete m_Cond; // libère la liste
- delete m_Block; // libère le bloc d'instruction
+ delete m_Cond; // lib�re la liste
+ delete m_Block; // lib�re le bloc d'instruction
delete m_next; // et la suite
}
CBotCatch* CBotCatch::Compile(CBotToken* &p, CBotCStack* pStack)
{
- CBotCatch* inst = new CBotCatch(); // crée l'objet
+ CBotCatch* inst = new CBotCatch(); // cr�e l'objet
pStack->SetStartError(p->GivStart());
inst->SetToken(p);
@@ -1258,23 +1262,23 @@ CBotCatch* CBotCatch::Compile(CBotToken* &p, CBotCStack* pStack)
{
inst->m_Block = CBotBlock::CompileBlkOrInst( p, pStack );
if ( pStack->IsOk() )
- return inst; // rend l'objet à qui le demande
+ return inst; // rend l'objet � qui le demande
}
pStack->SetError(TX_CLOSEPAR, p->GivStart());
}
pStack->SetError(TX_BADTYPE, p->GivStart());
}
pStack->SetError(TX_OPENPAR, p->GivStart());
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return NULL; // pas d'objet, l'erreur est sur la pile
}
-// exécution de "catch"
+// ex�cution de "catch"
BOOL CBotCatch :: Execute(CBotStack* &pj)
{
if ( m_Block == NULL ) return TRUE;
- return m_Block->Execute(pj); // exécute le bloc associé
+ return m_Block->Execute(pj); // ex�cute le bloc associ�
}
void CBotCatch :: RestoreState(CBotStack* &pj, BOOL bMain)
@@ -1287,7 +1291,7 @@ void CBotCatch :: RestoreCondState(CBotStack* &pj, BOOL bMain)
m_Cond->RestoreState(pj, bMain);
}
-// routine pour savoir si le catch est à faire ou non
+// routine pour savoir si le catch est � faire ou non
BOOL CBotCatch :: TestCatch(CBotStack* &pile, int val)
{
@@ -1324,10 +1328,10 @@ CBotInstr* CBotThrow::Compile(CBotToken* &p, CBotCStack* pStack)
{
pStack->SetStartError(p->GivStart());
- CBotThrow* inst = new CBotThrow(); // crée l'objet
+ CBotThrow* inst = new CBotThrow(); // cr�e l'objet
inst->SetToken(p);
- CBotToken* pp = p; // conserve le ^au token (position début)
+ CBotToken* pp = p; // conserve le ^au token (position d�but)
if (!IsOfType(p, ID_THROW)) return NULL; // ne devrait jamais arriver
@@ -1335,15 +1339,15 @@ CBotInstr* CBotThrow::Compile(CBotToken* &p, CBotCStack* pStack)
if (pStack->GivType() < CBotTypLong && pStack->IsOk())
{
- return inst; // rend l'objet à qui le demande
+ return inst; // rend l'objet � qui le demande
}
pStack->SetError(TX_BADTYPE, pp);
- delete inst; // erreur, libère la place
+ delete inst; // erreur, lib�re la place
return NULL; // pas d'objet, l'erreur est sur la pile
}
-// exécute l'instruction "throw"
+// ex�cute l'instruction "throw"
BOOL CBotThrow :: Execute(CBotStack* &pj)
{
@@ -1397,11 +1401,11 @@ CBotInstr* CBotStartDebugDD::Compile(CBotToken* &p, CBotCStack* pStack)
if (!IsOfType(p, ID_DEBUGDD)) return NULL; // ne devrait jamais arriver
- return new CBotStartDebugDD(); // crée l'objet
+ return new CBotStartDebugDD(); // cr�e l'objet
}
-// exécute l'instruction "throw"
+// ex�cute l'instruction "throw"
BOOL CBotStartDebugDD :: Execute(CBotStack* &pj)
{
diff --git a/src/CBot/ClassFILE.cpp b/src/CBot/ClassFILE.cpp
index 21bd39e..cfde47f 100644
--- a/src/CBot/ClassFILE.cpp
+++ b/src/CBot/ClassFILE.cpp
@@ -1,6 +1,18 @@
-// ClassFile.cpp
-//
-// définition des méthodes pour la classe FILE
+// * 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 .
@@ -12,7 +24,7 @@ static int m_CompteurFileOpen = 0;
-// Prépare un nom de fichier.
+// Pr�pare un nom de fichier.
void PrepareFilename(CBotString &filename) //DD!
{
@@ -21,7 +33,7 @@ void PrepareFilename(CBotString &filename) //DD!
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('/');
@@ -33,7 +45,7 @@ void PrepareFilename(CBotString &filename) //DD!
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("files\\") + filename;
@@ -41,31 +53,31 @@ void PrepareFilename(CBotString &filename) //DD!
// constructeur de la classe
-// reçois le nom du fichier en paramètre
+// re�ois le nom du fichier en param�tre
-// exécution
+// ex�cution
BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
CBotString mode;
- // accepte sans paramètre
+ // accepte sans param�tre
if ( pVar == NULL ) return TRUE;
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
CBotString filename = pVar->GivValString();
PrepareFilename(filename); //DR
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // récupère le mode
+ // r�cup�re le mode
mode = pVar->GivValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return FALSE; }
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return FALSE; }
}
@@ -75,7 +87,7 @@ BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
if ( ! mode.IsEmpty() )
{
- // ouvre le ficher demandé
+ // ouvre le ficher demand�
FILE* pFile = fopen( filename, mode );
if ( pFile == NULL ) { Exception = CBotErrFileOpen; return FALSE; }
@@ -92,38 +104,38 @@ BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
// compilation
CBotTypResult cfconstruct (CBotVar* pThis, CBotVar* &pVar)
{
- // accepte sans paramètre
+ // accepte sans param�tre
if ( pVar == NULL ) return CBotTypResult( 0 );
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
- // le résultat est de type void (constructeur)
+ // le r�sultat est de type void (constructeur)
return CBotTypResult( 0 );
}
// destructeur de la classe
-// exécution
+// ex�cution
BOOL rfdestruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
- // pas ouvert ? pas de problème
+ // pas ouvert ? pas de probl�me
if ( pVar->GivInit() != IS_DEF) return TRUE;
FILE* pFile= (FILE*)pVar->GivValInt();
@@ -136,22 +148,22 @@ BOOL rfdestruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception
}
-// méthode FILE :: open
-// reçois le mode r/w en paramètre
+// m�thode FILE :: open
+// re�ois le mode r/w en param�tre
-// exécution
+// ex�cution
BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) { Exception = CBotErrLowParam; return FALSE; }
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
if ( pVar->GivNext() != NULL )
{
- // dans ce cas le premier paramètre est le nom du fichier
+ // dans ce cas le premier param�tre est le nom du fichier
CBotString filename = pVar->GivValString();
PrepareFilename(filename); //DR
@@ -159,29 +171,29 @@ BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
CBotVar* pVar2 = pThis->GivItem("filename");
pVar2->SetValString(filename);
- // paramètre suivant est le mode
+ // param�tre suivant est le mode
pVar = pVar -> GivNext();
}
CBotString mode = pVar->GivValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return FALSE; }
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
- // qui doit pas être initialisé
+ // qui doit pas �tre initialis�
if ( pVar->GivInit() == IS_DEF) { Exception = CBotErrFileOpen; return FALSE; }
// reprend le nom du fichier
pVar = pThis->GivItem("filename");
CBotString filename = pVar->GivValString();
- PrepareFilename(filename); //DD! (si le nom a été attribué par h.filename = "...";
+ PrepareFilename(filename); //DD! (si le nom a �t� attribu� par h.filename = "...";
- // ouvre le ficher demandé
+ // ouvre le ficher demand�
FILE* pFile = fopen( filename, mode );
if ( pFile == NULL ) //DR
{
@@ -202,39 +214,39 @@ BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfopen (CBotVar* pThis, CBotVar* &pVar)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
- // le résultat est de type bool
+ // le r�sultat est de type bool
return CBotTypResult(CBotTypBoolean); //DR
}
-// méthode FILE :: close
+// m�thode FILE :: close
-// exécution
+// ex�cution
BOOL rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotErrOverParam;
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -251,27 +263,27 @@ BOOL rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfclose (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat "void"
+ // la fonction retourne un r�sultat "void"
return CBotTypResult( 0 );
}
-// méthode FILE :: writeln
+// m�thode FILE :: writeln
-// exécution
+// ex�cution
BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) { Exception = CBotErrLowParam; return FALSE; }
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
CBotString param = pVar->GivValString();
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -280,7 +292,7 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
int res = fputs(param+"\n", pFile);
- // en cas d'erreur génère une exception
+ // en cas d'erreur g�n�re une exception
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
return TRUE;
@@ -289,28 +301,28 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfwrite (CBotVar* pThis, CBotVar* &pVar)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) return CBotTypResult( CBotErrBadString );
- // pas d'autre paramètre
+ // pas d'autre param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat void
+ // la fonction retourne un r�sultat void
return CBotTypResult( 0 );
}
-// méthode FILE :: readln
+// m�thode FILE :: readln
-// exécution
+// ex�cution
BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -325,7 +337,7 @@ BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
for ( i = 0 ; i < 2000 ; i++ ) if (chaine[i] == '\n') chaine[i] = 0;
- // en cas d'erreur génère une exception
+ // en cas d'erreur g�n�re une exception
if ( ferror(pFile) ) { Exception = CBotErrRead; return FALSE; }
pResult->SetValString( chaine );
@@ -336,22 +348,22 @@ BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfread (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat "string"
+ // la fonction retourne un r�sultat "string"
return CBotTypResult( CBotTypString );
}
-// méthode FILE :: readln
+// m�thode FILE :: readln
-// exécution
+// ex�cution
BOOL rfeof (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -366,10 +378,10 @@ BOOL rfeof (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfeof (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat booleen
+ // la fonction retourne un r�sultat booleen
return CBotTypResult( CBotTypBoolean );
}
@@ -379,25 +391,25 @@ CBotTypResult cfeof (CBotVar* pThis, CBotVar* &pVar)
void InitClassFILE()
{
-// crée une classe pour la gestion des fichiers
+// cr�e une classe pour la gestion des fichiers
// l'utilisation en est la suivante:
// file canal( "NomFichier.txt" )
// canal.open( "r" ); // ouvre en lecture
// s = canal.readln( ); // lit une ligne
// canal.close(); // referme le fichier
- // crée la classe FILE
+ // cr�e la classe FILE
m_pClassFILE = new CBotClass("file", NULL);
// ajoute le composant ".filename"
m_pClassFILE->AddItem("filename", CBotTypString);
// ajoute le composant ".handle"
m_pClassFILE->AddItem("handle", CBotTypInt, PR_PRIVATE);
- // défini un constructeur et un destructeur
+ // d�fini un constructeur et un destructeur
m_pClassFILE->AddFunction("file", rfconstruct, cfconstruct );
m_pClassFILE->AddFunction("~file", rfdestruct, NULL );
- // défini les méthodes associées
+ // d�fini les m�thodes associ�es
m_pClassFILE->AddFunction("open", rfopen, cfopen );
m_pClassFILE->AddFunction("close", rfclose, cfclose );
m_pClassFILE->AddFunction("writeln", rfwrite, cfwrite );
@@ -407,6 +419,6 @@ void InitClassFILE()
m_pFuncFile = new CBotProgram( );
CBotStringArray ListFonctions;
m_pFuncFile->Compile( "public file openfile(string name, string mode) {return new file(name, mode);}", ListFonctions);
- m_pFuncFile->SetIdent(-2); // identificateur spécial pour RestoreState dans cette fonction
+ m_pFuncFile->SetIdent(-2); // identificateur sp�cial pour RestoreState dans cette fonction
}
diff --git a/src/CBot/Copie de CBotTwoOpExpr.cpp b/src/CBot/Copie de CBotTwoOpExpr.cpp
index 7a95b55..54db4c4 100644
--- a/src/CBot/Copie de CBotTwoOpExpr.cpp
+++ b/src/CBot/Copie de CBotTwoOpExpr.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 + Opérande2
-// Opérande1 > Opérande2
+// * 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 .
#include "CBot.h"
@@ -19,14 +31,14 @@ CBotTwoOpExpr::~CBotTwoOpExpr()
delete m_rightop;
}
-// type d'opérandes acceptés par les opérations
+// type d'op�randes accept�s par les op�rations
#define ENTIER ((1<<CBotTypByte)|(1<<CBotTypShort)|(1<<CBotTypChar)|(1<<CBotTypInt)|(1<<CBotTypLong))
#define FLOTANT ((1<<CBotTypFloat)|(1<<CBotTypDouble))
#define BOOLEEN (1<<CBotTypBoolean)
#define CHAINE (1<<CBotTypString)
#define CLASSE (1<<CBotTypClass)
-// liste des opérations (précéance)
+// liste des op�rations (pr�c�ance)
static int ListOp[] =
{
BOOLEEN, ID_LOG_OR, 0,
@@ -82,35 +94,35 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
CBotCStack* pStk = pStack->TokenStack(); // un bout de pile svp
- // cherche des instructions qui peuvent convenir à gauche de l'opération
+ // cherche des instructions qui peuvent convenir � gauche de l'op�ration
CBotInstr* left = (*pOp == 0) ?
- CBotParExpr::Compile( p, pStk ) : // expression (...) à gauche
- CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A * B à gauche
+ CBotParExpr::Compile( p, pStk ) : // expression (...) � gauche
+ CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A * B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // si erreur, la transmet
- // est-ce qu'on a l'opérande prévu ensuite ?
+ // est-ce qu'on a l'op�rande pr�vu ensuite ?
int TypeOp = p->GetType();
if ( IsInList( TypeOp, pOperations, typemasque ) )
{
- CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotTwoOpExpr* inst = new CBotTwoOpExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
int type1, type2;
- type1 = pStk->GetType(); // de quel type le premier opérande ?
+ type1 = pStk->GetType(); // de quel type le premier op�rande ?
- p = p->Next(); // saute le token de l'opération
+ p = p->Next(); // saute le token de l'op�ration
- // cherche des instructions qui peuvent convenir à droite
+ // cherche des instructions qui peuvent convenir � droite
if ( NULL != (inst->m_rightop = CBotTwoOpExpr::Compile( p, pStk, pOperations )) )
- // expression (...) à droite
+ // expression (...) � droite
{
- // il y a un second opérande acceptable
+ // il y a un second op�rande acceptable
- type2 = pStk->GetType(); // de quel type le résultat ?
+ type2 = pStk->GetType(); // de quel type le r�sultat ?
- // quel est le type du résultat ?
+ // quel est le type du r�sultat ?
int TypeRes = MAX( type1, type2 );
if (!TypeOk( TypeRes, typemasque )) type1 = 99; // erreur de type
@@ -126,81 +138,81 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera
case ID_LS:
TypeRes = CBotTypBoolean;
}
- if ( TypeCompatible (type1, type2) || // les résultats sont-ils compatibles
- // cas particulier pour les concaténation de chaînes
+ if ( TypeCompatible (type1, type2) || // les r�sultats sont-ils compatibles
+ // cas particulier pour les concat�nation de cha�nes
(TypeOp == ID_ADD && (type1 == CBotTypString || type2 == CBotTypString)))
{
- // si ok, enregistre l'opérande dans l'objet
+ // si ok, enregistre l'op�rande dans l'objet
inst->m_leftop = left;
- // met une variable sur la pile pour avoir le type de résultat
+ // met une variable sur la pile pour avoir le type de r�sultat
pStk->SetVar(new CBotVar(NULL, TypeRes));
- // et rend l'object à qui l'a demandé
+ // et rend l'object � qui l'a demand�
return pStack->Return(inst, pStk);
}
pStk->SetError(TX_BAD2TYPE, &inst->m_token);
}
- // en cas d'erreur, libère les éléments
+ // en cas d'erreur, lib�re les �l�ments
delete left;
delete inst;
// et transmet l'erreur qui se trouve sur la pile
return pStack->Return(NULL, pStk);
}
- // si on n'a pas affaire à une opération + ou -
- // rend à qui l'a demandé, l'opérande (de gauche) trouvé
- // à la place de l'objet "addition"
+ // si on n'a pas affaire � une op�ration + ou -
+ // rend � qui l'a demand�, l'op�rande (de gauche) trouv�
+ // � la place de l'objet "addition"
return pStack->Return(left, pStk);
}
-// fait l'opération d'addition ou de soustraction
+// fait l'op�ration d'addition ou de soustraction
BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GetState() == 0 && // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GetState() == 0 && // 1er �tat, �value l'op�rande de gauche
!m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- // passe à l'étape suivante
- pStk1->SetState(1); // prêt pour la suite
+ // passe � l'�tape suivante
+ pStk1->SetState(1); // pr�t pour la suite
- // pour les OU et ET logique, n'évalue pas la seconde expression si pas nécessaire
+ // pour les OU et ET logique, n'�value pas la seconde expression si pas n�cessaire
if ( GetTokenType() == ID_LOG_AND && pStk1->GetVal() == FALSE )
{
CBotVar* res = CBotVar::Create( NULL, CBotTypBoolean);
res->SetValInt(FALSE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
if ( GetTokenType() == ID_LOG_OR && pStk1->GetVal() == TRUE )
{
CBotVar* res = CBotVar::Create( NULL, CBotTypBoolean);
res->SetValInt(TRUE);
pStk1->SetVar(res);
- return pStack->Return(pStk1); // transmet le résultat
+ return pStack->Return(pStk1); // transmet le r�sultat
}
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
// qui se trouve sur la pile, justement.
- CBotStack* pStk2 = pStk1->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
- int type1 = pStk1->GetType(); // de quels types les résultats ?
+ int type1 = pStk1->GetType(); // de quels types les r�sultats ?
int type2 = pStk2->GetType();
- // crée une variable temporaire pour y mettre le résultat
- // quel est le type du résultat ?
+ // cr�e une variable temporaire pour y mettre le r�sultat
+ // quel est le type du r�sultat ?
int TypeRes = MAX(type1, type2);
switch ( GetTokenType() )
{
@@ -218,7 +230,7 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
CBotVar* temp = CBotVar::Create( NULL, MAX(type1, type2) );
int err = 0;
- // fait l'opération selon la demande
+ // fait l'op�ration selon la demande
switch (GetTokenType())
{
case ID_ADD:
@@ -237,28 +249,28 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
err = result->Modulo(pStk1->GetVar(), pStk2->GetVar());// reste de division
break;
case ID_LO:
- temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inférieur
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_HI:
- temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // supérieur
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_LS:
- temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inférieur ou égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur ou �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_HS:
- temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // supérieur ou égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur ou �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_EQ:
- temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // égal
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // �gal
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_NE:
- temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // différent
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // diff�rent
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
break;
case ID_LOG_AND:
case ID_AND:
@@ -285,11 +297,11 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
}
delete temp;
- pStk2->SetVar(result); // met le résultat sur la pile
- if ( err ) pStk2->SetError(err, &m_token); // et l'erreur éventuelle (division par zéro)
+ pStk2->SetVar(result); // met le r�sultat sur la pile
+ if ( err ) pStk2->SetError(err, &m_token); // et l'erreur �ventuelle (division par z�ro)
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/StringFunctions.cpp b/src/CBot/StringFunctions.cpp
index 803ffd9..88a41fd 100644
--- a/src/CBot/StringFunctions.cpp
+++ b/src/CBot/StringFunctions.cpp
@@ -1,21 +1,35 @@
-// définition des fonctions sur les chaînes
-
-
-// donne la longueur d'une chaîne
-// exécution
+// * 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 .
+
+
+// donne la longueur d'une cha�ne
+// ex�cution
BOOL rStrLen( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // pas de second paramètre
+ // pas de second param�tre
if ( pVar->GivNext() != NULL ) { ex = TX_OVERPARAM ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
// met la longueur sur la pile
@@ -28,49 +42,49 @@ BOOL rStrLen( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cIntStr( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADPARAM );
- // pas de second paramètre
+ // pas de second param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
- // le résultat final est un nombre entier
+ // le r�sultat final est un nombre entier
return CBotTypResult( CBotTypInt );
}
-// donne la partie gauche d'une chaîne
-// exécution
+// donne la partie gauche d'une cha�ne
+// ex�cution
BOOL rStrLeft( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble ) { ex = TX_BADNUM ; return TRUE; }
- // récupère ce nombre
+ // r�cup�re ce nombre
int n = pVar->GivValInt();
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { ex = TX_OVERPARAM ; return TRUE; }
- // prend la partie intéressante
+ // prend la partie int�ressante
s = s.Left( n );
// la met sur la pile
@@ -83,56 +97,56 @@ BOOL rStrLeft( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cStrStrInt( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble )
return CBotTypResult( TX_BADNUM );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
- // le résultat final est une string
+ // le r�sultat final est une string
return CBotTypResult( CBotTypString );
}
-// donne la partie droite d'une chaîne
-// exécution
+// donne la partie droite d'une cha�ne
+// ex�cution
BOOL rStrRight( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble ) { ex = TX_BADNUM ; return TRUE; }
- // récupère ce nombre
+ // r�cup�re ce nombre
int n = pVar->GivValInt();
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { ex = TX_OVERPARAM ; return TRUE; }
- // prend la partie intéressante
+ // prend la partie int�ressante
s = s.Right( n );
// la met sur la pile
@@ -140,50 +154,50 @@ BOOL rStrRight( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
return TRUE;
}
-// donne la partie centrale d'une chaîne
-// exécution
+// donne la partie centrale d'une cha�ne
+// ex�cution
BOOL rStrMid( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble ) { ex = TX_BADNUM ; return TRUE; }
- // récupère ce nombre
+ // r�cup�re ce nombre
int n = pVar->GivValInt();
- // 3e paramètre optionnel
+ // 3e param�tre optionnel
if ( pVar->GivNext() != NULL )
{
pVar = pVar->GivNext();
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble ) { ex = TX_BADNUM ; return TRUE; }
- // récupère ce nombre
+ // r�cup�re ce nombre
int l = pVar->GivValInt();
- // mais pas de 4e paramètre
+ // mais pas de 4e param�tre
if ( pVar->GivNext() != NULL ){ ex = TX_OVERPARAM ; return TRUE; }
- // prend la partie intéressante
+ // prend la partie int�ressante
s = s.Mid( n, l );
}
else
{
- // prend la partie intéressante
+ // prend la partie int�ressante
s = s.Mid( n );
}
@@ -192,59 +206,59 @@ BOOL rStrMid( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
return TRUE;
}
-// donne la partie centrale d'une chaîne
+// donne la partie centrale d'une cha�ne
// compilation
CBotTypResult cStrStrIntInt( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble )
return CBotTypResult( TX_BADNUM );
- // 3e paramètre optionnel
+ // 3e param�tre optionnel
if ( pVar->GivNext() != NULL )
{
pVar = pVar->GivNext();
- // qui doit être un nombre
+ // qui doit �tre un nombre
if ( pVar->GivType() > CBotTypDouble )
return CBotTypResult( TX_BADNUM );
- // pas de 4e paramètre
+ // pas de 4e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
}
- // le résultat final est une string
+ // le r�sultat final est une string
return CBotTypResult( CBotTypString );
}
-// donne le nombre contenu dans une chaîne
-// exécution
+// donne le nombre contenu dans une cha�ne
+// ex�cution
BOOL rStrVal( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // mais pas de 2e paramètre
+ // mais pas de 2e param�tre
if ( pVar->GivNext() != NULL ){ ex = TX_OVERPARAM ; return TRUE; }
float val = GivNumFloat(s);
@@ -259,49 +273,49 @@ BOOL rStrVal( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cFloatStr( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // pas de 2e paramètre
+ // pas de 2e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
- // le résultat final est un nombre
+ // le r�sultat final est un nombre
return CBotTypResult( CBotTypFloat );
}
// trouve une chaine dans une autre
-// exécution
+// ex�cution
BOOL rStrFind( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // récupère ce nombre
+ // r�cup�re ce nombre
CBotString s2 = pVar->GivValString();
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { ex = TX_OVERPARAM ; return TRUE; }
- // met le résultat sur la pile
+ // met le r�sultat sur la pile
int res = s.Find(s2);
pResult->SetValInt( res );
if ( res < 0 ) pResult->SetInit( IS_NAN );
@@ -313,43 +327,43 @@ BOOL rStrFind( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cIntStrStr( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // il faut un second paramètre
+ // il faut un second param�tre
pVar = pVar->GivNext();
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
- // le résultat final est un nombre
+ // le r�sultat final est un nombre
return CBotTypResult( CBotTypInt );
}
// donne une chaine en majuscule
-// exécution
+// ex�cution
BOOL rStrUpper( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // mais pas de 2e paramètre
+ // mais pas de 2e param�tre
if ( pVar->GivNext() != NULL ){ ex = TX_OVERPARAM ; return TRUE; }
@@ -361,20 +375,20 @@ BOOL rStrUpper( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
}
// donne une chaine en minuscules
-// exécution
+// ex�cution
BOOL rStrLower( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) { ex = TX_LOWPARAM ; return TRUE; }
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString ) { ex = TX_BADSTRING ; return TRUE; }
- // recupére le contenu de la string
+ // recup�re le contenu de la string
CBotString s = pVar->GivValString();
- // mais pas de 2e paramètre
+ // mais pas de 2e param�tre
if ( pVar->GivNext() != NULL ){ ex = TX_OVERPARAM ; return TRUE; }
@@ -390,17 +404,17 @@ BOOL rStrLower( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
CBotTypResult cStrStr( CBotVar* &pVar, void* pUser )
{
- // il faut un paramètre
+ // il faut un param�tre
if ( pVar == NULL ) return CBotTypResult( TX_LOWPARAM );
- // qui doit être une string
+ // qui doit �tre une string
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( TX_BADSTRING );
- // pas de 2e paramètre
+ // pas de 2e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( TX_OVERPARAM );
- // le résultat final est une string
+ // le r�sultat final est une string
return CBotTypResult( CBotTypString );
}
diff --git a/src/CBot/TestCBot/CBotConsoleDlg.cpp b/src/CBot/TestCBot/CBotConsoleDlg.cpp
index 5f29e86..dfd4ec4 100644
--- a/src/CBot/TestCBot/CBotConsoleDlg.cpp
+++ b/src/CBot/TestCBot/CBotConsoleDlg.cpp
@@ -1,5 +1,18 @@
-// CBotConsoleDlg.cpp : implementation file
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
@@ -104,7 +117,7 @@ UINT ThreadProc(ThreadInfo *info)
CTimeSpan ts = t - t0;
char buffer[200];
- sprintf( buffer, "\r\nExécution terminée en %d secondes.\r\nInterrompue %d fois.\r\n",
+ sprintf( buffer, "\r\nEx�cution termin�e en %d secondes.\r\nInterrompue %d fois.\r\n",
ts.GetTotalSeconds(), Cpt);
info->m_pEdit1->ReplaceSel(buffer);
@@ -168,7 +181,7 @@ void CBotConsoleDlg::OnOK()
m_Edit2.EnableWindow(FALSE);
m_cOK.EnableWindow(FALSE);
- // lance un processus paralèle pour l'exécution
+ // lance un processus paral�le pour l'ex�cution
m_threadinfo.m_pWndMessage = this ;
m_threadinfo.m_pEdit1 = &m_Edit1;
diff --git a/src/CBot/TestCBot/CBotConsoleDlg.h b/src/CBot/TestCBot/CBotConsoleDlg.h
index bae9793..88d04dc 100644
--- a/src/CBot/TestCBot/CBotConsoleDlg.h
+++ b/src/CBot/TestCBot/CBotConsoleDlg.h
@@ -1,3 +1,18 @@
+// * 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 .
#if !defined(AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_)
#define AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/ChildFrm.cpp b/src/CBot/TestCBot/ChildFrm.cpp
index 9005c72..0d21e5f 100644
--- a/src/CBot/TestCBot/ChildFrm.cpp
+++ b/src/CBot/TestCBot/ChildFrm.cpp
@@ -1,5 +1,18 @@
-// ChildFrm.cpp : implementation of the CChildFrame class
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
diff --git a/src/CBot/TestCBot/ChildFrm.h b/src/CBot/TestCBot/ChildFrm.h
index ebcbeb2..cacbc4a 100644
--- a/src/CBot/TestCBot/ChildFrm.h
+++ b/src/CBot/TestCBot/ChildFrm.h
@@ -1,6 +1,18 @@
-// ChildFrm.h : interface of the CChildFrame class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_CHILDFRM_H__4D1BB909_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_CHILDFRM_H__4D1BB909_8E74_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/MainFrm.cpp b/src/CBot/TestCBot/MainFrm.cpp
index e151cce..2870f93 100644
--- a/src/CBot/TestCBot/MainFrm.cpp
+++ b/src/CBot/TestCBot/MainFrm.cpp
@@ -1,5 +1,18 @@
-// MainFrm.cpp : implementation of the CMainFrame class
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
diff --git a/src/CBot/TestCBot/MainFrm.h b/src/CBot/TestCBot/MainFrm.h
index b9d68db..5b33df5 100644
--- a/src/CBot/TestCBot/MainFrm.h
+++ b/src/CBot/TestCBot/MainFrm.h
@@ -1,6 +1,18 @@
-// MainFrm.h : interface of the CMainFrame class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_MAINFRM_H__4D1BB907_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_MAINFRM_H__4D1BB907_8E74_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/PerformDlg.cpp b/src/CBot/TestCBot/PerformDlg.cpp
index a541f0b..f027f66 100644
--- a/src/CBot/TestCBot/PerformDlg.cpp
+++ b/src/CBot/TestCBot/PerformDlg.cpp
@@ -1,5 +1,18 @@
-// PerformDlg.cpp : implementation file
-//
+// * 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 .
#include "stdafx.h"
#include "testcbot.h"
@@ -122,7 +135,7 @@ BOOL CPerformDlg::OnInitDialog()
CBotStringArray liste;
- // crée les scripts pour les tests
+ // cr�e les scripts pour les tests
for ( int i = 0; i < 100; i++ )
{
m_pProg[i] = new CBotProgram();
@@ -130,7 +143,7 @@ BOOL CPerformDlg::OnInitDialog()
m_pProg[i]->Start(liste[0]);
}
- // lance un processus paralèle pour l'exécution
+ // lance un processus paral�le pour l'ex�cution
// m_threadinfo2.m_pWndMessage = this ;
m_threadinfo2.m_pEdit = &m_Edit1;
diff --git a/src/CBot/TestCBot/PerformDlg.h b/src/CBot/TestCBot/PerformDlg.h
index 77ca71a..18ba1ea 100644
--- a/src/CBot/TestCBot/PerformDlg.h
+++ b/src/CBot/TestCBot/PerformDlg.h
@@ -1,3 +1,18 @@
+// * 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 .
#if !defined(AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_)
#define AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/Routines.cpp b/src/CBot/TestCBot/Routines.cpp
index cd3a32b..4f037d1 100644
--- a/src/CBot/TestCBot/Routines.cpp
+++ b/src/CBot/TestCBot/Routines.cpp
@@ -1,10 +1,25 @@
+// * 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 .
////////////////////////////////////////////////////////////////////
// routine show()
-// utilisable depuis le programme écrit en CBot
+// utilisable depuis le programme �crit en CBot
-// exécution
+// ex�cution
BOOL rShow( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
{
CString s;
@@ -32,15 +47,15 @@ BOOL rShow( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
CBotTypResult cShow( CBotVar* &pVar, void* pUser)
{
if ( pVar == NULL ) return CBotTypResult(5028);
- return CBotTypResult(0); // tous paramètres acceptés, void en retour
+ return CBotTypResult(0); // tous param�tres accept�s, void en retour
}
////////////////////////////////////////////////////////////////////
// routine print()
-// utilisable depuis le programme écrit en CBot
+// utilisable depuis le programme �crit en CBot
-// exécution
+// ex�cution
BOOL rPrintLn( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
{
CString s;
@@ -90,19 +105,19 @@ BOOL rPrint( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
CBotTypResult cPrint( CBotVar* &pVar, void* pUser)
{
- return CBotTypResult(0); // tous paramètres acceptés, un entier en retour
+ return CBotTypResult(0); // tous param�tres accept�s, un entier en retour
}
//////////////////////////////////////////////////////////////////
// class CPoint pour essayer
-// exécution
+// ex�cution
BOOL rCPoint( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
{
CString s;
- if ( pVar == NULL )return TRUE; // constructeur sans paramètres est ok
+ if ( pVar == NULL )return TRUE; // constructeur sans param�tres est ok
CBotVar* pX = pThis->GivItem("x");
pX->SetValFloat( pVar->GivValFloat() );
@@ -117,20 +132,20 @@ BOOL rCPoint( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
CBotTypResult cCPoint( CBotVar* pThis, CBotVar* &pVar)
{
- // ok si aucun paramètres !
+ // ok si aucun param�tres !
if ( pVar == NULL ) return CBotTypResult(0);
- // paramètre de type numérique svp
+ // param�tre de type num�rique svp
if ( pVar->GivType() > CBotTypDouble ) return CBotTypResult(5011);
pVar = pVar->GivNext();
- // il doit y avoir un second paramètre
+ // il doit y avoir un second param�tre
if ( pVar == NULL ) return 5028;
- // également de type numérique
+ // �galement de type num�rique
if ( pVar->GivType() > CBotTypDouble )return CBotTypResult(5011);
pVar = pVar->GivNext();
- // et pas plus de 2 paramètres svp
+ // et pas plus de 2 param�tres svp
if ( pVar != NULL ) return CBotTypResult(5026);
return CBotTypResult(0); // cette fonction retourne void
diff --git a/src/CBot/TestCBot/StdAfx.cpp b/src/CBot/TestCBot/StdAfx.cpp
index b1dde8d..7a91baa 100644
--- a/src/CBot/TestCBot/StdAfx.cpp
+++ b/src/CBot/TestCBot/StdAfx.cpp
@@ -1,6 +1,18 @@
-// stdafx.cpp : source file that includes just the standard includes
-// TestCBot.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
+// * 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 .
#include "stdafx.h"
diff --git a/src/CBot/TestCBot/StdAfx.h b/src/CBot/TestCBot/StdAfx.h
index 7be8c40..9a7d859 100644
--- a/src/CBot/TestCBot/StdAfx.h
+++ b/src/CBot/TestCBot/StdAfx.h
@@ -1,7 +1,18 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
+// * 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 .
#if !defined(AFX_STDAFX_H__4D1BB905_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_STDAFX_H__4D1BB905_8E74_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/TestCBot.cpp b/src/CBot/TestCBot/TestCBot.cpp
index 7e2aabb..50c1e72 100644
--- a/src/CBot/TestCBot/TestCBot.cpp
+++ b/src/CBot/TestCBot/TestCBot.cpp
@@ -1,5 +1,18 @@
-// TestCBot.cpp : Defines the class behaviors for the application.
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
@@ -55,7 +68,7 @@ static char BASED_CODE szFilename[] = "File1";
#include "../ClassFILE.cpp"
-// routine pour mettre à jour l'instance de la classe Bot courante
+// routine pour mettre � jour l'instance de la classe Bot courante
void rMajObject( CBotVar* pThis, void* pUser )
{
if (!pThis->IsElemOfClass("object"))
@@ -76,7 +89,7 @@ void rMajObject( CBotVar* pThis, void* pUser )
// pX = pThis->GivItem( "xx" );
// pX->SetValFloat( (float)22 );
- // crée une instance sur une classe object
+ // cr�e une instance sur une classe object
// CBotVar* pAutre = CBotVar::Create("autre", CBotTypClass, "object");
// pAutre->SetUserPtr( (void*)3 );
// pPt->SetPointer( pAutre );
@@ -88,13 +101,13 @@ void rMajObject( CBotVar* pThis, void* pUser )
BOOL CTestCBotApp::InitInstance()
{
//////////////////////////////////////////////
-// défini les mots clefs supplémentaires
+// d�fini les mots clefs suppl�mentaires
// -------------------------------------------
CBotProgram::Init();
//////////////////////////////////////////////
-// défini les fonctions "show()" et "print()"
+// d�fini les fonctions "show()" et "print()"
// -------------------------------------------
CBotProgram::AddFunction("show", rShow, cShow);
@@ -103,7 +116,7 @@ BOOL CTestCBotApp::InitInstance()
///////////////////////////////////
-// définie la classe globale CPoint
+// d�finie la classe globale CPoint
// --------------------------------
m_pClassPoint = new CBotClass("CPoint", NULL);
@@ -126,7 +139,7 @@ BOOL CTestCBotApp::InitInstance()
// ajoute le constructeur pour cette classe
m_pClassPointIntr->AddFunction("point", rCPoint, cCPoint);
- // défini la classe "object"
+ // d�fini la classe "object"
CBotClass* pClassObject = new CBotClass( "object", NULL ) ;
pClassObject->AddItem( "xx", CBotTypFloat );
pClassObject->AddItem( "position", CBotTypResult( CBotTypIntrinsic, "point" ) );
diff --git a/src/CBot/TestCBot/TestCBot.h b/src/CBot/TestCBot/TestCBot.h
index f101fd1..0fe04ec 100644
--- a/src/CBot/TestCBot/TestCBot.h
+++ b/src/CBot/TestCBot/TestCBot.h
@@ -1,5 +1,18 @@
-// TestCBot.h : main header file for the TESTCBOT application
-//
+// * 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 .
#if !defined(AFX_TESTCBOT_H__4D1BB903_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_TESTCBOT_H__4D1BB903_8E74_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/TestCBotDoc.cpp b/src/CBot/TestCBot/TestCBotDoc.cpp
index e033dd5..5238b19 100644
--- a/src/CBot/TestCBot/TestCBotDoc.cpp
+++ b/src/CBot/TestCBot/TestCBotDoc.cpp
@@ -1,5 +1,18 @@
-// TestCBotDoc.cpp : implementation of the CTestCBotDoc class
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
@@ -125,7 +138,7 @@ void CTestCBotDoc::OnRun()
m_pProg = NULL;
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError = CBotProgram::GivErrorText( code );
AfxMessageBox( TextError );
@@ -136,7 +149,7 @@ void CTestCBotDoc::OnRun()
if( m_Liste.GivSize() == 0 )
{
- AfxMessageBox("Aucune fonction marquée \"extern\" !");
+ AfxMessageBox("Aucune fonction marqu�e \"extern\" !");
return;
}
@@ -160,7 +173,7 @@ void CTestCBotDoc::OnRun()
TextError = m_pProg->GivErrorText( dlg.m_code );
m_pEdit->SetSel( dlg.m_start, dlg.m_end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
AfxMessageBox(TextError);
}
@@ -187,7 +200,7 @@ BOOL CTestCBotDoc::Compile()
if ( m_pProg == NULL ) m_pProg = new CBotProgram();
char buffer[100];
- strcpy(buffer, "le pointeur à passer pour voir");
+ strcpy(buffer, "le pointeur � passer pour voir");
if (m_bModified && !m_pProg->Compile(m_DocText, m_Liste, (void*)buffer))
{
@@ -196,7 +209,7 @@ BOOL CTestCBotDoc::Compile()
m_pProg = NULL;
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError = CBotProgram::GivErrorText( code );
AfxMessageBox( TextError );
@@ -209,7 +222,7 @@ BOOL CTestCBotDoc::Compile()
if ( m_pProg->GetPosition( "TheTest", start, end) )
{
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
}
m_bModified = FALSE;
@@ -219,7 +232,7 @@ BOOL CTestCBotDoc::Compile()
static int compt = 0;
-// routine retournant le "pointeur" à un autre object
+// routine retournant le "pointeur" � un autre object
BOOL rRetObject( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
pResult->SetPointer( NULL );
@@ -318,7 +331,7 @@ CBotTypResult cRadar( CBotVar* &pVar, void* pUser )
return CBotTypResult( CBotTypPointer, "object");
}
-// routine retournant le "pointeur" à un autre object
+// routine retournant le "pointeur" � un autre object
BOOL rTEST( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
test = 1 ;
@@ -338,7 +351,7 @@ CBotTypResult cTEST( CBotVar* &pVar, void* pUser )
return CBotTypResult( 0 );
}
-// routine retournant le "pointeur" à un autre object
+// routine retournant le "pointeur" � un autre object
BOOL rF( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser )
{
if ( pResult == NULL ) return TRUE;
@@ -353,7 +366,7 @@ CBotTypResult cF( CBotVar* &pVar, void* pUser )
/////////////////////////////////////////////////////////////////
-// Compilation d'une procédure avec un "point".
+// Compilation d'une proc�dure avec un "point".
CBotTypResult cPoint(CBotVar* &var, void* user)
{
@@ -381,7 +394,7 @@ CBotTypResult cPoint(CBotVar* &var, void* user)
return CBotTypResult( CBotErrBadParam );
}
-// Donne un paramètre de type "point".
+// Donne un param�tre de type "point".
#define UNIT 1
@@ -495,13 +508,13 @@ void CTestCBotDoc::OnTest()
// dlg.m_Script = m_DocText;
// dlg.DoModal();
- // défini la routine RetObject
+ // d�fini la routine RetObject
CBotProgram::AddFunction( "Radar", rRetObject, cRetObject );
// ajoute une routine pour cette classe
CBotProgram::AddFunction("Space", rSpace, cSpace);
- // défini la routine Test
+ // d�fini la routine Test
CBotProgram::AddFunction( "TEST", rTEST, cTEST );
CBotProgram::AddFunction( "F", rF, cF );
@@ -509,13 +522,13 @@ void CTestCBotDoc::OnTest()
CBotProgram::AddFunction( "fire", rTurn, cTurn );
CBotProgram::AddFunction( "radar", rRadar, cRadar );
- // crée une instance de la classe "Bot" pour ce robot
+ // cr�e une instance de la classe "Bot" pour ce robot
CBotVar* pThisRobot = CBotVar::Create( "", CBotTypResult(CBotTypClass, "object") );
pThisRobot->SetUserPtr( (void*)1 );
pThisRobot->SetIdent( 1234 );
delete m_pProg;
- // crée un objet programme associé à cette instance
+ // cr�e un objet programme associ� � cette instance
m_pProg = new CBotProgram(pThisRobot);
// compile le programme
@@ -532,7 +545,7 @@ void CTestCBotDoc::OnTest()
delete pThisRobot;
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError = CBotProgram::GivErrorText( code );
AfxMessageBox( TextError );
@@ -541,14 +554,14 @@ void CTestCBotDoc::OnTest()
return;
}
- // exécute pour voir
+ // ex�cute pour voir
m_pProg->Start(m_Liste[0]);
int mode = -1;
if ( mode >= 0 ) {
- // sauve et restore à chaque pas possible
+ // sauve et restore � chaque pas possible
while (!m_pProg->Run(NULL, 1))
{
const char* FunctionName;
@@ -575,7 +588,7 @@ if ( mode == 2 ) if (!m_pProg->Compile(m_DocText, m_Liste, (void*) 44))
delete pThisRobot;
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError = CBotProgram::GivErrorText( code );
AfxMessageBox( TextError );
diff --git a/src/CBot/TestCBot/TestCBotDoc.h b/src/CBot/TestCBot/TestCBotDoc.h
index d8275b5..d3a2748 100644
--- a/src/CBot/TestCBot/TestCBotDoc.h
+++ b/src/CBot/TestCBot/TestCBotDoc.h
@@ -1,6 +1,18 @@
-// TestCBotDoc.h : interface of the CTestCBotDoc class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_TESTCBOTDOC_H__4D1BB90B_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_TESTCBOTDOC_H__4D1BB90B_8E74_11D4_A439_00D059085115__INCLUDED_
@@ -18,8 +30,8 @@ protected: // create from serialization only
// Attributes
public:
- CEdit* m_pEdit; // pour mémoriser le texte, et l'afficher
- CBotProgram* m_pProg; // le programme compilé
+ CEdit* m_pEdit; // pour m�moriser le texte, et l'afficher
+ CBotProgram* m_pProg; // le programme compil�
CString m_DocText;
CBotStringArray m_Liste;
BOOL m_bModified;
diff --git a/src/CBot/TestCBot/TestCBotView.cpp b/src/CBot/TestCBot/TestCBotView.cpp
index 052e756..21ddbaa 100644
--- a/src/CBot/TestCBot/TestCBotView.cpp
+++ b/src/CBot/TestCBot/TestCBotView.cpp
@@ -1,5 +1,18 @@
-// TestCBotView.cpp : implementation of the CTestCBotView class
-//
+// * 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 .
#include "stdafx.h"
#include "TestCBot.h"
@@ -93,7 +106,7 @@ void CTestCBotView::OnActivateView(BOOL bActivate, CView* pActivateView, CView*
if ( !bActivate && !pDoc->Compile() )
{
-// comment faire pour réactiver l'ancien document
+// comment faire pour r�activer l'ancien document
}
CView::OnActivateView(bActivate, pActivateView, pDeactiveView);
diff --git a/src/CBot/TestCBot/TestCBotView.h b/src/CBot/TestCBot/TestCBotView.h
index bca156f..1932993 100644
--- a/src/CBot/TestCBot/TestCBotView.h
+++ b/src/CBot/TestCBot/TestCBotView.h
@@ -1,6 +1,18 @@
-// TestCBotView.h : interface of the CTestCBotView class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_TESTCBOTVIEW_H__4D1BB90D_8E74_11D4_A439_00D059085115__INCLUDED_)
#define AFX_TESTCBOTVIEW_H__4D1BB90D_8E74_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/TestCBot/resource.h b/src/CBot/TestCBot/resource.h
index bed36ca..d549244 100644
--- a/src/CBot/TestCBot/resource.h
+++ b/src/CBot/TestCBot/resource.h
@@ -1,7 +1,18 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by TestCBot.rc
-//
+// * 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 IDD_ABOUTBOX 100
#define IDR_MAINFRAME 128
#define IDR_TESTCBTYPE 129
diff --git a/src/CBot/old CBotAddExpr.cpp b/src/CBot/old CBotAddExpr.cpp
index 85b7588..4a1d91a 100644
--- a/src/CBot/old CBotAddExpr.cpp
+++ b/src/CBot/old CBotAddExpr.cpp
@@ -1,6 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 + Opérande2
-// Opérande1 - Opérande2
+// * 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 .
#include "CBot.h"
@@ -26,9 +38,9 @@ CBotInstr* CBotAddExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotCStack* pStk = pStack->TokenStack(); // un bout de pile svp
- // cherche des instructions qui peuvent convenir à gauche de l'opération + ou -
+ // cherche des instructions qui peuvent convenir � gauche de l'op�ration + ou -
- CBotInstr* left = CBotMulExpr::Compile( p, pStk ); // expression A * B à gauche
+ CBotInstr* left = CBotMulExpr::Compile( p, pStk ); // expression A * B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // si erreur, la transmet
// est-ce qu'on a le token + ou - ensuite ?
@@ -36,82 +48,82 @@ CBotInstr* CBotAddExpr::Compile(CBotToken* &p, CBotCStack* pStack)
if ( p->GetType() == ID_ADD ||
p->GetType() == ID_SUB) // plus ou moins
{
- CBotAddExpr* inst = new CBotAddExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotAddExpr* inst = new CBotAddExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
int type1, type2;
- type1 = pStk->GetType(CBotTypChar); // de quel type le premier opérande ?
+ type1 = pStk->GetType(CBotTypChar); // de quel type le premier op�rande ?
- p = p->Next(); // saute le token de l'opération
+ p = p->Next(); // saute le token de l'op�ration
- // cherche des instructions qui peuvent convenir à droite
+ // cherche des instructions qui peuvent convenir � droite
- if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression (...) à droite
+ if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression (...) � droite
{
- // il y a un second opérande acceptable
+ // il y a un second op�rande acceptable
- type2 = pStk->GetType(CBotTypChar); // de quel type le résultat ?
+ type2 = pStk->GetType(CBotTypChar); // de quel type le r�sultat ?
- if ( type1 == type2 && // les résultats sont-ils compatibles
+ if ( type1 == type2 && // les r�sultats sont-ils compatibles
type1 != CBotTypBoolean &&
(inst->m_token.GetType() != ID_SUB ||
- type1 < CBotTypBoolean )) // pas de soustraction de chaînes !
+ type1 < CBotTypBoolean )) // pas de soustraction de cha�nes !
{
- // si ok, enregistre l'opérande dans l'objet
+ // si ok, enregistre l'op�rande dans l'objet
inst->m_leftop = left;
- // et rend l'object à qui l'a demandé
+ // et rend l'object � qui l'a demand�
return pStack->Return(inst, pStk);
}
pStk->SetError(TX_BAD2TYPE, &inst->m_token);
}
- // en cas d'erreur, libère les éléments
+ // en cas d'erreur, lib�re les �l�ments
delete left;
delete inst;
// et transmet l'erreur qui se trouve sur la pile
return pStack->Return(NULL, pStk);
}
- // si on n'a pas affaire à une opération + ou -
- // rend à qui l'a demandé, l'opérande (de gauche) trouvé
- // à la place de l'objet "addition"
+ // si on n'a pas affaire � une op�ration + ou -
+ // rend � qui l'a demand�, l'op�rande (de gauche) trouv�
+ // � la place de l'objet "addition"
return pStack->Return(left, pStk);
}
-// fait l'opération d'addition ou de soustraction
+// fait l'op�ration d'addition ou de soustraction
BOOL CBotAddExpr::Execute(CBotStack* &pStack)
{
- CBotStack* pStk1 = pStack->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk1 = pStack->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // selon la reprise, on peut être dans l'un des 2 états
+ // selon la reprise, on peut �tre dans l'un des 2 �tats
- if ( pStk1->GetState() == 0 && // 1er état, évalue l'opérande de gauche
+ if ( pStk1->GetState() == 0 && // 1er �tat, �value l'op�rande de gauche
!m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- // passe à l'étape suivante
- pStk1->SetState(1); // prêt pour la suite
+ // passe � l'�tape suivante
+ pStk1->SetState(1); // pr�t pour la suite
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
// qui se trouve sur la pile, justement.
- CBotStack* pStk2 = pStk1->AddStack(); // ajoute un élément à la pile
+ CBotStack* pStk2 = pStk1->AddStack(); // ajoute un �l�ment � la pile
// ou le retrouve en cas de reprise
- // 2e état, évalue l'opérande de droite
+ // 2e �tat, �value l'op�rande de droite
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
- int type1 = pStk1->GetType(); // de quels types les résultats ?
+ int type1 = pStk1->GetType(); // de quels types les r�sultats ?
int type2 = pStk2->GetType();
- // crée une variable temporaire pour y mettre le résultat
+ // cr�e une variable temporaire pour y mettre le r�sultat
CBotVar* result = CBotVar::Create( NULL, MAX(type1, type2));
- // fait l'opération selon la demande
+ // fait l'op�ration selon la demande
switch (GetTokenType())
{
case ID_ADD:
@@ -121,10 +133,10 @@ BOOL CBotAddExpr::Execute(CBotStack* &pStack)
result->Sub(pStk1->GetVar(), pStk2->GetVar()); // soustrait
break;
}
- pStk2->SetVar(result); // met le résultat sur la pile
+ pStk2->SetVar(result); // met le r�sultat sur la pile
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/old CBotCompExpr.cpp b/src/CBot/old CBotCompExpr.cpp
index e7439b7..c9f81d9 100644
--- a/src/CBot/old CBotCompExpr.cpp
+++ b/src/CBot/old CBotCompExpr.cpp
@@ -1,7 +1,18 @@
-///////////////////////////////////////////////////
-// expression du genre Opérande1 > Opérande2
-// Opérande1 != Opérande2
-// etc.
+// * 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 .
#include "CBot.h"
@@ -27,7 +38,7 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
{
CBotCStack* pStk = pStack->TokenStack();
- CBotInstr* left = CBotAddExpr::Compile( p, pStk ); // expression A + B à gauche
+ CBotInstr* left = CBotAddExpr::Compile( p, pStk ); // expression A + B � gauche
if (left == NULL) return pStack->Return(NULL, pStk); // erreur
if ( p->GetType() == ID_HI ||
@@ -37,22 +48,22 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
p->GetType() == ID_EQ ||
p->GetType() == ID_NE) // les diverses comparaisons
{
- CBotCompExpr* inst = new CBotCompExpr(); // élément pour opération
- inst->SetToken(p); // mémorise l'opération
+ CBotCompExpr* inst = new CBotCompExpr(); // �l�ment pour op�ration
+ inst->SetToken(p); // m�morise l'op�ration
int type1, type2;
type1 = pStk->GetType(CBotTypChar);
p = p->Next();
- if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression A + B à droite
+ if ( NULL != (inst->m_rightop = CBotAddExpr::Compile( p, pStk )) ) // expression A + B � droite
{
type2 = pStk->GetType(CBotTypChar);
- // les résultats sont-ils compatibles
+ // les r�sultats sont-ils compatibles
if ( type1 == type2 && type1 != CBotTypBoolean && type1 != CBotTypClass)
{
inst->m_leftop = left;
pStk->SetVar(new CBotVar(NULL, CBotTypBoolean));
- // le résultat est un boolean
+ // le r�sultat est un boolean
return pStack->Return(inst, pStk);
}
pStk->SetError(TX_BAD2TYPE, &inst->m_token);
@@ -67,7 +78,7 @@ CBotInstr* CBotCompExpr::Compile(CBotToken* &p, CBotCStack* pStack)
}
-// fait l'opération
+// fait l'op�ration
BOOL CBotCompExpr::Execute(CBotStack* &pStack)
{
@@ -75,9 +86,9 @@ BOOL CBotCompExpr::Execute(CBotStack* &pStack)
if ( pStk1->GetState() == 0 && !m_leftop->Execute(pStk1) ) return FALSE; // interrompu ici ?
- pStk1->SetState(1); // opération terminée
+ pStk1->SetState(1); // op�ration termin�e
- // demande un peu plus de stack pour ne pas toucher le résultat de gauche
+ // demande un peu plus de stack pour ne pas toucher le r�sultat de gauche
CBotStack* pStk2 = pStk1->AddStack();
if ( !m_rightop->Execute(pStk2) ) return FALSE; // interrompu ici ?
@@ -91,30 +102,30 @@ BOOL CBotCompExpr::Execute(CBotStack* &pStack)
switch (GetTokenType())
{
case ID_LO:
- temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inférieur
+ temp->Lo(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur
break;
case ID_HI:
- temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // supérieur
+ temp->Hi(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur
break;
case ID_LS:
- temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inférieur ou égal
+ temp->Ls(pStk1->GetVar(), pStk2->GetVar()); // inf�rieur ou �gal
break;
case ID_HS:
- temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // supérieur ou égal
+ temp->Hs(pStk1->GetVar(), pStk2->GetVar()); // sup�rieur ou �gal
break;
case ID_EQ:
- temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // égal
+ temp->Eq(pStk1->GetVar(), pStk2->GetVar()); // �gal
break;
case ID_NE:
- temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // différent
+ temp->Ne(pStk1->GetVar(), pStk2->GetVar()); // diff�rent
break;
}
- result->SetValInt(temp->GetValInt()); // converti le résultat
+ result->SetValInt(temp->GetValInt()); // converti le r�sultat
delete temp;
- pStk2->SetVar(result); // met le résultat sur la pile
+ pStk2->SetVar(result); // met le r�sultat sur la pile
- pStk1->Return(pStk2); // libère la pile
- return pStack->Return(pStk1); // transmet le résultat
+ pStk1->Return(pStk2); // lib�re la pile
+ return pStack->Return(pStk1); // transmet le r�sultat
}
diff --git a/src/CBot/old TstCBot/BotConsoleDlg.cpp b/src/CBot/old TstCBot/BotConsoleDlg.cpp
index 077f080..b7348ed 100644
--- a/src/CBot/old TstCBot/BotConsoleDlg.cpp
+++ b/src/CBot/old TstCBot/BotConsoleDlg.cpp
@@ -1,5 +1,18 @@
-// BotConsoleDlg.cpp : implementation file
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
@@ -68,7 +81,7 @@ UINT ThreadProc(ThreadInfo *info)
CTimeSpan ts = t - t0;
char buffer[200];
- sprintf( buffer, "\r\nExécution terminée en %d secondes.\r\nInterrompue %d fois.\r\n",
+ sprintf( buffer, "\r\nEx�cution termin�e en %d secondes.\r\nInterrompue %d fois.\r\n",
ts.GetTotalSeconds(), Cpt);
info->m_pEdit1->ReplaceSel(buffer);
@@ -126,7 +139,7 @@ void CBotConsoleDlg::OnOK()
m_Edit2.EnableWindow(FALSE);
m_cOK.EnableWindow(FALSE);
- // lance un processus paralèle pour l'exécution
+ // lance un processus paral�le pour l'ex�cution
m_threadinfo.m_pWndMessage = this ;
m_threadinfo.m_pEdit1 = &m_Edit1;
diff --git a/src/CBot/old TstCBot/BotConsoleDlg.h b/src/CBot/old TstCBot/BotConsoleDlg.h
index 9b54ff2..6a483da 100644
--- a/src/CBot/old TstCBot/BotConsoleDlg.h
+++ b/src/CBot/old TstCBot/BotConsoleDlg.h
@@ -1,3 +1,18 @@
+// * 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 .
#if !defined(AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_)
#define AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/old TstCBot/BotErrorDlg.cpp b/src/CBot/old TstCBot/BotErrorDlg.cpp
index 87d56f0..8dc9b37 100644
--- a/src/CBot/old TstCBot/BotErrorDlg.cpp
+++ b/src/CBot/old TstCBot/BotErrorDlg.cpp
@@ -1,5 +1,18 @@
-// BotErrorDlg.cpp : implementation file
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
diff --git a/src/CBot/old TstCBot/BotErrorDlg.h b/src/CBot/old TstCBot/BotErrorDlg.h
index 522afad..9d87848 100644
--- a/src/CBot/old TstCBot/BotErrorDlg.h
+++ b/src/CBot/old TstCBot/BotErrorDlg.h
@@ -1,3 +1,18 @@
+// * 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 .
#if !defined(AFX_BOTERRORDLG_H__80E73D20_7454_11D4_A439_00D059085115__INCLUDED_)
#define AFX_BOTERRORDLG_H__80E73D20_7454_11D4_A439_00D059085115__INCLUDED_
diff --git a/src/CBot/old TstCBot/CMyThread.cpp b/src/CBot/old TstCBot/CMyThread.cpp
index ca92c77..ab54ab4 100644
--- a/src/CBot/old TstCBot/CMyThread.cpp
+++ b/src/CBot/old TstCBot/CMyThread.cpp
@@ -1,5 +1,18 @@
-// CMyThread.cpp : pour créer un processus pour la console
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
@@ -38,7 +51,7 @@ BOOL CMyThread::InitInstance()
CTstCBotApp* pApp = (CTstCBotApp*)AfxGetApp();
- // ouvre une fenêtre pour afficher les sorties
+ // ouvre une fen�tre pour afficher les sorties
CRect rect;
AfxGetMainWnd()->GetClientRect( rect );
rect += CPoint(30,30);
diff --git a/src/CBot/old TstCBot/CMyThread.h b/src/CBot/old TstCBot/CMyThread.h
index 1134077..6d5d866 100644
--- a/src/CBot/old TstCBot/CMyThread.h
+++ b/src/CBot/old TstCBot/CMyThread.h
@@ -1,6 +1,18 @@
-// CMyThread.h : pour créer un processus pour la console
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_MAINFRM_H__20B3756C_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_MAINFRM_H__20B3756C_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
diff --git a/src/CBot/old TstCBot/MainFrm.cpp b/src/CBot/old TstCBot/MainFrm.cpp
index 6c0962c..6550a89 100644
--- a/src/CBot/old TstCBot/MainFrm.cpp
+++ b/src/CBot/old TstCBot/MainFrm.cpp
@@ -1,5 +1,18 @@
-// MainFrm.cpp : implementation of the CMainFrame class
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
diff --git a/src/CBot/old TstCBot/MainFrm.h b/src/CBot/old TstCBot/MainFrm.h
index 56b9c41..fe86ee6 100644
--- a/src/CBot/old TstCBot/MainFrm.h
+++ b/src/CBot/old TstCBot/MainFrm.h
@@ -1,6 +1,18 @@
-// MainFrm.h : interface of the CMainFrame class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_MAINFRM_H__70B3756C_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_MAINFRM_H__70B3756C_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
diff --git a/src/CBot/old TstCBot/Resource.h b/src/CBot/old TstCBot/Resource.h
index 6863fd8..f131d7c 100644
--- a/src/CBot/old TstCBot/Resource.h
+++ b/src/CBot/old TstCBot/Resource.h
@@ -1,7 +1,18 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by TstCBot.rc
-//
+// * 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 IDD_ABOUTBOX 100
#define IDR_MAINFRAME 128
#define IDR_TSTCBOTYPE 129
diff --git a/src/CBot/old TstCBot/StdAfx.cpp b/src/CBot/old TstCBot/StdAfx.cpp
index ae0ec93..7a91baa 100644
--- a/src/CBot/old TstCBot/StdAfx.cpp
+++ b/src/CBot/old TstCBot/StdAfx.cpp
@@ -1,6 +1,18 @@
-// stdafx.cpp : source file that includes just the standard includes
-// TstCBot.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
+// * 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 .
#include "stdafx.h"
diff --git a/src/CBot/old TstCBot/StdAfx.h b/src/CBot/old TstCBot/StdAfx.h
index 7d46ace..eea8584 100644
--- a/src/CBot/old TstCBot/StdAfx.h
+++ b/src/CBot/old TstCBot/StdAfx.h
@@ -1,7 +1,18 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
+// * 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 .
#if !defined(AFX_STDAFX_H__70B3756A_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_STDAFX_H__70B3756A_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
diff --git a/src/CBot/old TstCBot/TstCBot.cpp b/src/CBot/old TstCBot/TstCBot.cpp
index 8ac4557..5b831e3 100644
--- a/src/CBot/old TstCBot/TstCBot.cpp
+++ b/src/CBot/old TstCBot/TstCBot.cpp
@@ -1,5 +1,18 @@
-// TstCBot.cpp : Defines the class behaviors for the application.
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
@@ -19,9 +32,9 @@ static char THIS_FILE[] = __FILE__;
////////////////////////////////////////////////////////////////////
// routine show()
-// utilisable depuis le programme écrit en CBot
+// utilisable depuis le programme �crit en CBot
-// exécution
+// ex�cution
BOOL rShow( CBotVar* pVar, CBotVar* pResult, int& Exception )
{
CString s;
@@ -56,7 +69,7 @@ BOOL rShow( CBotVar* pVar, CBotVar* pResult, int& Exception )
int cShow( CBotVar* &pVar, CBotString& RetClass)
{
if ( pVar == NULL ) return 22;
- return CBotTypInt; // tous paramètres acceptés, un entier en retour
+ return CBotTypInt; // tous param�tres accept�s, un entier en retour
}
int cErr( CBotVar* &pVar, CBotString& RetClass)
@@ -67,9 +80,9 @@ int cErr( CBotVar* &pVar, CBotString& RetClass)
////////////////////////////////////////////////////////////////////
// routine print()
-// utilisable depuis le programme écrit en CBot
+// utilisable depuis le programme �crit en CBot
-// exécution
+// ex�cution
BOOL rPrintLn( CBotVar* pVar, CBotVar* pResult, int& Exception )
{
CString s;
@@ -118,19 +131,19 @@ BOOL rPrint( CBotVar* pVar, CBotVar* pResult, int& Exception )
int cPrint( CBotVar* &pVar, CBotString& RetClass)
{
- return 0; // tous paramètres acceptés, un entier en retour
+ return 0; // tous param�tres accept�s, un entier en retour
}
//////////////////////////////////////////////////////////////////
// class CPoint pour essayer
-// exécution
+// ex�cution
BOOL rCPoint( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
{
CString s;
- if ( pVar == NULL )return TRUE; // constructeur sans paramètres est ok
+ if ( pVar == NULL )return TRUE; // constructeur sans param�tres est ok
if ( pVar->RetType() > CBotTypDouble )
{
@@ -175,41 +188,41 @@ BOOL rCPoint( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
int cCPoint( CBotVar* pThis, CBotVar* &pVar, CBotString& RetClass)
{
- // l'objet doit être de la classe CPoint
+ // l'objet doit �tre de la classe CPoint
if ( !pThis->IsElemOfClass("CPoint") ) return 6021;
- // ok si aucun paramètres !
+ // ok si aucun param�tres !
if ( pVar == NULL ) return 0;
- // paramètre de type numérique svp
+ // param�tre de type num�rique svp
if ( pVar->RetType() > CBotTypDouble ) return 6023;
pVar = pVar->RetNext();
- // il doit y avoir un second paramètre
+ // il doit y avoir un second param�tre
if ( pVar == NULL ) return 6022;
- // également de type numérique
+ // �galement de type num�rique
if ( pVar->RetType() > CBotTypDouble )return 6023;
pVar = pVar->RetNext();
- // et pas plus de 2 paramètres svp
+ // et pas plus de 2 param�tres svp
if ( pVar != NULL ) return 6025;
return 0; // cette fonction retourne void
}
-// méthode déterminant l'opposé
+// m�thode d�terminant l'oppos�
BOOL rOppose( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
{
CString s;
- if ( pVar != NULL ) // pas de paramètre
+ if ( pVar != NULL ) // pas de param�tre
{
Exception = 6025; return FALSE;
}
- CBotVar* pvar = pThis->RetItemList(); // demande la chaîne des items
+ CBotVar* pvar = pThis->RetItemList(); // demande la cha�ne des items
- // tous les paramètres sont des nombres
+ // tous les param�tres sont des nombres
while (pvar != NULL)
{
pvar->SetValFloat( -pvar->RetValFloat() );
@@ -222,15 +235,15 @@ BOOL rOppose( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
int cOppose( CBotVar* pThis, CBotVar* &pVar, CBotString& RetClass)
{
- // l'objet doit être de la classe CPoint
+ // l'objet doit �tre de la classe CPoint
if ( !pThis->IsElemOfClass("CPoint") ) return 6021;
RetClass = "CPoint"; // l'objet rendu est de cette class
- // ok si aucun paramètres !
- if ( pVar == NULL ) return CBotTypClass; // le paramètre retourné est une instance de la classe
+ // ok si aucun param�tres !
+ if ( pVar == NULL ) return CBotTypClass; // le param�tre retourn� est une instance de la classe
- return TX_OVERPARAM; // ça va pas
+ return TX_OVERPARAM; // �a va pas
}
@@ -313,7 +326,7 @@ BOOL CTstCBotApp::InitInstance()
///////////////////////////////////
-// défini la fonction "show()"
+// d�fini la fonction "show()"
// --------------------------------
CBotProgram::AddFunction("show", rShow, cShow);
@@ -323,7 +336,7 @@ BOOL CTstCBotApp::InitInstance()
///////////////////////////////////
-// définie la classe globale CPoint
+// d�finie la classe globale CPoint
// --------------------------------
CBotClass* m_pClassPoint;
@@ -336,8 +349,8 @@ BOOL CTstCBotApp::InitInstance()
// ajoute le constructeur pour cette classe
m_pClassPoint->AddFunction("CPoint", rCPoint, cCPoint);
- // ajoute la méthode Opposé
- m_pClassPoint->AddFunction("Opposé", rOppose, cOppose);
+ // ajoute la m�thode Oppos�
+ m_pClassPoint->AddFunction("Oppos�", rOppose, cOppose);
//////////////////////////////////////////////////////////////////
@@ -348,7 +361,7 @@ BOOL CTstCBotApp::InitInstance()
CBotStringArray Liste;
p->Compile(" public void MonProgram( ) { show (\"mon programme\") ;}", Liste );
- // l'objet n'est pas détruit et plus référencé
+ // l'objet n'est pas d�truit et plus r�f�renc�
// je sais c'est pas bien
diff --git a/src/CBot/old TstCBot/TstCBot.h b/src/CBot/old TstCBot/TstCBot.h
index 616db43..a351344 100644
--- a/src/CBot/old TstCBot/TstCBot.h
+++ b/src/CBot/old TstCBot/TstCBot.h
@@ -1,5 +1,18 @@
-// TstCBot.h : main header file for the TSTCBOT application
-//
+// * 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 .
#if !defined(AFX_TSTCBOT_H__70B37568_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_TSTCBOT_H__70B37568_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
diff --git a/src/CBot/old TstCBot/TstCBotDoc.cpp b/src/CBot/old TstCBot/TstCBotDoc.cpp
index 7d7e2ef..6c14f11 100644
--- a/src/CBot/old TstCBot/TstCBotDoc.cpp
+++ b/src/CBot/old TstCBot/TstCBotDoc.cpp
@@ -1,5 +1,18 @@
-// TstCBotDoc.cpp : implementation of the CTstCBotDoc class
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
diff --git a/src/CBot/old TstCBot/TstCBotDoc.h b/src/CBot/old TstCBot/TstCBotDoc.h
index ae1d0f7..dd71389 100644
--- a/src/CBot/old TstCBot/TstCBotDoc.h
+++ b/src/CBot/old TstCBot/TstCBotDoc.h
@@ -1,6 +1,18 @@
-// TstCBotDoc.h : interface of the CTstCBotDoc class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_TSTCBOTDOC_H__70B3756E_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_TSTCBOTDOC_H__70B3756E_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
diff --git a/src/CBot/old TstCBot/TstCBotView.cpp b/src/CBot/old TstCBot/TstCBotView.cpp
index 3ee9094..33777a6 100644
--- a/src/CBot/old TstCBot/TstCBotView.cpp
+++ b/src/CBot/old TstCBot/TstCBotView.cpp
@@ -1,5 +1,18 @@
-// TstCBotView.cpp : implementation of the CTstCBotView class
-//
+// * 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 .
#include "stdafx.h"
#include "TstCBot.h"
@@ -189,13 +202,13 @@ void CTstCBotView::OnCp1()
m_pProg = NULL;
m_pEdit->SetSel( start, end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError.LoadString( code );
if (TextError.IsEmpty())
{
char buf[100];
- sprintf(buf, "Erreur numéro %d.", code);
+ sprintf(buf, "Erreur num�ro %d.", code);
TextError = buf;
}
AfxMessageBox( TextError );
@@ -214,13 +227,13 @@ void CTstCBotView::OnExe()
if( m_pProg == NULL)
{
- AfxMessageBox("Pas de programme compilé !");
+ AfxMessageBox("Pas de programme compil� !");
return;
}
if( pApp->m_Liste.RetSize() == 0 )
{
- AfxMessageBox("Aucune fonction marquée \"extern\" !");
+ AfxMessageBox("Aucune fonction marqu�e \"extern\" !");
return;
}
@@ -234,13 +247,13 @@ void CTstCBotView::OnExe()
CString TextError;
m_pEdit->SetSel( dlg.m_start, dlg.m_end );
- m_pEdit->SetFocus(); // met en évidence la partie avec problème
+ m_pEdit->SetFocus(); // met en �vidence la partie avec probl�me
TextError.LoadString( dlg.m_code );
if (TextError.IsEmpty())
{
char buf[100];
- sprintf(buf, "Erreur numéro %d.", dlg.m_code);
+ sprintf(buf, "Erreur num�ro %d.", dlg.m_code);
TextError = buf;
}
// AfxMessageBox( TextError );
diff --git a/src/CBot/old TstCBot/TstCBotView.h b/src/CBot/old TstCBot/TstCBotView.h
index d5aede5..12f779d 100644
--- a/src/CBot/old TstCBot/TstCBotView.h
+++ b/src/CBot/old TstCBot/TstCBotView.h
@@ -1,6 +1,18 @@
-// TstCBotView.h : interface of the CTstCBotView class
-//
-/////////////////////////////////////////////////////////////////////////////
+// * 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 .
#if !defined(AFX_TSTCBOTVIEW_H__70B37570_5DFD_11D4_A15E_00E0189013DF__INCLUDED_)
#define AFX_TSTCBOTVIEW_H__70B37570_5DFD_11D4_A15E_00E0189013DF__INCLUDED_
@@ -20,9 +32,9 @@ protected: // create from serialization only
CTstCBotView();
DECLARE_DYNCREATE(CTstCBotView)
- CEdit* m_pEdit; // texte en édition
+ CEdit* m_pEdit; // texte en �dition
CWnd* m_pWnd;
- CBotProgram* m_pProg; // programme compilé
+ CBotProgram* m_pProg; // programme compil�
// Attributes
public:
diff --git a/src/CBot/resource.h b/src/CBot/resource.h
index 659ee69..0cc2ea5 100644
--- a/src/CBot/resource.h
+++ b/src/CBot/resource.h
@@ -1,7 +1,18 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by CBot.rc
-//
+// * 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 ID_KEYWORDS 2000
#define ID_IF 2000
#define ID_ELSE 2001
diff --git a/src/ClassFILE.cpp b/src/ClassFILE.cpp
index cdfe26b..db3127c 100644
--- a/src/ClassFILE.cpp
+++ b/src/ClassFILE.cpp
@@ -1,6 +1,18 @@
-// ClassFile.cpp
-//
-// définition des méthodes pour la classe FILE
+// * 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 .
@@ -13,7 +25,7 @@ static char* m_filesDir;
-// Prépare un nom de fichier.
+// Pr�pare un nom de fichier.
void PrepareFilename(CBotString &filename)
{
@@ -22,7 +34,7 @@ void PrepareFilename(CBotString &filename)
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('/');
@@ -34,7 +46,7 @@ void PrepareFilename(CBotString &filename)
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(m_filesDir) + CBotString("\\") + filename;
@@ -42,31 +54,31 @@ void PrepareFilename(CBotString &filename)
// constructeur de la classe
-// reçois le nom du fichier en paramètre
+// re�ois le nom du fichier en param�tre
-// exécution
+// ex�cution
BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
CBotString mode;
- // accepte sans paramètre
+ // accepte sans param�tre
if ( pVar == NULL ) return TRUE;
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
CBotString filename = pVar->GivValString();
PrepareFilename(filename);
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // récupère le mode
+ // r�cup�re le mode
mode = pVar->GivValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return FALSE; }
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return FALSE; }
}
@@ -76,7 +88,7 @@ BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
if ( ! mode.IsEmpty() )
{
- // ouvre le ficher demandé
+ // ouvre le ficher demand�
FILE* pFile = fopen( filename, mode );
if ( pFile == NULL ) { Exception = CBotErrFileOpen; return FALSE; }
@@ -93,38 +105,38 @@ BOOL rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
// compilation
CBotTypResult cfconstruct (CBotVar* pThis, CBotVar* &pVar)
{
- // accepte sans paramètre
+ // accepte sans param�tre
if ( pVar == NULL ) return CBotTypResult( 0 );
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
- // le résultat est de type void (constructeur)
+ // le r�sultat est de type void (constructeur)
return CBotTypResult( 0 );
}
// destructeur de la classe
-// exécution
+// ex�cution
BOOL rfdestruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
- // pas ouvert ? pas de problème
+ // pas ouvert ? pas de probl�me
if ( pVar->GivInit() != IS_DEF) return TRUE;
FILE* pFile= (FILE*)pVar->GivValInt();
@@ -137,22 +149,22 @@ BOOL rfdestruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception
}
-// méthode FILE :: open
-// reçois le mode r/w en paramètre
+// m�thode FILE :: open
+// re�ois le mode r/w en param�tre
-// exécution
+// ex�cution
BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) { Exception = CBotErrLowParam; return FALSE; }
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
if ( pVar->GivNext() != NULL )
{
- // dans ce cas le premier paramètre est le nom du fichier
+ // dans ce cas le premier param�tre est le nom du fichier
CBotString filename = pVar->GivValString();
PrepareFilename(filename);
@@ -160,29 +172,29 @@ BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
CBotVar* pVar2 = pThis->GivItem("filename");
pVar2->SetValString(filename);
- // paramètre suivant est le mode
+ // param�tre suivant est le mode
pVar = pVar -> GivNext();
}
CBotString mode = pVar->GivValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return FALSE; }
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
- // qui doit pas être initialisé
+ // qui doit pas �tre initialis�
if ( pVar->GivInit() == IS_DEF) { Exception = CBotErrFileOpen; return FALSE; }
// reprend le nom du fichier
pVar = pThis->GivItem("filename");
CBotString filename = pVar->GivValString();
- PrepareFilename(filename); // si le nom a été attribué par h.filename = "...";
+ PrepareFilename(filename); // si le nom a �t� attribu� par h.filename = "...";
- // ouvre le ficher demandé
+ // ouvre le ficher demand�
FILE* pFile = fopen( filename, mode );
if ( pFile == NULL )
{
@@ -203,39 +215,39 @@ BOOL rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfopen (CBotVar* pThis, CBotVar* &pVar)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // il peut y avoir un second paramètre
+ // il peut y avoir un second param�tre
pVar = pVar->GivNext();
if ( pVar != NULL )
{
- // qui doit être une chaine
+ // qui doit �tre une chaine
if ( pVar->GivType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
- // pas de 3e paramètre
+ // pas de 3e param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
- // le résultat est de type bool
+ // le r�sultat est de type bool
return CBotTypResult(CBotTypBoolean);
}
-// méthode FILE :: close
+// m�thode FILE :: close
-// exécution
+// ex�cution
BOOL rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotErrOverParam;
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -252,27 +264,27 @@ BOOL rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfclose (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat "void"
+ // la fonction retourne un r�sultat "void"
return CBotTypResult( 0 );
}
-// méthode FILE :: writeln
+// m�thode FILE :: writeln
-// exécution
+// ex�cution
BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) { Exception = CBotErrLowParam; return FALSE; }
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return FALSE; }
CBotString param = pVar->GivValString();
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -281,7 +293,7 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
int res = fputs(param+"\n", pFile);
- // en cas d'erreur génère une exception
+ // en cas d'erreur g�n�re une exception
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
return TRUE;
@@ -290,28 +302,28 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfwrite (CBotVar* pThis, CBotVar* &pVar)
{
- // il doit y avoir un paramètre
+ // il doit y avoir un param�tre
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
- // qui doit être une chaîne de caractères
+ // qui doit �tre une cha�ne de caract�res
if ( pVar->GivType() != CBotTypString ) return CBotTypResult( CBotErrBadString );
- // pas d'autre paramètre
+ // pas d'autre param�tre
if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat void
+ // la fonction retourne un r�sultat void
return CBotTypResult( 0 );
}
-// méthode FILE :: readln
+// m�thode FILE :: readln
-// exécution
+// ex�cution
BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -326,7 +338,7 @@ BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
for ( i = 0 ; i < 2000 ; i++ ) if (chaine[i] == '\n') chaine[i] = 0;
- // en cas d'erreur génère une exception
+ // en cas d'erreur g�n�re une exception
if ( ferror(pFile) ) { Exception = CBotErrRead; return FALSE; }
pResult->SetValString( chaine );
@@ -337,22 +349,22 @@ BOOL rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfread (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat "string"
+ // la fonction retourne un r�sultat "string"
return CBotTypResult( CBotTypString );
}
-// méthode FILE :: readln
+// m�thode FILE :: readln
-// exécution
+// ex�cution
BOOL rfeof (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) { Exception = CBotErrOverParam; return FALSE; }
- // récupère l'élément "handle"
+ // r�cup�re l'�l�ment "handle"
pVar = pThis->GivItem("handle");
if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return FALSE; }
@@ -367,10 +379,10 @@ BOOL rfeof (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
// compilation
CBotTypResult cfeof (CBotVar* pThis, CBotVar* &pVar)
{
- // il ne doit pas y avoir de paramètre
+ // il ne doit pas y avoir de param�tre
if ( pVar != NULL ) return CBotTypResult( CBotErrOverParam );
- // la fonction retourne un résultat booleen
+ // la fonction retourne un r�sultat booleen
return CBotTypResult( CBotTypBoolean );
}
@@ -380,25 +392,25 @@ CBotTypResult cfeof (CBotVar* pThis, CBotVar* &pVar)
void InitClassFILE()
{
-// crée une classe pour la gestion des fichiers
+// cr�e une classe pour la gestion des fichiers
// l'utilisation en est la suivante:
// file canal( "NomFichier.txt" )
// canal.open( "r" ); // ouvre en lecture
// s = canal.readln( ); // lit une ligne
// canal.close(); // referme le fichier
- // crée la classe FILE
+ // cr�e la classe FILE
m_pClassFILE = new CBotClass("file", NULL);
// ajoute le composant ".filename"
m_pClassFILE->AddItem("filename", CBotTypString);
// ajoute le composant ".handle"
m_pClassFILE->AddItem("handle", CBotTypInt, PR_PRIVATE);
- // défini un constructeur et un destructeur
+ // d�fini un constructeur et un destructeur
m_pClassFILE->AddFunction("file", rfconstruct, cfconstruct );
m_pClassFILE->AddFunction("~file", rfdestruct, NULL );
- // défini les méthodes associées
+ // d�fini les m�thodes associ�es
m_pClassFILE->AddFunction("open", rfopen, cfopen );
m_pClassFILE->AddFunction("close", rfclose, cfclose );
m_pClassFILE->AddFunction("writeln", rfwrite, cfwrite );
@@ -408,6 +420,6 @@ void InitClassFILE()
m_pFuncFile = new CBotProgram( );
CBotStringArray ListFonctions;
m_pFuncFile->Compile( "public file openfile(string name, string mode) {return new file(name, mode);}", ListFonctions);
- m_pFuncFile->SetIdent(-2); // identificateur spécial pour RestoreState dans cette fonction
+ m_pFuncFile->SetIdent(-2); // identificateur sp�cial pour RestoreState dans cette fonction
}
diff --git a/src/Copie de taskgoto.cpp b/src/Copie de taskgoto.cpp
index ddb9a40..72c60c9 100644
--- a/src/Copie de taskgoto.cpp
+++ b/src/Copie de taskgoto.cpp
@@ -1,4 +1,18 @@
-// taskgoto.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
@@ -46,7 +60,7 @@ CTaskGoto::~CTaskGoto()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskGoto::EventProcess(const Event &event)
{
@@ -58,7 +72,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
@@ -95,7 +109,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
@@ -103,7 +117,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
linSpeed = -1.0f; // obstacle devant -> recule
}
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
m_physics->SetMotorSpeedX(linSpeed); // avance
return TRUE;
}
@@ -165,7 +179,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
return TRUE;
}
- if ( m_phase == TGP_BEAMUP ) // décolle ?
+ if ( m_phase == TGP_BEAMUP ) // d�colle ?
{
m_physics->SetMotorSpeedY(1.0f); // monte
return TRUE;
@@ -248,7 +262,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);
@@ -258,7 +272,7 @@ BOOL CTaskGoto::EventProcess(const Event &event)
linSpeed = 0.0f; // tourne d'abord, puis avance
}
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
m_physics->SetMotorSpeedX(linSpeed); // avance
return TRUE;
}
@@ -312,7 +326,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;
}
@@ -388,7 +402,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;
@@ -398,7 +412,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;
@@ -410,13 +424,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;
@@ -424,18 +438,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 ?
{
@@ -447,7 +461,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 ?
{
@@ -531,7 +545,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);
@@ -568,7 +582,7 @@ void CTaskGoto::WormFrame(float rTime)
dist = Length(pos, impact);
if ( dist <= 15.0f )
{
- pObj->SetVirusMode(TRUE); // paf, infecté !
+ pObj->SetVirusMode(TRUE); // paf, infect� !
}
}
}
@@ -576,9 +590,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)
@@ -671,7 +685,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)
}
}
@@ -694,23 +708,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 > 40.0f ) // plus de 10 mètres ?
+ if ( dist > 40.0f ) // plus de 10 m�tres ?
{
- m_altitude = 20.0f; // altitude par défaut
+ m_altitude = 20.0f; // altitude par d�faut
}
}
@@ -720,7 +734,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 ?
{
m_error = ERR_GOTO_IMPOSSIBLE;
return m_error;
@@ -731,7 +745,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()
{
@@ -760,13 +774,13 @@ Error CTaskGoto::IsEnded()
return ERR_CONTINUE;
}
- if ( m_phase == TGP_BEAMUP ) // décolle ?
+ if ( m_phase == TGP_BEAMUP ) // d�colle ?
{
if ( m_physics->RetType() == TYPE_FLYING && m_altitude > 0.0f )
{
h = m_terrain->RetFloorHeight(pos, TRUE);
if ( h < m_altitude-20.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;
}
@@ -780,7 +794,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;
@@ -880,7 +894,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 )
{
@@ -892,15 +906,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;
@@ -912,7 +926,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 )
{
@@ -920,7 +934,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 )
{
@@ -933,7 +947,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;
@@ -945,7 +959,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 )
{
@@ -973,7 +987,7 @@ Error CTaskGoto::IsEnded()
}
-// Cherche l'objet à la position cible.
+// Cherche l'objet � la position cible.
CObject* CTaskGoto::SearchTarget(D3DVECTOR pos, float margin)
{
@@ -988,7 +1002,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);
@@ -1000,7 +1014,7 @@ 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.
+// Retourne TRUE s'il s'agit de fret pos� au sol.
BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
{
@@ -1088,8 +1102,8 @@ BOOL CTaskGoto::AdjustTarget(CObject* pObj, D3DVECTOR &pos, float &distance)
return FALSE;
}
-// 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)
{
@@ -1104,7 +1118,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);
@@ -1118,7 +1132,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)
@@ -1240,7 +1254,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) )
@@ -1262,7 +1276,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)
@@ -1323,7 +1337,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;
@@ -1377,7 +1391,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() )
{
@@ -1438,7 +1452,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;
@@ -1471,7 +1485,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)
@@ -1525,8 +1539,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()
{
@@ -1536,14 +1550,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()
{
@@ -1589,13 +1603,13 @@ void CTaskGoto::BeamInit()
}
}
-// 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)
@@ -1612,13 +1626,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,
@@ -1631,7 +1645,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 )
{
@@ -1709,7 +1723,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,
@@ -1831,7 +1845,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);
@@ -1841,7 +1855,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
{
diff --git a/src/SrcHead.config b/src/SrcHead.config
new file mode 100644
index 0000000..4f70e49
--- /dev/null
+++ b/src/SrcHead.config
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<config>
+ <headerpath>header.txt</headerpath>
+ <filetypes>
+ <extension comment="//">cpp</extension>
+ <extension comment="//">c</extension>
+ <extension comment="//">hpp</extension>
+ <extension comment="//">h</extension>
+ </filetypes>
+ <exclude>
+ <extension>generated.cs</extension>
+ </exclude>
+ <macros>
+ <macro name="AUTHOR">Solvasoft</macro>
+ <macro name="COPYRIGHT">Copyright (C) 2011 Solvasoft. All rights reserved.</macro>
+ <macro name="EMAIL">info@solvasoft.nl</macro>
+ <macro name="WEBSITE">http://www.solvasoft.com</macro>
+ </macros>
+</config>
diff --git a/src/SrcHead.exe b/src/SrcHead.exe
new file mode 100644
index 0000000..0800f0b
--- /dev/null
+++ b/src/SrcHead.exe
Binary files differ
diff --git a/src/auto.cpp b/src/auto.cpp
index 3f0d549..8804ae0 100644
--- a/src/auto.cpp
+++ b/src/auto.cpp
@@ -1,4 +1,18 @@
-// auto.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
@@ -80,7 +94,7 @@ CAuto::~CAuto()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAuto::DeleteObject(BOOL bAll)
{
@@ -94,7 +108,7 @@ void CAuto::Init()
m_bBusy = FALSE;
}
-// Démarre l'objet.
+// D�marre l'objet.
void CAuto::Start(int param)
{
@@ -123,7 +137,7 @@ BOOL CAuto::SetString(char *string)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAuto::EventProcess(const Event &event)
{
@@ -134,7 +148,7 @@ BOOL CAuto::EventProcess(const Event &event)
UpdateInterface(event.rTime);
}
- if ( !m_object->RetSelect() ) // robot pas sélectionné ?
+ if ( !m_object->RetSelect() ) // robot pas s�lectionn� ?
{
return TRUE;
}
@@ -142,7 +156,7 @@ BOOL CAuto::EventProcess(const Event &event)
return TRUE;
}
-// Indique si l'automate a terminé son activité.
+// Indique si l'automate a termin� son activit�.
Error CAuto::IsEnded()
{
@@ -157,7 +171,7 @@ BOOL CAuto::Abort()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAuto::CreateInterface(BOOL bSelect)
{
@@ -169,8 +183,8 @@ BOOL CAuto::CreateInterface(BOOL bSelect)
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
if ( pw != 0 )
{
- pw->Flush(); // détruit les boutons de la fenêtre
- m_interface->DeleteControl(EVENT_WINDOW0); // détruit la fenêtre
+ pw->Flush(); // d�truit les boutons de la fen�tre
+ m_interface->DeleteControl(EVENT_WINDOW0); // d�truit la fen�tre
}
if ( !bSelect ) return TRUE;
@@ -271,7 +285,7 @@ BOOL CAuto::CreateInterface(BOOL bSelect)
return TRUE;
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CAuto::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -283,7 +297,7 @@ void CAuto::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_CHECK, bState);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CAuto::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -295,7 +309,7 @@ void CAuto::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_ENABLE, bState);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CAuto::VisibleInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -307,7 +321,7 @@ void CAuto::VisibleInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_VISIBLE, bState);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CAuto::DeadInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -319,7 +333,7 @@ void CAuto::DeadInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_DEAD, !bState);
}
-// Met à jour l'état de tous les boutons de l'interface.
+// Met � jour l'�tat de tous les boutons de l'interface.
void CAuto::UpdateInterface()
{
@@ -333,8 +347,8 @@ void CAuto::UpdateInterface()
VisibleInterface(pw, EVENT_OBJECT_GPROGRESS, 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 CAuto::UpdateInterface(float rTime)
{
@@ -363,7 +377,7 @@ void CAuto::UpdateInterface(float rTime)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAuto::RetError()
{
@@ -408,7 +422,7 @@ void CAuto::SetMotor(BOOL bMotor)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAuto::Write(char *line)
{
@@ -432,7 +446,7 @@ BOOL CAuto::Write(char *line)
return FALSE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAuto::Read(char *line)
{
diff --git a/src/auto.h b/src/auto.h
index 5b0f331..0fe3c70 100644
--- a/src/auto.h
+++ b/src/auto.h
@@ -1,4 +1,18 @@
-// auto.h
+// * 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 .
#ifndef _AUTO_H_
#define _AUTO_H_
diff --git a/src/autobase.cpp b/src/autobase.cpp
index db046ef..6c18f8f 100644
--- a/src/autobase.cpp
+++ b/src/autobase.cpp
@@ -1,4 +1,18 @@
-// autobase.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
@@ -34,14 +48,14 @@
-#define BASE_LAND_TIME 7.5f // durée atterrissage
-#define BASE_TAKO_TIME 10.0f // durée atterrissage
-#define BASE_DOOR_TIME 6.0f // durée ouverture/fermeture
-#define BASE_DOOR_TIME2 2.0f // durée ouverture/fermeture suppl.
-#define BASE_PORTICO_TIME_MOVE 16.0f // durée avance portique
-#define BASE_PORTICO_TIME_DOWN 4.0f // durée descente portique
-#define BASE_PORTICO_TIME_OPEN 4.0f // durée ouverture portique
-#define BASE_TRANSIT_TIME 15.0f // durée transit
+#define BASE_LAND_TIME 7.5f // dur�e atterrissage
+#define BASE_TAKO_TIME 10.0f // dur�e atterrissage
+#define BASE_DOOR_TIME 6.0f // dur�e ouverture/fermeture
+#define BASE_DOOR_TIME2 2.0f // dur�e ouverture/fermeture suppl.
+#define BASE_PORTICO_TIME_MOVE 16.0f // dur�e avance portique
+#define BASE_PORTICO_TIME_DOWN 4.0f // dur�e descente portique
+#define BASE_PORTICO_TIME_OPEN 4.0f // dur�e ouverture portique
+#define BASE_TRANSIT_TIME 15.0f // dur�e transit
@@ -68,7 +82,7 @@ CAutoBase::~CAutoBase()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoBase::DeleteObject(BOOL bAll)
{
@@ -101,7 +115,7 @@ void CAutoBase::Init()
}
-// Démarre l'objet.
+// D�marre l'objet.
void CAutoBase::Start(int param)
{
@@ -113,7 +127,7 @@ void CAutoBase::Start(int param)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoBase::EventProcess(const Event &event)
{
@@ -135,13 +149,13 @@ begin:
if ( m_phase == ABP_START )
{
- if ( m_param != PARAM_STOP && // pas posé au sol ?
+ if ( m_param != PARAM_STOP && // pas pos� au sol ?
m_param != PARAM_FIXSCENE )
{
- FreezeCargo(TRUE); // gèle toute la cargaison
+ FreezeCargo(TRUE); // g�le toute la cargaison
}
- if ( m_param == PARAM_STOP ) // posé au sol ?
+ if ( m_param == PARAM_STOP ) // pos� au sol ?
{
m_phase = ABP_WAIT;
m_progress = 0.0f;
@@ -172,7 +186,7 @@ begin:
m_main->StartMusic();
}
- if ( m_param == PARAM_FIXSCENE ) // posé au sol ?
+ if ( m_param == PARAM_FIXSCENE ) // pos� au sol ?
{
m_phase = ABP_WAIT;
m_progress = 0.0f;
@@ -194,8 +208,8 @@ begin:
m_progress = 0.0f;
m_speed = 1.0f/BASE_LAND_TIME;
- m_main->SetMovieLock(TRUE); // bloque tout jusqu'à la fin de l'atterrissage
- m_bMotor = TRUE; // allume le réacteur
+ m_main->SetMovieLock(TRUE); // bloque tout jusqu'� la fin de l'atterrissage
+ m_bMotor = TRUE; // allume le r�acteur
m_camera->SetType(CAMERA_SCRIPT);
@@ -225,14 +239,14 @@ begin:
m_main->StartMusic();
}
- if ( m_param == PARAM_PORTICO ) // porté par le portique ?
+ if ( m_param == PARAM_PORTICO ) // port� par le portique ?
{
pos = m_object->RetPosition(0);
m_finalPos = pos;
pos.z += BASE_PORTICO_TIME_MOVE*5.0f; // recule
- pos.y += 10.0f; // monte (porté par le portique)
+ pos.y += 10.0f; // monte (port� par le portique)
m_object->SetPosition(0, pos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
m_phase = ABP_PORTICO_MOVE;
m_progress = 0.0f;
@@ -255,8 +269,8 @@ begin:
m_finalPos = pos;
m_object->SetPosition(0, pos);
- m_main->SetMovieLock(TRUE); // bloque tout jusqu'à la fin de l'atterrissage
- m_bMotor = TRUE; // allume le réacteur
+ m_main->SetMovieLock(TRUE); // bloque tout jusqu'� la fin de l'atterrissage
+ m_bMotor = TRUE; // allume le r�acteur
m_camera->SetType(CAMERA_SCRIPT);
pos.x += 1000.0f;
@@ -328,8 +342,8 @@ begin:
return FALSE;
}
- FreezeCargo(TRUE); // gèle toute la cargaison
- m_main->SetMovieLock(TRUE); // bloque tout jusqu'à la fin
+ FreezeCargo(TRUE); // g�le toute la cargaison
+ m_main->SetMovieLock(TRUE); // bloque tout jusqu'� la fin
m_main->DeselectAll();
m_event->MakeEvent(newEvent, EVENT_UPDINTERFACE);
@@ -372,7 +386,7 @@ begin:
pos = m_pos;
pos.y += powf(1.0f-m_progress, 2.0f)*300.0f;
m_object->SetPosition(0, pos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
vibCir.z = sinf(m_time*PI* 2.01f)*(PI/150.0f)+
sinf(m_time*PI* 2.51f)*(PI/200.0f)+
@@ -400,7 +414,7 @@ begin:
{
m_lastParticule = m_time;
- // Poussière éjectée au sol.
+ // Poussi�re �ject�e au sol.
pos = m_pos;
pos.x += (Rand()-0.5f)*10.0f;
pos.z += (Rand()-0.5f)*10.0f;
@@ -417,7 +431,7 @@ begin:
m_particule->CreateParticule(pos, speed, dim, PARTICRASH, 2.0f, 0.0f, 2.0f);
}
- // Particules éjectées du réacteur.
+ // Particules �ject�es du r�acteur.
pos = m_object->RetPosition(0);
pos.y += 6.0f;
h = m_terrain->RetFloorHeight(pos)/300.0f;
@@ -428,7 +442,7 @@ begin:
dim.y = dim.x;
m_particule->CreateParticule(pos, speed, dim, PARTIGAS, 2.0f, 10.0f, 2.0f);
- // Fumée noire du réacteur.
+ // Fum�e noire du r�acteur.
if ( m_progress > 0.8f )
{
pos = m_pos;
@@ -446,11 +460,11 @@ begin:
}
else
{
- m_bMotor = FALSE; // éteint le réacteur
+ m_bMotor = FALSE; // �teint le r�acteur
- m_object->SetPosition(0, m_pos); // posé au sol
+ m_object->SetPosition(0, m_pos); // pos� au sol
m_object->SetCirVibration(D3DVECTOR(0.0f, 0.0f, 0.0f));
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
// Choc avec le sol.
max = (int)(50.0f*m_engine->RetParticuleDensity());
@@ -487,7 +501,7 @@ begin:
{
m_lastParticule = m_time;
- // Fumée noire du réacteur.
+ // Fum�e noire du r�acteur.
pos = m_pos;
pos.x += (Rand()-0.5f)*8.0f;
pos.z += (Rand()-0.5f)*8.0f;
@@ -620,7 +634,7 @@ begin:
{
if ( m_progress >= 1.0f )
{
- FreezeCargo(FALSE); // libère toute la cargaison
+ FreezeCargo(FALSE); // lib�re toute la cargaison
if ( m_param != PARAM_PORTICO )
{
@@ -701,7 +715,7 @@ begin:
{
m_object->SetAngleZ(1+i, PI/2.0f);
}
- m_bMotor = TRUE; // allume le réacteur
+ m_bMotor = TRUE; // allume le r�acteur
// Choc de la fermeture des portes.
max = (int)(20.0f*m_engine->RetParticuleDensity());
@@ -750,7 +764,7 @@ begin:
{
m_lastParticule = m_time;
- // Particules éjectées du réacteur.
+ // Particules �ject�es du r�acteur.
pos = m_object->RetPosition(0);
pos.y += 6.0f;
speed.x = (Rand()-0.5f)*160.0f;
@@ -780,7 +794,7 @@ begin:
pos = m_pos;
pos.y += powf(m_progress, 2.0f)*600.0f;
m_object->SetPosition(0, pos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
vibCir.z = sinf(m_time*PI*19.01f)*(PI/400.0f);
vibCir.x = sinf(m_time*PI*19.53f)*(PI/400.0f);
@@ -803,7 +817,7 @@ begin:
{
m_lastParticule = m_time;
- // Poussière éjectée au sol.
+ // Poussi�re �ject�e au sol.
pos = m_pos;
pos.x += (Rand()-0.5f)*10.0f;
pos.z += (Rand()-0.5f)*10.0f;
@@ -820,7 +834,7 @@ begin:
m_particule->CreateParticule(pos, speed, dim, PARTICRASH, 2.0f, 0.0f, 2.0f);
}
- // Particules éjectées du réacteur.
+ // Particules �ject�es du r�acteur.
pos = m_object->RetPosition(0);
pos.y += 6.0f;
speed.x = (Rand()-0.5f)*40.0f;
@@ -832,7 +846,7 @@ begin:
dim.y = dim.x;
m_particule->CreateParticule(pos, speed, dim, PARTIGAS, 2.0f, 10.0f, 2.0f);
- // Fumée noire du réacteur.
+ // Fum�e noire du r�acteur.
pos = m_object->RetPosition(0);
pos.y += 3.0f;
speed.x = (Rand()-0.5f)*10.0f*(4.0f-m_progress*3.0f);
@@ -862,7 +876,7 @@ begin:
pos = m_object->RetPosition(0);
pos.z -= event.rTime*5.0f;
m_object->SetPosition(0, pos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
}
else
{
@@ -889,7 +903,7 @@ begin:
pos = m_object->RetPosition(0);
pos.y -= event.rTime*(10.0f/BASE_PORTICO_TIME_DOWN);
m_object->SetPosition(0, pos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
}
else
{
@@ -1120,10 +1134,10 @@ BOOL CAutoBase::Abort()
return TRUE;
}
- if ( m_param == PARAM_PORTICO ) // porté par le portique ?
+ if ( m_param == PARAM_PORTICO ) // port� par le portique ?
{
m_object->SetPosition(0, m_finalPos);
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
for ( i=0 ; i<8 ; i++ )
{
@@ -1141,12 +1155,12 @@ BOOL CAutoBase::Abort()
m_phase == ABP_OPEN ||
m_phase == ABP_OPEN2 ) // atterrissage ?
{
- m_bMotor = FALSE; // éteint le réacteur
+ m_bMotor = FALSE; // �teint le r�acteur
m_bOpen = TRUE;
- m_object->SetPosition(0, m_pos); // posé au sol
+ m_object->SetPosition(0, m_pos); // pos� au sol
m_object->SetCirVibration(D3DVECTOR(0.0f, 0.0f, 0.0f));
- MoveCargo(); // déplace toute la cargaison
+ MoveCargo(); // d�place toute la cargaison
for ( i=0 ; i<8 ; i++ )
{
@@ -1178,7 +1192,7 @@ BOOL CAutoBase::Abort()
if ( m_phase == ABP_CLOSE2 ||
m_phase == ABP_CLOSE ||
m_phase == ABP_TOWAIT ||
- m_phase == ABP_TAKEOFF ) // décollage ?
+ m_phase == ABP_TAKEOFF ) // d�collage ?
{
m_event->MakeEvent(newEvent, EVENT_WIN);
m_event->AddEvent(newEvent);
@@ -1186,7 +1200,7 @@ BOOL CAutoBase::Abort()
}
m_object->SetAngleZ(0, 0.0f);
- FreezeCargo(FALSE); // libère toute la cargaison
+ FreezeCargo(FALSE); // lib�re toute la cargaison
if ( m_soundChannel != -1 )
{
@@ -1203,7 +1217,7 @@ BOOL CAutoBase::Abort()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoBase::RetError()
{
@@ -1211,7 +1225,7 @@ Error CAutoBase::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoBase::CreateInterface(BOOL bSelect)
{
@@ -1265,7 +1279,7 @@ BOOL CAutoBase::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 CAutoBase::UpdateInterface()
{
@@ -1279,7 +1293,7 @@ void CAutoBase::UpdateInterface()
}
-// Gèle ou libère toute la cargaison.
+// G�le ou lib�re toute la cargaison.
void CAutoBase::FreezeCargo(BOOL bFreeze)
{
@@ -1296,8 +1310,8 @@ void CAutoBase::FreezeCargo(BOOL bFreeze)
pObj->SetCargo(FALSE);
- if ( pObj == m_object ) continue; // soi-même ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj == m_object ) continue; // soi-m�me ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
oPos = pObj->RetPosition(0);
dist = Length2d(m_pos, oPos);
@@ -1317,7 +1331,7 @@ void CAutoBase::FreezeCargo(BOOL bFreeze)
}
}
-// Déplace verticalement toute la cargaison avec le vaisseau.
+// D�place verticalement toute la cargaison avec le vaisseau.
void CAutoBase::MoveCargo()
{
@@ -1346,7 +1360,7 @@ void CAutoBase::MoveCargo()
}
-// Vérifie s'il est possible de fermer les portes.
+// V�rifie s'il est possible de fermer les portes.
Error CAutoBase::CheckCloseDoor()
{
@@ -1361,7 +1375,7 @@ Error CAutoBase::CheckCloseDoor()
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- if ( pObj == m_object ) continue; // soi-même ?
+ if ( pObj == m_object ) continue; // soi-m�me ?
if ( !pObj->RetActif() ) continue; // inactif ?
type = pObj->RetType();
@@ -1388,7 +1402,7 @@ Error CAutoBase::CheckCloseDoor()
}
-// Début d'un transit.
+// D�but d'un transit.
void CAutoBase::BeginTransit()
{
@@ -1400,19 +1414,19 @@ void CAutoBase::BeginTransit()
}
else if ( m_param == PARAM_TRANSIT3 )
{
- strcpy(m_bgBack, "back22.tga"); // nuages bleutés
+ strcpy(m_bgBack, "back22.tga"); // nuages bleut�s
}
else
{
#if _DEMO
- strcpy(m_bgBack, "back46b.tga"); // étoiles
+ strcpy(m_bgBack, "back46b.tga"); // �toiles
#else
- strcpy(m_bgBack, "back46.tga"); // étoiles
+ strcpy(m_bgBack, "back46.tga"); // �toiles
#endif
}
m_engine->SetFogStart(0.9f); // presque pas de brouillard
- m_engine->SetDeepView(2000.0f); // on voit très loin
+ m_engine->SetDeepView(2000.0f); // on voit tr�s loin
m_engine->ApplyChange();
m_engine->RetBackground(m_bgName, m_bgUp, m_bgDown, m_bgCloudUp, m_bgCloudDown, bFull, bQuarter);
diff --git a/src/autobase.h b/src/autobase.h
index bfc0220..2573c2a 100644
--- a/src/autobase.h
+++ b/src/autobase.h
@@ -1,4 +1,18 @@
-// autobase.h
+// * 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 .
#ifndef _AUTOBASE_H_
#define _AUTOBASE_H_
@@ -13,10 +27,10 @@ class CObject;
-#define PARAM_STOP 0 // run=0 -> stoppé et ouvert
+#define PARAM_STOP 0 // run=0 -> stopp� et ouvert
#define PARAM_LANDING 1 // run=1 -> atterrissage
-#define PARAM_PORTICO 2 // run=2 -> porté par le portique
-#define PARAM_FIXSCENE 3 // run=3 -> stoppé et ouvert pour win/lost
+#define PARAM_PORTICO 2 // run=2 -> port� par le portique
+#define PARAM_FIXSCENE 3 // run=3 -> stopp� et ouvert pour win/lost
#define PARAM_TRANSIT1 11 // run=11 -> transit dans l'espace
#define PARAM_TRANSIT2 12 // run=12 -> transit dans l'espace
#define PARAM_TRANSIT3 13 // run=13 -> transit dans l'espace
@@ -25,18 +39,18 @@ class CObject;
enum AutoBasePhase
{
ABP_WAIT = 1, // attend
- ABP_START = 2, // démarrage
+ ABP_START = 2, // d�marrage
ABP_LAND = 3, // atterissage
ABP_OPENWAIT = 4, // attente avant ouverture
ABP_OPEN = 5, // ouvre les portes
- ABP_OPEN2 = 6, // ouvre les suppléments
+ ABP_OPEN2 = 6, // ouvre les suppl�ments
ABP_LDWAIT = 7, // attend
- ABP_CLOSE2 = 8, // ferme les suppléments
+ ABP_CLOSE2 = 8, // ferme les suppl�ments
ABP_CLOSE = 9, // ferme les portes
- ABP_TOWAIT = 10, // attente avant décollage
- ABP_TAKEOFF = 11, // décollage
+ ABP_TOWAIT = 10, // attente avant d�collage
+ ABP_TAKEOFF = 11, // d�collage
ABP_PORTICO_MOVE = 12, // portique avance
ABP_PORTICO_WAIT1= 13, // portique attend
@@ -44,7 +58,7 @@ enum AutoBasePhase
ABP_PORTICO_WAIT2= 15, // portique attend
ABP_PORTICO_OPEN = 16, // portique s'ouvre
- ABP_TRANSIT_MOVE = 17, // transit - déplacement
+ ABP_TRANSIT_MOVE = 17, // transit - d�placement
};
diff --git a/src/autoconvert.cpp b/src/autoconvert.cpp
index 7a11ac3..a3c2e5b 100644
--- a/src/autoconvert.cpp
+++ b/src/autoconvert.cpp
@@ -1,4 +1,18 @@
-// autoconvert.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
@@ -52,7 +66,7 @@ CAutoConvert::~CAutoConvert()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoConvert::DeleteObject(BOOL bAll)
{
@@ -63,7 +77,7 @@ void CAutoConvert::DeleteObject(BOOL bAll)
fret = SearchStone(OBJECT_STONE);
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit la pierre
+ fret->DeleteObject(); // d�truit la pierre
delete fret;
}
}
@@ -94,7 +108,7 @@ void CAutoConvert::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoConvert::EventProcess(const Event &event)
{
@@ -111,7 +125,7 @@ BOOL CAutoConvert::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 )
{
@@ -136,7 +150,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- fret = SearchStone(OBJECT_STONE); // pierre à transformer ?
+ fret = SearchStone(OBJECT_STONE); // pierre � transformer ?
if ( fret == 0 || SearchVehicle() )
{
m_phase = ACP_WAIT; // attend encore ...
@@ -197,7 +211,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
{
if ( m_progress < 0.5f )
{
- angle = powf((m_progress*2.0f)*5.0f, 2.0f); // accélère
+ angle = powf((m_progress*2.0f)*5.0f, 2.0f); // acc�l�re
}
else
{
@@ -236,11 +250,11 @@ BOOL CAutoConvert::EventProcess(const Event &event)
if ( fret != 0 )
{
m_bResetDelete = ( fret->RetResetCap() != RESET_NONE );
- fret->DeleteObject(); // détruit la pierre
+ fret->DeleteObject(); // d�truit la pierre
delete fret;
}
- CreateMetal(); // c'est du métal
+ CreateMetal(); // c'est du m�tal
m_sound->Play(SOUND_OPEN, m_object->RetPosition(0), 1.0f, 1.5f);
m_phase = ACP_OPEN;
@@ -290,7 +304,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
return TRUE;
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoConvert::RetError()
{
@@ -331,7 +345,7 @@ BOOL CAutoConvert::Abort()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoConvert::CreateInterface(BOOL bSelect)
{
@@ -361,7 +375,7 @@ BOOL CAutoConvert::CreateInterface(BOOL bSelect)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoConvert::Write(char *line)
{
@@ -387,7 +401,7 @@ BOOL CAutoConvert::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoConvert::Read(char *line)
{
@@ -435,7 +449,7 @@ CObject* CAutoConvert::SearchStone(ObjectType type)
return 0;
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CAutoConvert::SearchVehicle()
{
@@ -503,7 +517,7 @@ BOOL CAutoConvert::SearchVehicle()
return FALSE;
}
-// Crée un objet métal.
+// Cr�e un objet m�tal.
void CAutoConvert::CreateMetal()
{
diff --git a/src/autoconvert.h b/src/autoconvert.h
index 3cdbf57..7a2d159 100644
--- a/src/autoconvert.h
+++ b/src/autoconvert.h
@@ -1,4 +1,18 @@
-// autoconvert.h
+// * 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 .
#ifndef _AUTOCONVERT_H_
#define _AUTOCONVERT_H_
diff --git a/src/autoderrick.cpp b/src/autoderrick.cpp
index 077dc35..9d5196e 100644
--- a/src/autoderrick.cpp
+++ b/src/autoderrick.cpp
@@ -1,4 +1,18 @@
-// autoderrick.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
@@ -29,7 +43,7 @@
-#define DERRICK_DELAY 10.0f // durée de l'extraction
+#define DERRICK_DELAY 10.0f // dur�e de l'extraction
#define DERRICK_DELAYu 30.0f // idem, mais pour l'uranium
@@ -55,7 +69,7 @@ CAutoDerrick::~CAutoDerrick()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoDerrick::DeleteObject(BOOL bAll)
{
@@ -132,7 +146,7 @@ void CAutoDerrick::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoDerrick::EventProcess(const Event &event)
{
@@ -150,7 +164,7 @@ BOOL CAutoDerrick::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 )
{
@@ -185,7 +199,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, 4.0f, SOPER_STOP);
}
- if ( m_progress >= 6.0f/16.0f && // pénètre dans le sol ?
+ if ( m_progress >= 6.0f/16.0f && // p�n�tre dans le sol ?
m_lastParticule+m_engine->ParticuleAdapt(0.05f) <= m_time )
{
m_lastParticule = m_time;
@@ -199,7 +213,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
m_particule->CreateParticule(pos, speed, dim, PARTICRASH, 2.0f);
}
- if ( m_progress >= 6.0f/16.0f && // pénètre dans le sol ?
+ if ( m_progress >= 6.0f/16.0f && // p�n�tre dans le sol ?
m_lastTrack+m_engine->ParticuleAdapt(0.5f) <= m_time )
{
m_lastTrack = m_time;
@@ -375,7 +389,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
}
else
{
- if ( ExistKey() ) // clé existe déjà ?
+ if ( ExistKey() ) // cl� existe d�j� ?
{
m_phase = ADP_WAIT;
m_progress = 0.0f;
@@ -394,7 +408,7 @@ BOOL CAutoDerrick::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 CAutoDerrick::CreateInterface(BOOL bSelect)
{
@@ -424,7 +438,7 @@ BOOL CAutoDerrick::CreateInterface(BOOL bSelect)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoDerrick::Write(char *line)
{
@@ -449,7 +463,7 @@ BOOL CAutoDerrick::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoDerrick::Read(char *line)
{
@@ -516,14 +530,14 @@ BOOL CAutoDerrick::SearchFree(D3DVECTOR pos)
{
distance = Length(sPos, pos);
distance -= sRadius;
- if ( distance < 2.0f ) return FALSE; // emplacement occupé
+ if ( distance < 2.0f ) return FALSE; // emplacement occup�
}
}
return TRUE; // emplacement libre
}
-// Crée un objet transportable.
+// Cr�e un objet transportable.
void CAutoDerrick::CreateFret(D3DVECTOR pos, float angle, ObjectType type,
float height)
@@ -549,7 +563,7 @@ void CAutoDerrick::CreateFret(D3DVECTOR pos, float angle, ObjectType type,
fret->SetPosition(0, pos);
}
-// Cherche s'il existe déjà une clé.
+// Cherche s'il existe d�j� une cl�.
BOOL CAutoDerrick::ExistKey()
{
@@ -575,7 +589,7 @@ BOOL CAutoDerrick::ExistKey()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoDerrick::RetError()
{
diff --git a/src/autoderrick.h b/src/autoderrick.h
index cb5ccb4..478f215 100644
--- a/src/autoderrick.h
+++ b/src/autoderrick.h
@@ -1,4 +1,18 @@
-// autoderrick.h
+// * 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 .
#ifndef _AUTODERRICK_H_
#define _AUTODERRICK_H_
@@ -20,8 +34,8 @@ enum AutoDerrickPhase
ADP_WAIT = 1,
ADP_EXCAVATE = 2, // descend le foret
ADP_ASCEND = 3, // remonte le foret
- ADP_EXPORT = 4, // exporte la matière
- ADP_ISFREE = 5, // attend disparition matière
+ ADP_EXPORT = 4, // exporte la mati�re
+ ADP_ISFREE = 5, // attend disparition mati�re
};
diff --git a/src/autodestroyer.cpp b/src/autodestroyer.cpp
index 28f548f..13f1e96 100644
--- a/src/autodestroyer.cpp
+++ b/src/autodestroyer.cpp
@@ -1,4 +1,18 @@
-// autodestroyer.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
@@ -52,7 +66,7 @@ CAutoDestroyer::~CAutoDestroyer()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoDestroyer::DeleteObject(BOOL bAll)
{
@@ -76,7 +90,7 @@ void CAutoDestroyer::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoDestroyer::EventProcess(const Event &event)
{
@@ -93,7 +107,7 @@ BOOL CAutoDestroyer::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 )
{
@@ -115,8 +129,8 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
}
else
{
- scrap->SetLock(TRUE); // déchet plus utilisable
-//? scrap->SetTruck(m_object); // déchet plus utilisable
+ scrap->SetLock(TRUE); // d�chet plus utilisable
+//? scrap->SetTruck(m_object); // d�chet plus utilisable
if ( SearchVehicle() )
{
@@ -204,7 +218,7 @@ BOOL CAutoDestroyer::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 CAutoDestroyer::CreateInterface(BOOL bSelect)
{
@@ -234,7 +248,7 @@ BOOL CAutoDestroyer::CreateInterface(BOOL bSelect)
}
-// Cherche le déchet placé sous le destructeur.
+// Cherche le d�chet plac� sous le destructeur.
CObject* CAutoDestroyer::SearchPlastic()
{
@@ -263,7 +277,7 @@ CObject* CAutoDestroyer::SearchPlastic()
return 0;
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CAutoDestroyer::SearchVehicle()
{
@@ -325,7 +339,7 @@ BOOL CAutoDestroyer::SearchVehicle()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoDestroyer::RetError()
{
@@ -338,7 +352,7 @@ Error CAutoDestroyer::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoDestroyer::Write(char *line)
{
@@ -363,7 +377,7 @@ BOOL CAutoDestroyer::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoDestroyer::Read(char *line)
{
diff --git a/src/autodestroyer.h b/src/autodestroyer.h
index 3b48f66..d2dbf23 100644
--- a/src/autodestroyer.h
+++ b/src/autodestroyer.h
@@ -1,4 +1,18 @@
-// autodestroyer.h
+// * 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 .
#ifndef _AUTODESTROYER_H_
#define _AUTODESTROYER_H_
@@ -15,9 +29,9 @@ class CObject;
enum AutoDestroyerPhase
{
- ADEP_WAIT = 1, // attend métal
+ ADEP_WAIT = 1, // attend m�tal
ADEP_DOWN = 2, // descend le couvercle
- ADEP_REPAIR = 3, // construit le véhicule
+ ADEP_REPAIR = 3, // construit le v�hicule
ADEP_UP = 4, // remonte le couvercle
};
diff --git a/src/autoegg.cpp b/src/autoegg.cpp
index a8eec72..6b10183 100644
--- a/src/autoegg.cpp
+++ b/src/autoegg.cpp
@@ -1,4 +1,18 @@
-// autoegg.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
@@ -49,7 +63,7 @@ CAutoEgg::~CAutoEgg()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoEgg::DeleteObject(BOOL bAll)
{
@@ -65,7 +79,7 @@ void CAutoEgg::DeleteObject(BOOL bAll)
if ( alien->RetZoom(0) == 1.0f )
{
alien->SetLock(FALSE);
- alien->SetActivity(TRUE); // l'insect né est actif
+ alien->SetActivity(TRUE); // l'insect n� est actif
}
else
{
@@ -141,7 +155,7 @@ BOOL CAutoEgg::SetString(char *string)
}
-// Démarre l'objet.
+// D�marre l'objet.
void CAutoEgg::Start(int param)
{
@@ -156,7 +170,7 @@ void CAutoEgg::Start(int param)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoEgg::EventProcess(const Event &event)
{
@@ -201,14 +215,14 @@ BOOL CAutoEgg::EventProcess(const Event &event)
m_type == OBJECT_SPIDER ||
m_type == OBJECT_BEE )
{
- alien->SetZoom(0, 0.2f+m_progress*0.8f); // ça pousse
+ alien->SetZoom(0, 0.2f+m_progress*0.8f); // �a pousse
}
}
return TRUE;
}
-// Indique si l'automate a terminé son activité.
+// Indique si l'automate a termin� son activit�.
Error CAutoEgg::IsEnded()
{
@@ -239,7 +253,7 @@ Error CAutoEgg::IsEnded()
pyro = new CPyro(m_iMan);
pyro->Create(PT_EGG, m_object); // explosion de l'oeuf
- alien->SetZoom(0, 1.0f); // c'est un grand garçon, maintenant
+ alien->SetZoom(0, 1.0f); // c'est un grand gar�on, maintenant
m_phase = AEP_WAIT;
m_progress = 0.0f;
@@ -251,14 +265,14 @@ Error CAutoEgg::IsEnded()
if ( m_progress < 1.0f ) return ERR_CONTINUE;
alien->SetLock(FALSE);
- alien->SetActivity(TRUE); // l'insect né est actif
+ alien->SetActivity(TRUE); // l'insect n� est actif
}
return ERR_STOP;
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoEgg::RetError()
{
@@ -305,7 +319,7 @@ CObject* CAutoEgg::SearchAlien()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoEgg::Write(char *line)
{
@@ -339,7 +353,7 @@ BOOL CAutoEgg::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoEgg::Read(char *line)
{
diff --git a/src/autoegg.h b/src/autoegg.h
index bc4be7b..ab6a32a 100644
--- a/src/autoegg.h
+++ b/src/autoegg.h
@@ -1,4 +1,18 @@
-// autoegg.h
+// * 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 .
#ifndef _AUTOEGG_H_
#define _AUTOEGG_H_
diff --git a/src/autoenergy.cpp b/src/autoenergy.cpp
index 1456f01..250c73e 100644
--- a/src/autoenergy.cpp
+++ b/src/autoenergy.cpp
@@ -1,4 +1,18 @@
-// autoenergy.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,8 +45,8 @@
-#define ENERGY_POWER 0.4f // énergie nécessaire pour une pile
-#define ENERGY_DELAY 12.0f // durée de la transformation
+#define ENERGY_POWER 0.4f // �nergie n�cessaire pour une pile
+#define ENERGY_DELAY 12.0f // dur�e de la transformation
@@ -56,7 +70,7 @@ CAutoEnergy::~CAutoEnergy()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoEnergy::DeleteObject(BOOL bAll)
{
@@ -73,14 +87,14 @@ void CAutoEnergy::DeleteObject(BOOL bAll)
fret = SearchMetal();
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit le métal
+ fret->DeleteObject(); // d�truit le m�tal
delete fret;
}
fret = SearchPower();
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit la pile
+ fret->DeleteObject(); // d�truit la pile
delete fret;
}
}
@@ -106,7 +120,7 @@ void CAutoEnergy::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoEnergy::EventProcess(const Event &event)
{
@@ -125,7 +139,7 @@ BOOL CAutoEnergy::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 )
{
@@ -163,7 +177,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
if ( m_progress >= 1.0f )
{
bGO = FALSE;
- fret = SearchMetal(); // métal à transformer ?
+ fret = SearchMetal(); // m�tal � transformer ?
if ( fret != 0 )
{
if ( fret->RetType() == OBJECT_METAL )
@@ -180,8 +194,8 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
{
if ( fret->RetType() == OBJECT_METAL )
{
- fret->SetLock(TRUE); // métal plus utilisable
- CreatePower(); // crée la pile
+ fret->SetLock(TRUE); // m�tal plus utilisable
+ CreatePower(); // cr�e la pile
}
SetBusy(TRUE);
@@ -312,7 +326,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
if ( fret != 0 )
{
m_object->SetPower(0);
- fret->DeleteObject(); // détruit le métal
+ fret->DeleteObject(); // d�truit le m�tal
delete fret;
}
@@ -367,13 +381,13 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
if ( big < 0.0f ) big = 0.0f;
if ( big > 1.0f ) big = 1.0f;
- m_object->SetEnergy(big); // màj la grosse pile
+ m_object->SetEnergy(big); // m�j la grosse pile
return TRUE;
}
-// Cherche l'objet métal.
+// Cherche l'objet m�tal.
CObject* CAutoEnergy::SearchMetal()
{
@@ -392,7 +406,7 @@ CObject* CAutoEnergy::SearchMetal()
return 0;
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CAutoEnergy::SearchVehicle()
{
@@ -453,7 +467,7 @@ BOOL CAutoEnergy::SearchVehicle()
return FALSE;
}
-// Crée un objet pile.
+// Cr�e un objet pile.
void CAutoEnergy::CreatePower()
{
@@ -511,7 +525,7 @@ CObject* CAutoEnergy::SearchPower()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoEnergy::RetError()
{
@@ -545,7 +559,7 @@ Error CAutoEnergy::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoEnergy::CreateInterface(BOOL bSelect)
{
@@ -580,8 +594,8 @@ BOOL CAutoEnergy::CreateInterface(BOOL bSelect)
return TRUE;
}
-// 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 CAutoEnergy::UpdateInterface(float rTime)
{
@@ -606,7 +620,7 @@ void CAutoEnergy::UpdateInterface(float rTime)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoEnergy::Write(char *line)
{
@@ -632,7 +646,7 @@ BOOL CAutoEnergy::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoEnergy::Read(char *line)
{
diff --git a/src/autoenergy.h b/src/autoenergy.h
index 5aa4631..5fffced 100644
--- a/src/autoenergy.h
+++ b/src/autoenergy.h
@@ -1,4 +1,18 @@
-// autoenergy.h
+// * 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 .
#ifndef _AUTOENERGY_H_
#define _AUTOENERGY_H_
diff --git a/src/autofactory.cpp b/src/autofactory.cpp
index 4d913f6..f3e89eb 100644
--- a/src/autofactory.cpp
+++ b/src/autofactory.cpp
@@ -1,4 +1,18 @@
-// autofactory.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
@@ -57,7 +71,7 @@ CAutoFactory::~CAutoFactory()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoFactory::DeleteObject(BOOL bAll)
{
@@ -66,17 +80,17 @@ void CAutoFactory::DeleteObject(BOOL bAll)
if ( !bAll )
{
- fret = SearchFret(); // métal à transformer ?
+ fret = SearchFret(); // m�tal � transformer ?
if ( fret != 0 )
{
- fret->DeleteObject(); // détruit le métal
+ fret->DeleteObject(); // d�truit le m�tal
delete fret;
}
vehicle = SearchVehicle();
if ( vehicle != 0 )
{
- vehicle->DeleteObject(); // détruit le véhicule
+ vehicle->DeleteObject(); // d�truit le v�hicule
delete vehicle;
}
}
@@ -109,7 +123,7 @@ void CAutoFactory::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoFactory::EventProcess(const Event &event)
{
@@ -127,7 +141,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
if ( m_engine->RetPause() ) return TRUE;
- if ( m_object->RetSelect() ) // usine sélectionnée ?
+ if ( m_object->RetSelect() ) // usine s�lectionn�e ?
{
if ( event.event == EVENT_UPDINTERFACE )
{
@@ -166,7 +180,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
return FALSE;
}
- fret = SearchFret(); // métal à transformer ?
+ fret = SearchFret(); // m�tal � transformer ?
if ( fret == 0 )
{
m_displayText->DisplayError(ERR_FACTORY_NULL, m_object);
@@ -182,7 +196,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
InitProgressTotal(3.0f+2.0f+15.0f+2.0f+3.0f);
UpdateInterface();
- fret->SetLock(TRUE); // métal plus utilisable
+ fret->SetLock(TRUE); // m�tal plus utilisable
SoundManip(3.0f, 1.0f, 0.5f);
m_phase = AFP_CLOSE_S;
@@ -272,10 +286,10 @@ BOOL CAutoFactory::EventProcess(const Event &event)
{
if ( !CreateVehicle() )
{
- fret = SearchFret(); // métal à transformer ?
+ fret = SearchFret(); // m�tal � transformer ?
if ( fret != 0 )
{
- fret->SetLock(FALSE); // métal de nouveau utilisable
+ fret->SetLock(FALSE); // m�tal de nouveau utilisable
}
if ( m_channelSound != -1 )
@@ -315,7 +329,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
vehicle->SetZoom(0, m_progress);
}
- fret = SearchFret(); // métal à transformer ?
+ fret = SearchFret(); // m�tal � transformer ?
if ( fret != 0 )
{
fret->SetZoom(0, 1.0f-m_progress);
@@ -338,7 +352,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
m_particule->CreateParticule(pos, speed, dim, PARTIBLUE, 1.0f, 0.0f, 0.0f);
#else
mat = m_object->RetWorldMatrix(0);
- pos = D3DVECTOR(-12.0f, 20.0f, -4.0f); // position cheminée
+ pos = D3DVECTOR(-12.0f, 20.0f, -4.0f); // position chemin�e
pos = Transform(*mat, pos);
pos.y += 2.0f;
pos.x += (Rand()-0.5f)*2.0f;
@@ -357,10 +371,10 @@ BOOL CAutoFactory::EventProcess(const Event &event)
m_displayText->DisplayError(INFO_FACTORY, m_object);
SoundManip(2.0f, 1.0f, 1.2f);
- fret = SearchFret(); // métal à transformer ?
+ fret = SearchFret(); // m�tal � transformer ?
if ( fret != 0 )
{
- fret->DeleteObject(); // supprime le métal
+ fret->DeleteObject(); // supprime le m�tal
delete fret;
}
@@ -373,7 +387,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
physics->SetFreeze(FALSE); // on peut bouger
}
- vehicle->SetLock(FALSE); // véhicule utilisable
+ vehicle->SetLock(FALSE); // v�hicule utilisable
//? vehicle->RetPhysics()->RetBrain()->StartTaskAdvance(16.0f);
vehicle->SetAngleY(0, m_object->RetAngleY(0)+PI);
vehicle->SetZoom(0, 1.0f);
@@ -476,7 +490,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoFactory::Write(char *line)
{
@@ -501,7 +515,7 @@ BOOL CAutoFactory::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoFactory::Read(char *line)
{
@@ -548,7 +562,7 @@ CObject* CAutoFactory::SearchFret()
return 0;
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CAutoFactory::NearestVehicle()
{
@@ -610,7 +624,7 @@ BOOL CAutoFactory::NearestVehicle()
}
-// Crée un véhicule pas utilisable tout de suite.
+// Cr�e un v�hicule pas utilisable tout de suite.
BOOL CAutoFactory::CreateVehicle()
{
@@ -665,7 +679,7 @@ BOOL CAutoFactory::CreateVehicle()
return TRUE;
}
-// Cherche le véhicule en cours de fabrication.
+// Cherche le v�hicule en cours de fabrication.
CObject* CAutoFactory::SearchVehicle()
{
@@ -696,7 +710,7 @@ CObject* CAutoFactory::SearchVehicle()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoFactory::CreateInterface(BOOL bSelect)
{
@@ -788,7 +802,7 @@ BOOL CAutoFactory::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 CAutoFactory::UpdateInterface()
{
@@ -823,7 +837,7 @@ void CAutoFactory::UpdateInterface()
UpdateButton(pw, EVENT_OBJECT_FACTORYsa, m_bBusy);
}
-// Met à jour un bouton de l'interface.
+// Met � jour un bouton de l'interface.
void CAutoFactory::UpdateButton(CWindow *pw, EventMsg event, BOOL bBusy)
{
diff --git a/src/autofactory.h b/src/autofactory.h
index c635608..d702c3d 100644
--- a/src/autofactory.h
+++ b/src/autofactory.h
@@ -1,4 +1,18 @@
-// autofactory.h
+// * 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 .
#ifndef _AUTOFACTORY_H_
#define _AUTOFACTORY_H_
@@ -15,10 +29,10 @@ class CObject;
enum AutoFactoryPhase
{
- AFP_WAIT = 1, // attend métal
+ AFP_WAIT = 1, // attend m�tal
AFP_CLOSE_S = 2, // ferme les portes (shift)
AFP_CLOSE_T = 3, // ferme les portes (turn)
- AFP_BUILD = 4, // construit le véhicule
+ AFP_BUILD = 4, // construit le v�hicule
AFP_OPEN_T = 5, // ouvre les portes (turn)
AFP_OPEN_S = 6, // ouvre les portes (shift)
AFP_ADVANCE = 7, // avance devant la porte
diff --git a/src/autoflag.cpp b/src/autoflag.cpp
index 46b529c..9c03758 100644
--- a/src/autoflag.cpp
+++ b/src/autoflag.cpp
@@ -1,4 +1,18 @@
-// autoflag.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
@@ -51,7 +65,7 @@ CAutoFlag::~CAutoFlag()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoFlag::DeleteObject(BOOL bAll)
{
@@ -78,7 +92,7 @@ void CAutoFlag::Init()
}
-// Début d'une action (1 = secoue).
+// D�but d'une action (1 = secoue).
void CAutoFlag::Start(int param)
{
@@ -90,7 +104,7 @@ void CAutoFlag::Start(int param)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoFlag::EventProcess(const Event &event)
{
@@ -154,7 +168,7 @@ BOOL CAutoFlag::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 CAutoFlag::RetError()
{
diff --git a/src/autoflag.h b/src/autoflag.h
index 9d928c5..9688360 100644
--- a/src/autoflag.h
+++ b/src/autoflag.h
@@ -1,4 +1,18 @@
-// autoflag.h
+// * 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 .
#ifndef _AUTOFLAG_H_
#define _AUTOFLAG_H_
diff --git a/src/autohuston.cpp b/src/autohuston.cpp
index 5e5c282..c168dce 100644
--- a/src/autohuston.cpp
+++ b/src/autohuston.cpp
@@ -1,4 +1,18 @@
-// autohuston.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
@@ -64,7 +78,7 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
m_lens[2].off = 0.4f;
m_lens[3].off = 0.4f;
- // Pièce sous radar.
+ // Pi�ce sous radar.
i = 4;
m_lens[i].type = PARTISELR;
m_lens[i].pos = pos+D3DVECTOR(-7.0f, 9.9f, 40.1f);
@@ -112,7 +126,7 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
m_lens[i].off = 0.7f;
i ++;
- // Pièce avec 3 fenêtres.
+ // Pi�ce avec 3 fen�tres.
m_lens[i].type = PARTISELR;
m_lens[i].pos = pos+D3DVECTOR(-7.0f, 9.9f, -19.9f);
m_lens[i].dim = 1.0f;
@@ -179,7 +193,7 @@ CAutoHuston::~CAutoHuston()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoHuston::DeleteObject(BOOL bAll)
{
@@ -198,14 +212,14 @@ void CAutoHuston::Init()
}
-// Démarre l'objet.
+// D�marre l'objet.
void CAutoHuston::Start(int param)
{
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoHuston::EventProcess(const Event &event)
{
@@ -227,7 +241,7 @@ BOOL CAutoHuston::EventProcess(const Event &event)
m_progress += event.rTime*m_speed;
- // Fait clignotter les clés.
+ // Fait clignotter les cl�s.
speed = D3DVECTOR(0.0f, 0.0f, 0.0f);
for ( i=0 ; i<m_lensTotal ; i++ )
{
@@ -262,7 +276,7 @@ BOOL CAutoHuston::Abort()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoHuston::CreateInterface(BOOL bSelect)
{
@@ -292,7 +306,7 @@ BOOL CAutoHuston::CreateInterface(BOOL bSelect)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoHuston::RetError()
{
diff --git a/src/autohuston.h b/src/autohuston.h
index 150edd5..68482a3 100644
--- a/src/autohuston.h
+++ b/src/autohuston.h
@@ -1,4 +1,18 @@
-// autohuston.h
+// * 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 .
#ifndef _AUTOHUSTON_H_
#define _AUTOHUSTON_H_
diff --git a/src/autoinfo.cpp b/src/autoinfo.cpp
index f6de5a6..c048a31 100644
--- a/src/autoinfo.cpp
+++ b/src/autoinfo.cpp
@@ -1,4 +1,18 @@
-// autoinfo.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
@@ -49,7 +63,7 @@ CAutoInfo::~CAutoInfo()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoInfo::DeleteObject(BOOL bAll)
{
@@ -70,7 +84,7 @@ void CAutoInfo::Init()
}
-// Démarre une émission.
+// D�marre une �mission.
void CAutoInfo::Start(int param)
{
@@ -128,7 +142,7 @@ void CAutoInfo::Start(int param)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoInfo::EventProcess(const Event &event)
{
@@ -144,7 +158,7 @@ BOOL CAutoInfo::EventProcess(const Event &event)
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 )
{
@@ -345,7 +359,7 @@ BOOL CAutoInfo::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 CAutoInfo::RetError()
{
@@ -358,7 +372,7 @@ Error CAutoInfo::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoInfo::CreateInterface(BOOL bSelect)
{
@@ -396,8 +410,8 @@ BOOL CAutoInfo::CreateInterface(BOOL bSelect)
return TRUE;
}
-// 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 CAutoInfo::UpdateInterface(float rTime)
{
@@ -405,7 +419,7 @@ void CAutoInfo::UpdateInterface(float rTime)
}
-// Met à jour le contenu de la liste.
+// Met � jour le contenu de la liste.
void CAutoInfo::UpdateList()
{
@@ -442,7 +456,7 @@ void CAutoInfo::UpdateList()
m_object->SetInfoUpdate(FALSE);
}
-// Met à jour le contenu contaminé de la liste.
+// Met � jour le contenu contamin� de la liste.
void CAutoInfo::UpdateListVirus()
{
@@ -478,7 +492,7 @@ void CAutoInfo::UpdateListVirus()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoInfo::Write(char *line)
{
@@ -503,7 +517,7 @@ BOOL CAutoInfo::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoInfo::Read(char *line)
{
diff --git a/src/autoinfo.h b/src/autoinfo.h
index f7ce998..a3806a0 100644
--- a/src/autoinfo.h
+++ b/src/autoinfo.h
@@ -1,4 +1,18 @@
-// autoinfo.h
+// * 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 .
#ifndef _AUTOINFO_H_
#define _AUTOINFO_H_
diff --git a/src/autojostle.cpp b/src/autojostle.cpp
index 057ca90..2cb163a 100644
--- a/src/autojostle.cpp
+++ b/src/autojostle.cpp
@@ -1,4 +1,18 @@
-// autojostle.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
@@ -48,7 +62,7 @@ CAutoJostle::~CAutoJostle()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoJostle::DeleteObject(BOOL bAll)
{
@@ -67,7 +81,7 @@ void CAutoJostle::Init()
}
-// Démarre une émission.
+// D�marre une �mission.
void CAutoJostle::Start(int param, float force)
{
@@ -84,14 +98,14 @@ void CAutoJostle::Start(int param, float force)
type = m_object->RetType();
if ( type >= OBJECT_PLANT5 &&
- type <= OBJECT_PLANT7 ) // trèfle ?
+ type <= OBJECT_PLANT7 ) // tr�fle ?
{
m_force *= 3.0f;
}
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoJostle::EventProcess(const Event &event)
{
@@ -143,7 +157,7 @@ BOOL CAutoJostle::EventProcess(const Event &event)
}
-// Indique si l'automate a terminé son activité.
+// Indique si l'automate a termin� son activit�.
Error CAutoJostle::IsEnded()
{
diff --git a/src/autojostle.h b/src/autojostle.h
index 3527c93..e3b8cd0 100644
--- a/src/autojostle.h
+++ b/src/autojostle.h
@@ -1,4 +1,18 @@
-// autojostle.h
+// * 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 .
#ifndef _AUTOJOSTLE_H_
#define _AUTOJOSTLE_H_
diff --git a/src/autokid.cpp b/src/autokid.cpp
index 4685319..70be5f2 100644
--- a/src/autokid.cpp
+++ b/src/autokid.cpp
@@ -1,4 +1,18 @@
-// autokid.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
@@ -53,7 +67,7 @@ CAutoKid::~CAutoKid()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoKid::DeleteObject(BOOL bAll)
{
@@ -96,7 +110,7 @@ void CAutoKid::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoKid::EventProcess(const Event &event)
{
@@ -198,7 +212,7 @@ BOOL CAutoKid::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 CAutoKid::RetError()
{
diff --git a/src/autokid.h b/src/autokid.h
index a51effd..0a4d434 100644
--- a/src/autokid.h
+++ b/src/autokid.h
@@ -1,4 +1,18 @@
-// autokid.h
+// * 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 .
#ifndef _AUTOKID_H_
#define _AUTOKID_H_
diff --git a/src/autolabo.cpp b/src/autolabo.cpp
index 8fc3da2..2d7f16a 100644
--- a/src/autolabo.cpp
+++ b/src/autolabo.cpp
@@ -1,4 +1,18 @@
-// autolabo.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 LABO_DELAY 20.0f // durée de l'analyse
+#define LABO_DELAY 20.0f // dur�e de l'analyse
@@ -64,7 +78,7 @@ CAutoLabo::~CAutoLabo()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoLabo::DeleteObject(BOOL bAll)
{
@@ -112,7 +126,7 @@ void CAutoLabo::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoLabo::EventProcess(const Event &event)
{
@@ -131,7 +145,7 @@ BOOL CAutoLabo::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_RiPAW ||
event.event == EVENT_OBJECT_RiGUN) )
{
@@ -178,7 +192,7 @@ BOOL CAutoLabo::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 )
{
@@ -341,13 +355,13 @@ BOOL CAutoLabo::EventProcess(const Event &event)
}
else
{
- SetResearch(m_research); // recherche effectuée
+ SetResearch(m_research); // recherche effectu�e
power = m_object->RetPower();
if ( power != 0 )
{
m_object->SetPower(0);
- power->DeleteObject(); // détruit le boulet
+ power->DeleteObject(); // d�truit le boulet
delete power;
}
@@ -426,7 +440,7 @@ BOOL CAutoLabo::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 CAutoLabo::RetError()
{
@@ -447,7 +461,7 @@ Error CAutoLabo::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoLabo::CreateInterface(BOOL bSelect)
{
@@ -488,7 +502,7 @@ BOOL CAutoLabo::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 CAutoLabo::UpdateInterface()
{
@@ -511,7 +525,7 @@ void CAutoLabo::UpdateInterface()
VisibleInterface(pw, EVENT_OBJECT_RiGUN, !m_bBusy);
}
-// Indique les recherches déjà effectuées pour un bouton.
+// Indique les recherches d�j� effectu�es pour un bouton.
void CAutoLabo::OkayButton(CWindow *pw, EventMsg event)
{
@@ -524,7 +538,7 @@ void CAutoLabo::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 CAutoLabo::TestResearch(EventMsg event)
{
@@ -534,7 +548,7 @@ BOOL CAutoLabo::TestResearch(EventMsg event)
return FALSE;
}
-// Indique une recherche comme effectuée.
+// Indique une recherche comme effectu�e.
void CAutoLabo::SetResearch(EventMsg event)
{
@@ -563,7 +577,7 @@ void CAutoLabo::SoundManip(float time, float amplitude, float frequency)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoLabo::Write(char *line)
{
@@ -592,7 +606,7 @@ BOOL CAutoLabo::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoLabo::Read(char *line)
{
diff --git a/src/autolabo.h b/src/autolabo.h
index 71a68bc..07bfc63 100644
--- a/src/autolabo.h
+++ b/src/autolabo.h
@@ -1,4 +1,18 @@
-// autolabo.h
+// * 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 .
#ifndef _AUTOLABO_H_
#define _AUTOLABO_H_
diff --git a/src/automush.cpp b/src/automush.cpp
index e9a1a3a..63b0bd0 100644
--- a/src/automush.cpp
+++ b/src/automush.cpp
@@ -1,4 +1,18 @@
-// automush.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
@@ -44,7 +58,7 @@ CAutoMush::~CAutoMush()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoMush::DeleteObject(BOOL bAll)
{
@@ -65,7 +79,7 @@ void CAutoMush::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoMush::EventProcess(const Event &event)
{
@@ -292,7 +306,7 @@ BOOL CAutoMush::SearchTarget()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoMush::RetError()
{
@@ -300,7 +314,7 @@ Error CAutoMush::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoMush::Write(char *line)
{
@@ -326,7 +340,7 @@ BOOL CAutoMush::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoMush::Read(char *line)
{
diff --git a/src/automush.h b/src/automush.h
index 03f2d28..4a426c6 100644
--- a/src/automush.h
+++ b/src/automush.h
@@ -1,4 +1,18 @@
-// automush.h
+// * 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 .
#ifndef _AUTOMUSH_H_
#define _AUTOMUSH_H_
diff --git a/src/autonest.cpp b/src/autonest.cpp
index 1885ce8..6c436eb 100644
--- a/src/autonest.cpp
+++ b/src/autonest.cpp
@@ -1,4 +1,18 @@
-// autonest.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
@@ -43,7 +57,7 @@ CAutoNest::~CAutoNest()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoNest::DeleteObject(BOOL bAll)
{
@@ -82,7 +96,7 @@ void CAutoNest::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoNest::EventProcess(const Event &event)
{
@@ -167,14 +181,14 @@ BOOL CAutoNest::SearchFree(D3DVECTOR pos)
{
distance = Length(sPos, pos);
distance -= sRadius;
- if ( distance < 2.0f ) return FALSE; // emplacement occupé
+ if ( distance < 2.0f ) return FALSE; // emplacement occup�
}
}
return TRUE; // emplacement libre
}
-// Crée un objet transportable.
+// Cr�e un objet transportable.
void CAutoNest::CreateFret(D3DVECTOR pos, float angle, ObjectType type)
{
@@ -221,7 +235,7 @@ CObject* CAutoNest::SearchFret()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoNest::RetError()
{
@@ -229,7 +243,7 @@ Error CAutoNest::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoNest::Write(char *line)
{
@@ -255,7 +269,7 @@ BOOL CAutoNest::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoNest::Read(char *line)
{
diff --git a/src/autonest.h b/src/autonest.h
index 50a3687..98c8e7c 100644
--- a/src/autonest.h
+++ b/src/autonest.h
@@ -1,4 +1,18 @@
-// autonest.h
+// * 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 .
#ifndef _AUTONEST_H_
#define _AUTONEST_H_
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)
{
diff --git a/src/autonuclear.h b/src/autonuclear.h
index f58921e..9a1ab0d 100644
--- a/src/autonuclear.h
+++ b/src/autonuclear.h
@@ -1,4 +1,18 @@
-// autonuclear.h
+// * 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 .
#ifndef _AUTONUCLEAR_H_
#define _AUTONUCLEAR_H_
diff --git a/src/autopara.cpp b/src/autopara.cpp
index 15177af..400f52a 100644
--- a/src/autopara.cpp
+++ b/src/autopara.cpp
@@ -1,4 +1,18 @@
-// autopara.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
@@ -51,7 +65,7 @@ CAutoPara::~CAutoPara()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoPara::DeleteObject(BOOL bAll)
{
@@ -87,7 +101,7 @@ void CAutoPara::Init()
}
-// Réception de l'éclair.
+// R�ception de l'�clair.
void CAutoPara::StartBlitz()
{
@@ -97,7 +111,7 @@ void CAutoPara::StartBlitz()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoPara::EventProcess(const Event &event)
{
@@ -113,7 +127,7 @@ BOOL CAutoPara::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 )
{
@@ -190,7 +204,7 @@ BOOL CAutoPara::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 CAutoPara::CreateInterface(BOOL bSelect)
{
@@ -226,7 +240,7 @@ BOOL CAutoPara::CreateInterface(BOOL bSelect)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoPara::RetError()
{
@@ -238,7 +252,7 @@ Error CAutoPara::RetError()
}
-// Charge tous les objets placés sous le paratonnerre.
+// Charge tous les objets plac�s sous le paratonnerre.
void CAutoPara::ChargeObject(float rTime)
{
@@ -288,7 +302,7 @@ void CAutoPara::ChargeObject(float rTime)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoPara::Write(char *line)
{
@@ -313,7 +327,7 @@ BOOL CAutoPara::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoPara::Read(char *line)
{
diff --git a/src/autopara.h b/src/autopara.h
index 691c508..81ae58b 100644
--- a/src/autopara.h
+++ b/src/autopara.h
@@ -1,4 +1,18 @@
-// autopara.h
+// * 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 .
#ifndef _AUTOPARA_H_
#define _AUTOPARA_H_
diff --git a/src/autoportico.cpp b/src/autoportico.cpp
index 12dcbca..cad56cf 100644
--- a/src/autoportico.cpp
+++ b/src/autoportico.cpp
@@ -1,4 +1,18 @@
-// autoportico.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
@@ -29,7 +43,7 @@
-#define PARAM_DEPOSE 2 // run=2 -> dépose le vaisseau
+#define PARAM_DEPOSE 2 // run=2 -> d�pose le vaisseau
#define PORTICO_POSa 75.0f
#define PORTICO_POSb 65.0f
@@ -77,7 +91,7 @@ CAutoPortico::~CAutoPortico()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoPortico::DeleteObject(BOOL bAll)
{
@@ -109,7 +123,7 @@ void CAutoPortico::Init()
}
-// Démarre l'objet.
+// D�marre l'objet.
void CAutoPortico::Start(int param)
{
@@ -117,7 +131,7 @@ void CAutoPortico::Start(int param)
pos = m_object->RetPosition(0);
m_finalPos = pos;
- pos.z += PORTICO_TIME_MOVE*5.0f; // recule au départ
+ pos.z += PORTICO_TIME_MOVE*5.0f; // recule au d�part
m_object->SetPosition(0, pos);
m_finalPos.z += PORTICO_TIME_OPEN*5.3f;
@@ -137,7 +151,7 @@ void CAutoPortico::Start(int param)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoPortico::EventProcess(const Event &event)
{
@@ -151,7 +165,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
if ( m_phase == APOP_START )
{
- if ( m_param == PARAM_DEPOSE ) // dépose le vaisseau ?
+ if ( m_param == PARAM_DEPOSE ) // d�pose le vaisseau ?
{
m_startPos = m_object->RetPosition(0);
@@ -164,7 +178,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
m_progress = 0.0f;
m_speed = 1.0f/PORTICO_TIME_MOVE;
- m_main->SetMovieLock(TRUE); // bloque tout jusqu'à la fin de l'atterrissage
+ m_main->SetMovieLock(TRUE); // bloque tout jusqu'� la fin de l'atterrissage
m_camera->SetType(CAMERA_SCRIPT);
@@ -392,7 +406,7 @@ BOOL CAutoPortico::Abort()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoPortico::RetError()
{
@@ -400,7 +414,7 @@ Error CAutoPortico::RetError()
}
-// Met à jour le mapping de la texture des chenilles.
+// Met � jour le mapping de la texture des chenilles.
void CAutoPortico::UpdateTrackMapping(float left, float right)
{
diff --git a/src/autoportico.h b/src/autoportico.h
index 611a4b2..6e350f3 100644
--- a/src/autoportico.h
+++ b/src/autoportico.h
@@ -1,4 +1,18 @@
-// autoportico.h
+// * 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 .
#ifndef _AUTOPORTICO_H_
#define _AUTOPORTICO_H_
@@ -16,7 +30,7 @@ class CObject;
enum AutoPorticoPhase
{
APOP_WAIT = 1, // attend
- APOP_START = 2, // départ de l'action
+ APOP_START = 2, // d�part de l'action
APOP_MOVE = 3, // avance
APOP_WAIT1 = 4, // attend
APOP_DOWN = 5, // descend
diff --git a/src/autoradar.cpp b/src/autoradar.cpp
index 3c10e59..24172a2 100644
--- a/src/autoradar.cpp
+++ b/src/autoradar.cpp
@@ -1,4 +1,18 @@
-// autoradar.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
@@ -49,7 +63,7 @@ CAutoRadar::~CAutoRadar()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoRadar::DeleteObject(BOOL bAll)
{
@@ -71,7 +85,7 @@ void CAutoRadar::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoRadar::EventProcess(const Event &event)
{
@@ -88,7 +102,7 @@ BOOL CAutoRadar::EventProcess(const Event &event)
m_aTime += event.rTime;
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 )
{
@@ -124,7 +138,7 @@ BOOL CAutoRadar::EventProcess(const Event &event)
if ( !SearchEnemy(ePos) )
{
m_phase = ARAP_SEARCH;
- m_progress = 10.0f/50.0f; // plein régime tout de suite
+ m_progress = 10.0f/50.0f; // plein r�gime tout de suite
m_speed = 1.0f/3.0f;
}
else
@@ -188,7 +202,7 @@ BOOL CAutoRadar::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 CAutoRadar::RetError()
{
@@ -201,7 +215,7 @@ Error CAutoRadar::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoRadar::CreateInterface(BOOL bSelect)
{
@@ -237,7 +251,7 @@ BOOL CAutoRadar::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 CAutoRadar::UpdateInterface()
{
diff --git a/src/autoradar.h b/src/autoradar.h
index 29c6bf6..f4272bb 100644
--- a/src/autoradar.h
+++ b/src/autoradar.h
@@ -1,4 +1,18 @@
-// autoradar.h
+// * 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 .
#ifndef _AUTORADAR_H_
#define _AUTORADAR_H_
diff --git a/src/autorepair.cpp b/src/autorepair.cpp
index 84335ee..8ee24a7 100644
--- a/src/autorepair.cpp
+++ b/src/autorepair.cpp
@@ -1,4 +1,18 @@
-// autorepair.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
@@ -51,7 +65,7 @@ CAutoRepair::~CAutoRepair()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoRepair::DeleteObject(BOOL bAll)
{
@@ -75,7 +89,7 @@ void CAutoRepair::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoRepair::EventProcess(const Event &event)
{
@@ -92,7 +106,7 @@ BOOL CAutoRepair::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 )
{
@@ -201,7 +215,7 @@ BOOL CAutoRepair::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 CAutoRepair::CreateInterface(BOOL bSelect)
{
@@ -231,7 +245,7 @@ BOOL CAutoRepair::CreateInterface(BOOL bSelect)
}
-// Cherche le véhicule placé sur la station.
+// Cherche le v�hicule plac� sur la station.
CObject* CAutoRepair::SearchVehicle()
{
@@ -290,7 +304,7 @@ CObject* CAutoRepair::SearchVehicle()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoRepair::RetError()
{
@@ -303,7 +317,7 @@ Error CAutoRepair::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoRepair::Write(char *line)
{
@@ -328,7 +342,7 @@ BOOL CAutoRepair::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoRepair::Read(char *line)
{
diff --git a/src/autorepair.h b/src/autorepair.h
index c29b21f..eda77be 100644
--- a/src/autorepair.h
+++ b/src/autorepair.h
@@ -1,4 +1,18 @@
-// autorepair.h
+// * 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 .
#ifndef _AUTOREPAIR_H_
#define _AUTOREPAIR_H_
@@ -15,9 +29,9 @@ class CObject;
enum AutoRepairPhase
{
- ARP_WAIT = 1, // attend métal
+ ARP_WAIT = 1, // attend m�tal
ARP_DOWN = 2, // descend le couvercle
- ARP_REPAIR = 3, // construit le véhicule
+ ARP_REPAIR = 3, // construit le v�hicule
ARP_UP = 4, // remonte le couvercle
};
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)
{
diff --git a/src/autoresearch.h b/src/autoresearch.h
index ec5f09d..364b388 100644
--- a/src/autoresearch.h
+++ b/src/autoresearch.h
@@ -1,4 +1,18 @@
-// autoresearch.h
+// * 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 .
#ifndef _AUTORESEARCH_H_
#define _AUTORESEARCH_H_
diff --git a/src/autoroot.cpp b/src/autoroot.cpp
index 5d65448..0078217 100644
--- a/src/autoroot.cpp
+++ b/src/autoroot.cpp
@@ -1,4 +1,18 @@
-// autoroot.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
@@ -42,7 +56,7 @@ CAutoRoot::~CAutoRoot()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoRoot::DeleteObject(BOOL bAll)
{
@@ -75,7 +89,7 @@ void CAutoRoot::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoRoot::EventProcess(const Event &event)
{
@@ -111,7 +125,7 @@ BOOL CAutoRoot::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 CAutoRoot::RetError()
{
diff --git a/src/autoroot.h b/src/autoroot.h
index 50ca034..fc0ebc8 100644
--- a/src/autoroot.h
+++ b/src/autoroot.h
@@ -1,4 +1,18 @@
-// autoroot.h
+// * 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 .
#ifndef _AUTOROOT_H_
#define _AUTOROOT_H_
diff --git a/src/autosafe.cpp b/src/autosafe.cpp
index e9c1959..b3d3b04 100644
--- a/src/autosafe.cpp
+++ b/src/autosafe.cpp
@@ -1,4 +1,18 @@
-// autosafe.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 OPEN_DELAY 8.0f // durée de l'ouverture
+#define OPEN_DELAY 8.0f // dur�e de l'ouverture
@@ -66,7 +80,7 @@ CAutoSafe::~CAutoSafe()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoSafe::DeleteObject(BOOL bAll)
{
@@ -110,7 +124,7 @@ void CAutoSafe::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoSafe::EventProcess(const Event &event)
{
@@ -127,7 +141,7 @@ BOOL CAutoSafe::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 )
{
@@ -153,7 +167,7 @@ BOOL CAutoSafe::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- count = CountKeys(); // compte les clés présentes
+ count = CountKeys(); // compte les cl�s pr�sentes
if ( count != m_countKeys )
{
m_countKeys = count;
@@ -164,7 +178,7 @@ BOOL CAutoSafe::EventProcess(const Event &event)
if ( count == 3 ) m_finalAngle = 15.0f*PI/180.0f;
if ( count == 4 ) m_finalAngle = 120.0f*PI/180.0f;
- if ( count == 4 ) // toutes les clés ?
+ if ( count == 4 ) // toutes les cl�s ?
{
LockKeys();
@@ -283,7 +297,7 @@ BOOL CAutoSafe::EventProcess(const Event &event)
m_object->SetAngleZ(2, -m_actualAngle);
}
- // Fait clignotter les clés.
+ // Fait clignotter les cl�s.
speed = D3DVECTOR(0.0f, 0.0f, 0.0f);
dim.x = 2.0f;
dim.y = dim.x;
@@ -312,7 +326,7 @@ BOOL CAutoSafe::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 CAutoSafe::CreateInterface(BOOL bSelect)
{
@@ -342,7 +356,7 @@ BOOL CAutoSafe::CreateInterface(BOOL bSelect)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoSafe::RetError()
{
@@ -354,7 +368,7 @@ Error CAutoSafe::RetError()
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoSafe::Write(char *line)
{
@@ -379,7 +393,7 @@ BOOL CAutoSafe::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoSafe::Read(char *line)
{
@@ -397,7 +411,7 @@ BOOL CAutoSafe::Read(char *line)
}
-// Compte le nombre de clés présentes.
+// Compte le nombre de cl�s pr�sentes.
int CAutoSafe::CountKeys()
{
@@ -462,7 +476,7 @@ int CAutoSafe::CountKeys()
angle = RotateAngle(oPos.x-cPos.x, oPos.z-cPos.z)+cAngle;
if ( !TestAngle(angle, limit-8.0f*PI/180.0f, limit+8.0f*PI/180.0f) ) continue;
- // Déplace la clé sur la forme du socle.
+ // D�place la cl� sur la forme du socle.
rot = RotatePoint(FPOINT(cPos.x, cPos.z), limit-cAngle, FPOINT(cPos.x+16.0f, cPos.z));
oPos.x = rot.x;
oPos.z = rot.y;
@@ -482,7 +496,7 @@ int CAutoSafe::CountKeys()
return i;
}
-// Bloque toutes les clés présentes.
+// Bloque toutes les cl�s pr�sentes.
void CAutoSafe::LockKeys()
{
@@ -515,7 +529,7 @@ void CAutoSafe::LockKeys()
}
}
-// Fait descendre toutes les clés présentes.
+// Fait descendre toutes les cl�s pr�sentes.
void CAutoSafe::DownKeys(float progress)
{
@@ -549,7 +563,7 @@ void CAutoSafe::DownKeys(float progress)
}
}
-// Supprime toutes les clés présentes.
+// Supprime toutes les cl�s pr�sentes.
void CAutoSafe::DeleteKeys()
{
@@ -590,7 +604,7 @@ void CAutoSafe::DeleteKeys()
while ( bDelete );
}
-// Cherche le véhicule dans le coffre-fort.
+// Cherche le v�hicule dans le coffre-fort.
CObject* CAutoSafe::SearchVehicle()
{
diff --git a/src/autosafe.h b/src/autosafe.h
index 66d5573..0041cdf 100644
--- a/src/autosafe.h
+++ b/src/autosafe.h
@@ -1,4 +1,18 @@
-// autosafe.h
+// * 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 .
#ifndef _AUTOSAFE_H_
#define _AUTOSAFE_H_
diff --git a/src/autostation.cpp b/src/autostation.cpp
index 3594eaf..e681748 100644
--- a/src/autostation.cpp
+++ b/src/autostation.cpp
@@ -1,4 +1,18 @@
-// autostation.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
@@ -48,7 +62,7 @@ CAutoStation::~CAutoStation()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoStation::DeleteObject(BOOL bAll)
{
@@ -77,7 +91,7 @@ void CAutoStation::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoStation::EventProcess(const Event &event)
{
@@ -96,7 +110,7 @@ BOOL CAutoStation::EventProcess(const Event &event)
m_timeVirus -= event.rTime;
- if ( m_object->RetVirusMode() ) // contaminé par un virus ?
+ if ( m_object->RetVirusMode() ) // contamin� par un virus ?
{
if ( !m_bLastVirus )
{
@@ -148,7 +162,7 @@ BOOL CAutoStation::EventProcess(const Event &event)
energy += add; // recharge la pile
power->SetEnergy(energy);
if ( energy < freq ) freq = energy;
- big -= add/4.0f; // décharge la grosse pile
+ big -= add/4.0f; // d�charge la grosse pile
}
power = vehicule->RetFret();
@@ -161,11 +175,11 @@ BOOL CAutoStation::EventProcess(const Event &event)
energy += add; // recharge la pile
power->SetEnergy(energy);
if ( energy < freq ) freq = energy;
- big -= add/4.0f; // décharge la grosse pile
+ big -= add/4.0f; // d�charge la grosse pile
}
}
}
- used -= big; // énergie utilisée
+ used -= big; // �nergie utilis�e
if ( freq < 1.0f ) // charge en cours ?
{
@@ -231,13 +245,13 @@ BOOL CAutoStation::EventProcess(const Event &event)
if ( big < 0.0f ) big = 0.0f;
if ( big > 1.0f ) big = 1.0f;
- m_object->SetEnergy(big); // màj la grosse pile
+ m_object->SetEnergy(big); // m�j la grosse pile
return TRUE;
}
-// Cherche le véhicule placé sur la station.
+// Cherche le v�hicule plac� sur la station.
CObject* CAutoStation::SearchVehicle()
{
@@ -292,7 +306,7 @@ CObject* CAutoStation::SearchVehicle()
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoStation::RetError()
{
@@ -310,7 +324,7 @@ Error CAutoStation::RetError()
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoStation::CreateInterface(BOOL bSelect)
{
@@ -345,8 +359,8 @@ BOOL CAutoStation::CreateInterface(BOOL bSelect)
return TRUE;
}
-// 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 CAutoStation::UpdateInterface(float rTime)
{
diff --git a/src/autostation.h b/src/autostation.h
index 9fd02b0..f2c0fc3 100644
--- a/src/autostation.h
+++ b/src/autostation.h
@@ -1,4 +1,18 @@
-// autostation.h
+// * 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 .
#ifndef _AUTOSTATION_H_
#define _AUTOSTATION_H_
diff --git a/src/autotower.cpp b/src/autotower.cpp
index 68a6e9e..d966bf1 100644
--- a/src/autotower.cpp
+++ b/src/autotower.cpp
@@ -1,4 +1,18 @@
-// autotower.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,8 +46,8 @@
-#define TOWER_SCOPE 200.0f // portée du rayon
-#define ENERGY_FIRE 0.125f // énergie consommée par tir
+#define TOWER_SCOPE 200.0f // port�e du rayon
+#define ENERGY_FIRE 0.125f // �nergie consomm�e par tir
// Constructeur de l'objet.
@@ -64,7 +78,7 @@ CAutoTower::~CAutoTower()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CAutoTower::DeleteObject(BOOL bAll)
{
@@ -88,7 +102,7 @@ void CAutoTower::Init()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CAutoTower::EventProcess(const Event &event)
{
@@ -104,7 +118,7 @@ BOOL CAutoTower::EventProcess(const Event &event)
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 )
{
@@ -153,7 +167,7 @@ BOOL CAutoTower::EventProcess(const Event &event)
if ( m_phase == ATP_SEARCH )
{
- FireStopUpdate(m_progress, FALSE); // éteint
+ FireStopUpdate(m_progress, FALSE); // �teint
if ( m_progress < 1.0f )
{
quick = 1.0f;
@@ -317,7 +331,7 @@ CObject* CAutoTower::SearchTarget(D3DVECTOR &impact)
}
-// Retourne une erreur liée à l'état de l'automate.
+// Retourne une erreur li�e � l'�tat de l'automate.
Error CAutoTower::RetError()
{
@@ -337,14 +351,14 @@ Error CAutoTower::RetError()
{
if ( power->RetEnergy() < ENERGY_FIRE )
{
- return ERR_TOWER_ENERGY; // plus assez d'énergie
+ return ERR_TOWER_ENERGY; // plus assez d'�nergie
}
}
return ERR_OK;
}
-// Met à jour les feux de stop.
+// Met � jour les feux de stop.
void CAutoTower::FireStopUpdate(float progress, BOOL bLightOn)
{
@@ -361,7 +375,7 @@ void CAutoTower::FireStopUpdate(float progress, BOOL bLightOn)
0.0f, -4.5f,
};
- if ( !bLightOn ) // éteint ?
+ if ( !bLightOn ) // �teint ?
{
for ( i=0 ; i<4 ; i++ )
{
@@ -407,7 +421,7 @@ void CAutoTower::FireStopUpdate(float progress, BOOL bLightOn)
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CAutoTower::CreateInterface(BOOL bSelect)
{
@@ -448,8 +462,8 @@ BOOL CAutoTower::CreateInterface(BOOL bSelect)
return TRUE;
}
-// 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 CAutoTower::UpdateInterface(float rTime)
{
@@ -482,7 +496,7 @@ void CAutoTower::UpdateInterface(float rTime)
}
-// Sauve tous les paramètres de l'automate.
+// Sauve tous les param�tres de l'automate.
BOOL CAutoTower::Write(char *line)
{
@@ -522,7 +536,7 @@ BOOL CAutoTower::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'automate.
+// Restitue tous les param�tres de l'automate.
BOOL CAutoTower::Read(char *line)
{
diff --git a/src/autotower.h b/src/autotower.h
index 6fe5032..7056a75 100644
--- a/src/autotower.h
+++ b/src/autotower.h
@@ -1,4 +1,18 @@
-// autotower.h
+// * 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 .
#ifndef _AUTOTOWER_H_
#define _AUTOTOWER_H_
@@ -18,7 +32,7 @@ enum ObjectType;
enum AutoTowerPhase
{
ATP_WAIT = 1,
- ATP_ZERO = 2, // plus d'énergie
+ ATP_ZERO = 2, // plus d'�nergie
ATP_SEARCH = 3, // cherche une cible
ATP_TURN = 4, // tourne vers la cible
ATP_FIRE = 5, // tire sur la cible
diff --git a/src/blitz.cpp b/src/blitz.cpp
index cef567e..a60f040 100644
--- a/src/blitz.cpp
+++ b/src/blitz.cpp
@@ -1,4 +1,18 @@
-// blitz.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
@@ -46,7 +60,7 @@ CBlitz::~CBlitz()
}
-// Supprime les éclairs.
+// Supprime les �clairs.
void CBlitz::Flush()
{
@@ -66,7 +80,7 @@ void CBlitz::Flush()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CBlitz::EventProcess(const Event &event)
{
@@ -77,7 +91,7 @@ BOOL CBlitz::EventProcess(const Event &event)
return TRUE;
}
-// Fait évoluer les éclairs.
+// Fait �voluer les �clairs.
BOOL CBlitz::EventFrame(const Event &event)
{
@@ -120,7 +134,7 @@ BOOL CBlitz::EventFrame(const Event &event)
type = pObj->RetType();
if ( type == OBJECT_BASE )
{
- m_pos.y += 120.0f; // sommet de la fusée
+ m_pos.y += 120.0f; // sommet de la fus�e
}
else if ( type == OBJECT_PARA )
{
@@ -192,7 +206,7 @@ BOOL CBlitz::EventFrame(const Event &event)
}
-// Dessine les éclairs.
+// Dessine les �clairs.
void CBlitz::Draw()
{
@@ -277,7 +291,7 @@ void CBlitz::Draw()
}
-// Enclanche les éclairs.
+// Enclanche les �clairs.
BOOL CBlitz::Create(float sleep, float delay, float magnetic)
{
@@ -310,7 +324,7 @@ BOOL CBlitz::Create(float sleep, float delay, float magnetic)
}
-// Donne l'état des éclairs.
+// Donne l'�tat des �clairs.
BOOL CBlitz::GetStatus(float &sleep, float &delay, float &magnetic, float &progress)
{
@@ -324,7 +338,7 @@ BOOL CBlitz::GetStatus(float &sleep, float &delay, float &magnetic, float &progr
return TRUE;
}
-// Spécifie l'état des éclairs.
+// Sp�cifie l'�tat des �clairs.
BOOL CBlitz::SetStatus(float sleep, float delay, float magnetic, float progress)
{
@@ -341,7 +355,7 @@ BOOL CBlitz::SetStatus(float sleep, float delay, float magnetic, float progress)
}
-// Cherche l'objet le plus proche de l'éclair.
+// Cherche l'objet le plus proche de l'�clair.
CObject* CBlitz::SearchObject(D3DVECTOR pos)
{
@@ -361,11 +375,11 @@ CObject* CBlitz::SearchObject(D3DVECTOR pos)
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // objet inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
type = pObj->RetType();
if ( type == OBJECT_BASE ||
- type == OBJECT_PARA ) // bâtiment à effet paratonnerre ?
+ type == OBJECT_PARA ) // b�timent � effet paratonnerre ?
{
pObjPara[nbPara] = pObj;
pPos[nbPara] = pObj->RetPosition(0);
@@ -439,7 +453,7 @@ CObject* CBlitz::SearchObject(D3DVECTOR pos)
pBest = pObj;
}
}
- if ( pBest == 0 ) return 0; // rien trouvé
+ if ( pBest == 0 ) return 0; // rien trouv�
// Sous la protection d'un paratonnerre ?
oPos = pBest->RetPosition(0);
diff --git a/src/blitz.h b/src/blitz.h
index df6e70e..68ee37f 100644
--- a/src/blitz.h
+++ b/src/blitz.h
@@ -1,4 +1,18 @@
-// blitz.h
+// * 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 .
#ifndef _BLITZ_H_
#define _BLITZ_H_
diff --git a/src/brain.cpp b/src/brain.cpp
index 5155eb2..0c6b117 100644
--- a/src/brain.cpp
+++ b/src/brain.cpp
@@ -1,4 +1,18 @@
-// brain.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
@@ -135,7 +149,7 @@ CBrain::~CBrain()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CBrain::DeleteObject(BOOL bAll)
{
@@ -156,7 +170,7 @@ void CBrain::DeleteObject(BOOL bAll)
}
}
- if ( m_studio != 0 ) // édition en cours ?
+ if ( m_studio != 0 ) // �dition en cours ?
{
StopEditScript(TRUE);
}
@@ -174,7 +188,7 @@ void CBrain::SetMotion(CMotion* motion)
}
-// Sauve tous les paramètres de l'objet.
+// Sauve tous les param�tres de l'objet.
BOOL CBrain::Write(char *line)
{
@@ -186,7 +200,7 @@ BOOL CBrain::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'objet.
+// Restitue tous les param�tres de l'objet.
BOOL CBrain::Read(char *line)
{
@@ -196,7 +210,7 @@ BOOL CBrain::Read(char *line)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CBrain::EventProcess(const Event &event)
{
@@ -210,12 +224,12 @@ BOOL CBrain::EventProcess(const Event &event)
type = m_object->RetType();
- if ( m_primaryTask != 0 ) // tâche en cours ?
+ if ( m_primaryTask != 0 ) // t�che en cours ?
{
m_primaryTask->EventProcess(event);
}
- if ( m_secondaryTask != 0 ) // tâche en cours ?
+ if ( m_secondaryTask != 0 ) // t�che en cours ?
{
m_secondaryTask->EventProcess(event);
}
@@ -257,8 +271,8 @@ BOOL CBrain::EventProcess(const Event &event)
EventFrame(event);
}
- if ( m_object->RetSelect() && // robot sélectionné ?
- m_studio != 0 ) // édition en cours ?
+ if ( m_object->RetSelect() && // robot s�lectionn� ?
+ m_studio != 0 ) // �dition en cours ?
{
m_studio->EventProcess(event);
@@ -295,16 +309,16 @@ BOOL CBrain::EventProcess(const Event &event)
return TRUE;
}
- if ( !m_object->RetSelect() && // robot pas sélectionné ?
+ if ( !m_object->RetSelect() && // robot pas s�lectionn� ?
m_program == -1 &&
m_primaryTask == 0 )
{
axeX = 0.0f;
axeY = 0.0f;
axeZ = 0.0f;
- if ( m_object->RetBurn() ) // brûle ?
+ if ( m_object->RetBurn() ) // br�le ?
{
- if ( !m_bBurn ) // début ?
+ if ( !m_bBurn ) // d�but ?
{
m_bBurn = TRUE;
m_burnTime = 0.0f;
@@ -317,7 +331,7 @@ BOOL CBrain::EventProcess(const Event &event)
type == OBJECT_SPIDER ||
type == OBJECT_WORM ) )
{
- axeY = 2.0f; // zig-zag désordonné rapide
+ axeY = 2.0f; // zig-zag d�sordonn� rapide
if ( type == OBJECT_WORM ) axeY = 5.0f;
axeX = 0.5f+sinf(m_time* 1.0f)*0.5f+
sinf(m_time* 6.0f)*2.0f+
@@ -341,19 +355,19 @@ BOOL CBrain::EventProcess(const Event &event)
return TRUE;
}
- if ( !m_object->RetSelect() ) // robot pas sélectionné ?
+ if ( !m_object->RetSelect() ) // robot pas s�lectionn� ?
{
return TRUE;
}
- if ( m_secondaryTask != 0 ) // tâche en cours ?
+ if ( m_secondaryTask != 0 ) // t�che en cours ?
{
if ( action == EVENT_OBJECT_ENDSHIELD )
{
m_secondaryTask->StartTaskShield(TSM_DOWN, 0.0f);
}
}
- if ( m_primaryTask != 0 || // tâche en cours ?
+ if ( m_primaryTask != 0 || // t�che en cours ?
m_program != -1 )
{
if ( action == EVENT_OBJECT_PROGRUN )
@@ -387,11 +401,11 @@ BOOL CBrain::EventProcess(const Event &event)
axeZ = event.axeZ;
if ( !m_main->RetTrainerPilot() &&
- m_object->RetTrainer() ) // véhicule d'entraînement ?
+ m_object->RetTrainer() ) // v�hicule d'entra�nement ?
{
axeX = 0.0f;
axeY = 0.0f;
- axeZ = 0.0f; // télécommande impossible !
+ axeZ = 0.0f; // t�l�commande impossible !
}
if ( m_buttonAxe == EVENT_OBJECT_LEFT ) axeX = -1.0f;
@@ -413,7 +427,7 @@ BOOL CBrain::EventProcess(const Event &event)
axeZ = -1.0f; // tombe
}
- axeX += m_camera->RetMotorTurn(); // force additionnelle selon caméra
+ axeX += m_camera->RetMotorTurn(); // force additionnelle selon cam�ra
if ( axeX > 1.0f ) axeX = 1.0f;
if ( axeX < -1.0f ) axeX = -1.0f;
@@ -740,7 +754,7 @@ BOOL CBrain::EventProcess(const Event &event)
}
-// Fait évoluer le cerveau selon le temps écoulé.
+// Fait �voluer le cerveau selon le temps �coul�.
BOOL CBrain::EventFrame(const Event &event)
{
@@ -752,7 +766,7 @@ BOOL CBrain::EventFrame(const Event &event)
m_sound->Position(m_soundChannelAlarm, m_object->RetPosition(0));
}
- if ( m_studio != 0 ) // édition en cours ?
+ if ( m_studio != 0 ) // �dition en cours ?
{
m_studio->EventProcess(event);
}
@@ -810,21 +824,21 @@ void CBrain::StopProgram()
m_object->CreateSelectParticule();
}
-// Stoppe la tâche en cours.
+// Stoppe la t�che en cours.
void CBrain::StopTask()
{
if ( m_primaryTask != 0 )
{
m_primaryTask->Abort();
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
}
// Introduit un virus dans un programme.
-// Retourne TRUE s'il a été introduit.
+// Retourne TRUE s'il a �t� introduit.
BOOL CBrain::IntroduceVirus()
{
@@ -845,16 +859,16 @@ BOOL CBrain::IntroduceVirus()
return FALSE;
}
-// ActiveVirus indique que l'objet est contaminé. Contrairement aux
-// chtites lettres qui disparaissent automatiquement après un certain
-// temps, ActiveVirus ne disparaît qu'après avoir édité le programme
-// (même si le virus n'est pas corrigé).
+// ActiveVirus indique que l'objet est contamin�. Contrairement aux
+// chtites lettres qui disparaissent automatiquement apr�s un certain
+// temps, ActiveVirus ne dispara�t qu'apr�s avoir �dit� le programme
+// (m�me si le virus n'est pas corrig�).
void CBrain::SetActiveVirus(BOOL bActive)
{
m_bActiveVirus = bActive;
- if ( !m_bActiveVirus ) // virus désactivé ?
+ if ( !m_bActiveVirus ) // virus d�sactiv� ?
{
m_object->SetVirusMode(FALSE); // chtites lettres aussi
}
@@ -866,7 +880,7 @@ BOOL CBrain::RetActiveVirus()
}
-// Début de l'édition d'un programme.
+// D�but de l'�dition d'un programme.
void CBrain::StartEditScript(int rank, char* name)
{
@@ -881,7 +895,7 @@ void CBrain::StartEditScript(int rank, char* name)
m_studio->StartEditScript(m_script[rank], name, rank);
}
-// Fin de l'édition d'un programme.
+// Fin de l'�dition d'un programme.
void CBrain::StopEditScript(BOOL bCancel)
{
@@ -905,7 +919,7 @@ Error CBrain::StartTaskTake()
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -923,7 +937,7 @@ Error CBrain::StartTaskManip(TaskManipOrder order, TaskManipArm arm)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -933,7 +947,7 @@ Error CBrain::StartTaskManip(TaskManipOrder order, TaskManipArm arm)
return err;
}
-// Met ou enlève un drapeau.
+// Met ou enl�ve un drapeau.
Error CBrain::StartTaskFlag(TaskFlagOrder order, int rank)
{
@@ -941,7 +955,7 @@ Error CBrain::StartTaskFlag(TaskFlagOrder order, int rank)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -959,7 +973,7 @@ Error CBrain::StartTaskBuild(ObjectType type)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -977,7 +991,7 @@ Error CBrain::StartTaskSearch()
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -995,7 +1009,7 @@ Error CBrain::StartTaskTerraform()
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1017,7 +1031,7 @@ Error CBrain::StartTaskPen(BOOL bDown, int color)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1027,7 +1041,7 @@ Error CBrain::StartTaskPen(BOOL bDown, int color)
return err;
}
-// Récupère une ruine.
+// R�cup�re une ruine.
Error CBrain::StartTaskRecover()
{
@@ -1035,7 +1049,7 @@ Error CBrain::StartTaskRecover()
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1045,7 +1059,7 @@ Error CBrain::StartTaskRecover()
return err;
}
-// Déploie le bouclier.
+// D�ploie le bouclier.
Error CBrain::StartTaskShield(TaskShieldMode mode)
{
@@ -1053,7 +1067,7 @@ Error CBrain::StartTaskShield(TaskShieldMode mode)
if ( m_secondaryTask != 0 )
{
- delete m_secondaryTask; // stoppe la tâche en cours
+ delete m_secondaryTask; // stoppe la t�che en cours
m_secondaryTask = 0;
}
@@ -1071,7 +1085,7 @@ Error CBrain::StartTaskFire(float delay)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1089,7 +1103,7 @@ Error CBrain::StartTaskFireAnt(D3DVECTOR impact)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1107,7 +1121,7 @@ Error CBrain::StartTaskGunGoal(float dirV, float dirH)
if ( m_secondaryTask != 0 )
{
- delete m_secondaryTask; // stoppe la tâche en cours
+ delete m_secondaryTask; // stoppe la t�che en cours
m_secondaryTask = 0;
}
@@ -1125,7 +1139,7 @@ Error CBrain::StartTaskReset(D3DVECTOR goal, D3DVECTOR angle)
if ( m_primaryTask != 0 )
{
- delete m_primaryTask; // stoppe la tâche en cours
+ delete m_primaryTask; // stoppe la t�che en cours
m_primaryTask = 0;
}
@@ -1135,16 +1149,16 @@ Error CBrain::StartTaskReset(D3DVECTOR goal, D3DVECTOR angle)
return err;
}
-// Termine la tâche lorsque le moment est venu.
+// Termine la t�che lorsque le moment est venu.
Error CBrain::EndedTask()
{
Error err;
- if ( m_secondaryTask != 0 ) // tâche en cours ?
+ if ( m_secondaryTask != 0 ) // t�che en cours ?
{
err = m_secondaryTask->IsEnded();
- if ( err != ERR_CONTINUE ) // tâche terminée ?
+ if ( err != ERR_CONTINUE ) // t�che termin�e ?
{
delete m_secondaryTask;
m_secondaryTask = 0;
@@ -1152,10 +1166,10 @@ Error CBrain::EndedTask()
}
}
- if ( m_primaryTask != 0 ) // tâche en cours ?
+ if ( m_primaryTask != 0 ) // t�che en cours ?
{
err = m_primaryTask->IsEnded();
- if ( err != ERR_CONTINUE ) // tâche terminée ?
+ if ( err != ERR_CONTINUE ) // t�che termin�e ?
{
delete m_primaryTask;
m_primaryTask = 0;
@@ -1208,7 +1222,7 @@ void CBrain::ColorFlag(int color)
}
-// Crée toute l'interface lorsque l'objet est sélectionné.
+// Cr�e toute l'interface lorsque l'objet est s�lectionn�.
BOOL CBrain::CreateInterface(BOOL bSelect)
{
@@ -1226,8 +1240,8 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
if ( pw != 0 )
{
- pw->Flush(); // détruit les boutons de la fenêtre
- m_interface->DeleteControl(EVENT_WINDOW0); // détruit la fenêtre
+ pw->Flush(); // d�truit les boutons de la fen�tre
+ m_interface->DeleteControl(EVENT_WINDOW0); // d�truit la fen�tre
}
m_defaultEnter = EVENT_NULL;
@@ -1290,7 +1304,7 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
type == OBJECT_ANT ||
type == OBJECT_SPIDER ||
type == OBJECT_BEE ||
- type == OBJECT_WORM ) // véhicule ?
+ type == OBJECT_WORM ) // v�hicule ?
{
ddim.x = dim.x*5.1f;
ddim.y = dim.y*2.0f;
@@ -1525,7 +1539,7 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
pw->CreateButton(pos, dim, 41, EVENT_OBJECT_LIMIT);
}
- if ( type == OBJECT_MOBILErr && // récupérateur ?
+ if ( type == OBJECT_MOBILErr && // r�cup�rateur ?
!m_object->RetTrainer() )
{
pos.x = ox+sx*7.7f;
@@ -1756,7 +1770,7 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
#if _TEEN
pw->CreateButton(pos, dim, 9, EVENT_OBJECT_RESET);
#else
- if ( m_object->RetTrainer() ) // entraînement ?
+ if ( m_object->RetTrainer() ) // entra�nement ?
{
pw->CreateButton(pos, dim, 9, EVENT_OBJECT_RESET);
}
@@ -1790,7 +1804,7 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
type == OBJECT_MOBILEft ||
type == OBJECT_MOBILEtt ||
type == OBJECT_MOBILEwt ||
- type == OBJECT_MOBILEit ) // véhicule ?
+ type == OBJECT_MOBILEit ) // v�hicule ?
{
pos.x = ox+sx*14.5f;
pos.y = oy+sy*0;
@@ -1826,7 +1840,7 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
type == OBJECT_MOBILEft ||
type == OBJECT_MOBILEtt ||
type == OBJECT_MOBILEwt ||
- type == OBJECT_MOBILEit ) // véhicule ?
+ type == OBJECT_MOBILEit ) // v�hicule ?
{
pos.x = ox+sx*14.9f;
pos.y = oy+sy*0;
@@ -1907,8 +1921,8 @@ BOOL CBrain::CreateInterface(BOOL bSelect)
return TRUE;
}
-// 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 CBrain::UpdateInterface(float rTime)
{
@@ -2111,7 +2125,7 @@ void CBrain::UpdateInterface(float rTime)
}
}
-// Met à jour l'état de tous les boutons de l'interface.
+// Met � jour l'�tat de tous les boutons de l'interface.
void CBrain::UpdateInterface()
{
@@ -2235,7 +2249,7 @@ void CBrain::UpdateInterface()
}
EnableInterface(pw, EVENT_OBJECT_GASUP, bFly);
EnableInterface(pw, EVENT_OBJECT_GASDOWN, bFly);
- if ( m_object->RetTrainer() ) // entraînement ?
+ if ( m_object->RetTrainer() ) // entra�nement ?
{
DeadInterface(pw, EVENT_OBJECT_GASUP, FALSE);
DeadInterface(pw, EVENT_OBJECT_GASDOWN, FALSE);
@@ -2279,7 +2293,7 @@ void CBrain::UpdateInterface()
type == OBJECT_ANT ||
type == OBJECT_SPIDER ||
type == OBJECT_BEE ||
- type == OBJECT_WORM ) // véhicule ?
+ type == OBJECT_WORM ) // v�hicule ?
{
bRun = FALSE;
if ( m_script[m_selScript] != 0 )
@@ -2306,7 +2320,7 @@ void CBrain::UpdateInterface()
//? pb->SetIcon(m_program==-1?22:40); // edit/debug
//? }
- BlinkScript(m_program != -1); // clignotte si script en exécution
+ BlinkScript(m_program != -1); // clignotte si script en ex�cution
}
if ( type == OBJECT_MOBILEfa ||
@@ -2422,7 +2436,7 @@ void CBrain::UpdateInterface()
#endif
}
-// Met à jour la liste des programmes.
+// Met � jour la liste des programmes.
void CBrain::UpdateScript(CWindow *pw)
{
@@ -2470,7 +2484,7 @@ void CBrain::UpdateScript(CWindow *pw)
pl->ShowSelect(TRUE);
}
-// Retourne le rang du script sélectionné.
+// Retourne le rang du script s�lectionn�.
int CBrain::RetSelScript()
{
@@ -2486,14 +2500,14 @@ int CBrain::RetSelScript()
return pl->RetSelect();
}
-// Fait clignotter le programme en exécution.
+// Fait clignotter le programme en ex�cution.
void CBrain::BlinkScript(BOOL bEnable)
{
CWindow* pw;
CList* pl;
- if ( !m_object->RetSelect() ) return; // robot pas sélectionné ?
+ if ( !m_object->RetSelect() ) return; // robot pas s�lectionn� ?
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
if ( pw == 0 ) return;
@@ -2504,7 +2518,7 @@ void CBrain::BlinkScript(BOOL bEnable)
pl->SetBlink(bEnable);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CBrain::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -2516,7 +2530,7 @@ void CBrain::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_CHECK, bState);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CBrain::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -2528,7 +2542,7 @@ void CBrain::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_ENABLE, bState);
}
-// Modifie l'état d'un bouton de l'interface.
+// Modifie l'�tat d'un bouton de l'interface.
void CBrain::DeadInterface(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -2540,7 +2554,7 @@ void CBrain::DeadInterface(CWindow *pw, EventMsg event, BOOL bState)
control->SetState(STATE_DEAD, !bState);
}
-// Modifie l'état d'entrée par défaut d'un bouton de l'onterface.
+// Modifie l'�tat d'entr�e par d�faut d'un bouton de l'onterface.
void CBrain::DefaultEnter(CWindow *pw, EventMsg event, BOOL bState)
{
@@ -2561,14 +2575,14 @@ void CBrain::DefaultEnter(CWindow *pw, EventMsg event, BOOL bState)
}
-// Indique si l'objet est occupé dans une tâche.
+// Indique si l'objet est occup� dans une t�che.
BOOL CBrain::IsBusy()
{
return (m_primaryTask != 0);
}
-// Gestion de l'activité d'un objet.
+// Gestion de l'activit� d'un objet.
void CBrain::SetActivity(BOOL bMode)
{
@@ -2580,7 +2594,7 @@ BOOL CBrain::RetActivity()
return m_bActivity;
}
-// Indique si un programme est en cours d'exécution.
+// Indique si un programme est en cours d'ex�cution.
BOOL CBrain::IsProgram()
{
@@ -2594,7 +2608,7 @@ BOOL CBrain::ProgramExist(int rank)
return ( m_script[rank] != 0 );
}
-// Démarre un programme donné.
+// D�marre un programme donn�.
void CBrain::RunProgram(int rank)
{
@@ -2603,7 +2617,7 @@ void CBrain::RunProgram(int rank)
if ( m_script[rank] != 0 &&
m_script[rank]->Run() )
{
- m_program = rank; // démarre nouveau programme
+ m_program = rank; // d�marre nouveau programme
BlinkScript(TRUE); // clignotte
m_object->CreateSelectParticule();
m_main->UpdateShortcuts();
@@ -2632,7 +2646,7 @@ int CBrain::RetProgram()
}
-// Gestion du nom des scripts à charger.
+// Gestion du nom des scripts � charger.
void CBrain::SetScriptRun(int rank)
{
@@ -2666,7 +2680,7 @@ char* CBrain::RetSoluceName()
// Charge un script solution, dans le premier script libre.
-// S'il existe déjà un script identique, rien n'est chargé.
+// S'il existe d�j� un script identique, rien n'est charg�.
BOOL CBrain::ReadSoluce(char* filename)
{
@@ -2681,7 +2695,7 @@ BOOL CBrain::ReadSoluce(char* filename)
{
if ( i == rank || m_script[i] == 0 ) continue;
- if ( m_script[i]->Compare(m_script[rank]) ) // déjà un même ?
+ if ( m_script[i]->Compare(m_script[rank]) ) // d�j� un m�me ?
{
delete m_script[rank];
m_script[rank] = 0;
@@ -2709,7 +2723,7 @@ BOOL CBrain::ReadProgram(int rank, char* filename)
return FALSE;
}
-// Indique si un programme est correctement compilé.
+// Indique si un programme est correctement compil�.
BOOL CBrain::RetCompile(int rank)
{
@@ -2735,7 +2749,7 @@ BOOL CBrain::WriteProgram(int rank, char* filename)
}
-// Charge un stack de script en exécution avec un fichier.
+// Charge un stack de script en ex�cution avec un fichier.
BOOL CBrain::ReadStack(FILE *file)
{
@@ -2747,7 +2761,7 @@ BOOL CBrain::ReadStack(FILE *file)
fRead(&op, sizeof(short), 1, file); // program rank
if ( op >= 0 && op < BRAINMAXSCRIPT )
{
- m_program = op; // redémarre programme
+ m_program = op; // red�marre programme
m_selScript = op;
BlinkScript(TRUE); // clignotte
@@ -2762,7 +2776,7 @@ BOOL CBrain::ReadStack(FILE *file)
return TRUE;
}
-// Sauve le stack du script en exécution dans un fichier.
+// Sauve le stack du script en ex�cution dans un fichier.
BOOL CBrain::WriteStack(FILE *file)
{
@@ -2787,7 +2801,7 @@ BOOL CBrain::WriteStack(FILE *file)
-// Début de l'enregistrement du dessin.
+// D�but de l'enregistrement du dessin.
void CBrain::TraceRecordStart()
{
@@ -2796,11 +2810,11 @@ void CBrain::TraceRecordStart()
m_tracePos = m_object->RetPosition(0);
m_traceAngle = m_object->RetAngleY(0);
- if ( m_object->RetTraceDown() ) // crayon baissé ?
+ if ( m_object->RetTraceDown() ) // crayon baiss� ?
{
m_traceColor = m_object->RetTraceColor();
}
- else // crayon levé ?
+ else // crayon lev� ?
{
m_traceColor = -1;
}
@@ -2826,11 +2840,11 @@ void CBrain::TraceRecordFrame()
speed = m_physics->RetCirMotionY(MO_REASPEED);
if ( speed != 0.0f ) oper = TO_TURN;
- if ( m_object->RetTraceDown() ) // crayon baissé ?
+ if ( m_object->RetTraceDown() ) // crayon baiss� ?
{
color = m_object->RetTraceColor();
}
- else // crayon levé ?
+ else // crayon lev� ?
{
color = -1;
}
@@ -2863,7 +2877,7 @@ void CBrain::TraceRecordFrame()
}
}
-// Fin de l'enregistrement du dessin. Génère le programme CBOT.
+// Fin de l'enregistrement du dessin. G�n�re le programme CBOT.
void CBrain::TraceRecordStop()
{
@@ -2937,7 +2951,7 @@ BOOL CBrain::TraceRecordOper(TraceOper oper, float param)
return TRUE;
}
-// Génère une instruction CBOT.
+// G�n�re une instruction CBOT.
BOOL CBrain::TraceRecordPut(char *buffer, int max, TraceOper oper, float param)
{
diff --git a/src/brain.h b/src/brain.h
index 071c4b1..683f1f0 100644
--- a/src/brain.h
+++ b/src/brain.h
@@ -1,4 +1,18 @@
-// brain.h
+// * 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 .
#ifndef _BRAIN_H_
#define _BRAIN_H_
@@ -35,7 +49,7 @@ enum TaskShieldMode;
enum TraceOper
{
- TO_STOP = 0, // arrêt
+ TO_STOP = 0, // arr�t
TO_ADVANCE = 1, // avance
TO_RECEDE = 2, // recule
TO_TURN = 3, // tourne
@@ -159,8 +173,8 @@ protected:
CTaskManager* m_secondaryTask;
CScript* m_script[BRAINMAXSCRIPT];
- int m_selScript; // rang du script sélectionné
- int m_program; // rang du programme exécuté / -1
+ int m_selScript; // rang du script s�lectionn�
+ int m_program; // rang du programme ex�cut� / -1
BOOL m_bActivity;
BOOL m_bBurn;
BOOL m_bActiveVirus;
diff --git a/src/button.cpp b/src/button.cpp
index 9e57eea..e747315 100644
--- a/src/button.cpp
+++ b/src/button.cpp
@@ -1,4 +1,18 @@
-// button.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
@@ -44,7 +58,7 @@ CButton::~CButton()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CButton::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -67,7 +81,7 @@ BOOL CButton::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CButton::EventProcess(const Event &event)
{
@@ -208,8 +222,8 @@ void CButton::Draw()
}
-// Gestion du mode immédiat, qui envoie l'événement "pressé"
-// avant que le bouton de la souris soit relâché.
+// Gestion du mode imm�diat, qui envoie l'�v�nement "press�"
+// avant que le bouton de la souris soit rel�ch�.
void CButton::SetImmediat(BOOL bImmediat)
{
@@ -222,8 +236,8 @@ BOOL CButton::RetImmediat()
}
-// Gestion du mode "répétition automatique", lorsque le bouton
-// de la souris est maintenu pressé.
+// Gestion du mode "r�p�tition automatique", lorsque le bouton
+// de la souris est maintenu press�.
void CButton::SetRepeat(BOOL bRepeat)
{
diff --git a/src/button.h b/src/button.h
index 1e6ef90..d4aac4d 100644
--- a/src/button.h
+++ b/src/button.h
@@ -1,4 +1,18 @@
-// button.h
+// * 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 .
#ifndef _BUTTON_H_
#define _BUTTON_H_
diff --git a/src/camera.cpp b/src/camera.cpp
index 21371dc..1318b84 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -1,4 +1,18 @@
-// camera.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
@@ -152,7 +166,7 @@ float CCamera::RetMotorTurn()
-// Initialise la caméra.
+// Initialise la cam�ra.
void CCamera::Init(D3DVECTOR eye, D3DVECTOR lookat, float delay)
{
@@ -195,7 +209,7 @@ void CCamera::Init(D3DVECTOR eye, D3DVECTOR lookat, float delay)
}
-// Donne l'objet pilotant la caméra.
+// Donne l'objet pilotant la cam�ra.
void CCamera::SetObject(CObject* object)
{
@@ -209,7 +223,7 @@ CObject* CCamera::RetObject()
// Modifie le niveau de transparence d'un objet et des objets
-// transportés (pile & fret).
+// transport�s (pile & fret).
void SetTransparency(CObject* pObj, float value)
{
@@ -230,7 +244,7 @@ void SetTransparency(CObject* pObj, float value)
}
}
-// Modifie le type de la caméra.
+// Modifie le type de la cam�ra.
void CCamera::SetType(CameraType type)
{
@@ -311,7 +325,7 @@ void CCamera::SetType(CameraType type)
if ( type == CAMERA_FIX ||
type == CAMERA_PLANE )
{
- AbortCentering(); // stoppe cadrage spécial
+ AbortCentering(); // stoppe cadrage sp�cial
}
m_fixDist = 50.0f;
@@ -322,7 +336,7 @@ void CCamera::SetType(CameraType type)
if ( type == CAMERA_BACK )
{
- AbortCentering(); // stoppe cadrage spécial
+ AbortCentering(); // stoppe cadrage sp�cial
m_addDirectionH = 0.0f;
m_addDirectionV = -PI*0.05f;
@@ -420,7 +434,7 @@ float CCamera::RetFixDirection()
}
-// Gestion de la télécommande panoramique de la caméra.
+// Gestion de la t�l�commande panoramique de la cam�ra.
void CCamera::SetRemotePan(float value)
{
@@ -432,7 +446,7 @@ float CCamera::RetRemotePan()
return m_remotePan;
}
-// Gestion de la télécommande zoom (0..1) de la caméra.
+// Gestion de la t�l�commande zoom (0..1) de la cam�ra.
void CCamera::SetRemoteZoom(float value)
{
@@ -467,7 +481,7 @@ float CCamera::RetRemoteZoom()
-// Début d'une visite circulaire avec la caméra.
+// D�but d'une visite circulaire avec la cam�ra.
void CCamera::StartVisit(D3DVECTOR goal, float dist)
{
@@ -480,7 +494,7 @@ void CCamera::StartVisit(D3DVECTOR goal, float dist)
m_visitDirectionV = -PI*0.10f;
}
-// Fin d'une visite circulaire avec la caméra.
+// Fin d'une visite circulaire avec la cam�ra.
void CCamera::StopVisit()
{
@@ -488,7 +502,7 @@ void CCamera::StopVisit()
}
-// Retourne le point de vue de la caméra.
+// Retourne le point de vue de la cam�ra.
void CCamera::RetCamera(D3DVECTOR &eye, D3DVECTOR &lookat)
{
@@ -497,7 +511,7 @@ void CCamera::RetCamera(D3DVECTOR &eye, D3DVECTOR &lookat)
}
-// Spécifie un mouvement spécial de caméra pour cadrer une action.
+// Sp�cifie un mouvement sp�cial de cam�ra pour cadrer une action.
BOOL CCamera::StartCentering(CObject *object, float angleH, float angleV,
float dist, float time)
@@ -524,7 +538,7 @@ BOOL CCamera::StartCentering(CObject *object, float angleH, float angleV,
return TRUE;
}
-// Termine un mouvement spécial de caméra pour cadrer une action.
+// Termine un mouvement sp�cial de cam�ra pour cadrer une action.
BOOL CCamera::StopCentering(CObject *object, float time)
{
@@ -551,7 +565,7 @@ BOOL CCamera::StopCentering(CObject *object, float time)
return TRUE;
}
-// Stoppe le cadrage spécial dans la position actuelle.
+// Stoppe le cadrage sp�cial dans la position actuelle.
void CCamera::AbortCentering()
{
@@ -574,7 +588,7 @@ void CCamera::AbortCentering()
-// Supprime l'effet spécial avec la caméra.
+// Supprime l'effet sp�cial avec la cam�ra.
void CCamera::FlushEffect()
{
@@ -584,7 +598,7 @@ void CCamera::FlushEffect()
m_effectOffset = D3DVECTOR(0.0f, 0.0f, 0.0f);
}
-// Démarre un effet spécial avec la caméra.
+// D�marre un effet sp�cial avec la cam�ra.
void CCamera::StartEffect(CameraEffect effect, D3DVECTOR pos, float force)
{
@@ -596,7 +610,7 @@ void CCamera::StartEffect(CameraEffect effect, D3DVECTOR pos, float force)
m_effectProgress = 0.0f;
}
-// Fait progresser l'effet de la caméra.
+// Fait progresser l'effet de la cam�ra.
void CCamera::EffectFrame(const Event &event)
{
@@ -692,14 +706,14 @@ void CCamera::FlushOver()
m_engine->SetOverColor(); // rien
}
-// Spécifie la couleur de base.
+// Sp�cifie la couleur de base.
void CCamera::SetOverBaseColor(D3DCOLORVALUE color)
{
m_overColorBase = color;
}
-// Démarre un effet de superposition au premier plan.
+// D�marre un effet de superposition au premier plan.
void CCamera::StartOver(OverEffect effect, D3DVECTOR pos, float force)
{
@@ -872,7 +886,7 @@ void CCamera::OverFrame(const Event &event)
-// Fixe le mouvement mou de la caméra.
+// Fixe le mouvement mou de la cam�ra.
void CCamera::FixCamera()
{
@@ -882,7 +896,7 @@ void CCamera::FixCamera()
SetViewTime(m_scriptEye, m_scriptLookat, 0.0f);
}
-// Spécifie l'emplacement et la direction du point de vue au moteur 3D.
+// Sp�cifie l'emplacement et la direction du point de vue au moteur 3D.
void CCamera::SetViewTime(const D3DVECTOR &vEyePt,
const D3DVECTOR &vLookatPt,
@@ -998,7 +1012,7 @@ BOOL CCamera::IsCollisionBack(D3DVECTOR &eye, D3DVECTOR lookat)
max.y = Max(eye.y, lookat.y);
max.z = Max(eye.z, lookat.z);
- prox = 8.0f; // proximité maximale du véhicule
+ prox = 8.0f; // proximit� maximale du v�hicule
for ( i=0 ; i<1000000 ; i++ )
{
@@ -1115,7 +1129,7 @@ BOOL CCamera::IsCollisionBack(D3DVECTOR &eye, D3DVECTOR lookat)
if ( pObj == m_cameraObj ) continue;
- if ( iType == OBJECT_BASE || // bâtiment ?
+ if ( iType == OBJECT_BASE || // b�timent ?
iType == OBJECT_DERRICK ||
iType == OBJECT_FACTORY ||
iType == OBJECT_STATION ||
@@ -1232,7 +1246,7 @@ BOOL CCamera::IsCollisionFix(D3DVECTOR &eye, D3DVECTOR lookat)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CCamera::EventProcess(const Event &event)
{
@@ -1272,7 +1286,7 @@ BOOL CCamera::EventProcess(const Event &event)
return TRUE;
}
-// Fait évoluer la caméra selon la souris déplacée.
+// Fait �voluer la cam�ra selon la souris d�plac�e.
BOOL CCamera::EventMouseMove(const Event &event)
{
@@ -1280,7 +1294,7 @@ BOOL CCamera::EventMouseMove(const Event &event)
return TRUE;
}
-// Molette souris actionnée.
+// Molette souris actionn�e.
void CCamera::EventMouseWheel(int dir)
{
@@ -1328,7 +1342,7 @@ void CCamera::EventMouseWheel(int dir)
}
}
-// Fait évoluer la caméra selon le temps écoulé.
+// Fait �voluer la cam�ra selon le temps �coul�.
BOOL CCamera::EventFrame(const Event &event)
{
@@ -1381,7 +1395,7 @@ BOOL CCamera::EventFrame(const Event &event)
}
-// Retourne le sprite par défaut à utiliser pour la souris.
+// Retourne le sprite par d�faut � utiliser pour la souris.
D3DMouse CCamera::RetMouseDef(FPOINT pos)
{
@@ -1392,7 +1406,7 @@ D3DMouse CCamera::RetMouseDef(FPOINT pos)
if ( m_type == CAMERA_INFO ) return type;
- if ( m_bRightDown ) // bouton droite pressé ?
+ if ( m_bRightDown ) // bouton droite press� ?
{
m_rightPosMove.x = pos.x - m_rightPosCenter.x;
m_rightPosMove.y = pos.y - m_rightPosCenter.y;
@@ -1466,7 +1480,7 @@ D3DMouse CCamera::RetMouseDef(FPOINT pos)
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameFree(const Event &event)
{
@@ -1550,7 +1564,7 @@ BOOL CCamera::EventFrameFree(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameEdit(const Event &event)
{
@@ -1610,14 +1624,14 @@ BOOL CCamera::EventFrameEdit(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameDialog(const Event &event)
{
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameBack(const Event &event)
{
@@ -1694,10 +1708,10 @@ BOOL CCamera::EventFrameBack(const Event &event)
if ( m_mouseDirH != 0 || m_mouseDirV != 0 )
{
- AbortCentering(); // stoppe cadrage spécial
+ AbortCentering(); // stoppe cadrage sp�cial
}
- // Progression du cadrage spécial.
+ // Progression du cadrage sp�cial.
centeringH = 0.0f;
centeringV = 0.0f;
centeringD = 0.0f;
@@ -1747,7 +1761,7 @@ BOOL CCamera::EventFrameBack(const Event &event)
else if ( type == OBJECT_TECH ) vLookatPt.y += 1.0f;
else vLookatPt.y += 4.0f;
- h = -m_cameraObj->RetAngleY(0); // angle véhicule/batiment
+ h = -m_cameraObj->RetAngleY(0); // angle v�hicule/batiment
if ( type == OBJECT_DERRICK ||
type == OBJECT_FACTORY ||
@@ -1770,7 +1784,7 @@ BOOL CCamera::EventFrameBack(const Event &event)
{
h += PI*0.20f; // presque de face
}
- else // véhicule ?
+ else // v�hicule ?
{
h += PI; // de dos
}
@@ -1783,7 +1797,7 @@ BOOL CCamera::EventFrameBack(const Event &event)
if ( type == OBJECT_MOBILEdr ) // dessinateur ?
{
- v -= 0.3f; // caméra plus haute
+ v -= 0.3f; // cam�ra plus haute
}
v += m_centeringCurrentV;
@@ -1820,7 +1834,7 @@ BOOL CCamera::EventFrameBack(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameFix(const Event &event)
{
@@ -1853,7 +1867,7 @@ BOOL CCamera::EventFrameFix(const Event &event)
if ( m_mouseDirH != 0 || m_mouseDirV != 0 )
{
- AbortCentering(); // stoppe cadrage spécial
+ AbortCentering(); // stoppe cadrage sp�cial
}
if ( m_cameraObj != 0 )
@@ -1880,7 +1894,7 @@ BOOL CCamera::EventFrameFix(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameExplo(const Event &event)
{
@@ -1924,7 +1938,7 @@ BOOL CCamera::EventFrameExplo(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameOnBoard(const Event &event)
{
@@ -1944,7 +1958,7 @@ BOOL CCamera::EventFrameOnBoard(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameInfo(const Event &event)
{
@@ -1954,7 +1968,7 @@ BOOL CCamera::EventFrameInfo(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameVisit(const Event &event)
{
@@ -2004,7 +2018,7 @@ BOOL CCamera::EventFrameVisit(const Event &event)
return TRUE;
}
-// Déplace le point de vue.
+// D�place le point de vue.
BOOL CCamera::EventFrameScript(const Event &event)
{
@@ -2024,7 +2038,7 @@ void CCamera::SetScriptLookat(D3DVECTOR lookat)
}
-// Spécifie l'emplacement et la direction du point de vue.
+// Sp�cifie l'emplacement et la direction du point de vue.
void CCamera::SetViewParams(const D3DVECTOR &eye, const D3DVECTOR &lookat,
const D3DVECTOR &up)
@@ -2039,7 +2053,7 @@ void CCamera::SetViewParams(const D3DVECTOR &eye, const D3DVECTOR &lookat,
}
-// Adapte la caméra pour ne pas entrer dans le terrain.
+// Adapte la cam�ra pour ne pas entrer dans le terrain.
D3DVECTOR CCamera::ExcludeTerrain(D3DVECTOR eye, D3DVECTOR lookat,
float &angleH, float &angleV)
@@ -2061,7 +2075,7 @@ D3DVECTOR CCamera::ExcludeTerrain(D3DVECTOR eye, D3DVECTOR lookat,
return eye;
}
-// Adapte la caméra pour ne pas pénétrer dans un objet.
+// Adapte la cam�ra pour ne pas p�n�trer dans un objet.
D3DVECTOR CCamera::ExcludeObject(D3DVECTOR eye, D3DVECTOR lookat,
float &angleH, float &angleV)
diff --git a/src/camera.h b/src/camera.h
index 1f2c41c..8af3934 100644
--- a/src/camera.h
+++ b/src/camera.h
@@ -1,4 +1,18 @@
-// camera.h
+// * 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 .
#ifndef _CAMERA_H_
#define _CAMERA_H_
@@ -14,18 +28,18 @@ enum D3DMouse;
enum CameraType
{
- CAMERA_NULL = 0, // caméra indéfinie
- CAMERA_FREE = 1, // caméra libre (jamais en principe)
- CAMERA_EDIT = 2, // caméra pendant l'édition d'un programme
- CAMERA_ONBOARD = 3, // caméra à bord d'un robot
- CAMERA_BACK = 4, // caméra derrière un robot
- CAMERA_FIX = 5, // caméra fixe après robot
- CAMERA_EXPLO = 6, // caméra immobile après explosion
- CAMERA_SCRIPT = 7, // caméra pendant un film scripté
- CAMERA_INFO = 8, // caméra pendant l'affichage des informations
+ CAMERA_NULL = 0, // cam�ra ind�finie
+ CAMERA_FREE = 1, // cam�ra libre (jamais en principe)
+ CAMERA_EDIT = 2, // cam�ra pendant l'�dition d'un programme
+ CAMERA_ONBOARD = 3, // cam�ra � bord d'un robot
+ CAMERA_BACK = 4, // cam�ra derri�re un robot
+ CAMERA_FIX = 5, // cam�ra fixe apr�s robot
+ CAMERA_EXPLO = 6, // cam�ra immobile apr�s explosion
+ CAMERA_SCRIPT = 7, // cam�ra pendant un film script�
+ CAMERA_INFO = 8, // cam�ra pendant l'affichage des informations
CAMERA_VISIT = 9, // visite du lieu d'une erreur
- CAMERA_DIALOG = 10, // caméra pendant dialogue
- CAMERA_PLANE = 11, // caméra fixe en hauteur
+ CAMERA_DIALOG = 10, // cam�ra pendant dialogue
+ CAMERA_PLANE = 11, // cam�ra fixe en hauteur
};
enum CameraSmooth
@@ -33,7 +47,7 @@ enum CameraSmooth
CS_NONE = 0, // brusque
CS_NORM = 1, // normal
CS_HARD = 2, // dur
- CS_SPEC = 3, // spécial
+ CS_SPEC = 3, // sp�cial
};
enum CenteringPhase
@@ -48,11 +62,11 @@ enum CameraEffect
{
CE_NULL = 0, // pas d'effet
CE_TERRAFORM = 1, // terrassement
- CE_CRASH = 2, // véhicule volant posé violemment
+ CE_CRASH = 2, // v�hicule volant pos� violemment
CE_EXPLO = 3, // explosion
CE_SHOT = 4, // coup non mortel
CE_VIBRATION = 5, // vibration pendant construction
- CE_PET = 6, // raté du réacteur
+ CE_PET = 6, // rat� du r�acteur
};
enum OverEffect
@@ -62,7 +76,7 @@ enum OverEffect
OE_FADEINw = 2, // blanc -> rien
OE_FADEOUTw = 3, // rien -> blanc
OE_FADEOUTb = 4, // rien -> bleu
- OE_BLITZ = 5, // éclair
+ OE_BLITZ = 5, // �clair
};
@@ -159,19 +173,19 @@ protected:
CTerrain* m_terrain;
CWater* m_water;
- CameraType m_type; // type de la caméra (CAMERA_*)
+ CameraType m_type; // type de la cam�ra (CAMERA_*)
CameraSmooth m_smooth; // type de lissage
- CObject* m_cameraObj; // objet lié à la caméra
+ CObject* m_cameraObj; // objet li� � la cam�ra
float m_eyeDistance; // distance entre les yeux
- float m_initDelay; // délai du centrage initial
+ float m_initDelay; // d�lai du centrage initial
D3DVECTOR m_actualEye; // oeil actuel
- D3DVECTOR m_actualLookat; // visée actuelle
+ D3DVECTOR m_actualLookat; // vis�e actuelle
D3DVECTOR m_finalEye; // oeil final
- D3DVECTOR m_finalLookat; // visée finale
+ D3DVECTOR m_finalLookat; // vis�e finale
D3DVECTOR m_normEye; // oeil normal
- D3DVECTOR m_normLookat; // visée normale
+ D3DVECTOR m_normLookat; // vis�e normale
float m_focus;
BOOL m_bRightDown;
@@ -184,20 +198,20 @@ protected:
float m_directionV; // CAMERA_FREE: direction verticale
float m_heightEye; // CAMERA_FREE: hauteur au-dessus du sol
float m_heightLookat; // CAMERA_FREE: hauteur au-dessus du sol
- float m_speed; // CAMERA_FREE: vitesse de déplacement
+ float m_speed; // CAMERA_FREE: vitesse de d�placement
- float m_backDist; // CAMERA_BACK: éloignement
- float m_backMin; // CAMERA_BACK: éloignement minimal
- float m_addDirectionH; // CAMERA_BACK: direction supplémentaire
- float m_addDirectionV; // CAMERA_BACK: direction supplémentaire
+ float m_backDist; // CAMERA_BACK: �loignement
+ float m_backMin; // CAMERA_BACK: �loignement minimal
+ float m_addDirectionH; // CAMERA_BACK: direction suppl�mentaire
+ float m_addDirectionV; // CAMERA_BACK: direction suppl�mentaire
BOOL m_bTransparency;
- float m_fixDist; // CAMERA_FIX: éloignement
+ float m_fixDist; // CAMERA_FIX: �loignement
float m_fixDirectionH; // CAMERA_FIX: direction
float m_fixDirectionV; // CAMERA_FIX: direction
- D3DVECTOR m_visitGoal; // CAMERA_VISIT: position visée
- float m_visitDist; // CAMERA_VISIT: éloignement
+ D3DVECTOR m_visitGoal; // CAMERA_VISIT: position vis�e
+ float m_visitDist; // CAMERA_VISIT: �loignement
float m_visitTime; // CAMERA_VISIT: temps relatif
CameraType m_visitType; // CAMERA_VISIT: type initial
float m_visitDirectionH; // CAMERA_VISIT: direction
diff --git a/src/cbottoken.cpp b/src/cbottoken.cpp
index db07edf..6b63c11 100644
--- a/src/cbottoken.cpp
+++ b/src/cbottoken.cpp
@@ -1,4 +1,18 @@
-// cbottoken.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
@@ -112,7 +126,7 @@ char* RetObjectName(ObjectType type)
}
// Cherche le nom secondaire d'un objet.
-// (à cause d'Otto qui pense que les allemands n'aiment pas le nucléaire)
+// (� cause d'Otto qui pense que les allemands n'aiment pas le nucl�aire)
char* RetObjectAlias(ObjectType type)
{
@@ -125,7 +139,7 @@ char* RetObjectAlias(ObjectType type)
}
-// Retourne le fichier d'aide à utiliser pour l'objet.
+// Retourne le fichier d'aide � utiliser pour l'objet.
char* RetHelpFilename(ObjectType type)
{
@@ -210,7 +224,7 @@ char* RetHelpFilename(ObjectType type)
}
-// Retourne le fichier d'aide à utiliser pour une instruction.
+// Retourne le fichier d'aide � utiliser pour une instruction.
char* RetHelpFilename(const char *token)
{
@@ -333,7 +347,7 @@ char* RetHelpFilename(const char *token)
}
-// Teste si un mot clé est un type de variable.
+// Teste si un mot cl� est un type de variable.
BOOL IsType(const char *token)
{
@@ -349,7 +363,7 @@ BOOL IsType(const char *token)
return FALSE;
}
-// Teste si un mot clé est une fonction.
+// Teste si un mot cl� est une fonction.
BOOL IsFunction(const char *token)
{
diff --git a/src/cbottoken.h b/src/cbottoken.h
index 34c391c..6e5d1d0 100644
--- a/src/cbottoken.h
+++ b/src/cbottoken.h
@@ -1,4 +1,18 @@
-// cbottoken.h
+// * 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 .
#ifndef _CBOTTOKEN_H_
#define _CBOTTOKEN_H_
@@ -9,7 +23,7 @@ enum ObjectType;
-// Procédures.
+// Proc�dures.
extern char* RetObjectName(ObjectType type);
extern char* RetObjectAlias(ObjectType type);
diff --git a/src/check.cpp b/src/check.cpp
index 4c8637b..d011f92 100644
--- a/src/check.cpp
+++ b/src/check.cpp
@@ -1,4 +1,18 @@
-// check.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
@@ -35,7 +49,7 @@ CCheck::~CCheck()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CCheck::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -55,7 +69,7 @@ BOOL CCheck::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CCheck::EventProcess(const Event &event)
{
@@ -91,7 +105,7 @@ void CCheck::Draw()
if ( (m_state & STATE_VISIBLE) == 0 ) return;
iDim = m_dim;
- m_dim.x = m_dim.y*0.75f; // carré
+ m_dim.x = m_dim.y*0.75f; // carr�
if ( m_state & STATE_SHADOW )
{
@@ -138,7 +152,7 @@ void CCheck::Draw()
if ( m_state & STATE_CHECK )
{
icon = 16; // vu
- DrawPart(icon, zoomInt, 0.0f); // dessine l'icône
+ DrawPart(icon, zoomInt, 0.0f); // dessine l'ic�ne
}
}
diff --git a/src/check.h b/src/check.h
index 35aa543..450e825 100644
--- a/src/check.h
+++ b/src/check.h
@@ -1,4 +1,18 @@
-// check.h
+// * 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 .
#ifndef _CHECK_H_
#define _CHECK_H_
diff --git a/src/cloud.cpp b/src/cloud.cpp
index ee41c48..f307ff2 100644
--- a/src/cloud.cpp
+++ b/src/cloud.cpp
@@ -1,4 +1,18 @@
-// cloud.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
@@ -58,7 +72,7 @@ BOOL CCloud::EventProcess(const Event &event)
return TRUE;
}
-// Fait évoluer les nuages.
+// Fait �voluer les nuages.
BOOL CCloud::EventFrame(const Event &event)
{
@@ -212,7 +226,7 @@ void CCloud::Draw()
}
-// Met à jour les positions par-rapport au terrain.
+// Met � jour les positions par-rapport au terrain.
BOOL CCloud::CreateLine(int x, int y, int len)
{
@@ -233,7 +247,7 @@ BOOL CCloud::CreateLine(int x, int y, int len)
return ( m_lineUsed < MAXCLOUDLINE );
}
-// Crée toutes les étendues de nuages.
+// Cr�e toutes les �tendues de nuages.
BOOL CCloud::Create(const char *filename,
D3DCOLORVALUE diffuse, D3DCOLORVALUE ambient,
diff --git a/src/cloud.h b/src/cloud.h
index 049b17d..eaf13bf 100644
--- a/src/cloud.h
+++ b/src/cloud.h
@@ -1,4 +1,18 @@
-// cloud.h
+// * 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 .
#ifndef _CLOUD_H_
#define _CLOUD_H_
@@ -14,7 +28,7 @@ class CTerrain;
typedef struct
{
- short x, y; // début
+ short x, y; // d�but
short len; // longueur en x
float px1, px2, pz;
}
@@ -58,8 +72,8 @@ protected:
int m_subdiv;
D3DVECTOR m_wind; // vitesse du vent
- int m_brick; // nb de briques*mosaïque
- float m_size; // taille d'un élément dans une brique
+ int m_brick; // nb de briques*mosa�que
+ float m_size; // taille d'un �l�ment dans une brique
int m_lineUsed;
CloudLine m_line[MAXCLOUDLINE];
diff --git a/src/cmdtoken.cpp b/src/cmdtoken.cpp
index fcd8e37..830b5fe 100644
--- a/src/cmdtoken.cpp
+++ b/src/cmdtoken.cpp
@@ -1,4 +1,18 @@
-// cmdtoken.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
@@ -34,7 +48,7 @@ char* SkipSpace(char *line)
return line;
}
-// Vérifie si une ligne contient une commande.
+// V�rifie si une ligne contient une commande.
BOOL Cmd(char *line, char *token)
{
@@ -42,10 +56,10 @@ BOOL Cmd(char *line, char *token)
line = SkipSpace(line);
p = strstr(line, token);
- return ( p == line ); // commande au début ?
+ return ( p == line ); // commande au d�but ?
}
-// Cherche un opérateur.
+// Cherche un op�rateur.
char* SearchOp(char *line, char *op)
{
@@ -57,14 +71,14 @@ char* SearchOp(char *line, char *op)
strcat(opeq, "=");
p = strstr(line, opeq);
- if ( p == 0 ) // pas trouvé ?
+ if ( p == 0 ) // pas trouv� ?
{
- return line+strlen(line); // pointe le zéro terminateur
+ return line+strlen(line); // pointe le z�ro terminateur
}
- return p+strlen(opeq); // pointe après le "="
+ return p+strlen(opeq); // pointe apr�s le "="
}
-// Cherche le nième argument.
+// Cherche le ni�me argument.
char* SearchArg(char *line, int rank)
{
@@ -86,7 +100,7 @@ char* SearchArg(char *line, int rank)
return line;
}
-// Lit un nombre entier, éventuellement hexadécimal.
+// Lit un nombre entier, �ventuellement hexad�cimal.
int GetInt(char *line, int rank, int def)
{
@@ -124,7 +138,7 @@ int GetInt(char *line, int rank, int def)
return n;
}
-// Lit un nombre réel.
+// Lit un nombre r�el.
float GetFloat(char *line, int rank, float def)
{
@@ -138,7 +152,7 @@ float GetFloat(char *line, int rank, float def)
return n;
}
-// Lit une chaîne.
+// Lit une cha�ne.
void GetString(char *line, int rank, char *buffer)
{
@@ -684,7 +698,7 @@ D3DTypeObj GetTypeTerrain(char *line, int rank, D3DTypeObj def)
return def;
}
-// Retourne le numéro d'un bâtiment.
+// Retourne le num�ro d'un b�timent.
int GetBuild(char *line, int rank)
{
@@ -713,7 +727,7 @@ int GetBuild(char *line, int rank)
return 0;
}
-// Retourne le numéro d'une recherche.
+// Retourne le num�ro d'une recherche.
int GetResearch(char *line, int rank)
{
@@ -770,7 +784,7 @@ PyroType GetPyro(char *line, int rank)
return PT_NULL;
}
-// Retourne le type d'une caméra.
+// Retourne le type d'une cam�ra.
CameraType GetCamera(char *line, int rank)
{
@@ -805,7 +819,7 @@ int OpInt(char *line, char *op, int def)
return GetInt(line, 0, def);
}
-// Retourne un nombre réel.
+// Retourne un nombre r�el.
float OpFloat(char *line, char *op, float def)
{
@@ -814,7 +828,7 @@ float OpFloat(char *line, char *op, float def)
return GetFloat(line, 0, def);
}
-// Retourne une chaîne de caractères.
+// Retourne une cha�ne de caract�res.
void OpString(char *line, char *op, char *buffer)
{
@@ -856,7 +870,7 @@ D3DTypeObj OpTypeTerrain(char *line, char *op, D3DTypeObj def)
return GetTypeTerrain(line, 0, def);
}
-// Retourne le numéro d'une recherche.
+// Retourne le num�ro d'une recherche.
int OpResearch(char *line, char *op)
{
@@ -874,7 +888,7 @@ PyroType OpPyro(char *line, char *op)
return GetPyro(line, 0);
}
-// Retourne le type d'une caméra.
+// Retourne le type d'une cam�ra.
CameraType OpCamera(char *line, char *op)
{
@@ -883,7 +897,7 @@ CameraType OpCamera(char *line, char *op)
return GetCamera(line, 0);
}
-// Retourne le numéro d'un bâtiment.
+// Retourne le num�ro d'un b�timent.
int OpBuild(char *line, char *op)
{
diff --git a/src/cmdtoken.h b/src/cmdtoken.h
index 6745689..44285f0 100644
--- a/src/cmdtoken.h
+++ b/src/cmdtoken.h
@@ -1,4 +1,18 @@
-// cmdtoken.h
+// * 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 .
#ifndef _CMDTOKEN_H_
#define _CMDTOKEN_H_
@@ -12,7 +26,7 @@ enum CameraType;
-// Procédures.
+// Proc�dures.
extern BOOL Cmd(char *line, char *token);
extern char* SearchOp(char *line, char *op);
diff --git a/src/color.cpp b/src/color.cpp
index 25036eb..edc1144 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -1,4 +1,18 @@
-// color.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
@@ -47,7 +61,7 @@ CColor::~CColor()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CColor::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -70,7 +84,7 @@ BOOL CColor::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CColor::EventProcess(const Event &event)
{
diff --git a/src/color.h b/src/color.h
index 9189b41..4f37237 100644
--- a/src/color.h
+++ b/src/color.h
@@ -1,4 +1,18 @@
-// color.h
+// * 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 .
#ifndef _COLOR_H_
#define _COLOR_H_
diff --git a/src/compass.cpp b/src/compass.cpp
index 55c8f9e..c1737ff 100644
--- a/src/compass.cpp
+++ b/src/compass.cpp
@@ -1,4 +1,18 @@
-// compass.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
@@ -35,7 +49,7 @@ CCompass::~CCompass()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CCompass::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -46,7 +60,7 @@ BOOL CCompass::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CCompass::EventProcess(const Event &event)
{
diff --git a/src/compass.h b/src/compass.h
index 46ed00d..1836ba8 100644
--- a/src/compass.h
+++ b/src/compass.h
@@ -1,4 +1,18 @@
-// compass.h
+// * 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 .
#ifndef _COMPASS_H_
#define _COMPASS_H_
diff --git a/src/control.cpp b/src/control.cpp
index 5e786cc..01e7a9b 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -1,4 +1,18 @@
-// control.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
@@ -61,7 +75,7 @@ CControl::~CControl()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
// pos: [0..1]
BOOL CControl::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
@@ -91,7 +105,7 @@ BOOL CControl::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
else
{
- strcpy(m_tooltip, p+1); // texte après "\\"
+ strcpy(m_tooltip, p+1); // texte apr�s "\\"
}
return TRUE;
@@ -129,7 +143,7 @@ FPOINT CControl::RetDim()
}
-// Modifie un attribut d'état.
+// Modifie un attribut d'�tat.
BOOL CControl::SetState(int state, BOOL bState)
{
@@ -138,7 +152,7 @@ BOOL CControl::SetState(int state, BOOL bState)
return TRUE;
}
-// Met un attribut d'état.
+// Met un attribut d'�tat.
BOOL CControl::SetState(int state)
{
@@ -146,7 +160,7 @@ BOOL CControl::SetState(int state)
return TRUE;
}
-// Enlève un attribut d'état.
+// Enl�ve un attribut d'�tat.
BOOL CControl::ClearState(int state)
{
@@ -154,14 +168,14 @@ BOOL CControl::ClearState(int state)
return TRUE;
}
-// Teste un attribut d'état.
+// Teste un attribut d'�tat.
BOOL CControl::TestState(int state)
{
return (m_state & state) ? TRUE:FALSE;
}
-// Retourne tous les attributs d'état.
+// Retourne tous les attributs d'�tat.
int CControl::RetState()
{
@@ -169,7 +183,7 @@ int CControl::RetState()
}
-// Gestion de l'icône.
+// Gestion de l'ic�ne.
void CControl::SetIcon(int icon)
{
@@ -200,7 +214,7 @@ void CControl::SetName(char* name, BOOL bTooltip)
{
char buffer[100];
- strncpy(m_tooltip, p+1, 100); // texte après "\\"
+ strncpy(m_tooltip, p+1, 100); // texte apr�s "\\"
m_tooltip[100-1] = 0;
strncpy(buffer, name, 100);
@@ -276,7 +290,7 @@ FontType CControl::RetFontType()
}
-// Spécifie le tooltip.
+// Sp�cifie le tooltip.
BOOL CControl::SetTooltip(char* name)
{
@@ -310,7 +324,7 @@ BOOL CControl::RetFocus()
}
-// Retourne l'événement associé au contrôle.
+// Retourne l'�v�nement associ� au contr�le.
EventMsg CControl::RetEventMsg()
{
@@ -318,7 +332,7 @@ EventMsg CControl::RetEventMsg()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CControl::EventProcess(const Event &event)
{
@@ -386,7 +400,7 @@ void CControl::GlintDelete()
m_bGlint = FALSE;
}
-// Crée un reflet pour ce bouton.
+// Cr�e un reflet pour ce bouton.
void CControl::GlintCreate(FPOINT ref, BOOL bLeft, BOOL bUp)
{
@@ -519,7 +533,7 @@ void CControl::Draw()
if ( m_state & STATE_OKAY )
{
m_engine->SetTexture("button3.tga");
- icon = 3; // jaune pressé avec point vert
+ icon = 3; // jaune press� avec point vert
}
if ( m_name[0] == 0 ) // bouton sans nom ?
@@ -634,7 +648,7 @@ void CControl::DrawPart(int icon, float zoom, float ex)
DrawIcon(p1, p2, uv1, uv2, ex);
}
-// Dessine une icône rectangulaire composée de 1 (si ex=0)
+// Dessine une ic�ne rectangulaire compos�e de 1 (si ex=0)
// ou 3 morceaux.
void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
@@ -703,7 +717,7 @@ void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
}
}
-// Dessine une icône rectangulaire composée de 9 morceaux.
+// Dessine une ic�ne rectangulaire compos�e de 9 morceaux.
void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
FPOINT corner, float ex)
@@ -734,7 +748,7 @@ void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
p4.x = p2.x - corner.x;
p4.y = p2.y - corner.y;
- // Bande horizontale inférieure.
+ // Bande horizontale inf�rieure.
vertex[0] = D3DVERTEX2(D3DVECTOR(p1.x, p1.y, 0.0f), n, uv1.x, uv2.y );
vertex[1] = D3DVERTEX2(D3DVECTOR(p1.x, p3.y, 0.0f), n, uv1.x, uv2.y-ex);
vertex[2] = D3DVERTEX2(D3DVECTOR(p3.x, p1.y, 0.0f), n, uv1.x+ex,uv2.y );
@@ -746,7 +760,7 @@ void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL);
m_engine->AddStatisticTriangle(6);
- // Bande horizontale médiane.
+ // Bande horizontale m�diane.
vertex[0] = D3DVERTEX2(D3DVECTOR(p1.x, p3.y, 0.0f), n, uv1.x, uv2.y-ex);
vertex[1] = D3DVERTEX2(D3DVECTOR(p1.x, p4.y, 0.0f), n, uv1.x, uv1.y+ex);
vertex[2] = D3DVERTEX2(D3DVECTOR(p3.x, p3.y, 0.0f), n, uv1.x+ex,uv2.y-ex);
@@ -758,7 +772,7 @@ void CControl::DrawIcon(FPOINT pos, FPOINT dim, FPOINT uv1, FPOINT uv2,
device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL);
m_engine->AddStatisticTriangle(6);
- // Bande horizontale supérieure.
+ // Bande horizontale sup�rieure.
vertex[0] = D3DVERTEX2(D3DVECTOR(p1.x, p4.y, 0.0f), n, uv1.x, uv1.y+ex);
vertex[1] = D3DVERTEX2(D3DVECTOR(p1.x, p2.y, 0.0f), n, uv1.x, uv1.y );
vertex[2] = D3DVERTEX2(D3DVECTOR(p3.x, p4.y, 0.0f), n, uv1.x+ex,uv1.y+ex);
@@ -849,7 +863,7 @@ void CControl::DrawShadow(FPOINT pos, FPOINT dim, float deep)
}
-// Détecte si une position est dans le bouton.
+// D�tecte si une position est dans le bouton.
BOOL CControl::Detect(FPOINT pos)
{
diff --git a/src/control.h b/src/control.h
index d40b3a1..fb31da7 100644
--- a/src/control.h
+++ b/src/control.h
@@ -1,4 +1,18 @@
-// control.h
+// * 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 .
#ifndef _CONTROL_H_
#define _CONTROL_H_
@@ -15,20 +29,20 @@ enum FontType;
#define STATE_ENABLE (1<<0) // actif
-#define STATE_CHECK (1<<1) // enfoncé
-#define STATE_HILIGHT (1<<2) // survolé par la souris
-#define STATE_PRESS (1<<3) // pressé par la souris
+#define STATE_CHECK (1<<1) // enfonc�
+#define STATE_HILIGHT (1<<2) // survol� par la souris
+#define STATE_PRESS (1<<3) // press� par la souris
#define STATE_VISIBLE (1<<4) // visible
#define STATE_DEAD (1<<5) // inaccessible (x)
-#define STATE_DEFAULT (1<<6) // actionné par RETURN
-#define STATE_OKAY (1<<7) // point vert en bas à droite
+#define STATE_DEFAULT (1<<6) // actionn� par RETURN
+#define STATE_OKAY (1<<7) // point vert en bas � droite
#define STATE_SHADOW (1<<8) // ombre
#define STATE_GLINT (1<<9) // reflet dynamique
#define STATE_CARD (1<<10) // onglet
-#define STATE_EXTEND (1<<11) // mode étendu
+#define STATE_EXTEND (1<<11) // mode �tendu
#define STATE_SIMPLY (1<<12) // sans ornements
-#define STATE_FRAME (1<<13) // cadre de mise en évidence
-#define STATE_WARNING (1<<14) // cadre hachuré jaune/noir
+#define STATE_FRAME (1<<13) // cadre de mise en �vidence
+#define STATE_WARNING (1<<14) // cadre hachur� jaune/noir
#define STATE_VALUE (1<<15) // affiche la valeur
#define STATE_RUN (1<<16) // programme en cours
@@ -96,8 +110,8 @@ protected:
FPOINT m_pos; // coin sup/gauche
FPOINT m_dim; // dimensions
int m_icon;
- EventMsg m_eventMsg; // message à envoyer si clic
- int m_state; // états (STATE_*)
+ EventMsg m_eventMsg; // message � envoyer si clic
+ int m_state; // �tats (STATE_*)
float m_fontSize; // taille du nom du bouton
float m_fontStretch; // stretch de la fonte
FontType m_fontType; // type de la fonte
diff --git a/src/d3dapp.cpp b/src/d3dapp.cpp
index 7ca6d5a..88dd314 100644
--- a/src/d3dapp.cpp
+++ b/src/d3dapp.cpp
@@ -1,4 +1,18 @@
-// D3DApp.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 AUDIO_TRACK 13 // nb total de pistes audio sur le CD
#define MAX_STEP 0.2f // temps maximum pour un step
-#define WINDOW_DX (640+6) // dimensions en mode fenêtré
+#define WINDOW_DX (640+6) // dimensions en mode fen�tr�
#define WINDOW_DY (480+25)
#define USE_THREAD FALSE // TRUE ne fonctionne pas !
@@ -41,7 +55,7 @@
-// Limite le débattement des commandes clavier & joystick.
+// Limite le d�battement des commandes clavier & joystick.
float AxeLimit(float value)
{
@@ -78,7 +92,7 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
return 0;
}
- return d3dApp.Run(); // exécution du tout
+ return d3dApp.Run(); // ex�cution du tout
}
@@ -152,7 +166,7 @@ CD3DApplication::CD3DApplication()
g_pD3DApp = this;
- // Demande l'événement envoyé par les souris Logitech.
+ // Demande l'�v�nement envoy� par les souris Logitech.
m_mshMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL);
_mkdir("files\\");
@@ -168,7 +182,7 @@ CD3DApplication::~CD3DApplication()
-// Retourne le chemin d'accès du CD.
+// Retourne le chemin d'acc�s du CD.
char* CD3DApplication::RetCDpath()
{
@@ -217,7 +231,7 @@ Error CD3DApplication::RegQuery()
return ERR_OK;
}
-// Vérifie la présence des pistes audio sur le CD.
+// V�rifie la pr�sence des pistes audio sur le CD.
Error CD3DApplication::AudioQuery()
{
@@ -279,7 +293,7 @@ Error CD3DApplication::AudioQuery()
return ERR_OK;
}
-// Vérifie la présence de la clé.
+// V�rifie la pr�sence de la cl�.
Error CD3DApplication::CheckMistery(char *strCmdLine)
{
@@ -338,7 +352,7 @@ Error CD3DApplication::CheckMistery(char *strCmdLine)
}
-// Retourne la quantité totale de mémoire vidéo pour les textures.
+// Retourne la quantit� totale de m�moire vid�o pour les textures.
int CD3DApplication::GetVidMemTotal()
{
@@ -473,7 +487,7 @@ HRESULT CD3DApplication::Create( HINSTANCE hInst, TCHAR* strCmdLine )
if ( !m_bDebugMode )
{
- m_pDeviceInfo->bWindowed = FALSE; // plein écran
+ m_pDeviceInfo->bWindowed = FALSE; // plein �cran
}
if ( GetProfileInt("Device", "FullScreen", bFull) )
{
@@ -565,13 +579,13 @@ HRESULT CD3DApplication::Create( HINSTANCE hInst, TCHAR* strCmdLine )
ChangeDevice(deviceName, modeName, bFull);
}
- // Première exécution ?
+ // Premi�re ex�cution ?
if ( !GetProfileInt("Setup", "ObjectDirty", iValue) )
{
m_pD3DEngine->FirstExecuteAdapt(TRUE);
}
- // Crée le fichier colobot.ini à la première exécution.
+ // Cr�e le fichier colobot.ini � la premi�re ex�cution.
m_pRobotMain->CreateIni();
#if _DEMO
@@ -706,7 +720,7 @@ FPOINT CD3DApplication::ConvPosToInterface(HWND hWnd, LPARAM lParam)
return pos;
}
-// Déplace physiquement la souris.
+// D�place physiquement la souris.
void CD3DApplication::SetMousePos(FPOINT pos)
{
@@ -820,7 +834,7 @@ void CD3DApplication::SetNiceMouse(BOOL bNice)
}
}
-// Indique s'il faut utiliser la jolie souris ombrée.
+// Indique s'il faut utiliser la jolie souris ombr�e.
BOOL CD3DApplication::RetNiceMouse()
{
@@ -830,7 +844,7 @@ BOOL CD3DApplication::RetNiceMouse()
return m_bNiceMouse;
}
-// Indique s'il est possible d'utiliser la jolie souris ombrée.
+// Indique s'il est possible d'utiliser la jolie souris ombr�e.
BOOL CD3DApplication::RetNiceMouseCap()
{
@@ -889,7 +903,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
uMsg == WM_RBUTTONDOWN ||
uMsg == WM_LBUTTONUP ||
uMsg == WM_RBUTTONUP ||
- uMsg == WM_MOUSEMOVE ) // événement souris ?
+ uMsg == WM_MOUSEMOVE ) // �v�nement souris ?
{
event.pos = g_pD3DApp->ConvPosToInterface(hWnd, lParam);
g_pD3DApp->m_mousePos = event.pos;
@@ -956,7 +970,7 @@ BOOL CALLBACK AboutProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM )
-// Ignore les touches pressées.
+// Ignore les touches press�es.
void CD3DApplication::FlushPressKey()
{
@@ -965,7 +979,7 @@ void CD3DApplication::FlushPressKey()
m_axeJoy = D3DVECTOR(0.0f, 0.0f, 0.0f);
}
-// Remet les touches par défaut.
+// Remet les touches par d�faut.
void CD3DApplication::ResetKey()
{
@@ -1087,7 +1101,7 @@ LRESULT CD3DApplication::MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam,
uMsg = WM_KEYUP;
}
- // Mange l'événement "menu" envoyé par Alt ou F10.
+ // Mange l'�v�nement "menu" envoy� par Alt ou F10.
if ( uMsg == WM_SYSCOMMAND && wParam == SC_KEYMENU )
{
return 0;
@@ -1281,7 +1295,7 @@ LRESULT CD3DApplication::MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam,
if ( m_bActivateApp && m_bJoystick )
{
- SetAcquire(TRUE); // ré-active le joystick
+ SetAcquire(TRUE); // r�-active le joystick
}
break;
@@ -1530,7 +1544,7 @@ HRESULT CD3DApplication::Initialize3DEnvironment()
m_ddsdRenderTarget.dwSize = sizeof(m_ddsdRenderTarget);
m_pddsRenderTarget->GetSurfaceDesc( &m_ddsdRenderTarget );
- // Demande la quantité de mémoire vidéo.
+ // Demande la quantit� de m�moire vid�o.
ZeroMemory(&ddsCaps2, sizeof(ddsCaps2));
ddsCaps2.dwCaps = DDSCAPS_TEXTURE;
dwTotal = 0;
@@ -1658,7 +1672,7 @@ HRESULT CD3DApplication::Change3DEnvironment()
-// Fait évoluer tout le jeu.
+// Fait �voluer tout le jeu.
void CD3DApplication::StepSimul(float rTime)
{
@@ -1667,7 +1681,7 @@ void CD3DApplication::StepSimul(float rTime)
if ( m_pRobotMain == 0 ) return;
ZeroMemory(&event, sizeof(Event));
- event.event = EVENT_FRAME; // drôle de bug en release "Maximize speed" !!!
+ event.event = EVENT_FRAME; // dr�le de bug en release "Maximize speed" !!!
event.rTime = rTime;
event.axeX = AxeLimit(m_axeKey.x + m_axeJoy.x);
event.axeY = AxeLimit(m_axeKey.y + m_axeJoy.y);
@@ -1835,7 +1849,7 @@ LRESULT CD3DApplication::OnResumeSuspend( DWORD dwData )
}
-// Dessine tous les éléments graphiques supplémentaires.
+// Dessine tous les �l�ments graphiques suppl�mentaires.
void CD3DApplication::DrawSuppl()
{
@@ -1851,7 +1865,7 @@ void CD3DApplication::DrawSuppl()
if ( FAILED(m_pddsRenderTarget->GetDC(&hDC)) ) return;
- // Affiche le rectangle de sélection.
+ // Affiche le rectangle de s�lection.
if ( m_pD3DEngine->GetHilite(p1, p2) )
{
nbOut = 0;
@@ -2118,7 +2132,7 @@ BOOL CD3DApplication::CreateBMPFile(LPTSTR pszFile, PBITMAPINFO pbi, HBITMAP hBM
return TRUE;
}
-// Ecrit un fichier .BMP copie d'écran.
+// Ecrit un fichier .BMP copie d'�cran.
BOOL CD3DApplication::WriteScreenShot(char *filename, int width, int height)
{
@@ -2179,7 +2193,7 @@ BOOL CD3DApplication::GetRenderDC(HDC &hDC)
return TRUE;
}
-// Libère le hDC sur la surface de rendu.
+// Lib�re le hDC sur la surface de rendu.
BOOL CD3DApplication::ReleaseRenderDC(HDC &hDC)
{
@@ -2191,7 +2205,7 @@ BOOL CD3DApplication::ReleaseRenderDC(HDC &hDC)
// Effectue la liste de tous les devices graphiques disponibles.
-// Pour le device sélectionné, donne la liste des modes plein écran
+// Pour le device s�lectionn�, donne la liste des modes plein �cran
// possibles.
// buf* --> nom1<0> nom2<0> <0>
@@ -2256,7 +2270,7 @@ BOOL CD3DApplication::EnumDevices(char *bufDevices, int lenDevices,
return TRUE;
}
-// Indique si on est en mode plein écran.
+// Indique si on est en mode plein �cran.
BOOL CD3DApplication::RetFullScreen()
{
diff --git a/src/d3dapp.h b/src/d3dapp.h
index 4808e68..12fc729 100644
--- a/src/d3dapp.h
+++ b/src/d3dapp.h
@@ -1,4 +1,18 @@
-// D3DApp.h
+// * 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 .
#ifndef _D3DAPP_H
diff --git a/src/d3dengine.cpp b/src/d3dengine.cpp
index 20bff34..03f21dc 100644
--- a/src/d3dengine.cpp
+++ b/src/d3dengine.cpp
@@ -1,4 +1,18 @@
-// D3DEngine.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
@@ -353,7 +367,7 @@ void CD3DEngine::SetTerrain(CTerrain* terrain)
}
-// Sauvegarde l'état du moteur graphique dans COLOBOT.INI.
+// Sauvegarde l'�tat du moteur graphique dans COLOBOT.INI.
BOOL CD3DEngine::WriteProfile()
{
@@ -452,8 +466,8 @@ void CD3DEngine::SetRenderEnable(BOOL bEnable)
}
-// Prépare une structure D3DObjLevel6 pour pouvoir ajouter
-// qq éléments D3DVERTEX2.
+// Pr�pare une structure D3DObjLevel6 pour pouvoir ajouter
+// qq �l�ments D3DVERTEX2.
void CD3DEngine::MemSpace6(D3DObjLevel6 *&p, int nb)
{
@@ -483,8 +497,8 @@ void CD3DEngine::MemSpace6(D3DObjLevel6 *&p, int nb)
}
}
-// Prépare une structure D3DObjLevel5 pour pouvoir ajouter
-// qq éléments D3DObjLevel6.
+// Pr�pare une structure D3DObjLevel5 pour pouvoir ajouter
+// qq �l�ments D3DObjLevel6.
void CD3DEngine::MemSpace5(D3DObjLevel5 *&p, int nb)
{
@@ -514,8 +528,8 @@ void CD3DEngine::MemSpace5(D3DObjLevel5 *&p, int nb)
}
}
-// Prépare une structure D3DObjLevel4 pour pouvoir ajouter
-// qq éléments D3DObjLevel5.
+// Pr�pare une structure D3DObjLevel4 pour pouvoir ajouter
+// qq �l�ments D3DObjLevel5.
void CD3DEngine::MemSpace4(D3DObjLevel4 *&p, int nb)
{
@@ -545,8 +559,8 @@ void CD3DEngine::MemSpace4(D3DObjLevel4 *&p, int nb)
}
}
-// Prépare une structure D3DObjLevel3 pour pouvoir ajouter
-// qq éléments D3DObjLevel4.
+// Pr�pare une structure D3DObjLevel3 pour pouvoir ajouter
+// qq �l�ments D3DObjLevel4.
void CD3DEngine::MemSpace3(D3DObjLevel3 *&p, int nb)
{
@@ -576,8 +590,8 @@ void CD3DEngine::MemSpace3(D3DObjLevel3 *&p, int nb)
}
}
-// Prépare une structure D3DObjLevel2 pour pouvoir ajouter
-// qq éléments D3DObjLevel3.
+// Pr�pare une structure D3DObjLevel2 pour pouvoir ajouter
+// qq �l�ments D3DObjLevel3.
void CD3DEngine::MemSpace2(D3DObjLevel2 *&p, int nb)
{
@@ -607,8 +621,8 @@ void CD3DEngine::MemSpace2(D3DObjLevel2 *&p, int nb)
}
}
-// Prépare une structure D3DObjLevel1 pour pouvoir ajouter
-// qq éléments D3DObjLevel2.
+// Pr�pare une structure D3DObjLevel1 pour pouvoir ajouter
+// qq �l�ments D3DObjLevel2.
void CD3DEngine::MemSpace1(D3DObjLevel1 *&p, int nb)
{
@@ -639,14 +653,14 @@ void CD3DEngine::MemSpace1(D3DObjLevel1 *&p, int nb)
}
-// Retourne le nombre d'objets qu'il est encore possible de créer.
+// Retourne le nombre d'objets qu'il est encore possible de cr�er.
int CD3DEngine::RetRestCreate()
{
return D3DMAXOBJECT-m_objectParamTotal-2;
}
-// Crée un nouvel objet. Retourne son rang ou -1 en cas d'erreur.
+// Cr�e un nouvel objet. Retourne son rang ou -1 en cas d'erreur.
int CD3DEngine::CreateObject()
{
@@ -739,7 +753,7 @@ void CD3DEngine::FlushObject()
GroundSpotFlush();
}
-// Détruit un objet existant.
+// D�truit un objet existant.
BOOL CD3DEngine::DeleteObject(int objRank)
{
@@ -801,7 +815,7 @@ BOOL CD3DEngine::DeleteObject(int objRank)
}
-// Indique si un objet doit être dessiné par dessous l'interface.
+// Indique si un objet doit �tre dessin� par dessous l'interface.
BOOL CD3DEngine::SetDrawWorld(int objRank, BOOL bDraw)
{
@@ -811,7 +825,7 @@ BOOL CD3DEngine::SetDrawWorld(int objRank, BOOL bDraw)
return TRUE;
}
-// Indique si un objet doit être dessiné par dessus l'interface.
+// Indique si un objet doit �tre dessin� par dessus l'interface.
BOOL CD3DEngine::SetDrawFront(int objRank, BOOL bDraw)
{
@@ -822,7 +836,7 @@ BOOL CD3DEngine::SetDrawFront(int objRank, BOOL bDraw)
}
-// Prépare le niveau 1 pour ajouter un triangle.
+// Pr�pare le niveau 1 pour ajouter un triangle.
D3DObjLevel2* CD3DEngine::AddLevel1(D3DObjLevel1 *&p1, char* texName1, char* texName2)
{
@@ -851,7 +865,7 @@ D3DObjLevel2* CD3DEngine::AddLevel1(D3DObjLevel1 *&p1, char* texName1, char* tex
return p1->table[l1];
}
-// Prépare le niveau 2 pour ajouter un triangle.
+// Pr�pare le niveau 2 pour ajouter un triangle.
D3DObjLevel3* CD3DEngine::AddLevel2(D3DObjLevel2 *&p2, int objRank)
{
@@ -878,7 +892,7 @@ D3DObjLevel3* CD3DEngine::AddLevel2(D3DObjLevel2 *&p2, int objRank)
return p2->table[l2];
}
-// Prépare le niveau 3 pour ajouter un triangle.
+// Pr�pare le niveau 3 pour ajouter un triangle.
D3DObjLevel4* CD3DEngine::AddLevel3(D3DObjLevel3 *&p3, float min, float max)
{
@@ -906,7 +920,7 @@ D3DObjLevel4* CD3DEngine::AddLevel3(D3DObjLevel3 *&p3, float min, float max)
return p3->table[l3];
}
-// Prépare le niveau 4 pour ajouter un triangle.
+// Pr�pare le niveau 4 pour ajouter un triangle.
D3DObjLevel5* CD3DEngine::AddLevel4(D3DObjLevel4 *&p4, int reserve)
{
@@ -933,7 +947,7 @@ D3DObjLevel5* CD3DEngine::AddLevel4(D3DObjLevel4 *&p4, int reserve)
return p4->table[l4];
}
-// Prépare le niveau 5 pour ajouter des vertex.
+// Pr�pare le niveau 5 pour ajouter des vertex.
D3DObjLevel6* CD3DEngine::AddLevel5(D3DObjLevel5 *&p5, D3DTypeTri type,
const D3DMATERIAL7 &mat, int state,
@@ -969,8 +983,8 @@ D3DObjLevel6* CD3DEngine::AddLevel5(D3DObjLevel5 *&p5, D3DTypeTri type,
return p5->table[l5];
}
-// Ajoute un ou plusieurs triangles à un objet existant.
-// Le nombre doit être multiple de 3.
+// Ajoute un ou plusieurs triangles � un objet existant.
+// Le nombre doit �tre multiple de 3.
BOOL CD3DEngine::AddTriangle(int objRank, D3DVERTEX2* vertex, int nb,
const D3DMATERIAL7 &mat, int state,
@@ -1021,7 +1035,7 @@ BOOL CD3DEngine::AddTriangle(int objRank, D3DVERTEX2* vertex, int nb,
return TRUE;
}
-// Ajoute une surface constituée de triangles jointifs.
+// Ajoute une surface constitu�e de triangles jointifs.
BOOL CD3DEngine::AddSurface(int objRank, D3DVERTEX2* vertex, int nb,
const D3DMATERIAL7 &mat, int state,
@@ -1068,8 +1082,8 @@ BOOL CD3DEngine::AddSurface(int objRank, D3DVERTEX2* vertex, int nb,
return TRUE;
}
-// Ajoute une surface constituée de triangles jointifs.
-// Le buffer n'est pas copié.
+// Ajoute une surface constitu�e de triangles jointifs.
+// Le buffer n'est pas copi�.
BOOL CD3DEngine::AddQuick(int objRank, D3DObjLevel6* buffer,
char* texName1, char* texName2,
@@ -1249,7 +1263,7 @@ BOOL CD3DEngine::ChangeSecondTexture(int objRank, char* texName2)
{
p2 = p1->table[l1];
if ( p2 == 0 ) continue;
- if ( strcmp(p2->texName2, texName2) == 0 ) continue; // déjà nouvelle
+ if ( strcmp(p2->texName2, texName2) == 0 ) continue; // d�j� nouvelle
for ( l2=0 ; l2<p2->totalUsed ; l2++ )
{
p3 = p2->table[l2];
@@ -1275,7 +1289,7 @@ int CD3DEngine::RetTotalTriangles(int objRank)
return m_objectParam[objRank].totalTriangle;
}
-// Retourne qq triangles d'un objet. Utilisé pour extraire qq
+// Retourne qq triangles d'un objet. Utilis� pour extraire qq
// triangles d'un objet qui explose.
// "percent" est compris entre 0 et 1.
@@ -1460,11 +1474,11 @@ BOOL CD3DEngine::ChangeTextureMapping(int objRank,
// Change le mapping de texture pour toute une liste de triangles,
// afin de simuler une chenille qui tourne.
-// Seul le mapping selon "u" est changé.
+// Seul le mapping selon "u" est chang�.
//
// pos: position sur le pourtour [p]
-// tl: longeur élément répétitif de la texture [t]
-// ts: début de la texture [t]
+// tl: longeur �l�ment r�p�titif de la texture [t]
+// ts: d�but de la texture [t]
// tt: largeur totale de la texture [t]
//
// [p] = distance dans l'univers 3D
@@ -1484,7 +1498,7 @@ BOOL CD3DEngine::ChangeTextureMapping(int objRank,
//
// Quand l6=1 :
// 0 1 2 3 4 ... 7
-// o--o---------o--o--o--o-//-o--o développement chenille
+// o--o---------o--o--o--o-//-o--o d�veloppement chenille
// |ps| |
// <--> pe |
// <------------>
@@ -1527,7 +1541,7 @@ BOOL CD3DEngine::TrackTextureMapping(int objRank,
while ( pos < 0.0f )
{
- pos += 1000000.0f; // jamais négatif !
+ pos += 1000000.0f; // jamais n�gatif !
}
for ( i=0 ; i<6 ; i++ )
@@ -1544,7 +1558,7 @@ BOOL CD3DEngine::TrackTextureMapping(int objRank,
}
}
- ps = 0.0f; // position de début sur le pourtour
+ ps = 0.0f; // position de d�but sur le pourtour
for ( l6=0 ; l6<nb/6 ; l6++ )
{
s = e = 0;
@@ -1589,7 +1603,7 @@ BOOL CD3DEngine::TrackTextureMapping(int objRank,
break;
}
}
- ps = pe; // position de début suivante sur le pourtour
+ ps = pe; // position de d�but suivante sur le pourtour
pv += 6;
}
@@ -1597,7 +1611,7 @@ BOOL CD3DEngine::TrackTextureMapping(int objRank,
}
-// Met à jour tous les paramètres géométriques des objets.
+// Met � jour tous les param�tres g�om�triques des objets.
void CD3DEngine::UpdateGeometry()
{
@@ -1667,8 +1681,8 @@ void CD3DEngine::UpdateGeometry()
}
-// Détermine si un objet est visible, même partiellement.
-// La transformation "world" doit être faite !
+// D�termine si un objet est visible, m�me partiellement.
+// La transformation "world" doit �tre faite !
BOOL CD3DEngine::IsVisible(int objRank)
{
@@ -1690,7 +1704,7 @@ BOOL CD3DEngine::IsVisible(int objRank)
}
-// Détecte l'objet visé par la souris.
+// D�tecte l'objet vis� par la souris.
// Retourne le rang de l'objet ou -1.
int CD3DEngine::DetectObject(FPOINT mouse)
@@ -1770,7 +1784,7 @@ int CD3DEngine::DetectObject(FPOINT mouse)
return nearest;
}
-// Détecte si la souris est dans un triangle.
+// D�tecte si la souris est dans un triangle.
BOOL CD3DEngine::DetectTriangle(FPOINT mouse, D3DVERTEX2 *triangle,
int objRank, float &dist)
@@ -1812,7 +1826,7 @@ BOOL CD3DEngine::DetectTriangle(FPOINT mouse, D3DVERTEX2 *triangle,
return TRUE;
}
-// Détecte si un objet est visé par la souris.
+// D�tecte si un objet est vis� par la souris.
BOOL CD3DEngine::DetectBBox(int objRank, FPOINT mouse)
{
@@ -1848,15 +1862,15 @@ BOOL CD3DEngine::DetectBBox(int objRank, FPOINT mouse)
mouse.y <= max.y );
}
-// Transforme un point 3D (x,y,z) dans l'espace 2D (x,y,-) de la fenêtre.
-// La coordonnée p2D.z donne l'éloignement.
+// Transforme un point 3D (x,y,z) dans l'espace 2D (x,y,-) de la fen�tre.
+// La coordonn�e p2D.z donne l'�loignement.
BOOL CD3DEngine::TransformPoint(D3DVECTOR &p2D, int objRank, D3DVECTOR p3D)
{
p3D = Transform(m_objectParam[objRank].transform, p3D);
p3D = Transform(m_matView, p3D);
- if ( p3D.z < 2.0f ) return FALSE; // derrière ?
+ if ( p3D.z < 2.0f ) return FALSE; // derri�re ?
p2D.x = (p3D.x/p3D.z)*m_matProj._11;
p2D.y = (p3D.y/p3D.z)*m_matProj._22;
@@ -1870,7 +1884,7 @@ BOOL CD3DEngine::TransformPoint(D3DVECTOR &p2D, int objRank, D3DVECTOR p3D)
// Calcul les distances entre le point de vue et l'origine
-// des différents objets.
+// des diff�rents objets.
void CD3DEngine::ComputeDistance()
{
@@ -1925,7 +1939,7 @@ void CD3DEngine::ComputeDistance()
}
-// Adapte les réglages lors de la première exécution.
+// Adapte les r�glages lors de la premi�re ex�cution.
void CD3DEngine::FirstExecuteAdapt(BOOL bFirst)
{
@@ -1941,7 +1955,7 @@ void CD3DEngine::FirstExecuteAdapt(BOOL bFirst)
}
}
-// Retourne la quantité totale de mémoire vidéo pour les textures.
+// Retourne la quantit� totale de m�moire vid�o pour les textures.
int CD3DEngine::GetVidMemTotal()
{
@@ -2000,7 +2014,7 @@ D3DMATRIX* CD3DEngine::RetMatRightView()
}
-// Spécifie l'emplacement et la direction du point de vue.
+// Sp�cifie l'emplacement et la direction du point de vue.
void CD3DEngine::SetViewParams(const D3DVECTOR &vEyePt,
const D3DVECTOR &vLookatPt,
@@ -2040,7 +2054,7 @@ void CD3DEngine::SetViewParams(const D3DVECTOR &vEyePt,
}
-// Spécifie la matrice de transformation d'un objet.
+// Sp�cifie la matrice de transformation d'un objet.
BOOL CD3DEngine::SetObjectTransform(int objRank, const D3DMATRIX &transform)
{
@@ -2060,7 +2074,7 @@ BOOL CD3DEngine::GetObjectTransform(int objRank, D3DMATRIX &transform)
return TRUE;
}
-// Spécifie le type d'un objet.
+// Sp�cifie le type d'un objet.
BOOL CD3DEngine::SetObjectType(int objRank, D3DTypeObj type)
{
@@ -2077,7 +2091,7 @@ D3DTypeObj CD3DEngine::RetObjectType(int objRank)
return m_objectParam[objRank].type;
}
-// Spécifie la transparence d'un objet.
+// Sp�cifie la transparence d'un objet.
BOOL CD3DEngine::SetObjectTransparency(int objRank, float value)
{
@@ -2088,13 +2102,13 @@ BOOL CD3DEngine::SetObjectTransparency(int objRank, float value)
}
-// Alloue une table pour l'ombre, si nécessaire.
+// Alloue une table pour l'ombre, si n�cessaire.
BOOL CD3DEngine::ShadowCreate(int objRank)
{
int i;
- // Déjà alloué ?
+ // D�j� allou� ?
if ( m_objectParam[objRank].shadowRank != -1 ) return TRUE;
for ( i=0 ; i<D3DMAXSHADOW ; i++ )
@@ -2116,10 +2130,10 @@ BOOL CD3DEngine::ShadowCreate(int objRank)
return TRUE;
}
}
- return FALSE; // pas trouvé
+ return FALSE; // pas trouv�
}
-// Supprime l'ombre associée à un objet.
+// Supprime l'ombre associ�e � un objet.
void CD3DEngine::ShadowDelete(int objRank)
{
@@ -2144,8 +2158,8 @@ void CD3DEngine::ShadowDelete(int objRank)
}
}
-// Spécifie si l'ombre est visible. Par exemple, lorsqu'un objet est
-// porté, il n'a plus d'ombre.
+// Sp�cifie si l'ombre est visible. Par exemple, lorsqu'un objet est
+// port�, il n'a plus d'ombre.
BOOL CD3DEngine::SetObjectShadowHide(int objRank, BOOL bHide)
{
@@ -2158,7 +2172,7 @@ BOOL CD3DEngine::SetObjectShadowHide(int objRank, BOOL bHide)
return TRUE;
}
-// Spécifie le type de l'ombre de l'objet.
+// Sp�cifie le type de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowType(int objRank, D3DShadowType type)
{
@@ -2171,7 +2185,7 @@ BOOL CD3DEngine::SetObjectShadowType(int objRank, D3DShadowType type)
return TRUE;
}
-// Spécifie la position de l'ombre de l'objet.
+// Sp�cifie la position de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowPos(int objRank, const D3DVECTOR &pos)
{
@@ -2184,7 +2198,7 @@ BOOL CD3DEngine::SetObjectShadowPos(int objRank, const D3DVECTOR &pos)
return TRUE;
}
-// Spécifie la normale au terrain de l'ombre de l'objet.
+// Sp�cifie la normale au terrain de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowNormal(int objRank, const D3DVECTOR &n)
{
@@ -2197,7 +2211,7 @@ BOOL CD3DEngine::SetObjectShadowNormal(int objRank, const D3DVECTOR &n)
return TRUE;
}
-// Spécifie l'angle de l'ombre de l'objet.
+// Sp�cifie l'angle de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowAngle(int objRank, float angle)
{
@@ -2210,7 +2224,7 @@ BOOL CD3DEngine::SetObjectShadowAngle(int objRank, float angle)
return TRUE;
}
-// Spécifie le rayon de l'ombre de l'objet.
+// Sp�cifie le rayon de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowRadius(int objRank, float radius)
{
@@ -2235,7 +2249,7 @@ float CD3DEngine::RetObjectShadowRadius(int objRank)
return m_shadow[i].radius;
}
-// Spécifie l'intensité de l'ombre de l'objet.
+// Sp�cifie l'intensit� de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowIntensity(int objRank, float intensity)
{
@@ -2248,7 +2262,7 @@ BOOL CD3DEngine::SetObjectShadowIntensity(int objRank, float intensity)
return TRUE;
}
-// Spécifie la hauteur de l'ombre de l'objet.
+// Sp�cifie la hauteur de l'ombre de l'objet.
BOOL CD3DEngine::SetObjectShadowHeight(int objRank, float h)
{
@@ -2273,7 +2287,7 @@ void CD3DEngine::GroundSpotFlush()
int s, y;
ZeroMemory(m_groundSpot, sizeof(D3DGroundSpot)*D3DMAXGROUNDSPOT);
- m_bFirstGroundSpot = TRUE; // force le dessin la première fois
+ m_bFirstGroundSpot = TRUE; // force le dessin la premi�re fois
for ( s=0 ; s<16 ; s++ )
{
@@ -2298,7 +2312,7 @@ void CD3DEngine::GroundSpotFlush()
}
}
-// Alloue une table pour une marque au sol, si nécessaire.
+// Alloue une table pour une marque au sol, si n�cessaire.
int CD3DEngine::GroundSpotCreate()
{
@@ -2314,7 +2328,7 @@ int CD3DEngine::GroundSpotCreate()
return i;
}
}
- return -1; // pas trouvé
+ return -1; // pas trouv�
}
// Supprime une marque au sol.
@@ -2325,7 +2339,7 @@ void CD3DEngine::GroundSpotDelete(int rank)
m_groundSpot[rank].pos = D3DVECTOR(0.0f, 0.0f, 0.0f);
}
-// Spécifie la position d'une marque au sol de l'objet.
+// Sp�cifie la position d'une marque au sol de l'objet.
BOOL CD3DEngine::SetObjectGroundSpotPos(int rank, const D3DVECTOR &pos)
{
@@ -2333,7 +2347,7 @@ BOOL CD3DEngine::SetObjectGroundSpotPos(int rank, const D3DVECTOR &pos)
return TRUE;
}
-// Spécifie le rayon d'une marque au sol de l'objet.
+// Sp�cifie le rayon d'une marque au sol de l'objet.
BOOL CD3DEngine::SetObjectGroundSpotRadius(int rank, float radius)
{
@@ -2341,7 +2355,7 @@ BOOL CD3DEngine::SetObjectGroundSpotRadius(int rank, float radius)
return TRUE;
}
-// Spécifie la couleur d'une marque au sol.
+// Sp�cifie la couleur d'une marque au sol.
BOOL CD3DEngine::SetObjectGroundSpotColor(int rank, D3DCOLORVALUE color)
{
@@ -2349,7 +2363,7 @@ BOOL CD3DEngine::SetObjectGroundSpotColor(int rank, D3DCOLORVALUE color)
return TRUE;
}
-// Spécifie les hauteurs min/max.
+// Sp�cifie les hauteurs min/max.
BOOL CD3DEngine::SetObjectGroundSpotMinMax(int rank, float min, float max)
{
@@ -2358,7 +2372,7 @@ BOOL CD3DEngine::SetObjectGroundSpotMinMax(int rank, float min, float max)
return TRUE;
}
-// Spécifie le facteur de transition.
+// Sp�cifie le facteur de transition.
BOOL CD3DEngine::SetObjectGroundSpotSmooth(int rank, float smooth)
{
@@ -2367,7 +2381,7 @@ BOOL CD3DEngine::SetObjectGroundSpotSmooth(int rank, float smooth)
}
-// Crée les marques au sol.
+// Cr�e les marques au sol.
int CD3DEngine::GroundMarkCreate(D3DVECTOR pos, float radius,
float delay1, float delay2, float delay3,
@@ -2397,7 +2411,7 @@ BOOL CD3DEngine::GroundMarkDelete(int rank)
}
-// Gestion des frontières (distances limites) pour changer de résolution.
+// Gestion des fronti�res (distances limites) pour changer de r�solution.
// LOD = level-of-detail.
void CD3DEngine::SetLimitLOD(int rank, float limit)
@@ -2412,14 +2426,14 @@ float CD3DEngine::RetLimitLOD(int rank, BOOL bLast)
if ( bLast )
{
limit = m_limitLOD[rank];
- limit *= m_lastDim.x/640.0f; // limite plus loin si fenêtre grande !
+ limit *= m_lastDim.x/640.0f; // limite plus loin si fen�tre grande !
//? limit += m_limitLOD[0]*(m_lastObjectDetail*2.0f-1.0f);
limit += m_limitLOD[0]*(m_lastObjectDetail*2.0f);
}
else
{
limit = m_limitLOD[rank];
- limit *= m_dim.x/640.0f; // limite plus loin si fenêtre grande !
+ limit *= m_dim.x/640.0f; // limite plus loin si fen�tre grande !
//? limit += m_limitLOD[0]*(m_objectDetail*2.0f-1.0f);
limit += m_limitLOD[0]*(m_objectDetail*2.0f);
}
@@ -2429,7 +2443,7 @@ float CD3DEngine::RetLimitLOD(int rank, BOOL bLast)
}
-// Définition de la distance de vision du terrain.
+// D�finition de la distance de vision du terrain.
void CD3DEngine::SetTerrainVision(float vision)
{
@@ -2593,7 +2607,7 @@ D3DCOLOR CD3DEngine::RetFogColor(int rank)
// Gestion de la profondeur de champ.
-// Au-delà de cette distance, plus rien n'est visible.
+// Au-del� de cette distance, plus rien n'est visible.
// Un peu avant (selon SetFogStart), on entre dans le brouillard.
void CD3DEngine::SetDeepView(float length, int rank, BOOL bRef)
@@ -2612,7 +2626,7 @@ float CD3DEngine::RetDeepView(int rank)
}
-// Gestion du départ de brouillard.
+// Gestion du d�part de brouillard.
// Avec 0.0, le brouillard part du point de vue (brouillard max).
// Avec 1.0, le brouillard part de la profondeur de champ (pas de brouillard).
@@ -2627,7 +2641,7 @@ float CD3DEngine::RetFogStart(int rank)
}
-// Donne l'image d'arrière-plan à utiliser.
+// Donne l'image d'arri�re-plan � utiliser.
void CD3DEngine::SetBackground(char *name, D3DCOLOR up, D3DCOLOR down,
D3DCOLOR cloudUp, D3DCOLOR cloudDown,
@@ -2642,7 +2656,7 @@ void CD3DEngine::SetBackground(char *name, D3DCOLOR up, D3DCOLOR down,
m_bBackgroundQuarter = bQuarter;
}
-// Donne l'image d'arrière-plan utilisée.
+// Donne l'image d'arri�re-plan utilis�e.
void CD3DEngine::RetBackground(char *name, D3DCOLOR &up, D3DCOLOR &down,
D3DCOLOR &cloudUp, D3DCOLOR &cloudDown,
@@ -2657,7 +2671,7 @@ void CD3DEngine::RetBackground(char *name, D3DCOLOR &up, D3DCOLOR &down,
bQuarter = m_bBackgroundQuarter;
}
-// Donne l'image d'avant-plan à utiliser.
+// Donne l'image d'avant-plan � utiliser.
void CD3DEngine::SetFrontsizeName(char *name)
{
@@ -2686,7 +2700,7 @@ void CD3DEngine::SetOverColor(D3DCOLOR color, int mode)
-// Gestion de la densité des particules.
+// Gestion de la densit� des particules.
void CD3DEngine::SetParticuleDensity(float value)
{
@@ -2723,7 +2737,7 @@ float CD3DEngine::RetClippingDistance()
return m_clippingDistance;
}
-// Gestion du détail des objets.
+// Gestion du d�tail des objets.
void CD3DEngine::SetObjectDetail(float value)
{
@@ -2737,7 +2751,7 @@ float CD3DEngine::RetObjectDetail()
return m_objectDetail;
}
-// Gestion de la quantité d'objets gadgets.
+// Gestion de la quantit� d'objets gadgets.
void CD3DEngine::SetGadgetQuantity(float value)
{
@@ -2752,7 +2766,7 @@ float CD3DEngine::RetGadgetQuantity()
return m_gadgetQuantity;
}
-// Gestion de la qualité des textures.
+// Gestion de la qualit� des textures.
void CD3DEngine::SetTextureQuality(int value)
{
@@ -2824,7 +2838,7 @@ BOOL CD3DEngine::RetSkyMode()
}
-// Gestion du mode d'arrière-plan.
+// Gestion du mode d'arri�re-plan.
void CD3DEngine::SetBackForce(BOOL bPresent)
{
@@ -2837,7 +2851,7 @@ BOOL CD3DEngine::RetBackForce()
}
-// Gestion du mode des planètes.
+// Gestion du mode des plan�tes.
void CD3DEngine::SetPlanetMode(BOOL bPresent)
{
@@ -2850,7 +2864,7 @@ BOOL CD3DEngine::RetPlanetMode()
}
-// Gestion du mode des lumières dynamiques.
+// Gestion du mode des lumi�res dynamiques.
void CD3DEngine::SetLightMode(BOOL bPresent)
{
@@ -2863,7 +2877,7 @@ BOOL CD3DEngine::RetLightMode()
}
-// Gestion du mode d'indentation pendant l'édition (CEdit).
+// Gestion du mode d'indentation pendant l'�dition (CEdit).
void CD3DEngine::SetEditIndentMode(BOOL bAuto)
{
@@ -2876,7 +2890,7 @@ BOOL CD3DEngine::RetEditIndentMode()
}
-// Gestion de l'avance d'un tabulateur pendant l'édition (CEdit).
+// Gestion de l'avance d'un tabulateur pendant l'�dition (CEdit).
void CD3DEngine::SetEditIndentValue(int value)
{
@@ -2911,7 +2925,7 @@ float CD3DEngine::RetTracePrecision()
}
-// Met à jour la scène après un changement de paramètres.
+// Met � jour la sc�ne apr�s un changement de param�tres.
void CD3DEngine::ApplyChange()
{
@@ -2955,7 +2969,7 @@ POINT CD3DEngine::RetDim()
}
-// Génère un nom de quart d'image.
+// G�n�re un nom de quart d'image.
void QuarterName(char *buffer, char *name, int quarter)
{
@@ -2970,7 +2984,7 @@ void QuarterName(char *buffer, char *name, int quarter)
*buffer++ = 0;
}
-// Libère une texture.
+// Lib�re une texture.
BOOL CD3DEngine::FreeTexture(char* name)
{
@@ -3015,7 +3029,7 @@ BOOL CD3DEngine::LoadTexture(char* name, int stage)
return TRUE;
}
-// Charge toutes les textures de la scène.
+// Charge toutes les textures de la sc�ne.
BOOL CD3DEngine::LoadAllTexture()
{
@@ -3089,7 +3103,7 @@ HRESULT CD3DEngine::OneTimeSceneInit()
}
-// Mise à jour après avoir créé des objets.
+// Mise � jour apr�s avoir cr�� des objets.
void CD3DEngine::Update()
{
@@ -3127,7 +3141,7 @@ HRESULT CD3DEngine::FrameMove(float rTime)
m_groundMark.phase = 3;
}
}
- else if ( m_groundMark.phase == 3 ) // décroissance ?
+ else if ( m_groundMark.phase == 3 ) // d�croissance ?
{
m_groundMark.intensity -= rTime*(1.0f/m_groundMark.delay[2]);
if ( m_groundMark.intensity < 0.0f )
@@ -3148,7 +3162,7 @@ HRESULT CD3DEngine::FrameMove(float rTime)
return S_OK;
}
-// Fait évoluer tout le jeu.
+// Fait �voluer tout le jeu.
void CD3DEngine::StepSimul(float rTime)
{
@@ -3157,8 +3171,8 @@ void CD3DEngine::StepSimul(float rTime)
-// Modifie l'état associé à un matériaux.
-// (*) Ne fonctionne pas sans cette instruction, mystère !
+// Modifie l'�tat associ� � un mat�riaux.
+// (*) Ne fonctionne pas sans cette instruction, myst�re !
void CD3DEngine::SetState(int state, D3DCOLOR color)
{
@@ -3358,7 +3372,7 @@ void CD3DEngine::SetState(int state, D3DCOLOR color)
}
}
-// Spécifie une texture à utiliser.
+// Sp�cifie une texture � utiliser.
void CD3DEngine::SetTexture(char *name, int stage)
{
@@ -3371,7 +3385,7 @@ void CD3DEngine::SetTexture(char *name, int stage)
m_pD3DDevice->SetTexture(stage, D3DTextr_GetSurface(name));
}
-// Spécifie le matérial à utiliser.
+// Sp�cifie le mat�rial � utiliser.
void CD3DEngine::SetMaterial(const D3DMATERIAL7 &mat)
{
@@ -3611,8 +3625,8 @@ D3DCOLORVALUE GetDot(DDSURFACEDESC2* ddsd, int x, int y)
// |---|---|---|-- ... --|---|---|---|
//
// On dessine donc dans des surfaces de 254x254 pixels. Le pixel de
-// marge tout autour est dessiné à double (dans 2 surfaces adjacentes),
-// pour que le filtrage produise des résultats identiques !
+// marge tout autour est dessin� � double (dans 2 surfaces adjacentes),
+// pour que le filtrage produise des r�sultats identiques !
void CD3DEngine::RenderGroundSpot()
{
@@ -3644,7 +3658,7 @@ void CD3DEngine::RenderGroundSpot()
bClear = FALSE;
bSet = FALSE;
- // Calcule la zone à effacer.
+ // Calcule la zone � effacer.
dot = (int)(m_groundMark.drawRadius/2.0f);
tu = (m_groundMark.drawPos.x+1600.0f)/3200.0f;
@@ -3670,7 +3684,7 @@ void CD3DEngine::RenderGroundSpot()
bClear = TRUE;
}
- // Calcule la zone à dessiner.
+ // Calcule la zone � dessiner.
dot = (int)(m_groundMark.radius/2.0f);
tu = (m_groundMark.pos.x+1600.0f)/3200.0f;
@@ -3770,7 +3784,7 @@ void CD3DEngine::RenderGroundSpot()
color.g = m_groundSpot[i].color.g+intensity;
color.b = m_groundSpot[i].color.b+intensity;
- ppx -= min.x; // relatif à la texture
+ ppx -= min.x; // relatif � la texture
ppy -= min.y;
AddDot(&ddsd, (int)ppx, (int)ppy, color);
}
@@ -3838,7 +3852,7 @@ void CD3DEngine::RenderGroundSpot()
if ( ppx < min.x || ppy < min.y ||
ppx >= max.x || ppy >= max.y ) continue;
- ppx -= min.x; // relatif à la texture
+ ppx -= min.x; // relatif � la texture
ppy -= min.y;
intensity = 1.0f-Length((float)ix, (float)iy)/dot;
@@ -3943,11 +3957,11 @@ void CD3DEngine::DrawShadow()
pos = m_shadow[i].pos; // pos = centre de l'ombre au sol
- if ( m_eyePt.y == pos.y ) continue; // caméra au même niveau ?
+ if ( m_eyePt.y == pos.y ) continue; // cam�ra au m�me niveau ?
- // h est la hauteur au dessus du sol à laquelle l'ombre
- // sera dessinée.
- if ( m_eyePt.y > pos.y ) // caméra en dessus ?
+ // h est la hauteur au dessus du sol � laquelle l'ombre
+ // sera dessin�e.
+ if ( m_eyePt.y > pos.y ) // cam�ra en dessus ?
{
height = m_eyePt.y-pos.y;
h = m_shadow[i].radius;
@@ -3963,7 +3977,7 @@ void CD3DEngine::DrawShadow()
pos.z += (m_eyePt.z-pos.z)*d/D;
pos.y += h;
}
- else // caméra en dessous ?
+ else // cam�ra en dessous ?
{
height = pos.y-m_eyePt.y;
h = m_shadow[i].radius;
@@ -3980,7 +3994,7 @@ void CD3DEngine::DrawShadow()
pos.y -= h;
}
- // Le hFactor diminue l'intensité et augmente la taille plus
+ // Le hFactor diminue l'intensit� et augmente la taille plus
// l'objet est haut par rapport au sol.
hFactor = m_shadow[i].height/20.0f;
if ( hFactor < 0.0f ) hFactor = 0.0f;
@@ -4067,20 +4081,20 @@ void CD3DEngine::DrawShadow()
intensity = (0.5f+m_shadow[i].intensity*0.5f)*hFactor;
- // Diminue l'intensité de l'ombre si on est dans la zone
- // comprise entre le début et la fin du brouillard.
+ // Diminue l'intensit� de l'ombre si on est dans la zone
+ // comprise entre le d�but et la fin du brouillard.
if ( D > startDeepView )
{
intensity *= 1.0f-(D-startDeepView)/(endDeepView-startDeepView);
}
- // Diminue l'intensité si on est presque à l'horizontale
- // avec l'ombre (ombre très platte).
+ // Diminue l'intensit� si on est presque � l'horizontale
+ // avec l'ombre (ombre tr�s platte).
//? if ( height < 4.0f ) intensity *= height/4.0f;
if ( intensity == 0.0f ) continue;
- if ( lastIntensity != intensity ) // intensité changée ?
+ if ( lastIntensity != intensity ) // intensit� chang�e ?
{
lastIntensity = intensity;
SetState(D3DSTATETTw, RetColor(intensity));
@@ -4146,8 +4160,8 @@ HRESULT CD3DEngine::Render()
if ( m_bDrawWorld )
{
- DrawBackground(); // dessine l'arrière-plan
- if ( m_bPlanetMode ) DrawPlanet(); // dessine les planètes
+ DrawBackground(); // dessine l'arri�re-plan
+ if ( m_bPlanetMode ) DrawPlanet(); // dessine les plan�tes
if ( m_bSkyMode ) m_cloud->Draw(); // dessine les nuages
// Display the objects
@@ -4375,12 +4389,12 @@ HRESULT CD3DEngine::Render()
//? m_cloud->Draw(); // dessine les nuages
m_particule->DrawParticule(SH_WORLD); // dessine les particules du monde 3D
- m_blitz->Draw(); // dessine les éclairs
+ m_blitz->Draw(); // dessine les �clairs
if ( m_bLensMode ) DrawFrontsize(); // dessine l'avant-plan
if ( !m_bOverFront ) DrawOverColor(); // dessine la couleur d'avant-plan
}
- // Dessine l'interface utilisateur par-dessus la scène.
+ // Dessine l'interface utilisateur par-dessus la sc�ne.
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE);
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_AMBIENT, 0xffffffff);
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_LIGHTING, FALSE);
@@ -4499,20 +4513,20 @@ HRESULT CD3DEngine::Render()
}
-// Dessine le dégradé d'arrière-plan.
+// Dessine le d�grad� d'arri�re-plan.
void CD3DEngine::DrawBackground()
{
if ( m_bSkyMode && m_cloud->RetLevel() != 0.0f ) // nuages ?
{
- if ( m_backgroundCloudUp != m_backgroundCloudDown ) // dégradé ?
+ if ( m_backgroundCloudUp != m_backgroundCloudDown ) // d�grad� ?
{
DrawBackgroundGradient(m_backgroundCloudUp, m_backgroundCloudDown);
}
}
else
{
- if ( m_backgroundColorUp != m_backgroundColorDown ) // dégradé ?
+ if ( m_backgroundColorUp != m_backgroundColorDown ) // d�grad� ?
{
DrawBackgroundGradient(m_backgroundColorUp, m_backgroundColorDown);
}
@@ -4524,7 +4538,7 @@ void CD3DEngine::DrawBackground()
}
}
-// Dessine le dégradé d'arrière-plan.
+// Dessine le d�grad� d'arri�re-plan.
void CD3DEngine::DrawBackgroundGradient(D3DCOLOR up, D3DCOLOR down)
{
@@ -4563,7 +4577,7 @@ void CD3DEngine::DrawBackgroundGradient(D3DCOLOR up, D3DCOLOR down)
AddStatisticTriangle(2);
}
-// Dessine une partie de l'image d'arrière-plan.
+// Dessine une partie de l'image d'arri�re-plan.
void CD3DEngine::DrawBackgroundImageQuarter(FPOINT p1, FPOINT p2, char *name)
{
@@ -4627,7 +4641,7 @@ void CD3DEngine::DrawBackgroundImageQuarter(FPOINT p1, FPOINT p2, char *name)
AddStatisticTriangle(2);
}
-// Dessine l'image d'arrière-plan.
+// Dessine l'image d'arri�re-plan.
void CD3DEngine::DrawBackgroundImage()
{
@@ -4674,7 +4688,7 @@ void CD3DEngine::DrawBackgroundImage()
}
}
-// Dessine toutes les planètes.
+// Dessine toutes les plan�tes.
void CD3DEngine::DrawPlanet()
{
@@ -4690,7 +4704,7 @@ void CD3DEngine::DrawPlanet()
m_pD3DDevice->SetTransform(D3DTRANSFORMSTATE_PROJECTION, &m_matProjInterface);
m_pD3DDevice->SetTransform(D3DTRANSFORMSTATE_WORLD, &m_matWorldInterface);
- m_planet->Draw(); // dessine les planètes
+ m_planet->Draw(); // dessine les plan�tes
}
// Dessine l'image d'avant-plan.
@@ -4789,7 +4803,7 @@ void CD3DEngine::DrawOverColor()
}
-// Donne la liste des rangs des objets et sous-objets sélectionnés.
+// Donne la liste des rangs des objets et sous-objets s�lectionn�s.
void CD3DEngine::SetHiliteRank(int *rankList)
{
@@ -4803,7 +4817,7 @@ void CD3DEngine::SetHiliteRank(int *rankList)
m_hiliteRank[i] = -1; // terminateur
}
-// Donne la bbox dans l'écran 2D d'un objet quelconque.
+// Donne la bbox dans l'�cran 2D d'un objet quelconque.
BOOL CD3DEngine::GetBBox2D(int objRank, FPOINT &min, FPOINT &max)
{
@@ -4840,8 +4854,8 @@ BOOL CD3DEngine::GetBBox2D(int objRank, FPOINT &min, FPOINT &max)
return TRUE;
}
-// Détermine le rectangle de l'objet mis en évidence, qui sera
-// dessiné par CD3DApplication.
+// D�termine le rectangle de l'objet mis en �vidence, qui sera
+// dessin� par CD3DApplication.
void CD3DEngine::DrawHilite()
{
@@ -4870,7 +4884,7 @@ void CD3DEngine::DrawHilite()
max.x == -1000000.0f ||
max.y == -1000000.0f )
{
- m_bHilite = FALSE; // pas de mise en évidence
+ m_bHilite = FALSE; // pas de mise en �vidence
}
else
{
@@ -4880,7 +4894,7 @@ void CD3DEngine::DrawHilite()
}
}
-// Donne le rectangle de mise en évidence à dessiner
+// Donne le rectangle de mise en �vidence � dessiner
// par CD3DApplication.
BOOL CD3DEngine::GetHilite(FPOINT &p1, FPOINT &p2)
@@ -4945,7 +4959,7 @@ BOOL IsExcludeColor(FPOINT *pExclu, int x, int y)
i += 2;
}
- return FALSE; // point à inclure
+ return FALSE; // point � inclure
}
// Change la couleur d'une texture.
@@ -5240,7 +5254,7 @@ BOOL CD3DEngine::CloseImage()
}
-// Ecrit un fichier .BMP copie d'écran.
+// Ecrit un fichier .BMP copie d'�cran.
BOOL CD3DEngine::WriteScreenShot(char *filename, int width, int height)
{
@@ -5254,7 +5268,7 @@ BOOL CD3DEngine::GetRenderDC(HDC &hDC)
return m_app->GetRenderDC(hDC);
}
-// Libère le hDC sur la surface de rendu.
+// Lib�re le hDC sur la surface de rendu.
BOOL CD3DEngine::ReleaseRenderDC(HDC &hDC)
{
@@ -5271,7 +5285,7 @@ BOOL CD3DEngine::CreateBMPFile(LPTSTR pszFile, PBITMAPINFO pbi, HBITMAP hBMP, HD
return m_app->CreateBMPFile(pszFile, pbi, hBMP, hDC);
}
-// Retourne le pointeur à la classe CText.
+// Retourne le pointeur � la classe CText.
CText* CD3DEngine::RetText()
{
@@ -5279,7 +5293,7 @@ CText* CD3DEngine::RetText()
}
-// Gestion du texte d'informations affiché dans la fenêtre.
+// Gestion du texte d'informations affich� dans la fen�tre.
void CD3DEngine::SetInfoText(int line, char* text)
{
@@ -5293,7 +5307,7 @@ char* CD3DEngine::RetInfoText(int line)
-// Spécifie la focale de la caméra.
+// Sp�cifie la focale de la cam�ra.
// 0.75 = normal
// 1.50 = grand-angle
@@ -5330,14 +5344,14 @@ void CD3DEngine::UpdateMatProj()
-// Ignore les touches pressées.
+// Ignore les touches press�es.
void CD3DEngine::FlushPressKey()
{
m_app->FlushPressKey();
}
-// Remet les touches par défaut.
+// Remet les touches par d�faut.
void CD3DEngine::ResetKey()
{
@@ -5415,7 +5429,7 @@ HRESULT CD3DEngine::InitDeviceObjects()
SetFocus(m_focus);
- // Définitions des matrices pour l'interface.
+ // D�finitions des matrices pour l'interface.
D3DUtil_SetIdentityMatrix(m_matWorldInterface);
D3DUtil_SetIdentityMatrix(m_matViewInterface);
diff --git a/src/d3dengine.h b/src/d3dengine.h
index 8bc2c4e..59bdd71 100644
--- a/src/d3dengine.h
+++ b/src/d3dengine.h
@@ -1,4 +1,18 @@
-// D3DEngine.h
+// * 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 .
#ifndef _D3DENGINE_H_
#define _D3DENGINE_H_
@@ -33,7 +47,7 @@ enum D3DTypeObj
TYPEVEHICULE = 3, // objet mobile
TYPEDESCENDANT = 4, // partie d'un objet mobile
TYPEQUARTZ = 5, // objet fixe de type quartz
- TYPEMETAL = 6, // objet fixe de type métalique
+ TYPEMETAL = 6, // objet fixe de type m�talique
};
enum D3DTypeTri
@@ -81,12 +95,12 @@ enum D3DShadowType
};
-#define D3DSTATENORMAL 0 // matériaux opaque normal
+#define D3DSTATENORMAL 0 // mat�riaux opaque normal
#define D3DSTATETTb (1<<0) // transparent selon texture (noir=rien)
#define D3DSTATETTw (1<<1) // transparent selon texture (blanc=rien)
#define D3DSTATETD (1<<2) // transparent selon couleur diffuse
-#define D3DSTATEWRAP (1<<3) // texture wrappée
-#define D3DSTATECLAMP (1<<4) // texture bordée d'une couleur unie
+#define D3DSTATEWRAP (1<<3) // texture wrapp�e
+#define D3DSTATECLAMP (1<<4) // texture bord�e d'une couleur unie
#define D3DSTATELIGHT (1<<5) // texture lumineuse (ambiance max)
#define D3DSTATEDUALb (1<<6) // double texturage noir
#define D3DSTATEDUALw (1<<7) // double texturage blanc
@@ -96,7 +110,7 @@ enum D3DShadowType
#define D3DSTATEPART4 (1<<11) // partie 4
#define D3DSTATE2FACE (1<<12) // mode double-face
#define D3DSTATEALPHA (1<<13) // image avec canal alpha
-#define D3DSTATESECOND (1<<14) // utilise tjrs 2ème étage de texturage
+#define D3DSTATESECOND (1<<14) // utilise tjrs 2�me �tage de texturage
#define D3DSTATEFOG (1<<15) // force le brouillard
#define D3DSTATETCb (1<<16) // transparent selon couleur (noir=rien)
#define D3DSTATETCw (1<<17) // transparent selon couleur (blanc=rien)
@@ -174,16 +188,16 @@ typedef struct
{
char bUsed; // TRUE -> objet existe
char bVisible; // TRUE -> objet visible
- char bDrawWorld; // TRUE -> dessine derrière l'interface
+ char bDrawWorld; // TRUE -> dessine derri�re l'interface
char bDrawFront; // TRUE -> dessine devant l'interface
- int totalTriangle; // nb de triangles utilisés
+ int totalTriangle; // nb de triangles utilis�s
D3DTypeObj type; // type de l'objet (TYPE*)
D3DMATRIX transform; // matrice de transformation
float distance; // distance point de vue - origine
D3DVECTOR bboxMin; // bounding box de l'objet
D3DVECTOR bboxMax; // (l'origine 0;0;0 est tjrs incluse)
- float radius; // rayon de la sphère à l'origine
- int shadowRank; // rang de l'ombre associée
+ float radius; // rayon de la sph�re � l'origine
+ int shadowRank; // rang de l'ombre associ�e
float transparency; // transparence de l'objet (0..1)
}
D3DObject;
@@ -191,14 +205,14 @@ D3DObject;
typedef struct
{
char bUsed; // TRUE -> objet existe
- char bHide; // TRUE -> ombre invisible (objet porté par ex.)
+ char bHide; // TRUE -> ombre invisible (objet port� par ex.)
int objRank; // rang de l'objet
D3DShadowType type; // type de l'ombre
D3DVECTOR pos; // position pour l'ombre
D3DVECTOR normal; // normale au terrain
float angle; // angle de l'ombre
float radius; // rayon de l'ombre
- float intensity; // intensité de l'ombre
+ float intensity; // intensit� de l'ombre
float height; // hauteur depuis le sol
}
D3DShadow;
@@ -211,26 +225,26 @@ typedef struct
float smooth; // zone de transition
D3DVECTOR pos; // position pour l'ombre
float radius; // rayon de l'ombre
- D3DVECTOR drawPos; // position pour l'ombre dessinée
- float drawRadius; // rayon de l'ombre dessinée
+ D3DVECTOR drawPos; // position pour l'ombre dessin�e
+ float drawRadius; // rayon de l'ombre dessin�e
}
D3DGroundSpot;
typedef struct
{
char bUsed; // TRUE -> objet existe
- char bDraw; // TRUE -> marque dessinée
- int phase; // 1=croissance, 2=fixe, 3=décroissance
- float delay[3]; // délais pour les 3 phases
+ char bDraw; // TRUE -> marque dessin�e
+ int phase; // 1=croissance, 2=fixe, 3=d�croissance
+ float delay[3]; // d�lais pour les 3 phases
float fix; // temps fixe
D3DVECTOR pos; // position pour marques
float radius; // rayon des marques
- float intensity; // intensité couleur
- D3DVECTOR drawPos; // position pour marques dessinées
- float drawRadius; // rayon des marques dessinées
- float drawIntensity; // intensité dessinée
+ float intensity; // intensit� couleur
+ D3DVECTOR drawPos; // position pour marques dessin�es
+ float drawRadius; // rayon des marques dessin�es
+ float drawIntensity; // intensit� dessin�e
int dx, dy; // dimensions table
- char* table; // pointeur à la table
+ char* table; // pointeur � la table
}
D3DGroundMark;
diff --git a/src/d3denum.cpp b/src/d3denum.cpp
index 7f24c98..8ef2d09 100644
--- a/src/d3denum.cpp
+++ b/src/d3denum.cpp
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DEnum.cpp
-//
-// Desc: Functions to enumerate DDraw/D3D drivers, devices, and modes.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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
#include <windowsx.h>
#include <stdio.h>
diff --git a/src/d3denum.h b/src/d3denum.h
index 9b75611..dd71dd6 100644
--- a/src/d3denum.h
+++ b/src/d3denum.h
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DEnum.h
-//
-// Desc: Functions to enumerate DDraw/D3D drivers, devices, and modes.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DENUM_H
#define D3DENUM_H
#include <d3d.h>
diff --git a/src/d3dframe.cpp b/src/d3dframe.cpp
index a1189d1..86720f3 100644
--- a/src/d3dframe.cpp
+++ b/src/d3dframe.cpp
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DFrame.cpp
-//
-// Desc: Class functions to implement a Direct3D app framework.
-//
-// Copyright (c) 1995-1999 by Microsoft, all rights reserved
-//-----------------------------------------------------------------------------
+// * 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
#include <windows.h>
#include <stdio.h>
diff --git a/src/d3dframe.h b/src/d3dframe.h
index 2ac913e..60122fb 100644
--- a/src/d3dframe.h
+++ b/src/d3dframe.h
@@ -1,23 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DFrame.h
-//
-// Desc: Class to manage the Direct3D environment objects such as buffers,
-// viewports, and 3D devices.
-//
-// The class is initialized with the Initialize() function, after which
-// the Get????() functions can be used to access the objects needed for
-// rendering. If the device or display needs to be changed, the
-// ChangeDevice() function can be called. If the display window is moved
-// the changes need to be reported with the Move() function.
-//
-// After rendering a frame, the ShowFrame() function filps or blits the
-// backbuffer contents to the primary. If surfaces are lost, they can be
-// restored with the RestoreSurfaces() function. Finally, if normal
-// Windows output is needed, the FlipToGDISurface() provides a GDI
-// surface to draw on.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DFRAME_H
#define D3DFRAME_H
#include <ddraw.h>
diff --git a/src/d3dmath.cpp b/src/d3dmath.cpp
index 79ea56f..0e94ed6 100644
--- a/src/d3dmath.cpp
+++ b/src/d3dmath.cpp
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DMath.cpp
-//
-// Desc: Shortcut macros and functions for using DX objects
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 D3D_OVERLOADS
#define STRICT
#include <math.h>
diff --git a/src/d3dmath.h b/src/d3dmath.h
index 8315d88..7793608 100644
--- a/src/d3dmath.h
+++ b/src/d3dmath.h
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DMath.h
-//
-// Desc: Math functions and shortcuts for Direct3D programming.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DMATH_H
#define D3DMATH_H
#include <ddraw.h>
diff --git a/src/d3dres.h b/src/d3dres.h
index c9d1df9..dfd87dd 100644
--- a/src/d3dres.h
+++ b/src/d3dres.h
@@ -1,12 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DRes.h
-//
-// Desc: Resource definitions required by the CD3DApplication class.
-// Any application using the CD3DApplication class must include resources
-// with the following identifiers.
-//
-// Copyright (c) 1999 Microsoft Corporation. All rights reserved.
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DRES_H
#define D3DRES_H
diff --git a/src/d3dtextr.cpp b/src/d3dtextr.cpp
index f3364f6..6968ffd 100644
--- a/src/d3dtextr.cpp
+++ b/src/d3dtextr.cpp
@@ -1,15 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DTextr.cpp
-//
-// Desc: Functions to manage textures, including creating (loading from a
-// file), restoring lost surfaces, invalidating, and destroying.
-//
-// Note: the implementation of these fucntions maintain an internal list
-// of loaded textures. After creation, individual textures are referenced
-// via their ASCII names.
-//
-// Copyright (c) 1996-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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
#include <tchar.h>
#include <stdio.h>
@@ -455,7 +458,7 @@ HRESULT TextureContainer::LoadTargaFile( TCHAR* strMetaname, TCHAR* strFilename
for( DWORD i=0; i<(m_dwWidth*m_dwHeight); i++ )
{
//? if( m_pRGBAData[i] & 0x000000ff != 0xff )
- if( (m_pRGBAData[i] & 0x000000ff) != 0xff ) // erreur corrigée !
+ if( (m_pRGBAData[i] & 0x000000ff) != 0xff ) // erreur corrig�e !
{
m_bHasAlpha = TRUE;
break;
diff --git a/src/d3dtextr.h b/src/d3dtextr.h
index 72d4430..e1ed169 100644
--- a/src/d3dtextr.h
+++ b/src/d3dtextr.h
@@ -1,15 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DTextr.h
-//
-// Desc: Functions to manage textures, including creating (loading from a
-// file), restoring lost surfaces, invalidating, and destroying.
-//
-// Note: the implementation of these fucntions maintain an internal list
-// of loaded textures. After creation, individual textures are referenced
-// via their ASCII names.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DTEXTR_H
#define D3DTEXTR_H
#include <ddraw.h>
diff --git a/src/d3dutil.cpp b/src/d3dutil.cpp
index 8362f9f..472c24e 100644
--- a/src/d3dutil.cpp
+++ b/src/d3dutil.cpp
@@ -1,11 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DUtil.cpp
-//
-// Desc: Shortcut macros and functions for using DX objects
-//
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 D3D_OVERLOADS
#define STRICT
#include <math.h>
diff --git a/src/d3dutil.h b/src/d3dutil.h
index 476f142..295da7a 100644
--- a/src/d3dutil.h
+++ b/src/d3dutil.h
@@ -1,10 +1,18 @@
-//-----------------------------------------------------------------------------
-// File: D3DUtil.h
-//
-// Desc: Helper functions and typing shortcuts for Direct3D programming.
-//
-// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved
-//-----------------------------------------------------------------------------
+// * 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 .
#ifndef D3DUTIL_H
#define D3DUTIL_H
#include <ddraw.h>
diff --git a/src/dd.cpp b/src/dd.cpp
index 6e3dc10..b873468 100644
--- a/src/dd.cpp
+++ b/src/dd.cpp
@@ -1,4 +1,18 @@
-// Compilation d'une procédure avec un "point".
+// * 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 .
int cPoint(CBotVar* &var, CBotString& retClass, void* user)
{
@@ -26,7 +40,7 @@ int cPoint(CBotVar* &var, CBotString& retClass, void* user)
return CBotErrBadParam;
}
-// Donne un paramètre de type "point".
+// Donne un param�tre de type "point".
BOOL GetPoint(CBotVar* &var, int& exception, D3DVECTOR& pos)
{
diff --git a/src/displayinfo.cpp b/src/displayinfo.cpp
index 3adc5b8..ed66261 100644
--- a/src/displayinfo.cpp
+++ b/src/displayinfo.cpp
@@ -1,4 +1,18 @@
-// displayinfo.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
@@ -69,7 +83,7 @@ CDisplayInfo::~CDisplayInfo()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CDisplayInfo::EventProcess(const Event &event)
{
@@ -195,7 +209,7 @@ BOOL CDisplayInfo::EventProcess(const Event &event)
UpdateCopyButton();
}
- if ( event.event == EVENT_WINDOW4 ) // fenêtre déplacée ?
+ if ( event.event == EVENT_WINDOW4 ) // fen�tre d�plac�e ?
{
m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->RetPos();
m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->RetDim();
@@ -258,7 +272,7 @@ BOOL CDisplayInfo::EventProcess(const Event &event)
}
-// Fait évoluer le cerveau selon le temps écoulé.
+// Fait �voluer le cerveau selon le temps �coul�.
BOOL CDisplayInfo::EventFrame(const Event &event)
{
@@ -281,7 +295,7 @@ BOOL CDisplayInfo::EventFrame(const Event &event)
}
-// Met à jour les boutons pour les liens hyper-texte.
+// Met � jour les boutons pour les liens hyper-texte.
void CDisplayInfo::HyperUpdate()
{
@@ -318,7 +332,7 @@ void CDisplayInfo::HyperUpdate()
}
-// Début de l'affichage des informations.
+// D�but de l'affichage des informations.
void CDisplayInfo::StartDisplayInfo(char *filename, int index, BOOL bSoluce)
{
@@ -336,7 +350,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, BOOL bSoluce)
//? CreateObjectsFile();
m_bEditLock = m_main->RetEditLock();
- if ( m_bEditLock ) // édition programme en cours ?
+ if ( m_bEditLock ) // �dition programme en cours ?
{
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW3);
if ( pw != 0 )
@@ -398,7 +412,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, BOOL bSoluce)
button = pw->CreateButton(pos, dim, 20, EVENT_SATCOM_SOLUCE);
button->SetState(STATE_SHADOW);
- pw->CreateGroup(pos, dim, 18, EVENT_LABEL1); // flèche >
+ pw->CreateGroup(pos, dim, 18, EVENT_LABEL1); // fl�che >
pw->CreateGroup(pos, dim, 19, EVENT_LABEL2); // sigle SatCom
button = pw->CreateButton(pos, dim, 55, EVENT_HYPER_PREV);
@@ -458,7 +472,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, BOOL bSoluce)
m_light->SetLightExcluType(m_lightSuppl, TYPETERRAIN);
}
-// Repositionne tous les contrôles d'édition.
+// Repositionne tous les contr�les d'�dition.
void CDisplayInfo::AdjustDisplayInfo(FPOINT wpos, FPOINT wdim)
{
@@ -822,12 +836,12 @@ void CDisplayInfo::StopDisplayInfo()
m_interface->DeleteControl(EVENT_WINDOW4);
- if ( m_bEditLock ) // édition programme en cours ?
+ if ( m_bEditLock ) // �dition programme en cours ?
{
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW3);
if ( pw != 0 )
{
- pw->SetState(STATE_ENABLE); // CStudio opérationnel
+ pw->SetState(STATE_ENABLE); // CStudio op�rationnel
}
}
else
@@ -857,7 +871,7 @@ void CDisplayInfo::StopDisplayInfo()
}
-// Spécifie la position.
+// Sp�cifie la position.
void CDisplayInfo::SetPosition(int pos)
{
@@ -932,7 +946,7 @@ CObject* CDisplayInfo::SearchToto()
}
-// Création de la liste des objets.
+// Cr�ation de la liste des objets.
typedef struct
{
@@ -991,7 +1005,7 @@ void ObjectWrite(FILE* file, ObjectList list[], int i)
fputs(line, file);
}
-// Crée le fichier contenant la liste des objets.
+// Cr�e le fichier contenant la liste des objets.
void CDisplayInfo::CreateObjectsFile()
{
diff --git a/src/displayinfo.h b/src/displayinfo.h
index 88f3721..f659266 100644
--- a/src/displayinfo.h
+++ b/src/displayinfo.h
@@ -1,4 +1,18 @@
-// displayinfo.h
+// * 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 .
#ifndef _DISPLAYINFO_H_
#define _DISPLAYINFO_H_
diff --git a/src/displaytext.cpp b/src/displaytext.cpp
index f9c6312..5e40c00 100644
--- a/src/displaytext.cpp
+++ b/src/displaytext.cpp
@@ -1,4 +1,18 @@
-// displaytext.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
@@ -50,7 +64,7 @@ CDisplayText::CDisplayText(CInstanceManager* iMan)
m_visitGoal[i] = D3DVECTOR(0.0f, 0.0f, 0.0f);
m_visitDist[i] = 0.0f;
m_visitHeight[i] = 0.0f;
- m_time[i] = 0.0f; // rien d'affiché
+ m_time[i] = 0.0f; // rien d'affich�
}
m_bHide = FALSE;
@@ -66,7 +80,7 @@ CDisplayText::~CDisplayText()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CDisplayText::DeleteObject()
{
@@ -74,7 +88,7 @@ void CDisplayText::DeleteObject()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CDisplayText::EventProcess(const Event &event)
{
@@ -382,7 +396,7 @@ BOOL CDisplayText::ClearLastText()
if ( pw == 0 ) return FALSE;
pb2 = (CButton*)pw->SearchControl(EVENT_DT_VISIT0);
- if ( pb2 == 0 ) return FALSE; // même pas de première ligne
+ if ( pb2 == 0 ) return FALSE; // m�me pas de premi�re ligne
pg2 = (CGroup*)pw->SearchControl(EVENT_DT_GROUP0);
if ( pg2 == 0 ) return FALSE;
pl2 = (CLabel*)pw->SearchControl(EVENT_DT_LABEL0);
@@ -421,7 +435,7 @@ BOOL CDisplayText::ClearLastText()
}
-// Spécifie le facteur du délai.
+// Sp�cifie le facteur du d�lai.
void CDisplayText::SetDelay(float factor)
{
@@ -471,7 +485,7 @@ float CDisplayText::RetVisitHeight(EventMsg event)
}
-// Retourne la distance de visite idéale pour un objet donné.
+// Retourne la distance de visite id�ale pour un objet donn�.
float CDisplayText::RetIdealDist(CObject* pObj)
{
@@ -490,7 +504,7 @@ float CDisplayText::RetIdealDist(CObject* pObj)
return 60.0f;
}
-// Retourne la hauteur de visite idéale pour un objet donné.
+// Retourne la hauteur de visite id�ale pour un objet donn�.
float CDisplayText::RetIdealHeight(CObject* pObj)
{
diff --git a/src/displaytext.h b/src/displaytext.h
index 3f138f2..9f65866 100644
--- a/src/displaytext.h
+++ b/src/displaytext.h
@@ -1,4 +1,18 @@
-// displaytext.h
+// * 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 .
#ifndef _DISPLAYTEXT_H_
#define _DISPLAYTEXT_H_
diff --git a/src/edit.cpp b/src/edit.cpp
index 6d4beac..6d9babe 100644
--- a/src/edit.cpp
+++ b/src/edit.cpp
@@ -1,4 +1,18 @@
-// edit.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
@@ -24,14 +38,14 @@
#define MARGY (5.0f/480.0f)
#define MARGYS (4.0f/480.0f)
#define MARGY1 (1.0f/480.0f)
-#define DELAY_DBCLICK 0.3f // délai pour double-clic
-#define DELAY_SCROLL 0.1f // délai pour défilement
+#define DELAY_DBCLICK 0.3f // d�lai pour double-clic
+#define DELAY_SCROLL 0.1f // d�lai pour d�filement
#define BIG_FONT 1.6f // agrandissement pour \b;
-// Indique si un caractère est un espace.
+// Indique si un caract�re est un espace.
BOOL IsSpace(int character)
{
@@ -40,7 +54,7 @@ BOOL IsSpace(int character)
character == '\n' );
}
-// Indique si un caractère fait partie d'un mot.
+// Indique si un caract�re fait partie d'un mot.
BOOL IsWord(int character)
{
@@ -53,7 +67,7 @@ BOOL IsWord(int character)
c == '_' );
}
-// Indique si un caractère est un séparateur de mot.
+// Indique si un caract�re est un s�parateur de mot.
BOOL IsSep(int character)
{
@@ -122,7 +136,7 @@ CEdit::~CEdit()
}
-// Crée une nouvelle ligne éditable.
+// Cr�e une nouvelle ligne �ditable.
BOOL CEdit::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -148,7 +162,7 @@ BOOL CEdit::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
else
{
m_bMulti = TRUE;
- MoveAdjust(); // réajuste en mode multi-lignes
+ MoveAdjust(); // r�ajuste en mode multi-lignes
m_scroll = new CScroll(m_iMan);
pc = (CScroll*)m_scroll;
pc->Create(pos, dim, -1, EVENT_NULL);
@@ -217,7 +231,7 @@ void CEdit::MoveAdjust()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CEdit::EventProcess(const Event &event)
{
@@ -524,7 +538,7 @@ BOOL CEdit::EventProcess(const Event &event)
}
-// Envoie un événement pour indiquer que le texte a été modifié.
+// Envoie un �v�nement pour indiquer que le texte a �t� modifi�.
void CEdit::SendModifEvent()
{
@@ -535,7 +549,7 @@ void CEdit::SendModifEvent()
}
-// Détecte si la souris est sur un caractère lien hypertexte.
+// D�tecte si la souris est sur un caract�re lien hypertexte.
BOOL CEdit::IsLinkPos(FPOINT pos)
{
@@ -552,7 +566,7 @@ BOOL CEdit::IsLinkPos(FPOINT pos)
}
-// Positionne le curseur suite à un double-clic.
+// Positionne le curseur suite � un double-clic.
void CEdit::MouseDoubleClick(FPOINT mouse)
{
@@ -582,7 +596,7 @@ void CEdit::MouseDoubleClick(FPOINT mouse)
else // mono-ligne ?
{
m_cursor2 = 0;
- m_cursor1 = m_len; // sélectionne tout
+ m_cursor1 = m_len; // s�lectionne tout
}
m_bUndoForce = TRUE;
@@ -591,7 +605,7 @@ void CEdit::MouseDoubleClick(FPOINT mouse)
ColumnFix();
}
-// Positionne le curseur suite à un clic.
+// Positionne le curseur suite � un clic.
void CEdit::MouseClick(FPOINT mouse)
{
@@ -605,12 +619,12 @@ void CEdit::MouseClick(FPOINT mouse)
m_cursor1 = i;
m_cursor2 = i;
m_bUndoForce = TRUE;
- m_timeBlink = 0.0f; // allume le curseur immédiatement
+ m_timeBlink = 0.0f; // allume le curseur imm�diatement
ColumnFix();
}
}
-// Positionne le curseur suite à un clic relâché.
+// Positionne le curseur suite � un clic rel�ch�.
void CEdit::MouseRelease(FPOINT mouse)
{
@@ -638,7 +652,7 @@ void CEdit::MouseRelease(FPOINT mouse)
}
}
-// Positionne le curseur suite à un déplacement.
+// Positionne le curseur suite � un d�placement.
void CEdit::MouseMove(FPOINT mouse)
{
@@ -665,12 +679,12 @@ void CEdit::MouseMove(FPOINT mouse)
{
m_cursor1 = i;
m_bUndoForce = TRUE;
- m_timeBlink = 0.0f; // allume le curseur immédiatement
+ m_timeBlink = 0.0f; // allume le curseur imm�diatement
ColumnFix();
}
}
-// Positionne le curseur suite à un clic.
+// Positionne le curseur suite � un clic.
int CEdit::MouseDetect(FPOINT mouse)
{
@@ -747,7 +761,7 @@ void CEdit::HyperHome(char *filename)
HyperAdd(filename, 0);
}
-// Effectue un hyper saut à travers un lien.
+// Effectue un hyper saut � travers un lien.
void CEdit::HyperJump(char *name, char *marker)
{
@@ -798,7 +812,7 @@ void CEdit::HyperJump(char *name, char *marker)
}
}
-// Ajoute un texte visité à l'historique.
+// Ajoute un texte visit� � l'historique.
BOOL CEdit::HyperAdd(char *filename, int firstLine)
{
@@ -834,7 +848,7 @@ BOOL CEdit::HyperTest(EventMsg event)
return FALSE;
}
-// Effectue l'action correspondant à un bouton EVENT_HYPER_*.
+// Effectue l'action correspondant � un bouton EVENT_HYPER_*.
BOOL CEdit::HyperGo(EventMsg event)
{
@@ -864,7 +878,7 @@ BOOL CEdit::HyperGo(EventMsg event)
}
-// Dessine la ligne éditable.
+// Dessine la ligne �ditable.
void CEdit::Draw()
{
@@ -919,7 +933,7 @@ void CEdit::Draw()
{
for ( j=0 ; j<m_lineIndent[i] ; j++ )
{
- char s = '\t'; // ligne | pointillée
+ char s = '\t'; // ligne | pointill�e
m_engine->RetText()->DrawText(&s, 1, pos, 1.0f, 1, m_fontSize, m_fontStretch, m_fontType, 0);
pos.x += indentLength;
}
@@ -939,7 +953,7 @@ void CEdit::Draw()
end.x = dim.x-MARGX*2.0f;
start.y = ppos.y-(m_bMulti?0.0f:MARGY1)-m_lineHeight*(BIG_FONT-1.0f);
end.y = m_lineHeight*BIG_FONT;
- DrawPart(start, end, 2); // fond bleu dégradé ->
+ DrawPart(start, end, 2); // fond bleu d�grad� ->
size *= BIG_FONT;
ppos.y -= m_lineHeight*(BIG_FONT-1.0f);
@@ -953,7 +967,7 @@ void CEdit::Draw()
end.x = dim.x-MARGX*2.0f;
start.y = ppos.y-(m_bMulti?0.0f:MARGY1);
end.y = m_lineHeight;
- DrawPart(start, end, 2); // fond bleu dégradé ->
+ DrawPart(start, end, 2); // fond bleu d�grad� ->
}
// Sous-titre \s; ?
@@ -964,7 +978,7 @@ void CEdit::Draw()
end.x = dim.x-MARGX*2.0f;
start.y = ppos.y-(m_bMulti?0.0f:MARGY1);
end.y = m_lineHeight;
- DrawPart(start, end, 3); // fond jaune dégradé ->
+ DrawPart(start, end, 3); // fond jaune d�grad� ->
}
// Tableau \tab; ?
@@ -975,7 +989,7 @@ void CEdit::Draw()
end.x = dim.x-MARGX*2.0f;
start.y = ppos.y-(m_bMulti?0.0f:MARGY1);
end.y = m_lineHeight;
- DrawPart(start, end, 11); // fond orange dégradé ->
+ DrawPart(start, end, 11); // fond orange d�grad� ->
}
// Image \image; ?
@@ -991,7 +1005,7 @@ void CEdit::Draw()
line ++;
}
- iIndex = m_text[beg]; // caractère = index dans m_image
+ iIndex = m_text[beg]; // caract�re = index dans m_image
pos.y -= m_lineHeight*(line-1);
DrawImage(pos, m_image[iIndex].name,
m_image[iIndex].width*(m_fontSize/SMALLFONT),
@@ -1003,7 +1017,7 @@ void CEdit::Draw()
if ( ((m_bEdit && m_bFocus && m_bHilite) ||
(!m_bEdit && m_bHilite) ) &&
- c1 != c2 && beg <= c2 && beg+len >= c1 ) // zone sélectionnée ?
+ c1 != c2 && beg <= c2 && beg+len >= c1 ) // zone s�lectionn�e ?
{
o1 = c1; if ( o1 < beg ) o1 = beg;
o2 = c2; if ( o2 > beg+len ) o2 = beg+len;
@@ -1033,7 +1047,7 @@ void CEdit::Draw()
}
if ( beg+len >= m_len )
{
- eol = 2; // carré (eot)
+ eol = 2; // carr� (eot)
}
if ( !m_bMulti || !m_bDisplaySpec ) eol = 0;
if ( m_format == 0 )
@@ -1055,7 +1069,7 @@ void CEdit::Draw()
}
// Affiche le curseur.
- if ( (m_bEdit && m_bFocus && m_bHilite && Mod(m_timeBlink, 1.0f) <= 0.5f) ) // ça clignotte
+ if ( (m_bEdit && m_bFocus && m_bHilite && Mod(m_timeBlink, 1.0f) <= 0.5f) ) // �a clignotte
{
pos.y = m_pos.y+m_dim.y-m_lineHeight-(m_bMulti?MARGY:MARGY1*2.0f);
for ( i=m_lineFirst ; i<m_lineTotal ; i++ )
@@ -1187,7 +1201,7 @@ void CEdit::DrawBack(FPOINT pos, FPOINT dim)
}
}
-// Dessine une icône de fond.
+// Dessine une ic�ne de fond.
void CEdit::DrawPart(FPOINT pos, FPOINT dim, int icon)
{
@@ -1216,7 +1230,7 @@ void CEdit::DrawPart(FPOINT pos, FPOINT dim, int icon)
}
-// Donne le texte à éditer.
+// Donne le texte � �diter.
void CEdit::SetText(char *text, BOOL bNew)
{
@@ -1239,7 +1253,7 @@ void CEdit::SetText(char *text, BOOL bNew)
if ( text[i] == '\t' )
{
if ( !bBOL ) m_text[j++] = ' ';
- continue; // enlève les tabulateurs
+ continue; // enl�ve les tabulateurs
}
bBOL = ( text[i] == '\n' );
@@ -1269,7 +1283,7 @@ void CEdit::SetText(char *text, BOOL bNew)
m_format[j] = font;
j ++;
}
- continue; // enlève les tabulateurs
+ continue; // enl�ve les tabulateurs
}
bBOL = ( text[i] == '\n' );
}
@@ -1322,12 +1336,12 @@ void CEdit::SetText(char *text, BOOL bNew)
if ( bNew ) UndoFlush();
m_cursor1 = 0;
- m_cursor2 = 0; // curseur au début
+ m_cursor2 = 0; // curseur au d�but
Justif();
ColumnFix();
}
-// Retourne un pointeur au texte édité.
+// Retourne un pointeur au texte �dit�.
char* CEdit::RetText()
{
@@ -1335,7 +1349,7 @@ char* CEdit::RetText()
return m_text;
}
-// Retourne le texte édité.
+// Retourne le texte �dit�.
void CEdit::GetText(char *buffer, int max)
{
@@ -1398,7 +1412,7 @@ int RetValueParam(char *cmd, int rank)
return n;
}
-// Libère toutes les images.
+// Lib�re toutes les images.
void CEdit::FreeImage()
{
@@ -1487,7 +1501,7 @@ BOOL CEdit::ReadText(char *filename, int addSize)
j ++;
}
i ++;
- continue; // enlève les tabulateurs
+ continue; // enl�ve les tabulateurs
}
bBOL = ( buffer[i] == '\n' || buffer[i] == '\r' );
}
@@ -1910,7 +1924,7 @@ BOOL CEdit::WriteText(char *filename)
}
-// Gestion du nombre max de caractères éditables.
+// Gestion du nombre max de caract�res �ditables.
void CEdit::SetMaxChar(int max)
{
@@ -1938,7 +1952,7 @@ int CEdit::RetMaxChar()
}
-// Gestion du mode "éditable".
+// Gestion du mode "�ditable".
void CEdit::SetEditCap(BOOL bMode)
{
@@ -1950,7 +1964,7 @@ BOOL CEdit::RetEditCap()
return m_bEdit;
}
-// Gestion du mode "hilitable" (ça c'est du franch).
+// Gestion du mode "hilitable" (�a c'est du franch).
void CEdit::SetHiliteCap(BOOL bEnable)
{
@@ -1986,7 +2000,7 @@ BOOL CEdit::RetSoluceMode()
return m_bSoluce;
}
-// Indique si le texte est un générique qui défile.
+// Indique si le texte est un g�n�rique qui d�file.
void CEdit::SetGenericMode(BOOL bGeneric)
{
@@ -2013,7 +2027,7 @@ BOOL CEdit::RetAutoIndent()
-// Déplace les curseurs.
+// D�place les curseurs.
void CEdit::SetCursor(int cursor1, int cursor2)
{
@@ -2035,14 +2049,14 @@ void CEdit::GetCursor(int &cursor1, int &cursor2)
}
-// Modifie la première ligne affichée.
+// Modifie la premi�re ligne affich�e.
void CEdit::SetFirstLine(int rank)
{
Scroll(rank, TRUE);
}
-// Retourne la première ligne affichée.
+// Retourne la premi�re ligne affich�e.
int CEdit::RetFirstLine()
{
@@ -2061,7 +2075,7 @@ int CEdit::RetFirstLine()
}
-// Montre la zone sélectionnée.
+// Montre la zone s�lectionn�e.
void CEdit::ShowSelect()
{
@@ -2094,7 +2108,7 @@ void CEdit::ShowSelect()
}
-// Gestion du mode d'affichage des caractères spéciaux.
+// Gestion du mode d'affichage des caract�res sp�ciaux.
void CEdit::SetDisplaySpec(BOOL bDisplay)
{
@@ -2130,7 +2144,7 @@ BOOL CEdit::RetMultiFont()
}
-// Gestion de la taille des caractères.
+// Gestion de la taille des caract�res.
void CEdit::SetFontSize(float size)
{
@@ -2140,7 +2154,7 @@ void CEdit::SetFontSize(float size)
}
-// Déplace la partie visible selon l'ascenseur.
+// D�place la partie visible selon l'ascenseur.
void CEdit::Scroll()
{
@@ -2154,7 +2168,7 @@ void CEdit::Scroll()
}
}
-// Déplace la partie visible selon l'ascenseur.
+// D�place la partie visible selon l'ascenseur.
void CEdit::Scroll(int pos, BOOL bAdjustCursor)
{
@@ -2190,7 +2204,7 @@ void CEdit::Scroll(int pos, BOOL bAdjustCursor)
Justif();
}
-// Déplace le curseur au début de la ligne.
+// D�place le curseur au d�but de la ligne.
void CEdit::MoveHome(BOOL bWord, BOOL bSelect)
{
@@ -2230,7 +2244,7 @@ void CEdit::MoveHome(BOOL bWord, BOOL bSelect)
ColumnFix();
}
-// Déplace le curseur à la fin de la ligne.
+// D�place le curseur � la fin de la ligne.
void CEdit::MoveEnd(BOOL bWord, BOOL bSelect)
{
@@ -2252,7 +2266,7 @@ void CEdit::MoveEnd(BOOL bWord, BOOL bSelect)
ColumnFix();
}
-// Déplace le curseur par caractères.
+// D�place le curseur par caract�res.
void CEdit::MoveChar(int move, BOOL bWord, BOOL bSelect)
{
@@ -2365,7 +2379,7 @@ void CEdit::MoveChar(int move, BOOL bWord, BOOL bSelect)
ColumnFix();
}
-// Déplace le curseur par lignes.
+// D�place le curseur par lignes.
void CEdit::MoveLine(int move, BOOL bWord, BOOL bSelect)
{
@@ -2475,7 +2489,7 @@ void CEdit::ColumnFix()
}
-// Coupe les caractères sélectionnés, ou toute la ligne.
+// Coupe les caract�res s�lectionn�s, ou toute la ligne.
BOOL CEdit::Cut()
{
@@ -2549,14 +2563,14 @@ BOOL CEdit::Cut()
UndoMemorize(OPERUNDO_SPEC);
m_cursor1 = c1;
m_cursor2 = c2;
- DeleteOne(0); // supprime les caractères sélectionnés
+ DeleteOne(0); // supprime les caract�res s�lectionn�s
Justif();
ColumnFix();
SendModifEvent();
return TRUE;
}
-// Copie les caractères sélectionnés, ou toute la ligne.
+// Copie les caract�res s�lectionn�s, ou toute la ligne.
BOOL CEdit::Copy()
{
@@ -2675,7 +2689,7 @@ BOOL CEdit::Paste()
}
-// Annule la dernière action.
+// Annule la derni�re action.
BOOL CEdit::Undo()
{
@@ -2685,7 +2699,7 @@ BOOL CEdit::Undo()
}
-// Insère un caractère.
+// Ins�re un caract�re.
void CEdit::Insert(char character)
{
@@ -2783,7 +2797,7 @@ void CEdit::Insert(char character)
ColumnFix();
}
-// Insère un caractère brut.
+// Ins�re un caract�re brut.
void CEdit::InsertOne(char character)
{
@@ -2794,7 +2808,7 @@ void CEdit::InsertOne(char character)
if ( m_cursor1 != m_cursor2 )
{
- DeleteOne(0); // supprime les caractères sélectionnés
+ DeleteOne(0); // supprime les caract�res s�lectionn�s
}
if ( m_len >= m_maxChar ) return;
@@ -2822,8 +2836,8 @@ void CEdit::InsertOne(char character)
m_cursor2 = m_cursor1;
}
-// Supprime le caractère à gauche du curseur ou tous les
-// caractères sélectionnés.
+// Supprime le caract�re � gauche du curseur ou tous les
+// caract�res s�lectionn�s.
void CEdit::Delete(int dir)
{
@@ -2836,8 +2850,8 @@ void CEdit::Delete(int dir)
ColumnFix();
}
-// Supprime le caractère à gauche du curseur ou tous les
-// caractères sélectionnés brut.
+// Supprime le caract�re � gauche du curseur ou tous les
+// caract�res s�lectionn�s brut.
void CEdit::DeleteOne(int dir)
{
@@ -2932,7 +2946,7 @@ void CEdit::IndentTabAdjust(int number)
}
-// Indente à gauche ou à droite toute la sélection.
+// Indente � gauche ou � droite toute la s�lection.
BOOL CEdit::Shift(BOOL bLeft)
{
@@ -2960,7 +2974,7 @@ BOOL CEdit::Shift(BOOL bLeft)
if ( m_text[c2-1] != '\n' ) return FALSE;
}
- if ( bLeft ) // décale à gauche ?
+ if ( bLeft ) // d�cale � gauche ?
{
i = c1;
while ( i < c2 )
@@ -2975,7 +2989,7 @@ BOOL CEdit::Shift(BOOL bLeft)
while ( i < c2 && m_text[i++] != '\n' );
}
}
- else // décale à droite ?
+ else // d�cale � droite ?
{
i = c1;
while ( i < c2 )
@@ -2997,7 +3011,7 @@ BOOL CEdit::Shift(BOOL bLeft)
return TRUE;
}
-// Conversion min <-> maj de la sélection.
+// Conversion min <-> maj de la s�lection.
BOOL CEdit::MinMaj(BOOL bMaj)
{
@@ -3076,7 +3090,7 @@ void CEdit::Justif()
if ( (m_format[i]&IMAGE_MASK) != 0 ) // tranche d'image ?
{
- i ++; // saute juste un caractère (index dans m_image)
+ i ++; // saute juste un caract�re (index dans m_image)
}
else
{
@@ -3175,7 +3189,7 @@ void CEdit::Justif()
}
}
- m_timeBlink = 0.0f; // allume le curseur immédiatement
+ m_timeBlink = 0.0f; // allume le curseur imm�diatement
}
// Retourne le rang de la ligne dans laquelle se trouve le curseur.
@@ -3212,7 +3226,7 @@ void CEdit::UndoFlush()
m_undoOper = OPERUNDO_SPEC;
}
-// Mémorise l'état actuel avant une modification.
+// M�morise l'�tat actuel avant une modification.
void CEdit::UndoMemorize(OperUndo oper)
{
@@ -3244,7 +3258,7 @@ void CEdit::UndoMemorize(OperUndo oper)
m_undo[0].lineFirst = m_lineFirst;
}
-// Revient à l'état précédent.
+// Revient � l'�tat pr�c�dent.
BOOL CEdit::UndoRecall()
{
@@ -3273,7 +3287,7 @@ BOOL CEdit::UndoRecall()
}
-// Efface le format de tous les caractères.
+// Efface le format de tous les caract�res.
BOOL CEdit::ClearFormat()
{
@@ -3286,7 +3300,7 @@ BOOL CEdit::ClearFormat()
return TRUE;
}
-// Modifie le format d'une suite de caractères.
+// Modifie le format d'une suite de caract�res.
BOOL CEdit::SetFormat(int cursor1, int cursor2, int format)
{
diff --git a/src/edit.h b/src/edit.h
index 0cc10e5..1ba82f3 100644
--- a/src/edit.h
+++ b/src/edit.h
@@ -1,4 +1,18 @@
-// edit.h
+// * 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 .
#ifndef _EDIT_H_
#define _EDIT_H_
@@ -12,11 +26,11 @@ class CScroll;
-#define EDITSTUDIOMAX 20000 // nb max de caractères pour éditer CBOT
+#define EDITSTUDIOMAX 20000 // nb max de caract�res pour �diter CBOT
#define EDITLINEMAX 1000 // nb max total de lignes
#define EDITIMAGEMAX 50 // nb max total de lignes avec images
#define EDITLINKMAX 100 // nb max de liens
-#define EDITHISTORYMAX 50 // nb max de niveaux concervés
+#define EDITHISTORYMAX 50 // nb max de niveaux concerv�s
#define EDITUNDOMAX 20 // nb max de undo successifs
@@ -26,16 +40,16 @@ typedef struct
int len; // longueur du texte
int cursor1; // offset curseur
int cursor2; // offset curseur
- int lineFirst; // première ligne affichée.
+ int lineFirst; // premi�re ligne affich�e.
}
EditUndo;
enum OperUndo
{
- OPERUNDO_SPEC = 0, // opération spéciale
- OPERUNDO_INSERT = 1, // insertion de caractères
- OPERUNDO_DELETE = 2, // suppression de caractères
+ OPERUNDO_SPEC = 0, // op�ration sp�ciale
+ OPERUNDO_INSERT = 1, // insertion de caract�res
+ OPERUNDO_DELETE = 2, // suppression de caract�res
};
typedef struct
@@ -64,7 +78,7 @@ HyperMarker;
typedef struct
{
char filename[50]; // nom complet du fichier texte
- int firstLine; // rang de la première ligne affichée
+ int firstLine; // rang de la premi�re ligne affich�e
}
HyperHistory;
@@ -185,30 +199,30 @@ protected:
BOOL UndoRecall();
protected:
- CScroll* m_scroll; // ascenseur vertical à droite
+ CScroll* m_scroll; // ascenseur vertical � droite
int m_maxChar; // lg max du buffer m_text
- char* m_text; // texte (sans zéro terminateur)
- char* m_format; // format des caractères
- int m_len; // longueur utilisée dans m_text
+ char* m_text; // texte (sans z�ro terminateur)
+ char* m_format; // format des caract�res
+ int m_len; // longueur utilis�e dans m_text
int m_cursor1; // offset curseur
int m_cursor2; // offset curseur
BOOL m_bMulti; // TRUE -> multi lignes
- BOOL m_bEdit; // TRUE -> éditable
+ BOOL m_bEdit; // TRUE -> �ditable
BOOL m_bHilite; // TRUE -> hilitable
BOOL m_bInsideScroll; // TRUE -> ascenseur dans le cadre
- BOOL m_bDisplaySpec; // TRUE -> affiche les caractères spéciaux
+ BOOL m_bDisplaySpec; // TRUE -> affiche les caract�res sp�ciaux
BOOL m_bMultiFont; // TRUE -> plusieurs fontes possible
BOOL m_bSoluce; // TRUE -> montre les liens-solution
- BOOL m_bGeneric; // TRUE -> générique qui défile
+ BOOL m_bGeneric; // TRUE -> g�n�rique qui d�file
BOOL m_bAutoIndent; // TRUE -> indentation automatique
float m_lineHeight; // hauteur d'une ligne
float m_lineAscent; // hauteur au-dessus de la ligne de base
float m_lineDescent; // hauteur au-dessous de la ligne de base
int m_lineVisible; // nb total de ligne affichables
- int m_lineFirst; // première ligne affichée
- int m_lineTotal; // nb lignes utilisées (ds m_lineOffset)
+ int m_lineFirst; // premi�re ligne affich�e
+ int m_lineTotal; // nb lignes utilis�es (ds m_lineOffset)
int m_lineOffset[EDITLINEMAX];
char m_lineIndent[EDITLINEMAX];
int m_imageTotal;
diff --git a/src/editvalue.cpp b/src/editvalue.cpp
index 2a881ed..70ea85b 100644
--- a/src/editvalue.cpp
+++ b/src/editvalue.cpp
@@ -1,4 +1,18 @@
-// editvalue.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
@@ -48,7 +62,7 @@ CEditValue::~CEditValue()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CEditValue::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -128,7 +142,7 @@ void CEditValue::MoveAdjust()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CEditValue::EventProcess(const Event &event)
{
@@ -208,7 +222,7 @@ BOOL CEditValue::EventProcess(const Event &event)
}
-// Met en évidence la valeur éditée.
+// Met en �vidence la valeur �dit�e.
void CEditValue::HiliteValue(const Event &event)
{
@@ -219,7 +233,7 @@ void CEditValue::HiliteValue(const Event &event)
pos = m_edit->RetTextLength();
if ( m_type == EVT_100 && pos > 0 )
{
- pos --; // ne sélectionne pas le "%"
+ pos --; // ne s�lectionne pas le "%"
}
m_edit->SetCursor(pos, 0);
@@ -228,7 +242,7 @@ void CEditValue::HiliteValue(const Event &event)
Event newEvent = event;
newEvent.event = EVENT_FOCUS;
newEvent.param = m_edit->RetEventMsg();
- m_event->AddEvent(newEvent); // défocus les autres objets
+ m_event->AddEvent(newEvent); // d�focus les autres objets
}
@@ -306,7 +320,7 @@ void CEditValue::SetValue(float value, BOOL bSendMessage)
}
}
-// Retourne la valeur éditée.
+// Retourne la valeur �dit�e.
float CEditValue::RetValue()
{
diff --git a/src/editvalue.h b/src/editvalue.h
index bef6f00..7b12698 100644
--- a/src/editvalue.h
+++ b/src/editvalue.h
@@ -1,4 +1,18 @@
-// editvalue.h
+// * 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 .
#ifndef _EDITVALUE_H_
#define _EDITVALUE_H_
@@ -9,8 +23,8 @@
enum EditValueType
{
- EVT_INT = 1, // valeur entière
- EVT_FLOAT = 2, // valeur réelle
+ EVT_INT = 1, // valeur enti�re
+ EVT_FLOAT = 2, // valeur r�elle
EVT_100 = 3, // pour-cent (0..1)
};
diff --git a/src/event.cpp b/src/event.cpp
index b3480e0..3f29e63 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -1,4 +1,18 @@
-// event.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
@@ -30,7 +44,7 @@ CEvent::~CEvent()
}
-// Vide le fifo des événements.
+// Vide le fifo des �v�nements.
void CEvent::Flush()
{
@@ -39,7 +53,7 @@ void CEvent::Flush()
m_total = 0;
}
-// Fabrique un événement.
+// Fabrique un �v�nement.
void CEvent::MakeEvent(Event &event, EventMsg msg)
{
@@ -47,7 +61,7 @@ void CEvent::MakeEvent(Event &event, EventMsg msg)
event.event = msg;
}
-// Ajoute un événement dans le fifo.
+// Ajoute un �v�nement dans le fifo.
BOOL CEvent::AddEvent(const Event &event)
{
@@ -60,7 +74,7 @@ BOOL CEvent::AddEvent(const Event &event)
return TRUE;
}
-// Enlève un événement du fifo.
+// Enl�ve un �v�nement du fifo.
BOOL CEvent::GetEvent(Event &event)
{
diff --git a/src/event.h b/src/event.h
index c9877db..e47b65e 100644
--- a/src/event.h
+++ b/src/event.h
@@ -1,4 +1,18 @@
-// event.h
+// * 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 .
#ifndef _EVENT_H_
#define _EVENT_H_
@@ -18,7 +32,7 @@ class CInstanceManager;
#define MAXEVENT 100
-// Evénements.
+// Ev�nements.
enum EventMsg
{
@@ -512,13 +526,13 @@ enum EventMsg
typedef struct
{
- EventMsg event; // événement (EVENT_*)
- long param; // paramètre
+ EventMsg event; // �v�nement (EVENT_*)
+ long param; // param�tre
FPOINT pos; // position de la souris (0..1)
float axeX; // commande de l'axe X (-1..1)
float axeY; // commande de l'axe Y (-1..1)
float axeZ; // commande de l'axe Z (-1..1)
- short keyState; // état du clavier (KS_*)
+ short keyState; // �tat du clavier (KS_*)
float rTime; // temps relatif
}
Event;
diff --git a/src/gauge.cpp b/src/gauge.cpp
index 8f3d5bd..0054704 100644
--- a/src/gauge.cpp
+++ b/src/gauge.cpp
@@ -1,4 +1,18 @@
-// gauge.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
@@ -35,7 +49,7 @@ CGauge::~CGauge()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CGauge::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -46,7 +60,7 @@ BOOL CGauge::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CGauge::EventProcess(const Event &event)
{
diff --git a/src/gauge.h b/src/gauge.h
index 5813268..7d25678 100644
--- a/src/gauge.h
+++ b/src/gauge.h
@@ -1,4 +1,18 @@
-// gauge.h
+// * 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 .
#ifndef _GAUGE_H_
#define _GAUGE_H_
diff --git a/src/global.h b/src/global.h
index 5ed5128..0a41d29 100644
--- a/src/global.h
+++ b/src/global.h
@@ -1,4 +1,18 @@
-// global.h
+// * 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 .
#ifndef _GLOBAL_H_
#define _GLOBAL_H_
@@ -8,26 +22,26 @@
#define BUILD_DERRICK (1<<1) // derrick
#define BUILD_CONVERT (1<<2) // convertisseur
#define BUILD_RADAR (1<<3) // radar
-#define BUILD_ENERGY (1<<4) // fabrique à pile
-#define BUILD_NUCLEAR (1<<5) // centrale nucléaire
+#define BUILD_ENERGY (1<<4) // fabrique � pile
+#define BUILD_NUCLEAR (1<<5) // centrale nucl�aire
#define BUILD_STATION (1<<6) // station de recharge
-#define BUILD_REPAIR (1<<7) // centre de réparation
-#define BUILD_TOWER (1<<8) // tour de défense
+#define BUILD_REPAIR (1<<7) // centre de r�paration
+#define BUILD_TOWER (1<<8) // tour de d�fense
#define BUILD_RESEARCH (1<<9) // centre de recherche
#define BUILD_LABO (1<<10) // laboratoire
#define BUILD_PARA (1<<11) // paratonnerre
#define BUILD_INFO (1<<12) // borne d'information
#define BUILD_GFLAT (1<<16) // montre le sol plat
-#define BUILD_FLAG (1<<17) // met/enlève drapeau de couleur
+#define BUILD_FLAG (1<<17) // met/enl�ve drapeau de couleur
-// Ne pas changer les valeurs à cause des sauvegardes (bits=...).
+// Ne pas changer les valeurs � cause des sauvegardes (bits=...).
#define RESEARCH_TANK (1<<0) // chenilles
#define RESEARCH_FLY (1<<1) // ailes
#define RESEARCH_CANON (1<<2) // canon
-#define RESEARCH_TOWER (1<<3) // tour de défense
-#define RESEARCH_ATOMIC (1<<4) // nucléaire
+#define RESEARCH_TOWER (1<<3) // tour de d�fense
+#define RESEARCH_ATOMIC (1<<4) // nucl�aire
#define RESEARCH_THUMP (1<<5) // thumper
#define RESEARCH_SHIELD (1<<6) // bouclier
#define RESEARCH_PHAZER (1<<7) // canon phazer
@@ -38,8 +52,8 @@
#define RESEARCH_SNIFFER (1<<12) // sniffeur
extern long g_id; // identificateur unique
-extern long g_build; // bâtiments constructibles
-extern long g_researchDone; // recherches effectuées
+extern long g_build; // b�timents constructibles
+extern long g_researchDone; // recherches effectu�es
extern long g_researchEnable; // recherches accessbles
extern float g_unit; // facteur de conversion
diff --git a/src/group.cpp b/src/group.cpp
index 82a0e0d..eb759d3 100644
--- a/src/group.cpp
+++ b/src/group.cpp
@@ -1,4 +1,18 @@
-// group.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
@@ -34,7 +48,7 @@ CGroup::~CGroup()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CGroup::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -57,7 +71,7 @@ BOOL CGroup::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CGroup::EventProcess(const Event &event)
{
@@ -112,7 +126,7 @@ void CGroup::Draw()
uv2.y -= dp;
DrawIcon(m_pos, m_dim, uv1, uv2);
}
- if ( m_icon == 2 ) // dégradé orange -> transparent ?
+ if ( m_icon == 2 ) // d�grad� orange -> transparent ?
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTw);
@@ -126,7 +140,7 @@ void CGroup::Draw()
uv2.y -= dp;
DrawIcon(m_pos, m_dim, uv1, uv2);
}
- if ( m_icon == 3 ) // dégradé transparent -> gris ?
+ if ( m_icon == 3 ) // d�grad� transparent -> gris ?
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTw);
@@ -140,7 +154,7 @@ void CGroup::Draw()
uv2.y -= dp;
DrawIcon(m_pos, m_dim, uv1, uv2);
}
- if ( m_icon == 4 ) // coin bleu dégradé ?
+ if ( m_icon == 4 ) // coin bleu d�grad� ?
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTw);
@@ -154,7 +168,7 @@ void CGroup::Draw()
uv2.y -= dp;
DrawIcon(m_pos, m_dim, uv1, uv2);
}
- if ( m_icon == 5 ) // coin orange dégradé ?
+ if ( m_icon == 5 ) // coin orange d�grad� ?
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTw);
@@ -396,7 +410,7 @@ void CGroup::Draw()
corner.y = 6.0f/480.0f;
DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f);
}
- if ( m_icon == 18 ) // flèche > pour SatCom ?
+ if ( m_icon == 18 ) // fl�che > pour SatCom ?
{
m_engine->SetTexture("button1.tga");
m_engine->SetState(D3DSTATETTw);
@@ -489,7 +503,7 @@ void CGroup::Draw()
{
m_engine->SetTexture("button3.tga");
m_engine->SetState(D3DSTATENORMAL);
- uv1.x = 80.0f/256.0f; // orangé
+ uv1.x = 80.0f/256.0f; // orang�
uv1.y = 192.0f/256.0f;
uv2.x = 96.0f/256.0f;
uv2.y = 208.0f/256.0f;
@@ -548,7 +562,7 @@ void CGroup::Draw()
DrawIcon(m_pos, m_dim, uv1, uv2);
}
- if ( m_icon >= 100 && m_icon <= 120 ) // bâtiment ?
+ if ( m_icon >= 100 && m_icon <= 120 ) // b�timent ?
{
pos = m_pos;
dim = m_dim;
@@ -616,7 +630,7 @@ void CGroup::Draw()
if ( m_icon == 112 ) icon = 44; // info ?
if ( m_icon == 113 ) icon = 46; // paratonnerre ?
if ( m_icon == 114 ) icon = 47; // coffre-fort ?
- if ( m_icon == 115 ) icon = 48; // centre de contrôle ?
+ if ( m_icon == 115 ) icon = 48; // centre de contr�le ?
uv1.x = (32.0f/256.0f)*(icon%8);
uv1.y = (32.0f/256.0f)*(icon/8); // uv texture
uv2.x = uv1.x+32.0f/256.0f;
diff --git a/src/group.h b/src/group.h
index 4bd6a9c..fa90dee 100644
--- a/src/group.h
+++ b/src/group.h
@@ -1,4 +1,18 @@
-// group.h
+// * 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 .
#ifndef _GROUP_H_
#define _GROUP_H_
diff --git a/src/header.txt b/src/header.txt
new file mode 100644
index 0000000..1ebf098
--- /dev/null
+++ b/src/header.txt
@@ -0,0 +1,15 @@
+ * 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 . \ No newline at end of file
diff --git a/src/image.cpp b/src/image.cpp
index ce560ef..e9bf315 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -1,4 +1,18 @@
-// image.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
@@ -41,7 +55,7 @@ CImage::~CImage()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CImage::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -64,7 +78,7 @@ BOOL CImage::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Spécifie le nom de l'image à afficher.
+// Sp�cifie le nom de l'image � afficher.
void CImage::SetFilenameImage(char *name)
{
@@ -82,7 +96,7 @@ char* CImage::RetFilenameImage()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CImage::EventProcess(const Event &event)
{
diff --git a/src/image.h b/src/image.h
index acbfa10..9dea824 100644
--- a/src/image.h
+++ b/src/image.h
@@ -1,4 +1,18 @@
-// image.h
+// * 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 .
#ifndef _IMAGE_H_
#define _IMAGE_H_
diff --git a/src/iman.cpp b/src/iman.cpp
index 9b64b93..0a41bd1 100644
--- a/src/iman.cpp
+++ b/src/iman.cpp
@@ -1,4 +1,18 @@
-// iman.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
@@ -58,7 +72,7 @@ void CInstanceManager::Flush()
}
}
-// Vide toutes les instances d'une classe donnée.
+// Vide toutes les instances d'une classe donn�e.
void CInstanceManager::Flush(ClassType classType)
{
@@ -113,7 +127,7 @@ BOOL CInstanceManager::DeleteInstance(ClassType classType, void* pointer)
}
// Cherche une instance existante. Retourne 0 si elle n'existe pas.
-// Doit être super-rapide !
+// Doit �tre super-rapide !
void* CInstanceManager::SearchInstance(ClassType classType, int rank)
{
diff --git a/src/iman.h b/src/iman.h
index 96a41c9..3234204 100644
--- a/src/iman.h
+++ b/src/iman.h
@@ -1,4 +1,18 @@
-// iman.h
+// * 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 .
#ifndef _IMAN_H_
#define _IMAN_H_
diff --git a/src/interface.cpp b/src/interface.cpp
index 54d4e9d..e72e7b8 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -1,4 +1,18 @@
-// interface.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
@@ -63,7 +77,7 @@ CInterface::~CInterface()
}
-// Purge tous les contrôles.
+// Purge tous les contr�les.
void CInterface::Flush()
{
@@ -80,7 +94,7 @@ void CInterface::Flush()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CWindow* CInterface::CreateWindows(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -116,7 +130,7 @@ CWindow* CInterface::CreateWindows(FPOINT pos, FPOINT dim, int icon, EventMsg ev
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CButton* CInterface::CreateButton(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -138,7 +152,7 @@ CButton* CInterface::CreateButton(FPOINT pos, FPOINT dim, int icon, EventMsg eve
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CColor* CInterface::CreateColor(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -160,7 +174,7 @@ CColor* CInterface::CreateColor(FPOINT pos, FPOINT dim, int icon, EventMsg event
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CCheck* CInterface::CreateCheck(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -182,7 +196,7 @@ CCheck* CInterface::CreateCheck(FPOINT pos, FPOINT dim, int icon, EventMsg event
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CKey* CInterface::CreateKey(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -204,7 +218,7 @@ CKey* CInterface::CreateKey(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CGroup* CInterface::CreateGroup(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -226,7 +240,7 @@ CGroup* CInterface::CreateGroup(FPOINT pos, FPOINT dim, int icon, EventMsg event
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CImage* CInterface::CreateImage(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -248,7 +262,7 @@ CImage* CInterface::CreateImage(FPOINT pos, FPOINT dim, int icon, EventMsg event
return 0;
}
-// Crée un nouveau label.
+// Cr�e un nouveau label.
CLabel* CInterface::CreateLabel(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
char *name)
@@ -272,7 +286,7 @@ CLabel* CInterface::CreateLabel(FPOINT pos, FPOINT dim, int icon, EventMsg event
return 0;
}
-// Crée un nouveau pavé éditable.
+// Cr�e un nouveau pav� �ditable.
CEdit* CInterface::CreateEdit(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -294,7 +308,7 @@ CEdit* CInterface::CreateEdit(FPOINT pos, FPOINT dim, int icon, EventMsg eventMs
return 0;
}
-// Crée un nouveau pavé éditable.
+// Cr�e un nouveau pav� �ditable.
CEditValue* CInterface::CreateEditValue(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -316,7 +330,7 @@ CEditValue* CInterface::CreateEditValue(FPOINT pos, FPOINT dim, int icon, EventM
return 0;
}
-// Crée un nouvel ascenseur.
+// Cr�e un nouvel ascenseur.
CScroll* CInterface::CreateScroll(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -338,7 +352,7 @@ CScroll* CInterface::CreateScroll(FPOINT pos, FPOINT dim, int icon, EventMsg eve
return 0;
}
-// Crée un nouveau curseur.
+// Cr�e un nouveau curseur.
CSlider* CInterface::CreateSlider(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -360,7 +374,7 @@ CSlider* CInterface::CreateSlider(FPOINT pos, FPOINT dim, int icon, EventMsg eve
return 0;
}
-// Crée une nouvelle liste.
+// Cr�e une nouvelle liste.
CList* CInterface::CreateList(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
float expand)
@@ -383,7 +397,7 @@ CList* CInterface::CreateList(FPOINT pos, FPOINT dim, int icon, EventMsg eventMs
return 0;
}
-// Crée un nouveau raccourci.
+// Cr�e un nouveau raccourci.
CShortcut* CInterface::CreateShortcut(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -405,7 +419,7 @@ CShortcut* CInterface::CreateShortcut(FPOINT pos, FPOINT dim, int icon, EventMsg
return 0;
}
-// Crée un nouvelle boussole.
+// Cr�e un nouvelle boussole.
CCompass* CInterface::CreateCompass(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -427,7 +441,7 @@ CCompass* CInterface::CreateCompass(FPOINT pos, FPOINT dim, int icon, EventMsg e
return 0;
}
-// Crée un nouvelle cible.
+// Cr�e un nouvelle cible.
CTarget* CInterface::CreateTarget(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -449,7 +463,7 @@ CTarget* CInterface::CreateTarget(FPOINT pos, FPOINT dim, int icon, EventMsg eve
return 0;
}
-// Crée une nouvelle carte.
+// Cr�e une nouvelle carte.
CMap* CInterface::CreateMap(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -471,7 +485,7 @@ CMap* CInterface::CreateMap(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
return 0;
}
-// Supprime un contrôle.
+// Supprime un contr�le.
BOOL CInterface::DeleteControl(EventMsg eventMsg)
{
@@ -492,7 +506,7 @@ BOOL CInterface::DeleteControl(EventMsg eventMsg)
return FALSE;
}
-// Donne un contrôle.
+// Donne un contr�le.
CControl* CInterface::SearchControl(EventMsg eventMsg)
{
@@ -511,7 +525,7 @@ CControl* CInterface::SearchControl(EventMsg eventMsg)
return 0;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CInterface::EventProcess(const Event &event)
{
@@ -542,7 +556,7 @@ BOOL CInterface::EventProcess(const Event &event)
}
-// Donne le tooltip lié à la fenêtre.
+// Donne le tooltip li� � la fen�tre.
BOOL CInterface::GetTooltip(FPOINT pos, char* name)
{
diff --git a/src/interface.h b/src/interface.h
index 4feb86d..b8191fd 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -1,4 +1,18 @@
-// interface.h
+// * 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 .
#ifndef _INTERFACE_H_
#define _INTERFACE_H_
diff --git a/src/joystick.cpp b/src/joystick.cpp
index 41d9f56..0b8af28 100644
--- a/src/joystick.cpp
+++ b/src/joystick.cpp
@@ -1,4 +1,18 @@
-// joystick.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
diff --git a/src/joystick.h b/src/joystick.h
index 99aff58..c5c3839 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -1,4 +1,18 @@
-// joystick.h
+// * 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 .
#ifndef _JOYSTICK_H_
#define _JOYSTICK_H_
diff --git a/src/key.cpp b/src/key.cpp
index 3319f92..9c713ea 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -1,4 +1,18 @@
-// key.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
@@ -63,7 +77,7 @@ CKey::~CKey()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CKey::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -83,7 +97,7 @@ BOOL CKey::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CKey::EventProcess(const Event &event)
{
@@ -137,33 +151,33 @@ BOOL CKey::EventProcess(const Event &event)
}
-// Cherche si une touche est déjà utilisée.
+// Cherche si une touche est d�j� utilis�e.
BOOL CKey::TestKey(int key)
{
int i, j;
if ( key == VK_PAUSE ||
- key == VK_SNAPSHOT ) return TRUE; // touche bloquée
+ key == VK_SNAPSHOT ) return TRUE; // touche bloqu�e
for ( i=0 ; i<20 ; i++ )
{
for ( j=0 ; j<2 ; j++ )
{
- if ( key == m_engine->RetKey(i, j) ) // touche utilisée ?
+ if ( key == m_engine->RetKey(i, j) ) // touche utilis�e ?
{
m_engine->SetKey(i, j, 0); // plus rien !
}
}
- if ( m_engine->RetKey(i, 0) == 0 ) // première option libre ?
+ if ( m_engine->RetKey(i, 0) == 0 ) // premi�re option libre ?
{
m_engine->SetKey(i, 0, m_engine->RetKey(i, 1)); // shift
m_engine->SetKey(i, 1, 0);
}
}
- return FALSE; // pas utilisée
+ return FALSE; // pas utilis�e
}
diff --git a/src/key.h b/src/key.h
index c26bfb3..8374fa0 100644
--- a/src/key.h
+++ b/src/key.h
@@ -1,4 +1,18 @@
-// key.h
+// * 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 .
#ifndef _KEY_H_
#define _KEY_H_
diff --git a/src/label.cpp b/src/label.cpp
index 4bb95fa..3701ced 100644
--- a/src/label.cpp
+++ b/src/label.cpp
@@ -1,4 +1,18 @@
-// label.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
@@ -34,7 +48,7 @@ CLabel::~CLabel()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CLabel::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -45,7 +59,7 @@ BOOL CLabel::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CLabel::EventProcess(const Event &event)
{
diff --git a/src/label.h b/src/label.h
index c2120a8..fe33e0b 100644
--- a/src/label.h
+++ b/src/label.h
@@ -1,4 +1,18 @@
-// label.h
+// * 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 .
#ifndef _LABEL_H_
#define _LABEL_H_
diff --git a/src/language.h b/src/language.h
index f77e6da..2ec8123 100644
--- a/src/language.h
+++ b/src/language.h
@@ -1,4 +1,18 @@
-// language.h
+// * 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 _FULL TRUE // CoLoBoT
#define _SCHOOL FALSE // CeeBot-A ou Teen
@@ -19,7 +33,7 @@
#define _SOUNDTRACKS FALSE // toujours FALSE depuis que InitAudioTrackVolume plante sous Vista
-// Vérifications
+// V�rifications
#if !_FULL & !_SCHOOL & !_NET & !_DEMO
-> aucune version choisie !!!
@@ -30,6 +44,6 @@
-> EDU ou PERSO ou CEEBOTDEMO ?
#endif
#if _EDU & _PERSO & _CEEBOTDEMO
--> pas EDU et PERSO et CEEBOTDEMO en même temps !!!
+-> pas EDU et PERSO et CEEBOTDEMO en m�me temps !!!
#endif
#endif
diff --git a/src/light.cpp b/src/light.cpp
index e925fea..0691868 100644
--- a/src/light.cpp
+++ b/src/light.cpp
@@ -1,4 +1,18 @@
-// light.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
@@ -30,7 +44,7 @@ void ProgInit(LightProg &p, float value)
p.speed = 100.0f;
}
-// Fait évoluer une progression.
+// Fait �voluer une progression.
void ProgFrame(LightProg &p, float rTime)
{
@@ -98,7 +112,7 @@ void CLight::SetD3DDevice(LPDIRECT3DDEVICE7 device)
}
-// Supprime toutes les lumières.
+// Supprime toutes les lumi�res.
void CLight::FlushLight()
{
@@ -113,7 +127,7 @@ void CLight::FlushLight()
}
-// Crée une nouvelle lumière. Retourne son rang ou -1 en cas d'erreur.
+// Cr�e une nouvelle lumi�re. Retourne son rang ou -1 en cas d'erreur.
int CLight::CreateLight()
{
@@ -156,7 +170,7 @@ int CLight::CreateLight()
return -1;
}
-// Supprime une lumière.
+// Supprime une lumi�re.
BOOL CLight::DeleteLight(int lightRank)
{
@@ -180,7 +194,7 @@ BOOL CLight::DeleteLight(int lightRank)
}
-// Spécifie une lumière.
+// Sp�cifie une lumi�re.
BOOL CLight::SetLight(int lightRank, const D3DLIGHT7 &light)
{
@@ -195,7 +209,7 @@ BOOL CLight::SetLight(int lightRank, const D3DLIGHT7 &light)
return TRUE;
}
-// Donne les spécifications d'une lumière.
+// Donne les sp�cifications d'une lumi�re.
BOOL CLight::GetLight(int lightRank, D3DLIGHT7 &light)
{
@@ -206,7 +220,7 @@ BOOL CLight::GetLight(int lightRank, D3DLIGHT7 &light)
}
-// Allume ou éteint une lumière.
+// Allume ou �teint une lumi�re.
BOOL CLight::LightEnable(int lightRank, BOOL bEnable)
{
@@ -217,8 +231,8 @@ BOOL CLight::LightEnable(int lightRank, BOOL bEnable)
}
-// Spécifie le type (TYPE*) des objets inclus par cette lumière.
-// Cette lumière n'éclairera donc que ce type d'objets.
+// Sp�cifie le type (TYPE*) des objets inclus par cette lumi�re.
+// Cette lumi�re n'�clairera donc que ce type d'objets.
BOOL CLight::SetLightIncluType(int lightRank, D3DTypeObj type)
{
@@ -228,8 +242,8 @@ BOOL CLight::SetLightIncluType(int lightRank, D3DTypeObj type)
return TRUE;
}
-// Spécifie le type (TYPE*) des objets exclus par cette lumière.
-// Cette lumière n'éclairera donc jamais ce type d'objets.
+// Sp�cifie le type (TYPE*) des objets exclus par cette lumi�re.
+// Cette lumi�re n'�clairera donc jamais ce type d'objets.
BOOL CLight::SetLightExcluType(int lightRank, D3DTypeObj type)
{
@@ -240,7 +254,7 @@ BOOL CLight::SetLightExcluType(int lightRank, D3DTypeObj type)
}
-// Gestion de la position de la lunière.
+// Gestion de la position de la luni�re.
BOOL CLight::SetLightPos(int lightRank, D3DVECTOR pos)
{
@@ -258,7 +272,7 @@ D3DVECTOR CLight::RetLightPos(int lightRank)
}
-// Gestion de la direction de la lumière.
+// Gestion de la direction de la lumi�re.
BOOL CLight::SetLightDir(int lightRank, D3DVECTOR dir)
{
@@ -276,7 +290,7 @@ D3DVECTOR CLight::RetLightDir(int lightRank)
}
-// Spécifie la vitesse de changement.
+// Sp�cifie la vitesse de changement.
BOOL CLight::SetLightIntensitySpeed(int lightRank, float speed)
{
@@ -286,7 +300,7 @@ BOOL CLight::SetLightIntensitySpeed(int lightRank, float speed)
return TRUE;
}
-// Gestion de l'intensité de la lumière.
+// Gestion de l'intensit� de la lumi�re.
BOOL CLight::SetLightIntensity(int lightRank, float value)
{
@@ -304,7 +318,7 @@ float CLight::RetLightIntensity(int lightRank)
}
-// Spécifie la vitesse de changement.
+// Sp�cifie la vitesse de changement.
BOOL CLight::SetLightColorSpeed(int lightRank, float speed)
{
@@ -316,7 +330,7 @@ BOOL CLight::SetLightColorSpeed(int lightRank, float speed)
return TRUE;
}
-// Gestion de la couleur de la lumière.
+// Gestion de la couleur de la lumi�re.
BOOL CLight::SetLightColor(int lightRank, D3DCOLORVALUE color)
{
@@ -348,7 +362,7 @@ D3DCOLORVALUE CLight::RetLightColor(int lightRank)
}
-// Adapte la couleur de toutes les lumières.
+// Adapte la couleur de toutes les lumi�res.
void CLight::AdaptLightColor(D3DCOLORVALUE color, float factor)
{
@@ -377,7 +391,7 @@ void CLight::AdaptLightColor(D3DCOLORVALUE color, float factor)
-// Fait évoluer toutes les lumières.
+// Fait �voluer toutes les lumi�res.
void CLight::FrameLight(float rTime)
{
@@ -417,7 +431,7 @@ void CLight::FrameLight(float rTime)
}
-// Met à jour toutes les lumières.
+// Met � jour toutes les lumi�res.
void CLight::LightUpdate()
{
@@ -457,7 +471,7 @@ void CLight::LightUpdate()
}
}
-// Met à jour les lumières pour un type donné.
+// Met � jour les lumi�res pour un type donn�.
void CLight::LightUpdate(D3DTypeObj type)
{
diff --git a/src/light.h b/src/light.h
index c67f219..357f181 100644
--- a/src/light.h
+++ b/src/light.h
@@ -1,4 +1,18 @@
-// light.h
+// * 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 .
#ifndef _LIGHT_H_
#define _LIGHT_H_
@@ -25,15 +39,15 @@ LightProg;
typedef struct
{
- char bUsed; // TRUE -> lumière existe
- char bEnable; // TRUE -> lumière allumée
+ char bUsed; // TRUE -> lumi�re existe
+ char bEnable; // TRUE -> lumi�re allum�e
D3DTypeObj incluType; // type de tous les objets inclus
D3DTypeObj excluType; // type de tous les objets exclus
- D3DLIGHT7 light; // configuration de la lumière
+ D3DLIGHT7 light; // configuration de la lumi�re
- LightProg intensity; // intensité (0..1)
+ LightProg intensity; // intensit� (0..1)
LightProg colorRed;
LightProg colorGreen;
LightProg colorBlue;
diff --git a/src/list.cpp b/src/list.cpp
index 79a3dd6..9d8baf6 100644
--- a/src/list.cpp
+++ b/src/list.cpp
@@ -1,4 +1,18 @@
-// list.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
@@ -76,7 +90,7 @@ CList::~CList()
}
-// Crée une nouvelle liste.
+// Cr�e une nouvelle liste.
BOOL CList::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
float expand)
@@ -93,7 +107,7 @@ BOOL CList::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
return MoveAdjust();
}
-// Ajuste après un changement de dimensions.
+// Ajuste apr�s un changement de dimensions.
BOOL CList::MoveAdjust()
{
@@ -236,7 +250,7 @@ BOOL CList::ClearState(int state)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CList::EventProcess(const Event &event)
{
@@ -316,7 +330,7 @@ BOOL CList::EventProcess(const Event &event)
Event newEvent = event;
newEvent.event = m_eventMsg;
- m_event->AddEvent(newEvent); // ligne sélectionnée changée
+ m_event->AddEvent(newEvent); // ligne s�lectionn�e chang�e
}
}
}
@@ -383,7 +397,7 @@ void CList::Draw()
if ( m_button[0] != 0 )
{
dim = m_button[0]->RetDim();
- dim.y *= m_displayLine; // fond pile-poil derrière
+ dim.y *= m_displayLine; // fond pile-poil derri�re
}
}
@@ -494,7 +508,7 @@ void CList::Draw()
uv1.y += dp;
uv2.x -= dp;
uv2.y -= dp;
- DrawIcon(pos, dim, uv1, uv2); // dessine carré
+ DrawIcon(pos, dim, uv1, uv2); // dessine carr�
m_engine->SetState(D3DSTATETTw);
uv1.x = 0.0f/256.0f; // v
@@ -562,7 +576,7 @@ void CList::DrawCase(char *text, FPOINT pos, float width, int justif)
}
-// Vide complètement la liste.
+// Vide compl�tement la liste.
void CList::Flush()
{
@@ -574,7 +588,7 @@ void CList::Flush()
}
-// Spécifie le nombre total de lignes.
+// Sp�cifie le nombre total de lignes.
void CList::SetTotal(int i)
{
@@ -589,7 +603,7 @@ int CList::RetTotal()
}
-// Sélectionne une ligne.
+// S�lectionne une ligne.
void CList::SetSelect(int i)
{
@@ -606,7 +620,7 @@ void CList::SetSelect(int i)
UpdateButton();
}
-// Retourne la ligne sélectionnée.
+// Retourne la ligne s�lectionn�e.
int CList::RetSelect()
{
@@ -621,7 +635,7 @@ int CList::RetSelect()
}
-// Gestion de la capacité à sélectionner une case.
+// Gestion de la capacit� � s�lectionner une case.
void CList::SetSelectCap(BOOL bEnable)
{
@@ -662,7 +676,7 @@ BOOL CList::RetBlink()
}
-// Spécifie le texte d'une ligne.
+// Sp�cifie le texte d'une ligne.
void CList::SetName(int i, char* name)
{
@@ -695,7 +709,7 @@ char* CList::RetName(int i)
}
-// Spécifie le bit "check" pour une case.
+// Sp�cifie le bit "check" pour une case.
void CList::SetCheck(int i, BOOL bMode)
{
@@ -714,7 +728,7 @@ BOOL CList::RetCheck(int i)
}
-// Spécifie le bit "enable" pour une case.
+// Sp�cifie le bit "enable" pour une case.
void CList::SetEnable(int i, BOOL bMode)
{
@@ -749,7 +763,7 @@ float CList::RetTabs(int i)
}
-// Déplace l'ascenseur de la liste pour voir la ligne sélectionnée.
+// D�place l'ascenseur de la liste pour voir la ligne s�lectionn�e.
void CList::ShowSelect(BOOL bFixed)
{
@@ -776,7 +790,7 @@ void CList::ShowSelect(BOOL bFixed)
}
-// Met à jour tous les noms des boutons.
+// Met � jour tous les noms des boutons.
void CList::UpdateButton()
{
@@ -806,7 +820,7 @@ void CList::UpdateButton()
}
}
-// Met à jour l'ascenseur.
+// Met � jour l'ascenseur.
void CList::UpdateScroll()
{
@@ -838,7 +852,7 @@ void CList::UpdateScroll()
m_scroll->SetArrowStep(step);
}
-// Mise à jour lorsque l'ascenseur a été bougé.
+// Mise � jour lorsque l'ascenseur a �t� boug�.
void CList::MoveScroll()
{
diff --git a/src/list.h b/src/list.h
index f3ff1d5..09dd1ca 100644
--- a/src/list.h
+++ b/src/list.h
@@ -1,4 +1,18 @@
-// list.h
+// * 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 .
#ifndef _LIST_H_
#define _LIST_H_
@@ -83,8 +97,8 @@ protected:
float m_expand;
int m_totalLine; // nb total de lignes
int m_displayLine; // nb de lignes visibles
- int m_selectLine; // ligne sélectionnée
- int m_firstLine; // première ligne visible
+ int m_selectLine; // ligne s�lectionn�e
+ int m_firstLine; // premi�re ligne visible
BOOL m_bBlink;
BOOL m_bSelectCap;
float m_blinkTime;
diff --git a/src/maindialog.cpp b/src/maindialog.cpp
index b4e67f1..4ea8f1e 100644
--- a/src/maindialog.cpp
+++ b/src/maindialog.cpp
@@ -1,4 +1,18 @@
-// maindialog.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,12 +59,12 @@
-#define KEY_VISIBLE 6 // nb de touches redéfinissables visibles
+#define KEY_VISIBLE 6 // nb de touches red�finissables visibles
#if _SCHOOL & _TEEN
-#define KEY_TOTAL 13 // nb total de touches redéfinissables
+#define KEY_TOTAL 13 // nb total de touches red�finissables
#else
-#define KEY_TOTAL 21 // nb total de touches redéfinissables
+#define KEY_TOTAL 21 // nb total de touches red�finissables
#endif
#define WELCOME_LENGTH 6.0f
@@ -62,7 +76,7 @@ static int perso_color[3*10*3] =
// cheveux :
193, 221, 226, // blanc
255, 255, 181, // jaune
- 204, 155, 84, // châtin
+ 204, 155, 84, // ch�tin
165, 48, 10, // roux
140, 75, 84, // brun
83, 64, 51, // brun
@@ -72,13 +86,13 @@ static int perso_color[3*10*3] =
0, 0, 0, //
// combinaison :
203, 206, 204, // blanc sale
- 0, 205, 203, // bleuté
+ 0, 205, 203, // bleut�
108, 176, 0, // verdatre
207, 207, 32, // jaune
- 170, 141, 0, // orangé
+ 170, 141, 0, // orang�
108, 84, 0, // brun
- 0, 84, 136, // bleuté
- 56, 61, 146, // bleuté
+ 0, 84, 136, // bleut�
+ 56, 61, 146, // bleut�
56, 56, 56, // noir
0, 0, 0, //
// bandes :
@@ -90,13 +104,13 @@ static int perso_color[3*10*3] =
0, 255, 0, // vert
0, 255, 255, // cyan
0, 0, 255, // bleu
- 70, 51, 84, // foncé
+ 70, 51, 84, // fonc�
0, 0, 0, //
};
#if _NET
-// Vérifie si la clé "school" est présente dans la base de registres.
+// V�rifie si la cl� "school" est pr�sente dans la base de registres.
BOOL SchoolCheck()
{
@@ -286,7 +300,7 @@ void CMainDialog::ChangePhase(Phase phase)
ddim.y = dim.y*2.4f;
pos.x = 0.40f;
pos.y = oy+sy*7.9f;
- pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // orangé
+ pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // orang�
pg->SetState(STATE_SHADOW);
pos.y = oy+sy*3.9f;
pg = pw->CreateGroup(pos, ddim, 25, EVENT_LABEL1); // orange
@@ -306,7 +320,7 @@ void CMainDialog::ChangePhase(Phase phase)
pg->SetState(STATE_SHADOW);
}
pos.y = oy+sy*6.8f;
- pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // orangé
+ pg = pw->CreateGroup(pos, ddim, 24, EVENT_LABEL1); // orang�
pg->SetState(STATE_SHADOW);
pos.y = oy+sy*3.9f;
pg = pw->CreateGroup(pos, ddim, 25, EVENT_LABEL1); // orange
@@ -903,7 +917,7 @@ void CMainDialog::ChangePhase(Phase phase)
pos = pli->RetPos();
ddim = pli->RetDim();
- // Affiche le résumé :
+ // Affiche le r�sum� :
pos.x = ox+sx*3;
pos.y = oy+sy*5.4f;
ddim.x = dim.x*6.5f;
@@ -958,7 +972,7 @@ void CMainDialog::ChangePhase(Phase phase)
ddim.x = dim.x*2.5f;
pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_READ);
pb->SetState(STATE_SHADOW);
- if ( !IsIOReadScene() ) // aucun fichier à lire ?
+ if ( !IsIOReadScene() ) // aucun fichier � lire ?
{
pb->ClearState(STATE_ENABLE);
}
@@ -2058,8 +2072,8 @@ void CMainDialog::ChangePhase(Phase phase)
}
-// Traite un événement.
-// Retourne FALSE si l'événement a été traîté complètement.
+// Traite un �v�nement.
+// Retourne FALSE si l'�v�nement a �t� tra�t� compl�tement.
BOOL CMainDialog::EventProcess(const Event &event)
{
@@ -2126,7 +2140,7 @@ BOOL CMainDialog::EventProcess(const Event &event)
return TRUE;
}
- if ( m_shotDelay > 0 && !m_bDialog ) // copie d'écran à faire ?
+ if ( m_shotDelay > 0 && !m_bDialog ) // copie d'�cran � faire ?
{
m_shotDelay --;
if ( m_shotDelay == 0 )
@@ -2151,7 +2165,7 @@ BOOL CMainDialog::EventProcess(const Event &event)
FrameParticule(event.rTime);
- if ( m_bDialog ) // dialogue présent ?
+ if ( m_bDialog ) // dialogue pr�sent ?
{
FrameDialog(event.rTime);
}
@@ -2165,7 +2179,7 @@ BOOL CMainDialog::EventProcess(const Event &event)
NiceParticule(event.pos, event.keyState&KS_MLEFT);
}
- if ( m_bDialog ) // dialogue présent ?
+ if ( m_bDialog ) // dialogue pr�sent ?
{
m_interface->EventProcess(event);
@@ -2651,12 +2665,12 @@ BOOL CMainDialog::EventProcess(const Event &event)
if ( pl == 0 ) break;
if ( pc->TestState(STATE_CHECK) )
{
- pc->ClearState(STATE_CHECK); // fenêtré
+ pc->ClearState(STATE_CHECK); // fen�tr�
pl->ClearState(STATE_ENABLE);
}
else
{
- pc->SetState(STATE_CHECK); // plein écran
+ pc->SetState(STATE_CHECK); // plein �cran
pl->SetState(STATE_ENABLE);
}
UpdateApply();
@@ -3250,7 +3264,7 @@ D3DVECTOR SoundPos(FPOINT pos)
return s;
}
-// Retourne une position aléatoire pour un son.
+// Retourne une position al�atoire pour un son.
D3DVECTOR SoundRand()
{
@@ -3263,7 +3277,7 @@ D3DVECTOR SoundRand()
return s;
}
-// Fait évoluer qq joiles particules.
+// Fait �voluer qq joiles particules.
void CMainDialog::FrameParticule(float rTime)
{
@@ -3278,18 +3292,18 @@ void CMainDialog::FrameParticule(float rTime)
static float partiPosInit[1+5*12] =
{ // x x t2 t2 type
12.0f,
- 607.0f, 164.0f, 0.2f, 0.8f, 1.0f, // câble sup.
- 604.0f, 205.0f, 0.1f, 0.3f, 1.0f, // câble mid.
- 603.0f, 247.0f, 0.1f, 0.3f, 1.0f, // câble inf.
+ 607.0f, 164.0f, 0.2f, 0.8f, 1.0f, // c�ble sup.
+ 604.0f, 205.0f, 0.1f, 0.3f, 1.0f, // c�ble mid.
+ 603.0f, 247.0f, 0.1f, 0.3f, 1.0f, // c�ble inf.
119.0f, 155.0f, 0.2f, 0.4f, 2.0f, // tuyau gauche
366.0f, 23.0f, 0.5f, 1.5f, 4.0f, // tuyau sup.
560.0f, 414.0f, 0.1f, 0.1f, 1.0f, // bouton inf/droite
20.0f, 413.0f, 0.1f, 0.1f, 2.0f, // bouton inf/gauche
39.0f, 78.0f, 0.1f, 0.2f, 1.0f, // pot gauche
39.0f, 78.0f, 0.5f, 0.9f, 1.0f, // pot gauche
- 170.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fumée gauche
- 170.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fumée gauche
- 474.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fumée droite
+ 170.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fum�e gauche
+ 170.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fum�e gauche
+ 474.0f, 229.0f, 0.5f, 0.5f, 3.0f, // fum�e droite
};
static float glintPosInit[1+2*14] =
@@ -3314,12 +3328,12 @@ void CMainDialog::FrameParticule(float rTime)
static float partiPosBig[1+5*12] =
{ // x x t2 t2 type
12.0f,
- 607.0f, 164.0f, 0.2f, 0.8f, 1.0f, // câble sup.
- 604.0f, 205.0f, 0.1f, 0.3f, 1.0f, // câble mid.
- 603.0f, 247.0f, 0.1f, 0.3f, 1.0f, // câble inf.
- 64.0f, 444.0f, 0.2f, 0.8f, 1.0f, // câble bas gauche
- 113.0f, 449.0f, 0.1f, 0.3f, 1.0f, // câble bas gauche
- 340.0f, 463.0f, 0.2f, 0.8f, 1.0f, // câble bas milieu
+ 607.0f, 164.0f, 0.2f, 0.8f, 1.0f, // c�ble sup.
+ 604.0f, 205.0f, 0.1f, 0.3f, 1.0f, // c�ble mid.
+ 603.0f, 247.0f, 0.1f, 0.3f, 1.0f, // c�ble inf.
+ 64.0f, 444.0f, 0.2f, 0.8f, 1.0f, // c�ble bas gauche
+ 113.0f, 449.0f, 0.1f, 0.3f, 1.0f, // c�ble bas gauche
+ 340.0f, 463.0f, 0.2f, 0.8f, 1.0f, // c�ble bas milieu
36.0f, 155.0f, 0.2f, 0.4f, 2.0f, // tuyau gauche
366.0f, 23.0f, 0.5f, 1.5f, 4.0f, // tuyau sup.
612.0f, 414.0f, 0.1f, 0.1f, 1.0f, // bouton inf/droite
@@ -3465,12 +3479,12 @@ void CMainDialog::FrameParticule(float rTime)
}
}
- if ( m_partiPhase[i] != 0 ) // génère ?
+ if ( m_partiPhase[i] != 0 ) // g�n�re ?
{
m_partiTime[i] -= rTime;
if ( m_partiTime[i] > 0.0f )
{
- if ( m_partiPhase[i] == 1 ) // étincelles ?
+ if ( m_partiPhase[i] == 1 ) // �tincelles ?
{
pos.x = m_partiPos[i].x;
pos.y = m_partiPos[i].y;
@@ -3498,7 +3512,7 @@ void CMainDialog::FrameParticule(float rTime)
Rand()*0.5f+0.5f, 2.0f, 0.0f,
SH_INTERFACE);
}
- if ( m_partiPhase[i] == 2 ) // étincelles ?
+ if ( m_partiPhase[i] == 2 ) // �tincelles ?
{
pos.x = m_partiPos[i].x;
pos.y = m_partiPos[i].y;
@@ -3525,7 +3539,7 @@ void CMainDialog::FrameParticule(float rTime)
Rand()*0.5f+0.5f, 2.0f, 0.0f,
SH_INTERFACE);
}
- if ( m_partiPhase[i] == 3 ) // fumée ?
+ if ( m_partiPhase[i] == 3 ) // fum�e ?
{
pos.x = m_partiPos[i].x;
pos.y = m_partiPos[i].y;
@@ -3599,7 +3613,7 @@ void CMainDialog::NiceParticule(FPOINT mouse, BOOL bPress)
-// Spécifie le dossier spécial utilisateur si nécessaire.
+// Sp�cifie le dossier sp�cial utilisateur si n�cessaire.
void CMainDialog::SetUserDir(char *base, int rank)
{
@@ -3630,14 +3644,14 @@ void CMainDialog::BuildSceneName(char *filename, char *base, int rank)
}
}
-// Construit le nom descriptif par défaut d'une mission.
+// Construit le nom descriptif par d�faut d'une mission.
void CMainDialog::BuildResumeName(char *filename, char *base, int rank)
{
sprintf(filename, "Scene %s %d", base, rank);
}
-// Retourne le nom du dossier où mettre les fichiers.
+// Retourne le nom du dossier o� mettre les fichiers.
char* CMainDialog::RetFilesDir()
{
@@ -3645,7 +3659,7 @@ char* CMainDialog::RetFilesDir()
}
-// Met à jour la liste des joueurs d'après les dossiers sur disque.
+// Met � jour la liste des joueurs d'apr�s les dossiers sur disque.
void CMainDialog::ReadNameList()
{
@@ -3701,7 +3715,7 @@ void CMainDialog::ReadNameList()
}
}
-// Met à jour les contrôles des joueurs.
+// Met � jour les contr�les des joueurs.
void CMainDialog::UpdateNameControl()
{
@@ -3750,7 +3764,7 @@ void CMainDialog::UpdateNameControl()
}
}
-// Met à jour la liste des joueurs en fonction du nom frapé.
+// Met � jour la liste des joueurs en fonction du nom frap�.
void CMainDialog::UpdateNameList()
{
@@ -3784,7 +3798,7 @@ void CMainDialog::UpdateNameList()
pl->SetSelect(-1);
}
-// Met à jour le nom du joueur et fonction de la liste sélectionnée.
+// Met � jour le nom du joueur et fonction de la liste s�lectionn�e.
void CMainDialog::UpdateNameEdit()
{
@@ -3817,7 +3831,7 @@ void CMainDialog::UpdateNameEdit()
UpdateNameControl();
}
-// Met à jour la représentation du joueur en fonction de la liste sélectionnée.
+// Met � jour la repr�sentation du joueur en fonction de la liste s�lectionn�e.
void CMainDialog::UpdateNameFace()
{
@@ -3838,7 +3852,7 @@ void CMainDialog::UpdateNameFace()
ReadGamerPerso(name);
}
-// Sélectionne un joueur.
+// S�lectionne un joueur.
void CMainDialog::NameSelect()
{
@@ -3873,7 +3887,7 @@ void CMainDialog::NameSelect()
SetProfileString("Gamer", "LastName", m_main->RetGamerName());
}
-// Crée un nouveau joueur.
+// Cr�e un nouveau joueur.
void CMainDialog::NameCreate()
{
@@ -4017,7 +4031,7 @@ void CMainDialog::NameDelete()
-// Teste si deux couleurs sont égales ou presque.
+// Teste si deux couleurs sont �gales ou presque.
BOOL EqColor(const D3DCOLORVALUE &c1, const D3DCOLORVALUE &c2)
{
@@ -4026,7 +4040,7 @@ BOOL EqColor(const D3DCOLORVALUE &c1, const D3DCOLORVALUE &c2)
Abs(c1.b-c2.b) < 0.01f );
}
-// Met à jour tous les boutons pour le personnage.
+// Met � jour tous les boutons pour le personnage.
void CMainDialog::UpdatePerso()
{
@@ -4179,7 +4193,7 @@ void CMainDialog::UpdatePerso()
if ( ps != 0 ) ps->SetVisibleValue(color.b*255.0f);
}
-// Met à jour la caméra pour le personnage.
+// Met � jour la cam�ra pour le personnage.
void CMainDialog::CameraPerso()
{
@@ -4230,7 +4244,7 @@ void CMainDialog::FixPerso(int rank, int index)
}
}
-// Met à jour les couleurs du personnage.
+// Met � jour les couleurs du personnage.
void CMainDialog::ColorPerso()
{
@@ -4261,7 +4275,7 @@ void CMainDialog::ColorPerso()
else m_perso.colorBand = color;
}
-// Met à jour les paramètres par défaut du personnage.
+// Met � jour les param�tres par d�faut du personnage.
void CMainDialog::DefPerso()
{
@@ -4321,7 +4335,7 @@ BOOL CMainDialog::IsIOReadScene()
return TRUE;
}
-// Construit le nom du fichier par défaut.
+// Construit le nom du fichier par d�faut.
void CMainDialog::IOReadName()
{
@@ -4376,7 +4390,7 @@ void CMainDialog::IOReadName()
pe->SetFocus(TRUE);
}
-// Met à jour la liste des parties enregistrées sur disque.
+// Met � jour la liste des parties enregistr�es sur disque.
void CMainDialog::IOReadList()
{
@@ -4401,7 +4415,7 @@ void CMainDialog::IOReadList()
file = fopen(filename, "r");
if ( file == NULL ) break;
- strcmp(name, filename); // nom par défaut
+ strcmp(name, filename); // nom par d�faut
while ( fgets(line, 500, file) != NULL )
{
for ( i=0 ; i<500 ; i++ )
@@ -4434,10 +4448,10 @@ void CMainDialog::IOReadList()
}
pl->SetSelect(j-1);
- pl->ShowSelect(FALSE); // montre la ligne sélectionnée
+ pl->ShowSelect(FALSE); // montre la ligne s�lectionn�e
}
-// Met à jour les boutons en fonction de la partie sélectionnée
+// Met � jour les boutons en fonction de la partie s�lectionn�e
// dans la liste.
void CMainDialog::IOUpdateList()
@@ -4486,7 +4500,7 @@ void CMainDialog::IOUpdateList()
}
}
-// Supprime la scène sélectionnée.
+// Supprime la sc�ne s�lectionn�e.
void CMainDialog::IODeleteScene()
{
@@ -4543,7 +4557,7 @@ void CMainDialog::IODeleteScene()
IOReadList();
}
-// Ecrit la scène.
+// Ecrit la sc�ne.
BOOL CMainDialog::IOWriteScene()
{
@@ -4582,7 +4596,7 @@ BOOL CMainDialog::IOWriteScene()
return TRUE;
}
-// Lit la scène.
+// Lit la sc�ne.
BOOL CMainDialog::IOReadScene()
{
@@ -4675,7 +4689,7 @@ int CMainDialog::RetChapPassed()
return 9;
}
-// Met à jour les listes selon le cheat code.
+// Met � jour les listes selon le cheat code.
void CMainDialog::AllMissionUpdate()
{
@@ -4692,7 +4706,7 @@ void CMainDialog::AllMissionUpdate()
}
}
-// Met à jour les chapitres des exercices ou missions.
+// Met � jour les chapitres des exercices ou missions.
void CMainDialog::UpdateSceneChap(int &chap)
{
@@ -4759,7 +4773,7 @@ void CMainDialog::UpdateSceneChap(int &chap)
}
else
{
- BuildResumeName(name, m_sceneName, j+1); // nom par défaut
+ BuildResumeName(name, m_sceneName, j+1); // nom par d�faut
while ( fgets(line, 500, file) != NULL )
{
for ( i=0 ; i<500 ; i++ )
@@ -4805,7 +4819,7 @@ void CMainDialog::UpdateSceneChap(int &chap)
file = fopen(filename, "r");
if ( file == NULL ) break;
- BuildResumeName(name, m_sceneName, j+1); // nom par défaut
+ BuildResumeName(name, m_sceneName, j+1); // nom par d�faut
while ( fgets(line, 500, file) != NULL )
{
for ( i=0 ; i<500 ; i++ )
@@ -4858,10 +4872,10 @@ void CMainDialog::UpdateSceneChap(int &chap)
if ( chap > j-1 ) chap = j-1;
pl->SetSelect(chap);
- pl->ShowSelect(FALSE); // montre la ligne sélectionnée
+ pl->ShowSelect(FALSE); // montre la ligne s�lectionn�e
}
-// Met à jour la liste des exercices ou missions.
+// Met � jour la liste des exercices ou missions.
void CMainDialog::UpdateSceneList(int chap, int &sel)
{
@@ -4903,7 +4917,7 @@ void CMainDialog::UpdateSceneList(int chap, int &sel)
file = fopen(filename, "r");
if ( file == NULL ) break;
- BuildResumeName(name, m_sceneName, j+1); // nom par défaut
+ BuildResumeName(name, m_sceneName, j+1); // nom par d�faut
while ( fgets(line, 500, file) != NULL )
{
for ( i=0 ; i<500 ; i++ )
@@ -4961,10 +4975,10 @@ void CMainDialog::UpdateSceneList(int chap, int &sel)
if ( sel > j-1 ) sel = j-1;
pl->SetSelect(sel);
- pl->ShowSelect(FALSE); // montre la ligne sélectionnée
+ pl->ShowSelect(FALSE); // montre la ligne s�lectionn�e
}
-// Met à jour le bouton "solution" selon le cheat code.
+// Met � jour le bouton "solution" selon le cheat code.
void CMainDialog::ShowSoluceUpdate()
{
@@ -5004,7 +5018,7 @@ void CMainDialog::ShowSoluceUpdate()
}
}
-// Met à jour un résumé d'exercice ou de mission.
+// Met � jour un r�sum� d'exercice ou de mission.
void CMainDialog::UpdateSceneResume(int rank)
{
@@ -5072,7 +5086,7 @@ void CMainDialog::UpdateSceneResume(int rank)
pe->SetText(name);
}
-// Met à jour la liste des devices.
+// Met � jour la liste des devices.
void CMainDialog::UpdateDisplayDevice()
{
@@ -5107,7 +5121,7 @@ void CMainDialog::UpdateDisplayDevice()
m_setupSelDevice = selectDevices;
}
-// Met à jour la liste des modes.
+// Met � jour la liste des modes.
void CMainDialog::UpdateDisplayMode()
{
@@ -5182,7 +5196,7 @@ void CMainDialog::ChangeDisplay()
-// Met à jour le bouton "appliquer".
+// Met � jour le bouton "appliquer".
void CMainDialog::UpdateApply()
{
@@ -5222,7 +5236,7 @@ void CMainDialog::UpdateApply()
}
}
-// Met à jour les boutons pendant la phase de setup.
+// Met � jour les boutons pendant la phase de setup.
void CMainDialog::UpdateSetupButtons()
{
@@ -5437,7 +5451,7 @@ void CMainDialog::UpdateSetupButtons()
}
}
-// Met à jour le moteur en fonction des boutons après la phase de setup.
+// Met � jour le moteur en fonction des boutons apr�s la phase de setup.
void CMainDialog::ChangeSetupButtons()
{
@@ -5500,7 +5514,7 @@ void CMainDialog::ChangeSetupButtons()
}
-// Mémorise tous les réglages.
+// M�morise tous les r�glages.
void CMainDialog::SetupMemorize()
{
@@ -5639,7 +5653,7 @@ void CMainDialog::SetupMemorize()
m_engine->WriteProfile();
}
-// Rappelle tous les réglages.
+// Rappelle tous les r�glages.
void CMainDialog::SetupRecall()
{
@@ -5872,7 +5886,7 @@ void CMainDialog::SetupRecall()
}
-// Change le niveau général de qualité.
+// Change le niveau g�n�ral de qualit�.
void CMainDialog::ChangeSetupQuality(int quality)
{
@@ -5920,7 +5934,7 @@ void CMainDialog::ChangeSetupQuality(int quality)
}
-// Touches redéfinissables :
+// Touches red�finissables :
static int key_table[KEY_TOTAL] =
{
@@ -6004,7 +6018,7 @@ static EventMsg key_event[KEY_TOTAL] =
#endif
};
-// Met à jour la liste des touches.
+// Met � jour la liste des touches.
void CMainDialog::UpdateKey()
{
@@ -6118,7 +6132,7 @@ void CMainDialog::StartAbort()
pos.y = 0.62f;
pb = pw->CreateButton(pos, dim, -1, EVENT_INTERFACE_WRITE);
pb->SetState(STATE_SHADOW);
- if ( m_main->IsBusy() ) // tâche en cours ?
+ if ( m_main->IsBusy() ) // t�che en cours ?
{
pb->ClearState(STATE_ENABLE);
}
@@ -6126,7 +6140,7 @@ void CMainDialog::StartAbort()
pos.y = 0.53f;
pb = pw->CreateButton(pos, dim, -1, EVENT_INTERFACE_READ);
pb->SetState(STATE_SHADOW);
- if ( !IsIOReadScene() ) // aucun fichier à lire ?
+ if ( !IsIOReadScene() ) // aucun fichier � lire ?
{
pb->ClearState(STATE_ENABLE);
}
@@ -6153,7 +6167,7 @@ void CMainDialog::StartAbort()
pb->SetName(name);
}
-// Voulez-vous détruire le bâtiment ?
+// Voulez-vous d�truire le b�timent ?
void CMainDialog::StartDeleteObject()
{
@@ -6187,7 +6201,7 @@ void CMainDialog::StartDeleteObject()
pb->SetName(name);
}
-// Voulez-vous détruire le joueur ?
+// Voulez-vous d�truire le joueur ?
void CMainDialog::StartDeleteGame(char *gamer)
{
@@ -6256,7 +6270,7 @@ void CMainDialog::StartQuit()
pb->SetName(name);
}
-// Début de l'affichage d'un dialogue.
+// D�but de l'affichage d'un dialogue.
void CMainDialog::StartDialog(FPOINT dim, BOOL bFire, BOOL bOK, BOOL bCancel)
{
@@ -6499,14 +6513,14 @@ void CMainDialog::StartSuspend()
m_main->ClearInterface();
m_bInitPause = m_engine->RetPause();
m_engine->SetPause(TRUE);
- m_engine->SetOverFront(FALSE); // over plane derrière
+ m_engine->SetOverFront(FALSE); // over plane derri�re
m_main->CreateShortcuts();
m_main->StartSuspend();
m_initCamera = m_camera->RetType();
m_camera->SetType(CAMERA_DIALOG);
}
-// Reprend la simulation après une phase de dialogue.
+// Reprend la simulation apr�s une phase de dialogue.
void CMainDialog::StopSuspend()
{
@@ -6527,7 +6541,7 @@ BOOL CMainDialog::RetTooltip()
return m_bTooltip;
}
-// Indique si un dialogue est affiché.
+// Indique si un dialogue est affich�.
BOOL CMainDialog::IsDialog()
{
@@ -6537,63 +6551,63 @@ BOOL CMainDialog::IsDialog()
-// Spécifie le nom de la scène à lire.
+// Sp�cifie le nom de la sc�ne � lire.
void CMainDialog::SetSceneRead(char* name)
{
strcpy(m_sceneRead, name);
}
-// Retourne le nom de la scène à lire.
+// Retourne le nom de la sc�ne � lire.
char* CMainDialog::RetSceneRead()
{
return m_sceneRead;
}
-// Spécifie le nom de la scène à lire.
+// Sp�cifie le nom de la sc�ne � lire.
void CMainDialog::SetStackRead(char* name)
{
strcpy(m_stackRead, name);
}
-// Retourne le nom de la scène à lire.
+// Retourne le nom de la sc�ne � lire.
char* CMainDialog::RetStackRead()
{
return m_stackRead;
}
-// Spécifie le nom de la scène choisie pour jouer.
+// Sp�cifie le nom de la sc�ne choisie pour jouer.
void CMainDialog::SetSceneName(char* name)
{
strcpy(m_sceneName, name);
}
-// Retourne le nom de la scène choisie pour jouer.
+// Retourne le nom de la sc�ne choisie pour jouer.
char* CMainDialog::RetSceneName()
{
return m_sceneName;
}
-// Spécifie le rang de la scène choisie pour jouer.
+// Sp�cifie le rang de la sc�ne choisie pour jouer.
void CMainDialog::SetSceneRank(int rank)
{
m_sceneRank = rank;
}
-// Retourne le rang de la scène choisie pour jouer.
+// Retourne le rang de la sc�ne choisie pour jouer.
int CMainDialog::RetSceneRank()
{
return m_sceneRank;
}
-// Retourne nom de dossier de la scène utilisateur choisie pour jouer.
+// Retourne nom de dossier de la sc�ne utilisateur choisie pour jouer.
char* CMainDialog::RetSceneDir()
{
@@ -6641,7 +6655,7 @@ BOOL CMainDialog::RetSoluce4()
return m_bSoluce4;
}
-// Indique s'il faut montrer les cinématiques.
+// Indique s'il faut montrer les cin�matiques.
BOOL CMainDialog::RetMovies()
{
@@ -6655,7 +6669,7 @@ BOOL CMainDialog::RetNiceReset()
return m_bNiceReset;
}
-// Indique si les tirs provoquent des dommages à ses propres unités.
+// Indique si les tirs provoquent des dommages � ses propres unit�s.
BOOL CMainDialog::RetHimselfDamage()
{
@@ -6664,7 +6678,7 @@ BOOL CMainDialog::RetHimselfDamage()
-// Enregistre la représentation personnalisée du joueur.
+// Enregistre la repr�sentation personnalis�e du joueur.
void CMainDialog::WriteGamerPerso(char *gamer)
{
@@ -6689,7 +6703,7 @@ void CMainDialog::WriteGamerPerso(char *gamer)
fclose(file);
}
-// Lit la représentation personnalisée du joueur.
+// Lit la repr�sentation personnalis�e du joueur.
void CMainDialog::ReadGamerPerso(char *gamer)
{
@@ -6738,7 +6752,7 @@ void CMainDialog::ReadGamerPerso(char *gamer)
fclose(file);
}
-// Spécifie la représentation du joueur.
+// Sp�cifie la repr�sentation du joueur.
void CMainDialog::SetGamerFace(char *gamer, int face)
{
@@ -6746,7 +6760,7 @@ void CMainDialog::SetGamerFace(char *gamer, int face)
WriteGamerPerso(gamer);
}
-// Donne la représentation du joueur.
+// Donne la repr�sentation du joueur.
int CMainDialog::RetGamerFace(char *gamer)
{
@@ -6754,7 +6768,7 @@ int CMainDialog::RetGamerFace(char *gamer)
return m_perso.face;
}
-// Donne la représentation du joueur.
+// Donne la repr�sentation du joueur.
int CMainDialog::RetGamerFace()
{
@@ -6904,16 +6918,16 @@ BOOL CMainDialog::RetGamerInfoPassed(int rank)
}
-// Passe à la misison suivante, et éventuellement au chapitre suivant.
+// Passe � la misison suivante, et �ventuellement au chapitre suivant.
BOOL CMainDialog::NextMission()
{
m_sel[m_index] ++; // mission suivante
- if ( m_sel[m_index] >= m_maxList ) // dernière mission du chapitre ?
+ if ( m_sel[m_index] >= m_maxList ) // derni�re mission du chapitre ?
{
m_chap[m_index] ++; // chapitre suivant
- m_sel[m_index] = 0; // première mission
+ m_sel[m_index] = 0; // premi�re mission
}
return TRUE;
diff --git a/src/maindialog.h b/src/maindialog.h
index 2471964..914da49 100644
--- a/src/maindialog.h
+++ b/src/maindialog.h
@@ -1,4 +1,18 @@
-// maindialog.h
+// * 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 .
#ifndef _MAINDIALOG_H_
#define _MAINDIALOG_H_
@@ -170,7 +184,7 @@ protected:
GamerPerso m_perso; // perso: description
GamerPerso m_persoCopy; // perso: copie pour annulation
int m_persoTab; // perso: onglet choisi
- float m_persoAngle; // perso: angle de présentation
+ float m_persoAngle; // perso: angle de pr�sentation
char m_sceneDir[_MAX_FNAME]; // dossier scene\
char m_savegameDir[_MAX_FNAME]; // dossier savegame\
@@ -183,12 +197,12 @@ protected:
int m_sel[10]; // mission choisie (0..98)
int m_maxList;
int m_accessChap;
- char m_sceneRead[100]; // nom de la scène à lire
- char m_stackRead[100]; // nom de la scène à lire
- char m_sceneName[20]; // nom de la scène à jouer
- int m_sceneRank; // rang de la scène à jouer
+ char m_sceneRead[100]; // nom de la sc�ne � lire
+ char m_stackRead[100]; // nom de la sc�ne � lire
+ char m_sceneName[20]; // nom de la sc�ne � jouer
+ int m_sceneRank; // rang de la sc�ne � jouer
BOOL m_bSceneSoluce; // montre la solution
- BOOL m_bSimulSetup; // réglages pendant le jeu
+ BOOL m_bSimulSetup; // r�glages pendant le jeu
BOOL m_accessEnable;
BOOL m_accessMission;
BOOL m_accessUser;
@@ -198,17 +212,17 @@ protected:
char m_userList[USERLISTMAX][100];
int m_shotDelay; // nb de frames avant copie
- char m_shotName[100]; // nom du fichier à générer
+ char m_shotName[100]; // nom du fichier � g�n�rer
int m_setupSelDevice;
int m_setupSelMode;
BOOL m_setupFull;
- BOOL m_bTooltip; // info-bulles à afficher ?
+ BOOL m_bTooltip; // info-bulles � afficher ?
BOOL m_bGlint; // reflets sur boutons ?
BOOL m_bRain; // pluie dans l'interface ?
BOOL m_bSoluce4; // solutions dans programme 4 ?
- BOOL m_bMovies; // cinématiques ?
+ BOOL m_bMovies; // cin�matiques ?
BOOL m_bNiceReset; // pour CTaskReset
BOOL m_bHimselfDamage; // pour les tirs
BOOL m_bCameraScroll; // pour CCamera
@@ -221,7 +235,7 @@ protected:
int m_loadingCounter;
- BOOL m_bDialog; // dialogue présent ?
+ BOOL m_bDialog; // dialogue pr�sent ?
BOOL m_bDialogFire; // cadre en feu ?
BOOL m_bDialogDelete;
FPOINT m_dialogPos;
diff --git a/src/mainmap.cpp b/src/mainmap.cpp
index eed4c97..a05a811 100644
--- a/src/mainmap.cpp
+++ b/src/mainmap.cpp
@@ -1,4 +1,18 @@
-// mainmap.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
@@ -51,7 +65,7 @@ CMainMap::~CMainMap()
}
-// Crée la mini-carte et les boutons correspondants.
+// Cr�e la mini-carte et les boutons correspondants.
void CMainMap::CreateMap()
{
@@ -258,7 +272,7 @@ void CMainMap::ZoomMap()
DimMap();
}
-// Active ou désactive la carte.
+// Active ou d�sactive la carte.
void CMainMap::MapEnable(BOOL bEnable)
{
@@ -282,7 +296,7 @@ void CMainMap::MapEnable(BOOL bEnable)
}
}
-// Spécifie le type de l'icône pour l'objet sélectionné.
+// Sp�cifie le type de l'ic�ne pour l'objet s�lectionn�.
void CMainMap::SetToy(BOOL bToy)
{
@@ -298,7 +312,7 @@ void CMainMap::SetToy(BOOL bToy)
pm->SetToy(bToy);
}
-// Spécifie les paramètres lors de l'usage d'une image fixe.
+// Sp�cifie les param�tres lors de l'usage d'une image fixe.
void CMainMap::SetFixParam(float zoom, float ox, float oy, float angle,
int mode, BOOL bDebug)
@@ -319,7 +333,7 @@ void CMainMap::SetFixParam(float zoom, float ox, float oy, float angle,
pm->SetDebug(bDebug);
}
-// Met à jour la mini-carte suite à un changement du terrain.
+// Met � jour la mini-carte suite � un changement du terrain.
void CMainMap::UpdateMap()
{
@@ -351,7 +365,7 @@ BOOL CMainMap::RetFixImage()
}
-// Détecte l'objet visé dans la mini-carte.
+// D�tecte l'objet vis� dans la mini-carte.
CObject* CMainMap::DetectMap(FPOINT pos, BOOL &bInMap)
{
@@ -368,7 +382,7 @@ CObject* CMainMap::DetectMap(FPOINT pos, BOOL &bInMap)
}
-// Indique l'objet survolé par la souris.
+// Indique l'objet survol� par la souris.
void CMainMap::SetHilite(CObject* pObj)
{
diff --git a/src/mainmap.h b/src/mainmap.h
index 68befa1..50e0bf2 100644
--- a/src/mainmap.h
+++ b/src/mainmap.h
@@ -1,4 +1,18 @@
-// mainmap.h
+// * 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 .
#ifndef _MAINMAP_H_
#define _MAINMAP_H_
diff --git a/src/mainmovie.cpp b/src/mainmovie.cpp
index b8d0fb5..77c3c30 100644
--- a/src/mainmovie.cpp
+++ b/src/mainmovie.cpp
@@ -1,4 +1,18 @@
-// mainmovie.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
@@ -57,7 +71,7 @@ void CMainMovie::Flush()
}
-// Début d'un film.
+// D�but d'un film.
BOOL CMainMovie::Start(MainMovieType type, float time)
{
@@ -75,7 +89,7 @@ BOOL CMainMovie::Start(MainMovieType type, float time)
pObj = m_main->SearchHuman();
if ( pObj == 0 )
{
- m_type = MM_NONE; // c'est déjà fini !
+ m_type = MM_NONE; // c'est d�j� fini !
return TRUE;
}
@@ -112,7 +126,7 @@ BOOL CMainMovie::Start(MainMovieType type, float time)
}
m_camera->SetType(CAMERA_BACK);
- m_type = MM_NONE; // c'est déjà fini !
+ m_type = MM_NONE; // c'est d�j� fini !
}
return TRUE;
@@ -150,7 +164,7 @@ BOOL CMainMovie::IsExist()
}
-// Traite un événement.
+// Traite un �v�nement.
BOOL CMainMovie::EventProcess(const Event &event)
{
@@ -223,7 +237,7 @@ MainMovieType CMainMovie::RetType()
return m_type;
}
-// Retourne le type du film stoppé.
+// Retourne le type du film stopp�.
MainMovieType CMainMovie::RetStopType()
{
diff --git a/src/mainmovie.h b/src/mainmovie.h
index 9932e1d..c593353 100644
--- a/src/mainmovie.h
+++ b/src/mainmovie.h
@@ -1,4 +1,18 @@
-// mainmovie.h
+// * 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 .
#ifndef _MAINMOVIE_H_
#define _MAINMOVIE_H_
diff --git a/src/mainshort.cpp b/src/mainshort.cpp
index 15affa3..48ab6d7 100644
--- a/src/mainshort.cpp
+++ b/src/mainshort.cpp
@@ -1,4 +1,18 @@
-// mainshort.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
@@ -52,7 +66,7 @@ void CMainShort::SetMode(BOOL bBuilding)
-// Remise à zéro de tous les raccourcis.
+// Remise � z�ro de tous les raccourcis.
void CMainShort::FlushShortcuts()
{
@@ -88,7 +102,7 @@ static EventMsg table_sc_em[20] =
EVENT_OBJECT_SHORTCUT19,
};
-// Crée l'interface des raccourcis aux unités.
+// Cr�e l'interface des raccourcis aux unit�s.
BOOL CMainShort::CreateShortcuts()
{
@@ -117,14 +131,14 @@ BOOL CMainShort::CreateShortcuts()
pos.y = (480.0f-32.0f)/480.0f;
if ( m_main->RetMovieLock() &&
- !m_main->RetEditLock() ) // bloqué pendant film ?
+ !m_main->RetEditLock() ) // bloqu� pendant film ?
{
m_interface->CreateShortcut(pos, dim, 7, EVENT_OBJECT_MOVIELOCK);
return TRUE;
}
if ( !m_main->RetFreePhoto() &&
(m_main->RetEditLock() ||
- m_engine->RetPause()) ) // bloqué pendant édition ?
+ m_engine->RetPause()) ) // bloqu� pendant �dition ?
{
m_interface->CreateShortcut(pos, dim, 6, EVENT_OBJECT_EDITLOCK);
return TRUE;
@@ -220,7 +234,7 @@ BOOL CMainShort::CreateShortcuts()
return TRUE;
}
-// Met à jour l'interface des raccourcis aux unités.
+// Met � jour l'interface des raccourcis aux unit�s.
BOOL CMainShort::UpdateShortcuts()
{
@@ -241,7 +255,7 @@ BOOL CMainShort::UpdateShortcuts()
return TRUE;
}
-// Sélectionne un objet à travers un raccourci.
+// S�lectionne un objet � travers un raccourci.
void CMainShort::SelectShortcut(EventMsg event)
{
@@ -253,7 +267,7 @@ void CMainShort::SelectShortcut(EventMsg event)
{
if ( i != 0 && m_shortcuts[i] == 0 ) continue;
- if ( i == 0 ) // bâtiments <-> véhicules ?
+ if ( i == 0 ) // b�timents <-> v�hicules ?
{
m_bBuilding = !m_bBuilding;
CreateShortcuts();
@@ -268,7 +282,7 @@ void CMainShort::SelectShortcut(EventMsg event)
}
-// Sélectionne l'objet suivant.
+// S�lectionne l'objet suivant.
void CMainShort::SelectNext()
{
@@ -301,7 +315,7 @@ void CMainShort::SelectNext()
}
-// Détecte l'objet survolé par la souris.
+// D�tecte l'objet survol� par la souris.
CObject* CMainShort::DetectShort(FPOINT pos)
{
@@ -331,7 +345,7 @@ CObject* CMainShort::DetectShort(FPOINT pos)
return 0;
}
-// Signale l'objet survolé par la souris.
+// Signale l'objet survol� par la souris.
void CMainShort::SetHilite(CObject* pObj)
{
diff --git a/src/mainshort.h b/src/mainshort.h
index 3ad3cd7..c836ee1 100644
--- a/src/mainshort.h
+++ b/src/mainshort.h
@@ -1,4 +1,18 @@
-// mainshort.h
+// * 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 .
#ifndef _MAINSHORT_H_
#define _MAINSHORT_H_
diff --git a/src/map.cpp b/src/map.cpp
index bf5fd1c..7855019 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1,4 +1,18 @@
-// map.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
@@ -67,7 +81,7 @@ CMap::~CMap()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CMap::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -78,7 +92,7 @@ BOOL CMap::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Choix de l'offset, lorsqu'une image fixe est affichée.
+// Choix de l'offset, lorsqu'une image fixe est affich�e.
void CMap::SetOffset(float ox, float oy)
{
@@ -94,14 +108,14 @@ void CMap::SetAngle(float angle)
m_angle = angle;
}
-// Spécifie le mode spécial.
+// Sp�cifie le mode sp�cial.
void CMap::SetMode(int mode)
{
m_mode = mode;
}
-// Spécifie le type de l'icône pour l'objet sélectionné.
+// Sp�cifie le type de l'ic�ne pour l'objet s�lectionn�.
void CMap::SetToy(BOOL bToy)
{
@@ -129,7 +143,7 @@ float CMap::RetZoom()
// Choix d'un offset fixe.
-// Active ou désactive la carte.
+// Active ou d�sactive la carte.
void CMap::SetEnable(BOOL bEnable)
{
@@ -158,7 +172,7 @@ void CMap::SetWaterColor(D3DCOLORVALUE color)
}
-// Spécifie une image fixe à la place du dessin du relief.
+// Sp�cifie une image fixe � la place du dessin du relief.
void CMap::SetFixImage(char *filename)
{
@@ -173,7 +187,7 @@ BOOL CMap::RetFixImage()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMap::EventProcess(const Event &event)
{
@@ -209,7 +223,7 @@ BOOL CMap::EventProcess(const Event &event)
return TRUE;
}
-// Ajuste l'offset pour ne pas dépasser la carte.
+// Ajuste l'offset pour ne pas d�passer la carte.
FPOINT CMap::AdjustOffset(FPOINT offset)
{
@@ -224,7 +238,7 @@ FPOINT CMap::AdjustOffset(FPOINT offset)
return offset;
}
-// Indique l'objet survolé par la souris.
+// Indique l'objet survol� par la souris.
void CMap::SetHilite(CObject* pObj)
{
@@ -246,7 +260,7 @@ void CMap::SetHilite(CObject* pObj)
}
}
-// Détecte un objet dans la carte.
+// D�tecte un objet dans la carte.
CObject* CMap::DetectObject(FPOINT pos, BOOL &bInMap)
{
@@ -286,7 +300,7 @@ CObject* CMap::DetectObject(FPOINT pos, BOOL &bInMap)
return m_map[best].object;
}
-// Sélectionne un objet.
+// S�lectionne un objet.
void CMap::SelectObject(FPOINT pos)
{
@@ -342,7 +356,7 @@ void CMap::Draw()
}
i = MAPMAXOBJECT-1;
- if ( m_map[i].bUsed ) // sélection :
+ if ( m_map[i].bUsed ) // s�lection :
{
DrawFocus(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color);
}
@@ -360,7 +374,7 @@ void CMap::Draw()
}
i = MAPMAXOBJECT-1;
- if ( m_map[i].bUsed && i != m_hiliteRank ) // sélection :
+ if ( m_map[i].bUsed && i != m_hiliteRank ) // s�lection :
{
DrawObject(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color, TRUE, FALSE);
}
@@ -388,25 +402,25 @@ FPOINT CMap::MapInter(FPOINT pos, float dir)
p1.y -= pos.y;
limit = m_mapPos.x+m_mapDim.x-pos.x;
- if ( p1.x > limit ) // dépasse à droite ?
+ if ( p1.x > limit ) // d�passe � droite ?
{
p1.y = limit*p1.y/p1.x;
p1.x = limit;
}
limit = m_mapPos.y*0.75f+m_mapDim.y*0.75f-pos.y;
- if ( p1.y > limit ) // dépasse en haut ?
+ if ( p1.y > limit ) // d�passe en haut ?
{
p1.x = limit*p1.x/p1.y;
p1.y = limit;
}
limit = m_mapPos.x-pos.x;
- if ( p1.x < limit ) // dépasse à gauche ?
+ if ( p1.x < limit ) // d�passe � gauche ?
{
p1.y = limit*p1.y/p1.x;
p1.x = limit;
}
limit = m_mapPos.y*0.75f-pos.y;
- if ( p1.y < limit ) // dépasse en bas ?
+ if ( p1.y < limit ) // d�passe en bas ?
{
p1.x = limit*p1.x/p1.y;
p1.y = limit;
@@ -417,7 +431,7 @@ FPOINT CMap::MapInter(FPOINT pos, float dir)
return p1;
}
-// Dessine le champ de vision de l'objet sélectionné.
+// Dessine le champ de vision de l'objet s�lectionn�.
void CMap::DrawFocus(FPOINT pos, float dir, ObjectType type, MapColor color)
{
@@ -449,7 +463,7 @@ void CMap::DrawFocus(FPOINT pos, float dir, ObjectType type, MapColor color)
if ( aMin > aMax )
{
- aMax += PI*2.0f; // aMax toujours après aMin
+ aMax += PI*2.0f; // aMax toujours apr�s aMin
}
limit[0] = RotateAngle( 1.0f-rel.x, 1.0f-rel.y); // sup/droite
@@ -466,7 +480,7 @@ void CMap::DrawFocus(FPOINT pos, float dir, ObjectType type, MapColor color)
}
if ( quart == 4 ) quart = -1;
- uv1.x = 113.0f/256.0f; // dégradé vert
+ uv1.x = 113.0f/256.0f; // d�grad� vert
uv1.y = 240.5f/256.0f;
uv2.x = 126.0f/256.0f;
uv2.y = 255.0f/256.0f;
@@ -770,7 +784,7 @@ void CMap::DrawObject(FPOINT pos, float dir, ObjectType type, MapColor color,
}
}
-// Dessine l'icône d'un objet.
+// Dessine l'ic�ne d'un objet.
void CMap::DrawObjectIcon(FPOINT pos, FPOINT dim, MapColor color,
ObjectType type, BOOL bHilite)
@@ -804,7 +818,7 @@ void CMap::DrawObjectIcon(FPOINT pos, FPOINT dim, MapColor color,
uv1.y += dp;
uv2.x -= dp;
uv2.y -= dp;
- DrawIcon(pos, dim, uv1, uv2); // fond coloré
+ DrawIcon(pos, dim, uv1, uv2); // fond color�
if ( bHilite )
{
@@ -874,11 +888,11 @@ void CMap::DrawObjectIcon(FPOINT pos, FPOINT dim, MapColor color,
uv1.y += dp;
uv2.x -= dp;
uv2.y -= dp;
- DrawIcon(pos, dim, uv1, uv2); // icône
+ DrawIcon(pos, dim, uv1, uv2); // ic�ne
}
}
-// Dessine l'objet survolé par la souris.
+// Dessine l'objet survol� par la souris.
void CMap::DrawHilite(FPOINT pos)
{
@@ -914,7 +928,7 @@ void CMap::DrawHilite(FPOINT pos)
DrawIcon(pos, dim, uv1, uv2);
}
-// Dessine une icône triangulaire.
+// Dessine une ic�ne triangulaire.
void CMap::DrawTriangle(FPOINT p1, FPOINT p2, FPOINT p3, FPOINT uv1, FPOINT uv2)
{
@@ -934,7 +948,7 @@ void CMap::DrawTriangle(FPOINT p1, FPOINT p2, FPOINT p3, FPOINT uv1, FPOINT uv2)
m_engine->AddStatisticTriangle(1);
}
-// Dessine une icône pentagonulaire (à 5 côtés, quoi !).
+// Dessine une ic�ne pentagonulaire (� 5 c�t�s, quoi !).
void CMap::DrawPenta(FPOINT p1, FPOINT p2, FPOINT p3, FPOINT p4, FPOINT p5, FPOINT uv1, FPOINT uv2)
{
@@ -1005,7 +1019,7 @@ void CMap::DrawVertex(FPOINT uv1, FPOINT uv2, float zoom)
}
-// Met à jour le terrain dans la carte.
+// Met � jour le terrain dans la carte.
void CMap::UpdateTerrain()
{
@@ -1060,11 +1074,11 @@ void CMap::UpdateTerrain()
}
}
- m_engine->CopyImage(); // copie avec juste le terrain dessiné
+ m_engine->CopyImage(); // copie avec juste le terrain dessin�
m_engine->CloseImage();
}
-// Met à jour le terrain dans la carte.
+// Met � jour le terrain dans la carte.
void CMap::UpdateTerrain(int bx, int by, int ex, int ey)
{
@@ -1120,7 +1134,7 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey)
}
}
- m_engine->CopyImage(); // copie avec juste le terrain dessiné
+ m_engine->CopyImage(); // copie avec juste le terrain dessin�
m_engine->CloseImage();
}
@@ -1132,7 +1146,7 @@ void CMap::FlushObject()
int i;
m_totalFix = 0; // index objet fixes
- m_totalMove = MAPMAXOBJECT-2; // index véhicules mobiles
+ m_totalMove = MAPMAXOBJECT-2; // index v�hicules mobiles
m_bRadar = m_main->RetCheatRadar(); // pas de radar
for ( i=0 ; i<MAPMAXOBJECT ; i++ )
@@ -1141,7 +1155,7 @@ void CMap::FlushObject()
}
}
-// Met à jour un objet dans la carte.
+// Met � jour un objet dans la carte.
void CMap::UpdateObject(CObject* pObj)
{
@@ -1241,7 +1255,7 @@ void CMap::UpdateObject(CObject* pObj)
type == OBJECT_MOBILEft ||
type == OBJECT_MOBILEit ||
type == OBJECT_MOBILEdr ||
- type == OBJECT_APOLLO2 ) // véhicule mobile ?
+ type == OBJECT_APOLLO2 ) // v�hicule mobile ?
{
color = MAPCOLOR_MOVE;
}
diff --git a/src/map.h b/src/map.h
index f5c9b31..a0cd604 100644
--- a/src/map.h
+++ b/src/map.h
@@ -1,4 +1,18 @@
-// map.h
+// * 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 .
#ifndef _MAP_H_
#define _MAP_H_
diff --git a/src/math3d.cpp b/src/math3d.cpp
index 75e3951..3bf9085 100644
--- a/src/math3d.cpp
+++ b/src/math3d.cpp
@@ -1,4 +1,18 @@
-// math3d.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
@@ -15,7 +29,7 @@
-// Retourne TRUE si 2 nombres sont presques égaux.
+// Retourne TRUE si 2 nombres sont presques �gaux.
BOOL IsEqual(float a, float b)
{
@@ -71,7 +85,7 @@ inline float Max(float a, float b, float c, float d, float e)
}
-// Retourne la valeur normalisée (0..1).
+// Retourne la valeur normalis�e (0..1).
inline float Norm(float a)
{
@@ -100,7 +114,7 @@ inline void Swap(int &a, int &b)
b = c;
}
-// Permute deux réels.
+// Permute deux r�els.
inline void Swap(float &a, float &b)
{
@@ -131,7 +145,7 @@ inline float Mod(float a, float m)
return a - ((int)(a/m))*m;
}
-// Retourne un angle normalisé, c'est-à-dire compris entre
+// Retourne un angle normalis�, c'est-�-dire compris entre
// 0 et 2*PI.
inline float NormAngle(float angle)
@@ -187,7 +201,7 @@ float Direction(float a, float g)
// Fait tourner un point autour d'un centre.
-// L'angle est exprimé en radians.
+// L'angle est exprim� en radians.
// Un angle positif est anti-horaire (CCW).
FPOINT RotatePoint(FPOINT center, float angle, FPOINT p)
@@ -206,7 +220,7 @@ FPOINT RotatePoint(FPOINT center, float angle, FPOINT p)
}
// Fait tourner un point autour de l'origine.
-// L'angle est exprimé en radians.
+// L'angle est exprim� en radians.
// Un angle positif est anti-horaire (CCW).
FPOINT RotatePoint(float angle, FPOINT p)
@@ -220,7 +234,7 @@ FPOINT RotatePoint(float angle, FPOINT p)
}
// Fait tourner un vecteur (dist;0).
-// L'angle est exprimé en radians.
+// L'angle est exprim� en radians.
// Un angle positif est anti-horaire (CCW).
FPOINT RotatePoint(float angle, float dist)
@@ -304,7 +318,7 @@ float RotateAngle(float x, float y)
}
// Calcule l'angle entre deux points et un centre.
-// L'angle est exprimé en radians.
+// L'angle est exprim� en radians.
// Un angle positif est anti-horaire (CCW).
float RotateAngle(FPOINT center, FPOINT p1, FPOINT p2)
@@ -328,7 +342,7 @@ float RotateAngle(FPOINT center, FPOINT p1, FPOINT p2)
return a;
}
-// Retourne py placé sur la droite ab.
+// Retourne py plac� sur la droite ab.
float MidPoint(FPOINT a, FPOINT b, float px)
{
@@ -347,7 +361,7 @@ D3DVECTOR SegmentDist(const D3DVECTOR &p1, const D3DVECTOR &p2, float dist)
return p1+Normalize(p2-p1)*dist;
}
-// Vérifie si un point est dans un triangle.
+// V�rifie si un point est dans un triangle.
BOOL IsInsideTriangle(FPOINT a, FPOINT b, FPOINT c, FPOINT p)
{
@@ -397,8 +411,8 @@ BOOL Intersect(D3DVECTOR a, D3DVECTOR b, D3DVECTOR c,
return TRUE;
}
-// Calcule l'intersection de la droite passant par p(x,z) parallèle
-// à l'axe y, avec le plan abc. Retourne p.y.
+// Calcule l'intersection de la droite passant par p(x,z) parall�le
+// � l'axe y, avec le plan abc. Retourne p.y.
BOOL IntersectY(D3DVECTOR a, D3DVECTOR b, D3DVECTOR c, D3DVECTOR &p)
{
@@ -430,7 +444,7 @@ BOOL IntersectY(D3DVECTOR a, D3DVECTOR b, D3DVECTOR c, D3DVECTOR &p)
// Fait tourner un point autour d'un centre dans le plan.
-// L'angle est exprimé en radians.
+// L'angle est exprim� en radians.
// Un angle positif est anti-horaire (CCW).
void RotatePoint(float cx, float cy, float angle, float &px, float &py)
@@ -448,7 +462,7 @@ void RotatePoint(float cx, float cy, float angle, float &px, float &py)
}
// Fait tourner un point autour d'un centre dans l'espace.
-// L'angles sont exprimés en radians.
+// L'angles sont exprim�s en radians.
// Un angle positif est anti-horaire (CCW).
void RotatePoint(D3DVECTOR center, float angleH, float angleV, D3DVECTOR &p)
@@ -469,7 +483,7 @@ void RotatePoint(D3DVECTOR center, float angleH, float angleV, D3DVECTOR &p)
}
// Fait tourner un point autour d'un centre dans l'espace.
-// L'angles sont exprimés en radians.
+// L'angles sont exprim�s en radians.
// Un angle positif est anti-horaire (CCW).
void RotatePoint2(D3DVECTOR center, float angleH, float angleV, D3DVECTOR &p)
@@ -494,7 +508,7 @@ void RotatePoint2(D3DVECTOR center, float angleH, float angleV, D3DVECTOR &p)
}
// Calcul le point de vue permettant de regarder un centre selon deux
-// angles et à une certaine distance.
+// angles et � une certaine distance.
D3DVECTOR RotateView(D3DVECTOR center, float angleH, float angleV, float dist)
{
@@ -513,7 +527,7 @@ D3DVECTOR RotateView(D3DVECTOR center, float angleH, float angleV, float dist)
return eye+center;
}
-// Calcule le point d'arrivée.
+// Calcule le point d'arriv�e.
D3DVECTOR LookatPoint( D3DVECTOR eye, float angleH, float angleV, float length )
{
@@ -538,7 +552,7 @@ inline float Length(FPOINT a, FPOINT b)
(a.y-b.y)*(a.y-b.y) );
}
-// Retourne l'hypothénuse d'un triangle rectangle.
+// Retourne l'hypoth�nuse d'un triangle rectangle.
inline float Length(float x, float y)
{
@@ -561,7 +575,7 @@ inline float Length(const D3DVECTOR &a, const D3DVECTOR &b)
(a.z-b.z)*(a.z-b.z) );
}
-// Retourne la distance "à plat" entre deux points.
+// Retourne la distance "� plat" entre deux points.
inline float Length2d(const D3DVECTOR &a, const D3DVECTOR &b)
{
@@ -570,7 +584,7 @@ inline float Length2d(const D3DVECTOR &a, const D3DVECTOR &b)
}
-// Retourne l'angle formé par deux vecteurs.
+// Retourne l'angle form� par deux vecteurs.
float Angle( D3DVECTOR u, D3DVECTOR v )
{
@@ -618,7 +632,7 @@ D3DVECTOR ComputeNormal( D3DVECTOR p1, D3DVECTOR p2, D3DVECTOR p3 )
// Transforme un point selon une matrice, exactement de la
-// même façon que Direct3D.
+// m�me fa�on que Direct3D.
D3DVECTOR Transform(const D3DMATRIX &m, D3DVECTOR p)
{
@@ -712,7 +726,7 @@ void SmoothObject(D3DVERTEX2* pVertices, int nb)
-// Calcule les paramètres a et b du segment passant par
+// Calcule les param�tres a et b du segment passant par
// les points p1 et p2, sachant que :
// f(x) = ax+b
// Retourne FALSE si la droite est verticale.
@@ -750,8 +764,8 @@ float DistancePlanPoint(const D3DVECTOR &a, const D3DVECTOR &b,
return Abs(aa*p.x + bb*p.y + cc*p.z + dd);
}
-// Vérifie si deux plans définis par 3 points font partie
-// du même plan.
+// V�rifie si deux plans d�finis par 3 points font partie
+// du m�me plan.
BOOL IsSamePlane(D3DVECTOR *plan1, D3DVECTOR *plan2)
{
@@ -803,7 +817,7 @@ void MatRotateZXY(D3DMATRIX &mat, D3DVECTOR angle)
}
-// Retourne une valeur aléatoire comprise entre 0 et 1.
+// Retourne une valeur al�atoire comprise entre 0 et 1.
float Rand()
{
@@ -834,7 +848,7 @@ float Neutral(float value, float dead)
// Calcule une valeur (radians) proportionnelle comprise
-// entre a et b (degrés).
+// entre a et b (degr�s).
inline float Prop(int a, int b, float p)
{
@@ -846,7 +860,7 @@ inline float Prop(int a, int b, float p)
return aa+p*(bb-aa);
}
-// Fait progresser mollement une valeur souhaitée à partir de
+// Fait progresser mollement une valeur souhait�e � partir de
// sa valeur actuelle. Plus le temps est grand et plus la
// progression est rapide.
@@ -952,12 +966,12 @@ void RGB2HSV(D3DCOLORVALUE src, ColorHSV &dest)
min = Min(src.r, src.g, src.b);
max = Max(src.r, src.g, src.b);
- dest.v = max; // intensité
+ dest.v = max; // intensit�
if ( max == 0.0f )
{
dest.s = 0.0f; // saturation
- dest.h = 0.0f; // teinte indéfinie !
+ dest.h = 0.0f; // teinte ind�finie !
}
else
{
@@ -977,7 +991,7 @@ void RGB2HSV(D3DCOLORVALUE src, ColorHSV &dest)
dest.h = 4.0f+(src.r-src.g)/delta;
}
- dest.h *= 60.0f; // en degrés
+ dest.h *= 60.0f; // en degr�s
if ( dest.h < 0.0f ) dest.h += 360.0f;
dest.h /= 360.0f; // 0..1
}
@@ -1004,7 +1018,7 @@ void HSV2RGB(ColorHSV src, D3DCOLORVALUE &dest)
{
if ( src.h == 360.0f ) src.h = 0.0f;
src.h /= 60.0f;
- i = (int)src.h; // partie entière (0..5)
+ i = (int)src.h; // partie enti�re (0..5)
f = src.h-i; // partie fractionnaire
v = src.v;
diff --git a/src/math3d.h b/src/math3d.h
index 083e418..a8f226a 100644
--- a/src/math3d.h
+++ b/src/math3d.h
@@ -1,4 +1,18 @@
-// math3d.h
+// * 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 .
#ifndef _MATH3D_H_
#define _MATH3D_H_
diff --git a/src/metafile.cpp b/src/metafile.cpp
index 7cc9cfd..3b971bd 100644
--- a/src/metafile.cpp
+++ b/src/metafile.cpp
@@ -1,4 +1,18 @@
-// metafile.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
@@ -175,7 +189,7 @@ int CMetaFile::Open(char *metaname, char *filename)
{
int index, i;
- if ( m_bOpen ) // fichier déjà ouvert ?
+ if ( m_bOpen ) // fichier d�j� ouvert ?
{
Close();
}
@@ -231,7 +245,7 @@ int CMetaFile::RetLength()
return len;
}
-// Positionnement dans le fichier, relatif au début.
+// Positionnement dans le fichier, relatif au d�but.
int CMetaFile::Seek(int offset)
{
@@ -336,7 +350,7 @@ int CMetaFile::MetaOpen(char *metaname)
m_list[i].stream = fopen(metaname, "rb");
if ( m_list[i].stream == 0 ) return -1;
- strcpy(m_list[i].name, metaname); // mémorise le nom
+ strcpy(m_list[i].name, metaname); // m�morise le nom
fread(&m_list[i].total, sizeof(int), 1, m_list[i].stream);
m_list[i].headers = (MetaHeader*)malloc(sizeof(MetaHeader)*m_list[i].total);
@@ -355,7 +369,7 @@ int CMetaFile::MetaOpen(char *metaname)
return -1;
}
-// Cherche si le metafile est déjà ouvert. Retourne l'index ou -1.
+// Cherche si le metafile est d�j� ouvert. Retourne l'index ou -1.
int CMetaFile::MetaSearch(char *metaname)
{
diff --git a/src/metafile.h b/src/metafile.h
index d455b0d..ad974b5 100644
--- a/src/metafile.h
+++ b/src/metafile.h
@@ -1,4 +1,18 @@
-// metafile.h
+// * 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 .
#ifndef _METAFILE_H_
#define _METAFILE_H_
@@ -10,7 +24,7 @@
typedef struct
{
char name[14]; // nom du fichier (8.3 max)
- int start; // position depuis le début du metafile
+ int start; // position depuis le d�but du metafile
int len; // longueur du fichier
}
MetaHeader;
@@ -51,7 +65,7 @@ protected:
BOOL m_bOpen; // fichier ouvert
BOOL m_bMeta; // metafile ouvert
FILE* m_stream; // canal
- int m_start; // position depuis le début
+ int m_start; // position depuis le d�but
int m_pos; // position courante
int m_len; // longueur du fichier
};
diff --git a/src/misc.cpp b/src/misc.cpp
index d9151f0..5d59d44 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -1,4 +1,18 @@
-// misc.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
@@ -27,7 +41,7 @@ static char g_userDir[100] = "";
-// Donne un événement utilisateur unique.
+// Donne un �v�nement utilisateur unique.
EventMsg GetUniqueEventMsg()
{
@@ -40,73 +54,73 @@ EventMsg GetUniqueEventMsg()
-// Retourne une lettre non accentuée.
+// Retourne une lettre non accentu�e.
char RetNoAccent(char letter)
{
if ( letter < 0 )
{
- if ( letter == 'á' ||
- letter == 'à' ||
- letter == 'â' ||
- letter == 'ä' ||
- letter == 'ã' ) return 'a';
-
- if ( letter == 'é' ||
- letter == 'è' ||
- letter == 'ê' ||
- letter == 'ë' ) return 'e';
-
- if ( letter == 'í' ||
- letter == 'ì' ||
- letter == 'î' ||
- letter == 'ï' ) return 'i';
-
- if ( letter == 'ó' ||
- letter == 'ò' ||
- letter == 'ô' ||
- letter == 'ö' ||
- letter == 'õ' ) return 'o';
-
- if ( letter == 'ú' ||
- letter == 'ù' ||
- letter == 'û' ||
- letter == 'ü' ) return 'u';
-
- if ( letter == 'ç' ) return 'c';
-
- if ( letter == 'ñ' ) return 'n';
-
- if ( letter == 'Á' ||
- letter == 'À' ||
- letter == 'Â' ||
- letter == 'Ä' ||
- letter == 'Ã' ) return 'A';
-
- if ( letter == 'É' ||
- letter == 'È' ||
- letter == 'Ê' ||
- letter == 'Ë' ) return 'E';
-
- if ( letter == 'Í' ||
- letter == 'Ì' ||
- letter == 'Î' ||
- letter == 'Ï' ) return 'I';
-
- if ( letter == 'Ó' ||
- letter == 'Ò' ||
- letter == 'Ô' ||
- letter == 'Ö' ||
- letter == 'Õ' ) return 'O';
-
- if ( letter == 'Ú' ||
- letter == 'Ù' ||
- letter == 'Û' ||
- letter == 'Ü' ) return 'U';
-
- if ( letter == 'Ç' ) return 'C';
-
- if ( letter == 'Ñ' ) return 'N';
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'a';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'e';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'i';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'o';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'u';
+
+ if ( letter == '�' ) return 'c';
+
+ if ( letter == '�' ) return 'n';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'A';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'E';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'I';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'O';
+
+ if ( letter == '�' ||
+ letter == '�' ||
+ letter == '�' ||
+ letter == '�' ) return 'U';
+
+ if ( letter == '�' ) return 'C';
+
+ if ( letter == '�' ) return 'N';
}
return letter;
@@ -118,36 +132,36 @@ char RetToUpper(char letter)
{
if ( letter < 0 )
{
- if ( letter == 'á' ) return 'Á';
- if ( letter == 'à' ) return 'À';
- if ( letter == 'â' ) return 'Â';
- if ( letter == 'ä' ) return 'Ä';
- if ( letter == 'ã' ) return 'Ã';
-
- if ( letter == 'é' ) return 'É';
- if ( letter == 'è' ) return 'È';
- if ( letter == 'ê' ) return 'Ê';
- if ( letter == 'ë' ) return 'Ë';
-
- if ( letter == 'í' ) return 'Í';
- if ( letter == 'ì' ) return 'Ì';
- if ( letter == 'î' ) return 'Î';
- if ( letter == 'ï' ) return 'Ï';
-
- if ( letter == 'ó' ) return 'Ó';
- if ( letter == 'ò' ) return 'Ò';
- if ( letter == 'ô' ) return 'Ô';
- if ( letter == 'ö' ) return 'Ö';
- if ( letter == 'õ' ) return 'Õ';
-
- if ( letter == 'ú' ) return 'Ú';
- if ( letter == 'ù' ) return 'Ù';
- if ( letter == 'û' ) return 'Û';
- if ( letter == 'ü' ) return 'Ü';
-
- if ( letter == 'ç' ) return 'Ç';
-
- if ( letter == 'ñ' ) return 'Ñ';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
}
return toupper(letter);
@@ -159,43 +173,43 @@ char RetToLower(char letter)
{
if ( letter < 0 )
{
- if ( letter == 'Á' ) return 'á';
- if ( letter == 'À' ) return 'à';
- if ( letter == 'Â' ) return 'â';
- if ( letter == 'Ä' ) return 'ä';
- if ( letter == 'Ã' ) return 'ã';
-
- if ( letter == 'É' ) return 'é';
- if ( letter == 'È' ) return 'è';
- if ( letter == 'Ê' ) return 'ê';
- if ( letter == 'Ë' ) return 'ë';
-
- if ( letter == 'Í' ) return 'í';
- if ( letter == 'Ì' ) return 'ì';
- if ( letter == 'Î' ) return 'î';
- if ( letter == 'Ï' ) return 'ï';
-
- if ( letter == 'Ó' ) return 'ó';
- if ( letter == 'Ò' ) return 'ò';
- if ( letter == 'Ô' ) return 'ô';
- if ( letter == 'Ö' ) return 'ö';
- if ( letter == 'Õ' ) return 'õ';
-
- if ( letter == 'Ú' ) return 'ú';
- if ( letter == 'Ù' ) return 'ù';
- if ( letter == 'Û' ) return 'û';
- if ( letter == 'Ü' ) return 'ü';
-
- if ( letter == 'Ç' ) return 'ç';
-
- if ( letter == 'Ñ' ) return 'ñ';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
+
+ if ( letter == '�' ) return '�';
}
return tolower(letter);
}
-// Conversion du temps en chaîne.
+// Conversion du temps en cha�ne.
void TimeToAscii(time_t time, char *buffer)
{
@@ -225,7 +239,7 @@ void TimeToAscii(time_t time, char *buffer)
{
strcpy(format, "am");
}
- else // après-midi ?
+ else // apr�s-midi ?
{
strcpy(format, "pm");
hour -= 12; // 0..11
@@ -302,7 +316,7 @@ BOOL CopyFileToTemp(char* filename)
return TRUE;
}
-// Copie une liste de fichiers numérotés dans le dossier temporaire.
+// Copie une liste de fichiers num�rot�s dans le dossier temporaire.
BOOL CopyFileListToTemp(char* filename, int* list, int total)
{
@@ -341,16 +355,16 @@ BOOL CopyFileListToTemp(char* filename, int* list, int total)
}
-// Ajoute une extension à un fichier, s'il n'en a pas déjà une.
+// Ajoute une extension � un fichier, s'il n'en a pas d�j� une.
void AddExt(char* filename, char* ext)
{
- if ( strchr(filename, '.') != 0 ) return; // déjà une extension ?
+ if ( strchr(filename, '.') != 0 ) return; // d�j� une extension ?
strcat(filename, ext);
}
-// Spécifie le dossier utilisateur.
+// Sp�cifie le dossier utilisateur.
void UserDir(BOOL bUser, char* dir)
{
@@ -358,7 +372,7 @@ void UserDir(BOOL bUser, char* dir)
strcpy(g_userDir, dir);
}
-// Remplace la chaîne %user% par le dossier utilisateur.
+// Remplace la cha�ne %user% par le dossier utilisateur.
// in: dir = "%user%toto.txt"
// def = "abc\"
// out: buffer = "abc\toto.txt"
@@ -404,7 +418,7 @@ void UserDir(char* buffer, char* dir, char* def)
}
-// Retourne la lettre correspondant à la langue.
+// Retourne la lettre correspondant � la langue.
char RetLanguageLetter()
{
diff --git a/src/misc.h b/src/misc.h
index 95ae19a..25b2c73 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -1,4 +1,18 @@
-// misc.h
+// * 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 .
#ifndef _MISC_H_
#define _MISC_H_
@@ -55,129 +69,129 @@ enum Error
ERR_CONTINUE = 2, // continue
ERR_STOP = 3, // stoppe
ERR_CMD = 4, // commande inconnue
- ERR_INSTALL = 20, // programme mal installé
- ERR_NOCD = 21, // CD pas trouvé
- ERR_MANIP_VEH = 100, // véhicule inadapté
+ ERR_INSTALL = 20, // programme mal install�
+ ERR_NOCD = 21, // CD pas trouv�
+ ERR_MANIP_VEH = 100, // v�hicule inadapt�
ERR_MANIP_FLY = 101, // impossible en vol
- ERR_MANIP_BUSY = 102, // prend: porte déjà qq chose
- ERR_MANIP_NIL = 103, // prend: rien à prendre
- ERR_MANIP_MOTOR = 105, // dépose: impossible en mouvement
- ERR_MANIP_OCC = 106, // dépose: emplacement déjà occupé
- ERR_MANIP_FRIEND = 107, // pas d'autre véhicule
+ ERR_MANIP_BUSY = 102, // prend: porte d�j� qq chose
+ ERR_MANIP_NIL = 103, // prend: rien � prendre
+ ERR_MANIP_MOTOR = 105, // d�pose: impossible en mouvement
+ ERR_MANIP_OCC = 106, // d�pose: emplacement d�j� occup�
+ ERR_MANIP_FRIEND = 107, // pas d'autre v�hicule
ERR_MANIP_RADIO = 108, // impossible car radioactif
ERR_MANIP_WATER = 109, // impossible sous l'eau
- ERR_MANIP_EMPTY = 110, // rien à déposer
+ ERR_MANIP_EMPTY = 110, // rien � d�poser
ERR_BUILD_FLY = 120, // impossible en vol
ERR_BUILD_WATER = 121, // impossible sous l'eau
- ERR_BUILD_ENERGY = 122, // pas assez d'énergie
- ERR_BUILD_METALAWAY = 123, // pas de métal (trop loin)
- ERR_BUILD_METALNEAR = 124, // pas de métal (trop proche)
- ERR_BUILD_METALINEX = 125, // métal inexistant
+ ERR_BUILD_ENERGY = 122, // pas assez d'�nergie
+ ERR_BUILD_METALAWAY = 123, // pas de m�tal (trop loin)
+ ERR_BUILD_METALNEAR = 124, // pas de m�tal (trop proche)
+ ERR_BUILD_METALINEX = 125, // m�tal inexistant
ERR_BUILD_FLAT = 126, // sol pas assez plat
ERR_BUILD_FLATLIT = 127, // sol plat pas assez grand
- ERR_BUILD_BUSY = 128, // enplacement occupé
- ERR_BUILD_BASE = 129, // trop proche de la fusée
- ERR_BUILD_NARROW = 130, // bâtiments trop serrés
+ ERR_BUILD_BUSY = 128, // enplacement occup�
+ ERR_BUILD_BASE = 129, // trop proche de la fus�e
+ ERR_BUILD_NARROW = 130, // b�timents trop serr�s
ERR_BUILD_MOTOR = 131, // construit: impossible en mouvement
ERR_SEARCH_FLY = 140, // impossible en vol
- ERR_SEARCH_VEH = 141, // véhicule inadapté
+ ERR_SEARCH_VEH = 141, // v�hicule inadapt�
ERR_SEARCH_MOTOR = 142, // impossible en mouvement
- ERR_TERRA_VEH = 150, // véhicule inadapté
- ERR_TERRA_ENERGY = 151, // pas assez d'énergie
- ERR_TERRA_FLOOR = 152, // terrain inadapté
+ ERR_TERRA_VEH = 150, // v�hicule inadapt�
+ ERR_TERRA_ENERGY = 151, // pas assez d'�nergie
+ ERR_TERRA_FLOOR = 152, // terrain inadapt�
ERR_TERRA_BUILDING = 153, // batiment trop proche
ERR_TERRA_OBJECT = 154, // object trop proche
- ERR_FIRE_VEH = 160, // véhicule inadapté
- ERR_FIRE_ENERGY = 161, // pas assez d'énergie
+ ERR_FIRE_VEH = 160, // v�hicule inadapt�
+ ERR_FIRE_ENERGY = 161, // pas assez d'�nergie
ERR_FIRE_FLY = 162, // impossible en vol
- ERR_RECOVER_VEH = 170, // véhicule inadapté
- ERR_RECOVER_ENERGY = 171, // pas assez d'énergie
+ ERR_RECOVER_VEH = 170, // v�hicule inadapt�
+ ERR_RECOVER_ENERGY = 171, // pas assez d'�nergie
ERR_RECOVER_NULL = 172, // pas de ruine
- ERR_CONVERT_EMPTY = 180, // pas de pierre à transformer
- ERR_SHIELD_VEH = 190, // véhicule inadapté
- ERR_SHIELD_ENERGY = 191, // pas assez d'énergie
+ ERR_CONVERT_EMPTY = 180, // pas de pierre � transformer
+ ERR_SHIELD_VEH = 190, // v�hicule inadapt�
+ ERR_SHIELD_ENERGY = 191, // pas assez d'�nergie
ERR_MOVE_IMPOSSIBLE = 200, // move impossible
ERR_FIND_IMPOSSIBLE = 201, // find impossible
ERR_GOTO_IMPOSSIBLE = 210, // goto impossible
- ERR_GOTO_ITER = 211, // goto trop compliqué
- ERR_GOTO_BUSY = 212, // destination goto occupée
+ ERR_GOTO_ITER = 211, // goto trop compliqu�
+ ERR_GOTO_BUSY = 212, // destination goto occup�e
ERR_DERRICK_NULL = 300, // pas de minerai en sous-sol
- ERR_STATION_NULL = 301, // pas d'énergie en sous-sol
+ ERR_STATION_NULL = 301, // pas d'�nergie en sous-sol
ERR_TOWER_POWER = 310, // pas de pile
- ERR_TOWER_ENERGY = 311, // plus d'énergie
+ ERR_TOWER_ENERGY = 311, // plus d'�nergie
ERR_RESEARCH_POWER = 320, // pas de pile
- ERR_RESEARCH_ENERGY = 321, // plus d'énergie
+ ERR_RESEARCH_ENERGY = 321, // plus d'�nergie
ERR_RESEARCH_TYPE = 322, // pas le bon type de pile
- ERR_RESEARCH_ALREADY= 323, // recherche déjà faîte
- ERR_ENERGY_NULL = 330, // pas d'énergie en sous-sol
- ERR_ENERGY_LOW = 331, // pas encore assez d'énergie
- ERR_ENERGY_EMPTY = 332, // pas de métal à transformer
- ERR_ENERGY_BAD = 333, // ne transforme que le métal
- ERR_BASE_DLOCK = 340, // portes bloquées
+ ERR_RESEARCH_ALREADY= 323, // recherche d�j� fa�te
+ ERR_ENERGY_NULL = 330, // pas d'�nergie en sous-sol
+ ERR_ENERGY_LOW = 331, // pas encore assez d'�nergie
+ ERR_ENERGY_EMPTY = 332, // pas de m�tal � transformer
+ ERR_ENERGY_BAD = 333, // ne transforme que le m�tal
+ ERR_BASE_DLOCK = 340, // portes bloqu�es
ERR_BASE_DHUMAN = 341, // vous devez embarquer
- ERR_LABO_NULL = 350, // rien à analyser
- ERR_LABO_BAD = 351, // pas de boulet à analyser
- ERR_LABO_ALREADY = 352, // analyse déjà faîte
- ERR_NUCLEAR_NULL = 360, // pas d'énergie en sous-sol
- ERR_NUCLEAR_LOW = 361, // pas encore assez d'énergie
- ERR_NUCLEAR_EMPTY = 362, // pas d'uranium à transformer
+ ERR_LABO_NULL = 350, // rien � analyser
+ ERR_LABO_BAD = 351, // pas de boulet � analyser
+ ERR_LABO_ALREADY = 352, // analyse d�j� fa�te
+ ERR_NUCLEAR_NULL = 360, // pas d'�nergie en sous-sol
+ ERR_NUCLEAR_LOW = 361, // pas encore assez d'�nergie
+ ERR_NUCLEAR_EMPTY = 362, // pas d'uranium � transformer
ERR_NUCLEAR_BAD = 363, // ne transforme que l'uranium
- ERR_FACTORY_NULL = 370, // pas de métal
- ERR_FACTORY_NEAR = 371, // véhicule trop proche
- ERR_RESET_NEAR = 380, // véhicule trop proche
+ ERR_FACTORY_NULL = 370, // pas de m�tal
+ ERR_FACTORY_NEAR = 371, // v�hicule trop proche
+ ERR_RESET_NEAR = 380, // v�hicule trop proche
ERR_INFO_NULL = 390, // pas de borne d'information
- ERR_VEH_VIRUS = 400, // véhicule infecté par un virus
- ERR_BAT_VIRUS = 401, // bâtiment infecté par un virus
+ ERR_VEH_VIRUS = 400, // v�hicule infect� par un virus
+ ERR_BAT_VIRUS = 401, // b�timent infect� par un virus
ERR_VEH_POWER = 500, // pas de pile
- ERR_VEH_ENERGY = 501, // plus d'énergie
+ ERR_VEH_ENERGY = 501, // plus d'�nergie
ERR_FLAG_FLY = 510, // impossible en vol
ERR_FLAG_WATER = 511, // impossible en nageant
ERR_FLAG_MOTOR = 512, // impossible en mouvement
- ERR_FLAG_BUSY = 513, // prend: porte déjà qq chose
+ ERR_FLAG_BUSY = 513, // prend: porte d�j� qq chose
ERR_FLAG_CREATE = 514, // trop d'indicateurs
ERR_FLAG_PROXY = 515, // trop proche
- ERR_FLAG_DELETE = 516, // rien à supprimer
- ERR_MISSION_NOTERM = 600, // mission pas terminée
- ERR_DELETEMOBILE = 700, // véhicule détruit
- ERR_DELETEBUILDING = 701, // bâtiment détruit
+ ERR_FLAG_DELETE = 516, // rien � supprimer
+ ERR_MISSION_NOTERM = 600, // mission pas termin�e
+ ERR_DELETEMOBILE = 700, // v�hicule d�truit
+ ERR_DELETEBUILDING = 701, // b�timent d�truit
ERR_TOOMANY = 702, // trop d'objets
ERR_OBLIGATORYTOKEN = 800, // instruction obligatoire manquante
ERR_PROHIBITEDTOKEN = 801, // instruction interdite
- INFO_FIRST = 10000, // première information
- INFO_BUILD = 10001, // construction terminée
- INFO_CONVERT = 10002, // métal disponible
- INFO_RESEARCH = 10003, // recherche terminée
- INFO_FACTORY = 10004, // véhicule fabriqué
- INFO_LABO = 10005, // analyse terminée
+ INFO_FIRST = 10000, // premi�re information
+ INFO_BUILD = 10001, // construction termin�e
+ INFO_CONVERT = 10002, // m�tal disponible
+ INFO_RESEARCH = 10003, // recherche termin�e
+ INFO_FACTORY = 10004, // v�hicule fabriqu�
+ INFO_LABO = 10005, // analyse termin�e
INFO_ENERGY = 10006, // pile disponible
- INFO_NUCLEAR = 10007, // pile nucléaire disponible
- INFO_FINDING = 10008, // pile nucléaire disponible
- INFO_MARKPOWER = 10020, // emplacement pour station trouvé
- INFO_MARKURANIUM = 10021, // emplacement pour derrick trouvé
- INFO_MARKSTONE = 10022, // emplacement pour derrick trouvé
- INFO_MARKKEYa = 10023, // emplacement pour derrick trouvé
- INFO_MARKKEYb = 10024, // emplacement pour derrick trouvé
- INFO_MARKKEYc = 10025, // emplacement pour derrick trouvé
- INFO_MARKKEYd = 10026, // emplacement pour derrick trouvé
- INFO_RESEARCHTANK = 10030, // recherche terminée
- INFO_RESEARCHFLY = 10031, // recherche terminée
- INFO_RESEARCHTHUMP = 10032, // recherche terminée
- INFO_RESEARCHCANON = 10033, // recherche terminée
- INFO_RESEARCHTOWER = 10034, // recherche terminée
- INFO_RESEARCHPHAZER = 10035, // recherche terminée
- INFO_RESEARCHSHIELD = 10036, // recherche terminée
- INFO_RESEARCHATOMIC = 10037, // recherche terminée
- INFO_WIN = 10040, // gagné
+ INFO_NUCLEAR = 10007, // pile nucl�aire disponible
+ INFO_FINDING = 10008, // pile nucl�aire disponible
+ INFO_MARKPOWER = 10020, // emplacement pour station trouv�
+ INFO_MARKURANIUM = 10021, // emplacement pour derrick trouv�
+ INFO_MARKSTONE = 10022, // emplacement pour derrick trouv�
+ INFO_MARKKEYa = 10023, // emplacement pour derrick trouv�
+ INFO_MARKKEYb = 10024, // emplacement pour derrick trouv�
+ INFO_MARKKEYc = 10025, // emplacement pour derrick trouv�
+ INFO_MARKKEYd = 10026, // emplacement pour derrick trouv�
+ INFO_RESEARCHTANK = 10030, // recherche termin�e
+ INFO_RESEARCHFLY = 10031, // recherche termin�e
+ INFO_RESEARCHTHUMP = 10032, // recherche termin�e
+ INFO_RESEARCHCANON = 10033, // recherche termin�e
+ INFO_RESEARCHTOWER = 10034, // recherche termin�e
+ INFO_RESEARCHPHAZER = 10035, // recherche termin�e
+ INFO_RESEARCHSHIELD = 10036, // recherche termin�e
+ INFO_RESEARCHATOMIC = 10037, // recherche termin�e
+ INFO_WIN = 10040, // gagn�
INFO_LOST = 10041, // perdu
- INFO_LOSTq = 10042, // perdu immédiatement
- INFO_WRITEOK = 10043, // enregistrement effectué
- INFO_DELETEPATH = 10050, // marque chemin supprimée
- INFO_DELETEMOTHER = 10100, // insecte tué
- INFO_DELETEANT = 10101, // insecte tué
- INFO_DELETEBEE = 10102, // insecte tué
- INFO_DELETEWORM = 10103, // insecte tué
- INFO_DELETESPIDER = 10104, // insecte tué
+ INFO_LOSTq = 10042, // perdu imm�diatement
+ INFO_WRITEOK = 10043, // enregistrement effectu�
+ INFO_DELETEPATH = 10050, // marque chemin supprim�e
+ INFO_DELETEMOTHER = 10100, // insecte tu�
+ INFO_DELETEANT = 10101, // insecte tu�
+ INFO_DELETEBEE = 10102, // insecte tu�
+ INFO_DELETEWORM = 10103, // insecte tu�
+ INFO_DELETESPIDER = 10104, // insecte tu�
INFO_BEGINSATCOM = 10105, // utilisez votre SatCom
};
@@ -198,7 +212,7 @@ enum Error
#define KS_NUMMINUS (1<<15)
-// Procédures.
+// Proc�dures.
enum EventMsg;
diff --git a/src/model.cpp b/src/model.cpp
index fbc51ed..34d9c10 100644
--- a/src/model.cpp
+++ b/src/model.cpp
@@ -1,4 +1,18 @@
-// model.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
@@ -113,8 +127,8 @@ CModel::~CModel()
}
-// Il faut appeler cette procédure avant de modifier interactivement
-// le modèle.
+// Il faut appeler cette proc�dure avant de modifier interactivement
+// le mod�le.
void CModel::StartUserAction()
{
@@ -218,8 +232,8 @@ void CModel::StartUserAction()
UpdateInfoText();
}
-// Il faut appeler cette procédure après avoir modifié interactivement
-// le modèle.
+// Il faut appeler cette proc�dure apr�s avoir modifi� interactivement
+// le mod�le.
void CModel::StopUserAction()
{
@@ -248,7 +262,7 @@ void CModel::StopUserAction()
}
-// Met à jour les valeurs éditables pour le mapping des textures.
+// Met � jour les valeurs �ditables pour le mapping des textures.
void CModel::PutTextureValues()
{
@@ -289,7 +303,7 @@ void CModel::PutTextureValues()
}
}
-// Prend les valeurs éditables pour le mapping des textures.
+// Prend les valeurs �ditables pour le mapping des textures.
void CModel::GetTextureValues()
{
@@ -331,7 +345,7 @@ void CModel::GetTextureValues()
}
-// Donne le nom du modèle.
+// Donne le nom du mod�le.
void CModel::GetModelName(char *buffer)
{
@@ -350,7 +364,7 @@ void CModel::GetModelName(char *buffer)
}
}
-// Donne le nom du modèle.
+// Donne le nom du mod�le.
void CModel::GetDXFName(char *buffer)
{
@@ -369,7 +383,7 @@ void CModel::GetDXFName(char *buffer)
}
}
-// Donne le nom du modèle.
+// Donne le nom du mod�le.
void CModel::GetScriptName(char *buffer)
{
@@ -388,7 +402,7 @@ void CModel::GetScriptName(char *buffer)
}
}
-// Indique si l'édition du nom a le focus.
+// Indique si l'�dition du nom a le focus.
BOOL CModel::IsEditFocus()
{
@@ -428,7 +442,7 @@ BOOL CModel::IsEditFocus()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CModel::EventProcess(const Event &event)
{
@@ -460,12 +474,12 @@ BOOL CModel::EventProcess(const Event &event)
m_mode = 3;
UpdateInfoText();
}
- if ( event.param == VK_ADD ) // plus pavé num ?
+ if ( event.param == VK_ADD ) // plus pav� num ?
{
if ( event.keyState & KS_SHIFT ) CurrentSelect(TRUE);
CurrentSearchNext(+1, (event.keyState & KS_CONTROL));
}
- if ( event.param == VK_SUBTRACT ) // moins pavé num ?
+ if ( event.param == VK_SUBTRACT ) // moins pav� num ?
{
if ( event.keyState & KS_SHIFT ) CurrentSelect(TRUE);
CurrentSearchNext(-1, (event.keyState & KS_CONTROL));
@@ -705,7 +719,7 @@ BOOL CModel::EventProcess(const Event &event)
case EVENT_BUTTON3: // read ?
GetModelName(s);
- m_modFile->ReadModel(s, TRUE, FALSE); // lit avec frontières standard
+ m_modFile->ReadModel(s, TRUE, FALSE); // lit avec fronti�res standard
DeselectAll();
CurrentInit();
EventFrame(event);
@@ -715,7 +729,7 @@ BOOL CModel::EventProcess(const Event &event)
case EVENT_BUTTON4: // add ?
GetModelName(s);
first = m_modFile->RetTriangleUsed();
- m_modFile->AddModel(s, first, TRUE, FALSE); // lit avec frontières standard
+ m_modFile->AddModel(s, first, TRUE, FALSE); // lit avec fronti�res standard
last = m_modFile->RetTriangleUsed();
SelectZone(first, last);
EventFrame(event);
@@ -761,7 +775,7 @@ BOOL CModel::EventProcess(const Event &event)
}
-// Anime le modèle.
+// Anime le mod�le.
BOOL CModel::EventFrame(const Event &event)
{
@@ -828,7 +842,7 @@ BOOL CModel::EventFrame(const Event &event)
if ( m_bDisplayTransparent )
{
matTrans = m_triangleTable[i].material;
- matTrans.diffuse.a = 0.1f; // très transparent
+ matTrans.diffuse.a = 0.1f; // tr�s transparent
pMat = &matTrans;
state = D3DSTATETD;
}
@@ -850,7 +864,7 @@ BOOL CModel::EventFrame(const Event &event)
0.0f, 1000000.0f, FALSE);
}
- if ( m_bDisplayTransparent && // dessine l'intérieur ?
+ if ( m_bDisplayTransparent && // dessine l'int�rieur ?
i >= m_triangleSel1 &&
i <= m_triangleSel2 )
{
@@ -923,7 +937,7 @@ BOOL CModel::SetVertex(int rank, D3DVERTEX2 &vertex)
return FALSE;
}
-// Adouci les normales des triangles sélectionés.
+// Adouci les normales des triangles s�lection�s.
void CModel::SmoothSelect()
{
@@ -990,7 +1004,7 @@ void CModel::SmoothSelect()
}
-// Durci les normales des triangles sélectionés.
+// Durci les normales des triangles s�lection�s.
void CModel::PlaneSelect()
{
@@ -1026,7 +1040,7 @@ void CModel::PlaneSelect()
}
-// Change la couleur des triangles sélectionés.
+// Change la couleur des triangles s�lection�s.
void CModel::ColorSelect()
{
@@ -1047,7 +1061,7 @@ void CModel::ColorSelect()
SelectTerm();
}
-// Change l'état des triangles sélectionés.
+// Change l'�tat des triangles s�lection�s.
void CModel::StateSelect()
{
@@ -1066,7 +1080,7 @@ void CModel::StateSelect()
SelectTerm();
}
-// Déplace la sélection.
+// D�place la s�lection.
void CModel::MoveSelect(D3DVECTOR move)
{
@@ -1104,7 +1118,7 @@ void CModel::MoveSelect(D3DVECTOR move)
OperSelect(move, m_oper);
}
-// Déplace la sélection.
+// D�place la s�lection.
void CModel::OperSelect(D3DVECTOR move, char oper)
{
@@ -1261,7 +1275,7 @@ void CModel::ReadScript(char *filename)
OperSelect(move, 'Z');
move = OpDir(line, "rot");
- move *= PI/180.0f; // degrés -> radians
+ move *= PI/180.0f; // degr�s -> radians
OperSelect(move, 'R');
move = OpDir(line, "pos");
@@ -1274,7 +1288,7 @@ void CModel::ReadScript(char *filename)
-// Calcule la bbox des triangles sélectionnés.
+// Calcule la bbox des triangles s�lectionn�s.
void CModel::BBoxCompute(D3DVECTOR &min, D3DVECTOR &max)
{
@@ -1304,7 +1318,7 @@ void CModel::BBoxCompute(D3DVECTOR &min, D3DVECTOR &max)
}
}
-// Retourne le centre de gravité de la sélection.
+// Retourne le centre de gravit� de la s�lection.
D3DVECTOR CModel::RetSelectCDG()
{
@@ -1319,7 +1333,7 @@ D3DVECTOR CModel::RetSelectCDG()
return cdg;
}
-// Retourne le vecteur normal de la sélection.
+// Retourne le vecteur normal de la s�lection.
D3DVECTOR CModel::RetSelectNormal()
{
@@ -1342,7 +1356,7 @@ D3DVECTOR CModel::RetSelectNormal()
return n;
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
BOOL CModel::IsMappingSelectPlausible(D3DMaping D3Dmode)
{
@@ -1423,7 +1437,7 @@ BOOL CModel::IsMappingSelectPlausible(D3DMaping D3Dmode)
return TRUE;
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelect(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
FPOINT ti, FPOINT ts, char *texName)
@@ -1505,7 +1519,7 @@ void CModel::MappingSelect(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -1542,7 +1556,7 @@ void CModel::MappingSelect(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
SelectTerm();
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelectSpherical(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
FPOINT ti, FPOINT ts, char *texName)
@@ -1562,7 +1576,7 @@ void CModel::MappingSelectSpherical(int mode, int rotate, BOOL bMirrorX, BOOL bM
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -1633,7 +1647,7 @@ D3DVECTOR CModel::RetMappingCenter(D3DVECTOR pos, D3DVECTOR min)
return center;
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelectCylindrical(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
FPOINT ti, FPOINT ts, char *texName)
@@ -1653,7 +1667,7 @@ void CModel::MappingSelectCylindrical(int mode, int rotate, BOOL bMirrorX, BOOL
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -1735,7 +1749,7 @@ void CModel::MappingSelectCylindrical(int mode, int rotate, BOOL bMirrorX, BOOL
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelectFace(int mode, int rotate, BOOL bMirrorX, BOOL bMirrorY,
FPOINT ti, FPOINT ts, char *texName)
@@ -1755,7 +1769,7 @@ void CModel::MappingSelectFace(int mode, int rotate, BOOL bMirrorX, BOOL bMirror
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -1807,7 +1821,7 @@ void CModel::MappingSelectFace(int mode, int rotate, BOOL bMirrorX, BOOL bMirror
}
-// Mappe une texture secondaire sur les triangles sélectionnés.
+// Mappe une texture secondaire sur les triangles s�lectionn�s.
void CModel::MappingSelect2(int texNum2, int subdiv,
int offsetU, int offsetV,
@@ -1885,7 +1899,7 @@ void CModel::MappingSelect2(int texNum2, int subdiv,
SelectTerm();
}
-// Mappe une texture secondaire à plat.
+// Mappe une texture secondaire � plat.
void CModel::MappingSelectPlane2(int mode, BOOL bMirrorX, BOOL bMirrorY)
{
@@ -1927,7 +1941,7 @@ void CModel::MappingSelectPlane2(int mode, BOOL bMirrorX, BOOL bMirrorY)
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -1965,7 +1979,7 @@ void CModel::MappingSelectPlane2(int mode, BOOL bMirrorX, BOOL bMirrorY)
SelectTerm();
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelectSpherical2(BOOL bMirrorX, BOOL bMirrorY)
{
@@ -1988,7 +2002,7 @@ void CModel::MappingSelectSpherical2(BOOL bMirrorX, BOOL bMirrorY)
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -2017,7 +2031,7 @@ void CModel::MappingSelectSpherical2(BOOL bMirrorX, BOOL bMirrorY)
SelectTerm();
}
-// Mappe une texture sur les triangles sélectionnés.
+// Mappe une texture sur les triangles s�lectionn�s.
void CModel::MappingSelectMagic2(BOOL bMirrorX, BOOL bMirrorY)
{
@@ -2036,7 +2050,7 @@ void CModel::MappingSelectMagic2(BOOL bMirrorX, BOOL bMirrorY)
Swap(ti.x, ts.x);
}
- if ( !bMirrorY ) // test inversé !
+ if ( !bMirrorY ) // test invers� !
{
Swap(ti.y, ts.y);
}
@@ -2124,7 +2138,7 @@ int CModel::SearchNext(int rank, int step)
return rank;
}
-// Cherche tous les triangles faisant partie du même plan.
+// Cherche tous les triangles faisant partie du m�me plan.
int CModel::SearchSamePlane(int first, int step)
{
@@ -2180,7 +2194,7 @@ void CModel::CurrentSearchNext(int step, BOOL bControl)
m_triangleSel2 = SearchSamePlane(m_triangleSel1, step);
}
}
- if ( step < 0 ) // en arrière ?
+ if ( step < 0 ) // en arri�re ?
{
m_triangleSel2 = SearchNext(m_triangleSel1, step);
if ( bControl )
@@ -2231,7 +2245,7 @@ void CModel::CurrentInit()
UpdateInfoText();
}
-// Sélectionne les triangles courants.
+// S�lectionne les triangles courants.
void CModel::CurrentSelect(BOOL bSelect)
{
@@ -2244,7 +2258,7 @@ void CModel::CurrentSelect(BOOL bSelect)
}
-// Désélectionne tous les triangles.
+// D�s�lectionne tous les triangles.
void CModel::DeselectAll()
{
@@ -2257,7 +2271,7 @@ void CModel::DeselectAll()
}
}
-// Sélectionne une zone.
+// S�lectionne une zone.
void CModel::SelectZone(int first, int last)
{
@@ -2276,7 +2290,7 @@ void CModel::SelectZone(int first, int last)
m_triangleSel2 = last-1;
}
-// Sélectionne tous les triangles.
+// S�lectionne tous les triangles.
void CModel::SelectAll()
{
@@ -2293,7 +2307,7 @@ void CModel::SelectAll()
}
}
-// Désélectionne tous les triangles.
+// D�s�lectionne tous les triangles.
void CModel::SelectTerm()
{
@@ -2315,7 +2329,7 @@ void CModel::SelectTerm()
DeselectAll();
}
-// Sélectionne les triangles courants.
+// S�lectionne les triangles courants.
void CModel::DefaultSelect()
{
@@ -2330,7 +2344,7 @@ void CModel::DefaultSelect()
-// Supprime tous les triangles sélectionnés.
+// Supprime tous les triangles s�lectionn�s.
void CModel::SelectDelete()
{
@@ -2376,7 +2390,7 @@ void CModel::Compress()
}
-// Change le min/max de tous les triangles sélectionnés.
+// Change le min/max de tous les triangles s�lectionn�s.
void CModel::MinMaxChange()
{
@@ -2405,7 +2419,7 @@ void CModel::InitView()
m_viewAngleV = 0.0f;
}
-// Initialise le point de vue pour voir les triangles sélectionnés.
+// Initialise le point de vue pour voir les triangles s�lectionn�s.
void CModel::InitViewFromSelect()
{
@@ -2438,7 +2452,7 @@ void CModel::InitViewFromSelect()
#endif
}
-// Met à jour les paramètres pour le point de vue.
+// Met � jour les param�tres pour le point de vue.
void CModel::UpdateView()
{
@@ -2453,7 +2467,7 @@ void CModel::UpdateView()
m_engine->SetRankView(0);
}
-// Déplace le point de vue.
+// D�place le point de vue.
void CModel::ViewMove(const Event &event, float speed)
{
@@ -2512,7 +2526,7 @@ void CModel::ViewMove(const Event &event, float speed)
-// Met à jour le texte d'informations.
+// Met � jour le texte d'informations.
void CModel::UpdateInfoText()
{
@@ -2571,47 +2585,47 @@ static int tablePartT[] = // lemt.tga
90, 0, 128, 28, // pivot trainer
128, 0, 192, 44, // coffre avant
128, 44, 192, 58, // callandre
- 128, 58, 192, 87, // coffre arrière
- 128, 87, 192, 128, // callandre arrière
- 128, 128, 192, 144, // sous-callandre arrière
- 0, 128, 32, 152, // garde boue arrière
+ 128, 58, 192, 87, // coffre arri�re
+ 128, 87, 192, 128, // callandre arri�re
+ 128, 128, 192, 144, // sous-callandre arri�re
+ 0, 128, 32, 152, // garde boue arri�re
0, 152, 32, 182, // garde boue milieu
0, 182, 32, 256, // garde boue avant
32, 128, 112, 176, // aile
- 224, 48, 232, 64, // tuyère
- 192, 32, 224, 64, // feu sous réacteur
+ 224, 48, 232, 64, // tuy�re
+ 192, 32, 224, 64, // feu sous r�acteur
224, 32, 256, 48, // pied
192, 64, 256, 128, // capteur
192, 128, 224, 176, // support pile
- 192, 216, 248, 248, // côté canon
- 220, 216, 222, 245, // côté canon
+ 192, 216, 248, 248, // c�t� canon
+ 220, 216, 222, 245, // c�t� canon
64, 176, 128, 224, // dessus canon
- 128, 152, 192, 160, // extérieur canon
- 128, 144, 192, 152, // intérieur canon
+ 128, 152, 192, 160, // ext�rieur canon
+ 128, 144, 192, 152, // int�rieur canon
192, 176, 224, 192, // petit canon
128, 236, 192, 256, // canon organique
- 214, 192, 224, 216, // réticule de visée
+ 214, 192, 224, 216, // r�ticule de vis�e
224, 128, 248, 152, // articulation
- 128, 192, 192, 214, // piston côté
+ 128, 192, 192, 214, // piston c�t�
128, 214, 192, 236, // piston face
192, 192, 214, 214, // piston tranche
- 128, 192, 161, 214, // piston petit côté
+ 128, 192, 161, 214, // piston petit c�t�
32, 176, 64, 198, // piston pour radar
128, 160, 160, 192, // roue
232, 48, 255, 56, // profil pneu
240, 152, 248, 216, // hachures verticales
248, 192, 256, 256, // batterie
224, 152, 240, 168, // roche
- 144, 80, 176, 112, // nucléaire
- 140, 76, 180, 116, // nucléaire grand
- 144, 80, 152, 88, // jaune nucléaire
- 224, 168, 240, 192, // capot résolution C
- 224, 192, 240, 210, // arrière résolution C
- 32, 224, 96, 235, // bras résolution C
- 32, 235, 96, 246, // bras résolution C
+ 144, 80, 176, 112, // nucl�aire
+ 140, 76, 180, 116, // nucl�aire grand
+ 144, 80, 152, 88, // jaune nucl�aire
+ 224, 168, 240, 192, // capot r�solution C
+ 224, 192, 240, 210, // arri�re r�solution C
+ 32, 224, 96, 235, // bras r�solution C
+ 32, 235, 96, 246, // bras r�solution C
161, 1, 164, 4, // blanc
168, 1, 171, 4, // gris moyen
- 154, 1, 157, 4, // gris foncé uni
+ 154, 1, 157, 4, // gris fonc� uni
147, 1, 150, 4, // bleu uni
114, 130, 118, 134, // rouge uni
121, 130, 125, 134, // vert uni
@@ -2623,18 +2637,18 @@ static int tablePartT[] = // lemt.tga
static int tablePartR[] = // roller.tga
{
0, 0, 128, 52, // roues pour chenille
- 48, 137, 128, 201, // côté radiateur
+ 48, 137, 128, 201, // c�t� radiateur
0, 52, 32, 84, // avant radiateur
- 32, 52, 43, 84, // arrière radiateur
- 0, 84, 96, 137, // grand côté
+ 32, 52, 43, 84, // arri�re radiateur
+ 0, 84, 96, 137, // grand c�t�
128, 0, 192, 85, // avant
- 128, 173, 192, 256, // arrière
+ 128, 173, 192, 256, // arri�re
192, 0, 256, 42, // dessus
- 128, 85, 192, 109, // côté pillon
+ 128, 85, 192, 109, // c�t� pillon
128, 109, 192, 173, // dessus pillon
- 192, 85, 240, 109, // côté porte pillon
- 0, 137, 24, 256, // côté verrin
- 24, 137, 48, 256, // côté verrin
+ 192, 85, 240, 109, // c�t� porte pillon
+ 0, 137, 24, 256, // c�t� verrin
+ 24, 137, 48, 256, // c�t� verrin
48, 201, 128, 233, // support canon
192, 109, 256, 173, // fond canon
192, 173, 240, 205, // canon 1
@@ -2643,8 +2657,8 @@ static int tablePartR[] = // roller.tga
48, 233, 128, 247, // piston
96, 105, 128, 137, // avant phazer
96, 97, 128, 105, // canon phazer
- 75, 52, 107, 84, // échappement
- 192, 205, 243, 256, // instruction centrale nucléaire
+ 75, 52, 107, 84, // �chappement
+ 192, 205, 243, 256, // instruction centrale nucl�aire
192, 42, 256, 85, // reflet vitres
-1
};
@@ -2654,32 +2668,32 @@ static int tablePartW[] = // subm.tga
0, 0, 128, 26, // chenilles
0, 26, 22, 114, // portique 1
0, 114, 22, 202, // portique 2
- 22, 26, 82, 56, // côté hublot
- 22, 56, 82, 86, // côté ligne rouge
- 22, 86, 82, 116, // côté simple
- 22, 116, 82, 146, // avant/arrière
- 22, 146, 82, 176, // avant/arrière + phare
+ 22, 26, 82, 56, // c�t� hublot
+ 22, 56, 82, 86, // c�t� ligne rouge
+ 22, 86, 82, 116, // c�t� simple
+ 22, 116, 82, 146, // avant/arri�re
+ 22, 146, 82, 176, // avant/arri�re + phare
132, 82, 196, 166, // capot trainer
132, 166, 196, 177, // capot trainer
132, 177, 196, 188, // capot trainer
- 0, 224, 96, 256, // côté trainer
- 30, 224, 48, 256, // arrière trainer
- 136, 240, 216, 256, // barrière courte
- 96, 240, 256, 256, // barrière longue
+ 0, 224, 96, 256, // c�t� trainer
+ 30, 224, 48, 256, // arri�re trainer
+ 136, 240, 216, 256, // barri�re courte
+ 96, 240, 256, 256, // barri�re longue
128, 0, 160, 32, // black-box 1
160, 0, 192, 32, // black-box 2
192, 0, 224, 32, // black-box 3
224, 105, 256, 137, // TNT 1
224, 137, 256, 169, // TNT 2
- 82, 32, 146, 82, // factory résolution C
- 146, 32, 210, 82, // factory résolution C
- 224, 0, 256, 105, // tower résolution C
- 82, 82, 132, 150, // research résolution C
- 199, 169, 256, 233, // sac résolution C
- 106, 150, 130, 214, // clé A
- 82, 150, 106, 214, // clé B
- 132, 188, 196, 212, // clé C
- 132, 212, 196, 236, // clé D
+ 82, 32, 146, 82, // factory r�solution C
+ 146, 32, 210, 82, // factory r�solution C
+ 224, 0, 256, 105, // tower r�solution C
+ 82, 82, 132, 150, // research r�solution C
+ 199, 169, 256, 233, // sac r�solution C
+ 106, 150, 130, 214, // cl� A
+ 82, 150, 106, 214, // cl� B
+ 132, 188, 196, 212, // cl� C
+ 132, 212, 196, 236, // cl� D
210, 32, 224, 46, // gris
56, 176, 82, 224, // sol coffre-fort
-1
@@ -2688,17 +2702,17 @@ static int tablePartW[] = // subm.tga
static int tablePartDr[] = // drawer.tga
{
128, 0, 134, 6, // bleu
- 128, 6, 134, 12, // gris foncé
+ 128, 6, 134, 12, // gris fonc�
128, 12, 134, 18, // gris clair
0, 0, 128, 32, // roues chenille
192, 0, 256, 32, // profil chenille
140, 0, 160, 8, // profil phare
160, 0, 192, 32, // face phare
0, 32, 160, 48, // hachure
- 160, 32, 192, 48, // côté
+ 160, 32, 192, 48, // c�t�
0, 48, 96, 96, // tableau de bord
96, 48, 192, 112, // radiateur
- 192, 32, 256, 112, // grille latérale
+ 192, 32, 256, 112, // grille lat�rale
192, 112, 256, 128, // capot
0, 96, 8, 160, // chassis
8, 96, 96, 104, // axe chenilles
@@ -2767,7 +2781,7 @@ static int tablePartKi[] = // kid.tga
64, 8, 72, 16, // arrosoir: fond
134, 128, 142, 256, // arrosoir: corps
142, 128, 150, 256, // arrosoir: tuyau
- 128, 225, 134, 256, // arrosoir: intérieur
+ 128, 225, 134, 256, // arrosoir: int�rieur
32, 224, 64, 256, // arrosoir: ponneau
56, 8, 64, 16, // skate: roues (31)
48, 8, 56, 16, // skate: axes
@@ -2791,48 +2805,48 @@ static int tablePartKi2[] = // kid2.tga
128, 128, 256, 256, // roue
192, 96, 256, 128, // pneu
184, 96, 192, 128, // jante
- 128, 96, 160, 128, // intérieur
+ 128, 96, 160, 128, // int�rieur
160, 96, 168, 104, // porte bois
- 160, 104, 168, 112, // porte métal
+ 160, 104, 168, 112, // porte m�tal
160, 112, 184, 128, // vitre
96, 0, 128, 256, // bouteille: corps (12)
64, 0, 96, 32, // bouteille: bouchon
168, 96, 176, 104, // bouteille: vert
0, 192, 96, 224, // bois clair
- 0, 224, 96, 256, // bois foncé
+ 0, 224, 96, 256, // bois fonc�
64, 32, 96, 64, // bateau
168, 104, 176, 112, // ballon (18)
176, 104, 184, 112, // ballon
- 176, 96, 184, 104, // intérieur caisse
+ 176, 96, 184, 104, // int�rieur caisse
-1
};
static int tablePartKi3[] = // kid3.tga
{
- 0, 0, 32, 28, // écrou: flan
- 0, 28, 32, 44, // écrou: profil
- 0, 44, 32, 60, // écrou: pas de vis
+ 0, 0, 32, 28, // �crou: flan
+ 0, 28, 32, 44, // �crou: profil
+ 0, 44, 32, 60, // �crou: pas de vis
0, 60, 32, 64, // tuyau
0, 64, 32, 68, // tuyau
0, 68, 8, 76, // tuyau
0, 76, 32, 108, // plastic
8, 68, 16, 76, // saut: gris clair (7)
- 16, 68, 24, 76, // saut: gris foncé
+ 16, 68, 24, 76, // saut: gris fonc�
24, 68, 32, 76, // saut: gris bois
0, 108, 32, 140, // saut: rotule
0, 140, 32, 144, // saut: axe
128, 0, 256, 128, // saut: flan
- 0, 144, 8, 152, // basket: gris foncé (13)
+ 0, 144, 8, 152, // basket: gris fonc� (13)
8, 144, 16, 152, // basket: gris clair
16, 144, 24, 152, // basket: gris lacets
24, 144, 32, 152, // basket: gris semelle
- 0, 152, 8, 181, // basket: intérieur
- 0, 181, 192, 256, // basket: côté
- 192, 181, 226, 256, // basket: arrière
+ 0, 152, 8, 181, // basket: int�rieur
+ 0, 181, 192, 256, // basket: c�t�
+ 192, 181, 226, 256, // basket: arri�re
32, 135, 96, 181, // basket: dessus (20)
96, 168, 128, 181, // basket: avant
8, 152, 16, 160, // chaise: plastique
- 16, 152, 24, 160, // chaise: métal
+ 16, 152, 24, 160, // chaise: m�tal
32, 0, 64, 32, // chaise: roue
8, 177, 24, 181, // chaise: roue
226, 181, 234, 256, // chaise: piston (26)
@@ -2845,12 +2859,12 @@ static int tablePartKi3[] = // kid3.tga
128, 135, 224, 181, // panneau
242, 135, 256, 256, // poteau (34)
24, 152, 32, 160, // clou
- 16, 160, 24, 168, // tuyau métalique
- 112, 181, 192, 185, // tuyau intérieur
+ 16, 160, 24, 168, // tuyau m�talique
+ 112, 181, 192, 185, // tuyau int�rieur
32, 32, 48, 80, // pas de vis
24, 160, 32, 168, // ventillateur: plastique (39)
- 40, 80, 56, 96, // ventillateur: plastique dégradé
- 8, 168, 16, 176, // ventillateur: métal
+ 40, 80, 56, 96, // ventillateur: plastique d�grad�
+ 8, 168, 16, 176, // ventillateur: m�tal
32, 80, 40, 112, // ventillateur: socle 1
64, 0, 96, 16, // ventillateur: socle 2
48, 32, 56, 80, // ventillateur: socle 3
@@ -2869,9 +2883,9 @@ static int tablePartF[] = // factory.tga
0, 0, 152, 152, // plancher octogonal fabrique
50, 50, 102, 102, // dessus pile
0, 152, 128, 252, // avant
- 128, 152, 256, 252, // arrière
- 152, 28, 225, 128, // côté
- 152, 28, 176, 128, // côté partiel
+ 128, 152, 256, 252, // arri�re
+ 152, 28, 225, 128, // c�t�
+ 152, 28, 176, 128, // c�t� partiel
152, 0, 216, 16, // hachures
236, 0, 256, 40, // axe
152, 128, 224, 152, // support cible
@@ -2880,8 +2894,8 @@ static int tablePartF[] = // factory.tga
static int tablePartD[] = // derrick.tga
{
- 0, 0, 64, 32, // grand côté
- 64, 0, 96, 24, // petit côté
+ 0, 0, 64, 32, // grand c�t�
+ 64, 0, 96, 24, // petit c�t�
96, 0, 136, 24, // attention
0, 32, 8, 160, // tube 1
8, 32, 16, 96, // tube 2
@@ -2890,22 +2904,22 @@ static int tablePartD[] = // derrick.tga
32, 32, 40, 160, // tige destructeur
8, 96, 16, 128, // foret
136, 0, 256, 120, // plancher octogonal station de recharge
- 40, 32, 64, 56, // cube métal
- 64, 24, 128, 48, // côté tour haut
- 64, 48, 128, 229, // côté tour bas
- 136, 120, 256, 240, // intérieur usine
- 0, 160, 64, 224, // toît usine
+ 40, 32, 64, 56, // cube m�tal
+ 64, 24, 128, 48, // c�t� tour haut
+ 64, 48, 128, 229, // c�t� tour bas
+ 136, 120, 256, 240, // int�rieur usine
+ 0, 160, 64, 224, // to�t usine
-1
};
static int tablePartC[] = // convert.tga
{
0, 0, 120, 120, // plancher octogonal convertisseur
- 0, 120, 128, 176, // grand côté
- 128, 120, 192, 176, // petit côté
+ 0, 120, 128, 176, // grand c�t�
+ 128, 120, 192, 176, // petit c�t�
192, 120, 256, 184, // couvercle convertisseur
120, 0, 216, 64, // face trianble
- 216, 0, 248, 64, // côté triangle
+ 216, 0, 248, 64, // c�t� triangle
120, 64, 160, 84, // axe
0, 141, 128, 176, // recherche: base
0, 176, 128, 214, // recherche: haut
@@ -2913,12 +2927,12 @@ static int tablePartC[] = // convert.tga
174, 64, 190, 120, // recherche: montant
190, 64, 206, 120, // recherche: montant
206, 64, 254, 85, // radar
- 192, 168, 256, 232, // hachures carrées
- 248, 0, 256, 64, // cône fabrique de piles
- 128, 176, 192, 240, // dessus centrale nucléaire
+ 192, 168, 256, 232, // hachures carr�es
+ 248, 0, 256, 64, // c�ne fabrique de piles
+ 128, 176, 192, 240, // dessus centrale nucl�aire
120, 85, 174, 120, // technicien, visage
206, 106, 256, 120, // technicien, casquette
- 160, 64, 174, 78, // technicien, visière
+ 160, 64, 174, 78, // technicien, visi�re
-1
};
@@ -2929,10 +2943,10 @@ static int tablePartS[] = // search.tga
0, 128, 128, 256, // pile
128, 128, 228, 240, // support pile
228, 128, 256, 184, // antenne
- 128, 128, 192, 160, // contrôle 1
- 128, 160, 192, 192, // contrôle 2
- 128, 192, 192, 224, // contrôle 3
- 128, 224, 192, 256, // contrôle 4
+ 128, 128, 192, 160, // contr�le 1
+ 128, 160, 192, 192, // contr�le 2
+ 128, 192, 192, 224, // contr�le 3
+ 128, 224, 192, 256, // contr�le 4
-1
};
@@ -2943,9 +2957,9 @@ static int tablePartP[] = // plant.tga
48, 156, 108, 256, // feuille 3
94, 0, 104, 100, // tige 1
185, 0, 195, 100, // tige 2
- 108, 100, 182, 256, // fougère
+ 108, 100, 182, 256, // foug�re
104, 0, 144, 100, // courge
- 203, 0, 256, 83, // armature derrick résolution C
+ 203, 0, 256, 83, // armature derrick r�solution C
-1
};
@@ -2978,9 +2992,9 @@ static int tablePartV[] = // vegetal.tga
static int tablePartM[] = // mother.tga
{
- 0, 0, 128, 128, // corps arrière
+ 0, 0, 128, 128, // corps arri�re
128, 0, 192, 128, // corps avant
- 0, 128, 64, 192, // tête
+ 0, 128, 64, 192, // t�te
64, 128, 192, 160, // pince ext.
64, 160, 192, 192, // pince int.
0, 192, 64, 256, // mire
@@ -2992,31 +3006,31 @@ static int tablePartA[] = // ant.tga
0, 0, 64, 64, // queue
0, 96, 128, 160, // queue abeille
64, 0, 128, 64, // corps
- 128, 0, 192, 64, // tête
+ 128, 0, 192, 64, // t�te
0, 64, 64, 72, // patte
0, 72, 64, 80, // antenne
64, 64, 150, 96, // queue ver
150, 64, 182, 96, // corps ver
- 182, 64, 256, 96, // tête ver
+ 182, 64, 256, 96, // t�te ver
224, 32, 256, 64, // articulation ver
128, 96, 220, 160, // aile
0, 80, 16, 96, // oeil
200, 0, 208, 8, // vert clair
- 200, 8, 208, 16, // vert foncé
- 0, 160, 64, 224, // corps araignée
- 64, 160, 128, 192, // tête araignée
- 208, 0, 216, 64, // patte araignée
- 216, 0, 224, 32, // patte araignée
- 224, 0, 256, 8, // antenne araignée
+ 200, 8, 208, 16, // vert fonc�
+ 0, 160, 64, 224, // corps araign�e
+ 64, 160, 128, 192, // t�te araign�e
+ 208, 0, 216, 64, // patte araign�e
+ 216, 0, 224, 32, // patte araign�e
+ 224, 0, 256, 8, // antenne araign�e
192, 0, 200, 8, // brun clair
- 192, 8, 200, 16, // brun foncé
+ 192, 8, 200, 16, // brun fonc�
128, 160, 256, 256, // SatCom
-1
};
static int tablePartH[] = // human.tga
{
- 0, 0, 64, 64, // vissière
+ 0, 0, 64, 64, // vissi�re
64, 0, 96, 64, // cuisse
96, 0, 128, 64, // jambe
128, 0, 192, 32, // bras
@@ -3025,12 +3039,12 @@ static int tablePartH[] = // human.tga
128, 64, 256, 224, // dos
64, 224, 112, 256, // dessus pied
144, 224, 168, 240, // dessous pied
- 112, 224, 144, 240, // côté pied
- 112, 224, 128, 240, // côté pied
+ 112, 224, 144, 240, // c�t� pied
+ 112, 224, 128, 240, // c�t� pied
0, 224, 64, 256, // gant
168, 224, 200, 256, // oreille
112, 240, 144, 256, // ligne casque
- 200, 224, 208, 256, // intérieur coup
+ 200, 224, 208, 256, // int�rieur coup
240, 0, 244, 64, // bombone orange
244, 0, 248, 64, // bombone orange (reflet)
248, 0, 252, 64, // bombone bleu
@@ -3044,15 +3058,15 @@ static int tablePartH[] = // human.tga
static int tablePartG[] = // apollo.tga
{
- 0, 0, 64, 64, // revètement LEM
- 64, 0, 128, 64, // revètement LEM
+ 0, 0, 64, 64, // rev�tement LEM
+ 64, 0, 128, 64, // rev�tement LEM
128, 8, 136, 128, // pied
0, 64, 64, 128, // roue
136, 24, 152, 44, // profil pneu
136, 8, 160, 24, // garde boue
- 64, 64, 128, 128, // siège
- 64, 128, 128, 192, // siège
- 64, 192, 128, 212, // siège
+ 64, 64, 128, 128, // si�ge
+ 64, 128, 128, 192, // si�ge
+ 64, 192, 128, 212, // si�ge
128, 128, 240, 192, // moteur
0, 192, 28, 256, // moteur
32, 128, 60, 256, // moteur
@@ -3062,7 +3076,7 @@ static int tablePartG[] = // apollo.tga
64, 212, 108, 256, // panneau de commande
198, 0, 206, 128, // mat
190, 64, 198, 128, // mat
- 160, 8, 176, 24, // caméra
+ 160, 8, 176, 24, // cam�ra
176, 8, 192, 24, // moyeu
136, 64, 168, 96, // module
168, 64, 190, 96, // module
@@ -3072,24 +3086,24 @@ static int tablePartG[] = // apollo.tga
128, 0, 136, 8, // jaune
136, 0, 144, 8, // beige
144, 0, 152, 8, // brun
- 168, 0, 176, 8, // gris très clair
+ 168, 0, 176, 8, // gris tr�s clair
152, 0, 160, 8, // gris clair
- 160, 0, 168, 8, // gris foncé
+ 160, 0, 168, 8, // gris fonc�
-1
};
static int tablePartB[] = // base1.tga
{
- 0, 0, 80, 256, // intérieur porte
+ 0, 0, 80, 256, // int�rieur porte
80, 0, 88, 256, // tranche porte
116, 0, 180, 64, // coiffe 1
116, 64, 180, 102, // coiffe 2
180, 0, 244, 37, // base
180, 37, 196, 101, // support
88, 0, 116, 256, // colonne
- 212, 37, 256, 128, // supplément
+ 212, 37, 256, 128, // suppl�ment
128, 128, 256, 256, // 1/4 du sol
- 196, 37, 212, 53, // gris foncé
+ 196, 37, 212, 53, // gris fonc�
196, 53, 212, 69, // gris clair
-1
};
@@ -3139,7 +3153,7 @@ int* CModel::RetTextureTable()
return 0;
}
-// Met à jour la partie de texture.
+// Met � jour la partie de texture.
void CModel::TexturePartUpdate()
{
diff --git a/src/model.h b/src/model.h
index 2f686ee..a9fab24 100644
--- a/src/model.h
+++ b/src/model.h
@@ -1,4 +1,18 @@
-// model.h
+// * 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 .
#ifndef _MODEL_H_
#define _MODEL_H_
diff --git a/src/modfile.cpp b/src/modfile.cpp
index f54f3c9..131684c 100644
--- a/src/modfile.cpp
+++ b/src/modfile.cpp
@@ -1,4 +1,18 @@
-// modfile.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
@@ -46,7 +60,7 @@ CModFile::~CModFile()
-// Crée un triangle dans la structure interne.
+// Cr�e un triangle dans la structure interne.
BOOL CModFile::CreateTriangle(D3DVECTOR p1, D3DVECTOR p2, D3DVECTOR p3,
float min, float max)
@@ -428,25 +442,25 @@ BOOL CModFile::AddModel(char *filename, int first, BOOL bEdit, BOOL bMeta)
if ( !bEdit )
{
- limit[0] = m_engine->RetLimitLOD(0); // frontière AB selon config
- limit[1] = m_engine->RetLimitLOD(1); // frontière BC selon config
+ limit[0] = m_engine->RetLimitLOD(0); // fronti�re AB selon config
+ limit[1] = m_engine->RetLimitLOD(1); // fronti�re BC selon config
- // Frontières standard -> config.
+ // Fronti�res standard -> config.
for ( i=first ; i<m_triangleUsed ; i++ )
{
if ( m_triangleTable[i].min == 0.0f &&
- m_triangleTable[i].max == 100.0f ) // résolution A ?
+ m_triangleTable[i].max == 100.0f ) // r�solution A ?
{
m_triangleTable[i].max = limit[0];
}
else if ( m_triangleTable[i].min == 100.0f &&
- m_triangleTable[i].max == 200.0f ) // résolution B ?
+ m_triangleTable[i].max == 200.0f ) // r�solution B ?
{
m_triangleTable[i].min = limit[0];
m_triangleTable[i].max = limit[1];
}
else if ( m_triangleTable[i].min == 200.0f &&
- m_triangleTable[i].max == 1000000.0f ) // résolution C ?
+ m_triangleTable[i].max == 1000000.0f ) // r�solution C ?
{
m_triangleTable[i].min = limit[1];
}
@@ -498,7 +512,7 @@ BOOL CModFile::WriteModel(char *filename)
}
-// Crée l'objet dans le moteur 3D.
+// Cr�e l'objet dans le moteur 3D.
BOOL CModFile::CreateEngineObject(int objRank, int addState)
{
@@ -619,7 +633,7 @@ void CModFile::Mirror()
}
-// Retourne le pointeur à la liste de triangles.
+// Retourne le pointeur � la liste de triangles.
void CModFile::SetTriangleUsed(int total)
{
diff --git a/src/modfile.h b/src/modfile.h
index 2db74a3..0099cd4 100644
--- a/src/modfile.h
+++ b/src/modfile.h
@@ -1,4 +1,18 @@
-// modfile.h
+// * 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 .
#ifndef _MODFILE_H_
#define _MODFILE_H_
@@ -12,8 +26,8 @@ class CD3DEngine;
typedef struct
{
- char bUsed; // TRUE -> utilisé
- char bSelect; // TRUE -> sélectionné
+ char bUsed; // TRUE -> utilis�
+ char bSelect; // TRUE -> s�lectionn�
D3DVERTEX p1;
D3DVERTEX p2;
D3DVERTEX p3;
@@ -26,8 +40,8 @@ OldModelTriangle1; // longueur = 196 bytes
typedef struct
{
- char bUsed; // TRUE -> utilisé
- char bSelect; // TRUE -> sélectionné
+ char bUsed; // TRUE -> utilis�
+ char bSelect; // TRUE -> s�lectionn�
D3DVERTEX p1;
D3DVERTEX p2;
D3DVERTEX p3;
@@ -45,8 +59,8 @@ OldModelTriangle2;
typedef struct
{
- char bUsed; // TRUE -> utilisé
- char bSelect; // TRUE -> sélectionné
+ char bUsed; // TRUE -> utilis�
+ char bSelect; // TRUE -> s�lectionn�
D3DVERTEX2 p1;
D3DVERTEX2 p2;
D3DVERTEX2 p3;
diff --git a/src/motion.cpp b/src/motion.cpp
index 5553f69..2b33c10 100644
--- a/src/motion.cpp
+++ b/src/motion.cpp
@@ -1,4 +1,18 @@
-// motion.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
@@ -83,14 +97,14 @@ void CMotion::SetBrain(CBrain* brain)
}
-// Crée.
+// Cr�e.
BOOL CMotion::Create(D3DVECTOR pos, float angle, ObjectType type, float power)
{
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotion::EventProcess(const Event &event)
{
@@ -136,11 +150,11 @@ BOOL CMotion::EventProcess(const Event &event)
return TRUE;
}
-// (*) Evite le bug des fourmis retournées par le thumper et dont
-// l'abdomen grossi à l'infini !
+// (*) Evite le bug des fourmis retourn�es par le thumper et dont
+// l'abdomen grossi � l'infini !
-// Démarre une action.
+// D�marre une action.
Error CMotion::SetAction(int action, float time)
{
@@ -158,7 +172,7 @@ int CMotion::RetAction()
}
-// Spécifie un paramètre spécial.
+// Sp�cifie un param�tre sp�cial.
BOOL CMotion::SetParam(int rank, float value)
{
@@ -171,7 +185,7 @@ float CMotion::RetParam(int rank)
}
-// Sauve tous les paramètres de l'objet.
+// Sauve tous les param�tres de l'objet.
BOOL CMotion::Write(char *line)
{
@@ -191,7 +205,7 @@ BOOL CMotion::Write(char *line)
return FALSE;
}
-// Restitue tous les paramètres de l'objet.
+// Restitue tous les param�tres de l'objet.
BOOL CMotion::Read(char *line)
{
@@ -203,7 +217,7 @@ BOOL CMotion::Read(char *line)
}
-// Donne la vibration linéaire.
+// Donne la vibration lin�aire.
void CMotion::SetLinVibration(D3DVECTOR dir)
{
diff --git a/src/motion.h b/src/motion.h
index dcbd595..41c0b88 100644
--- a/src/motion.h
+++ b/src/motion.h
@@ -1,4 +1,18 @@
-// motion.h
+// * 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 .
#ifndef _MOTION_H_
#define _MOTION_H_
@@ -66,7 +80,7 @@ protected:
float m_actionTime;
float m_progress;
- D3DVECTOR m_linVibration; // vibration linéaire
+ D3DVECTOR m_linVibration; // vibration lin�aire
D3DVECTOR m_cirVibration; // vibration circulaire
D3DVECTOR m_inclinaison; // inclinaison
};
diff --git a/src/motionant.cpp b/src/motionant.cpp
index 4fd76f6..694d2b6 100644
--- a/src/motionant.cpp
+++ b/src/motionant.cpp
@@ -1,4 +1,18 @@
-// motionant.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
@@ -28,7 +42,7 @@
#define ADJUST_ANGLE FALSE // TRUE -> ajuste les angles des membres
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -65,7 +79,7 @@ void CMotionAnt::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -79,7 +93,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -90,12 +104,12 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, -2.0f, 0.0f), 4.0f, SOUND_BOUM, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(-0.5f, 1.0f, 0.0f), 4.0f);
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -104,7 +118,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(2.0f, 0.0f, 0.0f));
- // Crée la queue.
+ // Cr�e la queue.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -113,7 +127,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(-1.0f, 0.0f, 0.0f));
- // Crée la cuisse 1 arrière-droite.
+ // Cr�e la cuisse 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -122,7 +136,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(3, D3DVECTOR(-0.4f, -0.1f, -0.3f));
- // Crée la jambe 1 arrière-droite.
+ // Cr�e la jambe 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -131,7 +145,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(4, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 1 arrière-droite.
+ // Cr�e le pied 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -140,7 +154,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(5, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 2 milieu-droite.
+ // Cr�e la cuisse 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -149,7 +163,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.1f, -0.1f, -0.4f));
- // Crée la jambe 2 milieu-droite.
+ // Cr�e la jambe 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -158,7 +172,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(7, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 2 milieu-droite.
+ // Cr�e le pied 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -167,7 +181,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(8, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 3 avant-droite.
+ // Cr�e la cuisse 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -176,7 +190,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(9, D3DVECTOR(1.4f, -0.1f, -0.6f));
- // Crée la jambe 3 avant-droite.
+ // Cr�e la jambe 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(10, rank);
@@ -185,7 +199,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(10, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 3 avant-droite.
+ // Cr�e le pied 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(11, rank);
@@ -194,7 +208,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(11, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 1 arrière-gauche.
+ // Cr�e la cuisse 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(12, rank);
@@ -204,7 +218,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(12, D3DVECTOR(-0.4f, -0.1f, 0.3f));
- // Crée la jambe 1 arrière-gauche.
+ // Cr�e la jambe 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(13, rank);
@@ -214,7 +228,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(13, D3DVECTOR(0.0f, 0.0f, 1.0f));
- // Crée le pied 1 arrière-gauche.
+ // Cr�e le pied 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(14, rank);
@@ -224,7 +238,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(14, D3DVECTOR(0.0f, 0.0f, 2.0f));
- // Crée la cuisse 2 milieu-gauche.
+ // Cr�e la cuisse 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(15, rank);
@@ -234,7 +248,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(15, D3DVECTOR(0.1f, -0.1f, 0.4f));
- // Crée la jambe 2 milieu-gauche.
+ // Cr�e la jambe 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(16, rank);
@@ -244,7 +258,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(16, D3DVECTOR(0.0f, 0.0f, 1.0f));
- // Crée le pied 2 milieu-gauche.
+ // Cr�e le pied 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(17, rank);
@@ -254,7 +268,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(17, D3DVECTOR(0.0f, 0.0f, 2.0f));
- // Crée la cuisse 3 avant-gauche.
+ // Cr�e la cuisse 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(18, rank);
@@ -264,7 +278,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(18, D3DVECTOR(1.4f, -0.1f, 0.6f));
- // Crée la jambe 3 avant-gauche.
+ // Cr�e la jambe 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(19, rank);
@@ -274,7 +288,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(19, D3DVECTOR(0.0f, 0.0f, 1.0f));
- // Crée le pied 3 avant-gauche.
+ // Cr�e le pied 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(20, rank);
@@ -298,7 +312,7 @@ BOOL CMotionAnt::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionAnt::CreatePhysics()
{
@@ -315,7 +329,7 @@ void CMotionAnt::CreatePhysics()
0,30,0, 0,20,0, 0,15,0, // t1: cuisses 1..3
-15,-50,0, -20,-60,0, -10,-75,0, // t1: jambes 1..3
-40,50,0, -25,15,0, -50,35,0, // t1: pieds 1..3
- // au sol derrière :
+ // au sol derri�re :
0,35,0, 0,30,0, 0,20,0, // t2: cuisses 1..3
-20,-15,0, -30,-55,0, -25,-70,15, // t2: jambes 1..3
-25,25,0, -20,60,0, -30,95,0, // t2: pieds 1..3
@@ -331,7 +345,7 @@ void CMotionAnt::CreatePhysics()
0,30,0, 0,20,0, 0,15,0, // t1: cuisses 1..3
-15,-35,0, -20,-60,0, -15,-75,0, // t1: jambes 1..3
-35,35,0, -25,40,0, -40,65,0, // t1: pieds 1..3
- // au sol derrière :
+ // au sol derri�re :
0,30,0, 0,20,0, 0,15,0, // t2: cuisses 1..3
-15,-35,0, -20,-60,0, -15,-75,0, // t2: jambes 1..3
-35,35,0, -25,40,0, -40,65,0, // t2: pieds 1..3
@@ -339,7 +353,7 @@ void CMotionAnt::CreatePhysics()
int member_spec[] =
{
- // x1,y1,z1, x2,y2,z2, x3,y3,z3, // prépare le tir :
+ // x1,y1,z1, x2,y2,z2, x3,y3,z3, // pr�pare le tir :
0,20,0, 0,10,0, 0,50,0, // s0: cuisses 1..3
-50,-30,0, -20,-15,0, 35,-65,0, // s0: jambes 1..3
-5,-40,0, 20,-70,0, -10,-40,0, // s0: pieds 1..3
@@ -351,7 +365,7 @@ void CMotionAnt::CreatePhysics()
0,30,0, 0,20,0, 0,15,0, // s2: cuisses 1..3
-15,-50,0, -20,-60,0, -10,-75,0, // s2: jambes 1..3
-40,50,0, -25,15,0, -50,35,0, // s2: pieds 1..3
- // brûle :
+ // br�le :
0,30,0, 0,20,0, 0,15,0, // s3: cuisses 1..3
-15,-35,0, -20,-60,0, -15,-75,0, // s3: jambes 1..3
-35,35,0, -25,40,0, -40,65,0, // s3: pieds 1..3
@@ -414,7 +428,7 @@ void CMotionAnt::CreatePhysics()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionAnt::EventProcess(const Event &event)
{
@@ -459,7 +473,7 @@ BOOL CMotionAnt::EventProcess(const Event &event)
}
// Calcule une valeur (radians) proportionnelle comprise
-// entre a et b (degrés).
+// entre a et b (degr�s).
inline float Propf(float a, float b, float p)
{
@@ -471,7 +485,7 @@ inline float Propf(float a, float b, float p)
return aa+p*(bb-aa);
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionAnt::EventFrame(const Event &event)
{
@@ -494,7 +508,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
m_armTimeMarch += (s)*event.rTime*0.15f;
m_armMember += (s+a)*event.rTime*0.15f;
- bStop = ( a == 0.0f && s == 0.0f ); // a l'arrêt ?
+ bStop = ( a == 0.0f && s == 0.0f ); // a l'arr�t ?
action = MA_MARCH; // marche
if ( s == 0.0f && a == 0.0f )
@@ -506,7 +520,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
{
prog = Mod(m_armTimeAbs, 2.0f)/10.0f;
a = Mod(m_armMember, 1.0f);
- a = (prog-a)*event.rTime*2.0f; // vient gentiment à position stop
+ a = (prog-a)*event.rTime*2.0f; // vient gentiment � position stop
m_armMember += a;
}
@@ -514,7 +528,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
{
m_actionType = MAS_RUIN;
}
- if ( m_object->RetBurn() ) // brûle ?
+ if ( m_object->RetBurn() ) // br�le ?
{
if ( m_object->RetFixed() )
{
@@ -528,7 +542,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
for ( i=0 ; i<6 ; i++ ) // les 6 pattes
{
- if ( m_actionType != -1 ) // action spéciale en cours ?
+ if ( m_actionType != -1 ) // action sp�ciale en cours ?
{
st = 3*3*3*3*MA_SPEC + 3*3*3*m_actionType + (i%3)*3;
nd = st;
@@ -634,7 +648,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
}
#endif
- if ( m_actionType == MAS_PREPARE ) // prépare le tir ?
+ if ( m_actionType == MAS_PREPARE ) // pr�pare le tir ?
{
prog = m_progress;
@@ -642,7 +656,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
dir.y = 0.0f;
dir.z = Prop(0, -50, prog);
SetInclinaison(dir);
- m_object->SetAngleZ(1, Prop(0, 65, prog)); // tête
+ m_object->SetAngleZ(1, Prop(0, 65, prog)); // t�te
m_object->SetAngleZ(2, Prop(0, -95, prog)); // queue
}
else if ( m_actionType == MAS_FIRE ) // tir ?
@@ -666,10 +680,10 @@ BOOL CMotionAnt::EventFrame(const Event &event)
dir.y = 0.0f;
dir.z = Prop(0, -50, prog);
SetInclinaison(dir);
- m_object->SetAngleZ(1, Prop(0, 65, prog)); // tête
+ m_object->SetAngleZ(1, Prop(0, 65, prog)); // t�te
m_object->SetAngleZ(2, Prop(0, -95, prog)); // queue
}
- else if ( m_actionType == MAS_BURN ) // brûle ?
+ else if ( m_actionType == MAS_BURN ) // br�le ?
{
dir = D3DVECTOR(PI, 0.0f, 0.0f);
SetCirVibration(dir);
@@ -679,7 +693,7 @@ BOOL CMotionAnt::EventFrame(const Event &event)
SetInclinaison(dir);
time = event.rTime*1.0f;
- m_object->SetAngleZ(1, Smooth(m_object->RetAngleZ(1), 0.0f, time)); // tête
+ m_object->SetAngleZ(1, Smooth(m_object->RetAngleZ(1), 0.0f, time)); // t�te
m_object->SetAngleZ(2, Smooth(m_object->RetAngleZ(2), 0.0f, time)); // queue
}
else if ( m_actionType == MAS_RUIN ) // ruine ?
@@ -770,9 +784,9 @@ BOOL CMotionAnt::EventFrame(const Event &event)
dir = D3DVECTOR(0.0f, 0.0f, 0.0f);
SetInclinaison(dir);
- m_object->SetAngleY(1, sinf(m_armTimeAbs*8.0f)*0.7f); // tête
+ m_object->SetAngleY(1, sinf(m_armTimeAbs*8.0f)*0.7f); // t�te
m_object->SetAngleY(2, cosf(m_armTimeAbs*8.0f)*0.7f); // queue
- m_object->SetAngleZ(1, 0.0f); // tête
+ m_object->SetAngleZ(1, 0.0f); // t�te
m_object->SetAngleZ(2, 0.0f); // queue
if ( m_progress >= 1.0f )
@@ -875,9 +889,9 @@ BOOL CMotionAnt::EventFrame(const Event &event)
dir = D3DVECTOR(0.0f, 0.0f, 0.0f);
SetCirVibration(dir);
- m_object->SetAngleZ(1, sinf(m_armTimeAbs*1.4f)*0.20f); // tête
- m_object->SetAngleX(1, sinf(m_armTimeAbs*1.9f)*0.10f); // tête
- m_object->SetAngleY(1, sinf(m_armTimeAbs*2.1f)*0.50f); // tête
+ m_object->SetAngleZ(1, sinf(m_armTimeAbs*1.4f)*0.20f); // t�te
+ m_object->SetAngleX(1, sinf(m_armTimeAbs*1.9f)*0.10f); // t�te
+ m_object->SetAngleY(1, sinf(m_armTimeAbs*2.1f)*0.50f); // t�te
}
return TRUE;
diff --git a/src/motionant.h b/src/motionant.h
index 0365927..bebb797 100644
--- a/src/motionant.h
+++ b/src/motionant.h
@@ -1,4 +1,18 @@
-// motionant.h
+// * 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 .
#ifndef _MOTIONANT_H_
#define _MOTIONANT_H_
diff --git a/src/motionbee.cpp b/src/motionbee.cpp
index 8d4de31..378967f 100644
--- a/src/motionbee.cpp
+++ b/src/motionbee.cpp
@@ -1,4 +1,18 @@
-// motionbee.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
@@ -28,7 +42,7 @@
#define ADJUST_ANGLE FALSE // TRUE -> ajuste les angles des membres
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -64,7 +78,7 @@ void CMotionBee::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -78,7 +92,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -89,12 +103,12 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, 0.0f, 0.0f), 4.0f, SOUND_BOUM, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(-1.0f, 1.0f, 0.0f), 5.0f);
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -103,7 +117,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(1.6f, 0.3f, 0.0f));
- // Crée la queue.
+ // Cr�e la queue.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -112,7 +126,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(-0.8f, 0.0f, 0.0f));
- // Crée la cuisse 1 arrière-droite.
+ // Cr�e la cuisse 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -121,7 +135,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(3, D3DVECTOR(-0.3f, -0.1f, -0.2f));
- // Crée la jambe 1 arrière-droite.
+ // Cr�e la jambe 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -130,7 +144,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(4, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 1 arrière-droite.
+ // Cr�e le pied 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -139,7 +153,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(5, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 2 milieu-droite.
+ // Cr�e la cuisse 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -148,7 +162,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.3f, -0.1f, -0.4f));
- // Crée la jambe 2 milieu-droite.
+ // Cr�e la jambe 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -157,7 +171,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(7, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 2 milieu-droite.
+ // Cr�e le pied 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -166,7 +180,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(8, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 3 avant-droite.
+ // Cr�e la cuisse 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -175,7 +189,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(9, D3DVECTOR(1.0f, -0.1f, -0.7f));
- // Crée la jambe 3 avant-droite.
+ // Cr�e la jambe 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(10, rank);
@@ -184,7 +198,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(10, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 3 avant-droite.
+ // Cr�e le pied 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(11, rank);
@@ -193,7 +207,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(11, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 1 arrière-gauche.
+ // Cr�e la cuisse 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(12, rank);
@@ -203,7 +217,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(12, D3DVECTOR(-0.3f, -0.1f, 0.2f));
m_object->SetAngleY(12, PI);
- // Crée la jambe 1 arrière-gauche.
+ // Cr�e la jambe 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(13, rank);
@@ -212,7 +226,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(13, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 1 arrière-gauche.
+ // Cr�e le pied 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(14, rank);
@@ -221,7 +235,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(14, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 2 milieu-gauche.
+ // Cr�e la cuisse 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(15, rank);
@@ -231,7 +245,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(15, D3DVECTOR(0.3f, -0.1f, 0.4f));
m_object->SetAngleY(15, PI);
- // Crée la jambe 2 milieu-gauche.
+ // Cr�e la jambe 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(16, rank);
@@ -240,7 +254,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(16, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 2 milieu-gauche.
+ // Cr�e le pied 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(17, rank);
@@ -249,7 +263,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(17, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée la cuisse 3 avant-gauche.
+ // Cr�e la cuisse 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(18, rank);
@@ -259,7 +273,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(18, D3DVECTOR(1.0f, -0.1f, 0.7f));
m_object->SetAngleY(18, PI);
- // Crée la jambe 3 avant-gauche.
+ // Cr�e la jambe 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(19, rank);
@@ -268,7 +282,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(19, D3DVECTOR(0.0f, 0.0f, -1.0f));
- // Crée le pied 3 avant-gauche.
+ // Cr�e le pied 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(20, rank);
@@ -277,7 +291,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(20, D3DVECTOR(0.0f, 0.0f, -2.0f));
- // Crée l'aile droite.
+ // Cr�e l'aile droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(21, rank);
@@ -286,7 +300,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(21, D3DVECTOR(0.8f, 0.4f, -0.5f));
- // Crée l'aile gauche.
+ // Cr�e l'aile gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(22, rank);
@@ -310,7 +324,7 @@ BOOL CMotionBee::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionBee::CreatePhysics()
{
@@ -327,7 +341,7 @@ void CMotionBee::CreatePhysics()
0,30,0, 0,20,0, 0,15,0, // t1: cuisses 1..3
-15,-50,0, -20,-60,0, -10,-75,0, // t1: jambes 1..3
-40,50,0, -25,15,0, -50,35,0, // t1: pieds 1..3
- // au sol derrière :
+ // au sol derri�re :
0,35,0, 0,30,0, 0,20,0, // t2: cuisses 1..3
-20,-15,0, -30,-55,0, -25,-70,15, // t2: jambes 1..3
-25,25,0, -20,60,0, -30,95,0, // t2: pieds 1..3
@@ -339,7 +353,7 @@ void CMotionBee::CreatePhysics()
0,45,0, 0,45,0, 0,50,0, // s0: cuisses 1..3
-35,-70,0, -20,-85,-25,-25,-100,0, // s0: jambes 1..3
-110,75,-15,-130,80,-25,-125,40,0, // s0: pieds 1..3
- // brûle :
+ // br�le :
0,45,0, 0,45,0, 0,50,0, // s1: cuisses 1..3
-35,-70,0, -20,-85,-25,-25,-100,0, // s1: jambes 1..3
-110,75,-15,-130,80,-25,-125,40,0, // s1: pieds 1..3
@@ -391,7 +405,7 @@ void CMotionBee::CreatePhysics()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionBee::EventProcess(const Event &event)
{
@@ -435,7 +449,7 @@ BOOL CMotionBee::EventProcess(const Event &event)
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionBee::EventFrame(const Event &event)
{
@@ -456,14 +470,14 @@ BOOL CMotionBee::EventFrame(const Event &event)
m_armTimeMarch += (s)*event.rTime*0.15f;
m_armMember += (s+a)*event.rTime*0.15f;
- bStop = ( a == 0.0f && s == 0.0f ); // a l'arrêt ?
+ bStop = ( a == 0.0f && s == 0.0f ); // a l'arr�t ?
if ( !m_physics->RetLand() ) bStop = TRUE;
if ( bStop )
{
prog = Mod(m_armTimeAbs, 2.0f)/10.0f;
a = Mod(m_armMember, 1.0f);
- a = (prog-a)*event.rTime*2.0f; // vient gentiment à position stop
+ a = (prog-a)*event.rTime*2.0f; // vient gentiment � position stop
m_armMember += a;
}
@@ -476,14 +490,14 @@ BOOL CMotionBee::EventFrame(const Event &event)
{
m_actionType = MBS_RUIN;
}
- if ( m_object->RetBurn() ) // brûle ?
+ if ( m_object->RetBurn() ) // br�le ?
{
m_actionType = MBS_BURN;
}
for ( i=0 ; i<6 ; i++ ) // les 6 pattes
{
- if ( m_actionType != -1 ) // action spéciale en cours ?
+ if ( m_actionType != -1 ) // action sp�ciale en cours ?
{
st = 3*3*3*3*MB_SPEC + 3*3*3*m_actionType + (i%3)*3;
nd = st;
@@ -626,9 +640,9 @@ BOOL CMotionBee::EventFrame(const Event &event)
m_object->SetAngleY(22, Rand()*PI/6.0f*prog);
#endif
- m_object->SetAngleZ(1, sinf(m_armTimeAbs*1.4f)*0.20f); // tête
- m_object->SetAngleX(1, sinf(m_armTimeAbs*1.9f)*0.10f); // tête
- m_object->SetAngleY(1, sinf(m_armTimeAbs*2.1f)*0.50f); // tête
+ m_object->SetAngleZ(1, sinf(m_armTimeAbs*1.4f)*0.20f); // t�te
+ m_object->SetAngleX(1, sinf(m_armTimeAbs*1.9f)*0.10f); // t�te
+ m_object->SetAngleY(1, sinf(m_armTimeAbs*2.1f)*0.50f); // t�te
#if 0
h = m_terrain->RetFloorHeight(RetPosition(0));
diff --git a/src/motionbee.h b/src/motionbee.h
index 18636c2..6fc8c48 100644
--- a/src/motionbee.h
+++ b/src/motionbee.h
@@ -1,4 +1,18 @@
-// motionbee.h
+// * 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 .
#ifndef _MOTIONBEE_H_
#define _MOTIONBEE_H_
diff --git a/src/motionhuman.cpp b/src/motionhuman.cpp
index 9306b43..936c6f8 100644
--- a/src/motionhuman.cpp
+++ b/src/motionhuman.cpp
@@ -1,4 +1,18 @@
-// motionhuman.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 ADJUST_ANGLE FALSE // TRUE -> ajuste les angles des membres
#define ADJUST_ACTION (3*3*3*3*MH_SPEC+3*3*3*MHS_SATCOM)
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -79,7 +93,7 @@ void CMotionHuman::DeleteObject(BOOL bAll)
}
-// Démarre une action.
+// D�marre une action.
Error CMotionHuman::SetAction(int action, float time)
{
@@ -89,7 +103,7 @@ Error CMotionHuman::SetAction(int action, float time)
}
-// Crée le cosmonaute posé sur le sol.
+// Cr�e le cosmonaute pos� sur le sol.
BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -136,20 +150,20 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
- if ( option == 0 ) // tête dans casque ?
+ if ( option == 0 ) // t�te dans casque ?
{
pModFile->ReadModel("objects\\human1c.mod");
}
- if ( option == 1 ) // tête à l'air ?
+ if ( option == 1 ) // t�te � l'air ?
{
pModFile->ReadModel("objects\\human1h.mod");
}
- if ( option == 2 ) // sans sac à dos ?
+ if ( option == 2 ) // sans sac � dos ?
{
pModFile->ReadModel("objects\\human1v.mod");
}
@@ -158,12 +172,12 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, 0.0f, 0.0f), 2.0f, SOUND_AIE, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(0.0f, 1.0f, 0.0f), 4.0f);
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -171,14 +185,14 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_HUMAN )
{
- if ( option == 0 ) // tête dans casque ?
+ if ( option == 0 ) // t�te dans casque ?
{
face = m_main->RetGamerFace();
sprintf(filename, "objects\\human2c%d.mod", face+1);
pModFile->ReadModel(filename);
}
- if ( option == 1 || // tête à l'air ?
- option == 2 ) // sans sac à dos ?
+ if ( option == 1 || // t�te � l'air ?
+ option == 2 ) // sans sac � dos ?
{
face = m_main->RetGamerFace();
sprintf(filename, "objects\\human2h%d.mod", face+1);
@@ -191,13 +205,13 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
}
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(0.0f, 2.7f, 0.0f));
- if ( option == 1 || // tête à l'air ?
- option == 2 ) // sans sac à dos ?
+ if ( option == 1 || // t�te � l'air ?
+ option == 2 ) // sans sac � dos ?
{
m_object->SetZoom(1, D3DVECTOR(1.0f, 1.05f, 1.0f));
}
- // Crée les lunettes.
+ // Cr�e les lunettes.
glasses = m_main->RetGamerGlasses();
if ( glasses != 0 && type == OBJECT_HUMAN )
{
@@ -210,7 +224,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
}
- // Crée le bras droite.
+ // Cr�e le bras droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -220,7 +234,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(0.0f, 2.3f, -1.2f));
m_object->SetAngle(2, D3DVECTOR(90.0f*PI/180.0f, 90.0f*PI/180.0f, -50.0f*PI/180.0f));
- // Crée l'avant-bras droite.
+ // Cr�e l'avant-bras droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -230,7 +244,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(3, D3DVECTOR(1.3f, 0.0f, 0.0f));
m_object->SetAngle(3, D3DVECTOR(0.0f*PI/180.0f, -20.0f*PI/180.0f, 0.0f*PI/180.0f));
- // Crée la main droite.
+ // Cr�e la main droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -239,7 +253,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(4, D3DVECTOR(1.2f, 0.0f, 0.0f));
- // Crée la cuisse droite.
+ // Cr�e la cuisse droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -249,7 +263,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(5, D3DVECTOR(0.0f, 0.0f, -0.7f));
m_object->SetAngle(5, D3DVECTOR(10.0f*PI/180.0f, 0.0f*PI/180.0f, 5.0f*PI/180.0f));
- // Crée la jambe droite.
+ // Cr�e la jambe droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -259,7 +273,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(6, D3DVECTOR(0.0f, -1.5f, 0.0f));
m_object->SetAngle(6, D3DVECTOR(0.0f*PI/180.0f, 0.0f*PI/180.0f, -10.0f*PI/180.0f));
- // Crée le pied droite.
+ // Cr�e le pied droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -269,7 +283,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(7, D3DVECTOR(0.0f, -1.5f, 0.0f));
m_object->SetAngle(7, D3DVECTOR(-10.0f*PI/180.0f, 5.0f*PI/180.0f, 5.0f*PI/180.0f));
- // Crée le bras gauche.
+ // Cr�e le bras gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -280,7 +294,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(8, D3DVECTOR(0.0f, 2.3f, 1.2f));
m_object->SetAngle(8, D3DVECTOR(-90.0f*PI/180.0f, -90.0f*PI/180.0f, -50.0f*PI/180.0f));
- // Crée l'avant-bras gauche.
+ // Cr�e l'avant-bras gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -291,7 +305,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(9, D3DVECTOR(1.3f, 0.0f, 0.0f));
m_object->SetAngle(9, D3DVECTOR(0.0f*PI/180.0f, 20.0f*PI/180.0f, 0.0f*PI/180.0f));
- // Crée la main gauche.
+ // Cr�e la main gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(10, rank);
@@ -301,7 +315,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(10, D3DVECTOR(1.2f, 0.0f, 0.0f));
- // Crée la cuisse gauche.
+ // Cr�e la cuisse gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(11, rank);
@@ -312,7 +326,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(11, D3DVECTOR(0.0f, 0.0f, 0.7f));
m_object->SetAngle(11, D3DVECTOR(-10.0f*PI/180.0f, 0.0f*PI/180.0f, 5.0f*PI/180.0f));
- // Crée la jambe gauche.
+ // Cr�e la jambe gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(12, rank);
@@ -323,7 +337,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(12, D3DVECTOR(0.0f, -1.5f, 0.0f));
m_object->SetAngle(12, D3DVECTOR(0.0f*PI/180.0f, 0.0f*PI/180.0f, -10.0f*PI/180.0f));
- // Crée le pied gauche.
+ // Cr�e le pied gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(13, rank);
@@ -334,8 +348,8 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(13, D3DVECTOR(0.0f, -1.5f, 0.0f));
m_object->SetAngle(13, D3DVECTOR(10.0f*PI/180.0f, -5.0f*PI/180.0f, 5.0f*PI/180.0f));
- // Crée le pistolet.
- if ( option != 2 ) // avec sac à dos ?
+ // Cr�e le pistolet.
+ if ( option != 2 ) // avec sac � dos ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
@@ -361,7 +375,7 @@ BOOL CMotionHuman::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionHuman::CreatePhysics(ObjectType type)
{
@@ -378,7 +392,7 @@ void CMotionHuman::CreatePhysics(ObjectType type)
125,115,-45,10,0,50, 0,0,0, // t1: bras/cuisses/-
0,-20,0, -5,0,-15, 0,0,0, // t1: avant-bras/jambes/-
0,0,0, -5,0,0, 0,0,0, // t1: mains/pieds/-
- // au sol derrière :
+ // au sol derri�re :
25,55,-40, 10,0,-15, 0,0,0, // t2: bras/cuisses/-
30,-50,40, -5,0,-55, 0,0,0, // t2: avant-bras/jambes/-
0,0,0, -5,0,25, 0,0,0, // t2: mains/pieds/-
@@ -394,7 +408,7 @@ void CMotionHuman::CreatePhysics(ObjectType type)
15,50,-55, 10,0,50, 0,0,0, // t1: bras/cuisses/-
45,-70,10, -5,0,-15, 0,0,0, // t1: avant-bras/jambes/-
-10,25,0, -5,0,0, 0,0,0, // t1: mains/pieds/-
- // au sol derrière :
+ // au sol derri�re :
15,50,-45, 10,0,-15, 0,0,0, // t2: bras/cuisses/-
45,-70,10, -5,0,-55, 0,0,0, // t2: avant-bras/jambes/-
-10,25,0, -5,0,45, 0,0,0, // t2: mains/pieds/-
@@ -410,7 +424,7 @@ void CMotionHuman::CreatePhysics(ObjectType type)
90,110,-45, 10,0,0, 0,0,0, // t1: bras/cuisses/-
0,-20,0, -5,5,0, 0,0,0, // t1: avant-bras/jambes/-
0,0,0, -5,10,0, 0,0,0, // t1: mains/pieds/-
- // au sol derrière :
+ // au sol derri�re :
90,70,-45, 10,0,0, 0,0,0, // t2: bras/cuisses/-
0,-20,10, -5,-5,0, 0,0,0, // t2: avant-bras/jambes/-
0,0,0, -5,-10,0, 0,0,0, // t2: mains/pieds/-
@@ -502,7 +516,7 @@ void CMotionHuman::CreatePhysics(ObjectType type)
160,135,-20,10,0,5, 0,0,0, // s1: bras/cuisses/-
10,-60,40, 0,0,-10, 0,0,0, // s1: avant-bras/jambes/-
0,-5,-25, -10,5,5, 0,0,0, // s1: mains/pieds/-
- // porte à terre :
+ // porte � terre :
25,40,-40, 10,0,60, 0,0,0, // s2: bras/cuisses/-
0,-45,0, 0,0,-120, 0,0,0, // s2: avant-bras/jambes/-
0,15,5, -10,0,70, 0,0,0, // s2: mains/pieds/-
@@ -514,11 +528,11 @@ void CMotionHuman::CreatePhysics(ObjectType type)
-30,15,-5, 10,0,15, 0,0,0, // s4: bras/cuisses/-
0,-15,15, 0,0,-30, 0,0,0, // s4: avant-bras/jambes/-
35,0,-15, -10,0,25, 0,0,0, // s4: mains/pieds/-
- // se relève :
+ // se rel�ve :
15,50,-50, 10,0,5, 0,0,0, // s5: bras/cuisses/-
45,-70,10, 0,0,-10, 0,0,0, // s5: avant-bras/jambes/-
-10,25,0, -10,5,5, 0,0,0, // s5: mains/pieds/-
- // gagné :
+ // gagn� :
90,90,-30, 20,0,5, 0,0,0, // s6: bras/cuisses/-
0,-90,0, -10,0,-10, 0,0,0, // s6: avant-bras/jambes/-
0,25,0, -10,5,5, 0,0,0, // s6: mains/pieds/-
@@ -546,11 +560,11 @@ void CMotionHuman::CreatePhysics(ObjectType type)
110,100,-25,25,0,10, 0,0,0, // s12: bras/cuisses/-
0,-40,20, 0,0,-25, 0,0,0, // s12: avant-bras/jambes/-
0,0,0, -10,5,5, 0,0,0, // s12: mains/pieds/-
- // mort noyé :
+ // mort noy� :
110,100,-25,25,0,10, 0,0,0, // s13: bras/cuisses/-
0,-40,20, 0,0,-25, 0,0,0, // s13: avant-bras/jambes/-
0,0,0, -10,5,5, 0,0,0, // s13: mains/pieds/-
- // met/enlève drapeau :
+ // met/enl�ve drapeau :
85,45,-50, 10,0,60, 0,0,0, // s14: bras/cuisses/-
-60,15,65, 0,0,-105, 0,0,0, // s14: avant-bras/jambes/-
0,10,0, -10,0,60, 0,0,0, // s14: mains/pieds/-
@@ -649,7 +663,7 @@ void CMotionHuman::CreatePhysics(ObjectType type)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionHuman::EventProcess(const Event &event)
{
@@ -701,7 +715,7 @@ BOOL CMotionHuman::EventProcess(const Event &event)
}
// Calcule une valeur (radians) proportionnelle comprise
-// entre a et b (degrés).
+// entre a et b (degr�s).
inline float Propf(float a, float b, float p)
{
@@ -713,7 +727,7 @@ inline float Propf(float a, float b, float p)
return aa+p*(bb-aa);
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionHuman::EventFrame(const Event &event)
{
@@ -759,7 +773,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
}
shield = m_object->RetShield();
- shield += event.rTime*(1.0f/120.0f); // régénération en 120 secondes
+ shield += event.rTime*(1.0f/120.0f); // r�g�n�ration en 120 secondes
if ( shield > 1.0f ) shield = 1.0f;
m_object->SetShield(shield);
@@ -852,7 +866,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
m_armTimeSwim += Min(Max(s,a,3.0f),15.0f)*event.rTime*0.05f;
}
- bStop = ( s == 0.0f ); // à l'arrêt ?
+ bStop = ( s == 0.0f ); // � l'arr�t ?
prog = 0.0f;
if ( m_physics->RetLand() ) // au sol ?
@@ -969,7 +983,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
time = 100.0f;
m_armTimeAction = 0.0f;
}
- else if ( m_actionType != -1 ) // action spéciale en cours ?
+ else if ( m_actionType != -1 ) // action sp�ciale en cours ?
{
st = 3*3*3*3*MH_SPEC + 3*3*3*m_actionType + (i%2)*3;
nd = st;
@@ -1074,7 +1088,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
#if 1
if ( i%2 == 1 && // jambe ?
- m_actionType == -1 ) // pas action spéciale ?
+ m_actionType == -1 ) // pas action sp�ciale ?
{
if ( i == 1 ) // jambe droite ?
{
@@ -1139,7 +1153,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
}
#endif
- if ( m_actionType == MHS_DEADw ) // mort noyé ?
+ if ( m_actionType == MHS_DEADw ) // mort noy� ?
{
if ( m_progress < 0.5f )
{
@@ -1215,7 +1229,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
dir.x = (Rand()-0.5f)/8.0f;
dir.z = (Rand()-0.5f)/8.0f;
- dir.y = -0.5f; // légèrement plus bas
+ dir.y = -0.5f; // l�g�rement plus bas
actual = m_object->RetLinVibration();
dir.x = Smooth(actual.x, dir.x, time);
//? dir.y = Smooth(actual.y, dir.y, time);
@@ -1225,7 +1239,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
dir.x = 0.0f;
dir.y = (Rand()-0.5f)/3.0f;
- dir.z = -0.1f; // légèrement penché en avant
+ dir.z = -0.1f; // l�g�rement pench� en avant
actual = m_object->RetInclinaison();
dir.x = Smooth(actual.x, dir.x, time);
dir.y = Smooth(actual.y, dir.y, time);
@@ -1239,7 +1253,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
dir.x = 0.0f;
dir.z = 0.0f;
- dir.y = -1.5f; // légèrement plus bas
+ dir.y = -1.5f; // l�g�rement plus bas
actual = m_object->RetLinVibration();
dir.x = Smooth(actual.x, dir.x, time);
//? dir.y = Smooth(actual.y, dir.y, time);
@@ -1260,7 +1274,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
{
time = event.rTime*m_actionTime*2.0f;
- dir.x = 0.4f; // avance légèrement
+ dir.x = 0.4f; // avance l�g�rement
dir.z = 0.0f;
dir.y = 0.0f;
actual = m_object->RetLinVibration();
@@ -1285,7 +1299,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
dir.x = 0.0f;
dir.z = 0.0f;
- dir.y = -2.0f; // légèrement plus bas
+ dir.y = -2.0f; // l�g�rement plus bas
actual = m_object->RetLinVibration();
dir.x = Smooth(actual.x, dir.x, time);
//? dir.y = Smooth(actual.y, dir.y, time);
@@ -1450,13 +1464,13 @@ BOOL CMotionHuman::EventFrame(const Event &event)
dir.z = Smooth(actual.z, dir.z, time);
m_object->SetInclinaison(dir);
}
- else if ( m_actionType == MHS_DEADw ) // mort noyé ?
+ else if ( m_actionType == MHS_DEADw ) // mort noy� ?
{
pos = m_object->RetPosition(0);
level = m_water->RetLevel()-0.5f;
if ( pos.y < level )
{
- pos.y += 4.0f*event.rTime; // remonte à la surface
+ pos.y += 4.0f*event.rTime; // remonte � la surface
if ( pos.y > level ) pos.y = level;
m_object->SetPosition(0, pos);
}
@@ -1493,7 +1507,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
else if ( m_actionType == MHS_LOST ) // perdu ?
{
time = m_time;
- if ( time < 10.0f ) time *= time/10.0f; // démarre lentement
+ if ( time < 10.0f ) time *= time/10.0f; // d�marre lentement
dir.x = time*2.0f;
dir.y = sinf(m_time*0.8f)*0.8f;
@@ -1612,7 +1626,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
}
}
- // Gestion de la tête.
+ // Gestion de la t�te.
if ( m_actionType == MHS_TAKE || // prend ?
m_actionType == MHS_FLAG ) // prend ?
{
@@ -1627,7 +1641,7 @@ BOOL CMotionHuman::EventFrame(const Event &event)
m_object->SetAngleX(1, sinf(m_armTimeAbs*1.1f)*0.1f);
m_object->SetAngleY(1, Smooth(m_object->RetAngleY(1), sinf(m_armTimeAbs*1.3f)*0.2f+rot*0.3f, event.rTime*5.0f));
}
- else if ( m_actionType == MHS_WIN ) // gagné ?
+ else if ( m_actionType == MHS_WIN ) // gagn� ?
{
float factor = 0.6f+(sinf(m_armTimeAbs*0.5f)*0.40f);
m_object->SetAngleZ(1, sinf(m_armTimeAbs*5.0f)*0.20f*factor);
@@ -1670,12 +1684,12 @@ BOOL CMotionHuman::EventFrame(const Event &event)
if ( m_object->RetFret() == 0 )
{
if ( speed > 0.0f ) synchro = 0.21f; // synchro en avant
- else synchro = 0.29f; // synchro en arrière
+ else synchro = 0.29f; // synchro en arri�re
}
else
{
if ( speed > 0.0f ) synchro = 0.15f; // synchro en avant
- else synchro = 0.35f; // synchro en arrière
+ else synchro = 0.35f; // synchro en arri�re
}
time = rTime[1]+synchro;
diff --git a/src/motionhuman.h b/src/motionhuman.h
index d312c97..a7413f7 100644
--- a/src/motionhuman.h
+++ b/src/motionhuman.h
@@ -1,4 +1,18 @@
-// motionhuman.h
+// * 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 .
#ifndef _MOTIONHUMAN_H_
#define _MOTIONHUMAN_H_
diff --git a/src/motionmother.cpp b/src/motionmother.cpp
index b342eb8..7ece3f5 100644
--- a/src/motionmother.cpp
+++ b/src/motionmother.cpp
@@ -1,4 +1,18 @@
-// motionmother.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
@@ -28,7 +42,7 @@
#define ADJUST_ANGLE FALSE // TRUE -> ajuste les angles des membres
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -65,7 +79,7 @@ void CMotionMother::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -79,7 +93,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -90,12 +104,12 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, 0.0f, 0.0f), 20.0f, SOUND_BOUM, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(-2.0f, 10.0f, 0.0f), 25.0f);
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -104,7 +118,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(16.0f, 3.0f, 0.0f));
- // Crée la jambe 1 arrière-droite.
+ // Cr�e la jambe 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -113,7 +127,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(-5.0f, -1.0f, -12.0f));
- // Crée le pied 1 arrière-droite.
+ // Cr�e le pied 1 arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -122,7 +136,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(3, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée la jambe 2 milieu-droite.
+ // Cr�e la jambe 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -131,7 +145,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(4, D3DVECTOR(3.5f, -1.0f, -12.0f));
- // Crée le pied 2 milieu-droite.
+ // Cr�e le pied 2 milieu-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -140,7 +154,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(5, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée la jambe 3 avant-droite.
+ // Cr�e la jambe 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -149,7 +163,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(10.0f, -1.0f, -10.0f));
- // Crée le pied 3 avant-droite.
+ // Cr�e le pied 3 avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -158,7 +172,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(7, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée la jambe 1 arrière-gauche.
+ // Cr�e la jambe 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -168,7 +182,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(8, D3DVECTOR(-5.0f, -1.0f, 12.0f));
m_object->SetAngleY(8, PI);
- // Crée le pied 1 arrière-gauche.
+ // Cr�e le pied 1 arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -177,7 +191,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(9, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée la jambe 2 milieu-gauche.
+ // Cr�e la jambe 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(10, rank);
@@ -187,7 +201,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(10, D3DVECTOR(3.5f, -1.0f, 12.0f));
m_object->SetAngleY(10, PI);
- // Crée le pied 2 milieu-gauche.
+ // Cr�e le pied 2 milieu-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(11, rank);
@@ -196,7 +210,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(11, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée la jambe 3 avant-gauche.
+ // Cr�e la jambe 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(12, rank);
@@ -206,7 +220,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(12, D3DVECTOR(10.0f, -1.0f, 10.0f));
m_object->SetAngleY(12, PI);
- // Crée le pied 3 avant-gauche.
+ // Cr�e le pied 3 avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(13, rank);
@@ -215,7 +229,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(13, D3DVECTOR(0.0f, 0.0f, -8.5f));
- // Crée l'antenne droite.
+ // Cr�e l'antenne droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(14, rank);
@@ -232,7 +246,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(15, D3DVECTOR(8.0f, 0.0f, 0.0f));
- // Crée l'antenne gauche.
+ // Cr�e l'antenne gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(16, rank);
@@ -249,7 +263,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(17, D3DVECTOR(8.0f, 0.0f, 0.0f));
- // Crée la pince droite.
+ // Cr�e la pince droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(18, rank);
@@ -259,7 +273,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(18, D3DVECTOR(-4.0f, -3.5f, -8.0f));
m_object->SetZoomX(18, 1.2f);
- // Crée la pince gauche.
+ // Cr�e la pince gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(19, rank);
@@ -284,7 +298,7 @@ BOOL CMotionMother::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionMother::CreatePhysics()
{
@@ -296,15 +310,15 @@ void CMotionMother::CreatePhysics()
// x1,y1,z1, x2,y2,z2, x3,y3,z3, // en l'air :
30,30,10, 35,-15,10, 35,-35,10, // t0: jambes 1..3
-80,-45,-35, -115,-40,-35, -90,10,-55, // t0: pieds 1..3
- 0,0,0, 0,0,0, 0,0,0, // t0: inutilisé
+ 0,0,0, 0,0,0, 0,0,0, // t0: inutilis�
// au sol devant :
15,-5,10, 10,-30,10, 5,-50,10, // t1: jambes 1..3
-90,-15,-15, -110,-55,-35, -75,-75,-30, // t1: pieds 1..3
- 0,0,0, 0,0,0, 0,0,0, // t1: inutilisé
- // au sol derrière :
+ 0,0,0, 0,0,0, 0,0,0, // t1: inutilis�
+ // au sol derri�re :
0,40,10, 5,5,10, 0,-15,10, // t2: jambes 1..3
-45,0,-55, -65,10,-50, -125,-85,-45, // t2: pieds 1..3
- 0,0,0, 0,0,0, 0,0,0, // t2: inutilisé
+ 0,0,0, 0,0,0, 0,0,0, // t2: inutilis�
};
m_physics->SetType(TYPE_ROLLING);
@@ -340,7 +354,7 @@ void CMotionMother::CreatePhysics()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionMother::EventProcess(const Event &event)
{
@@ -384,7 +398,7 @@ BOOL CMotionMother::EventProcess(const Event &event)
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionMother::EventFrame(const Event &event)
{
@@ -405,13 +419,13 @@ BOOL CMotionMother::EventFrame(const Event &event)
m_armTimeMarch += (s)*event.rTime*0.05f;
m_armMember += (s+a)*event.rTime*0.05f;
- bStop = ( a == 0.0f && s == 0.0f ); // a l'arrêt ?
+ bStop = ( a == 0.0f && s == 0.0f ); // a l'arr�t ?
if ( bStop )
{
prog = Mod(m_armTimeAbs, 2.0f)/10.0f;
a = Mod(m_armMember, 1.0f);
- a = (prog-a)*event.rTime*1.0f; // vient gentiment à position stop
+ a = (prog-a)*event.rTime*1.0f; // vient gentiment � position stop
m_armMember += a;
}
@@ -505,9 +519,9 @@ BOOL CMotionMother::EventFrame(const Event &event)
m_object->SetLinVibration(dir);
}
- m_object->SetAngleZ(1, sinf(m_armTimeAbs*0.5f)*0.20f); // tête
- m_object->SetAngleX(1, sinf(m_armTimeAbs*0.6f)*0.10f); // tête
- m_object->SetAngleY(1, sinf(m_armTimeAbs*0.7f)*0.20f); // tête
+ m_object->SetAngleZ(1, sinf(m_armTimeAbs*0.5f)*0.20f); // t�te
+ m_object->SetAngleX(1, sinf(m_armTimeAbs*0.6f)*0.10f); // t�te
+ m_object->SetAngleY(1, sinf(m_armTimeAbs*0.7f)*0.20f); // t�te
m_object->SetAngleZ(14, 0.50f);
m_object->SetAngleZ(16, 0.50f);
diff --git a/src/motionmother.h b/src/motionmother.h
index 1555a22..785dfa5 100644
--- a/src/motionmother.h
+++ b/src/motionmother.h
@@ -1,4 +1,18 @@
-// motionmother.h
+// * 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 .
#ifndef _MOTIONMOTHER_H_
#define _MOTIONMOTHER_H_
diff --git a/src/motionspider.cpp b/src/motionspider.cpp
index dee9391..872c12e 100644
--- a/src/motionspider.cpp
+++ b/src/motionspider.cpp
@@ -1,4 +1,18 @@
-// motionspider.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
@@ -28,7 +42,7 @@
#define ADJUST_ANGLE FALSE // TRUE -> ajuste les angles des membres
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -65,7 +79,7 @@ void CMotionSpider::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -77,12 +91,12 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
float table[] =
{
// x y z
- 0.6f, 0.0f, 0.0f, // patte arrière
+ 0.6f, 0.0f, 0.0f, // patte arri�re
0.0f, 0.0f, -2.0f,
0.0f, 0.0f, -2.0f,
0.0f, 0.0f, -2.0f,
- 0.8f, 0.0f, -0.2f, // patte arrière-milieu
+ 0.8f, 0.0f, -0.2f, // patte arri�re-milieu
0.0f, 0.0f, -2.0f,
0.0f, 0.0f, -2.0f,
0.0f, 0.0f, -2.0f,
@@ -104,7 +118,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -113,12 +127,12 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, -2.0f, 0.0f), 4.0f, SOUND_BOUM, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(-0.5f, 1.0f, 0.0f), 4.0f);
- // Crée l'abdomen.
+ // Cr�e l'abdomen.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -127,7 +141,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(1.0f, 0.0f, 0.0f));
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -136,14 +150,14 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(1.0f, 0.0f, 0.0f));
- // Crée les pattes.
+ // Cr�e les pattes.
for ( i=0 ; i<4 ; i++ )
{
for ( j=0 ; j<4 ; j++ )
{
sprintf(name, "objects\\spider%d.mod", j+3); // 3..6
- // Crée la patte droite.
+ // Cr�e la patte droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3+i*4+j, rank);
@@ -157,7 +171,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
pos.z = table[i*12+j*3+2];
m_object->SetPosition(3+i*4+j, pos);
- // Crée la patte gauche.
+ // Cr�e la patte gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(19+i*4+j, rank);
@@ -174,7 +188,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
}
}
- // Crée la mandibule droite.
+ // Cr�e la mandibule droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(35, rank);
@@ -183,7 +197,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(35, D3DVECTOR(0.0f, 0.0f, -0.3f));
- // Crée la mandibule gauche.
+ // Cr�e la mandibule gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(36, rank);
@@ -207,7 +221,7 @@ BOOL CMotionSpider::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionSpider::CreatePhysics()
{
@@ -226,7 +240,7 @@ void CMotionSpider::CreatePhysics()
-10,40,0, -45,0,0, -45,0,0, -45,-40,0, // t1: jambes 1..4
-90,0,0, -20,0,0, -20,0,0, -20,0,0, // t1: pieds 1..4
-5,0,0, -5,0,0, -5,0,0, -5,0,0, // t1: doigt 1..4
- // au sol derrière :
+ // au sol derri�re :
35,35,0, 40,10,0, 40,-15,0, 40,-40,0, // t2: cuisses 1..4
-35,40,0, -35,0,0, -35,0,0, -25,-40,0, // t2: jambes 1..4
-50,-25,-30,-65,0,0, -65,0,0, -90,0,30, // t2: pieds 1..4
@@ -245,7 +259,7 @@ void CMotionSpider::CreatePhysics()
-30,40,0, -40,0,0, -40,0,0, -40,-40,0, // t1: jambes 1..4
-55,-25,-30,-25,0,0, -25,0,0, -25,0,0, // t1: pieds 1..4
-5,0,0, -5,0,0, -5,0,0, -5,0,0, // t1: doigt 1..4
- // au sol derrière :
+ // au sol derri�re :
35,35,0, 30,0,0, 30,-25,0, 30,-50,0, // t2: cuisses 1..4
-30,40,0, -40,0,0, -40,0,0, -40,-40,0, // t2: jambes 1..4
-50,-25,-30,-20,0,0, -20,0,0, -20,0,30, // t2: pieds 1..4
@@ -254,7 +268,7 @@ void CMotionSpider::CreatePhysics()
int member_spec[] =
{
- // x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4, // brûle :
+ // x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4, // br�le :
30,25,0, 30,0,0, 30,-25,0, 30,-50,0, // s0: cuisses 1..4
-45,0,0, -45,0,0, -45,0,0, -45,0,0, // s0: jambes 1..4
-20,0,0, -20,0,0, -20,0,0, -20,0,0, // s0: pieds 1..4
@@ -327,7 +341,7 @@ void CMotionSpider::CreatePhysics()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionSpider::EventProcess(const Event &event)
{
@@ -373,7 +387,7 @@ BOOL CMotionSpider::EventProcess(const Event &event)
}
// Calcule une valeur (radians) proportionnelle comprise
-// entre a et b (degrés).
+// entre a et b (degr�s).
inline float Propf(float a, float b, float p)
{
@@ -385,7 +399,7 @@ inline float Propf(float a, float b, float p)
return aa+p*(bb-aa);
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionSpider::EventFrame(const Event &event)
{
@@ -409,7 +423,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
m_armTimeMarch += (s)*event.rTime*0.15f;
m_armMember += (s+a)*event.rTime*0.15f;
- bStop = ( a == 0.0f && s == 0.0f ); // a l'arrêt ?
+ bStop = ( a == 0.0f && s == 0.0f ); // a l'arr�t ?
action = MS_MARCH; // marche
if ( s == 0.0f && a == 0.0f )
@@ -421,7 +435,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
{
prog = Mod(m_armTimeAbs, 2.0f)/10.0f;
a = Mod(m_armMember, 1.0f);
- a = (prog-a)*event.rTime*2.0f; // vient gentiment à position stop
+ a = (prog-a)*event.rTime*2.0f; // vient gentiment � position stop
m_armMember += a;
}
@@ -429,7 +443,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
{
m_actionType = MSS_RUIN;
}
- if ( m_object->RetBurn() ) // brûle ?
+ if ( m_object->RetBurn() ) // br�le ?
{
if ( m_object->RetFixed() )
{
@@ -443,7 +457,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
for ( i=0 ; i<8 ; i++ ) // les 8 pattes
{
- if ( m_actionType != -1 ) // action spéciale en cours ?
+ if ( m_actionType != -1 ) // action sp�ciale en cours ?
{
st = 3*4*4*3*MS_SPEC + 3*4*4*m_actionType + (i%4)*3;
nd = st;
@@ -565,7 +579,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
}
#endif
- if ( m_actionType == MSS_BURN ) // brûle ?
+ if ( m_actionType == MSS_BURN ) // br�le ?
{
dir = D3DVECTOR(PI, 0.0f, 0.0f);
SetCirVibration(dir);
@@ -574,7 +588,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
SetInclinaison(dir);
time = event.rTime*1.0f;
- m_object->SetAngleZ(1, Smooth(m_object->RetAngleZ(1), 0.0f, time)); // tête
+ m_object->SetAngleZ(1, Smooth(m_object->RetAngleZ(1), 0.0f, time)); // t�te
}
else if ( m_actionType == MSS_RUIN ) // ruine ?
{
@@ -676,9 +690,9 @@ BOOL CMotionSpider::EventFrame(const Event &event)
SetInclinaison(dir);
m_object->SetAngleY(1, sinf(m_armTimeAbs*5.0f)*0.05f); // queue
- m_object->SetAngleY(2, cosf(m_armTimeAbs*5.0f)*0.20f); // tête
+ m_object->SetAngleY(2, cosf(m_armTimeAbs*5.0f)*0.20f); // t�te
m_object->SetAngleZ(1, 0.4f); // queue
- m_object->SetAngleZ(2, 0.0f); // tête
+ m_object->SetAngleZ(2, 0.0f); // t�te
if ( m_progress >= 1.0f )
{
@@ -760,7 +774,7 @@ BOOL CMotionSpider::EventFrame(const Event &event)
m_object->SetAngleY(1, sinf(m_armTimeAbs*2.4f)*0.10f);
m_object->SetZoom(1, 1.0f+sinf(m_armTimeAbs*3.3f)*0.05f);
- m_object->SetAngleZ(2, sinf(m_armTimeAbs*1.4f)*0.20f); // tête
+ m_object->SetAngleZ(2, sinf(m_armTimeAbs*1.4f)*0.20f); // t�te
m_object->SetAngleX(2, sinf(m_armTimeAbs*1.9f)*0.10f);
m_object->SetAngleY(2, sinf(m_armTimeAbs*2.1f)*0.10f);
diff --git a/src/motionspider.h b/src/motionspider.h
index b010a2c..0b3071d 100644
--- a/src/motionspider.h
+++ b/src/motionspider.h
@@ -1,4 +1,18 @@
-// motionspider.h
+// * 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 .
#ifndef _MOTIONSPIDER_H_
#define _MOTIONSPIDER_H_
diff --git a/src/motiontoto.cpp b/src/motiontoto.cpp
index 1e4a8ae..37e5d53 100644
--- a/src/motiontoto.cpp
+++ b/src/motiontoto.cpp
@@ -1,4 +1,18 @@
-// motiontoto.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
@@ -28,7 +42,7 @@
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
@@ -74,7 +88,7 @@ void CMotionToto::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -88,7 +102,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -97,7 +111,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Crée la bouche.
+ // Cr�e la bouche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -106,7 +120,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(1.00f, 0.17f, 0.00f));
- // Crée l'oeil gauche.
+ // Cr�e l'oeil gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -117,7 +131,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(0.85f, 1.04f, 0.25f));
m_object->SetAngleY(2, -20.0f*PI/180.0f);
- // Crée l'oeil droite.
+ // Cr�e l'oeil droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -127,7 +141,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(3, D3DVECTOR(0.85f, 1.04f, -0.25f));
m_object->SetAngleY(3, 20.0f*PI/180.0f);
- // Crée l'antenne gauche.
+ // Cr�e l'antenne gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -155,7 +169,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(6, D3DVECTOR(0.0f, 0.70f, 0.0f));
m_object->SetAngleX(6, 30.0f*PI/180.0f);
- // Crée l'antenne droite.
+ // Cr�e l'antenne droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -196,7 +210,7 @@ BOOL CMotionToto::Create(D3DVECTOR pos, float angle, ObjectType type,
}
-// Début de l'affichage des informations, avec toto dans la marge gauche.
+// D�but de l'affichage des informations, avec toto dans la marge gauche.
void CMotionToto::StartDisplayInfo()
{
@@ -228,7 +242,7 @@ void CMotionToto::SetMousePos(FPOINT pos)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionToto::EventProcess(const Event &event)
{
@@ -242,7 +256,7 @@ BOOL CMotionToto::EventProcess(const Event &event)
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionToto::EventFrame(const Event &event)
{
@@ -274,7 +288,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
}
if ( !m_engine->RetTotoMode() )
{
- if ( !m_main->RetEditLock() ) // édition en cours ?
+ if ( !m_main->RetEditLock() ) // �dition en cours ?
{
bHidden = TRUE;
}
@@ -312,7 +326,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
if ( m_progress >= 1.0f )
{
- m_actionType = -1; // action terminée
+ m_actionType = -1; // action termin�e
m_actionTime = 0.0f;
m_progress = 0.0f;
@@ -342,13 +356,13 @@ BOOL CMotionToto::EventFrame(const Event &event)
else
{
#if 0
- distance = 30.0f-progress*24.5f; // éloignement
- shift = 18.0f-progress*15.4f; // décalage à gauche
- verti = 10.0f-progress* 9.6f; // décalage en haut
+ distance = 30.0f-progress*24.5f; // �loignement
+ shift = 18.0f-progress*15.4f; // d�calage � gauche
+ verti = 10.0f-progress* 9.6f; // d�calage en haut
#else
- distance = 30.0f-progress*18.0f; // éloignement
- shift = 18.0f-progress*11.0f; // décalage à gauche
- verti = 10.0f-progress* 8.0f; // décalage en haut
+ distance = 30.0f-progress*18.0f; // �loignement
+ shift = 18.0f-progress*11.0f; // d�calage � gauche
+ verti = 10.0f-progress* 8.0f; // d�calage en haut
#endif
if ( m_actionType == -1 &&
@@ -379,7 +393,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
m_type == OBJECT_MOBILEtt ||
m_type == OBJECT_MOBILEft ||
m_type == OBJECT_MOBILEit ||
- m_type == OBJECT_MOBILEdr ) ) // véhicule ?
+ m_type == OBJECT_MOBILEdr ) ) // v�hicule ?
{
m_clownTime += event.rTime;
if ( m_clownTime >= m_clownDelay )
@@ -481,13 +495,13 @@ BOOL CMotionToto::EventFrame(const Event &event)
}
nAngle = aAngle + (nAngle-aAngle)*event.rTime*4.0f;
- // Penche de côté si tourne.
+ // Penche de c�t� si tourne.
cirSpeed = (aAngle-nAngle)/event.rTime;
angle = cirSpeed*0.3f*(1.0f-progress);
if ( angle > 0.7f ) angle = 0.7f;
if ( angle < -0.7f ) angle = -0.7f;
vibCir.x += angle*1.5f;
- aAntenna.x += Abs(angle)*0.8f; // écarte
+ aAntenna.x += Abs(angle)*0.8f; // �carte
// Penche en avant si avance vite.
angle = linSpeed*0.10f*(1.0f-progress);
@@ -495,7 +509,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
vibCir.z -= angle/2.0f; // penche en avant
aAntenna.z -= angle; // penche en avant
- // Calcule le mouvement résiduel.
+ // Calcule le mouvement r�siduel.
#if 1
vibLin.y += (sinf(m_time*2.00f)*0.5f+
sinf(m_time*2.11f)*0.2f)*(1.0f-progress);
@@ -520,14 +534,14 @@ BOOL CMotionToto::EventFrame(const Event &event)
vibCir.z -= progress*0.5f; // penche en avant
aAntenna.x -= progress*0.4f; // resserre
- aAntenna.z += progress*1.0f; // penche en arrière
+ aAntenna.z += progress*1.0f; // penche en arri�re
}
if ( m_actionType == MT_WARNING ) // avertissement ?
{
vibCir.x += progress*sinf(m_progress*PI*17.0f)*0.5f;
- aAntenna.x += progress*sinf(m_progress*PI*17.0f)*0.5f; // écarte
+ aAntenna.x += progress*sinf(m_progress*PI*17.0f)*0.5f; // �carte
aAntenna.z += progress*cosf(m_progress*PI*17.0f)*0.5f; // tourne
}
@@ -593,7 +607,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
SetLinVibration(vibLin);
SetCirVibration(vibCir);
- // Calcule le mouvement résiduel des antennes.
+ // Calcule le mouvement r�siduel des antennes.
pos = aAntenna*0.40f;
pos.x += sinf(m_time*PI*2.07f)*(PI/50.0f)+
sinf(m_time*PI*2.59f)*(PI/70.0f)+
@@ -718,9 +732,9 @@ BOOL CMotionToto::EventFrame(const Event &event)
m_object->SetAngleX(3, 0.0f);
}
- mat = m_object->RetWorldMatrix(0); // doit être fait chaque fois !
+ mat = m_object->RetWorldMatrix(0); // doit �tre fait chaque fois !
- // Génère les particules.
+ // G�n�re les particules.
if ( m_time-m_lastMotorParticule >= m_engine->ParticuleAdapt(0.05f) )
{
m_lastMotorParticule = m_time;
@@ -814,8 +828,8 @@ BOOL CMotionToto::EventFrame(const Event &event)
r = rand()%4;
if ( r == 0 ) pos.x = 0.21f; // sur le bord gauche
else if ( r == 1 ) pos.x = 0.98f; // sur le bord droite
- else if ( r == 2 ) pos.y = 0.02f; // sur le bord inférieur
- else pos.y = 0.92f; // sur le bord supérieur
+ else if ( r == 2 ) pos.y = 0.02f; // sur le bord inf�rieur
+ else pos.y = 0.92f; // sur le bord sup�rieur
dim.x = (Rand()*0.02f+0.02f);
dim.y = dim.x/0.75f;
m_particule->CreateParticule(pos, speed, dim, PARTIERROR, 0.5f+Rand()*0.5f, 0.0f, 1.0f, SH_INTERFACE);
@@ -836,7 +850,7 @@ BOOL CMotionToto::EventFrame(const Event &event)
}
-// Démarre une action.
+// D�marre une action.
Error CMotionToto::SetAction(int action, float time)
{
@@ -860,7 +874,7 @@ Error CMotionToto::SetAction(int action, float time)
return ERR_OK;
}
-// Spécifie le type de l'objet rattaché à toto.
+// Sp�cifie le type de l'objet rattach� � toto.
void CMotionToto::SetLinkType(ObjectType type)
{
diff --git a/src/motiontoto.h b/src/motiontoto.h
index e6821e8..895bc50 100644
--- a/src/motiontoto.h
+++ b/src/motiontoto.h
@@ -1,4 +1,18 @@
-// motiontoto.h
+// * 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 .
#ifndef _MOTIONTOTO_H_
#define _MOTIONTOTO_H_
diff --git a/src/motionvehicle.cpp b/src/motionvehicle.cpp
index 4546533..384701f 100644
--- a/src/motionvehicle.cpp
+++ b/src/motionvehicle.cpp
@@ -1,4 +1,18 @@
-// motionvehicle.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
@@ -86,7 +100,7 @@ void CMotionVehicle::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -103,7 +117,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
@@ -187,7 +201,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
if ( type == OBJECT_MOBILErt ||
type == OBJECT_MOBILErc ||
@@ -222,7 +236,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEwa ||
type == OBJECT_MOBILEia )
{
- // Crée le bras.
+ // Cr�e le bras.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -232,7 +246,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(0.0f, 5.3f, 0.0f));
m_object->SetAngleZ(1, ARM_NEUTRAL_ANGLE1);
- // Crée l'avant-bras.
+ // Cr�e l'avant-bras.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -242,7 +256,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(5.0f, 0.0f, 0.0f));
m_object->SetAngleZ(2, ARM_NEUTRAL_ANGLE2);
- // Crée la main.
+ // Cr�e la main.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -253,7 +267,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetAngleZ(3, ARM_NEUTRAL_ANGLE3);
m_object->SetAngleX(3, PI/2.0f);
- // Crée la pince proche.
+ // Cr�e la pince proche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -263,7 +277,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(4, D3DVECTOR(1.5f, 0.0f, 0.0f));
m_object->SetAngleZ(4, -PI*0.10f);
- // Crée la pince éloignée.
+ // Cr�e la pince �loign�e.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -279,7 +293,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEws ||
type == OBJECT_MOBILEis )
{
- // Crée le bras.
+ // Cr�e le bras.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -289,7 +303,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(0.0f, 5.3f, 0.0f));
m_object->SetAngleZ(1, 110.0f*PI/180.0f);
- // Crée l'avant-bras.
+ // Cr�e l'avant-bras.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -299,7 +313,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(5.0f, 0.0f, 0.0f));
m_object->SetAngleZ(2, -110.0f*PI/180.0f);
- // Crée le capteur.
+ // Cr�e le capteur.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -315,7 +329,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEwc ||
type == OBJECT_MOBILEic )
{
- // Crée le canon.
+ // Cr�e le canon.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -332,7 +346,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEwi ||
type == OBJECT_MOBILEii )
{
- // Crée le canon insecte.
+ // Cr�e le canon insecte.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -358,7 +372,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEwi ||
type == OBJECT_MOBILEwt )
{
- // Crée la roue arrière-droite.
+ // Cr�e la roue arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -367,7 +381,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(-3.0f, 1.0f, -3.0f));
- // Crée la roue arrière-gauche.
+ // Cr�e la roue arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -377,7 +391,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(7, D3DVECTOR(-3.0f, 1.0f, 3.0f));
m_object->SetAngleY(7, PI);
- // Crée la roue avant-droite.
+ // Cr�e la roue avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -386,7 +400,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(8, D3DVECTOR(2.0f, 1.0f, -3.0f));
- // Crée la roue avant-gauche.
+ // Cr�e la roue avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -399,7 +413,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEtg )
{
- // Crée la roue arrière-droite.
+ // Cr�e la roue arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -408,7 +422,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(-2.0f, 1.0f, -3.0f));
- // Crée la roue arrière-gauche.
+ // Cr�e la roue arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -418,7 +432,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(7, D3DVECTOR(-2.0f, 1.0f, 3.0f));
m_object->SetAngleY(7, PI);
- // Crée la roue avant-droite.
+ // Cr�e la roue avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -427,7 +441,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(8, D3DVECTOR(3.0f, 1.0f, -3.0f));
- // Crée la roue avant-gauche.
+ // Cr�e la roue avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(9, rank);
@@ -443,7 +457,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEti ||
type == OBJECT_MOBILEts ) // chenilles ?
{
- // Crée la chenille droite.
+ // Cr�e la chenille droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -452,7 +466,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.0f, 2.0f, -3.0f));
- // Crée la chenille gauche.
+ // Cr�e la chenille gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -467,7 +481,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILErr ||
type == OBJECT_MOBILErs ) // grosses chenilles ?
{
- // Crée la chenille droite.
+ // Cr�e la chenille droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -476,7 +490,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.0f, 2.0f, -3.0f));
- // Crée la chenille gauche.
+ // Cr�e la chenille gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -488,7 +502,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEsa ) // chenilles sous-marin ?
{
- // Crée la chenille droite.
+ // Cr�e la chenille droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -497,7 +511,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.0f, 1.0f, -3.0f));
- // Crée la chenille gauche.
+ // Cr�e la chenille gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -509,7 +523,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEdr ) // chenilles ?
{
- // Crée la chenille droite.
+ // Cr�e la chenille droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -518,7 +532,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(0.0f, 1.0f, -3.0f));
- // Crée la chenille gauche.
+ // Cr�e la chenille gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -534,7 +548,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
type == OBJECT_MOBILEfi ||
type == OBJECT_MOBILEft ) // volant ?
{
- // Crée le pied avant.
+ // Cr�e le pied avant.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -543,7 +557,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(6, D3DVECTOR(1.7f, 3.0f, 0.0f));
- // Crée le pied arrière droite.
+ // Cr�e le pied arri�re droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(7, rank);
@@ -553,7 +567,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(7, D3DVECTOR(-1.8f, 3.0f, -1.5f));
m_object->SetAngleY(7, 120.0f*PI/180.0f);
- // Crée le pied arrière gauche.
+ // Cr�e le pied arri�re gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(8, rank);
@@ -572,7 +586,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
float table[] =
{
// x y z
- -1.5f, 1.2f, -0.7f, // patte arrière
+ -1.5f, 1.2f, -0.7f, // patte arri�re
0.0f, 0.0f, -1.0f,
0.0f, 0.0f, -2.0f,
@@ -591,7 +605,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
{
sprintf(name, "objects\\ant%d.mod", j+4); // 4..6
- // Crée la patte droite.
+ // Cr�e la patte droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6+i*3+j, rank);
@@ -605,7 +619,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pos.z = table[i*9+j*3+2];
m_object->SetPosition(6+i*3+j, pos);
- // Crée la patte gauche.
+ // Cr�e la patte gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(15+i*3+j, rank);
@@ -625,7 +639,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILErt )
{
- // Crée le support.
+ // Cr�e le support.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -635,7 +649,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(0.0f, 0.0f, 0.0f));
m_object->SetAngleZ(1, 0.0f);
- // Crée le pilon.
+ // Cr�e le pilon.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -648,7 +662,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILErc )
{
- // Crée le support.
+ // Cr�e le support.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -658,7 +672,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(3.0f, 4.6f, 0.0f));
m_object->SetAngleZ(1, PI/8.0f);
- // Crée le canon.
+ // Cr�e le canon.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -671,7 +685,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILErr )
{
- // Crée le support.
+ // Cr�e le support.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -680,7 +694,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(2.0f, 5.0f, 0.0f));
- // Crée le bras droite.
+ // Cr�e le bras droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -690,7 +704,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(0.1f, 0.0f, -5.0f));
m_object->SetAngleZ(2, 126.0f*PI/180.0f);
- // Crée l'avant-bras droite.
+ // Cr�e l'avant-bras droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -700,7 +714,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(3, D3DVECTOR(5.0f, 0.0f, -0.5f));
m_object->SetAngleZ(3, -144.0f*PI/180.0f);
- // Crée le bras gauche.
+ // Cr�e le bras gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(4, rank);
@@ -711,7 +725,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(4, D3DVECTOR(0.1f, 0.0f, 5.0f));
m_object->SetAngleZ(4, 126.0f*PI/180.0f);
- // Crée l'avant-bras gauche.
+ // Cr�e l'avant-bras gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(5, rank);
@@ -725,7 +739,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILErs )
{
- // Crée le support.
+ // Cr�e le support.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -735,7 +749,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(0.0f, 0.0f, 0.0f));
m_object->SetAngleZ(1, 0.0f);
- // Crée le piston intermédiaire.
+ // Cr�e le piston interm�diaire.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -745,7 +759,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(2, D3DVECTOR(7.0f, 4.5f, 0.0f));
m_object->SetAngleZ(2, 0.0f);
- // Crée le piston avec la sphère.
+ // Cr�e le piston avec la sph�re.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -758,7 +772,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEsa )
{
- // Crée le support.
+ // Cr�e le support.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -767,7 +781,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(4.2f, 3.0f, 0.0f));
- // Crée la pince droite.
+ // Cr�e la pince droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
@@ -776,7 +790,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(0.5f, 0.0f, -1.5f));
- // Crée la pince gauche.
+ // Cr�e la pince gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(3, rank);
@@ -789,7 +803,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEdr )
{
- // Crée le carousel.
+ // Cr�e le carousel.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -798,7 +812,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(1, D3DVECTOR(-3.0f, 3.0f, 0.0f));
- // Crée la clé.
+ // Cr�e la cl�.
if ( m_object->RetToy() )
{
rank = m_engine->CreateObject();
@@ -812,7 +826,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetAngleY(2, 90.0f*PI/180.0f);
}
- // Crée les crayons.
+ // Cr�e les crayons.
for ( i=0 ; i<8 ; i++ )
{
rank = m_engine->CreateObject();
@@ -829,7 +843,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_MOBILEwt )
{
- // Crée la clé.
+ // Cr�e la cl�.
if ( m_object->RetToy() )
{
rank = m_engine->CreateObject();
@@ -846,7 +860,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
if ( type == OBJECT_APOLLO2 )
{
- // Crée les accessoirs.
+ // Cr�e les accessoirs.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -861,12 +875,12 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2, rank);
m_object->SetObjectParent(2, 0);
- pModFile->ReadModel("objects\\apolloj3.mod"); // caméra
+ pModFile->ReadModel("objects\\apolloj3.mod"); // cam�ra
pModFile->CreateEngineObject(rank);
m_object->SetPosition(2, D3DVECTOR(5.5f, 2.8f, -2.0f));
m_object->SetAngleY(2, 30.0f*PI/180.0f);
- // Crée les roues.
+ // Cr�e les roues.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(6, rank);
@@ -899,7 +913,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
pModFile->CreateEngineObject(rank);
m_object->SetPosition(9, D3DVECTOR(5.75f, 1.65f, 5.00f));
- // Crée les gardes boues.
+ // Cr�e les gardes boues.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(10, rank);
@@ -1032,7 +1046,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
color.a = 0.0f;
m_object->CreateEffectLight(20.0f, color);
- // Crée la pile.
+ // Cr�e la pile.
pPower = new CObject(m_iMan);
pPower->SetType(power<=1.0f?OBJECT_POWER:OBJECT_ATOMIC);
@@ -1064,7 +1078,7 @@ BOOL CMotionVehicle::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionVehicle::CreatePhysics(ObjectType type)
{
@@ -1348,7 +1362,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionVehicle::EventProcess(const Event &event)
{
@@ -1366,7 +1380,7 @@ BOOL CMotionVehicle::EventProcess(const Event &event)
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionVehicle::EventFrame(const Event &event)
{
@@ -1453,23 +1467,23 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
if ( type == OBJECT_MOBILEtg )
{
- back = -2.0f; // position roues arrières
+ back = -2.0f; // position roues arri�res
front = 3.0f; // position roues avants
- dist = 3.0f; // éloignement roues Z
+ dist = 3.0f; // �loignement roues Z
radius = 1.0f;
}
else if ( type == OBJECT_APOLLO2 )
{
- back = -5.75f; // position roues arrières
+ back = -5.75f; // position roues arri�res
front = 5.75f; // position roues avants
- dist = 5.00f; // éloignement roues Z
+ dist = 5.00f; // �loignement roues Z
radius = 1.65f;
}
else
{
- back = -3.0f; // position roues arrières
+ back = -3.0f; // position roues arri�res
front = 2.0f; // position roues avants
- dist = 3.0f; // éloignement roues Z
+ dist = 3.0f; // �loignement roues Z
radius = 1.0f;
}
@@ -1478,7 +1492,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
character = m_object->RetCharacter();
mat = m_object->RetWorldMatrix(0);
- pos.x = -character->wheelBack; // roue arrière droite
+ pos.x = -character->wheelBack; // roue arri�re droite
pos.z = -character->wheelRight;
pos.y = 0.0f;
pos = Transform(*mat, pos);
@@ -1491,7 +1505,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
m_object->SetPosition(6, pos);
if ( type == OBJECT_APOLLO2 ) m_object->SetPosition(10, pos);
- pos.x = -character->wheelBack; // roue arrière gauche
+ pos.x = -character->wheelBack; // roue arri�re gauche
pos.z = character->wheelLeft;
pos.y = 0.0f;
pos = Transform(*mat, pos);
@@ -1614,7 +1628,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
pos = Transform(*mat, pos);
a1 = atanf(m_terrain->RetFloorHeight(pos)/character->wheelFront);
- pos.x = -character->wheelBack; // roue arrière droite
+ pos.x = -character->wheelBack; // roue arri�re droite
pos.z = -character->wheelRight;
pos.y = 0.0f;
pos = Transform(*mat, pos);
@@ -1631,7 +1645,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
pos = Transform(*mat, pos);
a1 = atanf(m_terrain->RetFloorHeight(pos)/character->wheelFront);
- pos.x = -character->wheelBack; // roue arrière gauche
+ pos.x = -character->wheelBack; // roue arri�re gauche
pos.z = character->wheelLeft;
pos.y = 0.0f;
pos = Transform(*mat, pos);
@@ -1651,7 +1665,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
}
if ( type == OBJECT_MOBILEwt ||
- type == OBJECT_MOBILEdr ) // jouet à clé ?
+ type == OBJECT_MOBILEdr ) // jouet � cl� ?
{
pos = m_posKey;
if ( m_object->RetSelect() &&
@@ -1663,7 +1677,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
s = -Abs(m_physics->RetLinMotionX(MO_MOTSPEED)*0.1f);
s += -Abs(m_physics->RetCirMotionY(MO_MOTSPEED)*1.5f);
- m_object->SetAngleY(2, m_object->RetAngleY(2)+event.rTime*s); // tourne la clé
+ m_object->SetAngleY(2, m_object->RetAngleY(2)+event.rTime*s); // tourne la cl�
}
if ( type == OBJECT_MOBILEfa ||
@@ -1694,7 +1708,7 @@ BOOL CMotionVehicle::EventFrame(const Event &event)
return TRUE;
}
-// Gestion d'un événement pour un robot volant.
+// Gestion d'un �v�nement pour un robot volant.
BOOL CMotionVehicle::EventFrameFly(const Event &event)
{
@@ -1720,8 +1734,8 @@ BOOL CMotionVehicle::EventFrameFly(const Event &event)
{
mat = m_object->RetWorldMatrix(0);
paw[0] = Transform(*mat, D3DVECTOR( 4.2f, 0.0f, 0.0f)); // avant
- paw[1] = Transform(*mat, D3DVECTOR(-3.0f, 0.0f, -3.7f)); // arrière droite
- paw[2] = Transform(*mat, D3DVECTOR(-3.0f, 0.0f, 3.7f)); // arrière gauche
+ paw[1] = Transform(*mat, D3DVECTOR(-3.0f, 0.0f, -3.7f)); // arri�re droite
+ paw[2] = Transform(*mat, D3DVECTOR(-3.0f, 0.0f, 3.7f)); // arri�re gauche
for ( i=0 ; i<3 ; i++ )
{
@@ -1735,8 +1749,8 @@ BOOL CMotionVehicle::EventFrameFly(const Event &event)
else // en vol ?
{
hope[0] = 0.0f; // avant
- hope[1] = 0.0f; // arrière droite
- hope[2] = 0.0f; // arrière gauche
+ hope[1] = 0.0f; // arri�re droite
+ hope[2] = 0.0f; // arri�re gauche
}
m_bFlyFix = TRUE;
@@ -1746,7 +1760,7 @@ BOOL CMotionVehicle::EventFrameFly(const Event &event)
final = Smooth(actual, hope[i], event.rTime*5.0f);
if ( final != actual )
{
- m_bFlyFix = FALSE; // ça a bougé
+ m_bFlyFix = FALSE; // �a a boug�
m_object->SetAngleZ(6+i, final);
}
}
@@ -1754,7 +1768,7 @@ BOOL CMotionVehicle::EventFrameFly(const Event &event)
return TRUE;
}
-// Gestion d'un événement pour un insecte à pattes.
+// Gestion d'un �v�nement pour un insecte � pattes.
BOOL CMotionVehicle::EventFrameInsect(const Event &event)
{
@@ -1773,7 +1787,7 @@ BOOL CMotionVehicle::EventFrameInsect(const Event &event)
30,10,0, 30,-15,0, 30,-40,0, // t1: cuisses 1..4
-45,0,0, -45,0,0, -45,0,0, // t1: jambes 1..4
-20,0,0, -20,0,0, -20,0,0, // t1: pieds 1..4
- // au sol derrière :
+ // au sol derri�re :
35,40,0, 40,15,0, 40,-10,0, // t2: cuisses 1..4
-35,0,0, -35,0,0, -35,0,0, // t2: jambes 1..4
-50,0,0, -65,0,0, -65,0,0, // t2: pieds 1..4
@@ -1798,7 +1812,7 @@ BOOL CMotionVehicle::EventFrameInsect(const Event &event)
m_armTimeAbs += event.rTime;
m_armMember += (s+a)*event.rTime*0.15f;
- bStop = ( a == 0.0f && s == 0.0f ); // à l'arrêt ?
+ bStop = ( a == 0.0f && s == 0.0f ); // � l'arr�t ?
action = 0; // marche
if ( s == 0.0f && a == 0.0f )
@@ -1810,18 +1824,18 @@ BOOL CMotionVehicle::EventFrameInsect(const Event &event)
{
prog = Mod(m_armTimeAbs, 2.0f)/10.0f;
a = Mod(m_armMember, 1.0f);
- a = (prog-a)*event.rTime*2.0f; // vient gentiment à position stop
+ a = (prog-a)*event.rTime*2.0f; // vient gentiment � position stop
m_armMember += a;
}
- if ( m_object->RetRuin() ) // brûle ou explose ?
+ if ( m_object->RetRuin() ) // br�le ou explose ?
{
action = 3;
}
for ( i=0 ; i<6 ; i++ ) // les 6 pattes
{
- if ( action != 0 ) // action spéciale en cours ?
+ if ( action != 0 ) // action sp�ciale en cours ?
{
st = 3*3*3*action + (i%3)*3;
nd = st;
@@ -1906,7 +1920,7 @@ BOOL CMotionVehicle::EventFrameInsect(const Event &event)
return TRUE;
}
-// Gestion d'un événement pour un canon-insecte.
+// Gestion d'un �v�nement pour un canon-insecte.
BOOL CMotionVehicle::EventFrameCanoni(const Event &event)
{
@@ -1982,7 +1996,7 @@ BOOL CMotionVehicle::EventFrameCanoni(const Event &event)
}
-// Met à jour le mapping de la texture des chenilles.
+// Met � jour le mapping de la texture des chenilles.
void CMotionVehicle::UpdateTrackMapping(float left, float right, ObjectType type)
{
@@ -2040,7 +2054,7 @@ void CMotionVehicle::UpdateTrackMapping(float left, float right, ObjectType type
-// Gestion de l'état du crayon du robot dessinateur.
+// Gestion de l'�tat du crayon du robot dessinateur.
BOOL CMotionVehicle::RetTraceDown()
{
diff --git a/src/motionvehicle.h b/src/motionvehicle.h
index f7bbf0a..b92d519 100644
--- a/src/motionvehicle.h
+++ b/src/motionvehicle.h
@@ -1,4 +1,18 @@
-// motionvehicle.h
+// * 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 .
#ifndef _MOTIONVEHICLE_H_
#define _MOTIONVEHICLE_H_
diff --git a/src/motionworm.cpp b/src/motionworm.cpp
index aa575d9..09d8015 100644
--- a/src/motionworm.cpp
+++ b/src/motionworm.cpp
@@ -1,4 +1,18 @@
-// motionworm.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
@@ -27,7 +41,7 @@
-#define START_TIME 1000.0f // début du temps relatif
+#define START_TIME 1000.0f // d�but du temps relatif
#define TIME_UPDOWN 2.0f // temps pour up/down
#define DOWN_ALTITUDE 3.0f // distance sous terre
#define WORM_PART 7 // nb de parties d'un ver
@@ -72,7 +86,7 @@ void CMotionWorm::DeleteObject(BOOL bAll)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CMotionWorm::Create(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -87,23 +101,23 @@ BOOL CMotionWorm::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetType(type);
- // Crée la base principale.
+ // Cr�e la base principale.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEVEHICULE); // c'est un objet mobile
m_object->SetObjectRank(0, rank);
- pModFile->ReadModel("objects\\worm0.mod"); // n'existe pas exprès !
+ pModFile->ReadModel("objects\\worm0.mod"); // n'existe pas expr�s !
pModFile->CreateEngineObject(rank);
m_object->SetPosition(0, pos);
m_object->SetAngleY(0, angle);
- // Un véhicule doit avoir obligatoirement une sphère de
+ // Un v�hicule doit avoir obligatoirement une sph�re de
// collision avec un centre (0;y;0) (voir GetCrashSphere).
m_object->CreateCrashSphere(D3DVECTOR(0.0f, 0.0f, 0.0f), 4.0f, SOUND_BOUM, 0.20f);
m_object->SetGlobalSphere(D3DVECTOR(0.0f, 0.0f, 0.0f), 5.0f);
px = 1.0f+WORM_PART/2;
- // Crée la tête.
+ // Cr�e la t�te.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(1, rank);
@@ -113,7 +127,7 @@ BOOL CMotionWorm::Create(D3DVECTOR pos, float angle, ObjectType type,
m_object->SetPosition(1, D3DVECTOR(px, 0.0f, 0.0f));
px -= 1.0f;
- // Crée le corps.
+ // Cr�e le corps.
for ( i=0 ; i<WORM_PART ; i++ )
{
rank = m_engine->CreateObject();
@@ -126,7 +140,7 @@ BOOL CMotionWorm::Create(D3DVECTOR pos, float angle, ObjectType type,
px -= 1.0f;
}
- // Crée la queue.
+ // Cr�e la queue.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
m_object->SetObjectRank(2+WORM_PART, rank);
@@ -149,7 +163,7 @@ BOOL CMotionWorm::Create(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée la physique de l'objet.
+// Cr�e la physique de l'objet.
void CMotionWorm::CreatePhysics()
{
@@ -184,7 +198,7 @@ void CMotionWorm::CreatePhysics()
-// Spécifie un paramètre spécial.
+// Sp�cifie un param�tre sp�cial.
BOOL CMotionWorm::SetParam(int rank, float value)
{
@@ -212,7 +226,7 @@ float CMotionWorm::RetParam(int rank)
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionWorm::EventProcess(const Event &event)
{
@@ -230,7 +244,7 @@ BOOL CMotionWorm::EventProcess(const Event &event)
return TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CMotionWorm::EventFrame(const Event &event)
{
@@ -265,7 +279,7 @@ BOOL CMotionWorm::EventFrame(const Event &event)
else if ( phase < TIME_UPDOWN+m_timeDown ) // avance sous terre ?
{
h = -DOWN_ALTITUDE;
- under ++; // un morceau entièrement sous terre de plus
+ under ++; // un morceau enti�rement sous terre de plus
}
else if ( phase < TIME_UPDOWN+m_timeDown+TIME_UPDOWN ) // monte ?
{
@@ -275,7 +289,7 @@ BOOL CMotionWorm::EventFrame(const Event &event)
{
h = 0.0f;
}
- if ( m_object->RetBurn() ) // brûle ?
+ if ( m_object->RetBurn() ) // br�le ?
{
h = 0.0f; // reste sur terre
}
diff --git a/src/motionworm.h b/src/motionworm.h
index a464367..cf7874c 100644
--- a/src/motionworm.h
+++ b/src/motionworm.h
@@ -1,4 +1,18 @@
-// motionworm.h
+// * 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 .
#ifndef _MOTIONWORM_H_
#define _MOTIONWORM_H_
diff --git a/src/object.cpp b/src/object.cpp
index 6eda9f7..a0ab627 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -1,4 +1,18 @@
-// object.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
@@ -73,9 +87,9 @@
-#define ADJUST_ONBOARD FALSE // TRUE -> ajuste la caméra ONBOARD
+#define ADJUST_ONBOARD FALSE // TRUE -> ajuste la cam�ra ONBOARD
#define ADJUST_ARM FALSE // TRUE -> ajuste le bras manipulateur
-#define VIRUS_DELAY 60.0f // durée d'infection d'un virus
+#define VIRUS_DELAY 60.0f // dur�e d'infection d'un virus
#define LOSS_SHIELD 0.24f // perte du bouclier par coup
#define LOSS_SHIELD_H 0.10f // perte du bouclier pour l'homme
#define LOSS_SHIELD_M 0.02f // perte du bouclier pour la pondeuse
@@ -95,7 +109,7 @@ static float debug_arm3 = 0.0f;
-// Met à jour la classe Object.
+// Met � jour la classe Object.
void uObject(CBotVar* botThis, void* user)
{
@@ -113,12 +127,12 @@ void uObject(CBotVar* botThis, void* user)
physics = object->RetPhysics();
- // Met à jour le type de l'objet.
+ // Met � jour le type de l'objet.
pVar = botThis->GivItemList(); // "category"
type = object->RetType();
pVar->SetValInt(type, object->RetName());
- // Met à jour la position de l'objet.
+ // Met � jour la position de l'objet.
pVar = pVar->GivNext(); // "position"
if ( object->RetTruck() == 0 )
{
@@ -131,7 +145,7 @@ void uObject(CBotVar* botThis, void* user)
pSub = pSub->GivNext(); // "z"
pSub->SetValFloat(pos.y/g_unit);
}
- else // objet transporté ?
+ else // objet transport� ?
{
pSub = pVar->GivItemList(); // "x"
pSub->SetInit(IS_NAN);
@@ -141,7 +155,7 @@ void uObject(CBotVar* botThis, void* user)
pSub->SetInit(IS_NAN);
}
- // Met à jour l'angle.
+ // Met � jour l'angle.
pos = object->RetAngle(0);
pos += object->RetInclinaison();
pVar = pVar->GivNext(); // "orientation"
@@ -151,45 +165,45 @@ void uObject(CBotVar* botThis, void* user)
pVar = pVar->GivNext(); // "roll"
pVar->SetValFloat(pos.x*180.0f/PI);
- // Met à jour le niveau d'énergie de l'objet.
+ // Met � jour le niveau d'�nergie de l'objet.
pVar = pVar->GivNext(); // "energyLevel"
value = object->RetEnergy();
pVar->SetValFloat(value);
- // Met à jour le niveau du bouclier de l'objet.
+ // Met � jour le niveau du bouclier de l'objet.
pVar = pVar->GivNext(); // "shieldLevel"
value = object->RetShield();
pVar->SetValFloat(value);
- // Met à jour la température du bouclier.
+ // Met � jour la temp�rature du bouclier.
pVar = pVar->GivNext(); // "temperature"
if ( physics == 0 ) value = 0.0f;
else value = 1.0f-physics->RetReactorRange();
pVar->SetValFloat(value);
- // Met à jour la hauteur au-dessus du sol.
+ // Met � jour la hauteur au-dessus du sol.
pVar = pVar->GivNext(); // "altitude"
if ( physics == 0 ) value = 0.0f;
else value = physics->RetFloorHeight();
pVar->SetValFloat(value/g_unit);
- // Met à jour le temps de l'objet.
+ // Met � jour le temps de l'objet.
pVar = pVar->GivNext(); // "lifeTime"
value = object->RetAbsTime();
pVar->SetValFloat(value);
- // Met à jour la matière de l'objet.
+ // Met � jour la mati�re de l'objet.
pVar = pVar->GivNext(); // "material"
iValue = object->RetMaterial();
pVar->SetValInt(iValue);
- // Met à jour le type de la pile.
+ // Met � jour le type de la pile.
pVar = pVar->GivNext(); // "energyCell"
power = object->RetPower();
if ( power == 0 ) pVar->SetPointer(0);
else pVar->SetPointer(power->RetBotVar());
- // Met à jour le type de l'objet transporté.
+ // Met � jour le type de l'objet transport�.
pVar = pVar->GivNext(); // "load"
fret = object->RetFret();
if ( fret == 0 ) pVar->SetPointer(0);
@@ -354,7 +368,7 @@ CObject::~CObject()
// Supprime un objet.
// Si bAll=TRUE, on n'arrange rien, car tous les objets de la
-// scène sont détruits rapidement !
+// sc�ne sont d�truits rapidement !
void CObject::DeleteObject(BOOL bAll)
{
@@ -440,7 +454,7 @@ void CObject::DeleteObject(BOOL bAll)
}
}
- m_type = OBJECT_NULL; // objet invalide jusqu'à destruction complète
+ m_type = OBJECT_NULL; // objet invalide jusqu'� destruction compl�te
if ( m_partiReactor != -1 )
{
@@ -504,7 +518,7 @@ void CObject::DeleteObject(BOOL bAll)
if ( !bAll ) m_main->CreateShortcuts();
}
-// Simplifie un objet (on lui ôte le cerveau, entre autres).
+// Simplifie un objet (on lui �te le cerveau, entre autres).
void CObject::Simplify()
{
@@ -546,9 +560,9 @@ void CObject::Simplify()
}
-// Fait exploser un objet, lorsqu'il est touché par un projectile.
-// Si FALSE est retourné, l'objet n'est pas encore foutu.
-// Si TRUE est retourné, l'objet est détruit.
+// Fait exploser un objet, lorsqu'il est touch� par un projectile.
+// Si FALSE est retourn�, l'objet n'est pas encore foutu.
+// Si TRUE est retourn�, l'objet est d�truit.
BOOL CObject::ExploObject(ExploType type, float force, float decay)
{
@@ -570,7 +584,7 @@ BOOL CObject::ExploObject(ExploType type, float force, float decay)
m_type == OBJECT_SCRAP4 ||
m_type == OBJECT_SCRAP5 ||
m_type == OBJECT_BULLET ||
- m_type == OBJECT_EGG ) // objet qui ne brûle pas ?
+ m_type == OBJECT_EGG ) // objet qui ne br�le pas ?
{
type = EXPLO_BOUM;
force = 1.0f;
@@ -644,9 +658,9 @@ BOOL CObject::ExploObject(ExploType type, float force, float decay)
}
}
}
- else // complètement mort ?
+ else // compl�tement mort ?
{
- if ( type == EXPLO_BURN ) // brûle ?
+ if ( type == EXPLO_BURN ) // br�le ?
{
if ( m_type == OBJECT_MOTHER ||
m_type == OBJECT_ANT ||
@@ -753,7 +767,7 @@ BOOL CObject::ExploObject(ExploType type, float force, float decay)
if ( RetSelect() )
{
- SetSelect(FALSE); // désélectionne l'objet
+ SetSelect(FALSE); // d�s�lectionne l'objet
m_camera->SetType(CAMERA_EXPLO);
m_main->DeselectAll();
}
@@ -784,7 +798,7 @@ BOOL CObject::ExploObject(ExploType type, float force, float decay)
// (*) Si un robot ou le cosmonaute meurt, l'objet doit continuer
// d'exister, pour que les programmes des fourmis continuent
-// de fonctionner comme si de rien était !
+// de fonctionner comme si de rien �tait !
// Initialise une nouvelle partie.
@@ -813,7 +827,7 @@ void CObject::InitPart(int part)
m_objectPart[part].masterParti = -1;
}
-// Crée une nouvelle partie, et retourne son numéro.
+// Cr�e une nouvelle partie, et retourne son num�ro.
// Retourne -1 en cas d'erreur.
int CObject::CreatePart()
@@ -863,11 +877,11 @@ void CObject::UpdateTotalPart()
}
-// Spécifie le numéro de l'objet d'une partie.
+// Sp�cifie le num�ro de l'objet d'une partie.
void CObject::SetObjectRank(int part, int objRank)
{
- if ( !m_objectPart[part].bUsed ) // objet pas créé ?
+ if ( !m_objectPart[part].bUsed ) // objet pas cr�� ?
{
InitPart(part);
UpdateTotalPart();
@@ -875,7 +889,7 @@ void CObject::SetObjectRank(int part, int objRank)
m_objectPart[part].object = objRank;
}
-// Retourne le numéro d'une partie.
+// Retourne le num�ro d'une partie.
int CObject::RetObjectRank(int part)
{
@@ -883,8 +897,8 @@ int CObject::RetObjectRank(int part)
return m_objectPart[part].object;
}
-// Spécifie quel est le parent d'ue partie.
-// Rappel: la partie 0 est toujours le père de tous et donc la
+// Sp�cifie quel est le parent d'ue partie.
+// Rappel: la partie 0 est toujours le p�re de tous et donc la
// partie principale (par exemple le chassis d'une voiture).
void CObject::SetObjectParent(int part, int parent)
@@ -893,7 +907,7 @@ void CObject::SetObjectParent(int part, int parent)
}
-// Spécifie le type de l'objet.
+// Sp�cifie le type de l'objet.
void CObject::SetType(ObjectType type)
{
@@ -902,7 +916,7 @@ void CObject::SetType(ObjectType type)
if ( m_type == OBJECT_MOBILErs )
{
- m_param = 1.0f; // bouclier au maximum par défaut
+ m_param = 1.0f; // bouclier au maximum par d�faut
}
if ( m_type == OBJECT_ATOMIC )
@@ -922,7 +936,7 @@ void CObject::SetType(ObjectType type)
m_type == OBJECT_MOBILEti ||
m_type == OBJECT_MOBILEfi ||
m_type == OBJECT_MOBILEii ||
- m_type == OBJECT_MOBILErc ) // véhicule canon ?
+ m_type == OBJECT_MOBILErc ) // v�hicule canon ?
{
m_cameraType = CAMERA_ONBOARD;
}
@@ -939,7 +953,7 @@ char* CObject::RetName()
}
-// Choix de l'option à utiliser.
+// Choix de l'option � utiliser.
void CObject::SetOption(int option)
{
@@ -970,7 +984,7 @@ int CObject::RetID()
}
-// Sauve tous les paramètres de l'objet.
+// Sauve tous les param�tres de l'objet.
BOOL CObject::Write(char *line)
{
@@ -1114,7 +1128,7 @@ BOOL CObject::Write(char *line)
strcat(line, name);
}
- // Met les paramètres de la ligne de commande.
+ // Met les param�tres de la ligne de commande.
for ( i=0 ; i<OBJECTMAXCMDLINE ; i++ )
{
value = RetCmdLine(i);
@@ -1148,7 +1162,7 @@ BOOL CObject::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'objet.
+// Restitue tous les param�tres de l'objet.
BOOL CObject::Read(char *line)
{
@@ -1206,7 +1220,7 @@ BOOL CObject::Read(char *line)
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++ )
{
@@ -1240,7 +1254,7 @@ BOOL CObject::Read(char *line)
-// Cherche le nième fils d'un père.
+// Cherche le ni�me fils d'un p�re.
int CObject::SearchDescendant(int parent, int n)
{
@@ -1259,14 +1273,14 @@ int CObject::SearchDescendant(int parent, int n)
}
-// Supprime toutes les sphères utilisées pour les collisions.
+// Supprime toutes les sph�res utilis�es pour les collisions.
void CObject::FlushCrashShere()
{
m_crashSphereUsed = 0;
}
-// Ajoute une nouvelle sphère.
+// Ajoute une nouvelle sph�re.
int CObject::CreateCrashSphere(D3DVECTOR pos, float radius, Sound sound,
float hardness)
@@ -1283,14 +1297,14 @@ int CObject::CreateCrashSphere(D3DVECTOR pos, float radius, Sound sound,
return m_crashSphereUsed++;
}
-// Retourne le nombre de sphères.
+// Retourne le nombre de sph�res.
int CObject::RetCrashSphereTotal()
{
return m_crashSphereUsed;
}
-// Retourne une sphère pour les collisions.
+// Retourne une sph�re pour les collisions.
// La position est absolue dans le monde.
BOOL CObject::GetCrashSphere(int rank, D3DVECTOR &pos, float &radius)
@@ -1302,11 +1316,11 @@ BOOL CObject::GetCrashSphere(int rank, D3DVECTOR &pos, float &radius)
return FALSE;
}
- // Retourne la sphère pour les collisions, qui ne tient pas
- // compte de l'inclinaison du véhicule. Ceci est nécessaire
- // pour les collisions avec les véhicules, afin de ne pas tenir
+ // Retourne la sph�re pour les collisions, qui ne tient pas
+ // compte de l'inclinaison du v�hicule. Ceci est n�cessaire
+ // pour les collisions avec les v�hicules, afin de ne pas tenir
// compte de SetInclinaison, par exemple.
- // La sphère doit avoir obligatoirement un centre (0;y;0).
+ // La sph�re doit avoir obligatoirement un centre (0;y;0).
if ( rank == 0 && m_crashSphereUsed == 1 &&
m_crashSpherePos[0].x == 0.0f &&
m_crashSpherePos[0].z == 0.0f )
@@ -1326,21 +1340,21 @@ BOOL CObject::GetCrashSphere(int rank, D3DVECTOR &pos, float &radius)
return TRUE;
}
-// Retourne la dureté d'une sphère.
+// Retourne la duret� d'une sph�re.
Sound CObject::RetCrashSphereSound(int rank)
{
return m_crashSphereSound[rank];
}
-// Retourne la dureté d'une sphère.
+// Retourne la duret� d'une sph�re.
float CObject::RetCrashSphereHardness(int rank)
{
return m_crashSphereHardness[rank];
}
-// Supprime une sphère.
+// Supprime une sph�re.
void CObject::DeleteCrashSphere(int rank)
{
@@ -1356,7 +1370,7 @@ void CObject::DeleteCrashSphere(int rank)
m_crashSphereUsed --;
}
-// Spécifie la sphère globale, relative à l'objet.
+// Sp�cifie la sph�re globale, relative � l'objet.
void CObject::SetGlobalSphere(D3DVECTOR pos, float radius)
{
@@ -1367,7 +1381,7 @@ void CObject::SetGlobalSphere(D3DVECTOR pos, float radius)
m_globalSphereRadius = radius*zoom;
}
-// Retourne la sphère globale, dans l'univers.
+// Retourne la sph�re globale, dans l'univers.
void CObject::GetGlobalSphere(D3DVECTOR &pos, float &radius)
{
@@ -1376,7 +1390,7 @@ void CObject::GetGlobalSphere(D3DVECTOR &pos, float &radius)
}
-// Spécifie la sphère de bousculade, relative à l'objet.
+// Sp�cifie la sph�re de bousculade, relative � l'objet.
void CObject::SetJotlerSphere(D3DVECTOR pos, float radius)
{
@@ -1384,7 +1398,7 @@ void CObject::SetJotlerSphere(D3DVECTOR pos, float radius)
m_jotlerSphereRadius = radius;
}
-// Retourne la sphère de bousculade, dans l'univers.
+// Retourne la sph�re de bousculade, dans l'univers.
void CObject::GetJotlerSphere(D3DVECTOR &pos, float &radius)
{
@@ -1393,7 +1407,7 @@ void CObject::GetJotlerSphere(D3DVECTOR &pos, float &radius)
}
-// Spécifie le rayon du bouclier.
+// Sp�cifie le rayon du bouclier.
void CObject::SetShieldRadius(float radius)
{
@@ -1408,7 +1422,7 @@ float CObject::RetShieldRadius()
}
-// Positionne un objet à une certaine hauteur par-rapport au sol.
+// Positionne un objet � une certaine hauteur par-rapport au sol.
void CObject::SetFloorHeight(float height)
{
@@ -1427,7 +1441,7 @@ void CObject::SetFloorHeight(float height)
m_objectPart[0].bTranslate = TRUE; // il faudra recalculer les matrices
}
-// Ajuste l'inclinaison d'un objet posé sur le sol.
+// Ajuste l'inclinaison d'un objet pos� sur le sol.
void CObject::FloorAdjust()
{
@@ -1452,7 +1466,7 @@ void CObject::FloorAdjust()
}
-// Donne la vibration linéaire.
+// Donne la vibration lin�aire.
void CObject::SetLinVibration(D3DVECTOR dir)
{
@@ -1536,8 +1550,8 @@ void CObject::SetPosition(int part, const D3DVECTOR &pos)
}
m_engine->SetObjectShadowHeight(rank, height);
- // Calcul la normale au terrain en 9 points stratégiques,
- // puis effectue une moyenne pondérée (les points au centre
+ // Calcul la normale au terrain en 9 points strat�giques,
+ // puis effectue une moyenne pond�r�e (les points au centre
// ont plus d'importance).
radius = m_engine->RetObjectShadowRadius(rank);
i = 0;
@@ -1784,7 +1798,7 @@ void CObject::SetTrainer(BOOL bEnable)
{
m_bTrainer = bEnable;
- if ( m_bTrainer ) // entraînement ?
+ if ( m_bTrainer ) // entra�nement ?
{
m_cameraType = CAMERA_FIX;
}
@@ -1866,7 +1880,7 @@ void CObject::SetResetRun(int run)
}
-// Gestion de la particule maîtresse.
+// Gestion de la particule ma�tresse.
void CObject::SetMasterParticule(int part, int parti)
{
@@ -1879,7 +1893,7 @@ int CObject::RetMasterParticule(int part)
}
-// Gestion de la pile transportée.
+// Gestion de la pile transport�e.
void CObject::SetPower(CObject* power)
{
@@ -1891,7 +1905,7 @@ CObject* CObject::RetPower()
return m_power;
}
-// Gestion de l'objet transporté.
+// Gestion de l'objet transport�.
void CObject::SetFret(CObject* fret)
{
@@ -1909,7 +1923,7 @@ void CObject::SetTruck(CObject* truck)
{
m_truck = truck;
- // Ombre invisible si l'objet est transporté.
+ // Ombre invisible si l'objet est transport�.
m_engine->SetObjectShadowHide(m_objectPart[0].object, (m_truck != 0));
}
@@ -2037,7 +2051,7 @@ D3DMATRIX* CObject::RetWorldMatrix(int part)
}
-// Indique si l'objet doit être dessiné par dessous l'interface.
+// Indique si l'objet doit �tre dessin� par dessous l'interface.
void CObject::SetDrawWorld(BOOL bDraw)
{
@@ -2052,7 +2066,7 @@ void CObject::SetDrawWorld(BOOL bDraw)
}
}
-// Indique si l'objet doit être dessiné par dessus l'interface.
+// Indique si l'objet doit �tre dessin� par dessus l'interface.
void CObject::SetDrawFront(BOOL bDraw)
{
@@ -2068,7 +2082,7 @@ void CObject::SetDrawFront(BOOL bDraw)
}
-// Crée un véhicule roulant quelconque posé sur le sol.
+// Cr�e un v�hicule roulant quelconque pos� sur le sol.
BOOL CObject::CreateVehicle(D3DVECTOR pos, float angle, ObjectType type,
float power, BOOL bTrainer, BOOL bToy)
@@ -2161,7 +2175,7 @@ BOOL CObject::CreateVehicle(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée un insecte quelconque posé sur le sol.
+// Cr�e un insecte quelconque pos� sur le sol.
BOOL CObject::CreateInsect(D3DVECTOR pos, float angle, ObjectType type)
{
@@ -2225,8 +2239,8 @@ BOOL CObject::CreateInsect(D3DVECTOR pos, float angle, ObjectType type)
return TRUE;
}
-// Crée l'ombre sous un véhicule sous forme d'une lumière
-// négative.
+// Cr�e l'ombre sous un v�hicule sous forme d'une lumi�re
+// n�gative.
BOOL CObject::CreateShadowLight(float height, D3DCOLORVALUE color)
{
@@ -2262,20 +2276,20 @@ BOOL CObject::CreateShadowLight(float height, D3DCOLORVALUE color)
m_light->SetLight(m_shadowLight, light);
- // N'éclaire que les objets du terrain.
+ // N'�claire que les objets du terrain.
m_light->SetLightIncluType(m_shadowLight, TYPETERRAIN);
return TRUE;
}
-// Retourne le numéro de la lumière d'ombre négative.
+// Retourne le num�ro de la lumi�re d'ombre n�gative.
int CObject::RetShadowLight()
{
return m_shadowLight;
}
-// Crée la lumière pour les effects d'un véhicule.
+// Cr�e la lumi�re pour les effects d'un v�hicule.
BOOL CObject::CreateEffectLight(float height, D3DCOLORVALUE color)
{
@@ -2313,14 +2327,14 @@ BOOL CObject::CreateEffectLight(float height, D3DCOLORVALUE color)
return TRUE;
}
-// Retourne le numéro de la lumière des effets.
+// Retourne le num�ro de la lumi�re des effets.
int CObject::RetEffectLight()
{
return m_effectLight;
}
-// Crée l'ombre circulaire sous un véhicule.
+// Cr�e l'ombre circulaire sous un v�hicule.
BOOL CObject::CreateShadowCircle(float radius, float intensity,
D3DShadowType type)
@@ -2342,7 +2356,7 @@ BOOL CObject::CreateShadowCircle(float radius, float intensity,
return TRUE;
}
-// Crée un batiment quelconque posé sur le sol.
+// Cr�e un batiment quelconque pos� sur le sol.
BOOL CObject::CreateBuilding(D3DVECTOR pos, float angle, float height,
ObjectType type, float power)
@@ -2713,7 +2727,7 @@ BOOL CObject::CreateBuilding(D3DVECTOR pos, float angle, float height,
SetGlobalSphere(D3DVECTOR(-7.0f, 5.0f, 0.0f), 5.0f);
m_character.posPower = D3DVECTOR(0.0f, 3.0f, 0.0f);
- m_energy = power; // initialise le niveau d'énergie
+ m_energy = power; // initialise le niveau d'�nergie
CreateShadowCircle(6.0f, 0.5f);
}
@@ -2910,7 +2924,7 @@ BOOL CObject::CreateBuilding(D3DVECTOR pos, float angle, float height,
CreateCrashSphere(D3DVECTOR(-15.0f, 6.0f, 0.0f), 4.0f, SOUND_BOUMm, 0.45f);
SetGlobalSphere(D3DVECTOR(-15.0f, 5.0f, 0.0f), 6.0f);
- m_energy = power; // initialise le niveau d'énergie
+ m_energy = power; // initialise le niveau d'�nergie
}
if ( m_type == OBJECT_CONVERT )
@@ -3201,7 +3215,7 @@ BOOL CObject::CreateBuilding(D3DVECTOR pos, float angle, float height,
}
#if 0
- if ( power > 0.0f ) // crée une pile ?
+ if ( power > 0.0f ) // cr�e une pile ?
{
CObject* pPower;
@@ -3239,7 +3253,7 @@ BOOL CObject::CreateBuilding(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée une petite ressource posée sur le sol.
+// Cr�e une petite ressource pos�e sur le sol.
BOOL CObject::CreateResource(D3DVECTOR pos, float angle, ObjectType type,
float power)
@@ -3360,7 +3374,7 @@ BOOL CObject::CreateResource(D3DVECTOR pos, float angle, ObjectType type,
return TRUE;
}
-// Crée un drapeau posé sur le sol.
+// Cr�e un drapeau pos� sur le sol.
BOOL CObject::CreateFlag(D3DVECTOR pos, float angle, ObjectType type)
{
@@ -3423,7 +3437,7 @@ BOOL CObject::CreateFlag(D3DVECTOR pos, float angle, ObjectType type)
return TRUE;
}
-// Crée une barrière posée sur le sol.
+// Cr�e une barri�re pos�e sur le sol.
BOOL CObject::CreateBarrier(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -3526,7 +3540,7 @@ BOOL CObject::CreateBarrier(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée une plante posée sur le sol.
+// Cr�e une plante pos�e sur le sol.
BOOL CObject::CreatePlant(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -3569,7 +3583,7 @@ BOOL CObject::CreatePlant(D3DVECTOR pos, float angle, float height,
if ( type == OBJECT_PLANT5 ||
type == OBJECT_PLANT6 ||
- type == OBJECT_PLANT7 ) // trèfle ?
+ type == OBJECT_PLANT7 ) // tr�fle ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -3634,7 +3648,7 @@ BOOL CObject::CreatePlant(D3DVECTOR pos, float angle, float height,
type == OBJECT_PLANT16 ||
type == OBJECT_PLANT17 ||
type == OBJECT_PLANT18 ||
- type == OBJECT_PLANT19 ) // fougère ?
+ type == OBJECT_PLANT19 ) // foug�re ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -3749,7 +3763,7 @@ BOOL CObject::CreatePlant(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(8.0f, 0.5f);
}
- if ( type == OBJECT_TREE5 ) // arbre géant (pour monde "teen")
+ if ( type == OBJECT_TREE5 ) // arbre g�ant (pour monde "teen")
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -3780,7 +3794,7 @@ BOOL CObject::CreatePlant(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée un champignon posé sur le sol.
+// Cr�e un champignon pos� sur le sol.
BOOL CObject::CreateMushroom(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -3842,7 +3856,7 @@ BOOL CObject::CreateMushroom(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée un jouet posé sur le sol.
+// Cr�e un jouet pos� sur le sol.
BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
ObjectType type)
@@ -4068,7 +4082,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateShadowCircle(20.0f, 0.2f*fShadow);
}
- if ( type == OBJECT_TEEN10 ) // bibliothèque
+ if ( type == OBJECT_TEEN10 ) // biblioth�que
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4135,7 +4149,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateShadowCircle(4.5f, 1.0f*fShadow);
}
- if ( type == OBJECT_TEEN13 ) // carton fermé
+ if ( type == OBJECT_TEEN13 ) // carton ferm�
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4276,7 +4290,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateShadowCircle(33.0f, 1.0f*fShadow);
}
- if ( type == OBJECT_TEEN20 ) // mur avec étagère
+ if ( type == OBJECT_TEEN20 ) // mur avec �tag�re
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4297,7 +4311,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateCrashSphere(D3DVECTOR( 83.0f, 0.0f, -35.0f), 4.0f, SOUND_BOUMm, 0.45f);
}
- if ( type == OBJECT_TEEN21 ) // mur avec fenêtre
+ if ( type == OBJECT_TEEN21 ) // mur avec fen�tre
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4309,7 +4323,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
SetZoom(0, zoom);
}
- if ( type == OBJECT_TEEN22 ) // mur avec porte et étagère
+ if ( type == OBJECT_TEEN22 ) // mur avec porte et �tag�re
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4605,7 +4619,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(2, rank);
SetObjectParent(2, 1);
- pModFile->ReadModel("objects\\teen38c.mod"); // hélice
+ pModFile->ReadModel("objects\\teen38c.mod"); // h�lice
pModFile->CreateEngineObject(rank);
SetPosition(2, D3DVECTOR(0.0f, 0.0f, 0.0f));
@@ -4646,7 +4660,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateShadowCircle(15.0f, 0.7f*fShadow);
}
- if ( type == OBJECT_TEEN41 ) // clôture ?
+ if ( type == OBJECT_TEEN41 ) // cl�ture ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4658,7 +4672,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
SetZoom(0, zoom);
}
- if ( type == OBJECT_TEEN42 ) // trèfle ?
+ if ( type == OBJECT_TEEN42 ) // tr�fle ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4673,7 +4687,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
CreateShadowCircle(15.0f, 0.4f*fShadow);
}
- if ( type == OBJECT_TEEN43 ) // trèfle ?
+ if ( type == OBJECT_TEEN43 ) // tr�fle ?
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX);
@@ -4723,7 +4737,7 @@ BOOL CObject::CreateTeen(D3DVECTOR pos, float angle, float zoom, float height,
return TRUE;
}
-// Crée un quartz posé sur le sol.
+// Cr�e un quartz pos� sur le sol.
BOOL CObject::CreateQuartz(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -4836,7 +4850,7 @@ BOOL CObject::CreateQuartz(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée une racine posée sur le sol.
+// Cr�e une racine pos�e sur le sol.
BOOL CObject::CreateRoot(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -5013,7 +5027,7 @@ BOOL CObject::CreateRoot(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée une petite maison.
+// Cr�e une petite maison.
BOOL CObject::CreateHome(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -5057,7 +5071,7 @@ BOOL CObject::CreateHome(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée une ruine posée sur le sol.
+// Cr�e une ruine pos�e sur le sol.
BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
ObjectType type)
@@ -5097,9 +5111,9 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
SetPosition(0, pos);
SetAngleY(0, angle);
- if ( type == OBJECT_RUINmobilew1 ) // véhicule à roues ?
+ if ( type == OBJECT_RUINmobilew1 ) // v�hicule � roues ?
{
- // Crée la roue arrière-droite.
+ // Cr�e la roue arri�re-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(6, rank);
@@ -5111,7 +5125,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
SetPosition(6, D3DVECTOR(-3.0f, 1.8f, -4.0f));
SetAngleX(6, -PI/2.0f);
- // Crée la roue arrière-gauche.
+ // Cr�e la roue arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(7, rank);
@@ -5124,7 +5138,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
SetAngleY(7, PI-0.3f);
SetAngleX(7, -0.3f);
- // Crée la roue avant-droite.
+ // Cr�e la roue avant-droite.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(8, rank);
@@ -5136,7 +5150,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
SetPosition(8, D3DVECTOR(2.0f, 1.6f, -3.0f));
SetAngleY(8, 0.3f);
- // Crée la roue avant-gauche.
+ // Cr�e la roue avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(9, rank);
@@ -5155,9 +5169,9 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(4.0f, 1.0f);
}
- if ( type == OBJECT_RUINmobilew2 ) // véhicule à roues ?
+ if ( type == OBJECT_RUINmobilew2 ) // v�hicule � roues ?
{
- // Crée la roue arrière-gauche.
+ // Cr�e la roue arri�re-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(7, rank);
@@ -5170,7 +5184,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
SetAngleY(7, PI+0.3f);
SetAngleX(7, 0.4f);
- // Crée la roue avant-gauche.
+ // Cr�e la roue avant-gauche.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(9, rank);
@@ -5189,9 +5203,9 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(4.0f, 1.0f);
}
- if ( type == OBJECT_RUINmobilet1 ) // véhicule à chenilles ?
+ if ( type == OBJECT_RUINmobilet1 ) // v�hicule � chenilles ?
{
- // Crée le canon.
+ // Cr�e le canon.
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(1, rank);
@@ -5211,7 +5225,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(5.0f, 1.0f);
}
- if ( type == OBJECT_RUINmobilet2 ) // véhicule à chenilles ?
+ if ( type == OBJECT_RUINmobilet2 ) // v�hicule � chenilles ?
{
CreateCrashSphere(D3DVECTOR(0.0f, 2.8f, 0.0f), 5.0f, SOUND_BOUMm, 0.45f);
//? SetGlobalSphere(D3DVECTOR(0.0f, 5.0f, 0.0f), 10.0f);
@@ -5219,7 +5233,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(5.0f, 1.0f);
}
- if ( type == OBJECT_RUINmobiler1 ) // véhicule roller ?
+ if ( type == OBJECT_RUINmobiler1 ) // v�hicule roller ?
{
CreateCrashSphere(D3DVECTOR(1.0f, 2.8f, -1.0f), 5.0f, SOUND_BOUMm, 0.45f);
SetGlobalSphere(D3DVECTOR(1.0f, 5.0f, -1.0f), 10.0f);
@@ -5227,7 +5241,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
CreateShadowCircle(5.0f, 1.0f);
}
- if ( type == OBJECT_RUINmobiler2 ) // véhicule roller ?
+ if ( type == OBJECT_RUINmobiler2 ) // v�hicule roller ?
{
CreateCrashSphere(D3DVECTOR(0.0f, 1.0f, 0.0f), 5.0f, SOUND_BOUMm, 0.45f);
SetGlobalSphere(D3DVECTOR(0.0f, 5.0f, 0.0f), 10.0f);
@@ -5484,7 +5498,7 @@ BOOL CObject::CreateRuin(D3DVECTOR pos, float angle, float height,
return TRUE;
}
-// Crée un gadget apollo.
+// Cr�e un gadget apollo.
BOOL CObject::CreateApollo(D3DVECTOR pos, float angle, ObjectType type)
{
@@ -5509,7 +5523,7 @@ BOOL CObject::CreateApollo(D3DVECTOR pos, float angle, ObjectType type)
SetZoom(0, 1.2f);
SetFloorHeight(0.0f);
- for ( i=0 ; i<4 ; i++ ) // crée les pieds
+ for ( i=0 ; i<4 ; i++ ) // cr�e les pieds
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
@@ -5524,7 +5538,7 @@ BOOL CObject::CreateApollo(D3DVECTOR pos, float angle, ObjectType type)
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(5, rank);
SetObjectParent(5, 0);
- pModFile->ReadModel("objects\\apollol3.mod"); // échelle
+ pModFile->ReadModel("objects\\apollol3.mod"); // �chelle
pModFile->CreateEngineObject(rank);
//? m_terrain->AddBuildingLevel(pos, 10.0f, 13.0f, 12.0f, 0.0f);
@@ -5599,7 +5613,7 @@ BOOL CObject::CreateApollo(D3DVECTOR pos, float angle, ObjectType type)
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(6, rank);
SetObjectParent(6, 0);
- pModFile->ReadModel("objects\\apolloj3.mod"); // caméra
+ pModFile->ReadModel("objects\\apolloj3.mod"); // cam�ra
pModFile->CreateEngineObject(rank);
SetPosition(6, D3DVECTOR(5.5f, 2.8f, -2.0f));
SetAngleY(6, 30.0f*PI/180.0f);
@@ -5679,7 +5693,7 @@ BOOL CObject::CreateApollo(D3DVECTOR pos, float angle, ObjectType type)
return TRUE;
}
-// Crée tous les sous-objets permettant de gérer cet objet.
+// Cr�e tous les sous-objets permettant de g�rer cet objet.
void CObject::CreateOtherObject(ObjectType type)
{
@@ -5810,7 +5824,7 @@ BOOL CObject::WriteProgram(int rank, char* filename)
return FALSE;
}
-// Démarre un programme.
+// D�marre un programme.
BOOL CObject::RunProgram(int rank)
{
@@ -5831,7 +5845,7 @@ BOOL CObject::RunProgram(int rank)
// Calcule la matrice permettant de transformer l'objet.
-// Retourne TRUE si la matrice a changé.
+// Retourne TRUE si la matrice a chang�.
// Les rotations ont lieu dans l'ordre Y, Z et X.
BOOL CObject::UpdateTransformObject(int part, BOOL bForceUpdate)
@@ -5840,7 +5854,7 @@ BOOL CObject::UpdateTransformObject(int part, BOOL bForceUpdate)
BOOL bModif = FALSE;
int parent;
- if ( m_truck != 0 ) // transporté par camion ?
+ if ( m_truck != 0 ) // transport� par camion ?
{
m_objectPart[part].bTranslate = TRUE;
m_objectPart[part].bRotate = TRUE;
@@ -5900,7 +5914,7 @@ BOOL CObject::UpdateTransformObject(int part, BOOL bForceUpdate)
{
parent = m_objectPart[part].parentPart;
- if ( part == 0 && m_truck != 0 ) // transporté par un camion ?
+ if ( part == 0 && m_truck != 0 ) // transport� par un camion ?
{
D3DMATRIX* matWorldTruck;
matWorldTruck = m_truck->RetWorldMatrix(m_truckLink);
@@ -5934,9 +5948,9 @@ BOOL CObject::UpdateTransformObject(int part, BOOL bForceUpdate)
return bModif;
}
-// Met à jour toutes les matrices pour transformer l'objet père
+// Met � jour toutes les matrices pour transformer l'objet p�re
// et tous ses fils.
-// On suppose un maximum de 4 degrés de liberté. Cela convient,
+// On suppose un maximum de 4 degr�s de libert�. Cela convient,
// par exemple, pour un corps, un bras, un avant-bras, une main
// et des doigts.
@@ -5999,8 +6013,8 @@ BOOL CObject::UpdateTransformObject()
}
-// Met toute la descendance à plat (il n'y a plus que des pères).
-// Ceci permet de faire partir les débris indépendamment les uns
+// Met toute la descendance � plat (il n'y a plus que des p�res).
+// Ceci permet de faire partir les d�bris ind�pendamment les uns
// des autres dans tous les sens.
void CObject::FlatParent()
@@ -6029,7 +6043,7 @@ void CObject::FlatParent()
-// Met à jour la mapping de la texture de la pile.
+// Met � jour la mapping de la texture de la pile.
void CObject::UpdateEnergyMapping()
{
@@ -6135,7 +6149,7 @@ BOOL CObject::EventProcess(const Event &event)
if ( m_physics != 0 )
{
- if ( !m_physics->EventProcess(event) ) // objet détruit ?
+ if ( !m_physics->EventProcess(event) ) // objet d�truit ?
{
if ( RetSelect() &&
m_type != OBJECT_ANT &&
@@ -6220,7 +6234,7 @@ BOOL CObject::EventFrame(const Event &event)
return TRUE;
}
-// Met à jour le mapping de l'objet.
+// Met � jour le mapping de l'objet.
void CObject::UpdateMapping()
{
@@ -6280,7 +6294,7 @@ void CObject::VirusFrame(float rTime)
}
}
-// Gestion des particules maîtresses.
+// Gestion des particules ma�tresses.
void CObject::PartiFrame(float rTime)
{
@@ -6302,7 +6316,7 @@ void CObject::PartiFrame(float rTime)
SetPosition(i, pos);
- // Chaque morceau tournoie différemment.
+ // Chaque morceau tournoie diff�remment.
switch( i%5 )
{
case 0: factor = D3DVECTOR( 0.5f, 0.3f, 0.6f); break;
@@ -6319,8 +6333,8 @@ void CObject::PartiFrame(float rTime)
}
-// Modifie le point de vue pour voir comme si on était
-// dans le véhicule, ou derrière le véhicule.
+// Modifie le point de vue pour voir comme si on �tait
+// dans le v�hicule, ou derri�re le v�hicule.
void CObject::SetViewFromHere(D3DVECTOR &eye, float &dirH, float &dirV,
D3DVECTOR &lookat, D3DVECTOR &upVec,
@@ -6432,7 +6446,7 @@ void CObject::SetViewFromHere(D3DVECTOR &eye, float &dirH, float &dirV,
eye = Transform(m_objectPart[part].matWorld, eye);
lookat = Transform(m_objectPart[part].matWorld, lookat);
- // Penche la caméra dans les virages.
+ // Penche la cam�ra dans les virages.
upVec = D3DVECTOR(0.0f, 1.0f, 0.0f);
if ( m_physics != 0 )
{
@@ -6461,7 +6475,7 @@ void CObject::SetViewFromHere(D3DVECTOR &eye, float &dirH, float &dirV,
}
-// Gestion des caractéristiques.
+// Gestion des caract�ristiques.
void CObject::SetCharacter(Character* character)
{
@@ -6487,8 +6501,8 @@ float CObject::RetAbsTime()
}
-// Gestion de l'énergie contenue dans une pile.
-// Seul l'objet pile possède de l'énergie, mais pas le véhicule
+// Gestion de l'�nergie contenue dans une pile.
+// Seul l'objet pile poss�de de l'�nergie, mais pas le v�hicule
// qui transporte la pile !
void CObject::SetEnergy(float level)
@@ -6508,8 +6522,8 @@ float CObject::RetEnergy()
}
-// Gestion de la capacité d'une pile.
-// Seul l'objet pile possède une capacité, mais pas le véhicule
+// Gestion de la capacit� d'une pile.
+// Seul l'objet pile poss�de une capacit�, mais pas le v�hicule
// qui transporte la pile !
void CObject::SetCapacity(float capacity)
@@ -6566,7 +6580,7 @@ float CObject::RetShield()
}
-// Gestion de l'autonomie de vol (zéro = infini).
+// Gestion de l'autonomie de vol (z�ro = infini).
void CObject::SetRange(float delay)
{
@@ -6607,7 +6621,7 @@ float CObject::RetTransparency()
}
-// Gestion de la matière de l'objet.
+// Gestion de la mati�re de l'objet.
ObjectMaterial CObject::RetMaterial()
{
@@ -6695,7 +6709,7 @@ BOOL CObject::JostleObject(float force)
}
-// Début de l'effet lorsque l'instruction "detect" est utilisée.
+// D�but de l'effet lorsque l'instruction "detect" est utilis�e.
void CObject::StartDetectEffect(CObject *target, BOOL bFound)
{
@@ -6747,7 +6761,7 @@ void CObject::SetVirusMode(BOOL bEnable)
{
if ( !m_brain->IntroduceVirus() ) // essaye de contaminer
{
- m_bVirusMode = FALSE; // pas de programme à contaminer !
+ m_bVirusMode = FALSE; // pas de programme � contaminer !
}
}
}
@@ -6763,7 +6777,7 @@ float CObject::RetVirusTime()
}
-// Gestion du mode de la caméra.
+// Gestion du mode de la cam�ra.
void CObject::SetCameraType(CameraType type)
{
@@ -6797,7 +6811,7 @@ BOOL CObject::RetCameraLock()
-// Gestion de la mise en évidence de l'objet.
+// Gestion de la mise en �vidence de l'objet.
void CObject::SetHilite(BOOL bMode)
{
@@ -6818,7 +6832,7 @@ void CObject::SetHilite(BOOL bMode)
}
list[j] = -1; // terminateur
- m_engine->SetHiliteRank(list); // donne la liste des parties sélectionnées
+ m_engine->SetHiliteRank(list); // donne la liste des parties s�lectionn�es
}
}
@@ -6828,7 +6842,7 @@ BOOL CObject::RetHilite()
}
-// Indique si l'objet est sélecionné ou non.
+// Indique si l'objet est s�lecionn� ou non.
void CObject::SetSelect(BOOL bMode, BOOL bDisplayError)
{
@@ -6846,12 +6860,12 @@ void CObject::SetSelect(BOOL bMode, BOOL bDisplayError)
m_auto->CreateInterface(m_bSelect);
}
- CreateSelectParticule(); // crée/supprime les particules
+ CreateSelectParticule(); // cr�e/supprime les particules
if ( !m_bSelect )
{
SetGunGoalH(0.0f); // met le canon droit
- return; // fini si pas sélectionné
+ return; // fini si pas s�lectionn�
}
err = ERR_OK;
@@ -6869,7 +6883,7 @@ void CObject::SetSelect(BOOL bMode, BOOL bDisplayError)
}
}
-// Indique si l'objet est sélectionné ou non.
+// Indique si l'objet est s�lectionn� ou non.
BOOL CObject::RetSelect(BOOL bReal)
{
@@ -6878,14 +6892,14 @@ BOOL CObject::RetSelect(BOOL bReal)
}
-// Indique si l'objet est sélecionnable ou non.
+// Indique si l'objet est s�lecionnable ou non.
void CObject::SetSelectable(BOOL bMode)
{
m_bSelectable = bMode;
}
-// Indique si l'objet est sélecionnable ou non.
+// Indique si l'objet est s�lecionnable ou non.
BOOL CObject::RetSelectable()
{
@@ -6893,7 +6907,7 @@ BOOL CObject::RetSelectable()
}
-// Gestion de l'activité d'un objet.
+// Gestion de l'activit� d'un objet.
void CObject::SetActivity(BOOL bMode)
{
@@ -6913,14 +6927,14 @@ BOOL CObject::RetActivity()
}
-// Indique si faut vérifier les tokens de l'objet.
+// Indique si faut v�rifier les tokens de l'objet.
void CObject::SetCheckToken(BOOL bMode)
{
m_bCheckToken = bMode;
}
-// Indique si faut vérifier les tokens de l'objet.
+// Indique si faut v�rifier les tokens de l'objet.
BOOL CObject::RetCheckToken()
{
@@ -6928,9 +6942,9 @@ BOOL CObject::RetCheckToken()
}
-// Gestion de la visibilité d'un objet.
-// L'objet n'est pas caché visuellement ni inactif, mais ignoré
-// des détections ! Par exemple: ver sous terre.
+// Gestion de la visibilit� d'un objet.
+// L'objet n'est pas cach� visuellement ni inactif, mais ignor�
+// des d�tections ! Par exemple: ver sous terre.
void CObject::SetVisible(BOOL bVisible)
{
@@ -6944,9 +6958,9 @@ BOOL CObject::RetVisible()
// Gestion du mode de fonctionnement d'un objet. Un objet
-// inactif est identique à un objet détruit, inexistant.
-// Ce mode est utilisé pour les objets "resetables" lors
-// d'entraînement, pour simuler une destruction.
+// inactif est identique � un objet d�truit, inexistant.
+// Ce mode est utilis� pour les objets "resetables" lors
+// d'entra�nement, pour simuler une destruction.
void CObject::SetEnable(BOOL bEnable)
{
@@ -6959,7 +6973,7 @@ BOOL CObject::RetEnable()
}
-// Gestion du mode où un objet n'est activé que lorsqu'on
+// Gestion du mode o� un objet n'est activ� que lorsqu'on
// est proche.
void CObject::SetProxyActivate(BOOL bActivate)
@@ -6996,7 +7010,7 @@ float CObject::RetMagnifyDamage()
}
-// Gestion du paramètre libre.
+// Gestion du param�tre libre.
void CObject::SetParam(float value)
{
@@ -7009,10 +7023,10 @@ float CObject::RetParam()
}
-// Gestion du mode "bloqué" d'un objet.
-// Par exemple, un cube de titanium est bloqué pendant qu'il est utilisé
-// pour fabriquer qq chose, ou un véhicule est bloqué tant que sa
-// construction n'est pas terminée.
+// Gestion du mode "bloqu�" d'un objet.
+// Par exemple, un cube de titanium est bloqu� pendant qu'il est utilis�
+// pour fabriquer qq chose, ou un v�hicule est bloqu� tant que sa
+// construction n'est pas termin�e.
void CObject::SetLock(BOOL bLock)
{
@@ -7025,7 +7039,7 @@ BOOL CObject::RetLock()
}
// Gestion du mode "en cours d'explosion" d'un objet.
-// Un objet dans ce mode n'est pas sauvegardé.
+// Un objet dans ce mode n'est pas sauvegard�.
void CObject::SetExplo(BOOL bExplo)
{
@@ -7075,7 +7089,7 @@ void CObject::SetDead(BOOL bDead)
if ( bDead && m_brain != 0 )
{
- m_brain->StopProgram(); // stoppe la tâche en cours
+ m_brain->StopProgram(); // stoppe la t�che en cours
}
//? if ( m_botVar != 0 )
@@ -7101,7 +7115,7 @@ BOOL CObject::RetActif()
}
-// Gestion du point de visée.
+// Gestion du point de vis�e.
void CObject::SetGunGoalV(float gunGoal)
{
@@ -7201,7 +7215,7 @@ void CObject::StopShowLimit()
-// Indique si un programme est en cours d'exécution.
+// Indique si un programme est en cours d'ex�cution.
BOOL CObject::IsProgram()
{
@@ -7210,7 +7224,7 @@ BOOL CObject::IsProgram()
}
-// Crée ou supprime les particules associées à l'objet.
+// Cr�e ou supprime les particules associ�es � l'objet.
void CObject::CreateSelectParticule()
{
@@ -7218,7 +7232,7 @@ void CObject::CreateSelectParticule()
FPOINT dim;
int i;
- // Supprime les particules précédentes.
+ // Supprime les particules pr�c�dentes.
for ( i=0 ; i<4 ; i++ )
{
if ( m_partiSel[i] != -1 )
@@ -7230,7 +7244,7 @@ void CObject::CreateSelectParticule()
if ( m_bSelect || IsProgram() )
{
- // Crée les particules lens pour les phares.
+ // Cr�e les particules lens pour les phares.
if ( m_type == OBJECT_MOBILEfa ||
m_type == OBJECT_MOBILEta ||
m_type == OBJECT_MOBILEwa ||
@@ -7257,7 +7271,7 @@ void CObject::CreateSelectParticule()
m_type == OBJECT_MOBILEtt ||
m_type == OBJECT_MOBILEwt ||
m_type == OBJECT_MOBILEit ||
- m_type == OBJECT_MOBILEdr ) // véhicule ?
+ m_type == OBJECT_MOBILEdr ) // v�hicule ?
{
pos = D3DVECTOR(0.0f, 0.0f, 0.0f);
speed = D3DVECTOR(0.0f, 0.0f, 0.0f);
@@ -7272,7 +7286,7 @@ void CObject::CreateSelectParticule()
}
}
-// Met à jour les particules associées à l'objet.
+// Met � jour les particules associ�es � l'objet.
void CObject::UpdateSelectParticule()
{
@@ -7331,7 +7345,7 @@ void CObject::UpdateSelectParticule()
pos[1] = D3DVECTOR(4.2f, 2.5f, -1.5f);
}
- // Lens arrières rouges.
+ // Lens arri�res rouges.
if ( m_type == OBJECT_MOBILEfa ||
m_type == OBJECT_MOBILEfc ||
m_type == OBJECT_MOBILEfi ||
@@ -7414,7 +7428,7 @@ void CObject::UpdateSelectParticule()
zoom[3] = 0.0f;
}
- // Met à jour tous les lens.
+ // Met � jour tous les lens.
for ( i=0 ; i<4 ; i++ )
{
pos[i] = Transform(m_objectPart[0].matWorld, pos[i]);
@@ -7424,7 +7438,7 @@ void CObject::UpdateSelectParticule()
}
-// Donne le pointeur au script en cours d'exécution.
+// Donne le pointeur au script en cours d'ex�cution.
void CObject::SetRunScript(CScript* script)
{
@@ -7443,28 +7457,28 @@ CBotVar* CObject::RetBotVar()
return m_botVar;
}
-// Retourne la physique associée à l'objet.
+// Retourne la physique associ�e � l'objet.
CPhysics* CObject::RetPhysics()
{
return m_physics;
}
-// Retourne le cerveau associé à l'objet.
+// Retourne le cerveau associ� � l'objet.
CBrain* CObject::RetBrain()
{
return m_brain;
}
-// Retourne le mouvement associé à l'objet.
+// Retourne le mouvement associ� � l'objet.
CMotion* CObject::RetMotion()
{
return m_motion;
}
-// Retourne l'automate associé à l'objet.
+// Retourne l'automate associ� � l'objet.
CAuto* CObject::RetAuto()
{
@@ -7478,7 +7492,7 @@ void CObject::SetAuto(CAuto* automat)
-// Gestion du rang dans le fichier de définition.
+// Gestion du rang dans le fichier de d�finition.
void CObject::SetDefRank(int rank)
{
@@ -7500,7 +7514,7 @@ BOOL CObject::GetTooltipName(char* name)
}
-// Ajoute l'objet précédemment sélectionné dans la liste.
+// Ajoute l'objet pr�c�demment s�lectionn� dans la liste.
void CObject::AddDeselList(CObject* pObj)
{
@@ -7518,7 +7532,7 @@ void CObject::AddDeselList(CObject* pObj)
m_objectDeselectList[m_totalDesectList++] = pObj;
}
-// Enlève l'objet précédemment sélectionné dans la liste.
+// Enl�ve l'objet pr�c�demment s�lectionn� dans la liste.
CObject* CObject::SubDeselList()
{
@@ -7527,7 +7541,7 @@ CObject* CObject::SubDeselList()
return m_objectDeselectList[--m_totalDesectList];
}
-// Supprime un objet s'il est référencé dans la liste.
+// Supprime un objet s'il est r�f�renc� dans la liste.
void CObject::DeleteDeselList(CObject* pObj)
{
@@ -7546,7 +7560,7 @@ void CObject::DeleteDeselList(CObject* pObj)
-// Gestion de l'état du crayon du robot dessinateur.
+// Gestion de l'�tat du crayon du robot dessinateur.
BOOL CObject::RetTraceDown()
{
diff --git a/src/object.h b/src/object.h
index 785c6db..c44fc5b 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1,4 +1,18 @@
-// object.h
+// * 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 .
#ifndef _OBJECT_H_
#define _OBJECT_H_
@@ -26,8 +40,8 @@ enum D3DShadowType;
-// Le père de toutes les parties doit toujours être la partie
-// numéro zéro !
+// Le p�re de toutes les parties doit toujours �tre la partie
+// num�ro z�ro !
#define OBJECTMAXPART 40
#define MAXCRASHSPHERE 40
@@ -37,52 +51,52 @@ enum D3DShadowType;
enum ObjectType
{
- OBJECT_NULL = 0, // objet détruit
- OBJECT_FIX = 1, // décor fixe
+ OBJECT_NULL = 0, // objet d�truit
+ OBJECT_FIX = 1, // d�cor fixe
OBJECT_PORTICO = 2, // portique
OBJECT_BASE = 3, // grande base principale
OBJECT_DERRICK = 4, // derrick fixe
OBJECT_FACTORY = 5, // usine fixe
OBJECT_STATION = 6, // station de recharge
OBJECT_CONVERT = 7, // station de transformation
- OBJECT_REPAIR = 8, // réparation
- OBJECT_TOWER = 9, // tour de défense
+ OBJECT_REPAIR = 8, // r�paration
+ OBJECT_TOWER = 9, // tour de d�fense
OBJECT_NEST = 10, // nid
OBJECT_RESEARCH = 11, // centre de recherches
OBJECT_RADAR = 12, // radar
- OBJECT_ENERGY = 13, // centrale d'énergie
+ OBJECT_ENERGY = 13, // centrale d'�nergie
OBJECT_LABO = 14, // laboratoire d'analyse pour insectes
- OBJECT_NUCLEAR = 15, // centrale nucléaire
- OBJECT_START = 16, // départ
- OBJECT_END = 17, // arrivée
+ OBJECT_NUCLEAR = 15, // centrale nucl�aire
+ OBJECT_START = 16, // d�part
+ OBJECT_END = 17, // arriv�e
OBJECT_INFO = 18, // borne d'information
OBJECT_PARA = 19, // paratonnerre
OBJECT_TARGET1 = 20, // portique cible
OBJECT_TARGET2 = 21, // centre cible
OBJECT_SAFE = 22, // coffre fort
- OBJECT_HUSTON = 23, // centre de contrôle
+ OBJECT_HUSTON = 23, // centre de contr�le
OBJECT_DESTROYER = 24, // destructeur
OBJECT_FRET = 30, // transportable
OBJECT_STONE = 31, // pierre
OBJECT_URANIUM = 32, // uranium
- OBJECT_METAL = 33, // métal
+ OBJECT_METAL = 33, // m�tal
OBJECT_POWER = 34, // pile normale
OBJECT_ATOMIC = 35, // pile atomique
OBJECT_BULLET = 36, // boulet
OBJECT_BBOX = 37, // black-box
OBJECT_TNT = 38, // caisse de TNT
- OBJECT_SCRAP1 = 40, // déchet métallique
- OBJECT_SCRAP2 = 41, // déchet métallique
- OBJECT_SCRAP3 = 42, // déchet métallique
- OBJECT_SCRAP4 = 43, // déchet plastique
- OBJECT_SCRAP5 = 44, // déchet plastique
+ OBJECT_SCRAP1 = 40, // d�chet m�tallique
+ OBJECT_SCRAP2 = 41, // d�chet m�tallique
+ OBJECT_SCRAP3 = 42, // d�chet m�tallique
+ OBJECT_SCRAP4 = 43, // d�chet plastique
+ OBJECT_SCRAP5 = 44, // d�chet plastique
OBJECT_MARKPOWER = 50, // marque pile en sous-sol
OBJECT_MARKSTONE = 51, // marque minerai en sous-sol
OBJECT_MARKURANIUM = 52, // marque uranium en sous-sol
- OBJECT_MARKKEYa = 53, // marque clé en sous-sol
- OBJECT_MARKKEYb = 54, // marque clé en sous-sol
- OBJECT_MARKKEYc = 55, // marque clé en sous-sol
- OBJECT_MARKKEYd = 56, // marque clé en sous-sol
+ OBJECT_MARKKEYa = 53, // marque cl� en sous-sol
+ OBJECT_MARKKEYb = 54, // marque cl� en sous-sol
+ OBJECT_MARKKEYc = 55, // marque cl� en sous-sol
+ OBJECT_MARKKEYd = 56, // marque cl� en sous-sol
OBJECT_BOMB = 60, // bombe
OBJECT_WINFIRE = 61, // feu d'artifice
OBJECT_SHOW = 62, // montre un lieu
@@ -150,22 +164,22 @@ enum ObjectType
OBJECT_FLAGg = 262, // drapeau vert
OBJECT_FLAGy = 263, // drapeau jaune
OBJECT_FLAGv = 264, // drapeau violet
- OBJECT_KEYa = 270, // clé a
- OBJECT_KEYb = 271, // clé b
- OBJECT_KEYc = 272, // clé c
- OBJECT_KEYd = 273, // clé d
+ OBJECT_KEYa = 270, // cl� a
+ OBJECT_KEYb = 271, // cl� b
+ OBJECT_KEYc = 272, // cl� c
+ OBJECT_KEYd = 273, // cl� d
OBJECT_HUMAN = 300, // homme
OBJECT_TOTO = 301, // toto
OBJECT_TECH = 302, // technicien
- OBJECT_BARRIER0 = 400, // barrière
- OBJECT_BARRIER1 = 401, // barrière
- OBJECT_BARRIER2 = 402, // barrière
- OBJECT_BARRIER3 = 403, // barrière
- OBJECT_BARRIER4 = 404, // barrière
- OBJECT_MOTHER = 500, // mère pondeuse
+ OBJECT_BARRIER0 = 400, // barri�re
+ OBJECT_BARRIER1 = 401, // barri�re
+ OBJECT_BARRIER2 = 402, // barri�re
+ OBJECT_BARRIER3 = 403, // barri�re
+ OBJECT_BARRIER4 = 404, // barri�re
+ OBJECT_MOTHER = 500, // m�re pondeuse
OBJECT_EGG = 501, // oeuf
OBJECT_ANT = 502, // fourmi
- OBJECT_SPIDER = 503, // araignée
+ OBJECT_SPIDER = 503, // araign�e
OBJECT_BEE = 504, // abeille
OBJECT_WORM = 505, // ver
OBJECT_RUINmobilew1 = 600, // ruine 1
@@ -282,7 +296,7 @@ enum ObjectType
enum ObjectMaterial
{
- OM_METAL = 0, // métal
+ OM_METAL = 0, // m�tal
OM_PLASTIC = 1, // plastique
OM_HUMAN = 2, // cosmonaute
OM_ANIMAL = 3, // insecte
@@ -293,9 +307,9 @@ enum ObjectMaterial
typedef struct
{
char bUsed;
- int object; // numéro de l'objet dans CD3DEngine
- int parentPart; // numéro de la partie père
- int masterParti; // canal de la particule maître
+ int object; // num�ro de l'objet dans CD3DEngine
+ int parentPart; // num�ro de la partie p�re
+ int masterParti; // canal de la particule ma�tre
D3DVECTOR position;
D3DVECTOR angle;
D3DVECTOR zoom;
@@ -312,7 +326,7 @@ ObjectPart;
typedef struct
{
float wheelFront; // position X des roues avant
- float wheelBack; // position X des roues arrières
+ float wheelBack; // position X des roues arri�res
float wheelLeft; // position Z des roues gauches
float wheelRight; // position Z des roues droites
float height; // hauteur normale au-dessus du sol
@@ -672,40 +686,40 @@ protected:
ObjectType m_type; // OBJECT_*
int m_id; // identificateur unique
char m_name[50]; // nom de l'objet
- Character m_character; // caractéristiques
+ Character m_character; // caract�ristiques
int m_option; // option
- int m_partiReactor; // numéro de la particule du réacteur
- int m_shadowLight; // numéro de la lumière de l'ombre
- float m_shadowHeight; // hauteur de la lumière de l'ombre
- int m_effectLight; // numéro de la lumière des effets
- float m_effectHeight; // hauteur de la lumière des effets
- D3DVECTOR m_linVibration; // vibration linéaire
+ int m_partiReactor; // num�ro de la particule du r�acteur
+ int m_shadowLight; // num�ro de la lumi�re de l'ombre
+ float m_shadowHeight; // hauteur de la lumi�re de l'ombre
+ int m_effectLight; // num�ro de la lumi�re des effets
+ float m_effectHeight; // hauteur de la lumi�re des effets
+ D3DVECTOR m_linVibration; // vibration lin�aire
D3DVECTOR m_cirVibration; // vibration circulaire
D3DVECTOR m_inclinaison; // inclinaison
- CObject* m_power; // pile utilisée par le véhicule
- CObject* m_fret; // objet transporté
+ CObject* m_power; // pile utilis�e par le v�hicule
+ CObject* m_fret; // objet transport�
CObject* m_truck; // objet portant celui-ci
int m_truckLink; // partie
- float m_energy; // énergie contenue (si pile)
+ float m_energy; // �nergie contenue (si pile)
float m_lastEnergy;
- float m_capacity; // capacité (si pile)
+ float m_capacity; // capacit� (si pile)
float m_shield; // bouclier
float m_range; // autonomie de vol
float m_transparency; // transparence (0..1)
- int m_material; // matière (0..n)
+ int m_material; // mati�re (0..n)
float m_aTime;
float m_shotTime; // temps depuis dernier coup
- BOOL m_bVirusMode; // virus enclanché/déclanché
+ BOOL m_bVirusMode; // virus enclanch�/d�clanch�
float m_virusTime; // temps de vie du virus
float m_lastVirusParticule;
float m_lastParticule;
BOOL m_bHilite;
- BOOL m_bSelect; // objet sélectionné
- BOOL m_bSelectable; // objet sélectionnable
- BOOL m_bCheckToken; // objet avec tokens vérifiés
- BOOL m_bVisible; // objet actif mais indétectable
+ BOOL m_bSelect; // objet s�lectionn�
+ BOOL m_bSelectable; // objet s�lectionnable
+ BOOL m_bCheckToken; // objet avec tokens v�rifi�s
+ BOOL m_bVisible; // objet actif mais ind�tectable
BOOL m_bEnable; // objet mort
- BOOL m_bProxyActivate; // objet activé si proche
+ BOOL m_bProxyActivate; // objet activ� si proche
BOOL m_bGadget; // objet non indispensable
BOOL m_bLock;
BOOL m_bExplo;
@@ -713,8 +727,8 @@ protected:
BOOL m_bBurn;
BOOL m_bDead;
BOOL m_bFlat;
- BOOL m_bTrainer; // véhicule d'entraînement (sans télécommande)
- BOOL m_bToy; // jouet à clé
+ BOOL m_bTrainer; // v�hicule d'entra�nement (sans t�l�commande)
+ BOOL m_bToy; // jouet � cl�
BOOL m_bManual; // commandes manuelles (Scribbler)
BOOL m_bFixed;
BOOL m_bClip;
@@ -730,7 +744,7 @@ protected:
float m_proxyDistance;
float m_param;
- int m_crashSphereUsed; // nb de sphères utilisées
+ int m_crashSphereUsed; // nb de sph�res utilis�es
D3DVECTOR m_crashSpherePos[MAXCRASHSPHERE];
float m_crashSphereRadius[MAXCRASHSPHERE];
float m_crashSphereHardness[MAXCRASHSPHERE];
diff --git a/src/particule.cpp b/src/particule.cpp
index e98f249..7e7864e 100644
--- a/src/particule.cpp
+++ b/src/particule.cpp
@@ -1,4 +1,18 @@
-// particule.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 @@
-// Vérifie si un objet est destructible, mais pas un ennemi.
+// V�rifie si un objet est destructible, mais pas un ennemi.
BOOL IsSoft(ObjectType type)
{
@@ -79,10 +93,10 @@ BOOL IsSoft(ObjectType type)
type == OBJECT_ENERGY ||
type == OBJECT_LABO ||
type == OBJECT_NUCLEAR ||
- type == OBJECT_PARA ); // bâtiment ?
+ type == OBJECT_PARA ); // b�timent ?
}
-// Vérifie si un objet est un ennemi destructible.
+// V�rifie si un objet est un ennemi destructible.
BOOL IsAlien(ObjectType type)
{
@@ -99,7 +113,7 @@ BOOL IsAlien(ObjectType type)
type == OBJECT_TEEN31 );
}
-// Retourne le facteur d'aténumation pour les tirs amis.
+// Retourne le facteur d'at�numation pour les tirs amis.
float RetDecay(ObjectType type)
{
@@ -213,7 +227,7 @@ void CParticule::FlushParticule(int sheet)
// Construit le nom de fichier de l'effet.
-// effectNN.tga, avec NN = numéro
+// effectNN.tga, avec NN = num�ro
void NameParticule(char *buffer, int num)
{
@@ -229,8 +243,8 @@ void NameParticule(char *buffer, int num)
}
-// Créé une nouvelle particule.
-// Retourne le canal de la particule crée ou -1 en cas d'erreur.
+// Cr�� une nouvelle particule.
+// Retourne le canal de la particule cr�e ou -1 en cas d'erreur.
int CParticule::CreateParticule(D3DVECTOR pos, D3DVECTOR speed, FPOINT dim,
ParticuleType type,
@@ -434,8 +448,8 @@ int CParticule::CreateParticule(D3DVECTOR pos, D3DVECTOR speed, FPOINT dim,
return -1;
}
-// Créé une nouvelle particule triangulaire (débris).
-// Retourne le canal de la particule crée ou -1 en cas d'erreur.
+// Cr�� une nouvelle particule triangulaire (d�bris).
+// Retourne le canal de la particule cr�e ou -1 en cas d'erreur.
int CParticule::CreateFrag(D3DVECTOR pos, D3DVECTOR speed,
D3DTriangle *triangle,
@@ -542,8 +556,8 @@ int CParticule::CreateFrag(D3DVECTOR pos, D3DVECTOR speed,
return -1;
}
-// Créé une nouvelle particule étant une partie d'objet.
-// Retourne le canal de la particule crée ou -1 en cas d'erreur.
+// Cr�� une nouvelle particule �tant une partie d'objet.
+// Retourne le canal de la particule cr�e ou -1 en cas d'erreur.
int CParticule::CreatePart(D3DVECTOR pos, D3DVECTOR speed,
ParticuleType type,
@@ -594,8 +608,8 @@ int CParticule::CreatePart(D3DVECTOR pos, D3DVECTOR speed,
return -1;
}
-// Créé une nouvelle particule linéaire (rayon).
-// Retourne le canal de la particule crée ou -1 en cas d'erreur.
+// Cr�� une nouvelle particule lin�aire (rayon).
+// Retourne le canal de la particule cr�e ou -1 en cas d'erreur.
int CParticule::CreateRay(D3DVECTOR pos, D3DVECTOR goal,
ParticuleType type, FPOINT dim,
@@ -657,8 +671,8 @@ int CParticule::CreateRay(D3DVECTOR pos, D3DVECTOR goal,
return -1;
}
-// Crée une particule avec une traînée.
-// "length" est la durée de la queue de la traînée (en secondes) !
+// Cr�e une particule avec une tra�n�e.
+// "length" est la dur�e de la queue de la tra�n�e (en secondes) !
int CParticule::CreateTrack(D3DVECTOR pos, D3DVECTOR speed, FPOINT dim,
ParticuleType type, float duration, float mass,
@@ -666,11 +680,11 @@ int CParticule::CreateTrack(D3DVECTOR pos, D3DVECTOR speed, FPOINT dim,
{
int channel, rank, i;
- // Crée la particule normale.
+ // Cr�e la particule normale.
channel = CreateParticule(pos, speed, dim, type, duration, mass, 0.0f, 0);
if ( channel == -1 ) return -1;
- // Cherche une traînée libre.
+ // Cherche une tra�n�e libre.
for ( i=0 ; i<MAXTRACK ; i++ )
{
if ( !m_track[i].bUsed ) // libre ?
@@ -694,7 +708,7 @@ int CParticule::CreateTrack(D3DVECTOR pos, D3DVECTOR speed, FPOINT dim,
return channel;
}
-// Crée une trace de pneu.
+// Cr�e une trace de pneu.
void CParticule::CreateWheelTrace(const D3DVECTOR &p1, const D3DVECTOR &p2,
const D3DVECTOR &p3, const D3DVECTOR &p4,
@@ -742,8 +756,8 @@ void CParticule::CreateWheelTrace(const D3DVECTOR &p1, const D3DVECTOR &p2,
}
-// Check un numéro de canal.
-// Adapte le canal pour qu'il puisse être utilisé comme offset
+// Check un num�ro de canal.
+// Adapte le canal pour qu'il puisse �tre utilis� comme offset
// dans m_particule.
BOOL CParticule::CheckChannel(int &channel)
@@ -776,7 +790,7 @@ BOOL CParticule::CheckChannel(int &channel)
return TRUE;
}
-// Supprime une particule d'après son rang.
+// Supprime une particule d'apr�s son rang.
void CParticule::DeleteRank(int rank)
{
@@ -788,15 +802,15 @@ void CParticule::DeleteRank(int rank)
}
i = m_particule[rank].trackRank;
- if ( i != -1 ) // traînée associée ?
+ if ( i != -1 ) // tra�n�e associ�e ?
{
- m_track[i].bUsed = FALSE; // libère la traînée
+ m_track[i].bUsed = FALSE; // lib�re la tra�n�e
}
m_particule[rank].bUsed = FALSE;
}
-// Supprime toutes les particules d'un type donné.
+// Supprime toutes les particules d'un type donn�.
void CParticule::DeleteParticule(ParticuleType type)
{
@@ -811,7 +825,7 @@ void CParticule::DeleteParticule(ParticuleType type)
}
}
-// Supprime une particule d'après son canal.
+// Supprime une particule d'apr�s son canal.
void CParticule::DeleteParticule(int channel)
{
@@ -825,16 +839,16 @@ void CParticule::DeleteParticule(int channel)
}
i = m_particule[channel].trackRank;
- if ( i != -1 ) // traînée associée ?
+ if ( i != -1 ) // tra�n�e associ�e ?
{
- m_track[i].bUsed = FALSE; // libère la traînée
+ m_track[i].bUsed = FALSE; // lib�re la tra�n�e
}
m_particule[channel].bUsed = FALSE;
}
-// Spécifie l'objet auquel la particule est liée.
+// Sp�cifie l'objet auquel la particule est li�e.
void CParticule::SetObjectLink(int channel, CObject *object)
{
@@ -842,7 +856,7 @@ void CParticule::SetObjectLink(int channel, CObject *object)
m_particule[channel].objLink = object;
}
-// Spécifie l'objet père qui a créé la particule.
+// Sp�cifie l'objet p�re qui a cr�� la particule.
void CParticule::SetObjectFather(int channel, CObject *object)
{
@@ -909,14 +923,14 @@ BOOL CParticule::GetPosition(int channel, D3DVECTOR &pos)
}
-// Indique si une feuille évolue ou non.
+// Indique si une feuille �volue ou non.
void CParticule::SetFrameUpdate(int sheet, BOOL bUpdate)
{
m_bFrameUpdate[sheet] = bUpdate;
}
-// Fait évoluer toutes les particules.
+// Fait �voluer toutes les particules.
void CParticule::FrameParticule(float rTime)
{
@@ -975,7 +989,7 @@ void CParticule::FrameParticule(float rTime)
progress = (m_particule[i].time-m_particule[i].phaseTime)/m_particule[i].duration;
- // Gère les particules avec masse qui rebondissent.
+ // G�re les particules avec masse qui rebondissent.
if ( m_particule[i].mass != 0.0f &&
m_particule[i].type != PARTIQUARTZ )
{
@@ -1013,7 +1027,7 @@ void CParticule::FrameParticule(float rTime)
m_particule[i].speed.z *= 0.4f;
m_particule[i].bounce ++; // un choc de plus
}
- else // disparaît après 3 rebonds ?
+ else // dispara�t apr�s 3 rebonds ?
{
if ( m_particule[i].pos.y < h-10.0f ||
m_particule[i].time >= 20.0f )
@@ -1025,9 +1039,9 @@ void CParticule::FrameParticule(float rTime)
}
}
- // Gère la traînée associée.
+ // G�re la tra�n�e associ�e.
r = m_particule[i].trackRank;
- if ( r != -1 ) // traînée existe ?
+ if ( r != -1 ) // tra�n�e existe ?
{
if ( TrackMove(r, m_particule[i].pos, progress) )
{
@@ -1058,7 +1072,7 @@ void CParticule::FrameParticule(float rTime)
ti.y = ts.y+0.125f;
}
- if ( m_particule[i].type == PARTITRACK3 ) // araignée ?
+ if ( m_particule[i].type == PARTITRACK3 ) // araign�e ?
{
m_particule[i].zoom = 1.0f-(m_particule[i].time-m_particule[i].duration);
@@ -1133,7 +1147,7 @@ void CParticule::FrameParticule(float rTime)
ti.y = ts.y+0.125f;
}
- if ( m_particule[i].type == PARTITRACK12 ) // traînée réacteur ?
+ if ( m_particule[i].type == PARTITRACK12 ) // tra�n�e r�acteur ?
{
m_particule[i].zoom = 1.0f;
@@ -1399,7 +1413,7 @@ void CParticule::FrameParticule(float rTime)
m_particule[i].goal = m_particule[i].pos;
if ( object != 0 )
{
- if ( object->RetShieldRadius() > 0.0f ) // protégé par bouclier ?
+ if ( object->RetShieldRadius() > 0.0f ) // prot�g� par bouclier ?
{
CreateParticule(m_particule[i].pos, D3DVECTOR(0.0f, 0.0f, 0.0f), FPOINT(6.0f, 6.0f), PARTIGUNDEL, 2.0f);
if ( m_lastTimeGunDel > 0.2f )
@@ -1416,7 +1430,7 @@ void CParticule::FrameParticule(float rTime)
{
Play(SOUND_TOUCH, m_particule[i].pos, 1.0f);
}
- object->ExploObject(EXPLO_BOUM, 0.0f); // démarre explosion
+ object->ExploObject(EXPLO_BOUM, 0.0f); // d�marre explosion
}
}
}
@@ -1430,7 +1444,7 @@ void CParticule::FrameParticule(float rTime)
ti.y = ts.y+0.125f;
}
- if ( m_particule[i].type == PARTIGUN3 ) // suicide araignée ?
+ if ( m_particule[i].type == PARTIGUN3 ) // suicide araign�e ?
{
if ( progress >= 1.0f )
{
@@ -1458,7 +1472,7 @@ void CParticule::FrameParticule(float rTime)
}
else
{
- object->ExploObject(EXPLO_BURN, 1.0f); // démarre explosion
+ object->ExploObject(EXPLO_BURN, 1.0f); // d�marre explosion
}
}
}
@@ -1762,8 +1776,8 @@ void CParticule::FrameParticule(float rTime)
ti.y = ts.y+0.25f;
}
- // Diminue l'intensité si la caméra est presque à la même
- // hauteur (nappe de brouillard à hauteur des yeux).
+ // Diminue l'intensit� si la cam�ra est presque � la m�me
+ // hauteur (nappe de brouillard � hauteur des yeux).
if ( m_particule[i].type >= PARTIFOG0 &&
m_particule[i].type <= PARTIFOG9 )
{
@@ -2729,8 +2743,8 @@ void CParticule::FrameParticule(float rTime)
}
-// Déplace une traînée.
-// Retourne TRUE lorsque la traînée est terminée.
+// D�place une tra�n�e.
+// Retourne TRUE lorsque la tra�n�e est termin�e.
BOOL CParticule::TrackMove(int i, D3DVECTOR pos, float progress)
{
@@ -2767,7 +2781,7 @@ BOOL CParticule::TrackMove(int i, D3DVECTOR pos, float progress)
//? m_track[i].intensity = 1.0f;
m_track[i].intensity = 1.0f-progress;
}
- else // mort lente de la traînée ?
+ else // mort lente de la tra�n�e ?
{
//? m_track[i].intensity = 1.0f-(progress-1.0f)/(m_track[i].step*MAXTRACKLEN);
m_track[i].intensity = 0.0f;
@@ -2776,7 +2790,7 @@ BOOL CParticule::TrackMove(int i, D3DVECTOR pos, float progress)
return (m_track[i].intensity <= 0.0f);
}
-// Dessine une traînée.
+// Dessine une tra�n�e.
void CParticule::TrackDraw(int i, ParticuleType type)
{
@@ -2787,7 +2801,7 @@ void CParticule::TrackDraw(int i, ParticuleType type)
float lTotal, f1, f2, a;
int counter, h;
- // Calcule la longueur totale mémorisée.
+ // Calcule la longueur totale m�moris�e.
lTotal = 0.0f;
h = m_track[i].head;
for ( counter=0 ; counter<m_track[i].used-1 ; counter++ )
@@ -2813,7 +2827,7 @@ void CParticule::TrackDraw(int i, ParticuleType type)
texSup.x = 95.5f/256.0f;
texSup.y = 14.0f/256.0f; // bleu
}
- if ( type == PARTITRACK3 ) // araignée ?
+ if ( type == PARTITRACK3 ) // araign�e ?
{
texInf.x = 64.5f/256.0f;
texInf.y = 5.0f/256.0f;
@@ -2825,14 +2839,14 @@ void CParticule::TrackDraw(int i, ParticuleType type)
texInf.x = 64.5f/256.0f;
texInf.y = 9.0f/256.0f;
texSup.x = 95.5f/256.0f;
- texSup.y = 10.0f/256.0f; // vert foncé
+ texSup.y = 10.0f/256.0f; // vert fonc�
}
if ( type == PARTITRACK5 ) // derrick ?
{
texInf.x = 64.5f/256.0f;
texInf.y = 29.0f/256.0f;
texSup.x = 95.5f/256.0f;
- texSup.y = 30.0f/256.0f; // brun foncé
+ texSup.y = 30.0f/256.0f; // brun fonc�
}
if ( type == PARTITRACK6 ) // reset in/out ?
{
@@ -2876,7 +2890,7 @@ void CParticule::TrackDraw(int i, ParticuleType type)
texSup.x = 95.5f/256.0f;
texSup.y = 22.0f/256.0f; // orange
}
- if ( type == PARTITRACK12 ) // traînée réacteur ?
+ if ( type == PARTITRACK12 ) // tra�n�e r�acteur ?
{
texInf.x = 64.5f/256.0f;
texInf.y = 21.0f/256.0f;
@@ -3428,7 +3442,7 @@ void CParticule::DrawParticuleRay(int i)
}
}
-// Dessine une particule sphérique.
+// Dessine une particule sph�rique.
void CParticule::DrawParticuleSphere(int i)
{
@@ -3589,17 +3603,17 @@ void CParticule::DrawParticuleCylinder(int i)
if ( progress <= 0.5f )
{
p1 = progress/0.5f; // avant
- p2 = 0.0f; // arrière
+ p2 = 0.0f; // arri�re
}
else
{
p1 = 1.0f; // avant
- p2 = (progress-0.5f)/0.5f; // arrière
+ p2 = (progress-0.5f)/0.5f; // arri�re
ts.y += (ti.y-ts.y)*p2;
}
#else
p1 = progress; // avant
- p2 = powf(progress, 5.0f); // arrière
+ p2 = powf(progress, 5.0f); // arri�re
#endif
for ( ring=0 ; ring<=numRings ; ring++ )
@@ -3613,7 +3627,7 @@ void CParticule::DrawParticuleCylinder(int i)
j = 0;
for ( ring=0 ; ring<numRings ; ring++ )
{
- r0 = 1.0f*d[ring+0]; // rayon à la base
+ r0 = 1.0f*d[ring+0]; // rayon � la base
r1 = 1.0f*d[ring+1]; // rayon en haut
v0.y = 1.0f*h[ring+0]; // bas
v1.y = 1.0f*h[ring+1]; // haut
@@ -3744,12 +3758,12 @@ void CParticule::DrawParticuleWheel(int i)
ts.x = 56.0f/256.0f;
ts.y = 232.0f/256.0f;
}
- else if ( m_wheelTrace[i].type == PARTITRACE16 ) // trace au sol flèche noire ?
+ else if ( m_wheelTrace[i].type == PARTITRACE16 ) // trace au sol fl�che noire ?
{
ts.x = 160.0f/256.0f;
ts.y = 224.0f/256.0f;
}
- else if ( m_wheelTrace[i].type == PARTITRACE17 ) // trace au sol flèche rouge ?
+ else if ( m_wheelTrace[i].type == PARTITRACE17 ) // trace au sol fl�che rouge ?
{
ts.x = 176.0f/256.0f;
ts.y = 224.0f/256.0f;
@@ -3803,7 +3817,7 @@ void CParticule::DrawParticule(int sheet)
//? m_pD3DDevice->SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE);
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, FALSE);
- // Dessine les particules à base de triangles.
+ // Dessine les particules � base de triangles.
if ( m_totalInterface[0][sheet] > 0 )
{
for ( i=0 ; i<MAXPARTICULE ; i++ )
@@ -3819,7 +3833,7 @@ void CParticule::DrawParticule(int sheet)
}
}
- // Dessines les particules à base de carrés calculés.
+ // Dessines les particules � base de carr�s calcul�s.
m_pD3DDevice->SetRenderState(D3DRENDERSTATE_LIGHTING, FALSE);
ZeroMemory( &mat, sizeof(D3DMATERIAL7) );
@@ -3850,7 +3864,7 @@ void CParticule::DrawParticule(int sheet)
}
//? for ( t=1 ; t<MAXPARTITYPE ; t++ )
- for ( t=MAXPARTITYPE-1 ; t>=1 ; t-- ) // noir derrière !
+ for ( t=MAXPARTITYPE-1 ; t>=1 ; t-- ) // noir derri�re !
{
if ( m_totalInterface[t][sheet] == 0 ) continue;
@@ -3877,7 +3891,7 @@ void CParticule::DrawParticule(int sheet)
if ( r != -1 )
{
m_engine->SetState(state);
- TrackDraw(r, m_particule[i].type); // dessine la traînée
+ TrackDraw(r, m_particule[i].type); // dessine la tra�n�e
if ( !m_track[r].bDrawParticule ) continue;
}
@@ -3900,7 +3914,7 @@ void CParticule::DrawParticule(int sheet)
DrawParticuleFog(i);
}
else if ( m_particule[i].type >= PARTISPHERE0 &&
- m_particule[i].type <= PARTISPHERE9 ) // sphère ?
+ m_particule[i].type <= PARTISPHERE9 ) // sph�re ?
{
DrawParticuleSphere(i);
}
@@ -3940,7 +3954,7 @@ CObject* CParticule::SearchObjectGun(D3DVECTOR old, D3DVECTOR pos,
min = 5.0f;
if ( type == PARTIGUN2 ) min = 2.0f; // tir insecte ?
- if ( type == PARTIGUN3 ) min = 3.0f; // suicide araignée ?
+ if ( type == PARTIGUN3 ) min = 3.0f; // suicide araign�e ?
box1 = old;
box2 = pos;
@@ -3971,12 +3985,12 @@ CObject* CParticule::SearchObjectGun(D3DVECTOR old, D3DVECTOR pos,
if ( type == PARTIGUN1 ) // tir fireball ?
{
if ( oType == OBJECT_MOTHER ) continue;
- if ( bHimself ) // dégâts à soi-même ?
+ if ( bHimself ) // d�g�ts � soi-m�me ?
{
if ( !IsAlien(oType) &&
!IsSoft(oType) ) continue;
}
- else // dégats seulement aux ennemis ?
+ else // d�gats seulement aux ennemis ?
{
if ( !IsAlien(oType) ) continue;
}
@@ -3985,31 +3999,31 @@ CObject* CParticule::SearchObjectGun(D3DVECTOR old, D3DVECTOR pos,
{
if ( !IsSoft(oType) ) continue;
}
- else if ( type == PARTIGUN3 ) // suicide araignée ?
+ else if ( type == PARTIGUN3 ) // suicide araign�e ?
{
if ( !IsSoft(oType) ) continue;
}
else if ( type == PARTIGUN4 ) // tir orgaball ?
{
if ( oType == OBJECT_MOTHER ) continue;
- if ( bHimself ) // dégâts à soi-même ?
+ if ( bHimself ) // d�g�ts � soi-m�me ?
{
if ( !IsAlien(oType) &&
!IsSoft(oType) ) continue;
}
- else // dégats seulement aux ennemis ?
+ else // d�gats seulement aux ennemis ?
{
if ( !IsAlien(oType) ) continue;
}
}
else if ( type == PARTITRACK11 ) // tir phazer ?
{
- if ( bHimself ) // dégâts à soi-même ?
+ if ( bHimself ) // d�g�ts � soi-m�me ?
{
if ( !IsAlien(oType) &&
!IsSoft(oType) ) continue;
}
- else // dégats seulement aux ennemis ?
+ else // d�gats seulement aux ennemis ?
{
if ( !IsAlien(oType) ) continue;
}
@@ -4022,9 +4036,9 @@ CObject* CParticule::SearchObjectGun(D3DVECTOR old, D3DVECTOR pos,
oPos = pObj->RetPosition(0);
if ( type == PARTIGUN2 || // tir insecte ?
- type == PARTIGUN3 ) // suicide araignée ?
+ type == PARTIGUN3 ) // suicide araign�e ?
{
- // Test si la balle est entrée dans la sphère d'un bouclier.
+ // Test si la balle est entr�e dans la sph�re d'un bouclier.
shieldRadius = pObj->RetShieldRadius();
if ( shieldRadius > 0.0f )
{
@@ -4038,19 +4052,19 @@ CObject* CParticule::SearchObjectGun(D3DVECTOR old, D3DVECTOR pos,
}
if ( bShield ) continue;
- // Test au centre de l'objet, ce qui est nécessaire pour
- // les objets qui n'ont pas de sphère au centre (station).
+ // Test au centre de l'objet, ce qui est n�cessaire pour
+ // les objets qui n'ont pas de sph�re au centre (station).
dist = Length(oPos, pos)-4.0f;
if ( dist < min )
{
pBest = pObj;
}
- // Test avec toutes les sphères de l'objet.
+ // Test avec toutes les sph�res de l'objet.
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
{
- if ( oPos.x+oRadius < box1.x || oPos.x-oRadius > box2.x || // hors de la boîte ?
+ if ( oPos.x+oRadius < box1.x || oPos.x-oRadius > box2.x || // hors de la bo�te ?
oPos.y+oRadius < box1.y || oPos.y-oRadius > box2.y ||
oPos.z+oRadius < box1.z || oPos.z-oRadius > box2.z ) continue;
@@ -4118,7 +4132,7 @@ CObject* CParticule::SearchObjectRay(D3DVECTOR pos, D3DVECTOR goal,
oPos = pObj->RetPosition(0);
- if ( oPos.x < box1.x || oPos.x > box2.x || // hors de la boîte ?
+ if ( oPos.x < box1.x || oPos.x > box2.x || // hors de la bo�te ?
oPos.y < box1.y || oPos.y > box2.y ||
oPos.z < box1.z || oPos.z > box2.z ) continue;
diff --git a/src/particule.h b/src/particule.h
index 34916e5..771b87d 100644
--- a/src/particule.h
+++ b/src/particule.h
@@ -1,4 +1,18 @@
-// particule.h
+// * 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 .
#ifndef _PARTICULE_H_
#define _PARTICULE_H_
@@ -41,28 +55,28 @@ enum ParticuleType
{
PARTIEXPLOT = 1, // explosion technique
PARTIEXPLOO = 2, // explosion organique
- PARTIMOTOR = 3, // gaz d'échappement du moteur
+ PARTIMOTOR = 3, // gaz d'�chappement du moteur
PARTIGLINT = 4, // reflet
- PARTIBLITZ = 5, // éclair recharge batterie
- PARTICRASH = 6, // poussière après chute
- PARTIGAS = 7, // gaz du réacteur
- PARTIFIRE = 9, // boule de feu qui rétricit
+ PARTIBLITZ = 5, // �clair recharge batterie
+ PARTICRASH = 6, // poussi�re apr�s chute
+ PARTIGAS = 7, // gaz du r�acteur
+ PARTIFIRE = 9, // boule de feu qui r�tricit
PARTIFIREZ = 10, // boule de feu qui grandit
PARTIBLUE = 11, // boule bleu
- PARTISELY = 12, // sélection jaune
- PARTISELR = 13, // sélection rouge
+ PARTISELY = 12, // s�lection jaune
+ PARTISELR = 13, // s�lection rouge
PARTIGUN1 = 18, // balle 1 (fireball)
PARTIGUN2 = 19, // balle 2 (fourmi)
- PARTIGUN3 = 20, // balle 3 (araignée)
+ PARTIGUN3 = 20, // balle 3 (araign�e)
PARTIGUN4 = 21, // balle 4 (orgaball)
PARTIFRAG = 22, // fragment triangulaire
- PARTIQUEUE = 23, // queue enflammée
- PARTIORGANIC1 = 24, // boule organique mère
+ PARTIQUEUE = 23, // queue enflamm�e
+ PARTIORGANIC1 = 24, // boule organique m�re
PARTIORGANIC2 = 25, // boule organique fille
- PARTISMOKE1 = 26, // fumée noire
- PARTISMOKE2 = 27, // fumée noire
- PARTISMOKE3 = 28, // fumée noire
- PARTISMOKE4 = 29, // fumée noire
+ PARTISMOKE1 = 26, // fum�e noire
+ PARTISMOKE2 = 27, // fum�e noire
+ PARTISMOKE3 = 28, // fum�e noire
+ PARTISMOKE4 = 29, // fum�e noire
PARTIBLOOD = 30, // sang homme
PARTIBLOODM = 31, // sang pondeuse
PARTIVAPOR = 32, // vapeur
@@ -83,57 +97,57 @@ enum ParticuleType
PARTIFLAME = 47, // flamme
PARTIBUBBLE = 48, // bubble
PARTIFLIC = 49, // rond dans l'eau
- PARTIEJECT = 50, // éjection du réacteur
- PARTISCRAPS = 51, // déchets du réacteur
- PARTITOTO = 52, // réacteur de toto
+ PARTIEJECT = 50, // �jection du r�acteur
+ PARTISCRAPS = 51, // d�chets du r�acteur
+ PARTITOTO = 52, // r�acteur de toto
PARTIERROR = 53, // toto dit non
PARTIWARNING = 54, // toto dit bof
PARTIINFO = 54, // toto dit oui
PARTIQUARTZ = 55, // reflet quartz
- PARTISPHERE0 = 56, // sphère d'explosion
- PARTISPHERE1 = 57, // sphère d'énergie
- PARTISPHERE2 = 58, // sphère d'analyse
- PARTISPHERE3 = 59, // sphère de bouclier
- PARTISPHERE4 = 60, // sphère d'information (emette)
- PARTISPHERE5 = 61, // sphère végétale (gravity root)
- PARTISPHERE6 = 62, // sphère d'information (receive)
- PARTISPHERE7 = 63, // sphère
- PARTISPHERE8 = 64, // sphère
- PARTISPHERE9 = 65, // sphère
+ PARTISPHERE0 = 56, // sph�re d'explosion
+ PARTISPHERE1 = 57, // sph�re d'�nergie
+ PARTISPHERE2 = 58, // sph�re d'analyse
+ PARTISPHERE3 = 59, // sph�re de bouclier
+ PARTISPHERE4 = 60, // sph�re d'information (emette)
+ PARTISPHERE5 = 61, // sph�re v�g�tale (gravity root)
+ PARTISPHERE6 = 62, // sph�re d'information (receive)
+ PARTISPHERE7 = 63, // sph�re
+ PARTISPHERE8 = 64, // sph�re
+ PARTISPHERE9 = 65, // sph�re
PARTIGUNDEL = 66, // destruction balle par bouclier
PARTIPART = 67, // partie d'objet
- PARTITRACK1 = 68, // traînée 1
- PARTITRACK2 = 69, // traînée 2
- PARTITRACK3 = 70, // traînée 3
- PARTITRACK4 = 71, // traînée 4
- PARTITRACK5 = 72, // traînée 5
- PARTITRACK6 = 73, // traînée 6
- PARTITRACK7 = 74, // traînée 7
- PARTITRACK8 = 75, // traînée 8
- PARTITRACK9 = 76, // traînée 9
- PARTITRACK10 = 77, // traînée 10
- PARTITRACK11 = 78, // traînée 11
- PARTITRACK12 = 79, // traînée 12
- PARTITRACK13 = 80, // traînée 13
- PARTITRACK14 = 81, // traînée 14
- PARTITRACK15 = 82, // traînée 15
- PARTITRACK16 = 83, // traînée 16
- PARTITRACK17 = 84, // traînée 17
- PARTITRACK18 = 85, // traînée 18
- PARTITRACK19 = 86, // traînée 19
- PARTITRACK20 = 87, // traînée 20
+ PARTITRACK1 = 68, // tra�n�e 1
+ PARTITRACK2 = 69, // tra�n�e 2
+ PARTITRACK3 = 70, // tra�n�e 3
+ PARTITRACK4 = 71, // tra�n�e 4
+ PARTITRACK5 = 72, // tra�n�e 5
+ PARTITRACK6 = 73, // tra�n�e 6
+ PARTITRACK7 = 74, // tra�n�e 7
+ PARTITRACK8 = 75, // tra�n�e 8
+ PARTITRACK9 = 76, // tra�n�e 9
+ PARTITRACK10 = 77, // tra�n�e 10
+ PARTITRACK11 = 78, // tra�n�e 11
+ PARTITRACK12 = 79, // tra�n�e 12
+ PARTITRACK13 = 80, // tra�n�e 13
+ PARTITRACK14 = 81, // tra�n�e 14
+ PARTITRACK15 = 82, // tra�n�e 15
+ PARTITRACK16 = 83, // tra�n�e 16
+ PARTITRACK17 = 84, // tra�n�e 17
+ PARTITRACK18 = 85, // tra�n�e 18
+ PARTITRACK19 = 86, // tra�n�e 19
+ PARTITRACK20 = 87, // tra�n�e 20
PARTIGLINTb = 88, // reflet bleu
PARTIGLINTr = 89, // reflet rouge
- PARTILENS1 = 90, // éclat 1 (orange)
- PARTILENS2 = 91, // éclat 2 (jaune)
- PARTILENS3 = 92, // éclat 3 (rouge)
- PARTILENS4 = 93, // éclat 4 (violet)
+ PARTILENS1 = 90, // �clat 1 (orange)
+ PARTILENS2 = 91, // �clat 2 (jaune)
+ PARTILENS3 = 92, // �clat 3 (rouge)
+ PARTILENS4 = 93, // �clat 4 (violet)
PARTICONTROL = 94, // reflet sur bouton
PARTISHOW = 95, // montre un lieu
PARTICHOC = 96, // onde de choc
PARTIGFLAT = 97, // montre si le sol est plat
PARTIRECOVER = 98, // boule bleu pour recycleur
- PARTIROOT = 100, // fumée gravity root
+ PARTIROOT = 100, // fum�e gravity root
PARTIPLOUF0 = 101, // plouf
PARTIPLOUF1 = 102, // plouf
PARTIPLOUF2 = 103, // plouf
@@ -188,7 +202,7 @@ enum ParticulePhase
typedef struct
{
- char bUsed; // TRUE -> particule utilisée
+ char bUsed; // TRUE -> particule utilis�e
char bRay; // TRUE -> rayon avec but
unsigned short uniqueStamp;// marque unique
short sheet; // feuille (0..n)
@@ -196,38 +210,38 @@ typedef struct
ParticulePhase phase; // phase PARPH*
float mass; // masse de la particule (pour les rebonds)
float weight; // poids de la particule (pour le bruit)
- float duration; // durée de vie
- D3DVECTOR pos; // position absolue (relative si objet lié)
+ float duration; // dur�e de vie
+ D3DVECTOR pos; // position absolue (relative si objet li�)
D3DVECTOR goal; // position but (si bRay)
- D3DVECTOR speed; // vitesses de déplacement
+ D3DVECTOR speed; // vitesses de d�placement
float windSensitivity;
short bounce; // nb de rebonds
FPOINT dim; // dimensions du rectangle
float zoom; // zoom (0..1)
float angle; // angle de rotation
- float intensity; // intensité
- FPOINT texSup; // coordonnée texture supérieure
- FPOINT texInf; // cooddonnée texture inférieure
- float time; // âge de la particule (0..n)
- float phaseTime; // âge au début de la phase
+ float intensity; // intensit�
+ FPOINT texSup; // coordonn�e texture sup�rieure
+ FPOINT texInf; // cooddonn�e texture inf�rieure
+ float time; // �ge de la particule (0..n)
+ float phaseTime; // �ge au d�but de la phase
float testTime; // temps depuis dernier test
- CObject* objLink; // objet père (pour réacteur par exemple)
- CObject* objFather; // objet père (pour réacteur par exemple)
+ CObject* objLink; // objet p�re (pour r�acteur par exemple)
+ CObject* objFather; // objet p�re (pour r�acteur par exemple)
short objRank; // rang de l'objet, ou -1
- short trackRank; // rang de la traînée
+ short trackRank; // rang de la tra�n�e
}
Particule;
typedef struct
{
- char bUsed; // TRUE -> traînée utilisée
+ char bUsed; // TRUE -> tra�n�e utilis�e
char bDrawParticule;
- float step; // durée d'un pas
- float last; // progression dernier pas mémorisé
- float intensity; // intensité au départ (0..1)
+ float step; // dur�e d'un pas
+ float last; // progression dernier pas m�moris�
+ float intensity; // intensit� au d�part (0..1)
float width; // largeur queue
int used; // nb de positions dans "pos"
- int head; // index tête d'écriture
+ int head; // index t�te d'�criture
D3DVECTOR pos[MAXTRACKLEN];
float len[MAXTRACKLEN];
}
@@ -237,7 +251,7 @@ typedef struct
{
ParticuleType type; // type PARTI*
D3DVECTOR pos[4]; // positions rectangle
- float startTime; // début de vie
+ float startTime; // d�but de vie
}
WheelTrace;
diff --git a/src/physics.cpp b/src/physics.cpp
index ad28b65..b4a0b6a 100644
--- a/src/physics.cpp
+++ b/src/physics.cpp
@@ -1,4 +1,18 @@
-// physics.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
@@ -59,7 +73,7 @@ CPhysics::CPhysics(CInstanceManager* iMan, CObject* object)
m_motion = 0;
m_type = TYPE_ROLLING;
- m_gravity = 9.81f; // gravité terrestre par défaut
+ m_gravity = 9.81f; // gravit� terrestre par d�faut
m_time = 0.0f;
m_timeUnderWater = 0.0f;
m_motorSpeed = D3DVECTOR(0.0f, 0.0f, 0.0f);
@@ -111,7 +125,7 @@ CPhysics::~CPhysics()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CPhysics::DeleteObject(BOOL bAll)
{
@@ -155,7 +169,7 @@ PhysicsType CPhysics::RetType()
-// Sauve tous les paramètres de l'objet.
+// Sauve tous les param�tres de l'objet.
BOOL CPhysics::Write(char *line)
{
@@ -176,7 +190,7 @@ BOOL CPhysics::Write(char *line)
return TRUE;
}
-// Restitue tous les paramètres de l'objet.
+// Restitue tous les param�tres de l'objet.
BOOL CPhysics::Read(char *line)
{
@@ -193,7 +207,7 @@ BOOL CPhysics::Read(char *line)
-// Gestion de la force de gravité.
+// Gestion de la force de gravit�.
void CPhysics::SetGravity(float value)
{
@@ -214,7 +228,7 @@ float CPhysics::RetFloorHeight()
}
-// Gestion de l'état du moteur.
+// Gestion de l'�tat du moteur.
void CPhysics::SetMotor(BOOL bState)
{
@@ -236,12 +250,12 @@ BOOL CPhysics::RetMotor()
}
-// Gestion de l'état en vol/au sol.
+// Gestion de l'�tat en vol/au sol.
void CPhysics::SetLand(BOOL bState)
{
m_bLand = bState;
- SetMotor(!bState); // allume le réacteur si on part en vol
+ SetMotor(!bState); // allume le r�acteur si on part en vol
}
BOOL CPhysics::RetLand()
@@ -250,7 +264,7 @@ BOOL CPhysics::RetLand()
}
-// Gestion de l'état dans l'air/l'eau.
+// Gestion de l'�tat dans l'air/l'eau.
void CPhysics::SetSwim(BOOL bState)
{
@@ -280,7 +294,7 @@ BOOL CPhysics::RetCollision()
}
-// Indique si l'influence du sol est activée ou non.
+// Indique si l'influence du sol est activ�e ou non.
void CPhysics::SetFreeze(BOOL bFreeze)
{
@@ -293,7 +307,7 @@ BOOL CPhysics::RetFreeze()
}
-// Retourne le niveau d'automie du réacteur.
+// Retourne le niveau d'automie du r�acteur.
void CPhysics::SetReactorRange(float range)
{
@@ -306,7 +320,7 @@ float CPhysics::RetReactorRange()
}
-// Spécifie la vitesse du moteur.
+// Sp�cifie la vitesse du moteur.
// x = avancer/reculer
// y = monter/descendre
// z = tourner
@@ -316,7 +330,7 @@ void CPhysics::SetMotorSpeed(D3DVECTOR speed)
m_motorSpeed = speed;
}
-// Spécifie la vitesse du moteur pour avancer/reculer.
+// Sp�cifie la vitesse du moteur pour avancer/reculer.
// +1 = avancer
// -1 = reculer
@@ -325,7 +339,7 @@ void CPhysics::SetMotorSpeedX(float speed)
m_motorSpeed.x = speed;
}
-// Spécifie la vitesse du moteur pour monter/descendre.
+// Sp�cifie la vitesse du moteur pour monter/descendre.
// +1 = monter
// -1 = descendre
@@ -334,9 +348,9 @@ void CPhysics::SetMotorSpeedY(float speed)
m_motorSpeed.y = speed;
}
-// Spécifie la vitesse du moteur pour tourner.
-// +1 = tourner à droite (CW)
-// -1 = tourner à gauche (CCW)
+// Sp�cifie la vitesse du moteur pour tourner.
+// +1 = tourner � droite (CW)
+// -1 = tourner � gauche (CCW)
void CPhysics::SetMotorSpeedZ(float speed)
{
@@ -364,8 +378,8 @@ float CPhysics::RetMotorSpeedZ()
}
-// Gestion des vitesses linéaires et angulaires.
-// Spécifie la vitesse parallèle au sens de marche.
+// Gestion des vitesses lin�aires et angulaires.
+// Sp�cifie la vitesse parall�le au sens de marche.
void CPhysics::SetLinMotion(PhysicsMode mode, D3DVECTOR value)
{
@@ -433,7 +447,7 @@ float CPhysics::RetLinMotionX(PhysicsMode mode)
return 0.0f;
}
-// Spécifie la vitesse d'élévation.
+// Sp�cifie la vitesse d'�l�vation.
void CPhysics::SetLinMotionY(PhysicsMode mode, float value)
{
@@ -468,7 +482,7 @@ float CPhysics::RetLinMotionY(PhysicsMode mode)
return 0.0f;
}
-// Spécifie la vitesse perpendiculaire au sens de marche.
+// Sp�cifie la vitesse perpendiculaire au sens de marche.
void CPhysics::SetLinMotionZ(PhysicsMode mode, float value)
{
@@ -503,7 +517,7 @@ float CPhysics::RetLinMotionZ(PhysicsMode mode)
return 0.0f;
}
-// Spécifie la rotation autour de l'axe de marche.
+// Sp�cifie la rotation autour de l'axe de marche.
void CPhysics::SetCirMotion(PhysicsMode mode, D3DVECTOR value)
{
@@ -571,7 +585,7 @@ float CPhysics::RetCirMotionX(PhysicsMode mode)
return 0.0f;
}
-// Spécifie la rotation de direction.
+// Sp�cifie la rotation de direction.
void CPhysics::SetCirMotionY(PhysicsMode mode, float value)
{
@@ -606,7 +620,7 @@ float CPhysics::RetCirMotionY(PhysicsMode mode)
return 0.0f;
}
-// Spécifie la rotation de montée/descente.
+// Sp�cifie la rotation de mont�e/descente.
void CPhysics::SetCirMotionZ(PhysicsMode mode, float value)
{
@@ -642,7 +656,7 @@ float CPhysics::RetCirMotionZ(PhysicsMode mode)
}
-// Retourne la distance linéaire de freinage.
+// Retourne la distance lin�aire de freinage.
//
// v*v
// d = -----
@@ -672,7 +686,7 @@ float CPhysics::RetCirStopLength()
m_cirMotion.stopAccel.y / 2.0f;
}
-// Retourne la longueur avancée en une seconde, au sol, à vitesse maximale.
+// Retourne la longueur avanc�e en une seconde, au sol, � vitesse maximale.
float CPhysics::RetLinMaxLength(float dir)
{
@@ -689,7 +703,7 @@ float CPhysics::RetLinMaxLength(float dir)
return dist;
}
-// Retourne le temps nécessaire pour parcourir une certaine distance.
+// Retourne le temps n�cessaire pour parcourir une certaine distance.
float CPhysics::RetLinTimeLength(float dist, float dir)
{
@@ -711,8 +725,8 @@ float CPhysics::RetLinTimeLength(float dist, float dir)
return (dist+accel+decel)/dps;
}
-// Retourne la longueur à avancer pour parcourir une certaine
-// distance, en tenant compte des accélérations/décélérations.
+// Retourne la longueur � avancer pour parcourir une certaine
+// distance, en tenant compte des acc�l�rations/d�c�l�rations.
float CPhysics::RetLinLength(float dist)
{
@@ -748,8 +762,8 @@ float CPhysics::RetLinLength(float dist)
}
-// Gestion d'un événement.
-// Retourne FALSE si l'objet est détruit.
+// Gestion d'un �v�nement.
+// Retourne FALSE si l'objet est d�truit.
BOOL CPhysics::EventProcess(const Event &event)
{
@@ -768,7 +782,7 @@ BOOL CPhysics::EventProcess(const Event &event)
}
-// Met à jour les consignes de vitesse du moteur.
+// Met � jour les consignes de vitesse du moteur.
void CPhysics::MotorUpdate(float aTime, float rTime)
{
@@ -827,7 +841,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
}
else
{
- power = m_object->RetPower(); // cherche l'objet pile utilisé
+ power = m_object->RetPower(); // cherche l'objet pile utilis�
if ( power == 0 || power->RetEnergy() == 0.0f ) // pas de pile ou plate ?
{
motorSpeed.x = 0.0f;
@@ -848,7 +862,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
{
motorSpeed.x = 0.0f;
motorSpeed.z = 0.0f;
- if ( m_motion->RetAction() == MHS_DEADw ) // mort noyé ?
+ if ( m_motion->RetAction() == MHS_DEADw ) // mort noy� ?
{
motorSpeed.y = 0.0f; // c'est MHS_DEADw qui remonte
}
@@ -869,12 +883,12 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
factor = 1.0f-(pos.y-(h-40.0f))/40.0f;
if ( factor < -1.0f ) factor = -1.0f;
if ( factor > 1.0f ) factor = 1.0f;
- motorSpeed.y *= factor; // limite la vitesse de montée
+ motorSpeed.y *= factor; // limite la vitesse de mont�e
}
}
if ( type != OBJECT_BEE &&
- m_object->RetRange() > 0.0f ) // autonomie de vol limitée ?
+ m_object->RetRange() > 0.0f ) // autonomie de vol limit�e ?
{
if ( m_bLand || m_bSwim || m_bObstacle ) // au sol ou dans l'eau ?
{
@@ -900,7 +914,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
if ( m_reactorRange < 0.5f ) m_bLowLevel = TRUE;
}
- if ( m_reactorRange == 0.0f ) // réacteur tilté ?
+ if ( m_reactorRange == 0.0f ) // r�acteur tilt� ?
{
motorSpeed.y = -1.0f; // tombe ...
}
@@ -942,7 +956,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
m_linMotion.motorSpeed.y = 0.0f;
}
- // Tourner à gauche/droite.
+ // Tourner � gauche/droite.
speed = motorSpeed.z;
//? if ( motorSpeed.x < 0.0f ) speed = -speed; // inverse tourne si recule
@@ -981,7 +995,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
h += m_object->RetCharacter()->height;
if ( motorSpeed.y > 0.0f && m_reactorRange > 0.1f && pos.y < h )
{
- m_bLand = FALSE; // décolle
+ m_bLand = FALSE; // d�colle
SetMotor(TRUE);
pos.y += 0.05f; // petite hauteur initiale (startup)
m_object->SetPosition(0, pos);
@@ -1001,7 +1015,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
}
}
- if ( power != 0 ) // pile transportée ?
+ if ( power != 0 ) // pile transport�e ?
{
factor = 1.0f;
if ( type == OBJECT_MOBILEia ||
@@ -1025,7 +1039,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
}
-// Met à jour les effets de vibration et d'inclinaison.
+// Met � jour les effets de vibration et d'inclinaison.
void CPhysics::EffectUpdate(float aTime, float rTime)
{
@@ -1327,29 +1341,29 @@ void CPhysics::EffectUpdate(float aTime, float rTime)
}
-// Met à jour une structure Motion.
+// Met � jour une structure Motion.
void CPhysics::UpdateMotionStruct(float rTime, Motion &motion)
{
float speed, motor;
- // Gestion de la coordonnée x.
+ // Gestion de la coordonn�e x.
speed = motion.currentSpeed.x;
motor = motion.motorSpeed.x * m_inclinaisonFactor;
if ( speed < motor )
{
- speed += rTime*motion.motorAccel.x; // accélère
+ speed += rTime*motion.motorAccel.x; // acc�l�re
if ( speed > motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
if ( speed > motor )
{
- speed -= rTime*motion.motorAccel.x; // déccélère
+ speed -= rTime*motion.motorAccel.x; // d�cc�l�re
if ( speed < motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
motion.currentSpeed.x = speed;
@@ -1368,23 +1382,23 @@ void CPhysics::UpdateMotionStruct(float rTime, Motion &motion)
motion.realSpeed.x += speed;
}
- // Gestion de la coordonnée y.
+ // Gestion de la coordonn�e y.
speed = motion.currentSpeed.y;
- motor = motion.motorSpeed.y; // vitesse non limitée !
+ motor = motion.motorSpeed.y; // vitesse non limit�e !
if ( speed < motor )
{
- speed += rTime*motion.motorAccel.y; // accélère
+ speed += rTime*motion.motorAccel.y; // acc�l�re
if ( speed > motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
if ( speed > motor )
{
- speed -= rTime*motion.motorAccel.y; // déccélère
+ speed -= rTime*motion.motorAccel.y; // d�cc�l�re
if ( speed < motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
motion.currentSpeed.y = speed;
@@ -1403,23 +1417,23 @@ void CPhysics::UpdateMotionStruct(float rTime, Motion &motion)
motion.realSpeed.y += speed;
}
- // Gestion de la coordonnée z.
+ // Gestion de la coordonn�e z.
speed = motion.currentSpeed.z;
motor = motion.motorSpeed.z * m_inclinaisonFactor;
if ( speed < motor )
{
- speed += rTime*motion.motorAccel.z; // accélère
+ speed += rTime*motion.motorAccel.z; // acc�l�re
if ( speed > motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
if ( speed > motor )
{
- speed -= rTime*motion.motorAccel.z; // déccélère
+ speed -= rTime*motion.motorAccel.z; // d�cc�l�re
if ( speed < motor )
{
- speed = motor; // ne dépasse pas la vitesse
+ speed = motor; // ne d�passe pas la vitesse
}
}
motion.currentSpeed.z = speed;
@@ -1440,14 +1454,14 @@ void CPhysics::UpdateMotionStruct(float rTime, Motion &motion)
}
-// Fait évoluer la physique selon le temps écoulé.
-// Retourne FALSE si l'objet est détruit.
+// Fait �voluer la physique selon le temps �coul�.
+// Retourne FALSE si l'objet est d�truit.
//
-// a: accélération
+// a: acc�l�ration
// v1: vitesse au temps t1
// v2: vitesse au temps t2
-// dt: temps écoulé depuis t1, donc: dt=t2-t1
-// dd: différence de distance (avance)
+// dt: temps �coul� depuis t1, donc: dt=t2-t1
+// dd: diff�rence de distance (avance)
//
// v2 = v1 + a*dt
// dd = v2*dt
@@ -1476,7 +1490,7 @@ BOOL CPhysics::EventFrame(const Event &event)
iPos = pos = m_object->RetPosition(0);
iAngle = angle = m_object->RetAngle(0);
- // Accélère à la descente, freine à la montée.
+ // Acc�l�re � la descente, freine � la mont�e.
if ( m_bFreeze || m_object->RetDead() )
{
m_linMotion.terrainSpeed.x = 0.0f;
@@ -1510,7 +1524,7 @@ BOOL CPhysics::EventFrame(const Event &event)
m_linMotion.terrainSpeed.z = tanf(tAngle.x)*0.9f*m_linMotion.terrainForce.z*h;
m_linMotion.terrainSpeed.y = 0.0f;
- // Si le terrain est très pentu, n'exagère pas !
+ // Si le terrain est tr�s pentu, n'exag�re pas !
if ( m_linMotion.terrainSpeed.x > 50.0f ) m_linMotion.terrainSpeed.x = 20.0f;
if ( m_linMotion.terrainSpeed.x < -50.0f ) m_linMotion.terrainSpeed.x = -20.0f;
if ( m_linMotion.terrainSpeed.z > 50.0f ) m_linMotion.terrainSpeed.z = 20.0f;
@@ -1527,7 +1541,7 @@ BOOL CPhysics::EventFrame(const Event &event)
m_linMotion.terrainSpeed.y = -h*2.5f; // ne va pas plus haut
}
- // (*) Assez haut pour passer par-dessus la tour de défence
+ // (*) Assez haut pour passer par-dessus la tour de d�fence
// (OBJECT_TOWER), mais pas trop pour passer sous la coiffe
// du vaisseau (OBJECT_BASE) !
@@ -1566,7 +1580,7 @@ BOOL CPhysics::EventFrame(const Event &event)
newpos.z != pos.z )
{
i = ObjectAdapt(newpos, newangle);
- if ( i == 2 ) // objet détruit ?
+ if ( i == 2 ) // objet d�truit ?
{
return FALSE;
}
@@ -1598,7 +1612,7 @@ BOOL CPhysics::EventFrame(const Event &event)
return TRUE;
}
-// Démarre ou stoppe les bruits de moteur.
+// D�marre ou stoppe les bruits de moteur.
void CPhysics::SoundMotor(float rTime)
{
@@ -1700,13 +1714,13 @@ void CPhysics::SoundMotor(float rTime)
}
}
}
- else // véhicule ?
+ else // v�hicule ?
{
if ( m_type == TYPE_ROLLING )
{
if ( m_bMotor && m_object->RetActif() )
{
- SoundMotorFull(rTime, type); // plein régime
+ SoundMotorFull(rTime, type); // plein r�gime
}
else
{
@@ -1724,7 +1738,7 @@ void CPhysics::SoundMotor(float rTime)
}
else
{
- SoundMotorStop(rTime, type); // à l'arrêt
+ SoundMotorStop(rTime, type); // � l'arr�t
}
}
}
@@ -1734,11 +1748,11 @@ void CPhysics::SoundMotor(float rTime)
if ( m_bMotor && !m_bSwim &&
m_object->RetActif() && !m_object->RetDead() )
{
- SoundReactorFull(rTime, type); // plein régime
+ SoundReactorFull(rTime, type); // plein r�gime
}
else
{
- SoundReactorStop(rTime, type); // à l'arrêt
+ SoundReactorStop(rTime, type); // � l'arr�t
}
}
}
@@ -1755,7 +1769,7 @@ void CPhysics::WaterFrame(float aTime, float rTime)
level = m_water->RetLevel();
if ( level == 0.0f ) return; // pas d'eau ?
- if ( m_object->RetTruck() != 0 ) return; // objet transporté ?
+ if ( m_object->RetTruck() != 0 ) return; // objet transport� ?
// Gestion des flammes dans la lave.
pos = m_object->RetPosition(0);
@@ -1827,13 +1841,13 @@ void CPhysics::WaterFrame(float aTime, float rTime)
type == OBJECT_MOBILEwt ||
type == OBJECT_MOBILEit ||
type == OBJECT_MOBILEdr ||
- type == OBJECT_APOLLO2 ) // véhicule non sous-marin ?
+ type == OBJECT_APOLLO2 ) // v�hicule non sous-marin ?
{
- m_object->ExploObject(EXPLO_WATER, 1.0f); // démarre explosion
+ m_object->ExploObject(EXPLO_WATER, 1.0f); // d�marre explosion
}
}
-// Fait entendre le moteur à plein régime.
+// Fait entendre le moteur � plein r�gime.
void CPhysics::SoundMotorFull(float rTime, ObjectType type)
{
@@ -2022,7 +2036,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
{
m_sound->Position(m_soundChannel, m_object->RetPosition(0));
- if ( !m_bSoundSlow ) // plein régime ?
+ if ( !m_bSoundSlow ) // plein r�gime ?
{
m_sound->FlushEnvelope(m_soundChannel);
m_sound->AddEnvelope(m_soundChannel, amplitude, 0.5f, 0.3f, SOPER_CONTINUE);
@@ -2072,7 +2086,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
}
}
-// Fait entendre le moteur à l'arrêt.
+// Fait entendre le moteur � l'arr�t.
void CPhysics::SoundMotorStop(float rTime, ObjectType type)
{
@@ -2100,7 +2114,7 @@ void CPhysics::SoundMotorStop(float rTime, ObjectType type)
m_soundTimePshhh -= rTime*2.0f;
}
-// Fait entendre le réacteur à plein régime.
+// Fait entendre le r�acteur � plein r�gime.
void CPhysics::SoundReactorFull(float rTime, ObjectType type)
{
@@ -2211,7 +2225,7 @@ void CPhysics::SoundReactorFull(float rTime, ObjectType type)
}
-// Fait entendre le réacteur à l'arrêt.
+// Fait entendre le r�acteur � l'arr�t.
void CPhysics::SoundReactorStop(float rTime, ObjectType type)
{
@@ -2245,7 +2259,7 @@ void CPhysics::SoundReactorStop(float rTime, ObjectType type)
else
{
if ( energy != 0.0f &&
- (m_motorSpeed.x != 0.0f || // glisse avec petits réacteurs dans patins ?
+ (m_motorSpeed.x != 0.0f || // glisse avec petits r�acteurs dans patins ?
m_cirMotion.realSpeed.y != 0.0f) )
{
if ( m_soundChannelSlide == -1 )
@@ -2299,7 +2313,7 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
if ( m_type == TYPE_ROLLING )
{
- pos.y -= h; // plaque immédiatement au sol
+ pos.y -= h; // plaque imm�diatement au sol
pos.y += character->height;
m_floorHeight = 0.0f;
}
@@ -2312,9 +2326,9 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
{
m_terrain->GetNormal(norm, pos);
a1 = Abs(RotateAngle(Length(norm.x, norm.z), norm.y));
- if ( a1 < (90.0f-55.0f)*PI/180.0f ) // pente dépasse 55 degrés ?
+ if ( a1 < (90.0f-55.0f)*PI/180.0f ) // pente d�passe 55 degr�s ?
{
- bSlopingTerrain = TRUE; // terrain très pentu
+ bSlopingTerrain = TRUE; // terrain tr�s pentu
if ( h < 4.0f ) // choc avec le terrain ?
{
@@ -2350,7 +2364,7 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
m_bLand = TRUE; // au sol
SetMotor(FALSE);
- pos.y -= h; // plaque immédiatement au sol
+ pos.y -= h; // plaque imm�diatement au sol
m_floorHeight = 0.0f;
if ( h < 0.0f )
@@ -2367,7 +2381,7 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
type == OBJECT_TECH ) return; // toujours droit
}
- if ( h > 4.0f || bSlopingTerrain ) // très au-dessus du sol ?
+ if ( h > 4.0f || bSlopingTerrain ) // tr�s au-dessus du sol ?
{
if ( m_bSwim )
{
@@ -2381,7 +2395,7 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
}
m_inclinaisonFactor = 1.0f;
- // Remet gentiment à l'horizontale.
+ // Remet gentiment � l'horizontale.
if ( angle.x > 0.0f )
{
angle.x -= rTime*0.5f;
@@ -2406,7 +2420,7 @@ void CPhysics::FloorAdapt(float aTime, float rTime,
}
}
- if ( m_floorHeight == 0.0f ) // plaqué au sol ?
+ if ( m_floorHeight == 0.0f ) // plaqu� au sol ?
{
if ( m_object->RetTraceDown() )
{
@@ -2479,8 +2493,8 @@ void CPhysics::FloorAngle(const D3DVECTOR &pos, D3DVECTOR &angle)
// Adapte la physique de l'objet en fonction des autres objets.
// Retourne 0 -> objet mobile
-// Retourne 1 -> objet immobile (à cause collision)
-// Retourne 2 -> objet détruit
+// Retourne 1 -> objet immobile (� cause collision)
+// Retourne 2 -> objet d�truit
int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
{
@@ -2494,11 +2508,11 @@ int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
int i, j, colType;
ObjectType iType, oType;
- if ( m_object->RetRuin() ) return 0; // brûle ou explose ?
+ if ( m_object->RetRuin() ) return 0; // br�le ou explose ?
if ( !m_object->RetClip() ) return 0;
- // iiPos = centre sphère à l'ancienne position.
- // iPos = centre sphère à la nouvelle position.
+ // iiPos = centre sph�re � l'ancienne position.
+ // iPos = centre sph�re � la nouvelle position.
m_object->GetCrashSphere(0, iiPos, iRad);
iPos = iiPos + (pos - m_object->RetPosition(0));
iType = m_object->RetType();
@@ -2508,10 +2522,10 @@ int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- if ( pObj == m_object ) continue; // soi-même ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj == m_object ) continue; // soi-m�me ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( !pObj->RetEnable() ) continue; // inactif ?
- if ( pObj->RetRuin() ) continue; // brûle ou explose ?
+ if ( pObj->RetRuin() ) continue; // br�le ou explose ?
if ( pObj->RetDead() ) continue; // homme mort ?
oType = pObj->RetType();
@@ -2558,12 +2572,12 @@ int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
#if _TEEN
if ( oType == OBJECT_WAYPOINT &&
pObj->RetEnable() &&
- !m_object->RetResetBusy() ) // véhicule d'entraînement ?
+ !m_object->RetResetBusy() ) // v�hicule d'entra�nement ?
#else
if ( oType == OBJECT_WAYPOINT &&
pObj->RetEnable() &&
!m_object->RetResetBusy() &&
- m_object->RetTrainer() ) // véhicule d'entraînement ?
+ m_object->RetTrainer() ) // v�hicule d'entra�nement ?
#endif
{
oPos = pObj->RetPosition(0);
@@ -2613,7 +2627,7 @@ int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
force *= pObj->RetCrashSphereHardness(j-1)*2.0f;
if ( ExploOther(iType, pObj, oType, force) ) continue;
colType = ExploHimself(iType, oType, force);
- if ( colType == 2 ) return 2; // détruit ?
+ if ( colType == 2 ) return 2; // d�truit ?
if ( colType == 0 ) continue; // passe outre ?
}
@@ -2675,11 +2689,11 @@ int CPhysics::ObjectAdapt(const D3DVECTOR &pos, const D3DVECTOR &angle)
return 0;
}
-// (*) En cas de collision à la position initiale (iiPos) et à la
-// nouvelle position (iPos), l'obstacle est ignoré. On peut
-// donc passer à travers. Ceci est nécessaire lorsqu'un obstacle
-// se retrouve "dans" un véhicule, pour ne pas le bloquer
-// définitivement !
+// (*) En cas de collision � la position initiale (iiPos) et � la
+// nouvelle position (iPos), l'obstacle est ignor�. On peut
+// donc passer � travers. Ceci est n�cessaire lorsqu'un obstacle
+// se retrouve "dans" un v�hicule, pour ne pas le bloquer
+// d�finitivement !
// Bouscule un objet.
@@ -2712,7 +2726,7 @@ BOOL CPhysics::JostleObject(CObject* pObj, D3DVECTOR iPos, float iRad,
return pObj->JostleObject(force);
}
-// Bouscule forcément un objet.
+// Bouscule forc�ment un objet.
BOOL CPhysics::JostleObject(CObject* pObj, float force)
{
@@ -2731,7 +2745,7 @@ BOOL CPhysics::JostleObject(CObject* pObj, float force)
return pObj->JostleObject(force);
}
-// Action de l'explosion sur l'objet tamponné.
+// Action de l'explosion sur l'objet tamponn�.
// Retourne TRUE s'il faut ignorer cet obstacle.
BOOL CPhysics::ExploOther(ObjectType iType,
@@ -2783,7 +2797,7 @@ BOOL CPhysics::ExploOther(ObjectType iType,
oType == OBJECT_NUCLEAR ||
oType == OBJECT_PARA ||
oType == OBJECT_SAFE ||
- oType == OBJECT_HUSTON ) ) // bâtiment ?
+ oType == OBJECT_HUSTON ) ) // b�timent ?
{
pObj->ExploObject(EXPLO_BOUM, force/400.0f);
}
@@ -2815,7 +2829,7 @@ BOOL CPhysics::ExploOther(ObjectType iType,
oType == OBJECT_MOBILEft ||
oType == OBJECT_MOBILEit ||
oType == OBJECT_MOBILEdr ||
- oType == OBJECT_APOLLO2 ) ) // véhicule ?
+ oType == OBJECT_APOLLO2 ) ) // v�hicule ?
{
pObj->ExploObject(EXPLO_BOUM, force/200.0f);
}
@@ -2838,10 +2852,10 @@ BOOL CPhysics::ExploOther(ObjectType iType,
return FALSE;
}
-// Action de l'explosion sur l'objet lui-même.
+// Action de l'explosion sur l'objet lui-m�me.
// Retourne 0 -> objet mobile
// Retourne 1 -> objet immobile
-// Retourne 2 -> objet détruit
+// Retourne 2 -> objet d�truit
int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
{
@@ -2909,7 +2923,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
iType == OBJECT_MOBILEft ||
iType == OBJECT_MOBILEit ||
iType == OBJECT_MOBILEdr ||
- iType == OBJECT_APOLLO2 ) ) // véhicule ?
+ iType == OBJECT_APOLLO2 ) ) // v�hicule ?
{
if ( oType == OBJECT_DERRICK ||
oType == OBJECT_FACTORY ||
@@ -2926,7 +2940,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
oType == OBJECT_NUCLEAR ||
oType == OBJECT_PARA ||
oType == OBJECT_SAFE ||
- oType == OBJECT_HUSTON ) // bâtiment ?
+ oType == OBJECT_HUSTON ) // b�timent ?
{
force /= 200.0f;
}
@@ -2966,7 +2980,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
-// Fait évoluer les particules.
+// Fait �voluer les particules.
void CPhysics::FrameParticule(float aTime, float rTime)
{
@@ -2989,7 +3003,7 @@ void CPhysics::FrameParticule(float aTime, float rTime)
energy = power->RetEnergy();
}
- if ( energy != m_lastEnergy ) // changement du niveau d'énergie ?
+ if ( energy != m_lastEnergy ) // changement du niveau d'�nergie ?
{
if ( energy > m_lastEnergy ) // recharge ?
{
@@ -3028,7 +3042,7 @@ void CPhysics::FrameParticule(float aTime, float rTime)
}
}
-// Génère qq particules suite à une recharge.
+// G�n�re qq particules suite � une recharge.
void CPhysics::PowerParticule(float factor, BOOL bBreak)
{
@@ -3070,7 +3084,7 @@ void CPhysics::PowerParticule(float factor, BOOL bBreak)
if ( bCarryPower ) // porte une batterie ?
{
- pos = D3DVECTOR(3.0f, 5.6f, 0.0f); // position batterie portée
+ pos = D3DVECTOR(3.0f, 5.6f, 0.0f); // position batterie port�e
pos = Transform(*mat, pos);
speed.x = (Rand()-0.5f)*12.0f;
@@ -3088,7 +3102,7 @@ void CPhysics::PowerParticule(float factor, BOOL bBreak)
}
}
-// Génère qq particules suite à une chute.
+// G�n�re qq particules suite � une chute.
// crash: 0=super soft, 1=big crash
void CPhysics::CrashParticule(float crash)
@@ -3122,7 +3136,7 @@ void CPhysics::CrashParticule(float crash)
}
}
-// Génère qq particules de gaz d'échappement.
+// G�n�re qq particules de gaz d'�chappement.
void CPhysics::MotorParticule(float aTime, float rTime)
{
@@ -3185,7 +3199,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
}
else // hors de l'eau ?
{
- m_absorbWater -= rTime*(1.0f/3.0f); // se sèche
+ m_absorbWater -= rTime*(1.0f/3.0f); // se s�che
if ( m_absorbWater < 0.0f ) m_absorbWater = 0.0f;
}
@@ -3224,7 +3238,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
h = Max(Abs(m_linMotion.terrainSpeed.x),
Abs(m_linMotion.terrainSpeed.z));
if ( h > m_linMotion.terrainSlide.x+0.5f &&
- m_linMotion.motorSpeed.x == 0.0f ) // glisse à l'arrêt ?
+ m_linMotion.motorSpeed.x == 0.0f ) // glisse � l'arr�t ?
{
m_lastSlideParticule = aTime;
@@ -3303,7 +3317,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
{
if ( m_reactorTemperature > 0.0f )
{
- m_reactorTemperature -= rTime*(1.0f/10.0f); // ça refroidi
+ m_reactorTemperature -= rTime*(1.0f/10.0f); // �a refroidi
if ( m_reactorTemperature < 0.0f )
{
m_reactorTemperature = 0.0f;
@@ -3333,7 +3347,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
if ( m_reactorTemperature < 1.0f ) // pas trop chaud ?
{
- m_reactorTemperature += rTime*(1.0f/4.0f); // ça chauffe
+ m_reactorTemperature += rTime*(1.0f/4.0f); // �a chauffe
if ( m_reactorTemperature > 1.0f )
{
m_reactorTemperature = 1.0f; // mais pas trop
@@ -3401,7 +3415,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
if ( (type == OBJECT_HUMAN || type == OBJECT_TECH) && m_bSwim )
{
- m_reactorTemperature = 0.0f; // réacteur froid
+ m_reactorTemperature = 0.0f; // r�acteur froid
}
if ( m_type == TYPE_FLYING &&
@@ -3411,7 +3425,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
{
if ( m_bLand ) // au sol ?
{
- if ( m_motorSpeed.x == 0.0f && // glisse à cause pente terrain ?
+ if ( m_motorSpeed.x == 0.0f && // glisse � cause pente terrain ?
m_cirMotion.realSpeed.y == 0.0f )
{
h = Max(Abs(m_linMotion.realSpeed.x),
@@ -3436,7 +3450,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
dim.y = dim.x;
m_particule->CreateParticule(pos, speed, dim, PARTICRASH, 2.0f);
}
- else // glisse avec petits réacteurs dans patins ?
+ else // glisse avec petits r�acteurs dans patins ?
{
if ( m_linMotion.realSpeed.x == 0.0f &&
m_cirMotion.realSpeed.y == 0.0f ) return;
@@ -3579,7 +3593,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
if ( m_type == TYPE_ROLLING )
{
- if ( type == OBJECT_APOLLO2 ) return; // moteurs électriques !
+ if ( type == OBJECT_APOLLO2 ) return; // moteurs �lectriques !
if ( type == OBJECT_MOBILErt ||
type == OBJECT_MOBILErc ||
@@ -3643,7 +3657,7 @@ void CPhysics::MotorParticule(float aTime, float rTime)
}
}
-// Génère qq particules suite à une chute dans l'eau.
+// G�n�re qq particules suite � une chute dans l'eau.
void CPhysics::WaterParticule(float aTime, D3DVECTOR pos, ObjectType type,
float floor, float advance, float turn)
@@ -3691,7 +3705,7 @@ void CPhysics::WaterParticule(float aTime, D3DVECTOR pos, ObjectType type,
pos = m_object->RetPosition(0);
pos.y = m_water->RetLevel()-1.0f;
dim.x = 2.0f*force; // hauteur
- dim.y = diam; // diamètre
+ dim.y = diam; // diam�tre
m_particule->CreateParticule(pos, D3DVECTOR(0.0f, 0.0f, 0.0f), dim, PARTIPLOUF0, 1.4f, 0.0f, 0.0f);
force = (0.5f+force*0.5f);
@@ -3759,7 +3773,7 @@ void CPhysics::WaterParticule(float aTime, D3DVECTOR pos, ObjectType type,
m_particule->CreateParticule(pos, speed, dim, PARTIFLIC, 3.0f, 0.0f, 0.0f);
}
-// Crée la trace sous le robot.
+// Cr�e la trace sous le robot.
void CPhysics::WheelParticule(int color, float width)
{
@@ -3777,7 +3791,7 @@ void CPhysics::WheelParticule(int color, float width)
{
parti = (ParticuleType)(PARTITRACE0+color);
step = 2.0f;
- if ( color >= 16 ) step = 4.0f; // flèche ?
+ if ( color >= 16 ) step = 4.0f; // fl�che ?
step /= m_engine->RetTracePrecision();
goal1.x = step/2.0f;
@@ -3824,7 +3838,7 @@ void CPhysics::WheelParticule(int color, float width)
}
-// Crée l'interface.
+// Cr�e l'interface.
void CPhysics::CreateInterface(BOOL bSelect)
{
@@ -3835,7 +3849,7 @@ void CPhysics::CreateInterface(BOOL bSelect)
}
-// Retourne une erreur liée à l'état général.
+// Retourne une erreur li�e � l'�tat g�n�ral.
Error CPhysics::RetError()
{
@@ -3858,7 +3872,7 @@ Error CPhysics::RetError()
return ERR_VEH_VIRUS;
}
- power = m_object->RetPower(); // cherche l'objet pile utilisé
+ power = m_object->RetPower(); // cherche l'objet pile utilis�
if ( power == 0 )
{
return ERR_VEH_POWER;
diff --git a/src/physics.h b/src/physics.h
index 3eb83f5..daead9c 100644
--- a/src/physics.h
+++ b/src/physics.h
@@ -1,4 +1,18 @@
-// physics.h
+// * 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 .
#ifndef _PHYSICS_H_
#define _PHYSICS_H_
@@ -42,21 +56,21 @@ enum PhysicsMode
typedef struct
{
- D3DVECTOR advanceAccel; // accélération de départ (+)
- D3DVECTOR recedeAccel; // accélération de départ (+)
- D3DVECTOR stopAccel; // accélération d'arrêt (+)
- D3DVECTOR motorAccel; // accélération actuelle (+/-)
+ D3DVECTOR advanceAccel; // acc�l�ration de d�part (+)
+ D3DVECTOR recedeAccel; // acc�l�ration de d�part (+)
+ D3DVECTOR stopAccel; // acc�l�ration d'arr�t (+)
+ D3DVECTOR motorAccel; // acc�l�ration actuelle (+/-)
D3DVECTOR advanceSpeed; // vitesse en marche avant (+)
- D3DVECTOR recedeSpeed; // vitesse en marche arrière (+)
- D3DVECTOR motorSpeed; // vitesse souhaitée (+/-)
+ D3DVECTOR recedeSpeed; // vitesse en marche arri�re (+)
+ D3DVECTOR motorSpeed; // vitesse souhait�e (+/-)
D3DVECTOR currentSpeed; // vitesse actuelle (+/-)
- D3DVECTOR terrainForce; // force de résistance du terrain (+)
+ D3DVECTOR terrainForce; // force de r�sistance du terrain (+)
D3DVECTOR terrainSpeed; // vitesse du terrain (+/-)
D3DVECTOR terrainSlide; // limite vitesse de glissement (+)
- D3DVECTOR realSpeed; // vitesse réelle (+/-)
+ D3DVECTOR realSpeed; // vitesse r�elle (+/-)
D3DVECTOR finalInclin; // inclinaison finale
}
@@ -182,7 +196,7 @@ protected:
float m_gravity; // force de gravitation
float m_time; // temps absolu
D3DVECTOR m_motorSpeed; // vitesse du moteur (-1..1)
- Motion m_linMotion; // mouvement linéaire
+ Motion m_linMotion; // mouvement lin�aire
Motion m_cirMotion; // mouvement circulaire
BOOL m_bMotor;
BOOL m_bLand;
diff --git a/src/planet.cpp b/src/planet.cpp
index c479b1f..40add95 100644
--- a/src/planet.cpp
+++ b/src/planet.cpp
@@ -1,4 +1,18 @@
-// planet.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
@@ -38,7 +52,7 @@ CPlanet::~CPlanet()
}
-// Supprime toutes les planètes.
+// Supprime toutes les plan�tes.
void CPlanet::Flush()
{
@@ -58,7 +72,7 @@ void CPlanet::Flush()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CPlanet::EventProcess(const Event &event)
{
@@ -69,7 +83,7 @@ BOOL CPlanet::EventProcess(const Event &event)
return TRUE;
}
-// Fait évoluer les planètes.
+// Fait �voluer les plan�tes.
BOOL CPlanet::EventFrame(const Event &event)
{
@@ -97,7 +111,7 @@ BOOL CPlanet::EventFrame(const Event &event)
}
-// Charge toutes les textures pour les planètes.
+// Charge toutes les textures pour les plan�tes.
void CPlanet::LoadTexture()
{
@@ -114,7 +128,7 @@ void CPlanet::LoadTexture()
}
}
-// Dessine toutes les planètes.
+// Dessine toutes les plan�tes.
void CPlanet::Draw()
{
@@ -174,7 +188,7 @@ void CPlanet::Draw()
}
-// Crée une nouvelle planète.
+// Cr�e une nouvelle plan�te.
BOOL CPlanet::Create(int mode, FPOINT start, float dim, float speed,
float dir, char *name, FPOINT uv1, FPOINT uv2)
@@ -208,7 +222,7 @@ BOOL CPlanet::Create(int mode, FPOINT start, float dim, float speed,
return FALSE;
}
-// Indique s'il existe au moins une planète.
+// Indique s'il existe au moins une plan�te.
BOOL CPlanet::PlanetExist()
{
diff --git a/src/planet.h b/src/planet.h
index 263926f..4fdcdb0 100644
--- a/src/planet.h
+++ b/src/planet.h
@@ -1,4 +1,18 @@
-// planet.h
+// * 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 .
#ifndef _PLANET_H_
#define _PLANET_H_
@@ -13,9 +27,9 @@ class CD3DEngine;
typedef struct
{
- char bUsed; // TRUE -> planète existe
- FPOINT start; // position initiale en degrés
- FPOINT angle; // position actuelle en degrés
+ char bUsed; // TRUE -> plan�te existe
+ FPOINT start; // position initiale en degr�s
+ FPOINT angle; // position actuelle en degr�s
float dim; // dimensions (0..1)
float speed; // vitesse
float dir; // direction dans le ciel
diff --git a/src/profile.cpp b/src/profile.cpp
index b869bc2..0c0a46e 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -1,4 +1,18 @@
-// profile.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
diff --git a/src/profile.h b/src/profile.h
index e328ce1..d89bd7e 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -1,4 +1,18 @@
-// profile.h
+// * 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 .
#ifndef _PROFILE_H_
#define _PROFILE_H_
diff --git a/src/pyro.cpp b/src/pyro.cpp
index 9ef4eac..3c7c516 100644
--- a/src/pyro.cpp
+++ b/src/pyro.cpp
@@ -1,4 +1,18 @@
-// pyro.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
@@ -61,7 +75,7 @@ CPyro::~CPyro()
}
-// Détruit l'objet.
+// D�truit l'objet.
void CPyro::DeleteObject(BOOL bAll)
{
@@ -73,7 +87,7 @@ void CPyro::DeleteObject(BOOL bAll)
}
-// Crée un effet pyrotechnique.
+// Cr�e un effet pyrotechnique.
BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
{
@@ -96,9 +110,9 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
m_engine->GetBBox(objRank, min, max);
pos = pObj->RetPosition(0);
- DisplayError(type, pObj); // affiche message éventuel
+ DisplayError(type, pObj); // affiche message �ventuel
- // Copie toutes les sphères de l'objet.
+ // Copie toutes les sph�res de l'objet.
for ( i=0 ; i<50 ; i++ )
{
if ( !pObj->GetCrashSphere(i, m_crashSpherePos[i], m_crashSphereRadius[i]) ) break;
@@ -190,7 +204,7 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
m_posPower = m_pos;
}
if ( oType == OBJECT_SCRAP4 ||
- oType == OBJECT_SCRAP5 ) // matière plastique ?
+ oType == OBJECT_SCRAP5 ) // mati�re plastique ?
{
m_bPower = TRUE;
m_posPower = m_pos;
@@ -390,9 +404,9 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
m_speed = 1.0f/15.0f;
LightOperAdd(0.00f, 0.0f, 2.0f, 1.0f, 0.0f); // rouge-orange
- LightOperAdd(0.30f, 1.0f, -0.8f, -0.8f, -0.8f); // gris foncé
- LightOperAdd(0.80f, 1.0f, -0.8f, -0.8f, -0.8f); // gris foncé
- LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris foncé
+ LightOperAdd(0.30f, 1.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
+ LightOperAdd(0.80f, 1.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
+ LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
CreateLight(m_pos, 40.0f);
return TRUE;
}
@@ -416,32 +430,32 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
if ( m_type == PT_FRAGO ||
m_type == PT_EXPLOO )
{
- LightOperAdd(0.00f, 0.0f, -1.0f, -0.5f, -1.0f); // vert foncé
- LightOperAdd(0.05f, 1.0f, -1.0f, -0.5f, -1.0f); // vert foncé
- LightOperAdd(1.00f, 0.0f, -1.0f, -0.5f, -1.0f); // vert foncé
+ LightOperAdd(0.00f, 0.0f, -1.0f, -0.5f, -1.0f); // vert fonc�
+ LightOperAdd(0.05f, 1.0f, -1.0f, -0.5f, -1.0f); // vert fonc�
+ LightOperAdd(1.00f, 0.0f, -1.0f, -0.5f, -1.0f); // vert fonc�
}
else if ( m_type == PT_FRAGT ||
m_type == PT_EXPLOT )
{
LightOperAdd(0.00f, 1.0f, 4.0f, 4.0f, 2.0f); // jaune
LightOperAdd(0.02f, 1.0f, 4.0f, 2.0f, 0.0f); // rouge-orange
- LightOperAdd(0.16f, 1.0f, -0.8f, -0.8f, -0.8f); // gris foncé
- LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris foncé
+ LightOperAdd(0.16f, 1.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
+ LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
h = m_size*2.0f;
}
else if ( m_type == PT_SPIDER )
{
- LightOperAdd(0.00f, 0.0f, -0.5f, -1.0f, -1.0f); // rouge foncé
- LightOperAdd(0.05f, 1.0f, -0.5f, -1.0f, -1.0f); // rouge foncé
- LightOperAdd(1.00f, 0.0f, -0.5f, -1.0f, -1.0f); // rouge foncé
+ LightOperAdd(0.00f, 0.0f, -0.5f, -1.0f, -1.0f); // rouge fonc�
+ LightOperAdd(0.05f, 1.0f, -0.5f, -1.0f, -1.0f); // rouge fonc�
+ LightOperAdd(1.00f, 0.0f, -0.5f, -1.0f, -1.0f); // rouge fonc�
}
else if ( m_type == PT_FRAGW ||
m_type == PT_EXPLOW ||
m_type == PT_SHOTW )
{
- LightOperAdd(0.00f, 0.0f, -0.5f, -0.5f, -1.0f); // jaune foncé
- LightOperAdd(0.05f, 1.0f, -0.5f, -0.5f, -1.0f); // jaune foncé
- LightOperAdd(1.00f, 0.0f, -0.5f, -0.5f, -1.0f); // jaune foncé
+ LightOperAdd(0.00f, 0.0f, -0.5f, -0.5f, -1.0f); // jaune fonc�
+ LightOperAdd(0.05f, 1.0f, -0.5f, -0.5f, -1.0f); // jaune fonc�
+ LightOperAdd(1.00f, 0.0f, -0.5f, -0.5f, -1.0f); // jaune fonc�
}
else if ( m_type == PT_WPCHECK ||
m_type == PT_FLCREATE ||
@@ -454,9 +468,9 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
}
else
{
- LightOperAdd(0.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris foncé
- LightOperAdd(0.05f, 1.0f, -0.8f, -0.8f, -0.8f); // gris foncé
- LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris foncé
+ LightOperAdd(0.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
+ LightOperAdd(0.05f, 1.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
+ LightOperAdd(1.00f, 0.0f, -0.8f, -0.8f, -0.8f); // gris fonc�
}
CreateLight(m_pos, h);
@@ -473,7 +487,7 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
if ( m_type == PT_SHOTW ) return TRUE;
- // Génère les triangles de l'explosion.
+ // G�n�re les triangles de l'explosion.
if ( m_type == PT_FRAGT ||
m_type == PT_FRAGO ||
m_type == PT_FRAGW ||
@@ -616,7 +630,7 @@ BOOL CPyro::Create(PyroType type, CObject* pObj, float force)
return TRUE;
}
-// Crée une explosion sous forme de particules triangulaires.
+// Cr�e une explosion sous forme de particules triangulaires.
void CPyro::CreateTriangle(CObject* pObj, ObjectType oType, int part)
{
@@ -743,8 +757,8 @@ void CPyro::CreateTriangle(CObject* pObj, ObjectType oType, int part)
}
}
-// Affiche l'erreur ou l'information éventuelle, liée à la destruction
-// d'un insecte, d'un véhicule ou d'un batiment.
+// Affiche l'erreur ou l'information �ventuelle, li�e � la destruction
+// d'un insecte, d'un v�hicule ou d'un batiment.
void CPyro::DisplayError(PyroType type, CObject* pObj)
{
@@ -831,7 +845,7 @@ void CPyro::DisplayError(PyroType type, CObject* pObj)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CPyro::EventProcess(const Event &event)
{
@@ -1360,7 +1374,7 @@ BOOL CPyro::EventProcess(const Event &event)
return TRUE;
}
-// Indique que l'objet lié à l'effet n'existe plus, sans le détruire.
+// Indique que l'objet li� � l'effet n'existe plus, sans le d�truire.
void CPyro::CutObjectLink(CObject* pObj)
{
@@ -1370,12 +1384,12 @@ void CPyro::CutObjectLink(CObject* pObj)
}
}
-// Indique si l'effet pyrotechnique est terminé.
+// Indique si l'effet pyrotechnique est termin�.
Error CPyro::IsEnded()
{
- // Détruit l'objet qui explose. Il ne doit pas être détruit à la fin
- // du Create, car c'est parfois l'objet lui-même qui fait le Create :
+ // D�truit l'objet qui explose. Il ne doit pas �tre d�truit � la fin
+ // du Create, car c'est parfois l'objet lui-m�me qui fait le Create :
// pyro->Create(PT_FRAGT, this);
if ( m_type == PT_FRAGT ||
m_type == PT_FRAGO ||
@@ -1408,7 +1422,7 @@ Error CPyro::IsEnded()
}
if ( m_type == PT_BURNT ||
- m_type == PT_BURNO ) // brûle ?
+ m_type == PT_BURNO ) // br�le ?
{
BurnTerminate();
}
@@ -1442,7 +1456,7 @@ Error CPyro::IsEnded()
return ERR_STOP;
}
-// Supprime l'objet lié à l'effet pyrotechnique.
+// Supprime l'objet li� � l'effet pyrotechnique.
void CPyro::DeleteObject(BOOL bPrimary, BOOL bSecondary)
{
@@ -1454,7 +1468,7 @@ void CPyro::DeleteObject(BOOL bPrimary, BOOL bSecondary)
if ( m_object->RetResetCap() == RESET_MOVE ) // objet resetable ?
{
- m_object->SetEnable(FALSE); // objet caché et inactif
+ m_object->SetEnable(FALSE); // objet cach� et inactif
pos = m_object->RetPosition(0);
pos.y = -100.0f;
m_object->SetPosition(0, pos);
@@ -1478,7 +1492,7 @@ void CPyro::DeleteObject(BOOL bPrimary, BOOL bSecondary)
sub = m_object->RetFret();
if ( sub != 0 )
{
- sub->DeleteObject(); // supprime l'objet transporté
+ sub->DeleteObject(); // supprime l'objet transport�
delete sub;
m_object->SetFret(0);
}
@@ -1487,7 +1501,7 @@ void CPyro::DeleteObject(BOOL bPrimary, BOOL bSecondary)
if ( bPrimary )
{
truck = m_object->RetTruck();
- if ( truck != 0 ) // objet porté ?
+ if ( truck != 0 ) // objet port� ?
{
if ( truck->RetPower() == m_object )
{
@@ -1506,18 +1520,18 @@ void CPyro::DeleteObject(BOOL bPrimary, BOOL bSecondary)
}
}
-// (*) CObject::DeleteObject peut remettre à zéro m_object
+// (*) CObject::DeleteObject peut remettre � z�ro m_object
// par le biais de CPyro::CutObjectLink !
-// Vide la table des opérations d'animation de la lumière.
+// Vide la table des op�rations d'animation de la lumi�re.
void CPyro::LightOperFlush()
{
m_lightOperTotal = 0;
}
-// Ajoute une opération d'animation de la lumière.
+// Ajoute une op�ration d'animation de la lumi�re.
void CPyro::LightOperAdd(float progress, float intensity,
float r, float g, float b)
@@ -1535,7 +1549,7 @@ void CPyro::LightOperAdd(float progress, float intensity,
m_lightOperTotal ++;
}
-// Fait évoluer la lumière associée.
+// Fait �voluer la lumi�re associ�e.
void CPyro::LightOperFrame(float rTime)
{
@@ -1562,7 +1576,7 @@ void CPyro::LightOperFrame(float rTime)
}
-// Crée la lumière pour accompagner un effet pyrotechnique.
+// Cr�e la lumi�re pour accompagner un effet pyrotechnique.
BOOL CPyro::CreateLight(D3DVECTOR pos, float height)
{
@@ -1594,14 +1608,14 @@ BOOL CPyro::CreateLight(D3DVECTOR pos, float height)
m_light->SetLight(m_lightRank, light);
m_light->SetLightIntensity(m_lightRank, 0.0f);
- // N'éclaire que les objets du terrain.
+ // N'�claire que les objets du terrain.
m_light->SetLightIncluType(m_lightRank, TYPETERRAIN);
return TRUE;
}
-// Démarre l'explosion d'un véhicule.
+// D�marre l'explosion d'un v�hicule.
void CPyro::ExploStart()
{
@@ -1621,7 +1635,7 @@ void CPyro::ExploStart()
if ( m_object->RetSelect() )
{
- m_object->SetSelect(FALSE); // désélectionne l'objet
+ m_object->SetSelect(FALSE); // d�s�lectionne l'objet
m_camera->SetType(CAMERA_EXPLO);
m_main->DeselectAll();
}
@@ -1661,10 +1675,10 @@ void CPyro::ExploStart()
}
m_engine->LoadTexture("dirty04.tga", 1);
- DeleteObject(FALSE, TRUE); // détruit l'objet transporté + la pile
+ DeleteObject(FALSE, TRUE); // d�truit l'objet transport� + la pile
}
-// Termine l'explosion d'un véhicule.
+// Termine l'explosion d'un v�hicule.
void CPyro::ExploTerminate()
{
@@ -1672,7 +1686,7 @@ void CPyro::ExploTerminate()
}
-// Démarre le feu d'un véhicule.
+// D�marre le feu d'un v�hicule.
void CPyro::BurnStart()
{
@@ -1689,7 +1703,7 @@ void CPyro::BurnStart()
if ( m_object->RetSelect() )
{
- m_object->SetSelect(FALSE); // désélectionne l'objet
+ m_object->SetSelect(FALSE); // d�s�lectionne l'objet
m_camera->SetType(CAMERA_EXPLO);
m_main->DeselectAll();
}
@@ -1802,7 +1816,7 @@ void CPyro::BurnStart()
}
BurnAddPart(0, pos, angle); // mouvement de la partie principale
- m_burnKeepPart[0] = -1; // rien à garder
+ m_burnKeepPart[0] = -1; // rien � garder
if ( m_burnType == OBJECT_DERRICK )
{
@@ -1869,7 +1883,7 @@ void CPyro::BurnStart()
angle.x = (Rand()-0.5f)*0.2f;
angle.y = (Rand()-0.5f)*0.2f;
angle.z = 0.0f;
- BurnAddPart(1, pos, angle); // descend l'anémomètre
+ BurnAddPart(1, pos, angle); // descend l'an�mom�tre
}
if ( m_burnType == OBJECT_RADAR )
@@ -2145,7 +2159,7 @@ void CPyro::BurnStart()
}
}
-// Ajoute une partie à bouger.
+// Ajoute une partie � bouger.
void CPyro::BurnAddPart(int part, D3DVECTOR pos, D3DVECTOR angle)
{
@@ -2161,7 +2175,7 @@ void CPyro::BurnAddPart(int part, D3DVECTOR pos, D3DVECTOR angle)
m_burnPartTotal ++;
}
-// Fait progresser le feu d'un véhicule.
+// Fait progresser le feu d'un v�hicule.
void CPyro::BurnProgress()
{
@@ -2172,7 +2186,7 @@ void CPyro::BurnProgress()
if ( m_burnType == OBJECT_TEEN31 ) // basket ?
{
- m_object->SetZoomY(0, 1.0f-m_progress*0.5f); // léger applatissement
+ m_object->SetZoomY(0, 1.0f-m_progress*0.5f); // l�ger applatissement
}
for ( i=0 ; i<m_burnPartTotal ; i++ )
@@ -2197,7 +2211,7 @@ void CPyro::BurnProgress()
}
}
-// Indique si une partie doit être conservée.
+// Indique si une partie doit �tre conserv�e.
BOOL CPyro::BurnIsKeepPart(int part)
{
@@ -2208,16 +2222,16 @@ BOOL CPyro::BurnIsKeepPart(int part)
{
if ( part == m_burnKeepPart[i++] ) return TRUE; // faut garder
}
- return FALSE; // faut détruire
+ return FALSE; // faut d�truire
}
-// Termine le feu d'un insecte ou d'un véhicule.
+// Termine le feu d'un insecte ou d'un v�hicule.
void CPyro::BurnTerminate()
{
int i, objRank;
- if ( m_type == PT_BURNO ) // brûle objet organique ?
+ if ( m_type == PT_BURNO ) // br�le objet organique ?
{
DeleteObject(TRUE, TRUE); // supprime l'insecte
return;
@@ -2232,7 +2246,7 @@ void CPyro::BurnTerminate()
m_object->DeletePart(i);
}
- DeleteObject(FALSE, TRUE); // détruit l'objet transporté + la pile
+ DeleteObject(FALSE, TRUE); // d�truit l'objet transport� + la pile
if ( m_burnType == OBJECT_DERRICK ||
m_burnType == OBJECT_STATION ||
@@ -2253,20 +2267,20 @@ void CPyro::BurnTerminate()
m_burnType == OBJECT_START ||
m_burnType == OBJECT_END )
{
- m_object->SetType(OBJECT_RUINfactory); // ça devient une ruine
+ m_object->SetType(OBJECT_RUINfactory); // �a devient une ruine
m_object->SetLock(FALSE);
}
else
{
- m_object->SetType(OBJECT_RUINmobilew1); // ça devient une ruine
+ m_object->SetType(OBJECT_RUINmobilew1); // �a devient une ruine
m_object->SetLock(FALSE);
}
- m_object->SetBurn(FALSE); // ruine utilisable (c-à-d. récupérable)
+ m_object->SetBurn(FALSE); // ruine utilisable (c-�-d. r�cup�rable)
}
-// Début d'un objet fret qui tombe.
+// D�but d'un objet fret qui tombe.
void CPyro::FallStart()
{
@@ -2281,7 +2295,7 @@ void CPyro::FallStart()
m_bFallEnding = FALSE;
}
-// Cherche un objet à exploser par le boulet de l'abeille qui tombe.
+// Cherche un objet � exploser par le boulet de l'abeille qui tombe.
CObject* CPyro::FallSearchBeeExplo()
{
@@ -2348,7 +2362,7 @@ CObject* CPyro::FallSearchBeeExplo()
oType != OBJECT_POWER &&
oType != OBJECT_ATOMIC ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
oPos = pObj->RetPosition(0);
@@ -2365,12 +2379,12 @@ CObject* CPyro::FallSearchBeeExplo()
if ( distance < 25.0f ) return pObj;
}
- // Test au centre de l'objet, ce qui est nécessaire pour
- // les objets qui n'ont pas de sphère au centre (station).
+ // Test au centre de l'objet, ce qui est n�cessaire pour
+ // les objets qui n'ont pas de sph�re au centre (station).
distance = Length(oPos, iPos)-4.0f;
if ( distance < 5.0f ) return pObj;
- // Test avec toutes les sphères de l'objet.
+ // Test avec toutes les sph�res de l'objet.
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
{
@@ -2416,14 +2430,14 @@ void CPyro::FallProgress(float rTime)
pObj = FallSearchBeeExplo();
if ( pObj == 0 )
{
- if ( bFloor ) // arrivé au niveau du sol ?
+ if ( bFloor ) // arriv� au niveau du sol ?
{
- m_object->ExploObject(EXPLO_BOUM, 0.0f); // démarre explosion
+ m_object->ExploObject(EXPLO_BOUM, 0.0f); // d�marre explosion
}
}
else
{
- if ( pObj->RetShieldRadius() > 0.0f ) // protégé par bouclier ?
+ if ( pObj->RetShieldRadius() > 0.0f ) // prot�g� par bouclier ?
{
m_particule->CreateParticule(pos, D3DVECTOR(0.0f, 0.0f, 0.0f), FPOINT(6.0f, 6.0f), PARTIGUNDEL, 2.0f, 0.0f, 0.0f);
m_sound->Play(SOUND_GUNDEL);
@@ -2432,13 +2446,13 @@ void CPyro::FallProgress(float rTime)
}
else
{
- if ( pObj->ExploObject(EXPLO_BOUM, 1.0f) ) // démarre explosion
+ if ( pObj->ExploObject(EXPLO_BOUM, 1.0f) ) // d�marre explosion
{
DeleteObject(TRUE, TRUE); // supprime le boulet
}
else
{
- m_object->ExploObject(EXPLO_BOUM, 0.0f); // démarre explosion
+ m_object->ExploObject(EXPLO_BOUM, 0.0f); // d�marre explosion
}
}
}
@@ -2451,7 +2465,7 @@ void CPyro::FallProgress(float rTime)
}
}
-// Indique si la chute est terminée.
+// Indique si la chute est termin�e.
Error CPyro::FallIsEnded()
{
diff --git a/src/pyro.h b/src/pyro.h
index cfab33a..1b2bebe 100644
--- a/src/pyro.h
+++ b/src/pyro.h
@@ -1,4 +1,18 @@
-// pyro.h
+// * 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 .
#ifndef _PYRO_H_
#define _PYRO_H_
@@ -31,19 +45,19 @@ enum PyroType
PT_SHOTM = 11, // coup pondeuse
PT_SHOTW = 12, // coup sous l'eau
PT_EGG = 13, // casse l'oeuf
- PT_BURNT = 14, // brûle objet technique
- PT_BURNO = 15, // brûle objet organique
- PT_SPIDER = 16, // explosion araignée
+ PT_BURNT = 14, // br�le objet technique
+ PT_BURNO = 15, // br�le objet organique
+ PT_SPIDER = 16, // explosion araign�e
PT_FALL = 17, // fret qui tombe
PT_WPCHECK = 18, // indicateur atteint
- PT_FLCREATE = 19, // drapeau créé
- PT_FLDELETE = 20, // drapeau détruit
+ PT_FLCREATE = 19, // drapeau cr��
+ PT_FLDELETE = 20, // drapeau d�truit
PT_RESET = 21, // reset position de l'objet
PT_WIN = 22, // feu d'artifice
- PT_LOST = 23, // fumée noire
+ PT_LOST = 23, // fum�e noire
PT_DEADG = 24, // mort par balle
- PT_DEADW = 25, // mort noyé
- PT_FINDING = 26, // objet découvert
+ PT_DEADW = 25, // mort noy�
+ PT_FINDING = 26, // objet d�couvert
};
@@ -149,7 +163,7 @@ protected:
float m_fallBulletTime;
BOOL m_bFallEnding;
- int m_crashSphereUsed; // nb de sphères utilisées
+ int m_crashSphereUsed; // nb de sph�res utilis�es
D3DVECTOR m_crashSpherePos[50];
float m_crashSphereRadius[50];
};
diff --git a/src/resource.h b/src/resource.h
index 0daaca6..f8497ac 100644
--- a/src/resource.h
+++ b/src/resource.h
@@ -1,7 +1,18 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by winmain.rc
-//
+// * 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 IDI_MAIN_ICON 101
#define IDR_MAIN_ACCEL 113
#define IDR_MENU 141
diff --git a/src/restext-old.cpp b/src/restext-old.cpp
index 073692d..e1e881c 100644
--- a/src/restext-old.cpp
+++ b/src/restext-old.cpp
@@ -1,4 +1,18 @@
-// restext.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
@@ -773,7 +787,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_NOTERM ) strcpy(text, "Instructions after the final closing brace");
if ( num == TX_CLOSEBLK ) strcpy(text, "End of block missing");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" without corresponding ""if"" ");
- if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//début d'un bloc attendu?
+ if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//d�but d'un bloc attendu?
if ( num == TX_BADTYPE ) strcpy(text, "Wrong type for the assignment");
if ( num == TX_REDEFVAR ) strcpy(text, "A variable can not be declared twice");
if ( num == TX_BAD2TYPE ) strcpy(text, "The types of the two operands are incompatible ");
@@ -782,7 +796,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_WHILE ) strcpy(text, "Keyword ""while"" missing");
if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" outside a loop");
if ( num == TX_LABEL ) strcpy(text, "A label must be followed by ""for"", ""while"", ""do"" or ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette étiquette n'existe pas
+ if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette �tiquette n'existe pas
if ( num == TX_NOCASE ) strcpy(text, "Instruction ""case"" missing");
if ( num == TX_BADNUM ) strcpy(text, "Number missing");
if ( num == TX_VOID ) strcpy(text, "Void parameter");
@@ -808,7 +822,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_NOPUBLIC ) strcpy(text, "Public required");
if ( num == TX_DIVZERO ) strcpy(text, "Dividing through zero");
if ( num == TX_NOTINIT ) strcpy(text, "Variable not initialized");
- if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, ça?
+ if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, �a?
if ( num == TX_NORETVAL ) strcpy(text, "The function returned no value ");
if ( num == TX_NORUN ) strcpy(text, "No function running");
if ( num == TX_NOCALL ) strcpy(text, "Calling an unknown function");
@@ -953,7 +967,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
#endif
if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom");
if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Taille maximale");
- if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille réduite");
+ if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille r�duite");
if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Taille normale");
if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Fermer");
@@ -966,35 +980,35 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT");
if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT");
if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmation");
- if ( num == RT_TITLE_DEFI ) strcpy(text, "Défis");
+ if ( num == RT_TITLE_DEFI ) strcpy(text, "D�fis");
if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions");
if ( num == RT_TITLE_FREE ) strcpy(text, "Jeu libre");
- if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux supplémentaires");
+ if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux suppl�mentaires");
if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes");
if ( num == RT_TITLE_SETUP ) strcpy(text, "Options");
if ( num == RT_TITLE_NAME ) strcpy(text, "Nom du joueur");
if ( num == RT_TITLE_PERSO ) strcpy(text, "Personnalisation de votre apparence");
if ( num == RT_TITLE_WRITE ) strcpy(text, "Enregistrement de la mission en cours");
- if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistrée");
+ if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistr�e");
if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste des chapitres :");
if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste des chapitres :");
- if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des planètes :");
- if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des planètes :");
- if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux supplémentaires :");
- if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des planètes :");
+ if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plan�tes :");
+ if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plan�tes :");
+ if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux suppl�mentaires :");
+ if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plan�tes :");
if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste des exercices du chapitre :");
- if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des défis du chapitre :");
+ if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des d�fis du chapitre :");
if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste des missions du chapitre :");
if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste des jeux libres du chapitre :");
if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions du niveau :");
if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste des prototypes du chapitre :");
- if ( num == RT_PLAY_RESUME ) strcpy(text, " Résumé :");
+ if ( num == RT_PLAY_RESUME ) strcpy(text, " R�sum� :");
if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :");
- if ( num == RT_SETUP_MODE ) strcpy(text, " Résolutions :");
- if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche à redéfinir.");
- if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhaitée.");
+ if ( num == RT_SETUP_MODE ) strcpy(text, " R�solutions :");
+ if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche � red�finir.");
+ if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhait�e.");
if ( num == RT_PERSO_FACE ) strcpy(text, "Type de visage :");
if ( num == RT_PERSO_GLASSES ) strcpy(text, "Lunettes :");
@@ -1009,19 +1023,19 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_DIALOG_NO ) strcpy(text, "Continuer\\Continuer la mission en cours");
if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quitter\\Quitter COLOBOT");
if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continuer\\Continuer de jouer");
- if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment détruire le bâtiment sélectionné ?");
- if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous détruire les sauvegardes de %s ?");
- if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Détruire");
+ if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment d�truire le b�timent s�lectionn� ?");
+ if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous d�truire les sauvegardes de %s ?");
+ if ( num == RT_DIALOG_YESDEL ) strcpy(text, "D�truire");
if ( num == RT_DIALOG_NODEL ) strcpy(text, "Annuler");
if ( num == RT_DIALOG_LOADING ) strcpy(text, "CHARGEMENT");
- if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-clé (\\key cbot;)");
+ if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl� (\\key cbot;)");
if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 erreur)");
- if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme terminé");
+ if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin�");
if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Listes des objets\n");
if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Listes des robots\n");
- if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des bâtiments\n");
+ if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des b�timents\n");
if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes des objets transportables\n");
if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes des ennemis\n");
if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (aucun)\\n;\n");
@@ -1033,12 +1047,12 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_IO_LIST ) strcpy(text, "Dossier: %s");
if ( num == RT_IO_NAME ) strcpy(text, "Nom:");
if ( num == RT_IO_DIR ) strcpy(text, "Dans:");
- if ( num == RT_IO_PRIVATE ) strcpy(text, "Privé\\Dossier privé");
- if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun à tous les joueurs");
+ if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv�\\Dossier priv�");
+ if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun � tous les joueurs");
- if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Développé par :");
+ if ( num == RT_GENERIC_DEV1 ) strcpy(text, "D�velopp� par :");
if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com");
- if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version française éditée par :");
+ if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version fran�aise �dit�e par :");
if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.alsyd.com");
}
@@ -1047,83 +1061,83 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_BUTTON_OK ) strcpy(text, "D'accord");
if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Annuler");
if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Suivant");
- if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Précédent");
+ if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Pr�c�dent");
if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)");
if ( num == EVENT_DIALOG_OK ) strcpy(text, "D'accord");
if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Annuler");
if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmation\\Exercices de programmation");
- if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Défis\\Défis de programmation");
+ if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "D�fis\\D�fis de programmation");
if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\La grande aventure");
- if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but précis");
- if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux supplémentaires");
- if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'élaboration");
+ if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis");
+ if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux suppl�mentaires");
+ if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'�laboration");
if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Autre joueur\\Choix du nom du joueur");
- if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Réglages");
- if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au début");
+ if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\R�glages");
+ if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au d�but");
if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Enregistrer\\Enregistrer la mission en cours");
- if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistrée");
+ if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistr�e");
if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans COLOBOT");
if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter COLOBOT");
- if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau précédent");
- if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\Démarrer l'action");
- if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et résolution d'affichage");
+ if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau pr�c�dent");
+ if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\D�marrer l'action");
+ if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et r�solution d'affichage");
if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphique\\Options graphiques");
- if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilité");
+ if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit�");
if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Commandes\\Touches du clavier");
if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Son\\Volumes bruitages & musiques");
- if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unité");
- if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Résolution");
- if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein écran\\Plein écran ou fenêtré");
- if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectués");
+ if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit�");
+ if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "R�solution");
+ if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein �cran\\Plein �cran ou fen�tr�");
+ if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectu�s");
if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Votre assistant");
- if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projetées au sol");
- if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessinées sur le sol");
- if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et bâtiments");
+ if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projet�es au sol");
+ if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessin�es sur le sol");
+ if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et b�timents");
if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Brouillard\\Nappes de brouillard");
if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Rayons du soleil\\Rayons selon l'orientation");
if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Ciel\\Ciel et nuages");
- if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planètes et étoiles\\Motifs mobiles dans le ciel");
- if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumières dynamiques\\Eclairages mobiles");
- if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantité de particules\\Explosions, poussières, reflets, etc.");
+ if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plan�tes et �toiles\\Motifs mobiles dans le ciel");
+ if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumi�res dynamiques\\Eclairages mobiles");
+ if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit� de particules\\Explosions, poussi�res, reflets, etc.");
if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Profondeur de champ\\Distance de vue maximale");
- if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Détails des objets\\Qualité des objets en 3D");
- if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualité des textures\\Qualité des images");
- if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nombre d'objets décoratifs\\Qualité d'objets non indispensables");
+ if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "D�tails des objets\\Qualit� des objets en 3D");
+ if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit� des textures\\Qualit� des images");
+ if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nombre d'objets d�coratifs\\Qualit� d'objets non indispensables");
if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particules dans l'interface\\Pluie de particules");
if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflets sur les boutons\\Boutons brillants");
if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Bulles d'aide\\Bulles explicatives");
- if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Séquences cinématiques\\Films avant ou après une mission");
- if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour animé\\Retour animé dans les exercices");
- if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Dégâts à soi-même\\Vos tirs infligent des dommages à vos unités");
- if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Défilement dans les bords\\Défilement lorsque la souris touches les bords gauche ou droite");
+ if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "S�quences cin�matiques\\Films avant ou apr�s une mission");
+ if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim�\\Retour anim� dans les exercices");
+ if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "D�g�ts � soi-m�me\\Vos tirs infligent des dommages � vos unit�s");
+ if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "D�filement dans les bords\\D�filement lorsque la souris touches les bords gauche ou droite");
if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord");
if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord");
- if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'écran vibre lors d'une explosion");
- if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombrée\\Jolie souris avec une ombre");
- if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'édition d'un programme");
+ if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'�cran vibre lors d'une explosion");
+ if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombr�e\\Jolie souris avec une ombre");
+ if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'�dition d'un programme");
if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Grande indentation\\Indente avec 2 ou 4 espaces");
- if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout réinitialiser\\Remet toutes les touches standards");
- if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner à gauche\\Moteur à gauche");
- if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner à droite\\Moteur à droite");
+ if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout r�initialiser\\Remet toutes les touches standards");
+ if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner � gauche\\Moteur � gauche");
+ if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner � droite\\Moteur � droite");
if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Avancer\\Moteur en avant");
- if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arrière");
- if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du réacteur");
- if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du réacteur");
- if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de caméra\\Autre de point de vue");
- if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Sélection précédente\\Sélectionne l'objet précédent");
+ if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arri�re");
+ if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du r�acteur");
+ if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du r�acteur");
+ if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de cam�ra\\Autre de point de vue");
+ if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "S�lection pr�c�dente\\S�lectionne l'objet pr�c�dent");
if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Action standard\\Action du bouton avec le cadre rouge");
- if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Caméra plus proche\\Avance la caméra");
- if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Caméra plus loin\\Recule la caméra");
- if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Sélectionner l'objet suivant\\Sélectionner l'objet suivant");
- if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Sélectionner le cosmonaute\\Sélectionner le cosmonaute");
+ if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Cam�ra plus proche\\Avance la cam�ra");
+ if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Cam�ra plus loin\\Recule la cam�ra");
+ if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "S�lectionner l'objet suivant\\S�lectionner l'objet suivant");
+ if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "S�lectionner le cosmonaute\\S�lectionner le cosmonaute");
if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quitter la mission en cours\\Terminer un exercice ou une mssion");
- if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche à suivre");
+ if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche � suivre");
if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Instructions programmation\\Explication sur la programmation");
- if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-clé\\Explication sur le mot-clé");
+ if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl�\\Explication sur le mot-cl�");
if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Montrer le lieu d'un message\\Montrer le lieu du dernier message");
if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Vitesse 1.0x\\Vitesse normale");
if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Vitesse 1.5x\\Une fois et demi plus rapide");
@@ -1134,38 +1148,38 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Fond sonore :\\Volume des pistes audio du CD");
if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Bruitages 3D\\Positionnement sonore dans l'espace");
- if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualité minimale (+ rapide)");
- if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualité standard");
- if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualité (+ lent)");
+ if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit� minimale (+ rapide)");
+ if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit� standard");
+ if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit� (+ lent)");
if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Silencieux\\Totalement silencieux");
if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Niveaux normaux");
if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Utilise un joystick\\Joystick ou clavier");
- if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Accès à la solution\\Donne la solution");
+ if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Acc�s � la solution\\Donne la solution");
- if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur à créer");
+ if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur � cr�er");
if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "D'accord\\Choisir le joueur");
if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Annuler\\Conserver le joueur actuel");
if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Supprimer le joueur\\Supprimer le joueur de la liste");
if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Nom du joueur");
if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Enregistrer\\Enregistrer la mission en cours");
- if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission sélectionnée");
- if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistrées");
+ if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission s�lectionn�e");
+ if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistr�es");
if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nom du fichier :");
if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nom de la mission");
if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Vue de la mission");
- if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement sélectionné");
+ if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement s�lectionn�");
if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aspect\\Choisir votre aspect");
if ( num == EVENT_INTERFACE_POK ) strcpy(text, "D'accord");
if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Annuler");
if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Remet les couleurs standards");
- if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Tête\\Visage et cheveux");
+ if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "T�te\\Visage et cheveux");
if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Corps\\Combinaison");
- if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation à gauche");
- if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation à droite");
+ if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation � gauche");
+ if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation � droite");
if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rouge");
if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Vert");
if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Bleu");
@@ -1183,57 +1197,57 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Lunettes 4");
if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Lunettes 5");
- if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Sélection précédente (\\key desel;)");
- if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne à gauche (\\key left;)");
- if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne à droite (\\key right;)");
+ if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "S�lection pr�c�dente (\\key desel;)");
+ if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne � gauche (\\key left;)");
+ if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne � droite (\\key right;)");
if ( num == EVENT_OBJECT_UP ) strcpy(text, "Avance (\\key up;)");
if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Recule (\\key down;)");
if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Monte (\\key gup;)");
if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Descend (\\key gdown;)");
- if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou dépose (\\key action;)");
- if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou dépose (\\key action;)");
+ if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)");
+ if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)");
if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..devant");
- if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derrière");
+ if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derri�re");
if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..pile");
if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions sur la mission (\\key help;)");
- if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Décolle pour terminer la mission");
+ if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "D�colle pour terminer la mission");
if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Construit un derrick");
if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Construit une station");
if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Construit une fabrique de robots");
- if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de réparation");
+ if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de r�paration");
if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Construit un convertisseur");
if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Construit une tour");
if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Construit un centre de recherches");
if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Construit un radar");
if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Construit une fabrique de piles");
if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Construit un laboratoire");
- if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucléaire");
+ if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucl�aire");
if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Construit un paratonnerre");
if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Construit une borne d'information");
if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Montre si le sol est plat");
if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Pose un drapeau de couleur");
- if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enlève un drapeau");
+ if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enl�ve un drapeau");
if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Drapeaux bleus");
if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Drapeaux rouges");
if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Drapeaux verts");
if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Drapeaux jaunes");
if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Drapeaux violets");
- if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un déménageur volant");
- if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un déménageur à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un déménageur à roues");
- if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un déménageur à pattes");
+ if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un d�m�nageur volant");
+ if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un d�m�nageur � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un d�m�nageur � roues");
+ if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un d�m�nageur � pattes");
if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Fabrique un shooter volant");
- if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter à roues");
- if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter à pattes");
+ if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter � roues");
+ if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter � pattes");
if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Fabrique un orgaShooter volant");
- if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter à roues");
- if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter à pattes");
+ if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter � roues");
+ if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter � pattes");
if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Fabrique un renifleur volant");
- if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur à chenilles");
- if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur à roues");
- if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur à pattes");
+ if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur � roues");
+ if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur � pattes");
if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Fabrique un robot secoueur");
if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Fabrique un robot phazer");
if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Fabrique un robot recycleur");
@@ -1243,37 +1257,37 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Recherche les robots volants");
if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Recherche le secoueur");
if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Recherche le canon shooter");
- if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de défense");
+ if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de d�fense");
if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Recherche le canon phazer");
if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Recherche le bouclier");
- if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucléaire");
+ if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucl�aire");
if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Recherche les pattes");
if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Recherche le canon orgaShooter");
- if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au départ");
+ if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au d�part");
if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Cherche (\\key action;)");
if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Secoue (\\key action;)");
if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Tir (\\key action;)");
if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)");
- if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Déploie le bouclier (\\key action;)");
+ if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "D�ploie le bouclier (\\key action;)");
if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Stoppe le bouclier (\\key action;)");
if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Rayon du bouclier");
- if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Exécute le programme sélectionné");
- if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme sélectionné");
+ if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Ex�cute le programme s�lectionn�");
+ if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme s�lectionn�");
if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Mettre le SatCom en veille");
- if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Démolit le bâtiment");
- if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'énergie");
+ if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "D�molit le b�timent");
+ if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'�nergie");
if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Niveau du bouclier");
- if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Température du réacteur");
+ if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temp�rature du r�acteur");
if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Travail en cours ...");
- if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes détectés");
- if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffusées");
+ if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes d�tect�s");
+ if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffus�es");
if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Boussole");
//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-carte");
if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-carte");
- if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Caméra (\\key camera;)");
- if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la sélection");
+ if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Cam�ra (\\key camera;)");
+ if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la s�lection");
if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Donne la solution");
- if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> bâtiments");
+ if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> b�timents");
if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action");
if ( num == EVENT_DT_VISIT0 ||
num == EVENT_DT_VISIT1 ||
@@ -1284,7 +1298,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_CMD ) strcpy(text, "Console de commande");
if ( num == EVENT_SPEED ) strcpy(text, "Vitesse du jeu");
- if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page précédente");
+ if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page pr�c�dente");
if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Page suivante");
if ( num == EVENT_HYPER_HOME ) strcpy(text, "Page initiale");
if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copier");
@@ -1295,9 +1309,9 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Taille 5");
if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions de Houston");
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite");
- if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoyés par Houston");
+ if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoy�s par Houston");
if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste des objets");
- if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide à la programmation");
+ if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide � la programmation");
if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution");
if ( num == EVENT_STUDIO_OK ) strcpy(text, "D'accord\\Compiler le programme");
@@ -1309,11 +1323,11 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Couper (Ctrl+x)");
if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copier (Ctrl+c)");
if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Coller (Ctrl+v)");
- if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caractères");
+ if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caract�res");
if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)");
- if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide à la programmation (\\key prog;)");
+ if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide � la programmation (\\key prog;)");
if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compiler");
- if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Démarrer/stopper");
+ if ( num == EVENT_STUDIO_RUN ) strcpy(text, "D�marrer/stopper");
if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continuer");
if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Un pas");
}
@@ -1324,35 +1338,35 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_BASE ) strcpy(text, "Vaisseau spatial");
if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick");
if ( num == OBJECT_FACTORY ) strcpy(text, "Fabrique de robots");
- if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de réparation");
+ if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de r�paration");
if ( num == OBJECT_STATION ) strcpy(text, "Station de recharge");
if ( num == OBJECT_CONVERT ) strcpy(text, "Conversion minerai en titanium");
- if ( num == OBJECT_TOWER ) strcpy(text, "Tour de défense");
+ if ( num == OBJECT_TOWER ) strcpy(text, "Tour de d�fense");
if ( num == OBJECT_NEST ) strcpy(text, "Nid");
if ( num == OBJECT_RESEARCH ) strcpy(text, "Centre de recherches");
if ( num == OBJECT_RADAR ) strcpy(text, "Radar");
if ( num == OBJECT_INFO ) strcpy(text, "Borne d'information");
if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles");
- if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de matières organiques");
- if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucléaire");
+ if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de mati�res organiques");
+ if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucl�aire");
if ( num == OBJECT_PARA ) strcpy(text, "Paratonnerre");
if ( num == OBJECT_SAFE ) strcpy(text, "Coffre-fort");
- if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contrôle");
+ if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contr�le");
if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible");
if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible");
- if ( num == OBJECT_START ) strcpy(text, "Départ");
+ if ( num == OBJECT_START ) strcpy(text, "D�part");
if ( num == OBJECT_END ) strcpy(text, "But");
if ( num == OBJECT_STONE ) strcpy(text, "Minerai de titanium");
if ( num == OBJECT_URANIUM ) strcpy(text, "Minerai d'uranium");
- if ( num == OBJECT_BULLET ) strcpy(text, "Matière organique");
+ if ( num == OBJECT_BULLET ) strcpy(text, "Mati�re organique");
if ( num == OBJECT_METAL ) strcpy(text, "Titanium");
if ( num == OBJECT_POWER ) strcpy(text, "Pile normale");
- if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucléaire");
- if ( num == OBJECT_BBOX ) strcpy(text, "Boîte noire");
- if ( num == OBJECT_KEYa ) strcpy(text, "Clé A");
- if ( num == OBJECT_KEYb ) strcpy(text, "Clé B");
- if ( num == OBJECT_KEYc ) strcpy(text, "Clé C");
- if ( num == OBJECT_KEYd ) strcpy(text, "Clé D");
+ if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucl�aire");
+ if ( num == OBJECT_BBOX ) strcpy(text, "Bo�te noire");
+ if ( num == OBJECT_KEYa ) strcpy(text, "Cl� A");
+ if ( num == OBJECT_KEYb ) strcpy(text, "Cl� B");
+ if ( num == OBJECT_KEYc ) strcpy(text, "Cl� C");
+ if ( num == OBJECT_KEYd ) strcpy(text, "Cl� D");
if ( num == OBJECT_TNT ) strcpy(text, "Explosif");
if ( num == OBJECT_BOMB ) strcpy(text, "Mine fixe");
if ( num == OBJECT_BAG ) strcpy(text, "Sac de survie");
@@ -1364,19 +1378,19 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_FLAGv ) strcpy(text, "Drapeau violet");
if ( num == OBJECT_MARKPOWER ) strcpy(text, "Emplacement pour station");
if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Emplacement pour derrick (uranium)");
- if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (clé A)");
- if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (clé B)");
- if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (clé C)");
- if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (clé D)");
+ if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl� A)");
+ if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl� B)");
+ if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl� C)");
+ if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl� D)");
if ( num == OBJECT_MARKSTONE ) strcpy(text, "Emplacement pour derrick (titanium)");
- if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot déménageur");
+ if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot d�m�nageur");
if ( num == OBJECT_MOBILEfc ) strcpy(text, "Robot shooter");
if ( num == OBJECT_MOBILEtc ) strcpy(text, "Robot shooter");
if ( num == OBJECT_MOBILEwc ) strcpy(text, "Robot shooter");
@@ -1394,14 +1408,14 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_MOBILErr ) strcpy(text, "Robot recycleur");
if ( num == OBJECT_MOBILErs ) strcpy(text, "Robot bouclier");
if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot sous-marin");
- if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entraînement");
+ if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entra�nement");
if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName);
if ( num == OBJECT_TECH ) strcpy(text, "Technicien");
if ( num == OBJECT_TOTO ) strcpy(text, "Robbie");
if ( num == OBJECT_MOTHER ) strcpy(text, "Pondeuse");
if ( num == OBJECT_ANT ) strcpy(text, "Fourmi");
- if ( num == OBJECT_SPIDER ) strcpy(text, "Araignée");
- if ( num == OBJECT_BEE ) strcpy(text, "Guêpe");
+ if ( num == OBJECT_SPIDER ) strcpy(text, "Araign�e");
+ if ( num == OBJECT_BEE ) strcpy(text, "Gu�pe");
if ( num == OBJECT_WORM ) strcpy(text, "Ver");
if ( num == OBJECT_EGG ) strcpy(text, "Oeuf");
if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Epave de robot");
@@ -1410,11 +1424,11 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Epave de robot");
if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Epave de robot");
if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Epave de robot");
- if ( num == OBJECT_RUINfactory ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINdoor ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINsupport ) strcpy(text, "Déchet");
- if ( num == OBJECT_RUINradar ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINconvert ) strcpy(text, "Bâtiment en ruine");
+ if ( num == OBJECT_RUINfactory ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINdoor ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINsupport ) strcpy(text, "D�chet");
+ if ( num == OBJECT_RUINradar ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINconvert ) strcpy(text, "B�timent en ruine");
if ( num == OBJECT_RUINbase ) strcpy(text, "Epave de vaisseau spatial");
if ( num == OBJECT_RUINhead ) strcpy(text, "Epave de vaisseau spatial");
if ( num == OBJECT_APOLLO1 ||
@@ -1428,204 +1442,204 @@ BOOL GetResourceBase(ResType type, int num, char* text)
{
strcpy(text, "Erreur");
if ( num == ERR_CMD ) strcpy(text, "Commande inconnue");
- if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas installé.");
+ if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install�.");
if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de COLOBOT\net relancer le jeu.");
- if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapté");
+ if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt�");
if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte déjà quelque chose");
- if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien à prendre");
+ if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte d�j� quelque chose");
+ if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien � prendre");
if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible en mouvement");
- if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occupé");
+ if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup�");
if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Pas d'autre robot");
if ( num == ERR_MANIP_RADIO ) strcpy(text, "Vous ne pouvez pas transporter un objet radioactif");
if ( num == ERR_MANIP_WATER ) strcpy(text, "Vous ne pouvez pas transporter un objet sous l'eau");
- if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien à déposer");
+ if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien � d�poser");
if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible en vol");
if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible sous l'eau");
- if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'énergie");
+ if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'�nergie");
if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium trop loin");
if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium trop proche");
if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Titanium inexistant");
if ( num == ERR_BUILD_FLAT ) strcpy(text, "Sol pas assez plat");
if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Sol plat pas assez grand");
- if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occupé");
+ if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup�");
if ( num == ERR_BUILD_BASE ) strcpy(text, "Trop proche du vaisseau spatial");
- if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un bâtiment");
+ if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un b�timent");
if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible en mouvement");
if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapté");
+ if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt�");
if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible en mouvement");
- if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'énergie");
- if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapté");
- if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Bâtiment trop proche");
+ if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'�nergie");
+ if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt�");
+ if ( num == ERR_TERRA_BUILDING ) strcpy(text, "B�timent trop proche");
if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Objet trop proche");
- if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'énergie");
- if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien à recycler");
- if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'énergie");
- if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Déplacement impossible");
+ if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'�nergie");
+ if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien � recycler");
+ if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'�nergie");
+ if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "D�placement impossible");
if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Chemin introuvable");
if ( num == ERR_GOTO_ITER ) strcpy(text, "Position inaccessible");
- if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occupée");
- if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'énergie");
+ if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occup�e");
+ if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'�nergie");
if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium à convertir");
+ if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium � convertir");
if ( num == ERR_DERRICK_NULL ) strcpy(text, "Pas de minerai en sous-sol");
- if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
+ if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
if ( num == ERR_TOWER_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'énergie");
+ if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'�nergie");
if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'énergie");
+ if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'�nergie");
if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Pas le bon type de pile");
- if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche déjà effectuée");
- if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
- if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'énergie");
- if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium à transformer");
+ if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche d�j� effectu�e");
+ if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
+ if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'�nergie");
+ if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium � transformer");
if ( num == ERR_ENERGY_BAD ) strcpy(text, "Ne transforme que le titanium");
- if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloquées par un robot ou un objet");
- if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir décoller");
- if ( num == ERR_LABO_NULL ) strcpy(text, "Rien à analyser");
- if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la matière organique");
- if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse déjà effectuée");
- if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
- if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'énergie");
- if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium à transformer");
+ if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloqu�es par un robot ou un objet");
+ if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir d�coller");
+ if ( num == ERR_LABO_NULL ) strcpy(text, "Rien � analyser");
+ if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la mati�re organique");
+ if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse d�j� effectu�e");
+ if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
+ if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'�nergie");
+ if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium � transformer");
if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Ne transforme que l'uranium");
if ( num == ERR_FACTORY_NULL ) strcpy(text, "Pas de titanium");
if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Quelque chose est trop proche");
- if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occupé");
- if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouvé de borne d'information");
- if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infecté par un virus");
- if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infecté par un virus, ne fonctionne plus temporairement");
+ if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup�");
+ if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv� de borne d'information");
+ if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect� par un virus");
+ if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect� par un virus, ne fonctionne plus temporairement");
if ( num == ERR_VEH_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'énergie");
+ if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'�nergie");
if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible en vol");
if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible en nageant");
if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible en mouvement");
if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible en portant un objet");
if ( num == ERR_FLAG_CREATE ) strcpy(text, "Trop de drapeaux de cette couleur (maximum 5)");
if ( num == ERR_FLAG_PROXY ) strcpy(text, "Trop proche d'un drapeau existant");
- if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau à proximité");
- if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)");
- if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot détruit");
- if ( num == ERR_DELETEBUILDING ) strcpy(text, "Bâtiment détruit");
- if ( num == ERR_TOOMANY ) strcpy(text, "Création impossible, il y a trop d'objets");
+ if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau � proximit�");
+ if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termin�e (appuyez sur \\key help; pour plus de d�tails)");
+ if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot d�truit");
+ if ( num == ERR_DELETEBUILDING ) strcpy(text, "B�timent d�truit");
+ if ( num == ERR_TOOMANY ) strcpy(text, "Cr�ation impossible, il y a trop d'objets");
- if ( num == INFO_BUILD ) strcpy(text, "Bâtiment terminé");
+ if ( num == INFO_BUILD ) strcpy(text, "B�timent termin�");
if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible");
- if ( num == INFO_RESEARCH ) strcpy(text, "Recherche terminée");
- if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot à chenilles possible");
+ if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termin�e");
+ if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot � chenilles possible");
if ( num == INFO_RESEARCHFLY ) strcpy(text, "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)");
if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Fabrication d'un robot secoueur possible");
if ( num == INFO_RESEARCHCANON ) strcpy(text, "Fabrication de robots shooter possible");
- if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de défense possible");
+ if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de d�fense possible");
if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Fabrication d'un robot phazer possible");
if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Fabrication d'un robot bouclier possible");
- if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucléaire possible");
+ if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucl�aire possible");
if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible");
- if ( num == INFO_LABO ) strcpy(text, "Analyse terminée");
+ if ( num == INFO_LABO ) strcpy(text, "Analyse termin�e");
if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible");
- if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucléaire disponible");
- if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouvé un objet utilisable");
- if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouvé");
- if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission terminée >>>");
- if ( num == INFO_LOST ) strcpy(text, "<<< Désolé, mission échouée >>>");
- if ( num == INFO_LOSTq ) strcpy(text, "<<< Désolé, mission échouée >>>");
- if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectué");
+ if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucl�aire disponible");
+ if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv� un objet utilisable");
+ if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv�");
+ if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termin�e >>>");
+ if ( num == INFO_LOST ) strcpy(text, "<<< D�sol�, mission �chou�e >>>");
+ if ( num == INFO_LOSTq ) strcpy(text, "<<< D�sol�, mission �chou�e >>>");
+ if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu�");
if ( num == INFO_DELETEPATH ) strcpy(text, "Indicateur atteint");
- if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touchée");
- if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touchée");
- if ( num == INFO_DELETEBEE ) strcpy(text, "Guêpe mortellement touchée");
- if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touché");
- if ( num == INFO_DELETESPIDER ) strcpy(text, "Araignée mortellement touchée");
+ if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touch�e");
+ if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touch�e");
+ if ( num == INFO_DELETEBEE ) strcpy(text, "Gu�pe mortellement touch�e");
+ if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch�");
+ if ( num == INFO_DELETESPIDER ) strcpy(text, "Araign�e mortellement touch�e");
if ( num == INFO_BEGINSATCOM ) strcpy(text, "Consultez votre SatCom en appuyant sur \\key help;");
}
if ( type == RES_CBOT )
{
strcpy(text, "Erreur");
- if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenthèse ouvrante");
- if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenthèse fermante");
- if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit être un boolean");
- if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non déclarée");
+ if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenth�se ouvrante");
+ if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenth�se fermante");
+ if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit �tre un boolean");
+ if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non d�clar�e");
if ( num == TX_BADLEFT ) strcpy(text, "Assignation impossible");
- if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouvé");
+ if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv�");
if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch""");
- if ( num == TX_NOTERM ) strcpy(text, "Instructions après la fin");
+ if ( num == TX_NOTERM ) strcpy(text, "Instructions apr�s la fin");
if ( num == TX_CLOSEBLK ) strcpy(text, "Il manque la fin du bloc");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" sans ""if"" correspondant");
- if ( num == TX_OPENBLK ) strcpy(text, "Début d'un bloc attendu");
- if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de résultat pour l'assignation");
- if ( num == TX_REDEFVAR ) strcpy(text, "Redéfinition d'une variable");
- if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux opérandes ne sont pas de types compatibles");
+ if ( num == TX_OPENBLK ) strcpy(text, "D�but d'un bloc attendu");
+ if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de r�sultat pour l'assignation");
+ if ( num == TX_REDEFVAR ) strcpy(text, "Red�finition d'une variable");
+ if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux op�randes ne sont pas de types compatibles");
if ( num == TX_UNDEFCALL ) strcpy(text, "Routine inconnue");
- if ( num == TX_MISDOTS ) strcpy(text, "Séparateur "" : "" attendu");
+ if ( num == TX_MISDOTS ) strcpy(text, "S�parateur "" : "" attendu");
if ( num == TX_WHILE ) strcpy(text, "Manque le mot ""while""");
if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" en dehors d'une boucle");
if ( num == TX_LABEL ) strcpy(text, "Un label ne peut se placer que devant un ""for"", un ""while"", un ""do"" ou un ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "Cette étiquette n'existe pas");
+ if ( num == TX_NOLABEL ) strcpy(text, "Cette �tiquette n'existe pas");
if ( num == TX_NOCASE ) strcpy(text, "Manque une instruction ""case""");
if ( num == TX_BADNUM ) strcpy(text, "Un nombre est attendu");
- if ( num == TX_VOID ) strcpy(text, "Paramètre void");
- if ( num == TX_NOTYP ) strcpy(text, "Déclaration de type attendu");
+ if ( num == TX_VOID ) strcpy(text, "Param�tre void");
+ if ( num == TX_NOTYP ) strcpy(text, "D�claration de type attendu");
if ( num == TX_NOVAR ) strcpy(text, "Nom d'une variable attendu");
if ( num == TX_NOFONC ) strcpy(text, "Nom de la fonction attendu");
- if ( num == TX_OVERPARAM ) strcpy(text, "Trop de paramètres");
- if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe déjà");
- if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de paramètres");
- if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramètre(s)");
- if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de paramètres");
- if ( num == TX_NOITEM ) strcpy(text, "Cet élément n'existe pas dans cette classe");
+ if ( num == TX_OVERPARAM ) strcpy(text, "Trop de param�tres");
+ if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe d�j�");
+ if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de param�tres");
+ if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de param�tre(s)");
+ if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de param�tres");
+ if ( num == TX_NOITEM ) strcpy(text, "Cet �l�ment n'existe pas dans cette classe");
if ( num == TX_DOT ) strcpy(text, "L'objet n'est pas une instance d'une classe");
- if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur approprié");
- if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe déjà");
+ if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri�");
+ if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe d�j�");
if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu");
- if ( num == TX_RESERVED ) strcpy(text, "Ce mot est réservé");
+ if ( num == TX_RESERVED ) strcpy(text, "Ce mot est r�serv�");
if ( num == TX_BADNEW ) strcpy(text, "Mauvais argument pour ""new""");
if ( num == TX_OPBRK ) strcpy(text, """ [ "" attendu");
- if ( num == TX_BADSTRING ) strcpy(text, "Une chaîne de caractère est attendue");
+ if ( num == TX_BADSTRING ) strcpy(text, "Une cha�ne de caract�re est attendue");
if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index");
- if ( num == TX_PRIVATE ) strcpy(text, "Elément protégé");
+ if ( num == TX_PRIVATE ) strcpy(text, "El�ment prot�g�");
if ( num == TX_NOPUBLIC ) strcpy(text, "Public requis");
- if ( num == TX_DIVZERO ) strcpy(text, "Division par zéro");
- if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialisée");
- if ( num == TX_BADTHROW ) strcpy(text, "Valeur négative refusée pour ""throw""");
- if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourné de résultat");
- if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en exécution");
+ if ( num == TX_DIVZERO ) strcpy(text, "Division par z�ro");
+ if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialis�e");
+ if ( num == TX_BADTHROW ) strcpy(text, "Valeur n�gative refus�e pour ""throw""");
+ if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn� de r�sultat");
+ if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en ex�cution");
if ( num == TX_NOCALL ) strcpy(text, "Appel d'une fonction inexistante");
if ( num == TX_NOCLASS ) strcpy(text, "Cette classe n'existe pas");
if ( num == TX_NULLPT ) strcpy(text, "Objet n'existe pas");
- if ( num == TX_OPNAN ) strcpy(text, "Opération sur un ""nan""");
- if ( num == TX_OUTARRAY ) strcpy(text, "Accès hors du tableau");
- if ( num == TX_STACKOVER ) strcpy(text, "Débordement de la pile");
+ if ( num == TX_OPNAN ) strcpy(text, "Op�ration sur un ""nan""");
+ if ( num == TX_OUTARRAY ) strcpy(text, "Acc�s hors du tableau");
+ if ( num == TX_STACKOVER ) strcpy(text, "D�bordement de la pile");
if ( num == TX_DELETEDPT ) strcpy(text, "Objet inaccessible");
if ( num == TX_FILEOPEN ) strcpy(text, "Ouverture du fichier impossible");
if ( num == TX_NOTOPEN ) strcpy(text, "Le fichier n'est pas ouvert");
- if ( num == TX_ERRREAD ) strcpy(text, "Erreur à la lecture");
- if ( num == TX_ERRWRITE ) strcpy(text, "Erreur à l'écriture");
+ if ( num == TX_ERRREAD ) strcpy(text, "Erreur � la lecture");
+ if ( num == TX_ERRWRITE ) strcpy(text, "Erreur � l'�criture");
}
if ( type == RES_KEY )
{
if ( num == 0 ) strcpy(text, "< aucune >");
- if ( num == VK_LEFT ) strcpy(text, "Flèche Gauche");
- if ( num == VK_RIGHT ) strcpy(text, "Flèche Droite");
- if ( num == VK_UP ) strcpy(text, "Flèche Haut");
- if ( num == VK_DOWN ) strcpy(text, "Flèche Bas");
+ if ( num == VK_LEFT ) strcpy(text, "Fl�che Gauche");
+ if ( num == VK_RIGHT ) strcpy(text, "Fl�che Droite");
+ if ( num == VK_UP ) strcpy(text, "Fl�che Haut");
+ if ( num == VK_DOWN ) strcpy(text, "Fl�che Bas");
if ( num == VK_CANCEL ) strcpy(text, "Control-break");
if ( num == VK_BACK ) strcpy(text, "<--");
if ( num == VK_TAB ) strcpy(text, "Tab");
if ( num == VK_CLEAR ) strcpy(text, "Clear");
- if ( num == VK_RETURN ) strcpy(text, "Entrée");
+ if ( num == VK_RETURN ) strcpy(text, "Entr�e");
if ( num == VK_SHIFT ) strcpy(text, "Shift");
if ( num == VK_CONTROL ) strcpy(text, "Ctrl");
if ( num == VK_MENU ) strcpy(text, "Alt");
@@ -1736,15 +1750,15 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_VERSION_ID ) strcpy(text, "Wersja 1.9 /pl");
#endif
#if _NET | _SCHOOL
- if ( num == RT_VERSION_ID ) strcpy(text, "Szko³a 1.9 /pl");
+ if ( num == RT_VERSION_ID ) strcpy(text, "Szko�a 1.9 /pl");
#endif
#if _DEMO
if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.9 /pl");
#endif
if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom");
- if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powiêksz");
+ if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powi�ksz");
if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Pomniejsz");
- if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielkoϾ");
+ if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko��");
if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Zamknij");
if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edytor programu");
@@ -1755,25 +1769,25 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT");
if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT");
- if ( num == RT_TITLE_TRAINER ) strcpy(text, "Æwiczenia programistyczne");
+ if ( num == RT_TITLE_TRAINER ) strcpy(text, "�wiczenia programistyczne");
if ( num == RT_TITLE_DEFI ) strcpy(text, "Wyzwania");
if ( num == RT_TITLE_MISSION ) strcpy(text, "Misje");
if ( num == RT_TITLE_FREE ) strcpy(text, "Swobodna gra");
- if ( num == RT_TITLE_USER ) strcpy(text, "Poziom u¿ytkownika");
+ if ( num == RT_TITLE_USER ) strcpy(text, "Poziom u�ytkownika");
if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypy");
if ( num == RT_TITLE_SETUP ) strcpy(text, "Opcje");
- if ( num == RT_TITLE_NAME ) strcpy(text, "Imiê gracza");
- if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl¹d");
- if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie¿¹c¹ misjê");
- if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan¹ misjê");
+ if ( num == RT_TITLE_NAME ) strcpy(text, "Imi� gracza");
+ if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl�d");
+ if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie��c� misj�");
+ if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan� misj�");
- if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia³y:");
- if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia³y:");
+ if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia�y:");
+ if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia�y:");
if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planety:");
if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planety:");
- if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziom u¿ytkownika:");
+ if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziom u�ytkownika:");
if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planety:");
- if ( num == RT_PLAY_LISTt ) strcpy(text, " Æwiczenia w tym rozdziale:");
+ if ( num == RT_PLAY_LISTt ) strcpy(text, " �wiczenia w tym rozdziale:");
if ( num == RT_PLAY_LISTd ) strcpy(text, " Wyzwania w tym rozdziale:");
if ( num == RT_PLAY_LISTm ) strcpy(text, " Misje na tej planecie:");
if ( num == RT_PLAY_LISTf ) strcpy(text, " Swobodna gra na tej planecie:");
@@ -1782,51 +1796,51 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_PLAY_RESUME ) strcpy(text, " Streszczenie:");
if ( num == RT_SETUP_DEVICE ) strcpy(text, " Sterowniki:");
- if ( num == RT_SETUP_MODE ) strcpy(text, " RozdzielczoϾ:");
- if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, który chcesz przedefiniowaæ.");
- if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nastêpnie naciœnij klawisz, którego chcesz u¿ywaæ.");
+ if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo��:");
+ if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, kt�ry chcesz przedefiniowa�.");
+ if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nast�pnie naci�nij klawisz, kt�rego chcesz u�ywa�.");
if ( num == RT_PERSO_FACE ) strcpy(text, "Rodzaj twarzy:");
if ( num == RT_PERSO_GLASSES ) strcpy(text, "Okulary:");
- if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w³osów:");
+ if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w�os�w:");
if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:");
- if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pasków:");
+ if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pask�w:");
if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT");
- if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opuœciæ misjê?");
- if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuœciæ grê COLOBOT?");
- if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie¿¹c¹ misjê");
- if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie¿¹c¹ misjê");
- if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakoñcz\\Koñczy grê COLOTOT");
- if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje grê");
- if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczyæ zaznaczony budynek?");
- if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowaæ grê gracza %s? ");
- if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usuñ");
+ if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opu�ci� misj�?");
+ if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� COLOBOT?");
+ if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie��c� misj�");
+ if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie��c� misj�");
+ if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOTOT");
+ if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr�");
+ if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy� zaznaczony budynek?");
+ if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa� gr� gracza %s? ");
+ if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu�");
if ( num == RT_DIALOG_NODEL ) strcpy(text, "Anuluj");
if ( num == RT_DIALOG_LOADING ) strcpy(text, "WCZYTYWANIE");
- if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skróty klawiszowe (\\key cbot;)");
- if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b³êdów)");
- if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zakoñczony");
+ if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skr�ty klawiszowe (\\key cbot;)");
+ if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b��d�w)");
+ if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zako�czony");
- if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiektów\n");
+ if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiekt�w\n");
if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Roboty\n");
if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Budynki\n");
if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Obiekty ruchome\n");
if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Obcy\n");
if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (brak)\\n;\n");
- if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B³¹d\n");
- if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dostêpna jedynie gdy dzia³a \\l;stacja radarowa\\u object\\radar;.\n");
+ if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B��d\n");
+ if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dost�pna jedynie gdy dzia�a \\l;stacja radarowa\\u object\\radar;.\n");
- if ( num == RT_IO_OPEN ) strcpy(text, "Otwórz");
+ if ( num == RT_IO_OPEN ) strcpy(text, "Otw�rz");
if ( num == RT_IO_SAVE ) strcpy(text, "Zapisz");
if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s");
if ( num == RT_IO_NAME ) strcpy(text, "Nazwa:");
if ( num == RT_IO_DIR ) strcpy(text, "Folder:");
if ( num == RT_IO_PRIVATE ) strcpy(text, "Prywatny\\Folder prywatny");
- if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder ogólnodostêpny");
+ if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder og�lnodost�pny");
- if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Twórcy:");
+ if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Tw�rcy:");
if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com");
//? if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Wersja angielska wydana przez:");
//? if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.?.com");
@@ -1838,126 +1852,126 @@ BOOL GetResourceBase(ResType type, int num, char* text)
{
if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK");
if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Anuluj");
- if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nastêpny");
+ if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nast�pny");
if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Poprzedni");
if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)");
if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK");
if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Anuluj");
- if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Æwiczenia\\Æwiczenia programistyczne");
+ if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�wiczenia\\�wiczenia programistyczne");
if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Wyzwania\\Wyzwania programistyczne");
- if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misjê");
- if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celów");
- if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziom\\Poziomy u¿ytkownika");
+ if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj�");
+ if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w");
+ if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziom\\Poziomy u�ytkownika");
if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Prototypy\\Prototypy w trakcie rozwijania");
- if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imiê gracza");
+ if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi� gracza");
if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Opcje\\Preferencje");
- if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misjê od pocz¹tku");
- if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie¿¹c¹ misjê");
- if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan¹ misjê");
- if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powróæ do gry COLOBOT");
- if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakoñcz\\Koñczy grê COLOTOT");
+ if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj� od pocz�tku");
+ if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�");
+ if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan� misj�");
+ if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry COLOBOT");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOTOT");
if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Wstecz \\Wraca do poprzedniego ekranu");
- if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misjê!");
- if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz¹dzenie\\Ustawienia sterownika i rozdzielczoœci");
+ if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj�!");
+ if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz�dzenie\\Ustawienia sterownika i rozdzielczo�ci");
if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafika\\Ustawienia grafiki");
if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Gra\\Ustawienia gry");
if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Sterowanie\\Ustawienia klawiatury, joysticka i myszy");
- if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "DŸwiêk\\G³oœnoœæ muzyki i dŸwiêków gry");
+ if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "D�wi�k\\G�o�no�� muzyki i d�wi�k�w gry");
if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Jednostka");
- if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "RozdzielczoϾ");
- if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe³ny ekran\\Pe³ny ekran lub tryb okna");
+ if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo��");
+ if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe�ny ekran\\Pe�ny ekran lub tryb okna");
if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Zastosuj zmiany\\Aktywuje zmienione ustawienia");
- if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Twój asystent");
+ if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Tw�j asystent");
if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Cienie\\Cienie na ziemi");
if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Znaki na ziemi\\Znaki na ziemi");
- if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i bród na robotach i budynkach");
- if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg³a\\Mg³a");
- if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s³oneczne\\Promienie s³oneczne na niebie");
- if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg³awice");
+ if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i br�d na robotach i budynkach");
+ if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg�a\\Mg�a");
+ if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s�oneczne\\Promienie s�oneczne na niebie");
+ if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg�awice");
if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planety i gwiazdy\\Obiekty astronomiczne na niebie");
- if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne oœwietlenie\\Ruchome Ÿród³a œwiat³a");
- if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz¹stek\\Wybuchy, kurz, odbicia, itp.");
- if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G³êbokoœæ pola\\Maksymalna widocznoœæ");
- if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczegó³y\\Jakoœæ wizualna obiektów 3D");
- if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\JakoϾ tekstur ");
- if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Iloœæ elementów dekoracyjnych \\Iloœæ elementów czysto dekoracyjnych");
- if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz¹stki w interfejsie\\Para i iskry z silników w interfejsie");
- if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\Œwiec¹ce przyciski");
- if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyjaœnia funkcje przycisków");
- if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpoczêciem i na zakoñczenie misji");
- if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Koñcowy film\\Film na zakoñczenie æwiczeñ");
- if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogieñ\\W³asne strza³y uszkadzaj¹ Twoje obiekty");
- if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawêdzi");
- if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwrócenie myszy X\\Odwrócenie kierunków przewijania na w poziomie");
- if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwrócenie myszy Y\\Odwrócenie kierunków przewijania na w pionie");
- if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz¹sy przy wybuchach\\Ekran trzêsie siê podczas wybuchów");
- if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cieñ myszy\\Dodaje cieñ kursorowi myszy");
- if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wciêcia\\Podczas edycji programu");
- if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du¿e wciêcie\\2 lub 4 spacje wciêcia na ka¿dy poziom zdefiniowany przez klamry");
+ if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne o�wietlenie\\Ruchome �r�d�a �wiat�a");
+ if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz�stek\\Wybuchy, kurz, odbicia, itp.");
+ if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G��boko�� pola\\Maksymalna widoczno��");
+ if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczeg�y\\Jako�� wizualna obiekt�w 3D");
+ if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako�� tekstur ");
+ if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo�� element�w dekoracyjnych \\Ilo�� element�w czysto dekoracyjnych");
+ if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz�stki w interfejsie\\Para i iskry z silnik�w w interfejsie");
+ if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\�wiec�ce przyciski");
+ if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyja�nia funkcje przycisk�w");
+ if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpocz�ciem i na zako�czenie misji");
+ if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Ko�cowy film\\Film na zako�czenie �wicze�");
+ if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie�\\W�asne strza�y uszkadzaj� Twoje obiekty");
+ if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego kraw�dzi");
+ if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwr�cenie myszy X\\Odwr�cenie kierunk�w przewijania na w poziomie");
+ if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwr�cenie myszy Y\\Odwr�cenie kierunk�w przewijania na w pionie");
+ if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz�sy przy wybuchach\\Ekran trz�sie si� podczas wybuch�w");
+ if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie� myszy\\Dodaje cie� kursorowi myszy");
+ if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wci�cia\\Podczas edycji programu");
+ if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du�e wci�cie\\2 lub 4 spacje wci�cia na ka�dy poziom zdefiniowany przez klamry");
if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standardowa kontrola\\Standardowe klawisze funkcyjne");
- if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skrêæ w lewo\\obraca robota w lewo");
- if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obróæ w prawo\\obraca robota w prawo");
- if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprzód\\Porusza do przodu");
- if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty³u");
- if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W górê\\Zwiêksza moc silnika'");
- if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W dó³\\Zmniejsza moc silnika");
- if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmieñ kamerê\\Prze³¹cza pomiêdzy kamer¹ pok³adow¹ i œledz¹c¹");
+ if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr�� w lewo\\obraca robota w lewo");
+ if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr�� w prawo\\obraca robota w prawo");
+ if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprz�d\\Porusza do przodu");
+ if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty�u");
+ if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W g�r�\\Zwi�ksza moc silnika'");
+ if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d�\\Zmniejsza moc silnika");
+ if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie� kamer�\\Prze��cza pomi�dzy kamer� pok�adow� i �ledz�c�");
if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Poprzedni obiekt\\Zaznacz poprzedni obiekt");
- if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnieœ/upuœæ, strzelaj, szukaj, itp.)");
- if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli¿ej\\Przybli¿a kamerê");
- if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamerê");
- if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nastêpny obiekt\\Zaznacza nastêpny obiekt");
- if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronautê\\Zaznacza astronautê");
- if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zakoñcz\\Koñczy bie¿¹c¹ misjê lub æwiczenie");
- if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz¹ce bie¿¹cej misji");
- if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podrêcznik programowania");
- if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s³ów kluczowych\\Dok³adniejsza pomoc na temat s³ów kluczowych");
- if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomoœci\\Pokazuje sk¹d zosta³a wys³ana ostatnia wiadomoœæ");
- if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Prêdkoœæ 1,0x\\Prêdkoœæ normalna");
- if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Prêdkoœæ 1,5x\\1,5 raza szybciej");
- if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Prêdkoœæ 2,0x\\Dwa razy szybciej");
- if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Prêdkoœæ 3,0x\\Trzy razy szybciej");
-
- if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty dŸwiêkowe:\\G³oœnoœæ silników, g³osów, strza³ów, itp.");
- if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G³oœnoœæ œcie¿ek dŸwiêkowych z p³yty CD");
- if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "DŸwiêk 3D\\Przestrzenne pozycjonowanie dŸwiêków");
-
- if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni¿sza\\Minimalna jakoœæ grafiki (najwy¿sza czêstotliwoœæ odœwie¿ania)");
- if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jakoϾ grafiki");
- if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy¿sza\\Maksymalna jakoœæ grafiki (najni¿sza czêstotliwoœæ odœwie¿ania)");
-
- if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Bez dŸwiêków");
- if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g³oœnoœæ dŸwiêków");
-
- if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U¿ywaj joysticka\\Joystick lub klawiatura");
- if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dostêp do rozwi¹zania\\Pokazuje rozwi¹zanie (szczegó³owe instrukcje dotycz¹ce misji)");
-
- if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imiê gracza");
+ if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie�/upu��, strzelaj, szukaj, itp.)");
+ if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli�ej\\Przybli�a kamer�");
+ if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer�");
+ if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nast�pny obiekt\\Zaznacza nast�pny obiekt");
+ if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut�\\Zaznacza astronaut�");
+ if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zako�cz\\Ko�czy bie��c� misj� lub �wiczenie");
+ if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz�ce bie��cej misji");
+ if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podr�cznik programowania");
+ if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s��w kluczowych\\Dok�adniejsza pomoc na temat s��w kluczowych");
+ if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomo�ci\\Pokazuje sk�d zosta�a wys�ana ostatnia wiadomo��");
+ if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Pr�dko�� 1,0x\\Pr�dko�� normalna");
+ if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Pr�dko�� 1,5x\\1,5 raza szybciej");
+ if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Pr�dko�� 2,0x\\Dwa razy szybciej");
+ if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Pr�dko�� 3,0x\\Trzy razy szybciej");
+
+ if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty d�wi�kowe:\\G�o�no�� silnik�w, g�os�w, strza��w, itp.");
+ if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G�o�no�� �cie�ek d�wi�kowych z p�yty CD");
+ if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "D�wi�k 3D\\Przestrzenne pozycjonowanie d�wi�k�w");
+
+ if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni�sza\\Minimalna jako�� grafiki (najwy�sza cz�stotliwo�� od�wie�ania)");
+ if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako�� grafiki");
+ if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy�sza\\Maksymalna jako�� grafiki (najni�sza cz�stotliwo�� od�wie�ania)");
+
+ if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Bez d�wi�k�w");
+ if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g�o�no�� d�wi�k�w");
+
+ if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U�ywaj joysticka\\Joystick lub klawiatura");
+ if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dost�p do rozwi�zania\\Pokazuje rozwi�zanie (szczeg�owe instrukcje dotycz�ce misji)");
+
+ if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi� gracza");
if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Wybiera zaznaczonego gracza");
- if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie¿¹ce imiê gracza");
- if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usuñ gracza\\Usuwa gracza z listy");
- if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imiê gracza");
+ if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie��ce imi� gracza");
+ if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu� gracza\\Usuwa gracza z listy");
+ if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi� gracza");
- if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie¿¹c¹ misjê");
- if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon¹ misjê");
+ if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�");
+ if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon� misj�");
if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Lista zapisanych misji");
if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nazwa pliku:");
if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nazwa misji");
if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Fotografia");
- if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usuñ\\Usuwa zaznaczony plik");
+ if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu�\\Usuwa zaznaczony plik");
- if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl¹d\\Wybierz swoj¹ postaæ");
+ if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl�d\\Wybierz swoj� posta�");
if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK");
if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Anuluj");
- if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl¹du");
- if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G³owa\\Twarz i w³osy");
+ if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl�du");
+ if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G�owa\\Twarz i w�osy");
if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Skafander\\Skafander astronauty");
- if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obróæ w lewo");
- if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obróæ w prawo");
+ if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr�� w lewo");
+ if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr�� w prawo");
if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Czerwony");
if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Zielony");
if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Niebieski");
@@ -1968,7 +1982,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Twarz 4");
if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Twarz 3");
if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Twarz 2");
- if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okularów");
+ if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okular�w");
if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Okulary 1");
if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Okulary 2");
if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Okulary 3");
@@ -1976,134 +1990,134 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Okulary 5");
if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Poprzednie zaznaczenie (\\key desel;)");
- if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skrêæ w lewo (\\key left;)");
- if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skrêæ w prawo (\\key right;)");
- if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprzód (\\key up;)");
+ if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr�� w lewo (\\key left;)");
+ if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr�� w prawo (\\key right;)");
+ if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprz�d (\\key up;)");
if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)");
- if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Góra (\\key gup;)");
- if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Dó³ (\\key gdown;)");
- if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnieœ lub upuœæ (\\key action;)");
- if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnieœ lub upuœæ (\\key action;)");
+ if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "G�ra (\\key gup;)");
+ if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D� (\\key gdown;)");
+ if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)");
+ if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)");
if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..przed");
if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..za");
if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..ogniwo elektryczne");
- if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz¹ce misji (\\key help;)");
- if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odleæ, aby zakoñczyæ misjê");
- if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalniê");
- if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowniê");
- if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabrykê robotów");
+ if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz�ce misji (\\key help;)");
+ if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle�, aby zako�czy� misj�");
+ if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni�");
+ if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni�");
+ if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk� robot�w");
if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Zbuduj warsztat");
- if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hutê");
- if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie¿ê obronn¹");
+ if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut�");
+ if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie�� obronn�");
if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Zbuduj centrum badawcze");
- if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacjê radarow¹");
- if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabrykê ogniw elektrycznych");
+ if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj� radarow�");
+ if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk� ogniw elektrycznych");
if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Zbuduj laboratorium");
- if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowniê atomow¹");
+ if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni� atomow�");
if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Zbuduj odgromnik");
- if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacjê przekaŸnikow¹");
- if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka¿ czy teren jest p³aski");
- if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flagê");
- if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usuñ flagê");
+ if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj� przeka�nikow�");
+ if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka� czy teren jest p�aski");
+ if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag�");
+ if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu� flag�");
if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Niebieskie flagi");
if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Czerwone flagi");
if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Zielone flagi");
- if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\¯ó³te flagi");
+ if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\��te flagi");
if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Fioletowe flagi");
- if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj¹cy");
- if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko³ach");
+ if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj�cy");
+ if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko�ach");
if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Zbuduj transporter na nogach");
- if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia³o lataj¹ce");
- if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia³o na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia³o na ko³ach");
- if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia³o na nogach");
- if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj¹ce dzia³o organiczne");
- if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia³o organiczne na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia³o organiczne na ko³ach");
- if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia³o organiczne na nogach");
- if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj¹cy");
- if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko³ach");
+ if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia�o lataj�ce");
+ if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia�o na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia�o na ko�ach");
+ if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia�o na nogach");
+ if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj�ce dzia�o organiczne");
+ if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia�o organiczne na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia�o organiczne na ko�ach");
+ if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia�o organiczne na nogach");
+ if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj�cy");
+ if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko�ach");
if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Zbuduj szperacz na nogach");
if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Zbuduj robota uderzacza");
- if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia³o fazowe");
+ if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia�o fazowe");
if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera");
- if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os³aniajacza");
+ if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os�aniajacza");
if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Zbuduj robota nurka");
- if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze robotów na g¹sienicach");
- if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze robotów lataj¹cych");
+ if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze robot�w na g�sienicach");
+ if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze robot�w lataj�cych");
if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Rozpocznij prace badawcze robota uderzacza");
- if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze dzia³a");
- if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze wie¿y obronnej");
- if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze dzia³a fazowego");
- if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze robota os³aniacza");
+ if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze dzia�a");
+ if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze wie�y obronnej");
+ if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze dzia�a fazowego");
+ if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze robota os�aniacza");
if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze energii atomowej");
- if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze robotów na nogach");
- if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze dzia³a organicznego");
- if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powrót do pocz¹tku");
+ if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze robot�w na nogach");
+ if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze dzia�a organicznego");
+ if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powr�t do pocz�tku");
if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Szukaj (\\key action;)");
if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Uderz (\\key action;)");
if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Strzelaj (\\key action;)");
if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Odzyskaj (\\key action;)");
- if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os³onê (\\key action;)");
- if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy³¹cz os³onê (\\key action;)");
- if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasiêg os³ony");
+ if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os�on� (\\key action;)");
+ if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy��cz os�on� (\\key action;)");
+ if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasi�g os�ony");
if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Wykonaj zaznaczony program");
if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edytuj zaznaczony program");
- if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze³¹cz przekaŸnik SatCom w stan gotowoœci");
+ if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze��cz przeka�nik SatCom w stan gotowo�ci");
if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Zniszcz budynek");
if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Poziom energii");
- if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os³ony");
+ if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os�ony");
if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temperatura silnika");
- if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci¹¿ pracuje...");
- if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insektów");
- if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes³ane informacje");
+ if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci�� pracuje...");
+ if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insekt�w");
+ if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes�ane informacje");
if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompas");
//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mapka");
- if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powiêkszenie mapki");
+ if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powi�kszenie mapki");
if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)");
if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Pomoc na temat zaznaczonego obiektu");
- if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka¿ rozwi¹zanie");
- if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze³¹cz roboty <-> budynki");
- if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka¿ zasiêg");
+ if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka� rozwi�zanie");
+ if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze��cz roboty <-> budynki");
+ if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka� zasi�g");
if ( num == EVENT_DT_VISIT0 ||
num == EVENT_DT_VISIT1 ||
num == EVENT_DT_VISIT2 ||
num == EVENT_DT_VISIT3 ||
- num == EVENT_DT_VISIT4 ) strcpy(text, "Poka¿ miejsce");
+ num == EVENT_DT_VISIT4 ) strcpy(text, "Poka� miejsce");
if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj");
if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia");
- if ( num == EVENT_SPEED ) strcpy(text, "Prêdkoœæ gry");
+ if ( num == EVENT_SPEED ) strcpy(text, "Pr�dko�� gry");
if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz");
- if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprzód");
+ if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprz�d");
if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home");
if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopiuj");
- if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "WielkoϾ 1");
- if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "WielkoϾ 2");
- if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "WielkoϾ 3");
- if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "WielkoϾ 4");
- if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "WielkoϾ 5");
+ if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko�� 1");
+ if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko�� 2");
+ if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko�� 3");
+ if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko�� 4");
+ if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko�� 5");
if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Rozkazy z Houston");
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity");
if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Program dostarczony z Houston");
- if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiektów");
- if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podrêcznik programowania");
- if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi¹zanie");
+ if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiekt�w");
+ if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podr�cznik programowania");
+ if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi�zanie");
if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Zamyka edytor programu i powraca do gry");
if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Anuluj\\Pomija wszystkie zmiany");
if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nowy");
- if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otwórz (Ctrl+o)");
+ if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otw�rz (Ctrl+o)");
if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Zapisz (Ctrl+s)");
if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Cofnij (Ctrl+z)");
if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Wytnij (Ctrl+x)");
if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopiuj (Ctrl+c)");
if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Wklej (Ctrl+v)");
- if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "WielkoϾ czcionki");
+ if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko�� czcionki");
if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Rozkazy (\\key help;)");
- if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podrêcznik programowania (\\key prog;)");
+ if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podr�cznik programowania (\\key prog;)");
if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompiluj");
if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Wykonaj/zatrzymaj");
if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pauza/kontynuuj");
@@ -2112,18 +2126,18 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( type == RES_OBJECT )
{
- if ( num == OBJECT_PORTICO ) strcpy(text, "¯uraw przesuwalny");
+ if ( num == OBJECT_PORTICO ) strcpy(text, "�uraw przesuwalny");
if ( num == OBJECT_BASE ) strcpy(text, "Statek kosmiczny");
if ( num == OBJECT_DERRICK ) strcpy(text, "Kopalnia");
- if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robotów");
+ if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robot�w");
if ( num == OBJECT_REPAIR ) strcpy(text, "Warsztat");
if ( num == OBJECT_STATION ) strcpy(text, "Stacja energetyczna");
- if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rudê na tytan");
- if ( num == OBJECT_TOWER ) strcpy(text, "Wie¿a obronna");
+ if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud� na tytan");
+ if ( num == OBJECT_TOWER ) strcpy(text, "Wie�a obronna");
if ( num == OBJECT_NEST ) strcpy(text, "Gniazdo");
if ( num == OBJECT_RESEARCH ) strcpy(text, "Centrum badawcze");
if ( num == OBJECT_RADAR ) strcpy(text, "Stacja radarowa");
- if ( num == OBJECT_INFO ) strcpy(text, "Stacja przekaŸnikowa informacji");
+ if ( num == OBJECT_INFO ) strcpy(text, "Stacja przeka�nikowa informacji");
if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych");
if ( num == OBJECT_LABO ) strcpy(text, "Laboratorium");
if ( num == OBJECT_NUCLEAR ) strcpy(text, "Elektrownia atomowa");
@@ -2132,7 +2146,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_HUSTON ) strcpy(text, "Centrum Kontroli Misji w Houston");
if ( num == OBJECT_TARGET1 ) strcpy(text, "Cel");
if ( num == OBJECT_TARGET2 ) strcpy(text, "Cel");
- if ( num == OBJECT_START ) strcpy(text, "Pocz¹tek");
+ if ( num == OBJECT_START ) strcpy(text, "Pocz�tek");
if ( num == OBJECT_END ) strcpy(text, "Koniec");
if ( num == OBJECT_STONE ) strcpy(text, "Ruda tytanu");
if ( num == OBJECT_URANIUM ) strcpy(text, "Ruda uranu");
@@ -2145,54 +2159,54 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_KEYb ) strcpy(text, "Klucz B");
if ( num == OBJECT_KEYc ) strcpy(text, "Klucz C");
if ( num == OBJECT_KEYd ) strcpy(text, "Klucz D");
- if ( num == OBJECT_TNT ) strcpy(text, "Materia³y wybuchowe");
+ if ( num == OBJECT_TNT ) strcpy(text, "Materia�y wybuchowe");
if ( num == OBJECT_BOMB ) strcpy(text, "Mina");
if ( num == OBJECT_BAG ) strcpy(text, "Zestaw przetrwania");
if ( num == OBJECT_WAYPOINT ) strcpy(text, "Punkt kontrolny");
if ( num == OBJECT_FLAGb ) strcpy(text, "Niebieska flaga");
if ( num == OBJECT_FLAGr ) strcpy(text, "Czerwona flaga");
if ( num == OBJECT_FLAGg ) strcpy(text, "Zielona flaga");
- if ( num == OBJECT_FLAGy ) strcpy(text, "¯ó³ta flaga");
+ if ( num == OBJECT_FLAGy ) strcpy(text, "��ta flaga");
if ( num == OBJECT_FLAGv ) strcpy(text, "Fioletowa flaga");
- if ( num == OBJECT_MARKPOWER ) strcpy(text, "ród³o energii (miejsce na elektrowniê)");
- if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z³o¿e uranu (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalniê)");
- if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z³o¿e tytanu (miejsce na kopalniê)");
+ if ( num == OBJECT_MARKPOWER ) strcpy(text, "�r�d�o energii (miejsce na elektrowni�)");
+ if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z�o�e uranu (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z�o�e tytanu (miejsce na kopalni�)");
if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot treningowy");
- if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj¹cy");
- if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g¹sienicach");
- if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko³ach");
+ if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj�cy");
+ if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g�sienicach");
+ if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko�ach");
if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter na nogach");
- if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia³o lataj¹ce");
- if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia³o na g¹sienicach");
- if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia³o na ko³ach");
- if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia³o na nogach");
- if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj¹ce dzia³o organiczne");
- if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia³o organiczne na g¹sienicach");
- if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia³o organiczne na ko³ach");
- if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia³o organiczne na nogach");
- if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj¹cy");
- if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g¹sienicach");
- if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko³ach");
+ if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia�o lataj�ce");
+ if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia�o na g�sienicach");
+ if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia�o na ko�ach");
+ if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia�o na nogach");
+ if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj�ce dzia�o organiczne");
+ if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia�o organiczne na g�sienicach");
+ if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia�o organiczne na ko�ach");
+ if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia�o organiczne na nogach");
+ if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj�cy");
+ if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g�sienicach");
+ if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko�ach");
if ( num == OBJECT_MOBILEis ) strcpy(text, "Szperacz na nogach");
if ( num == OBJECT_MOBILErt ) strcpy(text, "Uderzacz");
- if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia³o fazowe");
+ if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia�o fazowe");
if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler");
- if ( num == OBJECT_MOBILErs ) strcpy(text, "Os³aniacz");
+ if ( num == OBJECT_MOBILErs ) strcpy(text, "Os�aniacz");
if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot nurek");
if ( num == OBJECT_MOBILEtg ) strcpy(text, "Robot cel");
if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName);
- if ( num == OBJECT_TECH ) strcpy(text, "In¿ynier");
+ if ( num == OBJECT_TECH ) strcpy(text, "In�ynier");
if ( num == OBJECT_TOTO ) strcpy(text, "Robbie");
- if ( num == OBJECT_MOTHER ) strcpy(text, "Królowa Obcych");
- if ( num == OBJECT_ANT ) strcpy(text, "Mrówka");
- if ( num == OBJECT_SPIDER ) strcpy(text, "Paj¹k");
+ if ( num == OBJECT_MOTHER ) strcpy(text, "Kr�lowa Obcych");
+ if ( num == OBJECT_ANT ) strcpy(text, "Mr�wka");
+ if ( num == OBJECT_SPIDER ) strcpy(text, "Paj�k");
if ( num == OBJECT_BEE ) strcpy(text, "Osa");
if ( num == OBJECT_WORM ) strcpy(text, "Robal");
if ( num == OBJECT_EGG ) strcpy(text, "Jajo");
@@ -2212,211 +2226,211 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_APOLLO1 ||
num == OBJECT_APOLLO3 ||
num == OBJECT_APOLLO4 ||
- num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta³oœci z misji Apollo");
- if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksiê¿ycowy");
+ num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta�o�ci z misji Apollo");
+ if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksi�ycowy");
}
if ( type == RES_ERR )
{
- strcpy(text, "B³¹d");
+ strcpy(text, "B��d");
if ( num == ERR_CMD ) strcpy(text, "Nieznane polecenie");
if ( num == ERR_INSTALL ) strcpy(text, "Gra COLOBOT nie jest zainstalowana.");
- if ( num == ERR_NOCD ) strcpy(text, "W³ó¿ dysk CD z gr¹ COLOBOT\ni uruchom grê jeszcze raz.");
+ if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� COLOBOT\ni uruchom gr� jeszcze raz.");
if ( num == ERR_MANIP_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo¿na nieœæ wiêcej przedmiotów");
+ if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo�na nie�� wi�cej przedmiot�w");
if ( num == ERR_MANIP_NIL ) strcpy(text, "Nie ma nic do podniesienia");
- if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zajête");
+ if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zaj�te");
if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Brak innego robota");
- if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo¿esz przenosiæ przedmiotów radioaktywnych");
- if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo¿esz przenosiæ przedmiotów pod wod¹");
+ if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w radioaktywnych");
+ if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w pod wod�");
if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nie ma nic do upuszczenia");
- if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo¿liwe pod wod¹");
- if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo�liwe pod wod�");
+ if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Tytan za daleko");
if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Tytan za blisko");
- if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli¿u");
- if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj¹co p³aska");
- if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma³o p³askiego terenu");
- if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zajête");
+ if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli�u");
+ if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj�co p�aska");
+ if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma�o p�askiego terenu");
+ if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zaj�te");
if ( num == ERR_BUILD_BASE ) strcpy(text, "Za blisko statku kosmicznego");
if ( num == ERR_BUILD_NARROW ) strcpy(text, "Za blisko budynku");
- if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
+ if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
if ( num == ERR_SEARCH_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
+ if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Nieodpowiedni teren");
if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Budynek za blisko");
if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Obiekt za blisko");
if ( num == ERR_RECOVER_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nie ma niczego do odzysku");
if ( num == ERR_SHIELD_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
- if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B³¹d w poleceniu ruchu");
- if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedostêpne");
- if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedostêpne");
- if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zajête");
+ if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
+ if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B��d w poleceniu ruchu");
+ if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedost�pne");
+ if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedost�pne");
+ if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zaj�te");
if ( num == ERR_FIRE_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma³o energii");
- if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
+ if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma�o energii");
+ if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Brak rudy tytanu do przetopienia");
- if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma ¿adnej rudy");
+ if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma �adnej rudy");
if ( num == ERR_STATION_NULL ) strcpy(text, "Brak energii w ziemi");
if ( num == ERR_TOWER_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
+ if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Nieodpowiedni rodzaj ogniw");
- if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta³ ju¿ wykonany");
+ if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta� ju� wykonany");
if ( num == ERR_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi");
- if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci¹¿ za ma³o energii");
+ if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci�� za ma�o energii");
if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Brak tytanu do przetworzenia");
if ( num == ERR_ENERGY_BAD ) strcpy(text, "Przetwarza jedynie tytan");
if ( num == ERR_BASE_DLOCK ) strcpy(text, "Drzwi zablokowane przez robota lub inny obiekt ");
- if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz byæ na statku kosmicznym aby nim odlecieæ");
+ if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by� na statku kosmicznym aby nim odlecie�");
if ( num == ERR_LABO_NULL ) strcpy(text, "Nie ma niczego do zanalizowania");
- if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materiê organiczn¹");
- if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta³a ju¿ wykonana");
+ if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi� organiczn�");
+ if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta�a ju� wykonana");
if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi");
- if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci¹¿ za ma³o energii");
+ if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci�� za ma�o energii");
if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Brak uranu do przetworzenia");
if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Przetwarza jedynie uran");
if ( num == ERR_FACTORY_NULL ) strcpy(text, "Brak tytanu");
if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Obiekt za blisko");
- if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zajête");
- if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma ¿adnej stacji przekaŸnikowej w zasiêgu");
+ if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zaj�te");
+ if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma �adnej stacji przeka�nikowej w zasi�gu");
if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program zawirusowany");
if ( num == ERR_BAT_VIRUS ) strcpy(text, "Zainfekowane wirusem, chwilowo niesprawne");
if ( num == ERR_VEH_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
- if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo¿liwe podczas p³ywania");
- if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo¿liwe podczas przenoszenia przedmiotu");
- if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du¿o flag w tym kolorze (maksymalnie 5)");
- if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej¹cej flagi");
- if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli¿u");
- if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype³niona (naciœnij \\key help; aby uzyskaæ szczegó³y)");
+ if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
+ if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo�liwe podczas p�ywania");
+ if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo�liwe podczas przenoszenia przedmiotu");
+ if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du�o flag w tym kolorze (maksymalnie 5)");
+ if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej�cej flagi");
+ if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli�u");
+ if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype�niona (naci�nij \\key help; aby uzyska� szczeg�y)");
if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot zniszczony");
if ( num == ERR_DELETEBUILDING ) strcpy(text, "Budynek zniszczony");
- if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo¿na tego utworzyæ, za du¿o obiektów");
-
- if ( num == INFO_BUILD ) strcpy(text, "Budowa zakoñczona");
- if ( num == INFO_CONVERT ) strcpy(text, "Tytan dostêpny");
- if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zakoñczony");
- if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dostêpne plany robotów na g¹sienicach");
- if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo¿esz lataæ u¿ywaj¹c klawiszy (\\key gup;) oraz (\\key gdown;)");
- if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dostêpne plany robota uderzacza");
- if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dostêpne plany dzia³a");
- if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dostêpne plany wie¿y obronnej");
- if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dostêpne plany dzia³a fazowego");
- if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dostêpne plany robota os³aniacza");
- if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dostêpne plany elektrowni atomowej");
- if ( num == INFO_FACTORY ) strcpy(text, "Dostêpny nowy robot");
+ if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo�na tego utworzy�, za du�o obiekt�w");
+
+ if ( num == INFO_BUILD ) strcpy(text, "Budowa zako�czona");
+ if ( num == INFO_CONVERT ) strcpy(text, "Tytan dost�pny");
+ if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zako�czony");
+ if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dost�pne plany robot�w na g�sienicach");
+ if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo�esz lata� u�ywaj�c klawiszy (\\key gup;) oraz (\\key gdown;)");
+ if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dost�pne plany robota uderzacza");
+ if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dost�pne plany dzia�a");
+ if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dost�pne plany wie�y obronnej");
+ if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dost�pne plany dzia�a fazowego");
+ if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dost�pne plany robota os�aniacza");
+ if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dost�pne plany elektrowni atomowej");
+ if ( num == INFO_FACTORY ) strcpy(text, "Dost�pny nowy robot");
if ( num == INFO_LABO ) strcpy(text, "Analiza wykonana");
if ( num == INFO_ENERGY ) strcpy(text, "Wytworzono ogniwo elektryczne");
if ( num == INFO_NUCLEAR ) strcpy(text, "Wytworzono atomowe ogniwo elektryczne");
- if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u¿yteczny przedmiot");
- if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowniê");
- if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype³niona >>>");
- if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod³a siê >>>");
- if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod³a siê >>>");
- if ( num == INFO_WRITEOK ) strcpy(text, "Bie¿¹ca misja zapisana");
+ if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u�yteczny przedmiot");
+ if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni�");
+ if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype�niona >>>");
+ if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>");
+ if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>");
+ if ( num == INFO_WRITEOK ) strcpy(text, "Bie��ca misja zapisana");
if ( num == INFO_DELETEPATH ) strcpy(text, "Przekroczono punkt kontrolny");
- if ( num == INFO_DELETEMOTHER ) strcpy(text, "Królowa Obcych zosta³a zabita");
- if ( num == INFO_DELETEANT ) strcpy(text, "Mrówka œmiertelnie ranna");
- if ( num == INFO_DELETEBEE ) strcpy(text, "Osa œmiertelnie ranna");
- if ( num == INFO_DELETEWORM ) strcpy(text, "Robal œmiertelnie ranny");
- if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj¹k œmiertelnie ranny");
- if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naciœnij klawisz \\key help; aby wyœwietliæ rozkazy na przekaŸniku SatCom");
+ if ( num == INFO_DELETEMOTHER ) strcpy(text, "Kr�lowa Obcych zosta�a zabita");
+ if ( num == INFO_DELETEANT ) strcpy(text, "Mr�wka �miertelnie ranna");
+ if ( num == INFO_DELETEBEE ) strcpy(text, "Osa �miertelnie ranna");
+ if ( num == INFO_DELETEWORM ) strcpy(text, "Robal �miertelnie ranny");
+ if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj�k �miertelnie ranny");
+ if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naci�nij klawisz \\key help; aby wy�wietli� rozkazy na przeka�niku SatCom");
}
if ( type == RES_CBOT )
{
- strcpy(text, "B³¹d");
- if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj¹cego");
- if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj¹cego");
- if ( num == TX_NOTBOOL ) strcpy(text, "Wyra¿enie musi zwróciæ wartoœæ logiczn¹");
- if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta³a zadeklarowana");
- if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo¿liwe");
- if ( num == TX_ENDOF ) strcpy(text, "Brak œrednika na koñcu wiersza");
+ strcpy(text, "B��d");
+ if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj�cego");
+ if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj�cego");
+ if ( num == TX_NOTBOOL ) strcpy(text, "Wyra�enie musi zwr�ci� warto�� logiczn�");
+ if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta�a zadeklarowana");
+ if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo�liwe");
+ if ( num == TX_ENDOF ) strcpy(text, "Brak �rednika na ko�cu wiersza");
if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" outside a block ""switch""");
- if ( num == TX_NOTERM ) strcpy(text, "Polecenie po koñcowej klamrze zamykaj¹cej");
- if ( num == TX_CLOSEBLK ) strcpy(text, "Brak koñca bloku");
+ if ( num == TX_NOTERM ) strcpy(text, "Polecenie po ko�cowej klamrze zamykaj�cej");
+ if ( num == TX_CLOSEBLK ) strcpy(text, "Brak ko�ca bloku");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" without corresponding ""if"" ");
- if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj¹cej");//début d'un bloc attendu?
- if ( num == TX_BADTYPE ) strcpy(text, "Z³y typ dla przypisania");
- if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo¿e byæ zadeklarowana dwukrotnie");
- if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operatorów");
+ if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj�cej");//d�but d'un bloc attendu?
+ if ( num == TX_BADTYPE ) strcpy(text, "Z�y typ dla przypisania");
+ if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo�e by� zadeklarowana dwukrotnie");
+ if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operator�w");
if ( num == TX_UNDEFCALL ) strcpy(text, "Funkcja nieznana");
if ( num == TX_MISDOTS ) strcpy(text, "Znak "" : "" missing");
- if ( num == TX_WHILE ) strcpy(text, "Skrót klawiszowy ""while"" missing");
+ if ( num == TX_WHILE ) strcpy(text, "Skr�t klawiszowy ""while"" missing");
if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" outside a loop");
- if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst¹piæ ""for"", ""while"", ""do"" or ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette étiquette n'existe pas
+ if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst�pi� ""for"", ""while"", ""do"" or ""switch""");
+ if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette �tiquette n'existe pas
if ( num == TX_NOCASE ) strcpy(text, "Polecenie ""case"" missing");
if ( num == TX_BADNUM ) strcpy(text, "Brak liczby");
if ( num == TX_VOID ) strcpy(text, "Pusty parametr");
if ( num == TX_NOTYP ) strcpy(text, "Brak deklaracji typu");
if ( num == TX_NOVAR ) strcpy(text, "Brak nazwy zmiennej");
- if ( num == TX_NOFONC ) strcpy(text, "Brakuj¹ca nazwa funkcji");
- if ( num == TX_OVERPARAM ) strcpy(text, "Za du¿o parametrów");
- if ( num == TX_REDEF ) strcpy(text, "Funkcja ju¿ istnieje");
+ if ( num == TX_NOFONC ) strcpy(text, "Brakuj�ca nazwa funkcji");
+ if ( num == TX_OVERPARAM ) strcpy(text, "Za du�o parametr�w");
+ if ( num == TX_REDEF ) strcpy(text, "Funkcja ju� istnieje");
if ( num == TX_LOWPARAM ) strcpy(text, "Brak wymaganego parametru");
- if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametrów tego typu");
- if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametrów");
+ if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametr�w tego typu");
+ if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametr�w");
if ( num == TX_NOITEM ) strcpy(text, "To nie jest obiekt tej klasy");
- if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz³onkiem klasy");
+ if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz�onkiem klasy");
if ( num == TX_NOCONST ) strcpy(text, "Brak odpowiedniego konstruktora");
- if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju¿ istnieje");
+ if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju� istnieje");
if ( num == TX_CLBRK ) strcpy(text, """ ] "" missing");
- if ( num == TX_RESERVED ) strcpy(text, "S³owo zarezerwowane jêzyka CBOT");
- if ( num == TX_BADNEW ) strcpy(text, "Z³y argument dla funkcji ""new""");
+ if ( num == TX_RESERVED ) strcpy(text, "S�owo zarezerwowane j�zyka CBOT");
+ if ( num == TX_BADNEW ) strcpy(text, "Z�y argument dla funkcji ""new""");
if ( num == TX_OPBRK ) strcpy(text, """ [ "" expected");
- if ( num == TX_BADSTRING ) strcpy(text, "Brak ³añcucha");
- if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid³owy typ indeksu");
+ if ( num == TX_BADSTRING ) strcpy(text, "Brak �a�cucha");
+ if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid�owy typ indeksu");
if ( num == TX_PRIVATE ) strcpy(text, "Element prywatny");
if ( num == TX_NOPUBLIC ) strcpy(text, "Wymagany publiczny");
if ( num == TX_DIVZERO ) strcpy(text, "Dzielenie przez zero");
- if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta³a zainicjalizowana");
- if ( num == TX_BADTHROW ) strcpy(text, "Wartoœæ ujemna odrzucona przez ""throw""");//C'est quoi, ça?
- if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwróci³a ¿adnej wartoœci ");
- if ( num == TX_NORUN ) strcpy(text, "¯adna funkcja nie dzia³a");
- if ( num == TX_NOCALL ) strcpy(text, "Odwo³anie do nieznanej funkcji");
+ if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta�a zainicjalizowana");
+ if ( num == TX_BADTHROW ) strcpy(text, "Warto�� ujemna odrzucona przez ""throw""");//C'est quoi, �a?
+ if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwr�ci�a �adnej warto�ci ");
+ if ( num == TX_NORUN ) strcpy(text, "�adna funkcja nie dzia�a");
+ if ( num == TX_NOCALL ) strcpy(text, "Odwo�anie do nieznanej funkcji");
if ( num == TX_NOCLASS ) strcpy(text, "Taka klasa nie istnieje");
if ( num == TX_NULLPT ) strcpy(text, "Obiekt nieznany");
- if ( num == TX_OPNAN ) strcpy(text, "Dzia³anie niemo¿liwe z wartoœci¹ ""nan""");
- if ( num == TX_OUTARRAY ) strcpy(text, "Dostêp poza tablicê");
- if ( num == TX_STACKOVER ) strcpy(text, "Przepe³nienie stosu");
- if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid³owy obiekt");
- if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo¿na otworzyæ pliku");
+ if ( num == TX_OPNAN ) strcpy(text, "Dzia�anie niemo�liwe z warto�ci� ""nan""");
+ if ( num == TX_OUTARRAY ) strcpy(text, "Dost�p poza tablic�");
+ if ( num == TX_STACKOVER ) strcpy(text, "Przepe�nienie stosu");
+ if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid�owy obiekt");
+ if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo�na otworzy� pliku");
if ( num == TX_NOTOPEN ) strcpy(text, "Plik nie jest otwarty");
- if ( num == TX_ERRREAD ) strcpy(text, "B³¹d odczytu");
- if ( num == TX_ERRWRITE ) strcpy(text, "B³¹d zapisu");
+ if ( num == TX_ERRREAD ) strcpy(text, "B��d odczytu");
+ if ( num == TX_ERRWRITE ) strcpy(text, "B��d zapisu");
}
if ( type == RES_KEY )
{
if ( num == 0 ) strcpy(text, "< brak >");
- if ( num == VK_LEFT ) strcpy(text, "Strza³ka w lewo");
- if ( num == VK_RIGHT ) strcpy(text, "Strza³ka w prawo");
- if ( num == VK_UP ) strcpy(text, "Strza³ka w górê");
- if ( num == VK_DOWN ) strcpy(text, "Strza³ka w dó³");
+ if ( num == VK_LEFT ) strcpy(text, "Strza�ka w lewo");
+ if ( num == VK_RIGHT ) strcpy(text, "Strza�ka w prawo");
+ if ( num == VK_UP ) strcpy(text, "Strza�ka w g�r�");
+ if ( num == VK_DOWN ) strcpy(text, "Strza�ka w d�");
if ( num == VK_CANCEL ) strcpy(text, "Ctrl-break");
if ( num == VK_BACK ) strcpy(text, "<--");
if ( num == VK_TAB ) strcpy(text, "Tab");
- if ( num == VK_CLEAR ) strcpy(text, "WyczyϾ");
+ if ( num == VK_CLEAR ) strcpy(text, "Wyczy��");
if ( num == VK_RETURN ) strcpy(text, "Enter");
if ( num == VK_SHIFT ) strcpy(text, "Shift");
if ( num == VK_CONTROL ) strcpy(text, "Ctrl");
@@ -2481,9 +2495,9 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == VK_EXSEL ) strcpy(text, "ExSel");
if ( num == VK_EREOF ) strcpy(text, "Erase EOF");
if ( num == VK_PLAY ) strcpy(text, "Graj");
- if ( num == VK_ZOOM ) strcpy(text, "Powiêkszenie");
+ if ( num == VK_ZOOM ) strcpy(text, "Powi�kszenie");
if ( num == VK_PA1 ) strcpy(text, "PA1");
- if ( num == VK_OEM_CLEAR ) strcpy(text, "WyczyϾ");
+ if ( num == VK_OEM_CLEAR ) strcpy(text, "Wyczy��");
if ( num == VK_BUTTON1 ) strcpy(text, "Przycisk 1");
if ( num == VK_BUTTON2 ) strcpy(text, "Przycisk 2");
if ( num == VK_BUTTON3 ) strcpy(text, "Przycisk 3");
@@ -2516,8 +2530,8 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == VK_BUTTON30 ) strcpy(text, "Przycisk 30");
if ( num == VK_BUTTON31 ) strcpy(text, "Przycisk 31");
if ( num == VK_BUTTON32 ) strcpy(text, "Przycisk 32");
- if ( num == VK_WHEELUP ) strcpy(text, "Kó³ko w górê");
- if ( num == VK_WHEELDOWN ) strcpy(text, "Kó³ko w dó³");
+ if ( num == VK_WHEELUP ) strcpy(text, "K�ko w g�r�");
+ if ( num == VK_WHEELDOWN ) strcpy(text, "K�ko w d�");
}
#endif
diff --git a/src/restext.cpp b/src/restext.cpp
index 8c25f01..0667908 100644
--- a/src/restext.cpp
+++ b/src/restext.cpp
@@ -1,4 +1,18 @@
-// restext.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
@@ -15,7 +29,7 @@
-//** -> texte à traduire !!!
+//** -> texte � traduire !!!
@@ -853,7 +867,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_NOTERM ) strcpy(text, "Instructions after the final closing brace");
if ( num == TX_CLOSEBLK ) strcpy(text, "End of block missing");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" without corresponding ""if"" ");
- if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//début d'un bloc attendu?
+ if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//d�but d'un bloc attendu?
if ( num == TX_BADTYPE ) strcpy(text, "Wrong type for the assignment");
if ( num == TX_REDEFVAR ) strcpy(text, "A variable can not be declared twice");
if ( num == TX_BAD2TYPE ) strcpy(text, "The types of the two operands are incompatible ");
@@ -862,7 +876,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_WHILE ) strcpy(text, "Keyword ""while"" missing");
if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" outside a loop");
if ( num == TX_LABEL ) strcpy(text, "A label must be followed by ""for"", ""while"", ""do"" or ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette étiquette n'existe pas
+ if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette �tiquette n'existe pas
if ( num == TX_NOCASE ) strcpy(text, "Instruction ""case"" missing");
if ( num == TX_BADNUM ) strcpy(text, "Number missing");
if ( num == TX_VOID ) strcpy(text, "Void parameter");
@@ -888,7 +902,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_NOPUBLIC ) strcpy(text, "Public required");
if ( num == TX_DIVZERO ) strcpy(text, "Dividing by zero");
if ( num == TX_NOTINIT ) strcpy(text, "Variable not initialized");
- if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, ça?
+ if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, �a?
if ( num == TX_NORETVAL ) strcpy(text, "The function returned no value ");
if ( num == TX_NORUN ) strcpy(text, "No function running");
if ( num == TX_NOCALL ) strcpy(text, "Calling an unknown function");
@@ -1054,7 +1068,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
#endif
if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom");
if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Taille maximale");
- if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille réduite");
+ if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille r�duite");
if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Taille normale");
if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Fermer");
@@ -1072,38 +1086,38 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT");
#endif
if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmation");
- if ( num == RT_TITLE_DEFI ) strcpy(text, "Défis");
+ if ( num == RT_TITLE_DEFI ) strcpy(text, "D�fis");
if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions");
if ( num == RT_TITLE_FREE ) strcpy(text, "Jeu libre");
if ( num == RT_TITLE_TEEN ) strcpy(text, "Jeu libre");
- if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux supplémentaires");
+ if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux suppl�mentaires");
if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes");
if ( num == RT_TITLE_SETUP ) strcpy(text, "Options");
if ( num == RT_TITLE_NAME ) strcpy(text, "Nom du joueur");
if ( num == RT_TITLE_PERSO ) strcpy(text, "Personnalisation de votre apparence");
if ( num == RT_TITLE_WRITE ) strcpy(text, "Enregistrement de la mission en cours");
- if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistrée");
+ if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistr�e");
if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste des chapitres :");
if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste des chapitres :");
- if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des planètes :");
- if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des planètes :");
- if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux supplémentaires :");
- if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des planètes :");
+ if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plan�tes :");
+ if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plan�tes :");
+ if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux suppl�mentaires :");
+ if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plan�tes :");
if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste des chapitres :");
if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste des exercices du chapitre :");
- if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des défis du chapitre :");
+ if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des d�fis du chapitre :");
if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste des missions du chapitre :");
if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste des jeux libres du chapitre :");
if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions du niveau :");
if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste des prototypes du chapitre :");
if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste des jeux libres du chapitre :");
- if ( num == RT_PLAY_RESUME ) strcpy(text, " Résumé :");
+ if ( num == RT_PLAY_RESUME ) strcpy(text, " R�sum� :");
if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :");
- if ( num == RT_SETUP_MODE ) strcpy(text, " Résolutions :");
- if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche à redéfinir.");
- if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhaitée.");
+ if ( num == RT_SETUP_MODE ) strcpy(text, " R�solutions :");
+ if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche � red�finir.");
+ if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhait�e.");
if ( num == RT_PERSO_FACE ) strcpy(text, "Type de visage :");
if ( num == RT_PERSO_GLASSES ) strcpy(text, "Lunettes :");
@@ -1124,19 +1138,19 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_DIALOG_YES ) strcpy(text, "Abandonner\\Abandonner la mission en cours");
if ( num == RT_DIALOG_NO ) strcpy(text, "Continuer\\Continuer la mission en cours");
if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continuer\\Continuer de jouer");
- if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment détruire le bâtiment sélectionné ?");
- if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous détruire les sauvegardes de %s ?");
- if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Détruire");
+ if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment d�truire le b�timent s�lectionn� ?");
+ if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous d�truire les sauvegardes de %s ?");
+ if ( num == RT_DIALOG_YESDEL ) strcpy(text, "D�truire");
if ( num == RT_DIALOG_NODEL ) strcpy(text, "Annuler");
if ( num == RT_DIALOG_LOADING ) strcpy(text, "CHARGEMENT");
- if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-clé (\\key cbot;)");
+ if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl� (\\key cbot;)");
if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 erreur)");
- if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme terminé");
+ if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin�");
if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Listes des objets\n");
if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Listes des robots\n");
- if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des bâtiments\n");
+ if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des b�timents\n");
if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes des objets transportables\n");
if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes des ennemis\n");
if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (aucun)\\n;\n");
@@ -1148,16 +1162,16 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_IO_LIST ) strcpy(text, "Dossier: %s");
if ( num == RT_IO_NAME ) strcpy(text, "Nom:");
if ( num == RT_IO_DIR ) strcpy(text, "Dans:");
- if ( num == RT_IO_PRIVATE ) strcpy(text, "Privé\\Dossier privé");
- if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun à tous les joueurs");
+ if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv�\\Dossier priv�");
+ if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun � tous les joueurs");
- if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Développé par :");
+ if ( num == RT_GENERIC_DEV1 ) strcpy(text, "D�velopp� par :");
if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com");
#if _SCHOOL
if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " ");
if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " ");
#else
- //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version française éditée par :");
+ //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version fran�aise �dit�e par :");
//?if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.alsyd.com");
if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " ");
if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " ");
@@ -1171,24 +1185,24 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_BUTTON_OK ) strcpy(text, "D'accord");
if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Annuler");
if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Suivant");
- if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Précédent");
+ if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Pr�c�dent");
if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)");
if ( num == EVENT_DIALOG_OK ) strcpy(text, "D'accord");
if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Annuler");
if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmation\\Exercices de programmation");
- if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Défis\\Défis de programmation");
+ if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "D�fis\\D�fis de programmation");
if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\La grande aventure");
- if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but précis");
- if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but précis");
- if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux supplémentaires");
- if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'élaboration");
+ if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis");
+ if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis");
+ if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux suppl�mentaires");
+ if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'�laboration");
if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Autre joueur\\Choix du nom du joueur");
- if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Réglages");
- if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au début");
+ if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\R�glages");
+ if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au d�but");
if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Enregistrer\\Enregistrer la mission en cours");
- if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistrée");
+ if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistr�e");
#if _NEWLOOK
if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans CeeBot");
if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter CeeBot");
@@ -1196,65 +1210,65 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans COLOBOT");
if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter COLOBOT");
#endif
- if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau précédent");
- if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\Démarrer l'action");
- if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et résolution d'affichage");
+ if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau pr�c�dent");
+ if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\D�marrer l'action");
+ if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et r�solution d'affichage");
if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphique\\Options graphiques");
- if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilité");
+ if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit�");
if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Commandes\\Touches du clavier");
if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Son\\Volumes bruitages & musiques");
- if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unité");
- if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Résolution");
- if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein écran\\Plein écran ou fenêtré");
- if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectués");
+ if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit�");
+ if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "R�solution");
+ if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein �cran\\Plein �cran ou fen�tr�");
+ if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectu�s");
if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Votre assistant");
- if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projetées au sol");
- if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessinées sur le sol");
- if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et bâtiments");
+ if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projet�es au sol");
+ if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessin�es sur le sol");
+ if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et b�timents");
if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Brouillard\\Nappes de brouillard");
if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Rayons du soleil\\Rayons selon l'orientation");
if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Ciel\\Ciel et nuages");
- if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planètes et étoiles\\Motifs mobiles dans le ciel");
- if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumières dynamiques\\Eclairages mobiles");
- if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantité de particules\\Explosions, poussières, reflets, etc.");
+ if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plan�tes et �toiles\\Motifs mobiles dans le ciel");
+ if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumi�res dynamiques\\Eclairages mobiles");
+ if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit� de particules\\Explosions, poussi�res, reflets, etc.");
if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Profondeur de champ\\Distance de vue maximale");
- if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Détails des objets\\Qualité des objets en 3D");
- if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualité des textures\\Qualité des images");
- if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets décoratifs\\Qualité d'objets non indispensables");
+ if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "D�tails des objets\\Qualit� des objets en 3D");
+ if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit� des textures\\Qualit� des images");
+ if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets d�coratifs\\Qualit� d'objets non indispensables");
if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particules dans l'interface\\Pluie de particules");
if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflets sur les boutons\\Boutons brillants");
if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Bulles d'aide\\Bulles explicatives");
- if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Séquences cinématiques\\Films avant ou après une mission");
- if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour animé\\Retour animé dans les exercices");
- if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Dégâts à soi-même\\Vos tirs infligent des dommages à vos unités");
- if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Défilement dans les bords\\Défilement lorsque la souris touches les bords gauche ou droite");
+ if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "S�quences cin�matiques\\Films avant ou apr�s une mission");
+ if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim�\\Retour anim� dans les exercices");
+ if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "D�g�ts � soi-m�me\\Vos tirs infligent des dommages � vos unit�s");
+ if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "D�filement dans les bords\\D�filement lorsque la souris touches les bords gauche ou droite");
if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord");
if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord");
- if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'écran vibre lors d'une explosion");
- if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombrée\\Jolie souris avec une ombre");
- if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'édition d'un programme");
+ if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'�cran vibre lors d'une explosion");
+ if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombr�e\\Jolie souris avec une ombre");
+ if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'�dition d'un programme");
if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Grande indentation\\Indente avec 2 ou 4 espaces");
- if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accès aux solutions\\Programme \"4: Solution\" dans les exercices");
+ if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices");
- if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout réinitialiser\\Remet toutes les touches standards");
- if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner à gauche\\Moteur à gauche");
- if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner à droite\\Moteur à droite");
+ if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout r�initialiser\\Remet toutes les touches standards");
+ if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner � gauche\\Moteur � gauche");
+ if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner � droite\\Moteur � droite");
if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Avancer\\Moteur en avant");
- if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arrière");
- if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du réacteur");
- if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du réacteur");
- if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de caméra\\Autre de point de vue");
- if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Sélection précédente\\Sélectionne l'objet précédent");
+ if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arri�re");
+ if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du r�acteur");
+ if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du r�acteur");
+ if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de cam�ra\\Autre de point de vue");
+ if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "S�lection pr�c�dente\\S�lectionne l'objet pr�c�dent");
if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Action standard\\Action du bouton avec le cadre rouge");
- if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Caméra plus proche\\Avance la caméra");
- if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Caméra plus loin\\Recule la caméra");
- if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Sélectionner l'objet suivant\\Sélectionner l'objet suivant");
- if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Sélectionner le cosmonaute\\Sélectionner le cosmonaute");
+ if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Cam�ra plus proche\\Avance la cam�ra");
+ if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Cam�ra plus loin\\Recule la cam�ra");
+ if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "S�lectionner l'objet suivant\\S�lectionner l'objet suivant");
+ if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "S�lectionner le cosmonaute\\S�lectionner le cosmonaute");
if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quitter la mission en cours\\Terminer un exercice ou une mssion");
- if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche à suivre");
+ if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche � suivre");
if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Instructions programmation\\Explication sur la programmation");
- if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-clé\\Explication sur le mot-clé");
+ if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl�\\Explication sur le mot-cl�");
if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Montrer le lieu d'un message\\Montrer le lieu du dernier message");
if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Vitesse 1.0x\\Vitesse normale");
if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Vitesse 1.5x\\Une fois et demi plus rapide");
@@ -1265,38 +1279,38 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Fond sonore :\\Volume des pistes audio du CD");
if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Bruitages 3D\\Positionnement sonore dans l'espace");
- if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualité minimale (+ rapide)");
- if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualité standard");
- if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualité (+ lent)");
+ if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit� minimale (+ rapide)");
+ if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit� standard");
+ if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit� (+ lent)");
if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Silencieux\\Totalement silencieux");
if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Niveaux normaux");
if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Utilise un joystick\\Joystick ou clavier");
- if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Accès à la solution\\Donne la solution");
+ if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Acc�s � la solution\\Donne la solution");
- if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur à créer");
+ if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur � cr�er");
if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "D'accord\\Choisir le joueur");
if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Annuler\\Conserver le joueur actuel");
if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Supprimer le joueur\\Supprimer le joueur de la liste");
if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Nom du joueur");
if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Enregistrer\\Enregistrer la mission en cours");
- if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission sélectionnée");
- if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistrées");
+ if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission s�lectionn�e");
+ if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistr�es");
if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nom du fichier :");
if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nom de la mission");
if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Vue de la mission");
- if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement sélectionné");
+ if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement s�lectionn�");
if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aspect\\Choisir votre aspect");
if ( num == EVENT_INTERFACE_POK ) strcpy(text, "D'accord");
if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Annuler");
if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Remet les couleurs standards");
- if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Tête\\Visage et cheveux");
+ if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "T�te\\Visage et cheveux");
if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Corps\\Combinaison");
- if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation à gauche");
- if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation à droite");
+ if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation � gauche");
+ if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation � droite");
if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rouge");
if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Vert");
if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Bleu");
@@ -1314,57 +1328,57 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Lunettes 4");
if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Lunettes 5");
- if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Sélection précédente (\\key desel;)");
- if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne à gauche (\\key left;)");
- if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne à droite (\\key right;)");
+ if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "S�lection pr�c�dente (\\key desel;)");
+ if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne � gauche (\\key left;)");
+ if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne � droite (\\key right;)");
if ( num == EVENT_OBJECT_UP ) strcpy(text, "Avance (\\key up;)");
if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Recule (\\key down;)");
if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Monte (\\key gup;)");
if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Descend (\\key gdown;)");
- if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou dépose (\\key action;)");
- if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou dépose (\\key action;)");
+ if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)");
+ if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)");
if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..devant");
- if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derrière");
+ if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derri�re");
if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..pile");
if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions sur la mission (\\key help;)");
- if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Décolle pour terminer la mission");
+ if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "D�colle pour terminer la mission");
if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Construit un derrick");
if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Construit une station");
if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Construit une fabrique de robots");
- if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de réparation");
+ if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de r�paration");
if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Construit un convertisseur");
if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Construit une tour");
if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Construit un centre de recherches");
if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Construit un radar");
if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Construit une fabrique de piles");
if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Construit un laboratoire");
- if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucléaire");
+ if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucl�aire");
if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Construit un paratonnerre");
if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Construit une borne d'information");
if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Montre si le sol est plat");
if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Pose un drapeau de couleur");
- if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enlève un drapeau");
+ if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enl�ve un drapeau");
if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Drapeaux bleus");
if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Drapeaux rouges");
if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Drapeaux verts");
if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Drapeaux jaunes");
if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Drapeaux violets");
- if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un déménageur volant");
- if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un déménageur à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un déménageur à roues");
- if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un déménageur à pattes");
+ if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un d�m�nageur volant");
+ if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un d�m�nageur � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un d�m�nageur � roues");
+ if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un d�m�nageur � pattes");
if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Fabrique un shooter volant");
- if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter à roues");
- if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter à pattes");
+ if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter � roues");
+ if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter � pattes");
if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Fabrique un orgaShooter volant");
- if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter à chenilles");
- if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter à roues");
- if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter à pattes");
+ if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter � roues");
+ if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter � pattes");
if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Fabrique un renifleur volant");
- if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur à chenilles");
- if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur à roues");
- if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur à pattes");
+ if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur � chenilles");
+ if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur � roues");
+ if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur � pattes");
if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Fabrique un robot secoueur");
if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Fabrique un robot phazer");
if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Fabrique un robot recycleur");
@@ -1374,43 +1388,43 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Recherche les robots volants");
if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Recherche le secoueur");
if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Recherche le canon shooter");
- if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de défense");
+ if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de d�fense");
if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Recherche le canon phazer");
if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Recherche le bouclier");
- if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucléaire");
+ if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucl�aire");
if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Recherche les pattes");
if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Recherche le canon orgaShooter");
- if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au départ");
+ if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au d�part");
if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Cherche (\\key action;)");
if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Secoue (\\key action;)");
if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Tir (\\key action;)");
if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)");
- if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Déploie le bouclier (\\key action;)");
+ if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "D�ploie le bouclier (\\key action;)");
if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Stoppe le bouclier (\\key action;)");
if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Rayon du bouclier");
- if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Exécute le programme sélectionné");
- if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme sélectionné");
+ if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Ex�cute le programme s�lectionn�");
+ if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme s�lectionn�");
if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Mettre le SatCom en veille");
- if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Démolit le bâtiment");
- if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'énergie");
+ if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "D�molit le b�timent");
+ if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'�nergie");
if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Niveau du bouclier");
- if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Température du réacteur");
+ if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temp�rature du r�acteur");
if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Travail en cours ...");
- if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes détectés");
- if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffusées");
+ if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes d�tect�s");
+ if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffus�es");
if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Boussole");
//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-carte");
if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-carte");
- if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Caméra (\\key camera;)");
- if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Caméra à gauche");
- if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Caméra à droite");
- if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Caméra plus proche");
- if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Caméra plus loin");
- if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la sélection");
+ if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Cam�ra (\\key camera;)");
+ if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Cam�ra � gauche");
+ if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Cam�ra � droite");
+ if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Cam�ra plus proche");
+ if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Cam�ra plus loin");
+ if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la s�lection");
if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Donne la solution");
- if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> bâtiments");
+ if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> b�timents");
if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action");
- if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relève le crayon");
+ if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon");
if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir");
if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune");
if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange");
@@ -1419,7 +1433,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu");
if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert");
if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun");
- if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Démarre l'enregistrement");
+ if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement");
if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement");
if ( num == EVENT_DT_VISIT0 ||
num == EVENT_DT_VISIT1 ||
@@ -1430,7 +1444,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_CMD ) strcpy(text, "Console de commande");
if ( num == EVENT_SPEED ) strcpy(text, "Vitesse du jeu");
- if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page précédente");
+ if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page pr�c�dente");
if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Page suivante");
if ( num == EVENT_HYPER_HOME ) strcpy(text, "Page initiale");
if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copier");
@@ -1441,13 +1455,13 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Taille 5");
if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions de Houston");
#if _TEEN
- if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-français");
+ if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-fran�ais");
#else
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite");
#endif
- if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoyés par Houston");
+ if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoy�s par Houston");
if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste des objets");
- if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide à la programmation");
+ if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide � la programmation");
if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution");
if ( num == EVENT_STUDIO_OK ) strcpy(text, "D'accord\\Compiler le programme");
@@ -1459,11 +1473,11 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Couper (Ctrl+x)");
if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copier (Ctrl+c)");
if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Coller (Ctrl+v)");
- if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caractères");
+ if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caract�res");
if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)");
- if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide à la programmation (\\key prog;)");
+ if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide � la programmation (\\key prog;)");
if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compiler");
- if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Démarrer/stopper");
+ if ( num == EVENT_STUDIO_RUN ) strcpy(text, "D�marrer/stopper");
if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continuer");
if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Un pas");
}
@@ -1474,40 +1488,40 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_BASE ) strcpy(text, "Vaisseau spatial");
if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick");
if ( num == OBJECT_FACTORY ) strcpy(text, "Fabrique de robots");
- if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de réparation");
+ if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de r�paration");
if ( num == OBJECT_DESTROYER ) strcpy(text, "Destructeur");
if ( num == OBJECT_STATION ) strcpy(text, "Station de recharge");
if ( num == OBJECT_CONVERT ) strcpy(text, "Conversion minerai en titanium");
- if ( num == OBJECT_TOWER ) strcpy(text, "Tour de défense");
+ if ( num == OBJECT_TOWER ) strcpy(text, "Tour de d�fense");
if ( num == OBJECT_NEST ) strcpy(text, "Nid");
if ( num == OBJECT_RESEARCH ) strcpy(text, "Centre de recherches");
if ( num == OBJECT_RADAR ) strcpy(text, "Radar");
if ( num == OBJECT_INFO ) strcpy(text, "Borne d'information");
#if _TEEN
- if ( num == OBJECT_ENERGY ) strcpy(text, "Désintégrateur");
+ if ( num == OBJECT_ENERGY ) strcpy(text, "D�sint�grateur");
#else
if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles");
#endif
- if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de matières organiques");
- if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucléaire");
+ if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de mati�res organiques");
+ if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucl�aire");
if ( num == OBJECT_PARA ) strcpy(text, "Paratonnerre");
if ( num == OBJECT_SAFE ) strcpy(text, "Coffre-fort");
- if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contrôle");
+ if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contr�le");
if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible");
if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible");
- if ( num == OBJECT_START ) strcpy(text, "Départ");
+ if ( num == OBJECT_START ) strcpy(text, "D�part");
if ( num == OBJECT_END ) strcpy(text, "But");
if ( num == OBJECT_STONE ) strcpy(text, "Minerai de titanium");
if ( num == OBJECT_URANIUM ) strcpy(text, "Minerai d'uranium");
- if ( num == OBJECT_BULLET ) strcpy(text, "Matière organique");
+ if ( num == OBJECT_BULLET ) strcpy(text, "Mati�re organique");
if ( num == OBJECT_METAL ) strcpy(text, "Titanium");
if ( num == OBJECT_POWER ) strcpy(text, "Pile normale");
- if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucléaire");
- if ( num == OBJECT_BBOX ) strcpy(text, "Boîte noire");
- if ( num == OBJECT_KEYa ) strcpy(text, "Clé A");
- if ( num == OBJECT_KEYb ) strcpy(text, "Clé B");
- if ( num == OBJECT_KEYc ) strcpy(text, "Clé C");
- if ( num == OBJECT_KEYd ) strcpy(text, "Clé D");
+ if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucl�aire");
+ if ( num == OBJECT_BBOX ) strcpy(text, "Bo�te noire");
+ if ( num == OBJECT_KEYa ) strcpy(text, "Cl� A");
+ if ( num == OBJECT_KEYb ) strcpy(text, "Cl� B");
+ if ( num == OBJECT_KEYc ) strcpy(text, "Cl� C");
+ if ( num == OBJECT_KEYd ) strcpy(text, "Cl� D");
if ( num == OBJECT_TNT ) strcpy(text, "Explosif");
if ( num == OBJECT_BOMB ) strcpy(text, "Mine fixe");
if ( num == OBJECT_BAG ) strcpy(text, "Sac de survie");
@@ -1519,19 +1533,19 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_FLAGv ) strcpy(text, "Drapeau violet");
if ( num == OBJECT_MARKPOWER ) strcpy(text, "Emplacement pour station");
if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Emplacement pour derrick (uranium)");
- if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (clé A)");
- if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (clé B)");
- if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (clé C)");
- if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (clé D)");
+ if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl� A)");
+ if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl� B)");
+ if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl� C)");
+ if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl� D)");
if ( num == OBJECT_MARKSTONE ) strcpy(text, "Emplacement pour derrick (titanium)");
- if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entraînement");
- if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot déménageur");
- if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot déménageur");
+ if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entra�nement");
+ if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot d�m�nageur");
+ if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot d�m�nageur");
if ( num == OBJECT_MOBILEfc ) strcpy(text, "Robot shooter");
if ( num == OBJECT_MOBILEtc ) strcpy(text, "Robot shooter");
if ( num == OBJECT_MOBILEwc ) strcpy(text, "Robot shooter");
@@ -1549,15 +1563,15 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_MOBILErr ) strcpy(text, "Robot recycleur");
if ( num == OBJECT_MOBILErs ) strcpy(text, "Robot bouclier");
if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot sous-marin");
- if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entraînement");
+ if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entra�nement");
if ( num == OBJECT_MOBILEdr ) strcpy(text, "Robot dessinateur");
if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName);
if ( num == OBJECT_TECH ) strcpy(text, "Technicien");
if ( num == OBJECT_TOTO ) strcpy(text, "Robbie");
if ( num == OBJECT_MOTHER ) strcpy(text, "Pondeuse");
if ( num == OBJECT_ANT ) strcpy(text, "Fourmi");
- if ( num == OBJECT_SPIDER ) strcpy(text, "Araignée");
- if ( num == OBJECT_BEE ) strcpy(text, "Guêpe");
+ if ( num == OBJECT_SPIDER ) strcpy(text, "Araign�e");
+ if ( num == OBJECT_BEE ) strcpy(text, "Gu�pe");
if ( num == OBJECT_WORM ) strcpy(text, "Ver");
if ( num == OBJECT_EGG ) strcpy(text, "Oeuf");
if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Epave de robot");
@@ -1566,11 +1580,11 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Epave de robot");
if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Epave de robot");
if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Epave de robot");
- if ( num == OBJECT_RUINfactory ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINdoor ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINsupport ) strcpy(text, "Déchet");
- if ( num == OBJECT_RUINradar ) strcpy(text, "Bâtiment en ruine");
- if ( num == OBJECT_RUINconvert ) strcpy(text, "Bâtiment en ruine");
+ if ( num == OBJECT_RUINfactory ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINdoor ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINsupport ) strcpy(text, "D�chet");
+ if ( num == OBJECT_RUINradar ) strcpy(text, "B�timent en ruine");
+ if ( num == OBJECT_RUINconvert ) strcpy(text, "B�timent en ruine");
if ( num == OBJECT_RUINbase ) strcpy(text, "Epave de vaisseau spatial");
if ( num == OBJECT_RUINhead ) strcpy(text, "Epave de vaisseau spatial");
if ( num == OBJECT_APOLLO1 ||
@@ -1585,211 +1599,211 @@ BOOL GetResourceBase(ResType type, int num, char* text)
strcpy(text, "Erreur");
if ( num == ERR_CMD ) strcpy(text, "Commande inconnue");
#if _NEWLOOK
- if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas installé.");
+ if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas install�.");
if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de CeeBot\net relancer le jeu.");
#else
- if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas installé.");
+ if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install�.");
if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de COLOBOT\net relancer le jeu.");
#endif
- if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapté");
+ if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt�");
if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte déjà quelque chose");
- if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien à prendre");
+ if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte d�j� quelque chose");
+ if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien � prendre");
if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible en mouvement");
- if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occupé");
+ if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup�");
if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Pas d'autre robot");
if ( num == ERR_MANIP_RADIO ) strcpy(text, "Vous ne pouvez pas transporter un objet radioactif");
if ( num == ERR_MANIP_WATER ) strcpy(text, "Vous ne pouvez pas transporter un objet sous l'eau");
- if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien à déposer");
+ if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien � d�poser");
if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible en vol");
if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible sous l'eau");
- if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'énergie");
+ if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'�nergie");
if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium trop loin");
if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium trop proche");
if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Titanium inexistant");
if ( num == ERR_BUILD_FLAT ) strcpy(text, "Sol pas assez plat");
if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Sol plat pas assez grand");
- if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occupé");
+ if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup�");
if ( num == ERR_BUILD_BASE ) strcpy(text, "Trop proche du vaisseau spatial");
- if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un bâtiment");
+ if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un b�timent");
if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible en mouvement");
if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapté");
+ if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt�");
if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible en mouvement");
- if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'énergie");
- if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapté");
- if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Bâtiment trop proche");
+ if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'�nergie");
+ if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt�");
+ if ( num == ERR_TERRA_BUILDING ) strcpy(text, "B�timent trop proche");
if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Objet trop proche");
- if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'énergie");
- if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien à recycler");
- if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'énergie");
- if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Déplacement impossible");
+ if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'�nergie");
+ if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien � recycler");
+ if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'�nergie");
+ if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "D�placement impossible");
if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Objet n'existe pas");
if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Chemin introuvable");
if ( num == ERR_GOTO_ITER ) strcpy(text, "Position inaccessible");
- if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occupée");
- if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapté");
- if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'énergie");
+ if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occup�e");
+ if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt�");
+ if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'�nergie");
if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible en vol");
- if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium à convertir");
+ if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium � convertir");
if ( num == ERR_DERRICK_NULL ) strcpy(text, "Pas de minerai en sous-sol");
- if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
+ if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
if ( num == ERR_TOWER_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'énergie");
+ if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'�nergie");
if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'énergie");
+ if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'�nergie");
if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Pas le bon type de pile");
- if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche déjà effectuée");
- if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
- if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'énergie");
- if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium à transformer");
+ if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche d�j� effectu�e");
+ if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
+ if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'�nergie");
+ if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium � transformer");
if ( num == ERR_ENERGY_BAD ) strcpy(text, "Ne transforme que le titanium");
- if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloquées par un robot ou un objet");
- if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir décoller");
- if ( num == ERR_LABO_NULL ) strcpy(text, "Rien à analyser");
- if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la matière organique");
- if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse déjà effectuée");
- if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'énergie en sous-sol");
- if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'énergie");
- if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium à transformer");
+ if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloqu�es par un robot ou un objet");
+ if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir d�coller");
+ if ( num == ERR_LABO_NULL ) strcpy(text, "Rien � analyser");
+ if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la mati�re organique");
+ if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse d�j� effectu�e");
+ if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'�nergie en sous-sol");
+ if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'�nergie");
+ if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium � transformer");
if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Ne transforme que l'uranium");
if ( num == ERR_FACTORY_NULL ) strcpy(text, "Pas de titanium");
if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Quelque chose est trop proche");
- if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occupé");
- if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouvé de borne d'information");
- if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infecté par un virus");
- if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infecté par un virus, ne fonctionne plus temporairement");
+ if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup�");
+ if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv� de borne d'information");
+ if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect� par un virus");
+ if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect� par un virus, ne fonctionne plus temporairement");
if ( num == ERR_VEH_POWER ) strcpy(text, "Pas de pile");
- if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'énergie");
+ if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'�nergie");
if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible en vol");
if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible en nageant");
if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible en mouvement");
if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible en portant un objet");
if ( num == ERR_FLAG_CREATE ) strcpy(text, "Trop de drapeaux de cette couleur (maximum 5)");
if ( num == ERR_FLAG_PROXY ) strcpy(text, "Trop proche d'un drapeau existant");
- if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau à proximité");
- if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)");
- if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot détruit");
- if ( num == ERR_DELETEBUILDING ) strcpy(text, "Bâtiment détruit");
- if ( num == ERR_TOOMANY ) strcpy(text, "Création impossible, il y a trop d'objets");
+ if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau � proximit�");
+ if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termin�e (appuyez sur \\key help; pour plus de d�tails)");
+ if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot d�truit");
+ if ( num == ERR_DELETEBUILDING ) strcpy(text, "B�timent d�truit");
+ if ( num == ERR_TOOMANY ) strcpy(text, "Cr�ation impossible, il y a trop d'objets");
if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Il manque \"%s\" dans le programme");
if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Interdit dans cet exercice");
- if ( num == INFO_BUILD ) strcpy(text, "Bâtiment terminé");
+ if ( num == INFO_BUILD ) strcpy(text, "B�timent termin�");
if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible");
- if ( num == INFO_RESEARCH ) strcpy(text, "Recherche terminée");
- if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot à chenilles possible");
+ if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termin�e");
+ if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot � chenilles possible");
if ( num == INFO_RESEARCHFLY ) strcpy(text, "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)");
if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Fabrication d'un robot secoueur possible");
if ( num == INFO_RESEARCHCANON ) strcpy(text, "Fabrication de robots shooter possible");
- if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de défense possible");
+ if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de d�fense possible");
if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Fabrication d'un robot phazer possible");
if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Fabrication d'un robot bouclier possible");
- if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucléaire possible");
+ if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucl�aire possible");
if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible");
- if ( num == INFO_LABO ) strcpy(text, "Analyse terminée");
+ if ( num == INFO_LABO ) strcpy(text, "Analyse termin�e");
if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible");
- if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucléaire disponible");
- if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouvé un objet utilisable");
- if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouvé");
- if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouvé");
- if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission terminée >>>");
- if ( num == INFO_LOST ) strcpy(text, "<<< Désolé, mission échouée >>>");
- if ( num == INFO_LOSTq ) strcpy(text, "<<< Désolé, mission échouée >>>");
- if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectué");
+ if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucl�aire disponible");
+ if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv� un objet utilisable");
+ if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv�");
+ if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv�");
+ if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termin�e >>>");
+ if ( num == INFO_LOST ) strcpy(text, "<<< D�sol�, mission �chou�e >>>");
+ if ( num == INFO_LOSTq ) strcpy(text, "<<< D�sol�, mission �chou�e >>>");
+ if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu�");
if ( num == INFO_DELETEPATH ) strcpy(text, "Indicateur atteint");
- if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touchée");
- if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touchée");
- if ( num == INFO_DELETEBEE ) strcpy(text, "Guêpe mortellement touchée");
- if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touché");
- if ( num == INFO_DELETESPIDER ) strcpy(text, "Araignée mortellement touchée");
+ if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touch�e");
+ if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touch�e");
+ if ( num == INFO_DELETEBEE ) strcpy(text, "Gu�pe mortellement touch�e");
+ if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch�");
+ if ( num == INFO_DELETESPIDER ) strcpy(text, "Araign�e mortellement touch�e");
if ( num == INFO_BEGINSATCOM ) strcpy(text, "Consultez votre SatCom en appuyant sur \\key help;");
}
if ( type == RES_CBOT )
{
strcpy(text, "Erreur");
- if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenthèse ouvrante");
- if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenthèse fermante");
- if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit être un boolean");
- if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non déclarée");
+ if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenth�se ouvrante");
+ if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenth�se fermante");
+ if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit �tre un boolean");
+ if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non d�clar�e");
if ( num == TX_BADLEFT ) strcpy(text, "Assignation impossible");
- if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouvé");
+ if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv�");
if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch""");
- if ( num == TX_NOTERM ) strcpy(text, "Instructions après la fin");
+ if ( num == TX_NOTERM ) strcpy(text, "Instructions apr�s la fin");
if ( num == TX_CLOSEBLK ) strcpy(text, "Il manque la fin du bloc");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" sans ""if"" correspondant");
- if ( num == TX_OPENBLK ) strcpy(text, "Début d'un bloc attendu");
- if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de résultat pour l'assignation");
- if ( num == TX_REDEFVAR ) strcpy(text, "Redéfinition d'une variable");
- if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux opérandes ne sont pas de types compatibles");
+ if ( num == TX_OPENBLK ) strcpy(text, "D�but d'un bloc attendu");
+ if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de r�sultat pour l'assignation");
+ if ( num == TX_REDEFVAR ) strcpy(text, "Red�finition d'une variable");
+ if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux op�randes ne sont pas de types compatibles");
if ( num == TX_UNDEFCALL ) strcpy(text, "Routine inconnue");
- if ( num == TX_MISDOTS ) strcpy(text, "Séparateur "" : "" attendu");
+ if ( num == TX_MISDOTS ) strcpy(text, "S�parateur "" : "" attendu");
if ( num == TX_WHILE ) strcpy(text, "Manque le mot ""while""");
if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" en dehors d'une boucle");
if ( num == TX_LABEL ) strcpy(text, "Un label ne peut se placer que devant un ""for"", un ""while"", un ""do"" ou un ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "Cette étiquette n'existe pas");
+ if ( num == TX_NOLABEL ) strcpy(text, "Cette �tiquette n'existe pas");
if ( num == TX_NOCASE ) strcpy(text, "Manque une instruction ""case""");
if ( num == TX_BADNUM ) strcpy(text, "Un nombre est attendu");
- if ( num == TX_VOID ) strcpy(text, "Paramètre void");
- if ( num == TX_NOTYP ) strcpy(text, "Déclaration de type attendu");
+ if ( num == TX_VOID ) strcpy(text, "Param�tre void");
+ if ( num == TX_NOTYP ) strcpy(text, "D�claration de type attendu");
if ( num == TX_NOVAR ) strcpy(text, "Nom d'une variable attendu");
if ( num == TX_NOFONC ) strcpy(text, "Nom de la fonction attendu");
- if ( num == TX_OVERPARAM ) strcpy(text, "Trop de paramètres");
- if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe déjà");
- if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de paramètres");
- if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramètre(s)");
- if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de paramètres");
- if ( num == TX_NOITEM ) strcpy(text, "Cet élément n'existe pas dans cette classe");
+ if ( num == TX_OVERPARAM ) strcpy(text, "Trop de param�tres");
+ if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe d�j�");
+ if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de param�tres");
+ if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de param�tre(s)");
+ if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de param�tres");
+ if ( num == TX_NOITEM ) strcpy(text, "Cet �l�ment n'existe pas dans cette classe");
if ( num == TX_DOT ) strcpy(text, "L'objet n'est pas une instance d'une classe");
- if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur approprié");
- if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe déjà");
+ if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri�");
+ if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe d�j�");
if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu");
- if ( num == TX_RESERVED ) strcpy(text, "Ce mot est réservé");
+ if ( num == TX_RESERVED ) strcpy(text, "Ce mot est r�serv�");
if ( num == TX_BADNEW ) strcpy(text, "Mauvais argument pour ""new""");
if ( num == TX_OPBRK ) strcpy(text, """ [ "" attendu");
- if ( num == TX_BADSTRING ) strcpy(text, "Une chaîne de caractère est attendue");
+ if ( num == TX_BADSTRING ) strcpy(text, "Une cha�ne de caract�re est attendue");
if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index");
- if ( num == TX_PRIVATE ) strcpy(text, "Elément protégé");
+ if ( num == TX_PRIVATE ) strcpy(text, "El�ment prot�g�");
if ( num == TX_NOPUBLIC ) strcpy(text, "Public requis");
- if ( num == TX_DIVZERO ) strcpy(text, "Division par zéro");
- if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialisée");
- if ( num == TX_BADTHROW ) strcpy(text, "Valeur négative refusée pour ""throw""");
- if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourné de résultat");
- if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en exécution");
+ if ( num == TX_DIVZERO ) strcpy(text, "Division par z�ro");
+ if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialis�e");
+ if ( num == TX_BADTHROW ) strcpy(text, "Valeur n�gative refus�e pour ""throw""");
+ if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn� de r�sultat");
+ if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en ex�cution");
if ( num == TX_NOCALL ) strcpy(text, "Appel d'une fonction inexistante");
if ( num == TX_NOCLASS ) strcpy(text, "Cette classe n'existe pas");
if ( num == TX_NULLPT ) strcpy(text, "Objet n'existe pas");
- if ( num == TX_OPNAN ) strcpy(text, "Opération sur un ""nan""");
- if ( num == TX_OUTARRAY ) strcpy(text, "Accès hors du tableau");
- if ( num == TX_STACKOVER ) strcpy(text, "Débordement de la pile");
+ if ( num == TX_OPNAN ) strcpy(text, "Op�ration sur un ""nan""");
+ if ( num == TX_OUTARRAY ) strcpy(text, "Acc�s hors du tableau");
+ if ( num == TX_STACKOVER ) strcpy(text, "D�bordement de la pile");
if ( num == TX_DELETEDPT ) strcpy(text, "Objet inaccessible");
if ( num == TX_FILEOPEN ) strcpy(text, "Ouverture du fichier impossible");
if ( num == TX_NOTOPEN ) strcpy(text, "Le fichier n'est pas ouvert");
- if ( num == TX_ERRREAD ) strcpy(text, "Erreur à la lecture");
- if ( num == TX_ERRWRITE ) strcpy(text, "Erreur à l'écriture");
+ if ( num == TX_ERRREAD ) strcpy(text, "Erreur � la lecture");
+ if ( num == TX_ERRWRITE ) strcpy(text, "Erreur � l'�criture");
}
if ( type == RES_KEY )
{
if ( num == 0 ) strcpy(text, "< aucune >");
- if ( num == VK_LEFT ) strcpy(text, "Flèche Gauche");
- if ( num == VK_RIGHT ) strcpy(text, "Flèche Droite");
- if ( num == VK_UP ) strcpy(text, "Flèche Haut");
- if ( num == VK_DOWN ) strcpy(text, "Flèche Bas");
+ if ( num == VK_LEFT ) strcpy(text, "Fl�che Gauche");
+ if ( num == VK_RIGHT ) strcpy(text, "Fl�che Droite");
+ if ( num == VK_UP ) strcpy(text, "Fl�che Haut");
+ if ( num == VK_DOWN ) strcpy(text, "Fl�che Bas");
if ( num == VK_CANCEL ) strcpy(text, "Control-break");
if ( num == VK_BACK ) strcpy(text, "<--");
if ( num == VK_TAB ) strcpy(text, "Tab");
if ( num == VK_CLEAR ) strcpy(text, "Clear");
- if ( num == VK_RETURN ) strcpy(text, "Entrée");
+ if ( num == VK_RETURN ) strcpy(text, "Entr�e");
if ( num == VK_SHIFT ) strcpy(text, "Shift");
if ( num == VK_CONTROL ) strcpy(text, "Ctrl");
if ( num == VK_MENU ) strcpy(text, "Alt");
@@ -1927,10 +1941,10 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /d");
#endif
if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom");
- if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Großes Fenster");
+ if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Gro�es Fenster");
if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Reduzieren");
- if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Größe");
- if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schließen");
+ if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Gr��e");
+ if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schlie�en");
if ( num == RT_STUDIO_TITLE ) strcpy(text, "Programmeditor");
if ( num == RT_SCRIPT_NEW ) strcpy(text, "Neu");
@@ -1946,7 +1960,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT");
#endif
#if _SCHOOL
- if ( num == RT_TITLE_TRAINER ) strcpy(text, "Übungen");
+ if ( num == RT_TITLE_TRAINER ) strcpy(text, "�bungen");
#else
if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmieren");
#endif
@@ -1969,7 +1983,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_PLAY_CHAPu ) strcpy(text, " Userlevels:");
if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste der Planeten:");
if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste der Kapitel:");
- if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der Übungen des Kapitels:");
+ if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der �bungen des Kapitels:");
if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste der Challenges des Kapitels:");
if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste der Missionen des Planeten:");
if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste der freien Levels des Planeten:");
@@ -1979,9 +1993,9 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_PLAY_RESUME ) strcpy(text, " Zusammenfassung:");
if ( num == RT_SETUP_DEVICE ) strcpy(text, " Driver:");
- if ( num == RT_SETUP_MODE ) strcpy(text, " Auflösung:");
+ if ( num == RT_SETUP_MODE ) strcpy(text, " Aufl�sung:");
if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Klicken Sie auf die neu zu definierende Taste.");
- if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Drücken Sie auf die neue Taste.");
+ if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Dr�cken Sie auf die neue Taste.");
if ( num == RT_PERSO_FACE ) strcpy(text, "Kopf:");
if ( num == RT_PERSO_GLASSES ) strcpy(text, "Brille:");
@@ -1991,43 +2005,43 @@ BOOL GetResourceBase(ResType type, int num, char* text)
#if _NEWLOOK
if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot");
- if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schließen ?");
- if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schließen\\CeeBot schließen");
+ if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schlie�en ?");
+ if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en");
#else
if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT");
- if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schließen ?");
- if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schließen\\COLOBOT schließen");
+ if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schlie�en ?");
+ if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en");
#endif
if ( num == RT_DIALOG_ABORT ) strcpy(text, "Mission abbrechen ?");
if ( num == RT_DIALOG_YES ) strcpy(text, "Abbrechen\\Mission abbrechen");
if ( num == RT_DIALOG_NO ) strcpy(text, "Weitermachen\\Mission weitermachen");
if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Weitermachen\\Weitermachen");
- if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angewählte Gebäude wirklich zerstören ?");
- if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s löschen ?");
- if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerstören");
+ if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angew�hlte Geb�ude wirklich zerst�ren ?");
+ if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s l�schen ?");
+ if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerst�ren");
if ( num == RT_DIALOG_NODEL ) strcpy(text, "Abbrechen");
if ( num == RT_DIALOG_LOADING ) strcpy(text, "Laden");
- if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe über den Begriff (\\key cbot;)");
+ if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe �ber den Begriff (\\key cbot;)");
if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Kompilieren OK (0 Fehler)");
if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programm beendet");
if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Liste der Objekte\n");
if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Liste der Roboter\n");
- if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Gebäude\n");
- if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenstände\n");
+ if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Geb�ude\n");
+ if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenst�nde\n");
if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes der Feinde\n");
if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (keine)\\n;\n");
if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Fehler\n");
- if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfügbar !\n");
+ if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verf�gbar !\n");
- if ( num == RT_IO_OPEN ) strcpy(text, "Öffnen");
+ if ( num == RT_IO_OPEN ) strcpy(text, "�ffnen");
if ( num == RT_IO_SAVE ) strcpy(text, "Speichern");
if ( num == RT_IO_LIST ) strcpy(text, "Ordner: %s");
if ( num == RT_IO_NAME ) strcpy(text, "Name:");
if ( num == RT_IO_DIR ) strcpy(text, "In:");
if ( num == RT_IO_PRIVATE ) strcpy(text, "Privat\\Privater Ordner");
- if ( num == RT_IO_PUBLIC ) strcpy(text, "Öffentlich\\Gemeinsamer Ordner für alle Spieler");
+ if ( num == RT_IO_PUBLIC ) strcpy(text, "�ffentlich\\Gemeinsamer Ordner f�r alle Spieler");
if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Entwickelt von:");
if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com");
@@ -2046,17 +2060,17 @@ BOOL GetResourceBase(ResType type, int num, char* text)
{
if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK");
if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Abbrechen");
- if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nächster");
+ if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "N�chster");
if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Vorherg.");
- if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menü (\\key quit;)");
+ if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Men� (\\key quit;)");
if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK");
if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Abbrechen");
#if _SCHOOL
- if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Übungen\\Programmierübungen");
+ if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�bungen\\Programmier�bungen");
#else
- if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmierübungen");
+ if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmier�bungen");
#endif
if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Herausforderungen");
if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missionen\\Aufbruch ins Weltall");
@@ -2064,29 +2078,29 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel");
if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\Userlevels");
if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\In Entwicklung befindliche Prototypen");
- if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername ändern");
+ if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername �ndern");
if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Einstellungen\\Einstellungen");
if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Neu anfangen\\Die Mission von vorne anfangen");
if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Speichern\\Aktuelle Mission speichern");
- if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission öffnen");
+ if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission �ffnen");
#if _NEWLOOK
- if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurück zu CeeBot");
- if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schließen\\CeeBot schließen");
+ if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu CeeBot");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en");
#else
- if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurück zu COLOBOT");
- if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schließen\\COLOBOT schließen");
+ if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu COLOBOT");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en");
#endif
- if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zurück \\Zurück zum Hauptmenü");
+ if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zur�ck \\Zur�ck zum Hauptmen�");
if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Spielen ...\\Los geht's");
- if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmauflösung");
+ if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmaufl�sung");
if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafik\\Grafische Einstellungen");
if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Spiel\\Gameplay Einstellungen");
if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Steuerung\\Auswahl der Tasten");
- if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Geräusche\\Lautstärke Geräusche und Musik");
+ if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Ger�usche\\Lautst�rke Ger�usche und Musik");
if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Einheit");
- if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Auflösung");
+ if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Aufl�sung");
if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Vollbildschirm\\Vollbildschirm oder Fenster");
- if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Änderungen ausführen\\Getätigte Einstellungen ausführen");
+ if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "�nderungen ausf�hren\\Get�tigte Einstellungen ausf�hren");
if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robby\\Ihr Assistent");
if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Schatten\\Schlagschatten auf dem Boden");
@@ -2100,74 +2114,74 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Anzahl Partikel\\Explosionen, Staub, usw.");
if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Sichtweite\\Maximale Sichtweite");
if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Detailliertheit der Objekte in 3D");
- if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualität der Texturen\\Qualität der Anzeige");
- if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenstände\\Anzahl Gegenstände ohne Funktion");
- if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Menüs\\Funken und Sterne in den Menüs");
- if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Glänzende Tasten\\Glänzende Tasten in den Menüs");
+ if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit�t der Texturen\\Qualit�t der Anzeige");
+ if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenst�nde\\Anzahl Gegenst�nde ohne Funktion");
+ if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Men�s\\Funken und Sterne in den Men�s");
+ if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Gl�nzende Tasten\\Gl�nzende Tasten in den Men�s");
if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Hilfsblasen\\Hilfsblasen");
if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Filme\\Filme vor und nach den Missionen");
- if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zurücksetzen \\Kleine Show beim Zurücksetzen in den Übungen");
- if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschädigt.");
+ if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zur�cksetzen \\Kleine Show beim Zur�cksetzen in den �bungen");
+ if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen besch�digt.");
if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht");
if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Umkehr X\\Umkehr der Kameradrehung X-Achse");
if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Umkehr Y\\Umkehr der Kameradrehung Y-Achse");
if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Beben bei Explosionen\\Die Kamera bebt bei Explosionen");
if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Schatten unter der Maus\\Ein Schatten erscheint unter der Maus");
- if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einrücken\\Beim Bearbeiten der Programme");
- if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einrücken mit 4 Leerstellen\\Einrücken mit 2 oder 4 Leerstellen");
- if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Lösung zugänglich\\Die Lösung ist im Programmslot \"4: Lösung\" zugänglich");
+ if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einr�cken\\Beim Bearbeiten der Programme");
+ if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einr�cken mit 4 Leerstellen\\Einr�cken mit 2 oder 4 Leerstellen");
+ if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "L�sung zug�nglich\\Die L�sung ist im Programmslot \"4: L�sung\" zug�nglich");
- if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zurücksetzen\\Standarddefinition aller Tasten");
+ if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zur�cksetzen\\Standarddefinition aller Tasten");
if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Drehung nach links\\Steuer links");
if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Drehung nach rechts\\Steuer rechts");
- if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorwärts\\Bewegung nach vorne");
- if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Rückwärts\\Bewegung nach hinten");
+ if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorw�rts\\Bewegung nach vorne");
+ if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "R�ckw�rts\\Bewegung nach hinten");
if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Steigen\\Leistung des Triebwerks steigern");
if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Sinken\\Leistung des Triebwerks drosseln");
if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Andere Kamera\\Sichtpunkt einstellen");
- if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt auswählen");
- if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\Führt die Standardhandlung des Roboters aus.");
- if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera näher\\Bewegung der Kamera vorwärts");
- if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera rückwärts");
- if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nächstes auswählen\\Nächstes Objekt auswählen");
- if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten auswählen\\Astronauten auswählen");
- if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder Übung verlassen");
- if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen für die Mission oder Übung");
- if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe über die Programmiersprache CBOT");
- if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe über Begriff\\Hilfe über einen Begriff");
+ if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt ausw�hlen");
+ if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\F�hrt die Standardhandlung des Roboters aus.");
+ if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera n�her\\Bewegung der Kamera vorw�rts");
+ if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera r�ckw�rts");
+ if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "N�chstes ausw�hlen\\N�chstes Objekt ausw�hlen");
+ if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten ausw�hlen\\Astronauten ausw�hlen");
+ if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder �bung verlassen");
+ if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen f�r die Mission oder �bung");
+ if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe �ber die Programmiersprache CBOT");
+ if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe �ber Begriff\\Hilfe �ber einen Begriff");
if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Ort der Meldung\\Zeigt den Ort, von dem die letzte Meldung stammt");
if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Geschwindigkeit 1.0x\\Normale Spielgeschwindigkeit");
if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Geschwindigkeit 1.5x\\Spielgeschwindigkeit anderthalb Mal schneller");
if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Geschwindigkeit 2.0x\\Spielgeschwindigkeit doppelt so schnell");
if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Geschwindigkeit 3.0x\\Spielgeschwindigkeit drei Mal schneller");
- if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Geräusche:\\Lautstärke Motoren, Stimmen, usw.");
- if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Geräuschkulisse:\\Lautstärke der Soundtracks der CD");
- if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Geräusche\\Orten der Geräusche im Raum");
+ if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Ger�usche:\\Lautst�rke Motoren, Stimmen, usw.");
+ if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Ger�uschkulisse:\\Lautst�rke der Soundtracks der CD");
+ if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Ger�usche\\Orten der Ger�usche im Raum");
- if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualität (großes Framerate)");
- if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualität");
- if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualität (niedriges Framerate)");
+ if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualit�t (gro�es Framerate)");
+ if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualit�t");
+ if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualit�t (niedriges Framerate)");
- if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Geräusche und Geräuschkulisse");
- if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautstärke");
+ if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Ger�usche und Ger�uschkulisse");
+ if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautst�rke");
if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Joystick\\Joystick oder Tastatur");
- if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die Lösung\\Zeigt nach 3mal Scheitern die Lösung");
+ if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die L�sung\\Zeigt nach 3mal Scheitern die L�sung");
if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Name des Spielers");
- if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler auswählen");
- if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Behält den bisherigen Spieler bei");
- if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler löschen\\Löscht den Spieler aus der Liste");
+ if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler ausw�hlen");
+ if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Beh�lt den bisherigen Spieler bei");
+ if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler l�schen\\L�scht den Spieler aus der Liste");
if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Name ");
if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Speichern\\Speichert die Mission");
- if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\Öffnet eine gespeicherte Mission");
+ if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\�ffnet eine gespeicherte Mission");
if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste der gespeicherten Missionen");
if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Dateiname:");
if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Name der Mission");
if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Ansicht der Mission");
- if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Löschen\\Löscht die gespeicherte Mission");
+ if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "L�schen\\L�scht die gespeicherte Mission");
if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aussehen\\Erscheinungsbild des Astronauten einstellen");
if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK");
@@ -2178,10 +2192,10 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Drehung links");
if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Drehung rechts");
if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rot");
- if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Grün");
+ if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Gr�n");
if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blau");
if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rot");
- if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Grün");
+ if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Gr�n");
if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blau");
if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Kopf 1");
if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Kopf 4");
@@ -2197,8 +2211,8 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Vorherg. Auwahl (\\key desel;)");
if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Drehung links (\\key left;)");
if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Drehung rechts (\\key right;)");
- if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorwärts (\\key up;)");
- if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Rückwärts (\\key down;)");
+ if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorw�rts (\\key up;)");
+ if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "R�ckw�rts (\\key down;)");
if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Steigt (\\key gup;)");
if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Sinkt (\\key gdown;)");
if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)");
@@ -2206,14 +2220,14 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..vorne");
if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..hinten");
if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..Batterie");
- if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen über die Mission(\\key help;)");
+ if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen �ber die Mission(\\key help;)");
if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Abheben nach vollbrachter Mission");
if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Baut einen Bohrturm");
if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Baut ein Kraftwerk");
if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Baut eine Roboterfabrik");
if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Baut ein Reparaturzentrum");
if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Baut einen Konverter");
- if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Geschützturm");
+ if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Gesch�tzturm");
if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Baut ein Forschungszentrum");
if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Baut ein Radar");
if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Baut eine Batteriefabrik");
@@ -2226,7 +2240,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Sammelt die Fahne ein");
if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blaue Fahne");
if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Rote Fahne");
- if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Grüne Fahne");
+ if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Gr�ne Fahne");
if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Gelbe Fahne");
if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violette Fahne");
if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Baut einen Jettransporter");
@@ -2241,10 +2255,10 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Baut einen Kettenorgashooter");
if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Baut einen Radorgashooter");
if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Baut einen Krabbelorgashooter");
- if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschnüffler");
- if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschnüffler");
- if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschnüffler");
- if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschnüffler");
+ if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschn�ffler");
+ if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschn�ffler");
+ if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschn�ffler");
+ if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschn�ffler");
if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Baut einen Stampfer");
if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Baut einen Phazershooter");
if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Baut einen Recycler");
@@ -2254,26 +2268,26 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Forschungsprogramm Jetantrieb");
if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Forschungsprogramm Stampfer");
if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Forschungsprogramm Shooterkanone");
- if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Geschützturm");
+ if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Gesch�tzturm");
if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Forschungsprogramm Phazerkanone");
if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Forschungsprogramm Schutzschild");
if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Forschungsprogramm Brennstoffzelle");
if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Forschungsprogramm Krabbelantrieb");
if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Forschungsprogramm Orgashooterkanone");
- if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zurücksetzen");
- if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schnüffeln (\\key action;)");
+ if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zur�cksetzen");
+ if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schn�ffeln (\\key action;)");
if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Stampfen (\\key action;)");
if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Feuer (\\key action;)");
if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recyceln (\\key action;)");
if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Schutzschild ausfahren (\\key action;)");
if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Schutzschild einholen (\\key action;)");
if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Reichweite Schutzschild");
- if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gewähltes Programm ausführen");
- if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gewähltes Programm bearbeiten");
+ if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gew�hltes Programm ausf�hren");
+ if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gew�hltes Programm bearbeiten");
if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom in Standby");
- if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Gebäude sprengen");
+ if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Geb�ude sprengen");
if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energievorrat");
- if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Schäden");
+ if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Sch�den");
if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Triebwerktemperatur");
if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Prozess im Gang ...");
if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Anzahl erfasster Insekten");
@@ -2284,10 +2298,10 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)");
if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Kamera links");
if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Kamera rechts");
- if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera näher");
+ if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera n�her");
if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Kamera weiter weg");
- if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen über das ausgewählte Objekt");
- if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die Lösung");
+ if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen �ber das ausgew�hlte Objekt");
+ if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die L�sung");
if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Anzeige Roboter <-> Bauten");
if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Zeigt die Reichweite");
if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Bleistift abheben");
@@ -2297,7 +2311,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Roten Bleistift hinunterlassen");
if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Violetten Bleistift hinunterlassen");
if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Blauen Bleistift hinunterlassen");
- if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Grünen Bleistift hinunterlassen");
+ if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Gr�nen Bleistift hinunterlassen");
if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Braunen Bleistift hinunterlassen");
if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Aufnahme starten");
if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Aufnahme stoppen");
@@ -2311,37 +2325,37 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_SPEED ) strcpy(text, "Spielgeschwindigkeit");
if ( num == EVENT_HYPER_PREV ) strcpy(text, "Vorherg. Seite");
- if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Nächste Seite");
+ if ( num == EVENT_HYPER_NEXT ) strcpy(text, "N�chste Seite");
if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home");
if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopieren");
- if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Größe 1");
- if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Größe 2");
- if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Größe 3");
- if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Größe 4");
- if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Größe 5");
+ if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Gr��e 1");
+ if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Gr��e 2");
+ if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Gr��e 3");
+ if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Gr��e 4");
+ if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Gr��e 5");
if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Anweisungen von Houston");
#if _TEEN
- if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Wörterbuch Englisch-Deutsch");
+ if ( num == EVENT_SATCOM_SAT ) strcpy(text, "W�rterbuch Englisch-Deutsch");
#else
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellitenbericht");
#endif
- if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston übermittelte Programme");
+ if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston �bermittelte Programme");
if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste der Objekte");
- if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe über Programmieren");
- if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Lösung");
+ if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe �ber Programmieren");
+ if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "L�sung");
if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Programm kompilieren");
- if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schließen");
+ if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schlie�en");
if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Neu");
- if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Öffnen (Ctrl+o)");
+ if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "�ffnen (Ctrl+o)");
if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Speichern (Ctrl+s)");
if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Widerrufen (Ctrl+z)");
if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Ausschneiden (Ctrl+x)");
if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopieren (Ctrl+c)");
- if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einfügen (Ctrl+v)");
- if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengröße");
+ if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einf�gen (Ctrl+v)");
+ if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengr��e");
if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Anweisungen (\\key help;)");
- if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe über Programmieren (\\key prog;)");
+ if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe �ber Programmieren (\\key prog;)");
if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompilieren");
if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Start/Stop");
if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/Weitermachen");
@@ -2350,7 +2364,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( type == RES_OBJECT )
{
- if ( num == OBJECT_PORTICO ) strcpy(text, "Träger");
+ if ( num == OBJECT_PORTICO ) strcpy(text, "Tr�ger");
if ( num == OBJECT_BASE ) strcpy(text, "Raumschiff");
if ( num == OBJECT_DERRICK ) strcpy(text, "Bohrturm");
if ( num == OBJECT_FACTORY ) strcpy(text, "Roboterfabrik");
@@ -2358,13 +2372,13 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_DESTROYER ) strcpy(text, "Einstampfer");
if ( num == OBJECT_STATION ) strcpy(text, "Kraftwerk");
if ( num == OBJECT_CONVERT ) strcpy(text, "Konverter Erz-Titan");
- if ( num == OBJECT_TOWER ) strcpy(text, "Geschützturm");
+ if ( num == OBJECT_TOWER ) strcpy(text, "Gesch�tzturm");
if ( num == OBJECT_NEST ) strcpy(text, "Orgastoffquelle");
if ( num == OBJECT_RESEARCH ) strcpy(text, "Forschungszentrum");
if ( num == OBJECT_RADAR ) strcpy(text, "Radar");
if ( num == OBJECT_INFO ) strcpy(text, "Infoserver");
#if _TEEN
- if ( num == OBJECT_ENERGY ) strcpy(text, "Auflöser");
+ if ( num == OBJECT_ENERGY ) strcpy(text, "Aufl�ser");
#else
if ( num == OBJECT_ENERGY ) strcpy(text, "Batteriefabrik");
#endif
@@ -2375,8 +2389,8 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_HUSTON ) strcpy(text, "Kontrollzentrum");
if ( num == OBJECT_TARGET1 ) strcpy(text, "Zielscheibe");
if ( num == OBJECT_TARGET2 ) strcpy(text, "Zielscheibe");
- if ( num == OBJECT_START ) strcpy(text, "Startfläche");
- if ( num == OBJECT_END ) strcpy(text, "Zielfläche");
+ if ( num == OBJECT_START ) strcpy(text, "Startfl�che");
+ if ( num == OBJECT_END ) strcpy(text, "Zielfl�che");
if ( num == OBJECT_STONE ) strcpy(text, "Titanerz");
if ( num == OBJECT_URANIUM ) strcpy(text, "Platinerz");
if ( num == OBJECT_BULLET ) strcpy(text, "Orgastoff");
@@ -2384,30 +2398,30 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_POWER ) strcpy(text, "Elektrolytische Batterie");
if ( num == OBJECT_ATOMIC ) strcpy(text, "Brennstoffzelle");
if ( num == OBJECT_BBOX ) strcpy(text, "Flugschreiber");
- if ( num == OBJECT_KEYa ) strcpy(text, "Schlüssel A");
- if ( num == OBJECT_KEYb ) strcpy(text, "Schlüssel B");
- if ( num == OBJECT_KEYc ) strcpy(text, "Schlüssel C");
- if ( num == OBJECT_KEYd ) strcpy(text, "Schlüssel D");
+ if ( num == OBJECT_KEYa ) strcpy(text, "Schl�ssel A");
+ if ( num == OBJECT_KEYb ) strcpy(text, "Schl�ssel B");
+ if ( num == OBJECT_KEYc ) strcpy(text, "Schl�ssel C");
+ if ( num == OBJECT_KEYd ) strcpy(text, "Schl�ssel D");
if ( num == OBJECT_TNT ) strcpy(text, "Sprengstoff");
if ( num == OBJECT_BOMB ) strcpy(text, "Landmine");
- if ( num == OBJECT_BAG ) strcpy(text, "Überlebenskit");
+ if ( num == OBJECT_BAG ) strcpy(text, "�berlebenskit");
if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint");
if ( num == OBJECT_FLAGb ) strcpy(text, "Blaue Fahne");
if ( num == OBJECT_FLAGr ) strcpy(text, "Rote Fahne");
- if ( num == OBJECT_FLAGg ) strcpy(text, "Grüne Fahne");
+ if ( num == OBJECT_FLAGg ) strcpy(text, "Gr�ne Fahne");
if ( num == OBJECT_FLAGy ) strcpy(text, "Gelbe Fahne");
if ( num == OBJECT_FLAGv ) strcpy(text, "Violette Fahne");
- if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung für unterirdische Energiequelle");
- if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung für unterirdisches Platinvorkommen");
- if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung für vergrabenen Schlüssel A");
- if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung für vergrabenen Schlüssel B");
- if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung für vergrabenen Schlüssel C");
- if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung für vergrabenen Schlüssel D");
- if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung für unterirdisches Titanvorkommen");
- if ( num == OBJECT_MOBILEft ) strcpy(text, "Übungsroboter");
- if ( num == OBJECT_MOBILEtt ) strcpy(text, "Übungsroboter");
- if ( num == OBJECT_MOBILEwt ) strcpy(text, "Übungsroboter");
- if ( num == OBJECT_MOBILEit ) strcpy(text, "Übungsroboter");
+ if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung f�r unterirdische Energiequelle");
+ if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung f�r unterirdisches Platinvorkommen");
+ if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel A");
+ if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel B");
+ if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel C");
+ if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel D");
+ if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung f�r unterirdisches Titanvorkommen");
+ if ( num == OBJECT_MOBILEft ) strcpy(text, "�bungsroboter");
+ if ( num == OBJECT_MOBILEtt ) strcpy(text, "�bungsroboter");
+ if ( num == OBJECT_MOBILEwt ) strcpy(text, "�bungsroboter");
+ if ( num == OBJECT_MOBILEit ) strcpy(text, "�bungsroboter");
if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter");
if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter");
if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter");
@@ -2420,10 +2434,10 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_MOBILEti ) strcpy(text, "OrgaShooter");
if ( num == OBJECT_MOBILEwi ) strcpy(text, "OrgaShooter");
if ( num == OBJECT_MOBILEii ) strcpy(text, "OrgaShooter");
- if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schnüffler");
- if ( num == OBJECT_MOBILEts ) strcpy(text, "Schnüffler");
- if ( num == OBJECT_MOBILEws ) strcpy(text, "Schnüffler");
- if ( num == OBJECT_MOBILEis ) strcpy(text, "Schnüffler");
+ if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schn�ffler");
+ if ( num == OBJECT_MOBILEts ) strcpy(text, "Schn�ffler");
+ if ( num == OBJECT_MOBILEws ) strcpy(text, "Schn�ffler");
+ if ( num == OBJECT_MOBILEis ) strcpy(text, "Schn�ffler");
if ( num == OBJECT_MOBILErt ) strcpy(text, "Stampfer");
if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazershooter");
if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler");
@@ -2434,7 +2448,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName);
if ( num == OBJECT_TECH ) strcpy(text, "Techniker");
if ( num == OBJECT_TOTO ) strcpy(text, "Robby");
- if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenkönigin");
+ if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenk�nigin");
if ( num == OBJECT_ANT ) strcpy(text, "Ameise");
if ( num == OBJECT_SPIDER ) strcpy(text, "Spinne");
if ( num == OBJECT_BEE ) strcpy(text, "Wespe");
@@ -2446,17 +2460,17 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Roboterwrack");
if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Roboterwrack");
if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Roboterwrack");
- if ( num == OBJECT_RUINfactory ) strcpy(text, "Gebäuderuine");
- if ( num == OBJECT_RUINdoor ) strcpy(text, "Gebäuderuine");
+ if ( num == OBJECT_RUINfactory ) strcpy(text, "Geb�uderuine");
+ if ( num == OBJECT_RUINdoor ) strcpy(text, "Geb�uderuine");
if ( num == OBJECT_RUINsupport ) strcpy(text, "Abfall");
- if ( num == OBJECT_RUINradar ) strcpy(text, "Gebäuderuine");
- if ( num == OBJECT_RUINconvert ) strcpy(text, "Gebäuderuine");
+ if ( num == OBJECT_RUINradar ) strcpy(text, "Geb�uderuine");
+ if ( num == OBJECT_RUINconvert ) strcpy(text, "Geb�uderuine");
if ( num == OBJECT_RUINbase ) strcpy(text, "Raumschiffruine");
if ( num == OBJECT_RUINhead ) strcpy(text, "Raumschiffruine");
if ( num == OBJECT_APOLLO1 ||
num == OBJECT_APOLLO3 ||
num == OBJECT_APOLLO4 ||
- num == OBJECT_APOLLO5 ) strcpy(text, "Überreste einer Apollo-Mission");
+ num == OBJECT_APOLLO5 ) strcpy(text, "�berreste einer Apollo-Mission");
if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle");
}
@@ -2472,34 +2486,34 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu.");
#endif
if ( num == ERR_MANIP_VEH ) strcpy(text, "Roboter ungeeignet");
- if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unmöglich");
- if ( num == ERR_MANIP_BUSY ) strcpy(text, "Trägt schon etwas");
+ if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unm�glich");
+ if ( num == ERR_MANIP_BUSY ) strcpy(text, "Tr�gt schon etwas");
if ( num == ERR_MANIP_NIL ) strcpy(text, "Nichts zu ergreifen");
- if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unmöglich");
+ if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unm�glich");
if ( num == ERR_MANIP_OCC ) strcpy(text, "Stelle schon besetzt");
if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Kein anderer Roboter");
- if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie können keinen radioaktiven Gegenstand tragen");
- if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie können unter Wasser nichts tragen");
+ if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie k�nnen keinen radioaktiven Gegenstand tragen");
+ if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie k�nnen unter Wasser nichts tragen");
if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nichts abzulegen");
- if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unmöglich");
- if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unmöglich");
+ if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unm�glich");
+ if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unm�glich");
if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Nicht genug Energie");
if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titan zu weit weg");
if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titan zu nahe");
if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Kein Titan vorhanden");
if ( num == ERR_BUILD_FLAT ) strcpy(text, "Boden nicht eben genug");
- if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht groß genug");
+ if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht gro� genug");
if ( num == ERR_BUILD_BUSY ) strcpy(text, "Stelle schon besetzt");
if ( num == ERR_BUILD_BASE ) strcpy(text, "Zu nahe am Raumschiff");
- if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Gebäude");
- if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unmöglich");
- if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unmöglich");
+ if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Geb�ude");
+ if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unm�glich");
+ if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unm�glich");
if ( num == ERR_SEARCH_VEH ) strcpy(text, "Roboter ungeeignet");
- if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unmöglich");
+ if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unm�glich");
if ( num == ERR_TERRA_VEH ) strcpy(text, "Roboter ungeeignet");
if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Nicht genug Energie");
if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Boden ungeeignet");
- if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Gebäude zu nahe");
+ if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Geb�ude zu nahe");
if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Gegenstand zu nahe");
if ( num == ERR_RECOVER_VEH ) strcpy(text, "Roboter ungeeignet");
if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Nicht genug Energie");
@@ -2514,25 +2528,25 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == ERR_GOTO_BUSY ) strcpy(text, "Ziel ist schon besetzt");
if ( num == ERR_FIRE_VEH ) strcpy(text, "Roboter ungeeignet");
if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Nicht genug Energie");
- if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unmöglich");
+ if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unm�glich");
if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden");
- if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagerstätte");
+ if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagerst�tte");
if ( num == ERR_STATION_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen");
if ( num == ERR_TOWER_POWER ) strcpy(text, "Keine Batterie");
if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Keine Energie mehr");
if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Keine Batterie");
if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Nicht mehr genug Energie");
if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Falscher Batterietyp");
- if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgeführt");
+ if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgef�hrt");
if ( num == ERR_ENERGY_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen");
if ( num == ERR_ENERGY_LOW ) strcpy(text, "Noch nicht genug Energie");
if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden");
if ( num == ERR_ENERGY_BAD ) strcpy(text, "Wandelt nur Titanerz um");
- if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die Türen werden von einem Gegenstand blockiert");
+ if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die T�ren werden von einem Gegenstand blockiert");
if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Gehen Sie an Bord, bevor Sie abheben");
if ( num == ERR_LABO_NULL ) strcpy(text, "Nichts zu analysieren");
if ( num == ERR_LABO_BAD ) strcpy(text, "Analysiert nur Orgastoff");
- if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgeführt");
+ if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgef�hrt");
if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen");
if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Noch nicht genug Energie");
if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Kein konvertierbares Platin");
@@ -2542,57 +2556,57 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == ERR_RESET_NEAR ) strcpy(text, "Stelle schon besetzt");
if ( num == ERR_INFO_NULL ) strcpy(text, "Kein Infoserver in Reichweite");
if ( num == ERR_VEH_VIRUS ) strcpy(text, "Ein Programm wurde von einem Virus infiziert");
- if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise außer Betrieb");
+ if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise au�er Betrieb");
if ( num == ERR_VEH_POWER ) strcpy(text, "Keine Batterie");
if ( num == ERR_VEH_ENERGY ) strcpy(text, "Keine Energie mehr");
- if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unmöglich");
- if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unmöglich");
- if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unmöglich");
- if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unmöglich wenn Sie etwas tragen");
+ if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unm�glich");
+ if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unm�glich");
+ if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unm�glich");
+ if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unm�glich wenn Sie etwas tragen");
if ( num == ERR_FLAG_CREATE ) strcpy(text, "Zu viele Fahnen dieser Farbe (Maximum 5)");
if ( num == ERR_FLAG_PROXY ) strcpy(text, "Zu nahe an einer anderen Fahne");
if ( num == ERR_FLAG_DELETE ) strcpy(text, "Keine Fahne in Reichweite");
- if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Drücken Sie auf \\key help; für weitere Informationen)");
- if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerstört");
- if ( num == ERR_DELETEBUILDING ) strcpy(text, "Gebäude zerstört");
+ if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Dr�cken Sie auf \\key help; f�r weitere Informationen)");
+ if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerst�rt");
+ if ( num == ERR_DELETEBUILDING ) strcpy(text, "Geb�ude zerst�rt");
if ( num == ERR_TOOMANY ) strcpy(text, "Kein neues Objekt kann erstellt werden (zu viele vorhanden)");
if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Es fehlt \"%s\" in Ihrem Programm");
- if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser Übung verboten");
+ if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser �bung verboten");
- if ( num == INFO_BUILD ) strcpy(text, "Gebäude fertiggestellt");
- if ( num == INFO_CONVERT ) strcpy(text, "Titan verfügbar");
+ if ( num == INFO_BUILD ) strcpy(text, "Geb�ude fertiggestellt");
+ if ( num == INFO_CONVERT ) strcpy(text, "Titan verf�gbar");
if ( num == INFO_RESEARCH ) strcpy(text, "Forschungsprogramm abgeschlossen");
- if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb möglich");
- if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie können jetzt mit den Tasten \\key gup; und \\key gdown; fliegen");
- if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers möglich");
- if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters möglich");
- if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Geschützturms möglich");
- if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters möglich");
- if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes möglich");
- if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik möglich");
- if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verfügbar");
+ if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb m�glich");
+ if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie k�nnen jetzt mit den Tasten \\key gup; und \\key gdown; fliegen");
+ if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers m�glich");
+ if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters m�glich");
+ if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Gesch�tzturms m�glich");
+ if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters m�glich");
+ if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes m�glich");
+ if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik m�glich");
+ if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verf�gbar");
if ( num == INFO_LABO ) strcpy(text, "Analyse vollendet");
- if ( num == INFO_ENERGY ) strcpy(text, "Batterie verfügbar");
- if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verfügbar");
+ if ( num == INFO_ENERGY ) strcpy(text, "Batterie verf�gbar");
+ if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verf�gbar");
if ( num == INFO_FINDING ) strcpy(text, "Sie haben ein brauchbares Objekt gefunden");
- if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle für Kraftwerk gefunden");
- if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
- if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
- if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
- if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
- if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
- if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle für Bohrturm gefunden");
+ if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle f�r Kraftwerk gefunden");
+ if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
+ if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
+ if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
+ if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
+ if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
+ if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden");
if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, Mission vollendet >>>");
if ( num == INFO_LOST ) strcpy(text, "<<< Mission gescheitert >>>");
if ( num == INFO_LOSTq ) strcpy(text, "<<< Mission gescheitert >>>");
if ( num == INFO_WRITEOK ) strcpy(text, "Mission gespeichert");
if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint erreicht");
- if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenkönigin tödlich verwundet");
- if ( num == INFO_DELETEANT ) strcpy(text, "Ameise tödlich verwundet");
- if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe tödlich verwundet");
- if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm tödlich verwundet");
- if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne tödlich verwundet");
- if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; drücken");
+ if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenk�nigin t�dlich verwundet");
+ if ( num == INFO_DELETEANT ) strcpy(text, "Ameise t�dlich verwundet");
+ if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe t�dlich verwundet");
+ if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm t�dlich verwundet");
+ if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne t�dlich verwundet");
+ if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; dr�cken");
}
if ( type == RES_CBOT )
@@ -2602,20 +2616,20 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_CLOSEPAR ) strcpy(text, "Es fehlt eine geschlossene Klammer "")""");
if ( num == TX_NOTBOOL ) strcpy(text, "Der Ausdruck muss einen boolschen Wert ergeben");
if ( num == TX_UNDEFVAR ) strcpy(text, "Variable nicht deklariert");
- if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unmöglich");
+ if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unm�glich");
if ( num == TX_ENDOF ) strcpy(text, "Es fehlt ein Strichpunkt "";"" am Ende der Anweisung");
if ( num == TX_OUTCASE ) strcpy(text, "Anweisung ""case"" ohne vorhergehende Anweisung ""switch""");
if ( num == TX_NOTERM ) strcpy(text, "Hier ist eine Anweisung nach dem Ende des Programms");
if ( num == TX_CLOSEBLK ) strcpy(text, "Es fehlt eine geschlossene geschweifte Klammer ""}"" (Ende des Blocks)");
if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Anweisung ""else"" ohne vorhergehende Anweisung ""if""");
if ( num == TX_OPENBLK ) strcpy(text, "Es fehlt eine offene geschweifte Klammer""{""");
- if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ für die Zuweisung");
+ if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ f�r die Zuweisung");
if ( num == TX_REDEFVAR ) strcpy(text, "Eine Variable wird zum zweiten Mal deklariert");
if ( num == TX_BAD2TYPE ) strcpy(text, "Die zwei Operanden sind nicht kompatibel");
if ( num == TX_UNDEFCALL ) strcpy(text, "Unbekannte Funktion");
if ( num == TX_MISDOTS ) strcpy(text, "Es fehlt ein Doppelpunkt "" : """);
if ( num == TX_WHILE ) strcpy(text, "Es fehlt das Wort ""while""");
- if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" außerhalb einer Schleife");
+ if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" au�erhalb einer Schleife");
if ( num == TX_LABEL ) strcpy(text, "Ein Label kann nur vor den Anweisungen ""for"", ""while"", ""do"" oder ""switch"" vorkommen");
if ( num == TX_NOLABEL ) strcpy(text, "Dieses Label existiert nicht");
if ( num == TX_NOCASE ) strcpy(text, "Es fehlt eine Anweisung ""case""");
@@ -2627,34 +2641,34 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == TX_OVERPARAM ) strcpy(text, "Zu viele Parameter");
if ( num == TX_REDEF ) strcpy(text, "Diese Funktion gibt es schon");
if ( num == TX_LOWPARAM ) strcpy(text, "Nicht genug Parameter");
- if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen verträgt Parameter diesen Typs");
- if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen verträgt diese Anzahl Parameter");
+ if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt Parameter diesen Typs");
+ if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt diese Anzahl Parameter");
if ( num == TX_NOITEM ) strcpy(text, "Dieses Element gibt es nicht in dieser Klasse");
if ( num == TX_DOT ) strcpy(text, "Das Objekt ist nicht eine Instanz einer Klasse");
if ( num == TX_NOCONST ) strcpy(text, "Es gibt keinen geeigneten Konstruktor");
if ( num == TX_REDEFCLASS ) strcpy(text, "Diese Klasse gibt es schon");
if ( num == TX_CLBRK ) strcpy(text, "Es fehlt eine geschlossene eckige Klammer "" ] """);
if ( num == TX_RESERVED ) strcpy(text, "Dieses Wort ist reserviert");
- if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente für ""new""");
+ if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente f�r ""new""");
if ( num == TX_OPBRK ) strcpy(text, "Es fehlt eine offene eckige Klammer "" [ """);
if ( num == TX_BADSTRING ) strcpy(text, "Hier wird eine Zeichenkette erwartet");
- if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ für einen Index");
- if ( num == TX_PRIVATE ) strcpy(text, "Geschütztes Element (private)");
+ if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ f�r einen Index");
+ if ( num == TX_PRIVATE ) strcpy(text, "Gesch�tztes Element (private)");
if ( num == TX_NOPUBLIC ) strcpy(text, "Hier muss das Wort ""public"" stehen");
if ( num == TX_DIVZERO ) strcpy(text, "Teilung durch Null");
if ( num == TX_NOTINIT ) strcpy(text, "Der Wert dieser Variable wurde nicht definiert");
- if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet für Anweisung ""throw""");
- if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zurückgegeben");
- if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgeführt");
+ if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet f�r Anweisung ""throw""");
+ if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zur�ckgegeben");
+ if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgef�hrt");
if ( num == TX_NOCALL ) strcpy(text, "Die aufgerufene Funktion existiert nicht");
if ( num == TX_NOCLASS ) strcpy(text, "Diese Klasse existiert nicht");
if ( num == TX_NULLPT ) strcpy(text, "Das Objekt existiert nicht");
if ( num == TX_OPNAN ) strcpy(text, "Operation mit dem Wert ""nan""");
- if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array außerhalb der Grenzen");
+ if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array au�erhalb der Grenzen");
if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow");
- if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verfügbar");
- if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht geöffnet werden");
- if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht geöffnet");
+ if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verf�gbar");
+ if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht ge�ffnet werden");
+ if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht ge�ffnet");
if ( num == TX_ERRREAD ) strcpy(text, "Fehler beim Lesezugriff");
if ( num == TX_ERRWRITE ) strcpy(text, "Fehler beim Schreibzugriff");
}
@@ -2770,7 +2784,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == VK_BUTTON31 ) strcpy(text, "Knopf 31");
if ( num == VK_BUTTON32 ) strcpy(text, "Knopf 32");
if ( num == VK_WHEELUP ) strcpy(text, "Mausrad nach vorne");
- if ( num == VK_WHEELDOWN ) strcpy(text, "Mausrad zurück");
+ if ( num == VK_WHEELDOWN ) strcpy(text, "Mausrad zur�ck");
}
#endif
@@ -2808,9 +2822,9 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /pl");
#endif
if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom");
- if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powiêksz");
+ if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powi�ksz");
if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Pomniejsz");
- if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielkoϾ");
+ if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko��");
if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Zamknij");
if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edytor programu");
@@ -2826,27 +2840,27 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT");
if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT");
#endif
- if ( num == RT_TITLE_TRAINER ) strcpy(text, "Æwiczenia programistyczne");
+ if ( num == RT_TITLE_TRAINER ) strcpy(text, "�wiczenia programistyczne");
if ( num == RT_TITLE_DEFI ) strcpy(text, "Wyzwania");
if ( num == RT_TITLE_MISSION ) strcpy(text, "Misje");
if ( num == RT_TITLE_FREE ) strcpy(text, "Swobodna gra");
if ( num == RT_TITLE_TEEN ) strcpy(text, "Swobodna gra");
- if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy u¿ytkownika");
+ if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy u�ytkownika");
if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypy");
if ( num == RT_TITLE_SETUP ) strcpy(text, "Opcje");
- if ( num == RT_TITLE_NAME ) strcpy(text, "Imiê gracza");
- if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl¹d");
- if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie¿¹c¹ misjê");
- if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan¹ misjê");
+ if ( num == RT_TITLE_NAME ) strcpy(text, "Imi� gracza");
+ if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl�d");
+ if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie��c� misj�");
+ if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan� misj�");
- if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia³y:");
- if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia³y:");
+ if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia�y:");
+ if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia�y:");
if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planety:");
if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planety:");
- if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy u¿ytkownika:");
+ if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy u�ytkownika:");
if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planety:");
if ( num == RT_PLAY_CHAPte ) strcpy(text, " Planety:");
- if ( num == RT_PLAY_LISTt ) strcpy(text, " Æwiczenia w tym rozdziale:");
+ if ( num == RT_PLAY_LISTt ) strcpy(text, " �wiczenia w tym rozdziale:");
if ( num == RT_PLAY_LISTd ) strcpy(text, " Wyzwania w tym rozdziale:");
if ( num == RT_PLAY_LISTm ) strcpy(text, " Misje na tej planecie:");
if ( num == RT_PLAY_LISTf ) strcpy(text, " Swobodna gra na tej planecie:");
@@ -2856,57 +2870,57 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == RT_PLAY_RESUME ) strcpy(text, " Streszczenie:");
if ( num == RT_SETUP_DEVICE ) strcpy(text, " Sterowniki:");
- if ( num == RT_SETUP_MODE ) strcpy(text, " RozdzielczoϾ:");
- if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, który chcesz przedefiniowaæ.");
- if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nastêpnie naciœnij klawisz, którego chcesz u¿ywaæ.");
+ if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo��:");
+ if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, kt�ry chcesz przedefiniowa�.");
+ if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nast�pnie naci�nij klawisz, kt�rego chcesz u�ywa�.");
if ( num == RT_PERSO_FACE ) strcpy(text, "Rodzaj twarzy:");
if ( num == RT_PERSO_GLASSES ) strcpy(text, "Okulary:");
- if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w³osów:");
+ if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w�os�w:");
if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:");
- if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pasków:");
+ if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pask�w:");
#if _NEWLOOK
if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot");
- if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuœciæ grê CeeBot?");
- if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakoñcz\\Koñczy grê CeeBot");
+ if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� CeeBot?");
+ if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot");
#else
if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT");
- if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuœciæ grê COLOBOT?");
- if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakoñcz\\Koñczy grê COLOBOT");
+ if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� COLOBOT?");
+ if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT");
#endif
- if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opuœciæ misjê?");
- if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie¿¹c¹ misjê");
- if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie¿¹c¹ misjê");
- if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje grê");
- if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczyæ zaznaczony budynek?");
- if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowaæ zapisane gry gracza %s? ");
- if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usuñ");
+ if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opu�ci� misj�?");
+ if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie��c� misj�");
+ if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie��c� misj�");
+ if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr�");
+ if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy� zaznaczony budynek?");
+ if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa� zapisane gry gracza %s? ");
+ if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu�");
if ( num == RT_DIALOG_NODEL ) strcpy(text, "Anuluj");
if ( num == RT_DIALOG_LOADING ) strcpy(text, "WCZYTYWANIE");
- if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skróty klawiszowe (\\key cbot;)");
- if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b³êdów)");
- if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zakoñczony");
+ if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skr�ty klawiszowe (\\key cbot;)");
+ if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b��d�w)");
+ if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zako�czony");
- if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiektów\n");
+ if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiekt�w\n");
if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Roboty\n");
if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Budynki\n");
if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Obiekty ruchome\n");
if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Obcy\n");
if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (brak)\\n;\n");
- if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B³¹d\n");
- if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dostêpna jedynie gdy dzia³a \\l;stacja radarowa\\u object\\radar;.\n");
+ if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B��d\n");
+ if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dost�pna jedynie gdy dzia�a \\l;stacja radarowa\\u object\\radar;.\n");
- if ( num == RT_IO_OPEN ) strcpy(text, "Otwórz");
+ if ( num == RT_IO_OPEN ) strcpy(text, "Otw�rz");
if ( num == RT_IO_SAVE ) strcpy(text, "Zapisz");
if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s");
if ( num == RT_IO_NAME ) strcpy(text, "Nazwa:");
if ( num == RT_IO_DIR ) strcpy(text, "Folder:");
if ( num == RT_IO_PRIVATE ) strcpy(text, "Prywatny\\Folder prywatny");
- if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder ogólnodostêpny");
+ if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder og�lnodost�pny");
- if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Twórcy:");
+ if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Tw�rcy:");
if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com");
if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Wersja polska wydana przez:");
if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.manta.com.pl");
@@ -2920,133 +2934,133 @@ BOOL GetResourceBase(ResType type, int num, char* text)
{
if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK");
if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Anuluj");
- if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nastêpny");
+ if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nast�pny");
if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Poprzedni");
if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)");
if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK");
if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Anuluj");
- if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Æwiczenia\\Æwiczenia programistyczne");
+ if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�wiczenia\\�wiczenia programistyczne");
if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Wyzwania\\Wyzwania programistyczne");
- if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misjê");
- if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celów");
- if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celów");
- if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy u¿ytkownika");
+ if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj�");
+ if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w");
+ if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w");
+ if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy u�ytkownika");
if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Prototypy\\Prototypy w trakcie rozwijania");
- if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imiê gracza");
+ if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi� gracza");
if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Opcje\\Preferencje");
- if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misjê od pocz¹tku");
- if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie¿¹c¹ misjê");
- if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan¹ misjê");
+ if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj� od pocz�tku");
+ if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�");
+ if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan� misj�");
#if _NEWLOOK
- if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powróæ do gry CeeBot");
- if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakoñcz\\Koñczy grê CeeBot");
+ if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry CeeBot");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot");
#else
- if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powróæ do gry COLOBOT");
- if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakoñcz\\Koñczy grê COLOBOT");
+ if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry COLOBOT");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT");
#endif
if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Wstecz \\Wraca do poprzedniego ekranu");
- if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misjê!");
- if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz¹dzenie\\Ustawienia sterownika i rozdzielczoœci");
+ if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj�!");
+ if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz�dzenie\\Ustawienia sterownika i rozdzielczo�ci");
if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafika\\Ustawienia grafiki");
if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Gra\\Ustawienia gry");
if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Sterowanie\\Ustawienia klawiatury, joysticka i myszy");
- if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "DŸwiêk\\G³oœnoœæ muzyki i dŸwiêków gry");
+ if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "D�wi�k\\G�o�no�� muzyki i d�wi�k�w gry");
if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Jednostka");
- if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "RozdzielczoϾ");
- if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe³ny ekran\\Pe³ny ekran lub tryb okna");
+ if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo��");
+ if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe�ny ekran\\Pe�ny ekran lub tryb okna");
if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Zastosuj zmiany\\Aktywuje zmienione ustawienia");
- if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Twój asystent");
+ if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Tw�j asystent");
if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Cienie\\Cienie na ziemi");
if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Znaki na ziemi\\Znaki na ziemi");
- if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i bród na robotach i budynkach");
- if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg³a\\Mg³a");
- if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s³oneczne\\Promienie s³oneczne na niebie");
- if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg³awice");
+ if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i br�d na robotach i budynkach");
+ if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg�a\\Mg�a");
+ if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s�oneczne\\Promienie s�oneczne na niebie");
+ if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg�awice");
if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planety i gwiazdy\\Obiekty astronomiczne na niebie");
- if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne oœwietlenie\\Ruchome Ÿród³a œwiat³a");
- if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz¹stek\\Wybuchy, kurz, odbicia, itp.");
- if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G³êbokoœæ pola\\Maksymalna widocznoœæ");
- if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczegó³y\\Jakoœæ wizualna obiektów 3D");
- if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\JakoϾ tekstur ");
- if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Iloœæ elementów dekoracyjnych \\Iloœæ elementów czysto dekoracyjnych");
- if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz¹stki w interfejsie\\Para i iskry z silników w interfejsie");
- if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\Œwiec¹ce przyciski");
- if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyjaœnia funkcje przycisków");
- if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpoczêciem i na zakoñczenie misji");
- if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Koñcowy film\\Film na zakoñczenie æwiczeñ");
- if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogieñ\\W³asne strza³y uszkadzaj¹ Twoje obiekty");
- if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawêdzi");
- if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwrócenie myszy X\\Odwrócenie kierunków przewijania w poziomie");
- if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwrócenie myszy Y\\Odwrócenie kierunków przewijania w pionie");
- if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz¹sy przy wybuchach\\Ekran trzêsie siê podczas wybuchów");
- if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cieñ kursora myszy\\Dodaje cieñ kursorowi myszy");
- if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wciêcia\\Automatyczne wciêcia podczas edycji programu");
- if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du¿e wciêcie\\2 lub 4 spacje wciêcia na ka¿dy poziom zdefiniowany przez klamry");
- if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accès aux solutions\\Programme \"4: Solution\" dans les exercices");
+ if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne o�wietlenie\\Ruchome �r�d�a �wiat�a");
+ if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz�stek\\Wybuchy, kurz, odbicia, itp.");
+ if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G��boko�� pola\\Maksymalna widoczno��");
+ if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczeg�y\\Jako�� wizualna obiekt�w 3D");
+ if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako�� tekstur ");
+ if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo�� element�w dekoracyjnych \\Ilo�� element�w czysto dekoracyjnych");
+ if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz�stki w interfejsie\\Para i iskry z silnik�w w interfejsie");
+ if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\�wiec�ce przyciski");
+ if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyja�nia funkcje przycisk�w");
+ if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpocz�ciem i na zako�czenie misji");
+ if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Ko�cowy film\\Film na zako�czenie �wicze�");
+ if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie�\\W�asne strza�y uszkadzaj� Twoje obiekty");
+ if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego kraw�dzi");
+ if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwr�cenie myszy X\\Odwr�cenie kierunk�w przewijania w poziomie");
+ if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwr�cenie myszy Y\\Odwr�cenie kierunk�w przewijania w pionie");
+ if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz�sy przy wybuchach\\Ekran trz�sie si� podczas wybuch�w");
+ if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie� kursora myszy\\Dodaje cie� kursorowi myszy");
+ if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wci�cia\\Automatyczne wci�cia podczas edycji programu");
+ if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du�e wci�cie\\2 lub 4 spacje wci�cia na ka�dy poziom zdefiniowany przez klamry");
+ if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices");
if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standardowa kontrola\\Standardowe klawisze funkcyjne");
- if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skrêæ w lewo\\Obraca robota w lewo");
- if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obróæ w prawo\\Obraca robota w prawo");
- if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprzód\\Porusza do przodu");
- if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty³u");
- if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W górê\\Zwiêksza moc silnika");
- if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W dó³\\Zmniejsza moc silnika");
- if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmieñ kamerê\\Prze³¹cza pomiêdzy kamer¹ pok³adow¹ i œledz¹c¹");
+ if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr�� w lewo\\Obraca robota w lewo");
+ if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr�� w prawo\\Obraca robota w prawo");
+ if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprz�d\\Porusza do przodu");
+ if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty�u");
+ if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W g�r�\\Zwi�ksza moc silnika");
+ if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d�\\Zmniejsza moc silnika");
+ if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie� kamer�\\Prze��cza pomi�dzy kamer� pok�adow� i �ledz�c�");
if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Poprzedni obiekt\\Zaznacz poprzedni obiekt");
- if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnieœ/upuœæ, strzelaj, szukaj, itp.)");
- if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli¿ej\\Przybli¿a kamerê");
- if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamerê");
- if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nastêpny obiekt\\Zaznacza nastêpny obiekt");
- if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronautê\\Zaznacza astronautê");
- if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zakoñcz\\Koñczy bie¿¹c¹ misjê lub æwiczenie");
- if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz¹ce bie¿¹cej misji");
- if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podrêcznik programowania\\Dostarcza szczegó³ow¹ pomoc w programowaniu");
- if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s³ów kluczowych\\Dok³adniejsza pomoc na temat s³ów kluczowych");
- if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomoœci\\Pokazuje sk¹d zosta³a wys³ana ostatnia wiadomoœæ");
- if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Prêdkoœæ 1,0x\\Prêdkoœæ normalna");
- if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Prêdkoœæ 1,5x\\1,5 raza szybciej");
- if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Prêdkoœæ 2,0x\\Dwa razy szybciej");
- if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Prêdkoœæ 3,0x\\Trzy razy szybciej");
-
- if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty dŸwiêkowe:\\G³oœnoœæ silników, g³osów, strza³ów, itp.");
- if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G³oœnoœæ œcie¿ek dŸwiêkowych z p³yty CD");
- if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "DŸwiêk 3D\\Przestrzenne pozycjonowanie dŸwiêków");
-
- if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni¿sza\\Minimalna jakoœæ grafiki (najwy¿sza czêstotliwoœæ odœwie¿ania)");
- if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jakoϾ grafiki");
- if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy¿sza\\Maksymalna jakoœæ grafiki (najni¿sza czêstotliwoœæ odœwie¿ania)");
-
- if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak dŸwiêków");
- if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g³oœnoœæ dŸwiêków");
-
- if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U¿ywaj joysticka\\Joystick lub klawiatura");
- if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dostêp do rozwi¹zania\\Pokazuje rozwi¹zanie (szczegó³owe instrukcje dotycz¹ce misji)");
-
- if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imiê gracza");
+ if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie�/upu��, strzelaj, szukaj, itp.)");
+ if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli�ej\\Przybli�a kamer�");
+ if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer�");
+ if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nast�pny obiekt\\Zaznacza nast�pny obiekt");
+ if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut�\\Zaznacza astronaut�");
+ if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zako�cz\\Ko�czy bie��c� misj� lub �wiczenie");
+ if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz�ce bie��cej misji");
+ if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podr�cznik programowania\\Dostarcza szczeg�ow� pomoc w programowaniu");
+ if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s��w kluczowych\\Dok�adniejsza pomoc na temat s��w kluczowych");
+ if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomo�ci\\Pokazuje sk�d zosta�a wys�ana ostatnia wiadomo��");
+ if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Pr�dko�� 1,0x\\Pr�dko�� normalna");
+ if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Pr�dko�� 1,5x\\1,5 raza szybciej");
+ if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Pr�dko�� 2,0x\\Dwa razy szybciej");
+ if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Pr�dko�� 3,0x\\Trzy razy szybciej");
+
+ if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty d�wi�kowe:\\G�o�no�� silnik�w, g�os�w, strza��w, itp.");
+ if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G�o�no�� �cie�ek d�wi�kowych z p�yty CD");
+ if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "D�wi�k 3D\\Przestrzenne pozycjonowanie d�wi�k�w");
+
+ if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni�sza\\Minimalna jako�� grafiki (najwy�sza cz�stotliwo�� od�wie�ania)");
+ if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako�� grafiki");
+ if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy�sza\\Maksymalna jako�� grafiki (najni�sza cz�stotliwo�� od�wie�ania)");
+
+ if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak d�wi�k�w");
+ if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g�o�no�� d�wi�k�w");
+
+ if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U�ywaj joysticka\\Joystick lub klawiatura");
+ if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dost�p do rozwi�zania\\Pokazuje rozwi�zanie (szczeg�owe instrukcje dotycz�ce misji)");
+
+ if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi� gracza");
if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Wybiera zaznaczonego gracza");
- if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie¿¹ce imiê gracza");
- if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usuñ gracza\\Usuwa gracza z listy");
- if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imiê gracza");
+ if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie��ce imi� gracza");
+ if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu� gracza\\Usuwa gracza z listy");
+ if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi� gracza");
- if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie¿¹c¹ misjê");
- if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon¹ misjê");
+ if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�");
+ if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon� misj�");
if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Lista zapisanych misji");
if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nazwa pliku:");
if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nazwa misji");
if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Fotografia");
- if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usuñ\\Usuwa zaznaczony plik");
+ if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu�\\Usuwa zaznaczony plik");
- if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl¹d\\Wybierz swoj¹ postaæ");
+ if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl�d\\Wybierz swoj� posta�");
if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK");
if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Anuluj");
- if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl¹du");
- if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G³owa\\Twarz i w³osy");
+ if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl�du");
+ if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G�owa\\Twarz i w�osy");
if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Skafander\\Skafander astronauty");
- if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obróæ w lewo");
- if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obróæ w prawo");
+ if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr�� w lewo");
+ if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr�� w prawo");
if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Czerwony");
if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Zielony");
if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Niebieski");
@@ -3057,7 +3071,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Twarz 4");
if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Twarz 3");
if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Twarz 2");
- if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okularów");
+ if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okular�w");
if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Okulary 1");
if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Okulary 2");
if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Okulary 3");
@@ -3065,102 +3079,102 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Okulary 5");
if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Poprzednie zaznaczenie (\\key desel;)");
- if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skrêæ w lewo (\\key left;)");
- if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skrêæ w prawo (\\key right;)");
- if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprzód (\\key up;)");
+ if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr�� w lewo (\\key left;)");
+ if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr�� w prawo (\\key right;)");
+ if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprz�d (\\key up;)");
if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)");
- if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Góra (\\key gup;)");
- if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Dó³ (\\key gdown;)");
- if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnieœ lub upuœæ (\\key action;)");
- if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnieœ lub upuœæ (\\key action;)");
+ if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "G�ra (\\key gup;)");
+ if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D� (\\key gdown;)");
+ if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)");
+ if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)");
if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..przed");
if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..za");
if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..ogniwo elektryczne");
- if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz¹ce misji (\\key help;)");
- if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odleæ, aby zakoñczyæ misjê");
- if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalniê");
- if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowniê");
- if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabrykê robotów");
+ if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz�ce misji (\\key help;)");
+ if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle�, aby zako�czy� misj�");
+ if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni�");
+ if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni�");
+ if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk� robot�w");
if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Zbuduj warsztat");
- if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hutê");
- if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie¿ê obronn¹");
+ if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut�");
+ if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie�� obronn�");
if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Zbuduj centrum badawcze");
- if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacjê radarow¹");
- if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabrykê ogniw elektrycznych");
+ if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj� radarow�");
+ if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk� ogniw elektrycznych");
if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Zbuduj laboratorium");
- if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowniê atomow¹");
+ if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni� atomow�");
if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Zbuduj odgromnik");
- if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacjê przekaŸnikow¹");
- if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka¿ czy teren jest p³aski");
- if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flagê");
- if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usuñ flagê");
+ if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj� przeka�nikow�");
+ if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka� czy teren jest p�aski");
+ if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag�");
+ if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu� flag�");
if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Niebieskie flagi");
if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Czerwone flagi");
if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Zielone flagi");
- if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\¯ó³te flagi");
+ if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\��te flagi");
if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Fioletowe flagi");
- if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj¹cy");
- if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko³ach");
+ if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj�cy");
+ if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko�ach");
if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Zbuduj transporter na nogach");
- if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia³o lataj¹ce");
- if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia³o na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia³o na ko³ach");
- if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia³o na nogach");
- if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj¹ce dzia³o organiczne");
- if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia³o organiczne na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia³o organiczne na ko³ach");
- if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia³o organiczne na nogach");
- if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj¹cy");
- if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g¹sienicach");
- if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko³ach");
+ if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia�o lataj�ce");
+ if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia�o na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia�o na ko�ach");
+ if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia�o na nogach");
+ if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj�ce dzia�o organiczne");
+ if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia�o organiczne na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia�o organiczne na ko�ach");
+ if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia�o organiczne na nogach");
+ if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj�cy");
+ if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g�sienicach");
+ if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko�ach");
if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Zbuduj szperacz na nogach");
if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Zbuduj robota uderzacza");
- if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia³o fazowe");
+ if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia�o fazowe");
if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera");
- if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os³aniajacza");
+ if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os�aniajacza");
if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Zbuduj robota nurka");
- if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na g¹sienicach");
- if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem lataj¹cym");
+ if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na g�sienicach");
+ if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem lataj�cym");
if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Rozpocznij prace badawcze nad robotem uderzaczem");
- if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dzia³em");
- if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie¿¹ obronn¹");
- if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dzia³em fazowym");
- if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem os³aniaczem");
- if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi¹ atomow¹");
+ if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em");
+ if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie�� obronn�");
+ if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em fazowym");
+ if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem os�aniaczem");
+ if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi� atomow�");
if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na nogach");
- if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dzia³em organicznym");
- if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powrót do pocz¹tku");
+ if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em organicznym");
+ if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powr�t do pocz�tku");
if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Szukaj (\\key action;)");
if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Uderz (\\key action;)");
if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Strzelaj (\\key action;)");
if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Odzyskaj (\\key action;)");
- if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os³onê (\\key action;)");
- if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy³¹cz os³onê (\\key action;)");
- if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasiêg os³ony");
+ if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os�on� (\\key action;)");
+ if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy��cz os�on� (\\key action;)");
+ if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasi�g os�ony");
if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Wykonaj zaznaczony program");
if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edytuj zaznaczony program");
- if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze³¹cz przekaŸnik SatCom w stan gotowoœci");
+ if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze��cz przeka�nik SatCom w stan gotowo�ci");
if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Zniszcz budynek");
if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Poziom energii");
- if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os³ony");
+ if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os�ony");
if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temperatura silnika");
- if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci¹¿ pracuje...");
- if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insektów");
- if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes³ane informacje");
+ if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci�� pracuje...");
+ if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insekt�w");
+ if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes�ane informacje");
if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompas");
//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mapka");
- if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powiêkszenie mapki");
+ if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powi�kszenie mapki");
if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)");
if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left");
if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right");
if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest");
if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest");
if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Pomoc na temat zaznaczonego obiektu");
- if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka¿ rozwi¹zanie");
- if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze³¹cz roboty <-> budynki");
- if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka¿ zasiêg");
- if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relève le crayon");
+ if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka� rozwi�zanie");
+ if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze��cz roboty <-> budynki");
+ if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka� zasi�g");
+ if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon");
if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir");
if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune");
if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange");
@@ -3169,26 +3183,26 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu");
if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert");
if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun");
- if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Démarre l'enregistrement");
+ if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement");
if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement");
if ( num == EVENT_DT_VISIT0 ||
num == EVENT_DT_VISIT1 ||
num == EVENT_DT_VISIT2 ||
num == EVENT_DT_VISIT3 ||
- num == EVENT_DT_VISIT4 ) strcpy(text, "Poka¿ miejsce");
+ num == EVENT_DT_VISIT4 ) strcpy(text, "Poka� miejsce");
if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj");
if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia");
- if ( num == EVENT_SPEED ) strcpy(text, "Prêdkoœæ gry");
+ if ( num == EVENT_SPEED ) strcpy(text, "Pr�dko�� gry");
if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz");
- if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprzód");
- if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocz¹tek");
+ if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprz�d");
+ if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocz�tek");
if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopiuj");
- if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "WielkoϾ 1");
- if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "WielkoϾ 2");
- if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "WielkoϾ 3");
- if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "WielkoϾ 4");
- if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "WielkoϾ 5");
+ if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko�� 1");
+ if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko�� 2");
+ if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko�� 3");
+ if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko�� 4");
+ if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko�� 5");
if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Rozkazy z Houston");
#if _TEEN
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity");
@@ -3196,22 +3210,22 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity");
#endif
if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Program dostarczony z Houston");
- if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiektów");
- if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podrêcznik programowania");
- if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi¹zanie");
+ if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiekt�w");
+ if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podr�cznik programowania");
+ if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi�zanie");
if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Zamyka edytor programu i powraca do gry");
if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Anuluj\\Pomija wszystkie zmiany");
if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nowy");
- if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otwórz (Ctrl+O)");
+ if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otw�rz (Ctrl+O)");
if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Zapisz (Ctrl+S)");
if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Cofnij (Ctrl+Z)");
if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Wytnij (Ctrl+X)");
if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopiuj (Ctrl+C)");
if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Wklej (Ctrl+V)");
- if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "WielkoϾ czcionki");
+ if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko�� czcionki");
if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Rozkazy (\\key help;)");
- if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podrêcznik programowania (\\key prog;)");
+ if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podr�cznik programowania (\\key prog;)");
if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompiluj");
if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Wykonaj/Zatrzymaj");
if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pauza/Kontynuuj");
@@ -3220,19 +3234,19 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( type == RES_OBJECT )
{
- if ( num == OBJECT_PORTICO ) strcpy(text, "¯uraw przesuwalny");
+ if ( num == OBJECT_PORTICO ) strcpy(text, "�uraw przesuwalny");
if ( num == OBJECT_BASE ) strcpy(text, "Statek kosmiczny");
if ( num == OBJECT_DERRICK ) strcpy(text, "Kopalnia");
- if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robotów");
+ if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robot�w");
if ( num == OBJECT_REPAIR ) strcpy(text, "Warsztat");
if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer");
if ( num == OBJECT_STATION ) strcpy(text, "Stacja energetyczna");
- if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rudê na tytan");
- if ( num == OBJECT_TOWER ) strcpy(text, "Wie¿a obronna");
+ if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud� na tytan");
+ if ( num == OBJECT_TOWER ) strcpy(text, "Wie�a obronna");
if ( num == OBJECT_NEST ) strcpy(text, "Gniazdo");
if ( num == OBJECT_RESEARCH ) strcpy(text, "Centrum badawcze");
if ( num == OBJECT_RADAR ) strcpy(text, "Stacja radarowa");
- if ( num == OBJECT_INFO ) strcpy(text, "Stacja przekaŸnikowa informacji");
+ if ( num == OBJECT_INFO ) strcpy(text, "Stacja przeka�nikowa informacji");
#if _TEEN
if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych");
#else
@@ -3245,7 +3259,7 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_HUSTON ) strcpy(text, "Centrum Kontroli Misji w Houston");
if ( num == OBJECT_TARGET1 ) strcpy(text, "Cel");
if ( num == OBJECT_TARGET2 ) strcpy(text, "Cel");
- if ( num == OBJECT_START ) strcpy(text, "Pocz¹tek");
+ if ( num == OBJECT_START ) strcpy(text, "Pocz�tek");
if ( num == OBJECT_END ) strcpy(text, "Koniec");
if ( num == OBJECT_STONE ) strcpy(text, "Ruda tytanu");
if ( num == OBJECT_URANIUM ) strcpy(text, "Ruda uranu");
@@ -3258,55 +3272,55 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_KEYb ) strcpy(text, "Klucz B");
if ( num == OBJECT_KEYc ) strcpy(text, "Klucz C");
if ( num == OBJECT_KEYd ) strcpy(text, "Klucz D");
- if ( num == OBJECT_TNT ) strcpy(text, "Materia³y wybuchowe");
+ if ( num == OBJECT_TNT ) strcpy(text, "Materia�y wybuchowe");
if ( num == OBJECT_BOMB ) strcpy(text, "Mina");
if ( num == OBJECT_BAG ) strcpy(text, "Zestaw przetrwania");
if ( num == OBJECT_WAYPOINT ) strcpy(text, "Punkt kontrolny");
if ( num == OBJECT_FLAGb ) strcpy(text, "Niebieska flaga");
if ( num == OBJECT_FLAGr ) strcpy(text, "Czerwona flaga");
if ( num == OBJECT_FLAGg ) strcpy(text, "Zielona flaga");
- if ( num == OBJECT_FLAGy ) strcpy(text, "¯ó³ta flaga");
+ if ( num == OBJECT_FLAGy ) strcpy(text, "��ta flaga");
if ( num == OBJECT_FLAGv ) strcpy(text, "Fioletowa flaga");
- if ( num == OBJECT_MARKPOWER ) strcpy(text, "ród³o energii (miejsce na elektrowniê)");
- if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z³o¿e uranu (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalniê)");
- if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalniê)");
- if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z³o¿e tytanu (miejsce na kopalniê)");
+ if ( num == OBJECT_MARKPOWER ) strcpy(text, "�r�d�o energii (miejsce na elektrowni�)");
+ if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z�o�e uranu (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni�)");
+ if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z�o�e tytanu (miejsce na kopalni�)");
if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot treningowy");
if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot treningowy");
- if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj¹cy");
- if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g¹sienicach");
- if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko³ach");
+ if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj�cy");
+ if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g�sienicach");
+ if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko�ach");
if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter na nogach");
- if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia³o lataj¹ce");
- if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia³o na g¹sienicach");
- if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia³o na ko³ach");
- if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia³o na nogach");
- if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj¹ce dzia³o organiczne");
- if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia³o organiczne na g¹sienicach");
- if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia³o organiczne na ko³ach");
- if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia³o organiczne na nogach");
- if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj¹cy");
- if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g¹sienicach");
- if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko³ach");
+ if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia�o lataj�ce");
+ if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia�o na g�sienicach");
+ if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia�o na ko�ach");
+ if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia�o na nogach");
+ if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj�ce dzia�o organiczne");
+ if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia�o organiczne na g�sienicach");
+ if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia�o organiczne na ko�ach");
+ if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia�o organiczne na nogach");
+ if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj�cy");
+ if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g�sienicach");
+ if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko�ach");
if ( num == OBJECT_MOBILEis ) strcpy(text, "Szperacz na nogach");
if ( num == OBJECT_MOBILErt ) strcpy(text, "Uderzacz");
- if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia³o fazowe");
+ if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia�o fazowe");
if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler");
- if ( num == OBJECT_MOBILErs ) strcpy(text, "Os³aniacz");
+ if ( num == OBJECT_MOBILErs ) strcpy(text, "Os�aniacz");
if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot nurek");
if ( num == OBJECT_MOBILEtg ) strcpy(text, "Robot cel");
if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot");
if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName);
- if ( num == OBJECT_TECH ) strcpy(text, "In¿ynier");
+ if ( num == OBJECT_TECH ) strcpy(text, "In�ynier");
if ( num == OBJECT_TOTO ) strcpy(text, "Robbie");
- if ( num == OBJECT_MOTHER ) strcpy(text, "Królowa Obcych");
- if ( num == OBJECT_ANT ) strcpy(text, "Mrówka");
- if ( num == OBJECT_SPIDER ) strcpy(text, "Paj¹k");
+ if ( num == OBJECT_MOTHER ) strcpy(text, "Kr�lowa Obcych");
+ if ( num == OBJECT_ANT ) strcpy(text, "Mr�wka");
+ if ( num == OBJECT_SPIDER ) strcpy(text, "Paj�k");
if ( num == OBJECT_BEE ) strcpy(text, "Osa");
if ( num == OBJECT_WORM ) strcpy(text, "Robal");
if ( num == OBJECT_EGG ) strcpy(text, "Jajo");
@@ -3326,215 +3340,215 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == OBJECT_APOLLO1 ||
num == OBJECT_APOLLO3 ||
num == OBJECT_APOLLO4 ||
- num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta³oœci z misji Apollo");
- if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksiê¿ycowy");
+ num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta�o�ci z misji Apollo");
+ if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksi�ycowy");
}
if ( type == RES_ERR )
{
- strcpy(text, "B³¹d");
+ strcpy(text, "B��d");
if ( num == ERR_CMD ) strcpy(text, "Nieznane polecenie");
#if _NEWLOOK
if ( num == ERR_INSTALL ) strcpy(text, "Gra CeeBot nie jest zainstalowana.");
- if ( num == ERR_NOCD ) strcpy(text, "W³ó¿ dysk CD z gr¹ CeeBot\ni uruchom grê jeszcze raz.");
+ if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� CeeBot\ni uruchom gr� jeszcze raz.");
#else
if ( num == ERR_INSTALL ) strcpy(text, "Gra COLOBOT nie jest zainstalowana.");
- if ( num == ERR_NOCD ) strcpy(text, "W³ó¿ dysk CD z gr¹ COLOBOT\ni uruchom grê jeszcze raz.");
+ if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� COLOBOT\ni uruchom gr� jeszcze raz.");
#endif
if ( num == ERR_MANIP_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo¿na nieœæ wiêcej przedmiotów");
+ if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo�na nie�� wi�cej przedmiot�w");
if ( num == ERR_MANIP_NIL ) strcpy(text, "Nie ma nic do podniesienia");
- if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zajête");
+ if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zaj�te");
if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Brak innego robota");
- if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo¿esz przenosiæ przedmiotów radioaktywnych");
- if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo¿esz przenosiæ przedmiotów pod wod¹");
+ if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w radioaktywnych");
+ if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w pod wod�");
if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nie ma nic do upuszczenia");
- if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo¿liwe pod wod¹");
- if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo�liwe pod wod�");
+ if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Tytan za daleko");
if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Tytan za blisko");
- if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli¿u");
- if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj¹co p³aska");
- if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma³o p³askiego terenu");
- if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zajête");
+ if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli�u");
+ if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj�co p�aska");
+ if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma�o p�askiego terenu");
+ if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zaj�te");
if ( num == ERR_BUILD_BASE ) strcpy(text, "Za blisko statku kosmicznego");
if ( num == ERR_BUILD_NARROW ) strcpy(text, "Za blisko budynku");
- if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
+ if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
if ( num == ERR_SEARCH_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
+ if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Nieodpowiedni teren");
if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Budynek za blisko");
if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Obiekt za blisko");
if ( num == ERR_RECOVER_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nie ma niczego do odzysku");
if ( num == ERR_SHIELD_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
- if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B³¹d w poleceniu ruchu");
+ if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
+ if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B��d w poleceniu ruchu");
if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Obiekt nieznany");
- if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedostêpne");
- if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedostêpne");
- if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zajête");
+ if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedost�pne");
+ if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedost�pne");
+ if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zaj�te");
if ( num == ERR_FIRE_VEH ) strcpy(text, "Nieodpowiedni robot");
- if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma³o energii");
- if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
+ if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma�o energii");
+ if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Brak rudy tytanu do przetopienia");
- if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma ¿adnej rudy");
+ if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma �adnej rudy");
if ( num == ERR_STATION_NULL ) strcpy(text, "Brak energii w ziemi");
if ( num == ERR_TOWER_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
+ if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma³o energii");
+ if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma�o energii");
if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Nieodpowiedni rodzaj ogniw");
- if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta³ ju¿ wykonany");
+ if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta� ju� wykonany");
if ( num == ERR_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi");
- if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci¹¿ za ma³o energii");
+ if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci�� za ma�o energii");
if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Brak tytanu do przetworzenia");
if ( num == ERR_ENERGY_BAD ) strcpy(text, "Przetwarza jedynie tytan");
if ( num == ERR_BASE_DLOCK ) strcpy(text, "Drzwi zablokowane przez robota lub inny obiekt ");
- if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz byæ na statku kosmicznym aby nim odlecieæ");
+ if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by� na statku kosmicznym aby nim odlecie�");
if ( num == ERR_LABO_NULL ) strcpy(text, "Nie ma niczego do zanalizowania");
- if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materiê organiczn¹");
- if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta³a ju¿ wykonana");
+ if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi� organiczn�");
+ if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta�a ju� wykonana");
if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi");
- if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci¹¿ za ma³o energii");
+ if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci�� za ma�o energii");
if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Brak uranu do przetworzenia");
if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Przetwarza jedynie uran");
if ( num == ERR_FACTORY_NULL ) strcpy(text, "Brak tytanu");
if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Obiekt za blisko");
- if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zajête");
- if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma ¿adnej stacji przekaŸnikowej w zasiêgu");
+ if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zaj�te");
+ if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma �adnej stacji przeka�nikowej w zasi�gu");
if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program zawirusowany");
if ( num == ERR_BAT_VIRUS ) strcpy(text, "Zainfekowane wirusem, chwilowo niesprawne");
if ( num == ERR_VEH_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
- if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wiêcej energii");
- if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo¿liwe podczas lotu");
- if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo¿liwe podczas p³ywania");
- if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo¿liwe podczas ruchu");
- if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo¿liwe podczas przenoszenia przedmiotu");
- if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du¿o flag w tym kolorze (maksymalnie 5)");
- if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej¹cej flagi");
- if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli¿u");
- if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype³niona (naciœnij \\key help; aby uzyskaæ szczegó³y)");
+ if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wi�cej energii");
+ if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo�liwe podczas lotu");
+ if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo�liwe podczas p�ywania");
+ if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu");
+ if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo�liwe podczas przenoszenia przedmiotu");
+ if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du�o flag w tym kolorze (maksymalnie 5)");
+ if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej�cej flagi");
+ if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli�u");
+ if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype�niona (naci�nij \\key help; aby uzyska� szczeg�y)");
if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot zniszczony");
if ( num == ERR_DELETEBUILDING ) strcpy(text, "Budynek zniszczony");
- if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo¿na tego utworzyæ, za du¿o obiektów");
+ if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo�na tego utworzy�, za du�o obiekt�w");
if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "It misses \"%s\" in this exercise");
if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise");
- if ( num == INFO_BUILD ) strcpy(text, "Budowa zakoñczona");
- if ( num == INFO_CONVERT ) strcpy(text, "Tytan dostêpny");
- if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zakoñczony");
- if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dostêpne plany tranporterów na g¹sienicach");
- if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo¿esz lataæ u¿ywaj¹c klawiszy (\\key gup;) oraz (\\key gdown;)");
- if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dostêpne plany robota uderzacza");
- if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dostêpne plany dzia³a");
- if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dostêpne plany wie¿y obronnej");
- if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dostêpne plany dzia³a fazowego");
- if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dostêpne plany robota os³aniacza");
- if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dostêpne plany elektrowni atomowej");
- if ( num == INFO_FACTORY ) strcpy(text, "Dostêpny nowy robot");
+ if ( num == INFO_BUILD ) strcpy(text, "Budowa zako�czona");
+ if ( num == INFO_CONVERT ) strcpy(text, "Tytan dost�pny");
+ if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zako�czony");
+ if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dost�pne plany tranporter�w na g�sienicach");
+ if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo�esz lata� u�ywaj�c klawiszy (\\key gup;) oraz (\\key gdown;)");
+ if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dost�pne plany robota uderzacza");
+ if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dost�pne plany dzia�a");
+ if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dost�pne plany wie�y obronnej");
+ if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dost�pne plany dzia�a fazowego");
+ if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dost�pne plany robota os�aniacza");
+ if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dost�pne plany elektrowni atomowej");
+ if ( num == INFO_FACTORY ) strcpy(text, "Dost�pny nowy robot");
if ( num == INFO_LABO ) strcpy(text, "Analiza wykonana");
if ( num == INFO_ENERGY ) strcpy(text, "Wytworzono ogniwo elektryczne");
if ( num == INFO_NUCLEAR ) strcpy(text, "Wytworzono atomowe ogniwo elektryczne");
- if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u¿yteczny przedmiot");
- if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowniê");
- if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalniê");
- if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype³niona >>>");
- if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod³a siê >>>");
- if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod³a siê >>>");
- if ( num == INFO_WRITEOK ) strcpy(text, "Bie¿¹ca misja zapisana");
+ if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u�yteczny przedmiot");
+ if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni�");
+ if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni�");
+ if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype�niona >>>");
+ if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>");
+ if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>");
+ if ( num == INFO_WRITEOK ) strcpy(text, "Bie��ca misja zapisana");
if ( num == INFO_DELETEPATH ) strcpy(text, "Przekroczono punkt kontrolny");
- if ( num == INFO_DELETEMOTHER ) strcpy(text, "Królowa Obcych zosta³a zabita");
- if ( num == INFO_DELETEANT ) strcpy(text, "Mrówka œmiertelnie raniona");
- if ( num == INFO_DELETEBEE ) strcpy(text, "Osa œmiertelnie raniona");
- if ( num == INFO_DELETEWORM ) strcpy(text, "Robal œmiertelnie raniony");
- if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj¹k œmiertelnie raniony");
- if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naciœnij klawisz \\key help; aby wyœwietliæ rozkazy na przekaŸniku SatCom");
+ if ( num == INFO_DELETEMOTHER ) strcpy(text, "Kr�lowa Obcych zosta�a zabita");
+ if ( num == INFO_DELETEANT ) strcpy(text, "Mr�wka �miertelnie raniona");
+ if ( num == INFO_DELETEBEE ) strcpy(text, "Osa �miertelnie raniona");
+ if ( num == INFO_DELETEWORM ) strcpy(text, "Robal �miertelnie raniony");
+ if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj�k �miertelnie raniony");
+ if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naci�nij klawisz \\key help; aby wy�wietli� rozkazy na przeka�niku SatCom");
}
if ( type == RES_CBOT )
{
- strcpy(text, "B³¹d");
- if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj¹cego");
- if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj¹cego");
- if ( num == TX_NOTBOOL ) strcpy(text, "Wyra¿enie musi zwróciæ wartoœæ logiczn¹");
- if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta³a zadeklarowana");
- if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo¿liwe");
- if ( num == TX_ENDOF ) strcpy(text, "Brak œrednika na koñcu wiersza");
- if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewn¹trz bloku ""switch""");
- if ( num == TX_NOTERM ) strcpy(text, "Polecenie po koñcowej klamrze zamykaj¹cej");
- if ( num == TX_CLOSEBLK ) strcpy(text, "Brak koñca bloku");
- if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wyst¹pienia ""if"" ");
- if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj¹cej");//début d'un bloc attendu?
- if ( num == TX_BADTYPE ) strcpy(text, "Z³y typ dla przypisania");
- if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo¿e byæ zadeklarowana dwukrotnie");
- if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operatorów");
+ strcpy(text, "B��d");
+ if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj�cego");
+ if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj�cego");
+ if ( num == TX_NOTBOOL ) strcpy(text, "Wyra�enie musi zwr�ci� warto�� logiczn�");
+ if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta�a zadeklarowana");
+ if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo�liwe");
+ if ( num == TX_ENDOF ) strcpy(text, "Brak �rednika na ko�cu wiersza");
+ if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewn�trz bloku ""switch""");
+ if ( num == TX_NOTERM ) strcpy(text, "Polecenie po ko�cowej klamrze zamykaj�cej");
+ if ( num == TX_CLOSEBLK ) strcpy(text, "Brak ko�ca bloku");
+ if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wyst�pienia ""if"" ");
+ if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj�cej");//d�but d'un bloc attendu?
+ if ( num == TX_BADTYPE ) strcpy(text, "Z�y typ dla przypisania");
+ if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo�e by� zadeklarowana dwukrotnie");
+ if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operator�w");
if ( num == TX_UNDEFCALL ) strcpy(text, "Funkcja nieznana");
if ( num == TX_MISDOTS ) strcpy(text, "Brak znaku "" : ");
- if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego s³owa ""while");
- if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewn¹trz pêtli");
- if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst¹piæ ""for"", ""while"", ""do"" lub ""switch""");
- if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette étiquette n'existe pas
+ if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego s�owa ""while");
+ if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewn�trz p�tli");
+ if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst�pi� ""for"", ""while"", ""do"" lub ""switch""");
+ if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette �tiquette n'existe pas
if ( num == TX_NOCASE ) strcpy(text, "Brak polecenia ""case");
if ( num == TX_BADNUM ) strcpy(text, "Brak liczby");
if ( num == TX_VOID ) strcpy(text, "Pusty parametr");
if ( num == TX_NOTYP ) strcpy(text, "Brak deklaracji typu");
if ( num == TX_NOVAR ) strcpy(text, "Brak nazwy zmiennej");
- if ( num == TX_NOFONC ) strcpy(text, "Brakuj¹ca nazwa funkcji");
- if ( num == TX_OVERPARAM ) strcpy(text, "Za du¿o parametrów");
- if ( num == TX_REDEF ) strcpy(text, "Funkcja ju¿ istnieje");
+ if ( num == TX_NOFONC ) strcpy(text, "Brakuj�ca nazwa funkcji");
+ if ( num == TX_OVERPARAM ) strcpy(text, "Za du�o parametr�w");
+ if ( num == TX_REDEF ) strcpy(text, "Funkcja ju� istnieje");
if ( num == TX_LOWPARAM ) strcpy(text, "Brak wymaganego parametru");
- if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametrów tego typu");
- if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametrów");
+ if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametr�w tego typu");
+ if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametr�w");
if ( num == TX_NOITEM ) strcpy(text, "To nie jest obiekt tej klasy");
- if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz³onkiem klasy");
+ if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz�onkiem klasy");
if ( num == TX_NOCONST ) strcpy(text, "Brak odpowiedniego konstruktora");
- if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju¿ istnieje");
+ if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju� istnieje");
if ( num == TX_CLBRK ) strcpy(text, "Brak "" ] """);
- if ( num == TX_RESERVED ) strcpy(text, "S³owo zarezerwowane jêzyka CBOT");
- if ( num == TX_BADNEW ) strcpy(text, "Z³y argument dla funkcji ""new""");
+ if ( num == TX_RESERVED ) strcpy(text, "S�owo zarezerwowane j�zyka CBOT");
+ if ( num == TX_BADNEW ) strcpy(text, "Z�y argument dla funkcji ""new""");
if ( num == TX_OPBRK ) strcpy(text, "Oczekiwane "" [ """);
- if ( num == TX_BADSTRING ) strcpy(text, "Brak ³añcucha");
- if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid³owy typ indeksu");
+ if ( num == TX_BADSTRING ) strcpy(text, "Brak �a�cucha");
+ if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid�owy typ indeksu");
if ( num == TX_PRIVATE ) strcpy(text, "Element prywatny");
if ( num == TX_NOPUBLIC ) strcpy(text, "Wymagany publiczny");
if ( num == TX_DIVZERO ) strcpy(text, "Dzielenie przez zero");
- if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta³a zainicjalizowana");
- if ( num == TX_BADTHROW ) strcpy(text, "Wartoœæ ujemna odrzucona przez ""throw""");//C'est quoi, ça?
- if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwróci³a ¿adnej wartoœci ");
- if ( num == TX_NORUN ) strcpy(text, "¯adna funkcja nie dzia³a");
- if ( num == TX_NOCALL ) strcpy(text, "Odwo³anie do nieznanej funkcji");
+ if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta�a zainicjalizowana");
+ if ( num == TX_BADTHROW ) strcpy(text, "Warto�� ujemna odrzucona przez ""throw""");//C'est quoi, �a?
+ if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwr�ci�a �adnej warto�ci ");
+ if ( num == TX_NORUN ) strcpy(text, "�adna funkcja nie dzia�a");
+ if ( num == TX_NOCALL ) strcpy(text, "Odwo�anie do nieznanej funkcji");
if ( num == TX_NOCLASS ) strcpy(text, "Taka klasa nie istnieje");
if ( num == TX_NULLPT ) strcpy(text, "Obiekt nieznany");
- if ( num == TX_OPNAN ) strcpy(text, "Dzia³anie niemo¿liwe z wartoœci¹ ""nan""");
- if ( num == TX_OUTARRAY ) strcpy(text, "Dostêp poza tablicê");
- if ( num == TX_STACKOVER ) strcpy(text, "Przepe³nienie stosu");
- if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid³owy obiekt");
- if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo¿na otworzyæ pliku");
+ if ( num == TX_OPNAN ) strcpy(text, "Dzia�anie niemo�liwe z warto�ci� ""nan""");
+ if ( num == TX_OUTARRAY ) strcpy(text, "Dost�p poza tablic�");
+ if ( num == TX_STACKOVER ) strcpy(text, "Przepe�nienie stosu");
+ if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid�owy obiekt");
+ if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo�na otworzy� pliku");
if ( num == TX_NOTOPEN ) strcpy(text, "Plik nie jest otwarty");
- if ( num == TX_ERRREAD ) strcpy(text, "B³¹d odczytu");
- if ( num == TX_ERRWRITE ) strcpy(text, "B³¹d zapisu");
+ if ( num == TX_ERRREAD ) strcpy(text, "B��d odczytu");
+ if ( num == TX_ERRWRITE ) strcpy(text, "B��d zapisu");
}
if ( type == RES_KEY )
{
if ( num == 0 ) strcpy(text, "< brak >");
- if ( num == VK_LEFT ) strcpy(text, "Strza³ka w lewo");
- if ( num == VK_RIGHT ) strcpy(text, "Strza³ka w prawo");
- if ( num == VK_UP ) strcpy(text, "Strza³ka w górê");
- if ( num == VK_DOWN ) strcpy(text, "Strza³ka w dó³");
+ if ( num == VK_LEFT ) strcpy(text, "Strza�ka w lewo");
+ if ( num == VK_RIGHT ) strcpy(text, "Strza�ka w prawo");
+ if ( num == VK_UP ) strcpy(text, "Strza�ka w g�r�");
+ if ( num == VK_DOWN ) strcpy(text, "Strza�ka w d�");
if ( num == VK_CANCEL ) strcpy(text, "Ctrl-break");
if ( num == VK_BACK ) strcpy(text, "<--");
if ( num == VK_TAB ) strcpy(text, "Tab");
@@ -3603,9 +3617,9 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == VK_EXSEL ) strcpy(text, "ExSel");
if ( num == VK_EREOF ) strcpy(text, "Erase EOF");
if ( num == VK_PLAY ) strcpy(text, "Graj");
- if ( num == VK_ZOOM ) strcpy(text, "Powiêkszenie");
+ if ( num == VK_ZOOM ) strcpy(text, "Powi�kszenie");
if ( num == VK_PA1 ) strcpy(text, "PA1");
- if ( num == VK_OEM_CLEAR ) strcpy(text, "WyczyϾ");
+ if ( num == VK_OEM_CLEAR ) strcpy(text, "Wyczy��");
if ( num == VK_BUTTON1 ) strcpy(text, "Przycisk 1");
if ( num == VK_BUTTON2 ) strcpy(text, "Przycisk 2");
if ( num == VK_BUTTON3 ) strcpy(text, "Przycisk 3");
@@ -3638,8 +3652,8 @@ BOOL GetResourceBase(ResType type, int num, char* text)
if ( num == VK_BUTTON30 ) strcpy(text, "Przycisk 30");
if ( num == VK_BUTTON31 ) strcpy(text, "Przycisk 31");
if ( num == VK_BUTTON32 ) strcpy(text, "Przycisk 32");
- if ( num == VK_WHEELUP ) strcpy(text, "Kó³ko w górê");
- if ( num == VK_WHEELDOWN ) strcpy(text, "Kó³ko w dó³");
+ if ( num == VK_WHEELUP ) strcpy(text, "K�ko w g�r�");
+ if ( num == VK_WHEELDOWN ) strcpy(text, "K�ko w d�");
}
#endif
diff --git a/src/restext.h b/src/restext.h
index 619e74a..9cac41a 100644
--- a/src/restext.h
+++ b/src/restext.h
@@ -1,4 +1,18 @@
-// restext.h
+// * 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 .
#ifndef _RESTEXT_H_
#define _RESTEXT_H_
diff --git a/src/robotmain.cpp b/src/robotmain.cpp
index 1f6a7a9..fabc149 100644
--- a/src/robotmain.cpp
+++ b/src/robotmain.cpp
@@ -1,4 +1,18 @@
-// robotmain.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
@@ -72,8 +86,8 @@
// Variables globales.
long g_id; // identificateur unique
-long g_build; // bâtiments constructibles
-long g_researchDone; // recherches effectuées
+long g_build; // b�timents constructibles
+long g_researchDone; // recherches effectu�es
long g_researchEnable; // recherches accessibles
float g_unit; // facteur de conversion
@@ -89,19 +103,19 @@ 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 si aucun param�tre
- // Premier paramètre (x) :
+ // Premier param�tre (x) :
if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
var = var->GivNext();
- // Deuxième paramètre (y) :
+ // Deuxi�me param�tre (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 ?
+ // Troisi�me param�tre (z) :
+ if ( var == NULL ) // seulement 2 param�tres ?
{
return CBotTypResult(0); // cette fonction retourne void
}
@@ -113,13 +127,13 @@ CBotTypResult cPoint(CBotVar* pThis, CBotVar* &var)
return CBotTypResult(0); // cette fonction retourne void
}
-// Exécution de la classe "point".
+// Ex�cution de la classe "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; // constructeur sans param�tres est ok
if ( var->GivType() > CBotTypDouble )
{
@@ -154,7 +168,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 avec seulement 2 param�tres
}
pZ = pThis->GivItem("z");
@@ -293,7 +307,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
g_id = 0;
g_build = 0;
- g_researchDone = 0; // aucune recherche effectuée
+ g_researchDone = 0; // aucune recherche effectu�e
g_researchEnable = 0;
g_unit = 4.0f;
@@ -365,7 +379,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
// Ajoute la classe Point.
CBotClass* bc;
- bc = new CBotClass("point", NULL, TRUE); // classe intrinsèque
+ bc = new CBotClass("point", NULL, TRUE); // classe intrins�que
bc->AddItem("x", CBotTypFloat);
bc->AddItem("y", CBotTypFloat);
bc->AddItem("z", CBotTypFloat);
@@ -406,7 +420,7 @@ CRobotMain::~CRobotMain()
}
-// Crée le fichier colobot.ini la première fois.
+// Cr�e le fichier colobot.ini la premi�re fois.
void CRobotMain::CreateIni()
{
@@ -442,7 +456,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 ) // a-t-on jou� au moins 10 secondes ?
#endif
{
rank = m_dialog->RetSceneRank();
@@ -452,15 +466,15 @@ void CRobotMain::ChangePhase(Phase phase)
}
}
- if ( phase == PHASE_WIN ) // gagné une simulation ?
+ if ( phase == PHASE_WIN ) // gagn� une simulation ?
{
rank = m_dialog->RetSceneRank();
m_dialog->SetGamerInfoPassed(rank, TRUE);
- m_dialog->NextMission(); // passe à la mission suivante
+ m_dialog->NextMission(); // passe � la mission suivante
m_dialog->WriteGamerInfo();
}
- DeleteAllObjects(); // supprime toute la scène 3D actuelle
+ DeleteAllObjects(); // supprime toute la sc�ne 3D actuelle
m_phase = phase;
m_winDelay = 0.0f;
@@ -510,7 +524,7 @@ void CRobotMain::ChangePhase(Phase phase)
m_cameraZoom = 0.0f;
m_bShortCut = TRUE;
- // Crée et cache la console de commande.
+ // Cr�e et cache la console de commande.
dim.x = 200.0f/640.0f;
dim.y = 18.0f/480.0f;
pos.x = 50.0f/640.0f;
@@ -518,9 +532,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; // cach� pour l'instant
- // Crée l'indicateur de vitesse.
+ // Cr�e l'indicateur de vitesse.
#if _TEEN
dim.x = 30.0f/640.0f;
dim.y = 20.0f/480.0f;
@@ -640,7 +654,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); // sc�ne interractive
if ( m_bMapImage )
{
m_map->SetFixImage(m_mapFilename);
@@ -678,7 +692,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); // sc�ne fixe
pos.x = ox+sx*1; pos.y = oy+sy*1;
ddim.x = dim.x*2; ddim.y = dim.y*2;
@@ -725,7 +739,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); // sc�ne fixe
pos.x = ox+sx*1; pos.y = oy+sy*1;
ddim.x = dim.x*2; ddim.y = dim.y*2;
@@ -757,7 +771,7 @@ void CRobotMain::ChangePhase(Phase phase)
}
-// Traite un événement.
+// Traite un �v�nement.
BOOL CRobotMain::EventProcess(const Event &event)
{
@@ -789,7 +803,7 @@ 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 ) // �dition en cours ?
{
m_displayInfo->EventProcess(event);
}
@@ -902,7 +916,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 ) // �dition en cours ?
{
if ( event.param == m_engine->RetKey(KEYRANK_HELP, 0) ||
event.param == m_engine->RetKey(KEYRANK_HELP, 1) )
@@ -1119,7 +1133,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
break;
case EVENT_OBJECT_DELETE:
- m_dialog->StartDeleteObject(); // voulez-vous détruire ?
+ m_dialog->StartDeleteObject(); // voulez-vous d�truire ?
break;
case EVENT_OBJECT_BHELP:
@@ -1255,7 +1269,7 @@ BOOL CRobotMain::EventProcess(const Event &event)
-// Exécute une commande.
+// Ex�cute une commande.
void CRobotMain::ExecuteCmd(char *cmd)
{
@@ -1298,7 +1312,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
{
Event newEvent;
- g_researchDone = -1; // toutes les recherches sont effectuées
+ g_researchDone = -1; // toutes les recherches sont effectu�es
m_event->MakeEvent(newEvent, EVENT_UPDINTERFACE);
m_event->AddEvent(newEvent);
@@ -1334,7 +1348,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
{
m_camera->SetType(CAMERA_FREE);
ChangePause(TRUE);
- DeselectAll(); // enlève les boutons de commande
+ DeselectAll(); // enl�ve les boutons de commande
m_map->ShowMap(FALSE);
m_displayText->HideText(TRUE);
}
@@ -1588,7 +1602,7 @@ void CRobotMain::FlushDisplayInfo()
m_infoIndex = 0;
}
-// Début de l'affichage d'instructions.
+// D�but de l'affichage d'instructions.
// index: SATCOM_*
void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
@@ -1611,7 +1625,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(); // enl�ve les boutons de commande
m_displayText->HideText(TRUE);
return;
}
@@ -1629,7 +1643,7 @@ void CRobotMain::StartDisplayInfo(int index, BOOL bMovie)
StartDisplayInfo(m_infoFilename[index], index);
}
-// Début de l'affichage d'instructions.
+// D�but de l'affichage d'instructions.
void CRobotMain::StartDisplayInfo(char *filename, int index)
{
@@ -1639,12 +1653,12 @@ void CRobotMain::StartDisplayInfo(char *filename, int index)
if ( m_bCmdEdit ) return;
m_movieInfoIndex = -1;
- ClearInterface(); // enlève mise en évidence et tooltip
+ ClearInterface(); // enl�ve mise en �vidence et tooltip
if ( !m_bEditLock )
{
//? m_map->ShowMap(FALSE);
- m_infoObject = DeselectAll(); // enlève les boutons de commande
+ m_infoObject = DeselectAll(); // enl�ve les boutons de commande
m_displayText->HideText(TRUE);
m_sound->MuteAll(TRUE);
}
@@ -1704,26 +1718,26 @@ void CRobotMain::StopDisplayInfo()
if ( m_infoUsed == 0 )
{
- m_displayText->ClearText(); // enlève message "voir SatCom ..."
+ m_displayText->ClearText(); // enl�ve message "voir SatCom ..."
}
m_infoUsed ++;
}
-// Retourne le nom du texte à afficher.
+// Retourne le nom du texte � afficher.
char* CRobotMain::RetDisplayInfoName(int index)
{
return m_infoFilename[index];
}
-// Retourne le nom du texte à afficher.
+// Retourne le nom du texte � afficher.
int CRobotMain::RetDisplayInfoPosition(int index)
{
return m_infoPos[index];
}
-// Retourne le nom du texte à afficher.
+// Retourne le nom du texte � afficher.
void CRobotMain::SetDisplayInfoPosition(int index, int pos)
{
@@ -1731,14 +1745,14 @@ void CRobotMain::SetDisplayInfoPosition(int index, int pos)
}
-// Début d'un dialogue pendant le jeu,
+// D�but d'un dialogue pendant le jeu,
void CRobotMain::StartSuspend()
{
CButton* pb;
m_map->ShowMap(FALSE);
- m_infoObject = DeselectAll(); // enlève les boutons de commande
+ m_infoObject = DeselectAll(); // enl�ve les boutons de commande
m_displayText->HideText(TRUE);
pb = (CButton*)m_interface->SearchControl(EVENT_BUTTON_QUIT);
@@ -1779,7 +1793,7 @@ float CRobotMain::RetGameTime()
-// Gestion de la taille des caractères par défaut.
+// Gestion de la taille des caract�res par d�faut.
void CRobotMain::SetFontSize(float size)
{
@@ -1792,7 +1806,7 @@ float CRobotMain::RetFontSize()
return m_fontSize;
}
-// Gestion de la taille de la fenêtre par défaut.
+// Gestion de la taille de la fen�tre par d�faut.
void CRobotMain::SetWindowPos(FPOINT pos)
{
@@ -1819,7 +1833,7 @@ FPOINT CRobotMain::RetWindowDim()
}
-// Gestion des fenêtres ouvrir/enregistrer.
+// Gestion des fen�tres ouvrir/enregistrer.
void CRobotMain::SetIOPublic(BOOL bMode)
{
@@ -1858,7 +1872,7 @@ FPOINT CRobotMain::RetIODim()
-// Début de la visite du lieu d'une erreur.
+// D�but de la visite du lieu d'une erreur.
void CRobotMain::StartDisplayVisit(EventMsg event)
{
@@ -1876,7 +1890,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
if ( event == EVENT_NULL ) // visite par raccourci clavier ?
{
- if ( m_visitLast != EVENT_NULL ) // déjà une visite en cours ?
+ if ( m_visitLast != EVENT_NULL ) // d�j� une visite en cours ?
{
i = m_visitLast-EVENT_DT_VISIT0;
}
@@ -1885,7 +1899,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
i = MAXDTLINE;
}
- // Cherche la précédente.
+ // Cherche la pr�c�dente.
for ( j=0 ; j<MAXDTLINE ; j++ )
{
i --;
@@ -1904,25 +1918,25 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
}
if ( event == EVENT_NULL )
{
- m_sound->Play(SOUND_TZOING); // rien à voir !
+ m_sound->Play(SOUND_TZOING); // rien � voir !
return;
}
m_visitLast = event;
- ClearInterface(); // enlève mise en évidence et tooltip
+ ClearInterface(); // enl�ve mise en �vidence et tooltip
- if ( m_camera->RetType() == CAMERA_VISIT ) // déjà une visite en cours ?
+ if ( m_camera->RetType() == CAMERA_VISIT ) // d�j� une visite en cours ?
{
m_camera->StopVisit();
m_displayText->ClearVisit();
}
else
{
- m_visitObject = DeselectAll(); // enlève les boutons de commande
+ m_visitObject = DeselectAll(); // enl�ve les boutons de commande
}
- // Crée le bouton "continuer".
+ // Cr�e le bouton "continuer".
if ( m_interface->SearchControl(EVENT_DT_END) == 0 )
{
pos.x = 10.0f/640.0f;
@@ -1932,7 +1946,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
m_interface->CreateButton(pos, dim, 16, EVENT_DT_END);
}
- // Crée la flèche pour montrer l'endroit.
+ // Cr�e la fl�che pour montrer l'endroit.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -1958,7 +1972,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event)
ChangePause(TRUE);
}
-// Bouge la flèche de visite.
+// Bouge la fl�che de visite.
void CRobotMain::FrameVisit(float rTime)
{
@@ -1968,7 +1982,7 @@ void CRobotMain::FrameVisit(float rTime)
if ( m_visitArrow == 0 ) return;
- // Bouge la flèche.
+ // Bouge la fl�che.
m_visitTime += rTime;
pos = m_visitPosArrow;
@@ -1976,7 +1990,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".
+ // G�re les particules "fl�ches".
m_visitParticule -= rTime;
if ( m_visitParticule <= 0.0f )
{
@@ -2001,7 +2015,7 @@ void CRobotMain::StopDisplayVisit()
// Supprime le bouton.
m_interface->DeleteControl(EVENT_DT_END);
- // Supprime la flèche.
+ // Supprime la fl�che.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -2009,7 +2023,7 @@ void CRobotMain::StopDisplayVisit()
m_visitArrow = 0;
}
- // Supprime les particules "flèches".
+ // Supprime les particules "fl�ches".
m_particule->DeleteParticule(PARTISHOW);
m_camera->StopVisit();
@@ -2024,14 +2038,14 @@ void CRobotMain::StopDisplayVisit()
-// Met à jour tous les raccourcis.
+// Met � jour tous les raccourcis.
void CRobotMain::UpdateShortcuts()
{
m_short->UpdateShortcuts();
}
-// Retourne l'objet par défaut à sélectionner après la création d'une scène.
+// Retourne l'objet par d�faut � s�lectionner apr�s la cr�ation d'une sc�ne.
CObject* CRobotMain::RetSelectObject()
{
@@ -2039,7 +2053,7 @@ CObject* CRobotMain::RetSelectObject()
return SearchHuman();
}
-// Désélectionne tout, et retourne l'objet qui était sélectionné.
+// D�s�lectionne tout, et retourne l'objet qui �tait s�lectionn�.
CObject* CRobotMain::DeselectAll()
{
@@ -2059,7 +2073,7 @@ CObject* CRobotMain::DeselectAll()
return pPrev;
}
-// Sélectionne un objet, sans s'occuper de désélectionner le reste.
+// S�lectionne un objet, sans s'occuper de d�s�lectionner le reste.
void CRobotMain::SelectOneObject(CObject* pObj, BOOL bDisplayError)
{
@@ -2119,7 +2133,7 @@ void CRobotMain::SelectOneObject(CObject* pObj, BOOL bDisplayError)
}
}
-// Sélectionne l'objet visé par la souris.
+// S�lectionne l'objet vis� par la souris.
BOOL CRobotMain::SelectObject(CObject* pObj, BOOL bDisplayError)
{
@@ -2146,7 +2160,7 @@ BOOL CRobotMain::SelectObject(CObject* pObj, BOOL bDisplayError)
return TRUE;
}
-// Désélectionne l'objet sélectionné.
+// D�s�lectionne l'objet s�lectionn�.
BOOL CRobotMain::DeselectObject()
{
@@ -2199,7 +2213,7 @@ void CRobotMain::DeleteAllObjects()
delete pyro;
}
- // Supprime la flèche.
+ // Supprime la fl�che.
if ( m_visitArrow != 0 )
{
m_visitArrow->DeleteObject();
@@ -2217,12 +2231,12 @@ void CRobotMain::DeleteAllObjects()
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, 0);
if ( pObj == 0 ) break;
- pObj->DeleteObject(TRUE); // détruit rapidement
+ pObj->DeleteObject(TRUE); // d�truit rapidement
delete pObj;
}
}
-// Sélectionne l'homme.
+// S�lectionne l'homme.
void CRobotMain::SelectHuman()
{
@@ -2273,7 +2287,7 @@ CObject* CRobotMain::SearchToto()
return 0;
}
-// Retourne l'objet sélectionnable le plus proche d'une position donnée.
+// Retourne l'objet s�lectionnable le plus proche d'une position donn�e.
CObject* CRobotMain::SearchNearest(D3DVECTOR pos, CObject* pExclu)
{
@@ -2307,7 +2321,7 @@ CObject* CRobotMain::SearchNearest(D3DVECTOR pos, CObject* pExclu)
return pBest;
}
-// Retourne l'objet sélectionné.
+// Retourne l'objet s�lectionn�.
CObject* CRobotMain::RetSelect()
{
@@ -2345,7 +2359,7 @@ CObject* CRobotMain::SearchObject(ObjectType type)
return 0;
}
-// Détecte l'objet visé par la souris.
+// D�tecte l'objet vis� par la souris.
CObject* CRobotMain::DetectObject(FPOINT pos)
{
@@ -2476,7 +2490,7 @@ CObject* CRobotMain::DetectObject(FPOINT pos)
}
else if ( (type == OBJECT_POWER ||
type == OBJECT_ATOMIC ) &&
- pObj->RetTruck() != 0 ) // pile utilisée ?
+ pObj->RetTruck() != 0 ) // pile utilis�e ?
{
pTarget = pObj->RetTruck();
}
@@ -2497,7 +2511,7 @@ CObject* CRobotMain::DetectObject(FPOINT pos)
return 0;
}
-// Indique si un objet est sélectionnable.
+// Indique si un objet est s�lectionnable.
BOOL CRobotMain::IsSelectable(CObject* pObj)
{
@@ -2573,7 +2587,7 @@ BOOL CRobotMain::IsSelectable(CObject* pObj)
}
-// Supprime l'objet sélectionné.
+// Supprime l'objet s�lectionn�.
BOOL CRobotMain::DeleteObject()
{
@@ -2586,7 +2600,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); // d�s�lectionne l'objet
m_camera->SetType(CAMERA_EXPLO);
DeselectAll();
pObj->DeleteDeselList(pObj);
@@ -2595,7 +2609,7 @@ BOOL CRobotMain::DeleteObject()
}
-// Enlève la mise en évidence de l'objet survolé par la souris.
+// Enl�ve la mise en �vidence de l'objet survol� par la souris.
void CRobotMain::HiliteClear()
{
@@ -2603,12 +2617,12 @@ void CRobotMain::HiliteClear()
int i;
ClearTooltip();
- m_tooltipName[0] = 0; // enlève vraiment le tooltip
+ m_tooltipName[0] = 0; // enl�ve vraiment le tooltip
if ( !m_bHilite ) return;
i = -1;
- m_engine->SetHiliteRank(&i); // plus rien de sélectionné
+ m_engine->SetHiliteRank(&i); // plus rien de s�lectionn�
for ( i=0 ; i<1000000 ; i++ )
{
@@ -2623,7 +2637,7 @@ void CRobotMain::HiliteClear()
m_bHilite = FALSE;
}
-// Met en évidence l'objet survolé par la souris.
+// Met en �vidence l'objet survol� par la souris.
void CRobotMain::HiliteObject(FPOINT pos)
{
@@ -2636,7 +2650,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(); // enl�ve mise en �vidence et tooltip
pObj = m_short->DetectShort(pos);
@@ -2686,7 +2700,7 @@ void CRobotMain::HiliteObject(FPOINT pos)
}
}
-// Met en évidence l'objet survolé par la souris.
+// Met en �vidence l'objet survol� par la souris.
void CRobotMain::HiliteFrame(float rTime)
{
@@ -2705,7 +2719,7 @@ void CRobotMain::HiliteFrame(float rTime)
}
}
-// Crée un tooltip.
+// Cr�e un tooltip.
void CRobotMain::CreateTooltip(FPOINT pos, char* text)
{
@@ -2751,7 +2765,7 @@ void CRobotMain::CreateTooltip(FPOINT pos, char* text)
}
}
-// Efface le tooltip précédent.
+// Efface le tooltip pr�c�dent.
void CRobotMain::ClearTooltip()
{
@@ -2776,7 +2790,7 @@ void CRobotMain::HelpObject()
}
-// Change le mode de la caméra.
+// Change le mode de la cam�ra.
void CRobotMain::ChangeCamera()
{
@@ -2831,7 +2845,7 @@ void CRobotMain::ChangeCamera()
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() ) // entra�nement ?
{
if ( type == CAMERA_ONBOARD ) type = CAMERA_FIX;
else if ( type == CAMERA_FIX ) type = CAMERA_PLANE;
@@ -2850,7 +2864,7 @@ void CRobotMain::ChangeCamera()
}
}
-// Télécommande la caméra avec les touches flèches.
+// T�l�commande la cam�ra avec les touches fl�ches.
void CRobotMain::KeyCamera(EventMsg event, long param)
{
@@ -2884,7 +2898,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; // �dition en cours ?
if ( m_bTrainerPilot ) return;
pObj = RetSelect();
@@ -2919,7 +2933,7 @@ void CRobotMain::KeyCamera(EventMsg event, long param)
}
}
-// Effectue un panoramique avec la caméra si un bouton est enfoncé.
+// Effectue un panoramique avec la cam�ra si un bouton est enfonc�.
void CRobotMain::RemoteCamera(float pan, float zoom, float rTime)
{
@@ -2967,7 +2981,7 @@ void CRobotMain::AbortMovie()
-// Met à jour le texte d'informations.
+// Met � jour le texte d'informations.
void CRobotMain::UpdateInfoText()
{
@@ -3004,7 +3018,7 @@ void CRobotMain::InitEye()
}
}
-// Fait progresser toute la scène.
+// Fait progresser toute la sc�ne.
BOOL CRobotMain::EventFrame(const Event &event)
{
@@ -3022,7 +3036,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 affich�
}
m_water->EventProcess(event);
@@ -3061,7 +3075,7 @@ BOOL CRobotMain::EventFrame(const Event &event)
pObj->EventProcess(event);
}
}
- // Fait progresser tous les objets transportés par les robots.
+ // Fait progresser tous les objets transport�s par les robots.
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
@@ -3085,8 +3099,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);
@@ -3103,14 +3117,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);
@@ -3146,8 +3160,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;
@@ -3181,7 +3195,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);
@@ -3247,7 +3261,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)
{
@@ -3275,7 +3289,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)
@@ -3300,7 +3314,7 @@ char* SkipNum(char *p)
return p;
}
-// Conversion des unités.
+// Conversion des unit�s.
void CRobotMain::Convert()
{
@@ -3497,13 +3511,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();
@@ -3517,7 +3531,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
@@ -3536,7 +3550,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)
{
@@ -3571,7 +3585,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();
@@ -4073,7 +4087,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++ )
{
@@ -4154,7 +4168,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
}
}
@@ -4421,7 +4435,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();
@@ -4436,7 +4450,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 )
{
@@ -4468,13 +4482,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,
@@ -4489,7 +4503,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 ||
@@ -4811,7 +4825,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()
{
@@ -4866,7 +4880,7 @@ void CRobotMain::CreateModel()
}
-// Crée une lumière directionnelle.
+// Cr�e une lumi�re directionnelle.
int CRobotMain::CreateLight(D3DVECTOR direction, D3DCOLORVALUE color)
{
@@ -4892,7 +4906,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)
{
@@ -4952,7 +4966,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);
@@ -5049,7 +5063,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)
{
@@ -5085,7 +5099,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)
{
@@ -5102,7 +5116,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();
@@ -5150,7 +5164,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 )
{
@@ -5177,7 +5191,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 )
{
@@ -5224,7 +5238,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)
{
@@ -5241,7 +5255,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)
{
@@ -5256,14 +5270,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;
@@ -5301,7 +5315,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) )
@@ -5329,7 +5343,7 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck)
}
}
-// Efface les limites montrées.
+// Efface les limites montr�es.
void CRobotMain::FlushShowLimit(int i)
{
@@ -5353,7 +5367,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)
@@ -5392,14 +5406,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()
{
@@ -5411,7 +5425,7 @@ void CRobotMain::StartShowLimit()
pObj->StartShowLimit();
}
-// Fait avancer les limites montrées.
+// Fait avancer les limites montr�es.
void CRobotMain::FrameShowLimit(float rTime)
{
@@ -5484,7 +5498,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 )
{
@@ -5554,7 +5568,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);
@@ -5567,7 +5581,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
}
}
}
@@ -5663,7 +5677,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)
{
@@ -5696,7 +5710,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)
{
@@ -5729,7 +5743,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)
{
@@ -5747,7 +5761,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)
{
@@ -5798,7 +5812,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)
{
@@ -5819,7 +5833,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()
@@ -5917,7 +5931,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);
@@ -5927,7 +5941,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);
}
@@ -6006,12 +6020,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");
}
@@ -6023,7 +6037,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;
@@ -6054,7 +6068,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)
{
@@ -6130,21 +6144,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)
{
@@ -6257,7 +6271,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 )
{
@@ -6292,7 +6306,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()
{
@@ -6314,7 +6328,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()
{
@@ -6340,7 +6354,7 @@ void CRobotMain::ReadFreeParam()
}
-// Remet tous les objets à leur place initiale.
+// Remet tous les objets � leur place initiale.
void CRobotMain::ResetObject()
{
@@ -6435,7 +6449,7 @@ void CRobotMain::ResetObject()
#endif
}
-// Remet tous les objets à leur place initiale.
+// Remet tous les objets � leur place initiale.
void CRobotMain::ResetCreate()
{
@@ -6452,8 +6466,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();
@@ -6480,7 +6494,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)
{
@@ -6503,7 +6517,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;
@@ -6512,7 +6526,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;
}
@@ -6539,7 +6553,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);
@@ -6567,11 +6581,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
}
}
@@ -6586,10 +6600,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;
@@ -6597,14 +6611,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)
{
@@ -6617,7 +6631,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;
}
}
@@ -6638,7 +6652,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)
{
@@ -6654,7 +6668,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)
{
@@ -6671,14 +6685,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()
{
@@ -6786,28 +6800,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()
{
@@ -6859,7 +6873,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()
{
@@ -6868,7 +6882,7 @@ BOOL CRobotMain::CreateShortcuts()
return m_short->CreateShortcuts();
}
-// Met à jour la carte.
+// Met � jour la carte.
void CRobotMain::UpdateMap()
{
@@ -6918,7 +6932,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)
{
@@ -6926,7 +6940,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);
@@ -6950,7 +6964,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)
{
@@ -6983,7 +6997,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)
{
@@ -6996,7 +7010,7 @@ float CRobotMain::RetTracePrecision()
}
-// Débute la musique d'une mission.
+// D�bute la musique d'une mission.
void CRobotMain::StartMusic()
{
@@ -7007,12 +7021,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
}
diff --git a/src/robotmain.h b/src/robotmain.h
index 799a0b7..b0ecf85 100644
--- a/src/robotmain.h
+++ b/src/robotmain.h
@@ -1,4 +1,18 @@
-// robotmain.h
+// * 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 .
#ifndef _ROBOTMAIN_H_
#define _ROBOTMAIN_H_
@@ -79,8 +93,8 @@ typedef struct
D3DVECTOR pos;
float dist;
ObjectType type;
- int min; // gagné si >
- int max; // gagné si <
+ int min; // gagn� si >
+ int max; // gagn� si <
int lost; // perdu si <=
BOOL bImmediat;
char message[100];
@@ -340,7 +354,7 @@ protected:
float m_checkEndTime;
float m_winDelay;
float m_lostDelay;
- BOOL m_bFixScene; // scène fixe, sans interraction
+ BOOL m_bFixScene; // sc�ne fixe, sans interraction
BOOL m_bBase; // OBJECT_BASE existe dans mission
FPOINT m_lastMousePos;
CObject* m_selectObject;
@@ -362,14 +376,14 @@ protected:
int m_movieInfoIndex;
BOOL m_bImmediatSatCom; // SatCom tout de suite ?
- BOOL m_bBeginSatCom; // message SatCom affiché ?
+ BOOL m_bBeginSatCom; // message SatCom affich� ?
BOOL m_bMovieLock; // film en cours ?
BOOL m_bSatComLock; // appel du SatCom possible ?
- BOOL m_bEditLock; // édition en cours ?
- BOOL m_bEditFull; // édition en plein écran ?
+ BOOL m_bEditLock; // �dition en cours ?
+ BOOL m_bEditFull; // �dition en plein �cran ?
BOOL m_bPause; // simulation en pause
BOOL m_bHilite;
- BOOL m_bTrainerPilot; // télécommande trainer ?
+ BOOL m_bTrainerPilot; // t�l�commande trainer ?
BOOL m_bSuspend;
BOOL m_bFriendAim;
BOOL m_bResetCreate;
@@ -429,8 +443,8 @@ protected:
char m_gamerName[100];
- long m_freeBuild; // bâtiments constructibles
- long m_freeResearch; // recherches effectuées
+ long m_freeBuild; // b�timents constructibles
+ long m_freeResearch; // recherches effectu�es
ShowLimit m_showLimit[MAXSHOWLIMIT];
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)
{
diff --git a/src/script.h b/src/script.h
index 8078715..1caad88 100644
--- a/src/script.h
+++ b/src/script.h
@@ -1,4 +1,18 @@
-// script.h
+// * 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 .
#ifndef _SCRIPT_H_
#define _SCRIPT_H_
@@ -80,10 +94,10 @@ public:
int m_ipf; // nb d'instructions / seconde
int m_errMode; // que faire en cas d'erreur
int m_len; // longueur du script (sans le <0>)
- char* m_script; // script terminé par <0>
- BOOL m_bRun; // programme en cours d'exécution ?
+ char* m_script; // script termin� par <0>
+ BOOL m_bRun; // programme en cours d'ex�cution ?
BOOL m_bStepMode; // step by step
- BOOL m_bContinue; // fonction externe à continuer
+ BOOL m_bContinue; // fonction externe � continuer
BOOL m_bCompile; // compilation ok ?
char m_title[50]; // titre du script
char m_filename[50]; // nom du fichier
diff --git a/src/scroll.cpp b/src/scroll.cpp
index c5a7afc..64cbdcd 100644
--- a/src/scroll.cpp
+++ b/src/scroll.cpp
@@ -1,4 +1,18 @@
-// scroll.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
@@ -49,7 +63,7 @@ CScroll::~CScroll()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CScroll::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -80,7 +94,7 @@ void CScroll::MoveAdjust()
CButton* pc;
FPOINT pos, dim;
- if ( m_dim.y < m_dim.x*2.0f ) // ascenseur très court ?
+ if ( m_dim.y < m_dim.x*2.0f ) // ascenseur tr�s court ?
{
delete m_buttonUp;
m_buttonUp = 0;
@@ -185,7 +199,7 @@ BOOL CScroll::ClearState(int state)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CScroll::EventProcess(const Event &event)
{
diff --git a/src/scroll.h b/src/scroll.h
index f8cbc7b..9c055cf 100644
--- a/src/scroll.h
+++ b/src/scroll.h
@@ -1,4 +1,18 @@
-// scroll.h
+// * 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 .
#ifndef _SCROLL_H_
#define _SCROLL_H_
diff --git a/src/shortcut.cpp b/src/shortcut.cpp
index f17b58b..b45b2a1 100644
--- a/src/shortcut.cpp
+++ b/src/shortcut.cpp
@@ -1,4 +1,18 @@
-// shortcut.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
@@ -34,7 +48,7 @@ CShortcut::~CShortcut()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CShortcut::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -45,7 +59,7 @@ BOOL CShortcut::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CShortcut::EventProcess(const Event &event)
{
diff --git a/src/shortcut.h b/src/shortcut.h
index bce6ee0..2c5507d 100644
--- a/src/shortcut.h
+++ b/src/shortcut.h
@@ -1,4 +1,18 @@
-// shortcut.h
+// * 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 .
#ifndef _SHORTCUT_H_
#define _SHORTCUT_H_
diff --git a/src/slider.cpp b/src/slider.cpp
index 6fbda72..bacc527 100644
--- a/src/slider.cpp
+++ b/src/slider.cpp
@@ -1,4 +1,18 @@
-// slider.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
@@ -59,7 +73,7 @@ CSlider::~CSlider()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CSlider::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -90,7 +104,7 @@ void CSlider::MoveAdjust()
m_bHoriz = ( m_dim.x > m_dim.y );
if ( ( m_bHoriz && m_dim.x < m_dim.y*4.0f) ||
- (!m_bHoriz && m_dim.y < m_dim.x*4.0f) ) // slider très court ?
+ (!m_bHoriz && m_dim.y < m_dim.x*4.0f) ) // slider tr�s court ?
{
delete m_buttonLeft;
m_buttonLeft = 0;
@@ -231,7 +245,7 @@ BOOL CSlider::ClearState(int state)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CSlider::EventProcess(const Event &event)
{
diff --git a/src/slider.h b/src/slider.h
index eea3070..1ae0e67 100644
--- a/src/slider.h
+++ b/src/slider.h
@@ -1,4 +1,18 @@
-// slider.h
+// * 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 .
#ifndef _SLIDER_H_
#define _SLIDER_H_
diff --git a/src/sound.cpp b/src/sound.cpp
index ac06e14..b9dace3 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -1,4 +1,18 @@
-// sound.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
@@ -174,7 +188,7 @@ void InitMidiVolume(int volume)
// Modifie le volume CD audio.
// Le volume est compris entre 0 et 20 !
// Plantait sous Vista. Le bricolage actuel (si _SOUNDTRACKS = TRUE) ne plante
-// plus, mais ce n'est pas le bon volume qui est modifié !
+// plus, mais ce n'est pas le bon volume qui est modifi� !
BOOL InitAudioTrackVolume(int volume)
{
@@ -348,7 +362,7 @@ CSound::~CSound()
}
-// Spécifie si on est en mode debug.
+// Sp�cifie si on est en mode debug.
void CSound::SetDebugMode(BOOL bMode)
{
@@ -502,7 +516,7 @@ BOOL CSound::RetSound3DCap()
-// Retourne l'état de DirectSound.
+// Retourne l'�tat de DirectSound.
BOOL CSound::RetEnable()
{
@@ -510,21 +524,21 @@ BOOL CSound::RetEnable()
}
-// Enclenche ou déclenche le son.
+// Enclenche ou d�clenche le son.
void CSound::SetState(BOOL bState)
{
m_bState = bState;
}
-// Spécifie le chamin d'accès au CD.
+// Sp�cifie le chamin d'acc�s au CD.
void CSound::SetCDpath(char *path)
{
strcpy(m_CDpath, path);
}
-// Enclenche ou déclenche les musiques CD-audio.
+// Enclenche ou d�clenche les musiques CD-audio.
void CSound::SetAudioTrack(BOOL bAudio)
{
@@ -632,7 +646,7 @@ void CSound::CacheAll()
}
-// Retourne la priorité d'un son.
+// Retourne la priorit� d'un son.
// Plus la valeur est grande et plus le son est important.
int CSound::RetPriority(Sound sound)
@@ -693,7 +707,7 @@ BOOL CSound::SearchFreeBuffer(Sound sound, int &channel, BOOL &bAlreadyLoaded)
priority = RetPriority(sound);
#if 1
- // Cherche un canal utilisé dont le son est stoppé.
+ // Cherche un canal utilis� dont le son est stopp�.
for ( i=0 ; i<m_maxSound ; i++ )
{
if ( !m_channel[i].bUsed ) continue;
@@ -711,7 +725,7 @@ BOOL CSound::SearchFreeBuffer(Sound sound, int &channel, BOOL &bAlreadyLoaded)
}
#endif
- // Cherche un canal complètement libre.
+ // Cherche un canal compl�tement libre.
for ( i=0 ; i<m_maxSound ; i++ )
{
if ( !m_channel[i].bUsed )
@@ -724,7 +738,7 @@ BOOL CSound::SearchFreeBuffer(Sound sound, int &channel, BOOL &bAlreadyLoaded)
}
}
- // Cherche un canal utilisé dont le son est stoppé.
+ // Cherche un canal utilis� dont le son est stopp�.
for ( i=0 ; i<m_maxSound ; i++ )
{
if ( !m_channel[i].bUsed ) continue;
@@ -743,7 +757,7 @@ BOOL CSound::SearchFreeBuffer(Sound sound, int &channel, BOOL &bAlreadyLoaded)
}
}
- // Cherche un canal utilisé moins prioritaire.
+ // Cherche un canal utilis� moins prioritaire.
for ( i=0 ; i<m_maxSound ; i++ )
{
if ( !m_channel[i].bUsed ) continue;
@@ -760,7 +774,7 @@ BOOL CSound::SearchFreeBuffer(Sound sound, int &channel, BOOL &bAlreadyLoaded)
return TRUE;
}
- // Cherche un canal utilisé moins prioritaire ou identique.
+ // Cherche un canal utilis� moins prioritaire ou identique.
for ( i=0 ; i<m_maxSound ; i++ )
{
if ( !m_channel[i].bUsed ) continue;
@@ -927,13 +941,13 @@ void CSound::ComputeVolumePan2D(int channel, const D3DVECTOR &pos)
#if _TEEN
dist = Length(pos, m_eye);
- if ( dist >= 210.0f ) // très loin ?
+ if ( dist >= 210.0f ) // tr�s loin ?
{
m_channel[channel].volume = 0.0f; // silence
m_channel[channel].pan = 0.0f; // au centre
return;
}
- if ( dist <= 10.0f ) // très proche ?
+ if ( dist <= 10.0f ) // tr�s proche ?
{
m_channel[channel].volume = 1.0f; // volume maximal
m_channel[channel].pan = 0.0f; // au centre
@@ -942,13 +956,13 @@ void CSound::ComputeVolumePan2D(int channel, const D3DVECTOR &pos)
m_channel[channel].volume = 1.0f-((dist-10.0f)/200.0f);
#else
dist = Length(pos, m_eye);
- if ( dist >= 110.0f ) // très loin ?
+ if ( dist >= 110.0f ) // tr�s loin ?
{
m_channel[channel].volume = 0.0f; // silence
m_channel[channel].pan = 0.0f; // au centre
return;
}
- if ( dist <= 10.0f ) // très proche ?
+ if ( dist <= 10.0f ) // tr�s proche ?
{
m_channel[channel].volume = 1.0f; // volume maximal
m_channel[channel].pan = 0.0f; // au centre
@@ -963,15 +977,15 @@ void CSound::ComputeVolumePan2D(int channel, const D3DVECTOR &pos)
}
// Fait entendre un son au milieu.
-// Retourne le canal associé ou -1.
+// Retourne le canal associ� ou -1.
int CSound::Play(Sound sound, float amplitude, float frequency, BOOL bLoop)
{
return Play(sound, m_lookat, amplitude, frequency, bLoop);
}
-// Fait entendre un son à une position donnée.
-// Retourne le canal associé ou -1.
+// Fait entendre un son � une position donn�e.
+// Retourne le canal associ� ou -1.
int CSound::Play(Sound sound, D3DVECTOR pos,
float amplitude, float frequency, BOOL bLoop)
@@ -1097,8 +1111,8 @@ int CSound::Play(Sound sound, D3DVECTOR pos,
return channel | ((uniqueStamp&0xffff)<<16);
}
-// Check un numéro de canal.
-// Adapte le canal pour qu'il puisse être utilisé comme offset
+// Check un num�ro de canal.
+// Adapte le canal pour qu'il puisse �tre utilis� comme offset
// dans m_channel.
BOOL CSound::CheckChannel(int &channel)
@@ -1129,7 +1143,7 @@ BOOL CSound::FlushEnvelope(int channel)
return TRUE;
}
-// Ajoute une opération d'enveloppe.
+// Ajoute une op�ration d'enveloppe.
BOOL CSound::AddEnvelope(int channel, float amplitude, float frequency,
float time, SoundNext oper)
@@ -1197,7 +1211,7 @@ BOOL CSound::Position(int channel, D3DVECTOR pos)
return TRUE;
}
-// Modifie la fréquence d'un son.
+// Modifie la fr�quence d'un son.
// 0.5 descend d'une octave et 2.0 monte d'une octave.
BOOL CSound::Frequency(int channel, float frequency)
@@ -1270,7 +1284,7 @@ BOOL CSound::MuteAll(BOOL bMute)
}
-// Passe à l'opération suivante pour un canal.
+// Passe � l'op�ration suivante pour un canal.
void CSound::OperNext(int channel)
{
@@ -1289,7 +1303,7 @@ void CSound::OperNext(int channel)
m_channel[channel].oper[i].bUsed = FALSE;
}
-// Met à jour les buffers des sons.
+// Met � jour les buffers des sons.
void CSound::FrameMove(float rTime)
{
@@ -1362,8 +1376,8 @@ void CSound::FrameMove(float rTime)
}
}
-// Spécifie la position de l'auditeur.
-// Doit être appelé chaque fois que la caméra se déplace.
+// Sp�cifie la position de l'auditeur.
+// Doit �tre appel� chaque fois que la cam�ra se d�place.
void CSound::SetListener(D3DVECTOR eye, D3DVECTOR lookat)
{
@@ -1619,7 +1633,7 @@ BOOL CSound::IsPlayingMusic()
return (m_MIDIMusic != 0);
}
-// Adapte le volume de la musique en cours, si nécessaire.
+// Adapte le volume de la musique en cours, si n�cessaire.
void CSound::AdaptVolumeMusic()
{
diff --git a/src/sound.h b/src/sound.h
index 1f42562..3b09fb3 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -1,4 +1,18 @@
-// sound.h
+// * 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 .
#include <dsound.h>
@@ -45,7 +59,7 @@ enum Sound
SOUND_SWIM = 28,
SOUND_RADAR = 29,
SOUND_BUILD = 30,
- SOUND_ALARM = 31, // alarme énergie
+ SOUND_ALARM = 31, // alarme �nergie
SOUND_SLIDE = 32,
SOUND_EXPLOi = 33, // insect
SOUND_INSECTa = 34, // ant
@@ -84,10 +98,10 @@ enum Sound
SOUND_JOSTLE = 67,
SOUND_GFLAT = 68,
SOUND_DEADg = 69, // mort par balle
- SOUND_DEADw = 70, // mort noyé
+ SOUND_DEADw = 70, // mort noy�
SOUND_FLYf = 71, // reactor fail
- SOUND_ALARMt = 72, // alarme température
- SOUND_FINDING = 73, // trouvé un objet caché
+ SOUND_ALARMt = 72, // alarme temp�rature
+ SOUND_FINDING = 73, // trouv� un objet cach�
SOUND_THUMP = 74,
SOUND_TOUCH = 75,
SOUND_BLITZ = 76,
@@ -95,7 +109,7 @@ enum Sound
SOUND_FIREp = 78, // tir avec phazer
SOUND_EXPLOg1 = 79, // impact gun 1
SOUND_EXPLOg2 = 80, // impact gun 2
- SOUND_MOTORd = 81, // moteur à friction
+ SOUND_MOTORd = 81, // moteur � friction
};
enum SoundNext
@@ -118,7 +132,7 @@ SoundOper;
typedef struct
{
- char bUsed; // buffer utilisé ?
+ char bUsed; // buffer utilis� ?
char bMute; // silence ?
Sound type; // SOUND_*
int priority; // si grand -> important
diff --git a/src/struct.h b/src/struct.h
index d81b30f..bc6ebb0 100644
--- a/src/struct.h
+++ b/src/struct.h
@@ -1,4 +1,18 @@
-// struct.h
+// * 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 .
#ifndef _STRUCT_H_
#define _STRUCT_H_
diff --git a/src/studio.cpp b/src/studio.cpp
index aa6907d..4d9b975 100644
--- a/src/studio.cpp
+++ b/src/studio.cpp
@@ -1,4 +1,18 @@
-// studio.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
@@ -73,7 +87,7 @@ CStudio::~CStudio()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CStudio::EventProcess(const Event &event)
{
@@ -105,12 +119,12 @@ BOOL CStudio::EventProcess(const Event &event)
m_event->AddEvent(newEvent);
}
- if ( event.event == EVENT_STUDIO_EDIT ) // texte modifié ?
+ if ( event.event == EVENT_STUDIO_EDIT ) // texte modifi� ?
{
ColorizeScript(edit);
}
- if ( event.event == EVENT_STUDIO_LIST ) // liste cliquée ?
+ if ( event.event == EVENT_STUDIO_LIST ) // liste cliqu�e ?
{
m_main->StartDisplayInfo(m_helpFilename, -1);
}
@@ -208,7 +222,7 @@ BOOL CStudio::EventProcess(const Event &event)
}
}
- if ( event.event == EVENT_STUDIO_REALTIME ) // temps réel ?
+ if ( event.event == EVENT_STUDIO_REALTIME ) // temps r�el ?
{
m_bRealTime = !m_bRealTime;
m_script->SetStepMode(!m_bRealTime);
@@ -233,7 +247,7 @@ BOOL CStudio::EventProcess(const Event &event)
}
}
- if ( event.event == EVENT_WINDOW3 ) // fenêtre déplacée ?
+ if ( event.event == EVENT_WINDOW3 ) // fen�tre d�plac�e ?
{
m_editActualPos = m_editFinalPos = pw->RetPos();
m_editActualDim = m_editFinalDim = pw->RetDim();
@@ -298,7 +312,7 @@ BOOL CStudio::EventProcess(const Event &event)
}
-// Fait évoluer une valeur en fonction du temps écoulé.
+// Fait �voluer une valeur en fonction du temps �coul�.
float Evolution(float final, float actual, float time)
{
@@ -308,17 +322,17 @@ float Evolution(float final, float actual, float time)
if ( final > actual )
{
- if ( value > final ) value = final; // ne dépasse pas
+ if ( value > final ) value = final; // ne d�passe pas
}
else
{
- if ( value < final ) value = final; // ne dépasse pas
+ if ( value < final ) value = final; // ne d�passe pas
}
return value;
}
-// Fait évoluer le studio selon le temps écoulé.
+// Fait �voluer le studio selon le temps �coul�.
BOOL CStudio::EventFrame(const Event &event)
{
@@ -341,7 +355,7 @@ BOOL CStudio::EventFrame(const Event &event)
list = (CList*)pw->SearchControl(EVENT_STUDIO_LIST);
if ( list == 0 ) return FALSE;
- if ( !m_script->IsRunning() && m_bRunning ) // arrêt ?
+ if ( !m_script->IsRunning() && m_bRunning ) // arr�t ?
{
m_bRunning = FALSE;
UpdateFlux(); // stop
@@ -354,7 +368,7 @@ BOOL CStudio::EventFrame(const Event &event)
m_event->AddEvent(newEvent); // stoppe
}
- if ( m_script->IsRunning() && !m_bRunning ) // départ ?
+ if ( m_script->IsRunning() && !m_bRunning ) // d�part ?
{
m_bRunning = TRUE;
UpdateFlux(); // run
@@ -367,13 +381,13 @@ BOOL CStudio::EventFrame(const Event &event)
m_script->GetCursor(cursor1, cursor2);
edit->GetCursor(iCursor1, iCursor2);
if ( cursor1 != iCursor1 ||
- cursor2 != iCursor2 ) // curseurs changés ?
+ cursor2 != iCursor2 ) // curseurs chang�s ?
{
- edit->SetCursor(cursor1, cursor2); // montre où en est l'exécution
+ edit->SetCursor(cursor1, cursor2); // montre o� en est l'ex�cution
edit->ShowSelect();
}
- m_script->UpdateList(list); // met à jour la liste des variables
+ m_script->UpdateList(list); // met � jour la liste des variables
}
else
{
@@ -397,7 +411,7 @@ BOOL CStudio::EventFrame(const Event &event)
}
-// Indique si un caractère fait partie d'un mot.
+// Indique si un caract�re fait partie d'un mot.
BOOL IsToken(int character)
{
@@ -410,7 +424,7 @@ BOOL IsToken(int character)
c == '_' );
}
-// Cherche si le curseur est sur un mot-clé.
+// Cherche si le curseur est sur un mot-cl�.
void CStudio::SearchToken(CEdit* edit)
{
@@ -531,7 +545,7 @@ void CStudio::ColorizeScript(CEdit* edit)
}
-// Début de l'édition d'un programme.
+// D�but de l'�dition d'un programme.
void CStudio::StartEditScript(CScript *script, char* name, int rank)
{
@@ -641,7 +655,7 @@ void CStudio::StartEditScript(CScript *script, char* name, int rank)
AdjustEditScript();
}
-// Repositionne tous les contrôles d'édition.
+// Repositionne tous les contr�les d'�dition.
void CStudio::AdjustEditScript()
{
@@ -826,7 +840,7 @@ void CStudio::AdjustEditScript()
}
}
-// Fin de l'édition d'un programme.
+// Fin de l'�dition d'un programme.
BOOL CStudio::StopEditScript(BOOL bCancel)
{
@@ -868,9 +882,9 @@ BOOL CStudio::StopEditScript(BOOL bCancel)
return TRUE;
}
-// Spécifie le message à afficher.
-// Les messages non cliquables restent 8 secondes, même si un
-// message cliquable est affiché avant.
+// Sp�cifie le message � afficher.
+// Les messages non cliquables restent 8 secondes, m�me si un
+// message cliquable est affich� avant.
void CStudio::SetInfoText(char *text, BOOL bClickable)
{
@@ -908,7 +922,7 @@ void CStudio::SetInfoText(char *text, BOOL bClickable)
}
-// Changement de la taille l'édition d'un programme.
+// Changement de la taille l'�dition d'un programme.
void CStudio::ViewEditScript()
{
@@ -927,7 +941,7 @@ void CStudio::ViewEditScript()
}
-// Met à jour le mode de fonctionnement.
+// Met � jour le mode de fonctionnement.
void CStudio::UpdateFlux()
{
@@ -956,7 +970,7 @@ void CStudio::UpdateFlux()
}
}
-// Met à jour les boutons.
+// Met � jour les boutons.
void CStudio::UpdateButtons()
{
@@ -1002,7 +1016,7 @@ void CStudio::UpdateButtons()
}
-// Début de l'affichage d'un dialogue.
+// D�but de l'affichage d'un dialogue.
void CStudio::StartDialog(StudioDialog type)
{
@@ -1120,7 +1134,7 @@ void CStudio::StartDialog(StudioDialog type)
UpdateDialogPublic();
UpdateDialogAction();
- pe->SetCursor(999, 0); // sélectionne tout
+ pe->SetCursor(999, 0); // s�lectionne tout
pe->SetFocus(TRUE);
}
@@ -1167,7 +1181,7 @@ void CStudio::StopDialog()
m_main->SetSatComLock(FALSE); // possible d'utiliser le SatCom
}
-// Ajuste tous les contrôles de dialogue suite à un changement de géométrie.
+// Ajuste tous les contr�les de dialogue suite � un changement de g�om�trie.
void CStudio::AdjustDialog()
{
@@ -1186,7 +1200,7 @@ void CStudio::AdjustDialog()
wpos = pw->RetPos();
wdim = pw->RetDim();
- pw->SetPos(wpos); // pour déplacer les boutons de la barre de titre
+ pw->SetPos(wpos); // pour d�placer les boutons de la barre de titre
if ( m_dialog == SD_OPEN ||
m_dialog == SD_SAVE )
@@ -1292,7 +1306,7 @@ void CStudio::AdjustDialog()
}
}
-// Gestion de l'événement d'un dialogue.
+// Gestion de l'�v�nement d'un dialogue.
BOOL CStudio::EventDialog(const Event &event)
{
@@ -1302,7 +1316,7 @@ BOOL CStudio::EventDialog(const Event &event)
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW9);
if ( pw == 0 ) return FALSE;
- if ( event.event == EVENT_WINDOW9 ) // fenêtre déplacée ?
+ if ( event.event == EVENT_WINDOW9 ) // fen�tre d�plac�e ?
{
wpos = pw->RetPos();
wdim = pw->RetDim();
@@ -1364,7 +1378,7 @@ BOOL CStudio::EventDialog(const Event &event)
return TRUE;
}
-// Met à jour le nom suite à un clic dans la liste.
+// Met � jour le nom suite � un clic dans la liste.
void CStudio::UpdateChangeList()
{
@@ -1382,17 +1396,17 @@ void CStudio::UpdateChangeList()
if ( pe == 0 ) return;
strcpy(name, pl->RetName(pl->RetSelect()));
- name[pe->RetMaxChar()] = 0; // tronque selon lg max éditable
+ name[pe->RetMaxChar()] = 0; // tronque selon lg max �ditable
p = strchr(name, '\t'); // cherche 1er tabulateur
if ( p != 0 ) *p = 0;
pe->SetText(name);
- pe->SetCursor(999, 0); // sélectionne tout
+ pe->SetCursor(999, 0); // s�lectionne tout
pe->SetFocus(TRUE);
UpdateDialogAction();
}
-// Met à jour la liste suite à un changement dans le nom.
+// Met � jour la liste suite � un changement dans le nom.
void CStudio::UpdateChangeEdit()
{
@@ -1409,7 +1423,7 @@ void CStudio::UpdateChangeEdit()
UpdateDialogAction();
}
-// Met à jour le bouton d'action.
+// Met � jour le bouton d'action.
void CStudio::UpdateDialogAction()
{
@@ -1453,7 +1467,7 @@ void CStudio::UpdateDialogAction()
pb->SetState(STATE_ENABLE, !bError);
}
-// Met à jour les boutons private/public.
+// Met � jour les boutons private/public.
void CStudio::UpdateDialogPublic()
{
@@ -1489,7 +1503,7 @@ void CStudio::UpdateDialogPublic()
}
}
-// Remplit la liste avec tous les programmes sauvés.
+// Remplit la liste avec tous les programmes sauv�s.
void CStudio::UpdateDialogList()
{
@@ -1533,7 +1547,7 @@ void CStudio::UpdateDialogList()
{
if ( strcmp(listBuffer[i].name, listBuffer[i+1].name) > 0 )
{
- fileBuffer = listBuffer[i]; // échange i et i+1
+ fileBuffer = listBuffer[i]; // �change i et i+1
listBuffer[i] = listBuffer[i+1];
listBuffer[i+1] = fileBuffer;
bDo = TRUE;
@@ -1552,8 +1566,8 @@ void CStudio::UpdateDialogList()
free(listBuffer);
}
-// Construit le nom du dossier où ouvrir/enregistrer.
-// Si le dossier n'existe pas, il est éventuellement créé.
+// Construit le nom du dossier o� ouvrir/enregistrer.
+// Si le dossier n'existe pas, il est �ventuellement cr��.
void CStudio::SearchDirectory(char *dir, BOOL bCreate)
{
diff --git a/src/studio.h b/src/studio.h
index 1da9e10..8c2d5b1 100644
--- a/src/studio.h
+++ b/src/studio.h
@@ -1,4 +1,18 @@
-// studio.h
+// * 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 .
#ifndef _STUDIO_H_
#define _STUDIO_H_
diff --git a/src/target.cpp b/src/target.cpp
index b0b64c2..5d153bc 100644
--- a/src/target.cpp
+++ b/src/target.cpp
@@ -1,4 +1,18 @@
-// target.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
@@ -36,7 +50,7 @@ CTarget::~CTarget()
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
BOOL CTarget::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -48,7 +62,7 @@ BOOL CTarget::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTarget::EventProcess(const Event &event)
{
@@ -150,10 +164,10 @@ void CTarget::Draw()
BOOL CTarget::GetTooltip(FPOINT pos, char* name)
{
#if 0
- if ( (m_state&STATE_VISIBLE) && Detect(pos) ) // dans la fenêtre ?
+ if ( (m_state&STATE_VISIBLE) && Detect(pos) ) // dans la fen�tre ?
{
strcpy(name, m_tooltip);
- return TRUE; // ne détecte pas les objets dessous !
+ return TRUE; // ne d�tecte pas les objets dessous !
}
return FALSE;
@@ -162,14 +176,14 @@ BOOL CTarget::GetTooltip(FPOINT pos, char* name)
if ( (m_state & STATE_VISIBLE) == 0 ) return FALSE;
- if ( (m_state&STATE_VISIBLE) && Detect(pos) ) // dans la fenêtre ?
+ if ( (m_state&STATE_VISIBLE) && Detect(pos) ) // dans la fen�tre ?
{
//? pObj = DetectFriendObject(pos);
//? if ( pObj == 0 )
if ( !m_main->RetFriendAim() )
{
strcpy(name, m_tooltip);
- return TRUE; // ne détecte pas les objets dessous !
+ return TRUE; // ne d�tecte pas les objets dessous !
}
}
@@ -178,7 +192,7 @@ BOOL CTarget::GetTooltip(FPOINT pos, char* name)
}
-// Détecte l'objet visé par la souris.
+// D�tecte l'objet vis� par la souris.
CObject* CTarget::DetectFriendObject(FPOINT pos)
{
@@ -249,7 +263,7 @@ CObject* CTarget::DetectFriendObject(FPOINT pos)
}
else if ( (type == OBJECT_POWER ||
type == OBJECT_ATOMIC ) &&
- pObj->RetTruck() != 0 ) // pile utilisée ?
+ pObj->RetTruck() != 0 ) // pile utilis�e ?
{
pTarget = pObj->RetTruck();
if ( pTarget->RetType() == OBJECT_MOBILEtg )
diff --git a/src/target.h b/src/target.h
index 2f479dc..f8703cd 100644
--- a/src/target.h
+++ b/src/target.h
@@ -1,4 +1,18 @@
-// target.h
+// * 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 .
#ifndef _TARGET_H_
#define _TARGET_H_
diff --git a/src/task.cpp b/src/task.cpp
index 7b3dd84..8c2affe 100644
--- a/src/task.cpp
+++ b/src/task.cpp
@@ -1,4 +1,18 @@
-// task.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
@@ -59,7 +73,7 @@ CTask::~CTask()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTask::EventProcess(const Event &event)
{
@@ -67,7 +81,7 @@ BOOL CTask::EventProcess(const Event &event)
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTask::IsEnded()
{
diff --git a/src/task.h b/src/task.h
index 5b6041d..1ebe4d5 100644
--- a/src/task.h
+++ b/src/task.h
@@ -1,4 +1,18 @@
-// task.h
+// * 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 .
#ifndef _TASK_H_
#define _TASK_H_
@@ -22,7 +36,7 @@ class CSound;
#define TAKE_DIST 6.0f // distance d'un objet pour le prendre
-#define TAKE_DIST_OTHER 1.5f // distance supplémentaire si sur ami
+#define TAKE_DIST_OTHER 1.5f // distance suppl�mentaire si sur ami
//?#define ARM_NEUTRAL_ANGLE1 155.0f*PI/180.0f
//?#define ARM_NEUTRAL_ANGLE2 -125.0f*PI/180.0f
diff --git a/src/taskadvance.cpp b/src/taskadvance.cpp
index 365562f..cae3939 100644
--- a/src/taskadvance.cpp
+++ b/src/taskadvance.cpp
@@ -1,4 +1,18 @@
-// taskadvance.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
@@ -38,7 +52,7 @@ CTaskAdvance::~CTaskAdvance()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskAdvance::EventProcess(const Event &event)
{
@@ -47,7 +61,7 @@ BOOL CTaskAdvance::EventProcess(const Event &event)
m_fixTime += event.rTime;
- // 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
@@ -61,7 +75,7 @@ BOOL CTaskAdvance::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskAdvance::Start(float length)
{
@@ -83,7 +97,7 @@ Error CTaskAdvance::Start(float length)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskAdvance::IsEnded()
{
diff --git a/src/taskadvance.h b/src/taskadvance.h
index 9ff20ce..4b8b0b7 100644
--- a/src/taskadvance.h
+++ b/src/taskadvance.h
@@ -1,4 +1,18 @@
-// taskadvance.h
+// * 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 .
#ifndef _TASKADVANCE_H_
#define _TASKADVANCE_H_
diff --git a/src/taskbuild.cpp b/src/taskbuild.cpp
index d4b7d10..7ec1daf 100644
--- a/src/taskbuild.cpp
+++ b/src/taskbuild.cpp
@@ -1,4 +1,18 @@
-// taskbuild.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
@@ -73,7 +87,7 @@ CTaskBuild::~CTaskBuild()
}
-// Crée un batiment.
+// Cr�e un batiment.
BOOL CTaskBuild::CreateBuilding(D3DVECTOR pos, float angle)
{
@@ -108,7 +122,7 @@ BOOL CTaskBuild::CreateBuilding(D3DVECTOR pos, float angle)
return TRUE;
}
-// Crée les lumières pour les effets.
+// Cr�e les lumi�res pour les effets.
void CTaskBuild::CreateLight()
{
@@ -172,7 +186,7 @@ void CTaskBuild::CreateLight()
m_bBlack = FALSE;
}
-// Fait passer les lumières du noir au blanc.
+// Fait passer les lumi�res du noir au blanc.
void CTaskBuild::BlackLight()
{
@@ -194,7 +208,7 @@ void CTaskBuild::BlackLight()
m_bBlack = TRUE;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskBuild::EventProcess(const Event &event)
{
@@ -209,9 +223,9 @@ BOOL CTaskBuild::EventProcess(const Event &event)
m_time += event.rTime;
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
- if ( m_phase == TBP_TURN ) // rotation préliminaire ?
+ if ( m_phase == TBP_TURN ) // rotation pr�liminaire ?
{
a = m_object->RetAngleY(0);
g = m_angleY;
@@ -219,11 +233,11 @@ BOOL CTaskBuild::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
return TRUE;
}
- if ( m_phase == TBP_MOVE ) // avance/recule préliminaire ?
+ if ( m_phase == TBP_MOVE ) // avance/recule pr�liminaire ?
{
dist = Length(m_object->RetPosition(0), m_metal->RetPosition(0));
linSpeed = 0.0f;
@@ -244,7 +258,7 @@ BOOL CTaskBuild::EventProcess(const Event &event)
return TRUE;
}
- if ( m_phase == TBP_PREP ) // prépare ?
+ if ( m_phase == TBP_PREP ) // pr�pare ?
{
return TRUE;
}
@@ -254,7 +268,7 @@ BOOL CTaskBuild::EventProcess(const Event &event)
return TRUE;
}
- if ( !m_bBuild ) // batiment à construire ?
+ if ( !m_bBuild ) // batiment � construire ?
{
m_bBuild = TRUE;
@@ -328,7 +342,7 @@ BOOL CTaskBuild::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskBuild::Start(ObjectType type)
{
@@ -344,7 +358,7 @@ Error CTaskBuild::Start(ObjectType type)
iAngle = NormAngle(iAngle); // 0..2*PI
oAngle = iAngle;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
pos = m_object->RetPosition(0);
if ( pos.y < m_water->RetLevel() ) return ERR_BUILD_WATER;
@@ -372,8 +386,8 @@ Error CTaskBuild::Start(ObjectType type)
m_metal->SetLock(TRUE); // plus utilisable
m_camera->StartCentering(m_object, PI*0.15f, 99.9f, 0.0f, 1.0f);
- m_phase = TBP_TURN; // rotation préliminaire nécessaire
- m_angleY = oAngle; // angle à atteindre
+ m_phase = TBP_TURN; // rotation pr�liminaire n�cessaire
+ m_angleY = oAngle; // angle � atteindre
pv = m_object->RetPosition(0);
pv.y += 8.3f;
@@ -387,7 +401,7 @@ Error CTaskBuild::Start(ObjectType type)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskBuild::IsEnded()
{
@@ -397,7 +411,7 @@ Error CTaskBuild::IsEnded()
if ( m_engine->RetPause() ) return ERR_CONTINUE;
if ( m_bError ) return ERR_STOP;
- if ( m_phase == TBP_TURN ) // rotation préliminaire ?
+ if ( m_phase == TBP_TURN ) // rotation pr�liminaire ?
{
angle = m_object->RetAngleY(0);
angle = NormAngle(angle); // 0..2*PI
@@ -423,7 +437,7 @@ Error CTaskBuild::IsEnded()
return ERR_CONTINUE;
}
- if ( m_phase == TBP_MOVE ) // avance/recule préliminaire ?
+ if ( m_phase == TBP_MOVE ) // avance/recule pr�liminaire ?
{
dist = Length(m_object->RetPosition(0), m_metal->RetPosition(0));
@@ -462,7 +476,7 @@ Error CTaskBuild::IsEnded()
m_progress = 0.0f;
}
- if ( m_phase == TBP_PREP ) // prépare ?
+ if ( m_phase == TBP_PREP ) // pr�pare ?
{
if ( m_progress < 1.0f ) return ERR_CONTINUE;
@@ -474,7 +488,7 @@ Error CTaskBuild::IsEnded()
m_camera->StartEffect(CE_VIBRATION, m_metal->RetPosition(0), 1.0f);
m_phase = TBP_BUILD;
- m_speed = 1.0f/10.f; // durée de 10s
+ m_speed = 1.0f/10.f; // dur�e de 10s
m_progress = 0.0f;
}
@@ -484,7 +498,7 @@ Error CTaskBuild::IsEnded()
DeleteMark(m_metal->RetPosition(0), 20.0f);
- m_metal->DeleteObject(); // supprime le métal
+ m_metal->DeleteObject(); // supprime le m�tal
delete m_metal;
m_metal = 0;
@@ -554,7 +568,7 @@ BOOL CTaskBuild::Abort()
}
-// Vérifie si le terrain est assez plat et s'il n'y a pas
+// V�rifie si le terrain est assez plat et s'il n'y a pas
// un autre objet trop proche.
Error CTaskBuild::FlatFloor()
@@ -605,7 +619,7 @@ Error CTaskBuild::FlatFloor()
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj == m_metal ) continue;
if ( pObj == m_object ) continue;
@@ -653,7 +667,7 @@ Error CTaskBuild::FlatFloor()
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj == m_metal ) continue;
if ( pObj == m_object ) continue;
@@ -674,7 +688,7 @@ Error CTaskBuild::FlatFloor()
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) )
@@ -699,7 +713,7 @@ Error CTaskBuild::FlatFloor()
return ERR_OK;
}
-// Cherche l'objet métal le plus proche.
+// Cherche l'objet m�tal le plus proche.
CObject* CTaskBuild::SearchMetalObject(float &angle, float dMin, float dMax,
float aLimit, Error &err)
@@ -724,12 +738,12 @@ CObject* CTaskBuild::SearchMetalObject(float &angle, float dMin, float dMax,
if ( pObj == 0 ) break;
if ( !pObj->RetActif() ) continue; // objet inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
type = pObj->RetType();
if ( type != OBJECT_METAL ) continue;
- bMetal = TRUE; // métal existe
+ bMetal = TRUE; // m�tal existe
oPos = pObj->RetPosition(0);
distance = Length(oPos, iPos);
@@ -769,7 +783,7 @@ CObject* CTaskBuild::SearchMetalObject(float &angle, float dMin, float dMax,
return pBest;
}
-// Détruit toutes les marques proches.
+// D�truit toutes les marques proches.
void CTaskBuild::DeleteMark(D3DVECTOR pos, float radius)
{
diff --git a/src/taskbuild.h b/src/taskbuild.h
index 6d8a234..3ccb6f5 100644
--- a/src/taskbuild.h
+++ b/src/taskbuild.h
@@ -1,4 +1,18 @@
-// taskbuild.h
+// * 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 .
#ifndef _TASKBUILD_H_
#define _TASKBUILD_H_
@@ -21,7 +35,7 @@ enum TaskBuildPhase
TBP_TURN = 1, // tourne
TBP_MOVE = 2, // avance/recule
TBP_TAKE = 3, // prend arme
- TBP_PREP = 4, // prépare
+ TBP_PREP = 4, // pr�pare
TBP_BUILD = 5, // construit
TBP_TERM = 6, // termine
TBP_RECEDE = 7, // recule terminal
@@ -51,22 +65,22 @@ protected:
protected:
ObjectType m_type; // type de construction
- CObject* m_metal; // objet metal transformé
- CObject* m_power; // pile du véhicule
+ CObject* m_metal; // objet metal transform�
+ CObject* m_power; // pile du v�hicule
CObject* m_building; // batiment construit
- TaskBuildPhase m_phase; // phase de l'opération
- BOOL m_bError; // TRUE -> opération impossible
+ TaskBuildPhase m_phase; // phase de l'op�ration
+ BOOL m_bError; // TRUE -> op�ration impossible
BOOL m_bBuild; // TRUE -> batiment construit
- BOOL m_bBlack; // TRUE -> lumières noir -> blanc
+ BOOL m_bBlack; // TRUE -> lumi�res noir -> blanc
float m_time; // temps absolu
- float m_lastParticule;// temps génération dernière particule
+ float m_lastParticule;// temps g�n�ration derni�re particule
float m_progress; // progression (0..1)
float m_speed; // vitesse de la progression
- float m_angleY; // angle de rotation du véhicule
+ float m_angleY; // angle de rotation du v�hicule
float m_angleZ; // angle de rotation du canon
D3DVECTOR m_buildingPos; // position initiale du batiment
float m_buildingHeight;// hauteur du building
- int m_lightRank[TBMAXLIGHT];// lumières pour les effets
+ int m_lightRank[TBMAXLIGHT];// lumi�res pour les effets
int m_soundChannel;
};
diff --git a/src/taskfire.cpp b/src/taskfire.cpp
index 5347ad6..9a44f9f 100644
--- a/src/taskfire.cpp
+++ b/src/taskfire.cpp
@@ -1,4 +1,18 @@
-// taskfire.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
@@ -24,9 +38,9 @@
-#define ENERGY_FIRE (0.25f/2.5f) // énergie consommée /s de tir
-#define ENERGY_FIREr (0.25f/1.5f) // énergie consommée /s de rayon
-#define ENERGY_FIREi (0.10f/2.5f) // énergie consommée /s d'organique
+#define ENERGY_FIRE (0.25f/2.5f) // �nergie consomm�e /s de tir
+#define ENERGY_FIREr (0.25f/1.5f) // �nergie consomm�e /s de rayon
+#define ENERGY_FIREi (0.10f/2.5f) // �nergie consomm�e /s d'organique
// Constructeur de l'objet.
@@ -51,7 +65,7 @@ CTaskFire::~CTaskFire()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskFire::EventProcess(const Event &event)
{
@@ -261,7 +275,7 @@ BOOL CTaskFire::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskFire::Start(float delay)
{
@@ -270,7 +284,7 @@ Error CTaskFire::Start(float delay)
float energy, fire;
ObjectType type;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
type = m_object->RetType();
if ( type != OBJECT_MOBILEfc &&
@@ -349,7 +363,7 @@ Error CTaskFire::Start(float delay)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskFire::IsEnded()
{
diff --git a/src/taskfire.h b/src/taskfire.h
index 9ce1c9b..f17a01a 100644
--- a/src/taskfire.h
+++ b/src/taskfire.h
@@ -1,4 +1,18 @@
-// taskfire.h
+// * 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 .
#ifndef _TASKFIRE_H_
#define _TASKTIRE_H_
diff --git a/src/taskfireant.cpp b/src/taskfireant.cpp
index d82ec32..11ecdbd 100644
--- a/src/taskfireant.cpp
+++ b/src/taskfireant.cpp
@@ -1,4 +1,18 @@
-// taskfireant.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
@@ -43,7 +57,7 @@ CTaskFireAnt::~CTaskFireAnt()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskFireAnt::EventProcess(const Event &event)
{
@@ -63,7 +77,7 @@ BOOL CTaskFireAnt::EventProcess(const Event &event)
m_time += event.rTime;
m_progress += event.rTime*m_speed;
- if ( m_phase == TFA_TURN ) // rotation préliminaire ?
+ if ( m_phase == TFA_TURN ) // rotation pr�liminaire ?
{
a = m_object->RetAngleY(0);
g = m_angle;
@@ -71,14 +85,14 @@ BOOL CTaskFireAnt::EventProcess(const Event &event)
if ( cirSpeed > 2.0f ) cirSpeed = 2.0f;
if ( cirSpeed < -2.0f ) cirSpeed = -2.0f;
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
}
return TRUE;
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskFireAnt::Start(D3DVECTOR impact)
{
@@ -87,7 +101,7 @@ Error CTaskFireAnt::Start(D3DVECTOR impact)
m_impact = impact;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() ) return ERR_FIRE_VEH;
type = m_object->RetType();
@@ -112,7 +126,7 @@ Error CTaskFireAnt::Start(D3DVECTOR impact)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskFireAnt::IsEnded()
{
@@ -132,7 +146,7 @@ Error CTaskFireAnt::IsEnded()
angle = NormAngle(angle); // 0..2*PI
if ( !TestAngle(angle, m_angle-PI*0.05f, m_angle+PI*0.05f) ) return ERR_CONTINUE;
- m_physics->SetMotorSpeedZ(0.0f); // rotation terminée
+ m_physics->SetMotorSpeedZ(0.0f); // rotation termin�e
m_phase = TFA_PREPARE;
//? m_speed = 1.0f/1.5f;
@@ -142,7 +156,7 @@ Error CTaskFireAnt::IsEnded()
m_motion->SetAction(MAS_PREPARE, 0.4f);
}
- if ( m_phase == TFA_PREPARE ) // préparation ?
+ if ( m_phase == TFA_PREPARE ) // pr�paration ?
{
if ( m_progress < 1.0f ) return ERR_CONTINUE;
diff --git a/src/taskfireant.h b/src/taskfireant.h
index d251b9b..cb75804 100644
--- a/src/taskfireant.h
+++ b/src/taskfireant.h
@@ -1,4 +1,18 @@
-// taskfireant.h
+// * 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 .
#ifndef _TASKFIREANT_H_
#define _TASKTIREANT_H_
@@ -14,9 +28,9 @@ class CObject;
enum TaskFireAnt
{
- TFA_NULL = 0, // rien à faire
+ TFA_NULL = 0, // rien � faire
TFA_TURN = 1, // tourne
- TFA_PREPARE = 2, // prépare position de tir
+ TFA_PREPARE = 2, // pr�pare position de tir
TFA_FIRE = 3, // tir
TFA_TERMINATE = 4, // termine position de tir
};
diff --git a/src/taskflag.cpp b/src/taskflag.cpp
index a475e67..91d3765 100644
--- a/src/taskflag.cpp
+++ b/src/taskflag.cpp
@@ -1,4 +1,18 @@
-// taskflag.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
@@ -46,7 +60,7 @@ CTaskFlag::~CTaskFlag()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskFlag::EventProcess(const Event &event)
{
@@ -61,7 +75,7 @@ BOOL CTaskFlag::EventProcess(const Event &event)
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskFlag::Start(TaskFlagOrder order, int rank)
{
@@ -71,7 +85,7 @@ Error CTaskFlag::Start(TaskFlagOrder order, int rank)
m_order = order;
m_time = 0.0f;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() )
{
pos = m_object->RetPosition(0);
@@ -99,13 +113,13 @@ Error CTaskFlag::Start(TaskFlagOrder order, int rank)
m_bError = FALSE;
- m_motion->SetAction(MHS_FLAG); // met/enlève drapeau
+ m_motion->SetAction(MHS_FLAG); // met/enl�ve drapeau
m_camera->StartCentering(m_object, PI*0.3f, 99.9f, 0.0f, 0.5f);
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskFlag::IsEnded()
{
@@ -129,7 +143,7 @@ BOOL CTaskFlag::Abort()
-// Retourne l'objet le plus proche d'une position donnée.
+// Retourne l'objet le plus proche d'une position donn�e.
CObject* CTaskFlag::SearchNearest(D3DVECTOR pos, ObjectType type)
{
@@ -209,7 +223,7 @@ int CTaskFlag::CountObject(ObjectType type)
return count;
}
-// Crée un indicateur de couleur.
+// Cr�e un indicateur de couleur.
Error CTaskFlag::CreateFlag(int rank)
{
diff --git a/src/taskflag.h b/src/taskflag.h
index af940aa..f3c369e 100644
--- a/src/taskflag.h
+++ b/src/taskflag.h
@@ -1,4 +1,18 @@
-// taskflag.h
+// * 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 .
#ifndef _TASKFLAG_H_
#define _TASKFLAG_H_
@@ -15,7 +29,7 @@ class CObject;
enum TaskFlagOrder
{
TFL_CREATE = 0, // met
- TFL_DELETE = 1, // enlève
+ TFL_DELETE = 1, // enl�ve
};
diff --git a/src/taskgoto.cpp b/src/taskgoto.cpp
index cd9575b..02e65f1 100644
--- a/src/taskgoto.cpp
+++ b/src/taskgoto.cpp
@@ -1,4 +1,18 @@
-// taskgoto.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
@@ -24,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
@@ -48,7 +62,7 @@ CTaskGoto::~CTaskGoto()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskGoto::EventProcess(const Event &event)
{
@@ -60,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
@@ -97,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
@@ -111,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;
}
@@ -120,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);
}
@@ -179,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;
@@ -260,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);
@@ -290,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;
}
@@ -344,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;
}
@@ -420,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;
@@ -430,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;
@@ -442,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;
@@ -456,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 ?
{
@@ -479,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 ?
{
@@ -565,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);
@@ -602,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� !
}
}
}
@@ -610,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)
@@ -706,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)
}
}
@@ -729,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
}
}
@@ -755,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;
@@ -778,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()
{
@@ -807,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 )
{
@@ -824,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;
}
@@ -848,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;
@@ -955,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 )
{
@@ -967,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;
@@ -987,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 )
{
@@ -995,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 )
{
@@ -1008,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;
@@ -1020,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 )
{
@@ -1048,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)
{
@@ -1065,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);
@@ -1081,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)
{
@@ -1132,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 )
@@ -1141,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 ||
@@ -1192,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)
{
@@ -1208,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);
@@ -1222,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)
@@ -1380,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) )
@@ -1414,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)
@@ -1475,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;
@@ -1530,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() )
{
@@ -1596,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;
@@ -1629,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)
@@ -1683,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()
{
@@ -1694,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()
{
@@ -1747,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)
@@ -1772,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,
@@ -1791,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 )
{
@@ -1869,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,
@@ -1991,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);
@@ -2001,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
{
@@ -2276,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)
{
@@ -2309,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)
diff --git a/src/taskgoto.h b/src/taskgoto.h
index 094cd6b..220c941 100644
--- a/src/taskgoto.h
+++ b/src/taskgoto.h
@@ -1,4 +1,18 @@
-// taskgoto.h
+// * 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 .
#ifndef _TASKGOTO_H_
#define _TASKGOTO_H_
@@ -18,14 +32,14 @@ class CObject;
enum TaskGotoGoal
{
- TGG_DEFAULT = -1, // mode par défaut
- TGG_STOP = 0, // va à destination en s'arrêtant avec précision
- TGG_EXPRESS = 1, // va à destination sans s'arrêter
+ TGG_DEFAULT = -1, // mode par d�faut
+ TGG_STOP = 0, // va � destination en s'arr�tant avec pr�cision
+ TGG_EXPRESS = 1, // va � destination sans s'arr�ter
};
enum TaskGotoCrash
{
- TGC_DEFAULT = -1, // mode par défaut
+ TGC_DEFAULT = -1, // mode par d�faut
TGC_HALT = 0, // stoppe si collision
TGC_RIGHTLEFT = 1, // droite-gauche
TGC_LEFTRIGHT = 2, // gauche-droite
@@ -41,16 +55,16 @@ enum TaskGotoPhase
TGP_LAND = 2, // atterri
TGP_TURN = 3, // tourne pour finir
TGP_MOVE = 4, // avance pour finir
- TGP_CRWAIT = 5, // attend après collision
- TGP_CRTURN = 6, // tourne à droite après collision
- TGP_CRADVANCE = 7, // avance à droite après collision
- TGP_CLWAIT = 8, // attend après collision
- TGP_CLTURN = 9, // tourne à gauche après collision
- TGP_CLADVANCE = 10, // avance à gauche après collision
+ TGP_CRWAIT = 5, // attend apr�s collision
+ TGP_CRTURN = 6, // tourne � droite apr�s collision
+ TGP_CRADVANCE = 7, // avance � droite apr�s collision
+ TGP_CLWAIT = 8, // attend apr�s collision
+ TGP_CLTURN = 9, // tourne � gauche apr�s collision
+ TGP_CLADVANCE = 10, // avance � gauche apr�s collision
TGP_BEAMLEAK = 11, // beam: leak (fuite)
TGP_BEAMSEARCH = 12, // beam: search
- TGP_BEAMWCOLD = 13, // beam: attend refroidissement réacteur
- TGP_BEAMUP = 14, // beam: décolle
+ TGP_BEAMWCOLD = 13, // beam: attend refroidissement r�acteur
+ TGP_BEAMUP = 14, // beam: d�colle
TGP_BEAMGOTO = 15, // beam: goto dot list
TGP_BEAMDOWN = 16, // beam: atterri
};
@@ -120,7 +134,7 @@ protected:
int m_bmSize; // largeur ou hauteur du tableau
int m_bmOffset; // m_bmSize/2
- int m_bmLine; // incrément ligne m_bmSize/8
+ int m_bmLine; // incr�ment ligne m_bmSize/8
unsigned char* m_bmArray; // tableau de bits
int m_bmMinX, m_bmMinY;
int m_bmMaxX, m_bmMaxY;
@@ -130,14 +144,14 @@ protected:
char m_bmIter[MAXPOINTS+2];
int m_bmIterCounter;
CObject* m_bmFretObject;
- float m_bmFinalMove; // distance finale à avancer
- float m_bmFinalDist; // distance effective à avancer
+ float m_bmFinalMove; // distance finale � avancer
+ float m_bmFinalDist; // distance effective � avancer
D3DVECTOR m_bmFinalPos; // position initiale avant avance
float m_bmTimeLimit;
int m_bmStep;
D3DVECTOR m_bmWatchDogPos;
float m_bmWatchDogTime;
- D3DVECTOR m_leakPos; // position initiale à fuire
+ D3DVECTOR m_leakPos; // position initiale � fuire
float m_leakDelay;
float m_leakTime;
BOOL m_bLeakRecede;
diff --git a/src/taskgungoal.cpp b/src/taskgungoal.cpp
index 9066c5a..d11ce65 100644
--- a/src/taskgungoal.cpp
+++ b/src/taskgungoal.cpp
@@ -1,4 +1,18 @@
-// taskgungoal.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
@@ -36,7 +50,7 @@ CTaskGunGoal::~CTaskGunGoal()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskGunGoal::EventProcess(const Event &event)
{
@@ -71,7 +85,7 @@ BOOL CTaskGunGoal::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskGunGoal::Start(float dirV, float dirH)
{
@@ -120,7 +134,7 @@ Error CTaskGunGoal::Start(float dirV, float dirH)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskGunGoal::IsEnded()
{
diff --git a/src/taskgungoal.h b/src/taskgungoal.h
index 63630a0..725a138 100644
--- a/src/taskgungoal.h
+++ b/src/taskgungoal.h
@@ -1,4 +1,18 @@
-// taskgungoal.h
+// * 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 .
#ifndef _TASKGUNGOAL_H_
#define _TASKGUNGOAL_H_
@@ -29,9 +43,9 @@ protected:
float m_progress;
float m_speed;
float m_initialDirV; // direction initiale
- float m_finalDirV; // direction à atteindre
+ float m_finalDirV; // direction � atteindre
float m_initialDirH; // direction initiale
- float m_finalDirH; // direction à atteindre
+ float m_finalDirH; // direction � atteindre
};
diff --git a/src/taskinfo.cpp b/src/taskinfo.cpp
index 7789732..d09c13e 100644
--- a/src/taskinfo.cpp
+++ b/src/taskinfo.cpp
@@ -1,4 +1,18 @@
-// taskinfo.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
@@ -41,7 +55,7 @@ CTaskInfo::~CTaskInfo()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskInfo::EventProcess(const Event &event)
{
@@ -49,14 +63,14 @@ BOOL CTaskInfo::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_time += event.rTime;
return TRUE;
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
{
@@ -81,7 +95,7 @@ Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
return ERR_INFO_NULL;
}
- op = 1; // émission impossible
+ op = 1; // �mission impossible
if ( bSend ) // send ?
{
total = pInfo->RetInfoTotal();
@@ -102,12 +116,12 @@ Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
strcpy(info.name, name);
info.value = value;
pInfo->SetInfo(total, info);
- op = 2; // début de réception (pour la borne)
+ op = 2; // d�but de r�ception (pour la borne)
}
}
else
{
- op = 2; // début de réception (pour la borne)
+ op = 2; // d�but de r�ception (pour la borne)
}
}
else // receive ?
@@ -124,13 +138,13 @@ Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
}
if ( i < total )
{
- op = 0; // début d'émission (pour la borne)
+ op = 0; // d�but d'�mission (pour la borne)
}
}
pAuto->Start(op);
- if ( op == 0 ) // émission ?
+ if ( op == 0 ) // �mission ?
{
pos = pInfo->RetPosition(0);
pos.y += 9.5f;
@@ -138,7 +152,7 @@ Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
goal.y += 4.0f;
m_particule->CreateRay(pos, goal, PARTIRAY3, FPOINT(2.0f, 2.0f), 1.0f);
}
- if ( op == 2 ) // réception ?
+ if ( op == 2 ) // r�ception ?
{
goal = pInfo->RetPosition(0);
goal.y += 9.5f;
@@ -156,7 +170,7 @@ Error CTaskInfo::Start(char *name, float value, float power, BOOL bSend)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskInfo::IsEnded()
{
diff --git a/src/taskinfo.h b/src/taskinfo.h
index c2d6147..9499215 100644
--- a/src/taskinfo.h
+++ b/src/taskinfo.h
@@ -1,4 +1,18 @@
-// taskinfo.h
+// * 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 .
#ifndef _TASKINFO_H_
#define _TASKINFO_H_
diff --git a/src/taskmanager.cpp b/src/taskmanager.cpp
index 0a61c93..b923edf 100644
--- a/src/taskmanager.cpp
+++ b/src/taskmanager.cpp
@@ -1,4 +1,18 @@
-// taskmanager.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
@@ -83,7 +97,7 @@ Error CTaskManager::StartTaskTurn(float angle)
return ((CTaskTurn*)m_task)->Start(angle);
}
-// Atteint une position donnée.
+// Atteint une position donn�e.
Error CTaskManager::StartTaskGoto(D3DVECTOR pos, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode)
{
@@ -107,7 +121,7 @@ Error CTaskManager::StartTaskManip(TaskManipOrder order, TaskManipArm arm)
return ((CTaskManip*)m_task)->Start(order, arm);
}
-// Met ou enlève un drapeau.
+// Met ou enl�ve un drapeau.
Error CTaskManager::StartTaskFlag(TaskFlagOrder order, int rank)
{
@@ -155,7 +169,7 @@ Error CTaskManager::StartTaskPen(BOOL bDown, int color)
return ((CTaskPen*)m_task)->Start(bDown, color);
}
-// Récupère une ruine.
+// R�cup�re une ruine.
Error CTaskManager::StartTaskRecover()
{
@@ -163,7 +177,7 @@ Error CTaskManager::StartTaskRecover()
return ((CTaskRecover*)m_task)->Start();
}
-// Déploie le bouclier.
+// D�ploie le bouclier.
Error CTaskManager::StartTaskShield(TaskShieldMode mode, float delay)
{
@@ -208,7 +222,7 @@ Error CTaskManager::StartTaskGunGoal(float dirV, float dirH)
return ((CTaskGunGoal*)m_task)->Start(dirV, dirH);
}
-// Suicide de l'araignée.
+// Suicide de l'araign�e.
Error CTaskManager::StartTaskSpiderExplo()
{
@@ -228,7 +242,7 @@ Error CTaskManager::StartTaskReset(D3DVECTOR goal, D3DVECTOR angle)
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskManager::EventProcess(const Event &event)
{
@@ -237,7 +251,7 @@ BOOL CTaskManager::EventProcess(const Event &event)
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskManager::IsEnded()
{
@@ -255,8 +269,8 @@ BOOL CTaskManager::IsBusy()
}
-// Indique s'il est possible de piloter le robot pendant l'exécution
-// de la tâche en cours.
+// Indique s'il est possible de piloter le robot pendant l'ex�cution
+// de la t�che en cours.
BOOL CTaskManager::IsPilot()
{
diff --git a/src/taskmanager.h b/src/taskmanager.h
index 4384f15..ce14e77 100644
--- a/src/taskmanager.h
+++ b/src/taskmanager.h
@@ -1,4 +1,18 @@
-// taskmanager.h
+// * 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 .
#ifndef _TASKMANAGER_H_
#define _TASKMANAGER_H_
diff --git a/src/taskmanip.cpp b/src/taskmanip.cpp
index 2ccc27f..367f9fe 100644
--- a/src/taskmanip.cpp
+++ b/src/taskmanip.cpp
@@ -1,4 +1,18 @@
-// taskmanip.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
@@ -56,7 +70,7 @@ CTaskManip::~CTaskManip()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskManip::EventProcess(const Event &event)
{
@@ -73,30 +87,30 @@ BOOL CTaskManip::EventProcess(const Event &event)
return TRUE;
}
- if ( m_bTurn ) // rotation préliminaire ?
+ if ( m_bTurn ) // rotation pr�liminaire ?
{
a = m_object->RetAngleY(0);
g = m_angle;
cirSpeed = Direction(a, g)*1.0f;
if ( m_physics->RetType() == TYPE_FLYING ) // 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;
- m_physics->SetMotorSpeedZ(cirSpeed); // tourne à gauche/droite
+ m_physics->SetMotorSpeedZ(cirSpeed); // tourne � gauche/droite
return TRUE;
}
- if ( m_move != 0 ) // avance préliminaire ?
+ if ( m_move != 0 ) // avance pr�liminaire ?
{
m_timeLimit -= event.rTime;
m_physics->SetMotorSpeedX(m_move); // avance/recule
return TRUE;
}
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
progress = m_progress;
if ( progress > 1.0f ) progress = 1.0f;
@@ -227,12 +241,12 @@ void CTaskManip::InitAngle()
if ( m_hand == TMH_OPEN ) // pince ouverte ?
{
m_finalAngle[3] = -PI*0.10f; // pince proche
- m_finalAngle[4] = PI*0.10f; // pince éloignée
+ m_finalAngle[4] = PI*0.10f; // pince �loign�e
}
- if ( m_hand == TMH_CLOSE ) // pince fermée ?
+ if ( m_hand == TMH_CLOSE ) // pince ferm�e ?
{
m_finalAngle[3] = PI*0.05f; // pince proche
- m_finalAngle[4] = -PI*0.05f; // pince éloignée
+ m_finalAngle[4] = -PI*0.05f; // pince �loign�e
}
for ( i=0 ; i<5 ; i++ )
@@ -257,12 +271,12 @@ void CTaskManip::InitAngle()
if ( energy == 0.0f )
{
- m_speed *= 0.7f; // plus lent si plus d'énergie !
+ m_speed *= 0.7f; // plus lent si plus d'�nergie !
}
}
-// Teste si un objet est compatible avec l'opération TMA_OTHER.
+// Teste si un objet est compatible avec l'op�ration TMA_OTHER.
BOOL TestFriend(ObjectType oType, ObjectType fType)
{
@@ -283,7 +297,7 @@ BOOL TestFriend(ObjectType oType, ObjectType fType)
fType == OBJECT_ATOMIC );
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
{
@@ -304,7 +318,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
iAngle = NormAngle(iAngle); // 0..2*PI
oAngle = iAngle;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( m_arm != TMA_FFRONT &&
m_arm != TMA_FBACK &&
@@ -330,7 +344,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
else
{
other = m_object->RetFret(); // other = boulet
- m_object->SetFret(0); // lâche le boulet
+ m_object->SetFret(0); // l�che le boulet
other->SetTruck(0);
pos = m_object->RetPosition(0);
pos.y -= 3.0f;
@@ -352,7 +366,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
m_bSubm = ( type == OBJECT_MOBILEsa ); // sous-marin ?
- if ( m_arm == TMA_GRAB ) // prend immédiatement ?
+ if ( m_arm == TMA_GRAB ) // prend imm�diatement ?
{
TruckTakeObject();
Abort();
@@ -379,7 +393,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
m_arm = TMA_FFRONT; // possible seulement devant !
}
- m_move = 0.0f; // avance pas nécessaire
+ m_move = 0.0f; // avance pas n�cessaire
m_angle = iAngle;
if ( order == TMO_AUTO )
@@ -422,7 +436,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
{
m_targetPos = fPos;
m_angle = fAngle;
- m_move = 1.0f; // avance nécessaire
+ m_move = 1.0f; // avance n�cessaire
}
else if ( other != 0 && oDist < fDist )
{
@@ -430,7 +444,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
m_targetPos = oPos;
m_angle = oAngle;
m_height = oHeight;
- m_move = 1.0f; // avance nécessaire
+ m_move = 1.0f; // avance n�cessaire
m_arm = TMA_OTHER;
}
else
@@ -446,7 +460,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
return ERR_MANIP_NIL;
}
m_angle += PI;
- m_move = -1.0f; // recule nécessaire
+ m_move = -1.0f; // recule n�cessaire
}
if ( m_arm == TMA_POWER )
{
@@ -464,7 +478,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
m_targetPos = oPos;
m_angle = oAngle;
m_height = oHeight;
- m_move = 1.0f; // avance nécessaire
+ m_move = 1.0f; // avance n�cessaire
m_arm = TMA_OTHER;
}
else
@@ -488,7 +502,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
if ( len < 0.0f ) len = 0.0f;
if ( m_arm == TMA_FBACK ) len = -len;
m_advanceLength = dist-m_physics->RetLinLength(len);
- if ( dist <= m_advanceLength+0.2f ) m_move = 0.0f; // pas nécessaire d'avancer
+ if ( dist <= m_advanceLength+0.2f ) m_move = 0.0f; // pas n�cessaire d'avancer
if ( m_energy == 0.0f ) m_move = 0.0f;
@@ -504,19 +518,19 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
}
else
{
- m_hand = TMH_CLOSE; // pince fermée
+ m_hand = TMH_CLOSE; // pince ferm�e
}
InitAngle();
if ( iAngle == m_angle || m_energy == 0.0f )
{
- m_bTurn = FALSE; // rotation préliminaire inutile
+ m_bTurn = FALSE; // rotation pr�liminaire inutile
SoundManip(1.0f/m_speed);
}
else
{
- m_bTurn = TRUE; // rotation préliminaire nécessaire
+ m_bTurn = TRUE; // rotation pr�liminaire n�cessaire
}
if ( m_bSubm )
@@ -530,7 +544,7 @@ Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskManip::IsEnded()
{
@@ -547,14 +561,14 @@ Error CTaskManip::IsEnded()
return ERR_STOP;
}
- if ( m_bTurn ) // rotation préliminaire ?
+ if ( m_bTurn ) // rotation pr�liminaire ?
{
angle = m_object->RetAngleY(0);
angle = NormAngle(angle); // 0..2*PI
if ( TestAngle(angle, m_angle-PI*0.01f, m_angle+PI*0.01f) )
{
- m_bTurn = FALSE; // rotation terminée
+ m_bTurn = FALSE; // rotation termin�e
m_physics->SetMotorSpeedZ(0.0f);
if ( m_move == 0.0f )
{
@@ -564,7 +578,7 @@ Error CTaskManip::IsEnded()
return ERR_CONTINUE;
}
- if ( m_move != 0.0f ) // avance préliminaire ?
+ if ( m_move != 0.0f ) // avance pr�liminaire ?
{
if ( m_timeLimit <= 0.0f )
{
@@ -572,7 +586,7 @@ Error CTaskManip::IsEnded()
dist = Length(m_object->RetPosition(0), m_targetPos);
if ( dist <= m_advanceLength + 2.0f )
{
- m_move = 0.0f; // avance terminée
+ m_move = 0.0f; // avance termin�e
m_physics->SetMotorSpeedX(0.0f);
SoundManip(1.0f/m_speed);
return ERR_CONTINUE;
@@ -580,7 +594,7 @@ Error CTaskManip::IsEnded()
else
{
//EOK 1.9
- m_move = 0.0f; // avance terminée
+ m_move = 0.0f; // avance termin�e
m_physics->SetMotorSpeedX(0.0f); // stoppe
Abort();
return ERR_STOP;
@@ -590,7 +604,7 @@ Error CTaskManip::IsEnded()
dist = Length(m_object->RetPosition(0), m_targetPos);
if ( dist <= m_advanceLength )
{
- m_move = 0.0f; // avance terminée
+ m_move = 0.0f; // avance termin�e
m_physics->SetMotorSpeedX(0.0f);
SoundManip(1.0f/m_speed);
}
@@ -625,7 +639,7 @@ Error CTaskManip::IsEnded()
if ( !TruckTakeObject() &&
m_object->RetFret() == 0 )
{
- m_hand = TMH_OPEN; // réouvre la pince
+ m_hand = TMH_OPEN; // r�ouvre la pince
m_arm = TMA_NEUTRAL;
InitAngle();
SoundManip(1.0f/m_speed, 0.8f, 1.5f);
@@ -666,7 +680,7 @@ Error CTaskManip::IsEnded()
{
m_main->ShowDropZone(fret, m_object); // montre zone constructible
}
- m_hand = TMH_OPEN; // ouvre la pince pour déposer
+ m_hand = TMH_OPEN; // ouvre la pince pour d�poser
SoundManip(1.0f/m_speed, 0.8f, 1.5f);
}
InitAngle();
@@ -699,7 +713,7 @@ BOOL CTaskManip::Abort()
}
else
{
- m_hand = TMH_CLOSE; // pince fermée
+ m_hand = TMH_CLOSE; // pince ferm�e
m_arm = TMA_STOCK;
}
InitAngle();
@@ -718,7 +732,7 @@ BOOL CTaskManip::Abort()
}
-// Cherche l'objet à prendre dessous (pour l'abeille).
+// Cherche l'objet � prendre dessous (pour l'abeille).
CObject* CTaskManip::SearchTakeUnderObject(D3DVECTOR &pos, float dLimit)
{
@@ -753,7 +767,7 @@ CObject* CTaskManip::SearchTakeUnderObject(D3DVECTOR &pos, float dLimit)
type != OBJECT_KEYd &&
type != OBJECT_TNT ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj->RetLock() ) continue;
if ( pObj->RetZoomY(0) != 1.0f ) continue;
@@ -773,7 +787,7 @@ CObject* CTaskManip::SearchTakeUnderObject(D3DVECTOR &pos, float dLimit)
return pBest;
}
-// Cherche l'objet à prendre devant.
+// Cherche l'objet � prendre devant.
CObject* CTaskManip::SearchTakeFrontObject(BOOL bAdvance, D3DVECTOR &pos,
float &distance, float &angle)
@@ -829,7 +843,7 @@ CObject* CTaskManip::SearchTakeFrontObject(BOOL bAdvance, D3DVECTOR &pos,
type != OBJECT_SCRAP4 &&
type != OBJECT_SCRAP5 ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj->RetLock() ) continue;
if ( pObj->RetZoomY(0) != 1.0f ) continue;
@@ -865,7 +879,7 @@ CObject* CTaskManip::SearchTakeFrontObject(BOOL bAdvance, D3DVECTOR &pos,
return pBest;
}
-// Cherche l'objet à prendre derrière.
+// Cherche l'objet � prendre derri�re.
CObject* CTaskManip::SearchTakeBackObject(BOOL bAdvance, D3DVECTOR &pos,
float &distance, float &angle)
@@ -920,7 +934,7 @@ CObject* CTaskManip::SearchTakeBackObject(BOOL bAdvance, D3DVECTOR &pos,
type != OBJECT_SCRAP4 &&
type != OBJECT_SCRAP5 ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj->RetLock() ) continue;
if ( pObj->RetZoomY(0) != 1.0f ) continue;
@@ -956,7 +970,7 @@ CObject* CTaskManip::SearchTakeBackObject(BOOL bAdvance, D3DVECTOR &pos,
return pBest;
}
-// Cherche le robot ou le bâtiment sur lequel on veut prendre ou poser
+// Cherche le robot ou le b�timent sur lequel on veut prendre ou poser
// une pile ou un autre objet.
CObject* CTaskManip::SearchOtherObject(BOOL bAdvance, D3DVECTOR &pos,
@@ -997,7 +1011,7 @@ CObject* CTaskManip::SearchOtherObject(BOOL bAdvance, D3DVECTOR &pos,
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- if ( pObj == m_object ) continue; // soi-même ?
+ if ( pObj == m_object ) continue; // soi-m�me ?
type = pObj->RetType();
if ( type != OBJECT_MOBILEfa &&
@@ -1068,7 +1082,7 @@ CObject* CTaskManip::SearchOtherObject(BOOL bAdvance, D3DVECTOR &pos,
else
{
oLimit = 45.0f*PI/180.0f;
- oAngle += PI; // c'est derrière
+ oAngle += PI; // c'est derri�re
}
oAngle = NormAngle(oAngle); // 0..2*PI
angle = RotateAngle(iPos.x-oPos.x, oPos.z-iPos.z); // CW !
@@ -1093,7 +1107,7 @@ CObject* CTaskManip::SearchOtherObject(BOOL bAdvance, D3DVECTOR &pos,
return 0;
}
-// Prend l'objet placé devant.
+// Prend l'objet plac� devant.
BOOL CTaskManip::TruckTakeObject()
{
@@ -1103,10 +1117,10 @@ BOOL CTaskManip::TruckTakeObject()
D3DVECTOR pos;
float angle, dist;
- if ( m_arm == TMA_GRAB ) // prend immédiatement ?
+ if ( m_arm == TMA_GRAB ) // prend imm�diatement ?
{
fret = m_object->RetFret();
- if ( fret == 0 ) return FALSE; // rien à prendre ?
+ if ( fret == 0 ) return FALSE; // rien � prendre ?
m_fretType = fret->RetType();
if ( m_object->RetType() == OBJECT_HUMAN ||
@@ -1136,7 +1150,7 @@ BOOL CTaskManip::TruckTakeObject()
fret->SetTruck(m_object);
fret->SetTruckPart(3); // prend avec la main
- pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif à la main (lem4)
+ pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif � la main (lem4)
fret->SetPosition(0, pos);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, PI/2.0f);
@@ -1149,7 +1163,7 @@ BOOL CTaskManip::TruckTakeObject()
if ( m_arm == TMA_FFRONT ) // prend au sol devant ?
{
fret = SearchTakeFrontObject(FALSE, pos, dist, angle);
- if ( fret == 0 ) return FALSE; // rien à prendre ?
+ if ( fret == 0 ) return FALSE; // rien � prendre ?
m_fretType = fret->RetType();
if ( m_bSubm )
@@ -1168,7 +1182,7 @@ BOOL CTaskManip::TruckTakeObject()
fret->SetTruck(m_object);
fret->SetTruckPart(3); // prend avec la main
- pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif à la main (lem4)
+ pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif � la main (lem4)
fret->SetPosition(0, pos);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, PI/2.0f);
@@ -1178,16 +1192,16 @@ BOOL CTaskManip::TruckTakeObject()
m_object->SetFret(fret); // prend
}
- if ( m_arm == TMA_FBACK ) // prend au sol derrière ?
+ if ( m_arm == TMA_FBACK ) // prend au sol derri�re ?
{
fret = SearchTakeBackObject(FALSE, pos, dist, angle);
- if ( fret == 0 ) return FALSE; // rien à prendre ?
+ if ( fret == 0 ) return FALSE; // rien � prendre ?
m_fretType = fret->RetType();
fret->SetTruck(m_object);
fret->SetTruckPart(3); // prend avec la main
- pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif à la main (lem4)
+ pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif � la main (lem4)
fret->SetPosition(0, pos);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, PI/2.0f);
@@ -1196,13 +1210,13 @@ BOOL CTaskManip::TruckTakeObject()
m_object->SetFret(fret); // prend
}
- if ( m_arm == TMA_POWER ) // prend pile à l'arrière ?
+ if ( m_arm == TMA_POWER ) // prend pile � l'arri�re ?
{
fret = m_object->RetPower();
if ( fret == 0 ) return FALSE; // pas de pile ?
m_fretType = fret->RetType();
- pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif à la main (lem4)
+ pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif � la main (lem4)
fret->SetPosition(0, pos);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, PI/2.0f);
@@ -1226,7 +1240,7 @@ BOOL CTaskManip::TruckTakeObject()
fret->SetTruck(m_object);
fret->SetTruckPart(3); // prend avec la main
- pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif à la main (lem4)
+ pos = D3DVECTOR(4.7f, 0.0f, 0.0f); // relatif � la main (lem4)
fret->SetPosition(0, pos);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, PI/2.0f);
@@ -1238,7 +1252,7 @@ BOOL CTaskManip::TruckTakeObject()
return TRUE;
}
-// Dépose l'objet pris.
+// D�pose l'objet pris.
BOOL CTaskManip::TruckDeposeObject()
{
@@ -1249,7 +1263,7 @@ BOOL CTaskManip::TruckDeposeObject()
D3DVECTOR pos;
float angle, dist;
- if ( m_arm == TMA_FFRONT ) // dépose au sol devant ?
+ if ( m_arm == TMA_FFRONT ) // d�pose au sol devant ?
{
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE; // ne porte rien ?
@@ -1265,10 +1279,10 @@ BOOL CTaskManip::TruckDeposeObject()
fret->FloorAdjust(); // plaque bien au sol
fret->SetTruck(0);
- m_object->SetFret(0); // dépose
+ m_object->SetFret(0); // d�pose
}
- if ( m_arm == TMA_FBACK ) // dépose au sol derrière ?
+ if ( m_arm == TMA_FBACK ) // d�pose au sol derri�re ?
{
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE; // ne porte rien ?
@@ -1283,10 +1297,10 @@ BOOL CTaskManip::TruckDeposeObject()
fret->SetAngleZ(0, 0.0f);
fret->SetTruck(0);
- m_object->SetFret(0); // dépose
+ m_object->SetFret(0); // d�pose
}
- if ( m_arm == TMA_POWER ) // dépose pile à l'arrière ?
+ if ( m_arm == TMA_POWER ) // d�pose pile � l'arri�re ?
{
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE; // ne porte rien ?
@@ -1295,7 +1309,7 @@ BOOL CTaskManip::TruckDeposeObject()
if ( m_object->RetPower() != 0 ) return FALSE;
fret->SetTruck(m_object);
- fret->SetTruckPart(0); // porté par la base
+ fret->SetTruckPart(0); // port� par la base
character = m_object->RetCharacter();
fret->SetPosition(0, character->posPower);
@@ -1307,13 +1321,13 @@ BOOL CTaskManip::TruckDeposeObject()
m_object->SetFret(0);
}
- if ( m_arm == TMA_OTHER ) // dépose pile sur amis ?
+ if ( m_arm == TMA_OTHER ) // d�pose pile sur amis ?
{
other = SearchOtherObject(FALSE, pos, dist, angle, m_height);
if ( other == 0 ) return FALSE;
fret = other->RetPower();
- if ( fret != 0 ) return FALSE; // l'autre a déjà une pile ?
+ if ( fret != 0 ) return FALSE; // l'autre a d�j� une pile ?
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE;
@@ -1327,15 +1341,15 @@ BOOL CTaskManip::TruckDeposeObject()
fret->SetAngleY(0, 0.0f);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, 0.0f);
- fret->SetTruckPart(0); // porté par la base
+ fret->SetTruckPart(0); // port� par la base
- m_object->SetFret(0); // dépose
+ m_object->SetFret(0); // d�pose
}
return TRUE;
}
-// Cherche si un emplacement permet de déposer un objet.
+// Cherche si un emplacement permet de d�poser un objet.
BOOL CTaskManip::IsFreeDeposeObject(D3DVECTOR pos)
{
@@ -1355,14 +1369,14 @@ BOOL CTaskManip::IsFreeDeposeObject(D3DVECTOR pos)
if ( pObj == m_object ) continue;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
{
if ( Length(iPos, oPos)-(oRadius+1.0f) < 2.0f )
{
- return FALSE; // emplacement occupé
+ return FALSE; // emplacement occup�
}
}
}
diff --git a/src/taskmanip.h b/src/taskmanip.h
index 9067235..b3af30e 100644
--- a/src/taskmanip.h
+++ b/src/taskmanip.h
@@ -1,4 +1,18 @@
-// taskmanip.h
+// * 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 .
#ifndef _TASKMANIP_H_
#define _TASKMANIP_H_
@@ -14,9 +28,9 @@ class CObject;
enum TaskManipOrder
{
- TMO_AUTO = 0, // prend ou dépose automatique
+ TMO_AUTO = 0, // prend ou d�pose automatique
TMO_GRAB = 1, // prend un objet
- TMO_DROP = 2, // dépose l'objet
+ TMO_DROP = 2, // d�pose l'objet
};
enum TaskManipArm
@@ -24,16 +38,16 @@ enum TaskManipArm
TMA_NEUTRAL = 1, // bras vide au repos
TMA_STOCK = 2, // bras plein au repos
TMA_FFRONT = 3, // bras au sol
- TMA_FBACK = 4, // bras derrière le robot
- TMA_POWER = 5, // bras derrière le robot
- TMA_OTHER = 6, // bras derrière un robot amis
- TMA_GRAB = 7, // prend immédiatement
+ TMA_FBACK = 4, // bras derri�re le robot
+ TMA_POWER = 5, // bras derri�re le robot
+ TMA_OTHER = 6, // bras derri�re un robot amis
+ TMA_GRAB = 7, // prend imm�diatement
};
enum TaskManipHand
{
TMH_OPEN = 1, // pince ouverte
- TMH_CLOSE = 2, // pince fermée
+ TMH_CLOSE = 2, // pince ferm�e
};
diff --git a/src/taskpen.cpp b/src/taskpen.cpp
index 49f2faf..c7ee59d 100644
--- a/src/taskpen.cpp
+++ b/src/taskpen.cpp
@@ -1,4 +1,18 @@
-// taskpen.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
@@ -42,7 +56,7 @@ CTaskPen::~CTaskPen()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskPen::EventProcess(const Event &event)
{
@@ -60,7 +74,7 @@ BOOL CTaskPen::EventProcess(const Event &event)
}
else
{
- m_progress += event.rTime*(1.0f/m_delay); // ça avance
+ m_progress += event.rTime*(1.0f/m_delay); // �a avance
if ( m_progress > 1.0f ) m_progress = 1.0f;
}
@@ -128,7 +142,7 @@ BOOL CTaskPen::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskPen::Start(BOOL bDown, int color)
{
@@ -137,7 +151,7 @@ Error CTaskPen::Start(BOOL bDown, int color)
ObjectType type;
int i;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
type = m_object->RetType();
if ( type != OBJECT_MOBILEdr ) return ERR_FIRE_VEH;
@@ -190,7 +204,7 @@ Error CTaskPen::Start(BOOL bDown, int color)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskPen::IsEnded()
{
@@ -251,7 +265,7 @@ void CTaskPen::SoundManip(float time, float amplitude, float frequency)
}
-// Conversion d'un angle en numéro de crayon.
+// Conversion d'un angle en num�ro de crayon.
int CTaskPen::AngleToRank(float angle)
{
@@ -268,7 +282,7 @@ float CTaskPen::ColorToAngle(int color)
return -45.0f*PI/180.0f*ColorToRank(color);
}
-// Conversion d'une couleur en numéro de crayon (0..7).
+// Conversion d'une couleur en num�ro de crayon (0..7).
int CTaskPen::ColorToRank(int color)
{
diff --git a/src/taskpen.h b/src/taskpen.h
index 35740a6..21b013f 100644
--- a/src/taskpen.h
+++ b/src/taskpen.h
@@ -1,4 +1,18 @@
-// taskpen.h
+// * 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 .
#ifndef _TASKSPEN_H_
#define _TASKSPEN_H_
diff --git a/src/taskrecover.cpp b/src/taskrecover.cpp
index ce06669..197ddf6 100644
--- a/src/taskrecover.cpp
+++ b/src/taskrecover.cpp
@@ -1,4 +1,18 @@
-// taskrecover.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
@@ -24,7 +38,7 @@
#include "taskrecover.h"
-#define ENERGY_RECOVER 0.25f // énergie consommée par récupération
+#define ENERGY_RECOVER 0.25f // �nergie consomm�e par r�cup�ration
#define RECOVER_DIST 11.8f
@@ -47,7 +61,7 @@ CTaskRecover::~CTaskRecover()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskRecover::EventProcess(const Event &event)
{
@@ -60,7 +74,7 @@ BOOL CTaskRecover::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- if ( m_phase == TRP_TURN ) // rotation préliminaire ?
+ if ( m_phase == TRP_TURN ) // rotation pr�liminaire ?
{
a = m_object->RetAngleY(0);
g = m_angle;
@@ -68,11 +82,11 @@ BOOL CTaskRecover::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
return TRUE;
}
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_time += event.rTime;
if ( m_phase == TRP_DOWN )
@@ -86,7 +100,7 @@ BOOL CTaskRecover::EventProcess(const Event &event)
m_object->SetAngleZ(5, angle);
}
- if ( m_phase == TRP_MOVE ) // avance/recule préliminaire ?
+ if ( m_phase == TRP_MOVE ) // avance/recule pr�liminaire ?
{
dist = Length(m_object->RetPosition(0), m_ruin->RetPosition(0));
linSpeed = 0.0f;
@@ -166,7 +180,7 @@ BOOL CTaskRecover::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskRecover::Start()
{
@@ -177,7 +191,7 @@ Error CTaskRecover::Start()
ObjectType type;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() ) return ERR_RECOVER_VEH;
type = m_object->RetType();
@@ -215,7 +229,7 @@ Error CTaskRecover::Start()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskRecover::IsEnded()
{
@@ -228,7 +242,7 @@ Error CTaskRecover::IsEnded()
if ( m_engine->RetPause() ) return ERR_CONTINUE;
if ( m_bError ) return ERR_STOP;
- if ( m_phase == TRP_TURN ) // rotation préliminaire ?
+ if ( m_phase == TRP_TURN ) // rotation pr�liminaire ?
{
angle = m_object->RetAngleY(0);
angle = NormAngle(angle); // 0..2*PI
@@ -254,7 +268,7 @@ Error CTaskRecover::IsEnded()
return ERR_CONTINUE;
}
- if ( m_phase == TRP_MOVE ) // avance préliminaire ?
+ if ( m_phase == TRP_MOVE ) // avance pr�liminaire ?
{
dist = Length(m_object->RetPosition(0), m_ruin->RetPosition(0));
@@ -305,7 +319,7 @@ Error CTaskRecover::IsEnded()
m_displayText->DisplayError(ERR_TOOMANY, m_object);
return ERR_STOP;
}
- m_metal->SetLock(TRUE); // métal pas encore utilisable
+ m_metal->SetLock(TRUE); // m�tal pas encore utilisable
m_metal->SetZoom(0, 0.0f);
mat = m_object->RetWorldMatrix(0);
@@ -330,7 +344,7 @@ Error CTaskRecover::IsEnded()
{
m_metal->SetZoom(0, 1.0f);
- m_ruin->DeleteObject(); // détruit la ruine
+ m_ruin->DeleteObject(); // d�truit la ruine
delete m_ruin;
m_ruin = 0;
@@ -346,7 +360,7 @@ Error CTaskRecover::IsEnded()
return ERR_CONTINUE;
}
- m_metal->SetLock(FALSE); // métal utilisable
+ m_metal->SetLock(FALSE); // m�tal utilisable
Abort();
return ERR_STOP;
@@ -373,7 +387,7 @@ BOOL CTaskRecover::Abort()
}
-// Cherche si un ruine est devant le véhicule.
+// Cherche si un ruine est devant le v�hicule.
CObject* CTaskRecover::SearchRuin()
{
@@ -396,7 +410,7 @@ CObject* CTaskRecover::SearchRuin()
type == OBJECT_RUINmobilet1 ||
type == OBJECT_RUINmobilet2 ||
type == OBJECT_RUINmobiler1 ||
- type == OBJECT_RUINmobiler2 ) // véhicule en ruine ?
+ type == OBJECT_RUINmobiler2 ) // v�hicule en ruine ?
{
oPos = pObj->RetPosition(0);
dist = Length(oPos, m_recoverPos);
diff --git a/src/taskrecover.h b/src/taskrecover.h
index bc14d00..f3ffac6 100644
--- a/src/taskrecover.h
+++ b/src/taskrecover.h
@@ -1,4 +1,18 @@
-// taskrecover.h
+// * 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 .
#ifndef _TASKSRECOVER_H_
#define _TASKSRECOVER_H_
@@ -17,7 +31,7 @@ enum TaskRecoverPhase
TRP_TURN = 1, // tourne
TRP_MOVE = 2, // avance
TRP_DOWN = 3, // descend
- TRP_OPER = 4, // opère
+ TRP_OPER = 4, // op�re
TRP_UP = 5, // remonte
};
diff --git a/src/taskreset.cpp b/src/taskreset.cpp
index 0d4aa28..ee6e797 100644
--- a/src/taskreset.cpp
+++ b/src/taskreset.cpp
@@ -1,4 +1,18 @@
-// taskreset.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
@@ -46,7 +60,7 @@ CTaskReset::~CTaskReset()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskReset::EventProcess(const Event &event)
{
@@ -64,7 +78,7 @@ BOOL CTaskReset::EventProcess(const Event &event)
if ( m_phase == TRSP_ZOUT )
{
angle = m_iAngle;
- angle += powf(m_progress*5.0f, 2.0f); // accélère
+ angle += powf(m_progress*5.0f, 2.0f); // acc�l�re
m_object->SetAngleY(0, angle);
m_object->SetZoom(0, 1.0f-m_progress);
@@ -159,8 +173,8 @@ BOOL CTaskReset::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
-// Un angle positif effectue un virage à droite.
+// Assigne le but � atteindre.
+// Un angle positif effectue un virage � droite.
Error CTaskReset::Start(D3DVECTOR goal, D3DVECTOR angle)
{
@@ -188,7 +202,7 @@ Error CTaskReset::Start(D3DVECTOR goal, D3DVECTOR angle)
m_goal = goal;
m_angle = angle;
- if ( SearchVehicle() ) // emplacement de départ occupé ?
+ if ( SearchVehicle() ) // emplacement de d�part occup� ?
{
m_bError = TRUE;
return ERR_RESET_NEAR;
@@ -210,7 +224,7 @@ Error CTaskReset::Start(D3DVECTOR goal, D3DVECTOR angle)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskReset::IsEnded()
{
@@ -265,7 +279,7 @@ Error CTaskReset::IsEnded()
}
-// Cherche si un véhicule est trop proche.
+// Cherche si un v�hicule est trop proche.
BOOL CTaskReset::SearchVehicle()
{
diff --git a/src/taskreset.h b/src/taskreset.h
index fa80a40..27f0454 100644
--- a/src/taskreset.h
+++ b/src/taskreset.h
@@ -1,4 +1,18 @@
-// taskreset.h
+// * 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 .
#ifndef _TASKRESET_H_
#define _TASKRESET_H_
@@ -14,9 +28,9 @@ class CObject;
enum TaskResetPhase
{
- TRSP_ZOUT = 1, // disparaît
- TRSP_MOVE = 2, // déplace
- TRSP_ZIN = 3, // réapparaît
+ TRSP_ZOUT = 1, // dispara�t
+ TRSP_MOVE = 2, // d�place
+ TRSP_ZIN = 3, // r�appara�t
};
@@ -45,7 +59,7 @@ protected:
float m_time;
float m_speed;
float m_progress;
- float m_lastParticule; // temps génération dernière particule
+ float m_lastParticule; // temps g�n�ration derni�re particule
float m_iAngle;
};
diff --git a/src/tasksearch.cpp b/src/tasksearch.cpp
index f4b65b5..5b9fa36 100644
--- a/src/tasksearch.cpp
+++ b/src/tasksearch.cpp
@@ -1,4 +1,18 @@
-// tasksearch.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
@@ -43,7 +57,7 @@ CTaskSearch::~CTaskSearch()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskSearch::EventProcess(const Event &event)
{
@@ -57,7 +71,7 @@ BOOL CTaskSearch::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_time += event.rTime;
if ( m_phase == TSP_DOWN ||
@@ -118,7 +132,7 @@ void CTaskSearch::InitAngle()
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskSearch::Start()
{
@@ -161,7 +175,7 @@ Error CTaskSearch::Start()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskSearch::IsEnded()
{
@@ -222,7 +236,7 @@ BOOL CTaskSearch::Abort()
}
-// Crée une marque si c'est possible.
+// Cr�e une marque si c'est possible.
BOOL CTaskSearch::CreateMark()
{
@@ -293,7 +307,7 @@ BOOL CTaskSearch::CreateMark()
return TRUE;
}
-// Détruit les marques d'un type donné..
+// D�truit les marques d'un type donn�..
void CTaskSearch::DeleteMark(ObjectType type)
{
diff --git a/src/tasksearch.h b/src/tasksearch.h
index 3d6cca5..44547f2 100644
--- a/src/tasksearch.h
+++ b/src/tasksearch.h
@@ -1,4 +1,18 @@
-// tasksearch.h
+// * 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 .
#ifndef _TASKSEARCH_H_
#define _TASKSEARCH_H_
diff --git a/src/taskshield.cpp b/src/taskshield.cpp
index 3ae44c8..f12c046 100644
--- a/src/taskshield.cpp
+++ b/src/taskshield.cpp
@@ -1,4 +1,18 @@
-// taskshield.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
@@ -24,7 +38,7 @@
#include "taskshield.h"
-#define ENERGY_TIME 20.0f // durée maximale si pile pleine
+#define ENERGY_TIME 20.0f // dur�e maximale si pile pleine
@@ -48,7 +62,7 @@ CTaskShield::~CTaskShield()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskShield::EventProcess(const Event &event)
{
@@ -64,13 +78,13 @@ BOOL CTaskShield::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_time += event.rTime;
m_delay -= event.rTime;
mat = m_object->RetWorldMatrix(0);
pos = D3DVECTOR(7.0f, 15.0f, 0.0f);
- pos = Transform(*mat, pos); // position sphère
+ pos = Transform(*mat, pos); // position sph�re
m_shieldPos = pos;
if ( m_rankSphere != -1 )
@@ -219,8 +233,8 @@ BOOL CTaskShield::EventProcess(const Event &event)
}
-// Déploie le bouclier.
-// Le délai n'est utile qu'avec TSM_UP !
+// D�ploie le bouclier.
+// Le d�lai n'est utile qu'avec TSM_UP !
Error CTaskShield::Start(TaskShieldMode mode, float delay)
{
@@ -247,7 +261,7 @@ Error CTaskShield::Start(TaskShieldMode mode, float delay)
type = m_object->RetType();
if ( type != OBJECT_MOBILErs ) return ERR_SHIELD_VEH;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() ) return ERR_SHIELD_VEH;
power = m_object->RetPower();
@@ -257,7 +271,7 @@ Error CTaskShield::Start(TaskShieldMode mode, float delay)
mat = m_object->RetWorldMatrix(0);
pos = D3DVECTOR(7.0f, 15.0f, 0.0f);
- pos = Transform(*mat, pos); // position sphère
+ pos = Transform(*mat, pos); // position sph�re
m_shieldPos = pos;
m_sound->Play(SOUND_PSHHH2, m_shieldPos, 1.0f, 0.7f);
@@ -323,7 +337,7 @@ Error CTaskShield::Stop()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskShield::IsEnded()
{
@@ -474,7 +488,7 @@ BOOL CTaskShield::Abort()
}
-// Crée la lumière pour accompagner un effet pyrotechnique.
+// Cr�e la lumi�re pour accompagner un effet pyrotechnique.
BOOL CTaskShield::CreateLight(D3DVECTOR pos)
{
@@ -511,7 +525,7 @@ BOOL CTaskShield::CreateLight(D3DVECTOR pos)
}
-// Répare le bouclier des objets dans la sphère du bouclier.
+// R�pare le bouclier des objets dans la sph�re du bouclier.
void CTaskShield::IncreaseShield()
{
diff --git a/src/taskshield.h b/src/taskshield.h
index e6bfd0c..85bbc5d 100644
--- a/src/taskshield.h
+++ b/src/taskshield.h
@@ -1,4 +1,18 @@
-// taskshield.h
+// * 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 .
#ifndef _TASKSHIELD_H_
#define _TASKSHIELD_H_
@@ -11,15 +25,15 @@ class CPhysics;
class CObject;
-#define RADIUS_SHIELD_MIN 40.0f // rayon min de la zone protégée
-#define RADIUS_SHIELD_MAX 100.0f // rayon max de la zone protégée
+#define RADIUS_SHIELD_MIN 40.0f // rayon min de la zone prot�g�e
+#define RADIUS_SHIELD_MAX 100.0f // rayon max de la zone prot�g�e
enum TaskShieldPhase
{
TS_UP1 = 1, // monte
TS_UP2 = 2, // monte
- TS_SHIELD = 3, // bouclier déployé
+ TS_SHIELD = 3, // bouclier d�ploy�
TS_SMOKE = 4, // fume
TS_DOWN1 = 5, // descend
TS_DOWN2 = 6, // descend
@@ -27,7 +41,7 @@ enum TaskShieldPhase
enum TaskShieldMode
{
- TSM_UP = 1, // déploie le bouclier
+ TSM_UP = 1, // d�ploie le bouclier
TSM_DOWN = 2, // rentre le bouclier
TSM_UPDATE = 3, // changement de rayon
};
diff --git a/src/taskspiderexplo.cpp b/src/taskspiderexplo.cpp
index 6a2a322..a1494ac 100644
--- a/src/taskspiderexplo.cpp
+++ b/src/taskspiderexplo.cpp
@@ -1,4 +1,18 @@
-// taskspiderexplo.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
@@ -42,14 +56,14 @@ CTaskSpiderExplo::~CTaskSpiderExplo()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskSpiderExplo::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_bError = TRUE;
@@ -62,7 +76,7 @@ BOOL CTaskSpiderExplo::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskSpiderExplo::Start()
{
@@ -76,7 +90,7 @@ Error CTaskSpiderExplo::Start()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskSpiderExplo::IsEnded()
{
@@ -93,7 +107,7 @@ Error CTaskSpiderExplo::IsEnded()
if ( m_time < 1.0f ) return ERR_CONTINUE;
pyro = new CPyro(m_iMan);
- pyro->Create(PT_SPIDER, m_object); // l'araignée explose (suicide)
+ pyro->Create(PT_SPIDER, m_object); // l'araign�e explose (suicide)
Abort();
return ERR_STOP;
diff --git a/src/taskspiderexplo.h b/src/taskspiderexplo.h
index a934b83..89102c3 100644
--- a/src/taskspiderexplo.h
+++ b/src/taskspiderexplo.h
@@ -1,4 +1,18 @@
-// taskspiderexplo.h
+// * 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 .
#ifndef _TASKSPIDEREXPLO_H_
#define _TASKSPIDEREXPLO_H_
diff --git a/src/tasktake.cpp b/src/tasktake.cpp
index a979a3e..339a749 100644
--- a/src/tasktake.cpp
+++ b/src/tasktake.cpp
@@ -1,4 +1,18 @@
-// tasktake.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
@@ -49,7 +63,7 @@ CTaskTake::~CTaskTake()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskTake::EventProcess(const Event &event)
{
@@ -59,7 +73,7 @@ BOOL CTaskTake::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- if ( m_bTurn ) // rotation préliminaire ?
+ if ( m_bTurn ) // rotation pr�liminaire ?
{
a = m_object->RetAngleY(0);
g = m_angle;
@@ -67,11 +81,11 @@ BOOL CTaskTake::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
return TRUE;
}
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_physics->SetMotorSpeed(D3DVECTOR(0.0f, 0.0f, 0.0f)); // immobile !
@@ -79,7 +93,7 @@ BOOL CTaskTake::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskTake::Start()
{
@@ -96,7 +110,7 @@ Error CTaskTake::Start()
iAngle = NormAngle(iAngle); // 0..2*PI
oAngle = iAngle;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() )
{
pos = m_object->RetPosition(0);
@@ -178,8 +192,8 @@ Error CTaskTake::Start()
}
}
- m_bTurn = TRUE; // rotation préliminaire nécessaire
- m_angle = oAngle; // angle à atteindre
+ m_bTurn = TRUE; // rotation pr�liminaire n�cessaire
+ m_angle = oAngle; // angle � atteindre
m_physics->SetFreeze(TRUE); // on ne bouge plus
@@ -187,7 +201,7 @@ Error CTaskTake::Start()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskTake::IsEnded()
{
@@ -197,14 +211,14 @@ Error CTaskTake::IsEnded()
if ( m_engine->RetPause() ) return ERR_CONTINUE;
if ( m_bError ) return ERR_STOP;
- if ( m_bTurn ) // rotation préliminaire ?
+ if ( m_bTurn ) // rotation pr�liminaire ?
{
angle = m_object->RetAngleY(0);
angle = NormAngle(angle); // 0..2*PI
if ( TestAngle(angle, m_angle-PI*0.01f, m_angle+PI*0.01f) )
{
- m_bTurn = FALSE; // rotation terminée
+ m_bTurn = FALSE; // rotation termin�e
m_physics->SetMotorSpeedZ(0.0f);
if ( m_arm == TTA_FFRONT )
@@ -246,7 +260,7 @@ Error CTaskTake::IsEnded()
m_sound->Play(SOUND_POWEROFF, m_object->RetPosition(0));
}
}
- m_motion->SetAction(MHS_UPRIGHT, 0.4f); // se relève
+ m_motion->SetAction(MHS_UPRIGHT, 0.4f); // se rel�ve
m_progress = 0.0f;
m_speed = 1.0f/0.8f;
m_camera->StopCentering(m_object, 0.8f);
@@ -270,7 +284,7 @@ Error CTaskTake::IsEnded()
{
m_main->ShowDropZone(fret, m_object); // montre zone constructible
}
- m_motion->SetAction(-1); // se relève
+ m_motion->SetAction(-1); // se rel�ve
m_progress = 0.0f;
m_speed = 1.0f/0.4f;
m_camera->StopCentering(m_object, 0.8f);
@@ -293,7 +307,7 @@ BOOL CTaskTake::Abort()
}
-// Cherche l'objet à prendre devant.
+// Cherche l'objet � prendre devant.
CObject* CTaskTake::SearchTakeObject(float &angle,
float dLimit, float aLimit)
@@ -332,7 +346,7 @@ CObject* CTaskTake::SearchTakeObject(float &angle,
type != OBJECT_KEYd &&
type != OBJECT_TNT ) continue;
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
if ( pObj->RetLock() ) continue;
if ( pObj->RetZoomY(0) != 1.0f ) continue;
@@ -382,7 +396,7 @@ CObject* CTaskTake::SearchFriendObject(float &angle,
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- if ( pObj == m_object ) continue; // soi-même ?
+ if ( pObj == m_object ) continue; // soi-m�me ?
type = pObj->RetType();
if ( type != OBJECT_MOBILEfa &&
@@ -448,7 +462,7 @@ CObject* CTaskTake::SearchFriendObject(float &angle,
return 0;
}
-// Prend l'objet placé devant.
+// Prend l'objet plac� devant.
BOOL CTaskTake::TruckTakeObject()
{
@@ -461,7 +475,7 @@ BOOL CTaskTake::TruckTakeObject()
{
//? fret = SearchTakeObject(angle, 1.5f, PI*0.04f);
fret = SearchTakeObject(angle, 1.5f, PI*0.15f); //OK 1.9
- if ( fret == 0 ) return FALSE; // rien à prendre ?
+ if ( fret == 0 ) return FALSE; // rien � prendre ?
m_fretType = fret->RetType();
fret->SetTruck(m_object);
@@ -501,7 +515,7 @@ BOOL CTaskTake::TruckTakeObject()
return TRUE;
}
-// Dépose l'objet pris.
+// D�pose l'objet pris.
BOOL CTaskTake::TruckDeposeObject()
{
@@ -512,7 +526,7 @@ BOOL CTaskTake::TruckDeposeObject()
D3DVECTOR pos;
float angle;
- if ( m_arm == TTA_FFRONT ) // dépose au sol devant ?
+ if ( m_arm == TTA_FFRONT ) // d�pose au sol devant ?
{
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE; // ne porte rien ?
@@ -528,16 +542,16 @@ BOOL CTaskTake::TruckDeposeObject()
fret->FloorAdjust(); // plaque bien au sol
fret->SetTruck(0);
- m_object->SetFret(0); // dépose
+ m_object->SetFret(0); // d�pose
}
- if ( m_arm == TTA_FRIEND ) // dépose pile sur amis ?
+ if ( m_arm == TTA_FRIEND ) // d�pose pile sur amis ?
{
other = SearchFriendObject(angle, 1.5f, PI*0.04f);
if ( other == 0 ) return FALSE;
fret = other->RetPower();
- if ( fret != 0 ) return FALSE; // l'autre a déjà une pile ?
+ if ( fret != 0 ) return FALSE; // l'autre a d�j� une pile ?
fret = m_object->RetFret();
if ( fret == 0 ) return FALSE;
@@ -551,15 +565,15 @@ BOOL CTaskTake::TruckDeposeObject()
fret->SetAngleY(0, 0.0f);
fret->SetAngleX(0, 0.0f);
fret->SetAngleZ(0, 0.0f);
- fret->SetTruckPart(0); // porté par la base
+ fret->SetTruckPart(0); // port� par la base
- m_object->SetFret(0); // dépose
+ m_object->SetFret(0); // d�pose
}
return TRUE;
}
-// Cherche si un emplacement permet de déposer un objet.
+// Cherche si un emplacement permet de d�poser un objet.
BOOL CTaskTake::IsFreeDeposeObject(D3DVECTOR pos)
{
@@ -579,14 +593,14 @@ BOOL CTaskTake::IsFreeDeposeObject(D3DVECTOR pos)
if ( pObj == m_object ) continue;
if ( !pObj->RetActif() ) continue; // inactif ?
- if ( pObj->RetTruck() != 0 ) continue; // objet transporté ?
+ if ( pObj->RetTruck() != 0 ) continue; // objet transport� ?
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
{
if ( Length(iPos, oPos)-(oRadius+1.0f) < 1.0f )
{
- return FALSE; // emplacement occupé
+ return FALSE; // emplacement occup�
}
}
}
diff --git a/src/tasktake.h b/src/tasktake.h
index a721022..0ef81a9 100644
--- a/src/tasktake.h
+++ b/src/tasktake.h
@@ -1,4 +1,18 @@
-// tasktake.h
+// * 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 .
#ifndef _TASKTAKE_H_
#define _TASKTAKE_H_
@@ -15,14 +29,14 @@ class CObject;
enum TaskTakeOrder
{
TTO_TAKE = 1, // prend un objet
- TTO_DEPOSE = 2, // dépose l'objet
+ TTO_DEPOSE = 2, // d�pose l'objet
};
enum TaskTakeArm
{
TTA_NEUTRAL = 1, // bras vide au repos
TTA_FFRONT = 2, // bras au sol
- TTA_FRIEND = 3, // bras derrière un robot amis
+ TTA_FRIEND = 3, // bras derri�re un robot amis
};
diff --git a/src/taskterraform.cpp b/src/taskterraform.cpp
index 835da53..54437dd 100644
--- a/src/taskterraform.cpp
+++ b/src/taskterraform.cpp
@@ -1,4 +1,18 @@
-// taskterraform.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
@@ -28,7 +42,7 @@
#include "taskterraform.h"
-#define ENERGY_TERRA 0.40f // énergie consommée par coup
+#define ENERGY_TERRA 0.40f // �nergie consomm�e par coup
#define ACTION_RADIUS 400.0f
@@ -50,7 +64,7 @@ CTaskTerraform::~CTaskTerraform()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskTerraform::EventProcess(const Event &event)
{
@@ -64,7 +78,7 @@ BOOL CTaskTerraform::EventProcess(const Event &event)
if ( event.event != EVENT_FRAME ) return TRUE;
if ( m_bError ) return FALSE;
- m_progress += event.rTime*m_speed; // ça avance
+ m_progress += event.rTime*m_speed; // �a avance
m_time += event.rTime;
if ( m_phase == TTP_CHARGE )
@@ -192,7 +206,7 @@ BOOL CTaskTerraform::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskTerraform::Start()
{
@@ -203,7 +217,7 @@ Error CTaskTerraform::Start()
ObjectType type;
- m_bError = TRUE; // opération impossible
+ m_bError = TRUE; // op�ration impossible
if ( !m_physics->RetLand() ) return ERR_TERRA_VEH;
type = m_object->RetType();
@@ -238,7 +252,7 @@ Error CTaskTerraform::Start()
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskTerraform::IsEnded()
{
@@ -351,7 +365,7 @@ BOOL CTaskTerraform::Abort()
}
-// Retourne toutes les fourmis et les araignées proches.
+// Retourne toutes les fourmis et les araign�es proches.
BOOL CTaskTerraform::Terraform()
{
diff --git a/src/taskterraform.h b/src/taskterraform.h
index 5da6bb7..961c52a 100644
--- a/src/taskterraform.h
+++ b/src/taskterraform.h
@@ -1,4 +1,18 @@
-// taskterraform.h
+// * 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 .
#ifndef _TASKSTERRAFORM_H_
#define _TASKSTERRAFORM_H_
@@ -14,7 +28,7 @@ class CObject;
enum TaskTerraPhase
{
- TTP_CHARGE = 1, // charge d'énergie
+ TTP_CHARGE = 1, // charge d'�nergie
TTP_DOWN = 2, // descend
TTP_TERRA = 3, // frappe
TTP_UP = 4, // remonte
diff --git a/src/taskturn.cpp b/src/taskturn.cpp
index 1086b8a..e98e21a 100644
--- a/src/taskturn.cpp
+++ b/src/taskturn.cpp
@@ -1,4 +1,18 @@
-// taskturn.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
@@ -38,14 +52,14 @@ CTaskTurn::~CTaskTurn()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskTurn::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
@@ -58,8 +72,8 @@ BOOL CTaskTurn::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
-// Un angle positif effectue un virage à droite.
+// Assigne le but � atteindre.
+// Un angle positif effectue un virage � droite.
Error CTaskTurn::Start(float angle)
{
@@ -69,13 +83,13 @@ Error CTaskTurn::Start(float angle)
if ( angle < 0.0f )
{
m_angle = angle+m_physics->RetCirStopLength();
- m_physics->SetMotorSpeedZ(-1.0f); // tourne à gauche
+ m_physics->SetMotorSpeedZ(-1.0f); // tourne � gauche
m_bLeft = TRUE;
}
else
{
m_angle = angle-m_physics->RetCirStopLength();
- m_physics->SetMotorSpeedZ(1.0f); // tourne à droite
+ m_physics->SetMotorSpeedZ(1.0f); // tourne � droite
m_bLeft = FALSE;
}
m_physics->SetMotorSpeedX(0.0f);
@@ -85,7 +99,7 @@ Error CTaskTurn::Start(float angle)
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskTurn::IsEnded()
{
diff --git a/src/taskturn.h b/src/taskturn.h
index 73ea3ea..3ed234b 100644
--- a/src/taskturn.h
+++ b/src/taskturn.h
@@ -1,4 +1,18 @@
-// taskturn.h
+// * 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 .
#ifndef _TASKTURN_H_
#define _TASKTURN_H_
diff --git a/src/taskwait.cpp b/src/taskwait.cpp
index d884e3c..5d5e317 100644
--- a/src/taskwait.cpp
+++ b/src/taskwait.cpp
@@ -1,4 +1,18 @@
-// taskwait.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
@@ -38,7 +52,7 @@ CTaskWait::~CTaskWait()
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CTaskWait::EventProcess(const Event &event)
{
@@ -51,17 +65,17 @@ BOOL CTaskWait::EventProcess(const Event &event)
}
-// Assigne le but à atteindre.
+// Assigne le but � atteindre.
Error CTaskWait::Start(float time)
{
- m_waitTime = time; // durée à attendre
- m_passTime = 0.0f; // durée écoulée
+ m_waitTime = time; // dur�e � attendre
+ m_passTime = 0.0f; // dur�e �coul�e
m_bEnded = FALSE;
return ERR_OK;
}
-// Indique si l'action est terminée.
+// Indique si l'action est termin�e.
Error CTaskWait::IsEnded()
{
diff --git a/src/taskwait.h b/src/taskwait.h
index 7a1f782..0b0b40f 100644
--- a/src/taskwait.h
+++ b/src/taskwait.h
@@ -1,4 +1,18 @@
-// taskwait.h
+// * 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 .
#ifndef _TASKWAIT_H_
#define _TASKWAIT_H_
diff --git a/src/terrain.cpp b/src/terrain.cpp
index 3d19cac..c87494f 100644
--- a/src/terrain.cpp
+++ b/src/terrain.cpp
@@ -1,4 +1,18 @@
-// terrain.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
@@ -71,14 +85,14 @@ CTerrain::~CTerrain()
}
-// Génère un nouveau terrain plat.
-// Le terrain est composé de mosaïques, elles-mêmes composées
-// de briques. Chaque brique est composée de 2 triangles.
-// mosaic: nombre de mosaïques selon les axes X et Z
+// G�n�re un nouveau terrain plat.
+// Le terrain est compos� de mosa�ques, elles-m�mes compos�es
+// de briques. Chaque brique est compos�e de 2 triangles.
+// mosaic: nombre de mosa�ques selon les axes X et Z
// brick: nombre de briques (puissance de 2)
// size: taille d'une brique selon les axes X et Z
-// vision: vision avant un changement de résolution
-// scaleMapping: échelle pour mapper les textures
+// vision: vision avant un changement de r�solution
+// scaleMapping: �chelle pour mapper les textures
//
// ^ z
// | <---> brick*size
@@ -153,7 +167,7 @@ float CTerrain::RetScaleRelief()
}
-// Initialise les noms des textures à utiliser pour le terrain.
+// Initialise les noms des textures � utiliser pour le terrain.
BOOL CTerrain::InitTextures(char* baseName, int* table, int dx, int dy)
{
@@ -163,7 +177,7 @@ BOOL CTerrain::InitTextures(char* baseName, int* table, int dx, int dy)
m_bLevelText = FALSE;
strcpy(m_texBaseName, baseName);
- p = strchr(m_texBaseName, '.'); // p <- ^début de l'extension
+ p = strchr(m_texBaseName, '.'); // p <- ^d�but de l'extension
if ( p == 0 )
{
strcpy(m_texBaseExt, ".tga");
@@ -195,7 +209,7 @@ void CTerrain::LevelFlush()
LevelCloseTable();
}
-// Initialise les noms des textures à utiliser pour le terrain.
+// Initialise les noms des textures � utiliser pour le terrain.
BOOL CTerrain::LevelMaterial(int id, char* baseName, float u, float v,
int up, int right, int down, int left,
@@ -237,16 +251,16 @@ BOOL CTerrain::LevelMaterial(int id, char* baseName, float u, float v,
// Charge le relief dans un fichier BMP.
-// La taille de l'image doit être de dimension dx et dy,
+// La taille de l'image doit �tre de dimension dx et dy,
// avec dx=dy=(mosaic*brick)+1.
// L'image doit avoir 8 bits/pixels, 256 couleurs avec
// une palette standard.
-// Conversion coordonnée image (x;y) -> world (x;-;z) :
+// Conversion coordonn�e image (x;y) -> world (x;-;z) :
// Wx = 5*Ix-400
// Wz = -(5*Iy-400)
-// Conversion coordonnée world (x;-;z) -> image (x;y) :
+// Conversion coordonn�e world (x;-;z) -> image (x;y) :
// Ix = (400+Wx)/5
// Iy = (400-Wz)/5
@@ -259,7 +273,7 @@ BOOL CTerrain::ResFromBMP(const char* filename)
if ( file == NULL ) return FALSE;
size = (m_mosaic*m_brick)+1;
- sizem = ((size+4-1)/4)*4; // taille multiple de 4 supérieur
+ sizem = ((size+4-1)/4)*4; // taille multiple de 4 sup�rieur
if ( m_resources != 0 )
{
@@ -297,7 +311,7 @@ TerrainRes CTerrain::RetResource(const D3DVECTOR &p)
y < 0 || y > m_mosaic*m_brick ) return TR_NULL;
size = (m_mosaic*m_brick)+1;
- sizem = ((size+4-1)/4)*4; // taille multiple de 4 supérieur
+ sizem = ((size+4-1)/4)*4; // taille multiple de 4 sup�rieur
ress = m_resources[BMPHEAD+x+sizem*y];
if ( ress == 5 ) return TR_STONE; // rouge ?
@@ -321,17 +335,17 @@ void CTerrain::FlushRelief()
}
// Charge le relief dans un fichier BMP.
-// La taille de l'image doit être de dimension dx et dy,
+// La taille de l'image doit �tre de dimension dx et dy,
// avec dx=dy=(mosaic*brick)+1.
// L'image doit avoir 8 bits/pixels, 256 niveaux de gris :
// blanc = sol (y=0)
// noir = montagne (y=255*scaleRelief)
-// Conversion coordonnée image (x;y) -> world (x;-;z) :
+// Conversion coordonn�e image (x;y) -> world (x;-;z) :
// Wx = 5*Ix-400
// Wz = -(5*Iy-400)
-// Conversion coordonnée world (x;-;z) -> image (x;y) :
+// Conversion coordonn�e world (x;-;z) -> image (x;y) :
// Ix = (400+Wx)/5
// Iy = (400-Wz)/5
@@ -349,7 +363,7 @@ BOOL CTerrain::ReliefFromBMP(const char* filename, float scaleRelief,
if ( file == NULL ) return FALSE;
size = (m_mosaic*m_brick)+1;
- sizem = ((size+4-1)/4)*4; // taille multiple de 4 supérieur
+ sizem = ((size+4-1)/4)*4; // taille multiple de 4 sup�rieur
buffer = (unsigned char*)malloc(BMPHEAD+sizem*size);
fread(buffer, BMPHEAD+sizem*size, 1, file);
@@ -389,7 +403,7 @@ BOOL CTerrain::ReliefFromBMP(const char* filename, float scaleRelief,
return TRUE;
}
-// Ajoute un point d'élévation dans le buffer du relief.
+// Ajoute un point d'�l�vation dans le buffer du relief.
BOOL CTerrain::ReliefAddDot(D3DVECTOR pos, float scaleRelief)
{
@@ -550,7 +564,7 @@ BOOL CTerrain::ReliefFromDXF(const char* filename, float scaleRelief)
}
-// Ajuste une position pour qu'elle ne dépasse pas les limites.
+// Ajuste une position pour qu'elle ne d�passe pas les limites.
void CTerrain::LimitPos(D3DVECTOR &pos)
{
@@ -569,8 +583,8 @@ void CTerrain::LimitPos(D3DVECTOR &pos)
}
-// Ajuste les bords de chaque mosaïque pour être compatible
-// avec toutes les résolutions inférieures.
+// Ajuste les bords de chaque mosa�que pour �tre compatible
+// avec toutes les r�solutions inf�rieures.
void CTerrain::AdjustRelief()
{
@@ -735,8 +749,8 @@ D3DVERTEX2 CTerrain::RetVertex(int x, int y, int step)
return v;
}
-// Crée tous les objets d'une mosaïque.
-// L'origine d'une mosaïque est son centre.
+// Cr�e tous les objets d'une mosa�que.
+// L'origine d'une mosa�que est son centre.
//
// ^ z
// |
@@ -920,12 +934,12 @@ BOOL CTerrain::CreateMosaic(int ox, int oy, int step, int objRank,
// | | | |
// 0.0 min max 1.0
//
-// Les coordonnées u-v utilisées pour le texturage sont comprises
+// Les coordonn�es u-v utilis�es pour le texturage sont comprises
// entre min et max (au lieu de 0 et 1). Ceci permet d'exclure les
-// pixels situés dans une marge d'un pixel tout autour de la surface.
+// pixels situ�s dans une marge d'un pixel tout autour de la surface.
-// Cherche un matériaux d'après son identificateur.
+// Cherche un mat�riaux d'apr�s son identificateur.
TerrainMaterial* CTerrain::LevelSearchMat(int id)
{
@@ -942,7 +956,7 @@ TerrainMaterial* CTerrain::LevelSearchMat(int id)
return 0;
}
-// Choix de la texture à utiliser pour un carré donné.
+// Choix de la texture � utiliser pour un carr� donn�.
void CTerrain::LevelTextureName(int x, int y, char *name, FPOINT &uv)
{
@@ -983,7 +997,7 @@ float CTerrain::LevelRetHeight(int x, int y)
return m_relief[x+y*size];
}
-// Décide si un point utilise le matériaux.
+// D�cide si un point utilise le mat�riaux.
BOOL CTerrain::LevelGetDot(int x, int y, float min, float max, float slope)
{
@@ -1031,7 +1045,7 @@ BOOL CTerrain::LevelGetDot(int x, int y, float min, float max, float slope)
return FALSE;
}
-// Cherche si un matériau existe.
+// Cherche si un mat�riau existe.
// Retourne l'index dans m_levelMat ou -1 s'il n'existe pas.
// m_levelMat[i].id donne l'identificateur.
@@ -1050,7 +1064,7 @@ int CTerrain::LevelTestMat(char *mat)
return -1;
}
-// Modifie l'état d'un point et de ses 4 voisins, sans tester si
+// Modifie l'�tat d'un point et de ses 4 voisins, sans tester si
// c'est possible.
void CTerrain::LevelSetDot(int x, int y, int id, char *mat)
@@ -1078,7 +1092,7 @@ void CTerrain::LevelSetDot(int x, int y, int id, char *mat)
m_levelDot[x+y*m_levelDotSize].mat[2] = mat[2];
m_levelDot[x+y*m_levelDotSize].mat[3] = mat[3];
- // Modifie le voisin inférieur.
+ // Modifie le voisin inf�rieur.
if ( (x+0) >= 0 && (x+0) < m_levelDotSize &&
(y-1) >= 0 && (y-1) < m_levelDotSize )
{
@@ -1110,7 +1124,7 @@ void CTerrain::LevelSetDot(int x, int y, int id, char *mat)
}
}
- // Modifie le voisin supérieur.
+ // Modifie le voisin sup�rieur.
if ( (x+0) >= 0 && (x+0) < m_levelDotSize &&
(y+1) >= 0 && (y+1) < m_levelDotSize )
{
@@ -1143,14 +1157,14 @@ void CTerrain::LevelSetDot(int x, int y, int id, char *mat)
}
}
-// Teste si un matériau est possible à un endroit donné, en fonction
+// Teste si un mat�riau est possible � un endroit donn�, en fonction
// de ses 4 voisins. Si oui, met le point.
BOOL CTerrain::LevelIfDot(int x, int y, int id, char *mat)
{
char test[4];
- // Compatible avec voisin inférieur ?
+ // Compatible avec voisin inf�rieur ?
if ( x+0 >= 0 && x+0 < m_levelDotSize &&
y-1 >= 0 && y-1 < m_levelDotSize )
{
@@ -1174,7 +1188,7 @@ BOOL CTerrain::LevelIfDot(int x, int y, int id, char *mat)
if ( LevelTestMat(test) == -1 ) return FALSE;
}
- // Compatible avec voisin supérieur ?
+ // Compatible avec voisin sup�rieur ?
if ( x+0 >= 0 && x+0 < m_levelDotSize &&
y+1 >= 0 && y+1 < m_levelDotSize )
{
@@ -1202,7 +1216,7 @@ BOOL CTerrain::LevelIfDot(int x, int y, int id, char *mat)
return TRUE;
}
-// Modifie l'état d'un point.
+// Modifie l'�tat d'un point.
BOOL CTerrain::LevelPutDot(int x, int y, int id)
{
@@ -1366,7 +1380,7 @@ BOOL CTerrain::LevelPutDot(int x, int y, int id)
return FALSE;
}
-// Initialise tout le terrain avec un matériau.
+// Initialise tout le terrain avec un mat�riau.
BOOL CTerrain::LevelInit(int id)
{
@@ -1389,7 +1403,7 @@ BOOL CTerrain::LevelInit(int id)
return TRUE;
}
-// Génère un niveau dans le terrain.
+// G�n�re un niveau dans le terrain.
BOOL CTerrain::LevelGenerate(int *id, float min, float max,
float slope, float freq,
@@ -1424,7 +1438,7 @@ BOOL CTerrain::LevelGenerate(int *id, float min, float max,
group = m_brick/m_subdivMapping;
- if ( radius > 0.0f && radius < 5.0f ) // juste un carré ?
+ if ( radius > 0.0f && radius < 5.0f ) // juste un carr� ?
{
dim = (m_mosaic*m_brick*m_size)/2.0f;
@@ -1483,7 +1497,7 @@ void CTerrain::LevelOpenTable()
int i, j;
if ( !m_bLevelText ) return;
- if ( m_levelDot != 0 ) return; // déjà alloué
+ if ( m_levelDot != 0 ) return; // d�j� allou�
m_levelDotSize = (m_mosaic*m_brick)/(m_brick/m_subdivMapping)+1;
m_levelDot = (DotLevel*)malloc(m_levelDotSize*m_levelDotSize*sizeof(DotLevel));
@@ -1507,7 +1521,7 @@ void CTerrain::LevelCloseTable()
-// Crée tous les objets pour une maille carrée du terrain.
+// Cr�e tous les objets pour une maille carr�e du terrain.
BOOL CTerrain::CreateSquare(BOOL bMultiRes, int x, int y)
{
@@ -1549,7 +1563,7 @@ BOOL CTerrain::CreateSquare(BOOL bMultiRes, int x, int y)
return TRUE;
}
-// Crée tous les objets du terrain dans le moteur 3D.
+// Cr�e tous les objets du terrain dans le moteur 3D.
BOOL CTerrain::CreateObjects(BOOL bMultiRes)
{
@@ -1650,7 +1664,7 @@ BOOL CTerrain::Terraform(const D3DVECTOR &p1, const D3DVECTOR &p2, float height)
for ( x=pp1.x ; x<=pp2.x ; x++ )
{
m_engine->DeleteObject(m_objRank[x+y*m_mosaic]);
- CreateSquare(m_bMultiText, x, y); // recrée le carré
+ CreateSquare(m_bMultiText, x, y); // recr�e le carr�
}
}
m_engine->Update();
@@ -1672,7 +1686,7 @@ D3DVECTOR CTerrain::RetWind()
}
-// Donne la pente exacte du terrain à un endroit donné.
+// Donne la pente exacte du terrain � un endroit donn�.
float CTerrain::RetFineSlope(const D3DVECTOR &pos)
{
@@ -1682,7 +1696,7 @@ float CTerrain::RetFineSlope(const D3DVECTOR &pos)
return Abs(RotateAngle(Length(n.x, n.z), n.y)-PI/2.0f);
}
-// Donne la pente approximative du terrain à un endroit donné.
+// Donne la pente approximative du terrain � un endroit donn�.
float CTerrain::RetCoarseSlope(const D3DVECTOR &pos)
{
@@ -1710,7 +1724,7 @@ float CTerrain::RetCoarseSlope(const D3DVECTOR &pos)
return atanf((max-min)/m_size);
}
-// Donne le vecteur normal à la position p(x,-,z) du terrain.
+// Donne le vecteur normal � la position p(x,-,z) du terrain.
BOOL CTerrain::GetNormal(D3DVECTOR &n, const D3DVECTOR &p)
{
@@ -1827,7 +1841,7 @@ float CTerrain::RetFloorHeight(const D3DVECTOR &p, BOOL bBrut, BOOL bWater)
return p.y-ps.y;
}
-// Modifie la coordonnée "y" du point "p" pour qu'il repose
+// Modifie la coordonn�e "y" du point "p" pour qu'il repose
// sur le sol du terrain.
BOOL CTerrain::MoveOnFloor(D3DVECTOR &p, BOOL bBrut, BOOL bWater)
@@ -1869,8 +1883,8 @@ BOOL CTerrain::MoveOnFloor(D3DVECTOR &p, BOOL bBrut, BOOL bWater)
return TRUE;
}
-// Modifie une coordonnée pour qu'elle soit sur le terrain.
-// Retourne FALSE si la coordonnée initiale était trop loin.
+// Modifie une coordonn�e pour qu'elle soit sur le terrain.
+// Retourne FALSE si la coordonn�e initiale �tait trop loin.
BOOL CTerrain::ValidPosition(D3DVECTOR &p, float marging)
{
@@ -1908,14 +1922,14 @@ BOOL CTerrain::ValidPosition(D3DVECTOR &p, float marging)
-// Vide la table des élévations.
+// Vide la table des �l�vations.
void CTerrain::FlushBuildingLevel()
{
m_buildingUsed = 0;
}
-// Ajoute une nouvelle élévation pour un batiment.
+// Ajoute une nouvelle �l�vation pour un batiment.
BOOL CTerrain::AddBuildingLevel(D3DVECTOR center, float min, float max,
float height, float factor)
@@ -1949,8 +1963,8 @@ BOOL CTerrain::AddBuildingLevel(D3DVECTOR center, float min, float max,
return TRUE;
}
-// Met à jour l'élévation pour un batiment lorsqu'il a été déplacé
-// en hauteur (suite à un terraformage).
+// Met � jour l'�l�vation pour un batiment lorsqu'il a �t� d�plac�
+// en hauteur (suite � un terraformage).
BOOL CTerrain::UpdateBuildingLevel(D3DVECTOR center)
{
@@ -1969,7 +1983,7 @@ BOOL CTerrain::UpdateBuildingLevel(D3DVECTOR center)
return FALSE;
}
-// Supprime l'élévation pour un batiment lorsqu'il a été détruit.
+// Supprime l'�l�vation pour un batiment lorsqu'il a �t� d�truit.
BOOL CTerrain::DeleteBuildingLevel(D3DVECTOR center)
{
@@ -1992,7 +2006,7 @@ BOOL CTerrain::DeleteBuildingLevel(D3DVECTOR center)
}
// Retourne le facteur d'influence si une position est sur une
-// élévation éventuelle.
+// �l�vation �ventuelle.
float CTerrain::RetBuildingFactor(const D3DVECTOR &p)
{
@@ -2016,7 +2030,7 @@ float CTerrain::RetBuildingFactor(const D3DVECTOR &p)
return 1.0f; // on est sur le sol normnal
}
-// Ajuste une position en fonction d'une élévation éventuelle.
+// Ajuste une position en fonction d'une �l�vation �ventuelle.
void CTerrain::AdjustBuildingLevel(D3DVECTOR &p)
{
@@ -2067,8 +2081,8 @@ void CTerrain::AdjustBuildingLevel(D3DVECTOR &p)
}
-// Retourne la dureté du terrain à un endroit donné.
-// La dureté détermine le bruit (SOUND_STEP et SOUND_BOUM).
+// Retourne la duret� du terrain � un endroit donn�.
+// La duret� d�termine le bruit (SOUND_STEP et SOUND_BOUM).
float CTerrain::RetHardness(const D3DVECTOR &p)
{
@@ -2077,7 +2091,7 @@ float CTerrain::RetHardness(const D3DVECTOR &p)
int x, y, id;
factor = RetBuildingFactor(p);
- if ( factor != 1.0f ) return 1.0f; // sur bâtiment
+ if ( factor != 1.0f ) return 1.0f; // sur b�timent
if ( m_levelDot == 0 ) return m_defHardness;
@@ -2145,7 +2159,7 @@ void CTerrain::GroundFlat(D3DVECTOR pos)
// Calcule le rayon de la plus grande zone platte disponible.
-// Ce calcul n'est pas optimisé !
+// Ce calcul n'est pas optimis� !
float CTerrain::RetFlatZoneRadius(D3DVECTOR center, float max)
{
@@ -2186,7 +2200,7 @@ float CTerrain::RetFlatZoneRadius(D3DVECTOR center, float max)
-// Spécifie la hauteur maximale de vol.
+// Sp�cifie la hauteur maximale de vol.
void CTerrain::SetFlyingMaxHeight(float height)
{
diff --git a/src/terrain.h b/src/terrain.h
index f8f7435..8702fc2 100644
--- a/src/terrain.h
+++ b/src/terrain.h
@@ -1,4 +1,18 @@
-// terrain.h
+// * 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 .
#ifndef _TERRAIN_H_
#define _TERRAIN_H_
@@ -156,19 +170,19 @@ protected:
CD3DEngine* m_engine;
CWater* m_water;
- int m_mosaic; // nb de mosaïque
- int m_brick; // nb de briques par mosaïque
- float m_size; // taille d'un élément dans une brique
- float m_vision; // vision avant un changement de résolution
+ int m_mosaic; // nb de mosa�que
+ int m_brick; // nb de briques par mosa�que
+ float m_size; // taille d'un �l�ment dans une brique
+ float m_vision; // vision avant un changement de r�solution
float* m_relief; // table du relief
int* m_texture; // table des textures
int* m_objRank; // table des rangs des objets
BOOL m_bMultiText;
BOOL m_bLevelText;
- float m_scaleMapping; // échelle du mapping
+ float m_scaleMapping; // �chelle du mapping
float m_scaleRelief;
int m_subdivMapping;
- int m_depth; // nb de résolutions différentes (1,2,3,4)
+ int m_depth; // nb de r�solutions diff�rentes (1,2,3,4)
char m_texBaseName[20];
char m_texBaseExt[10];
float m_defHardness;
diff --git a/src/text.cpp b/src/text.cpp
index 12c6c37..2d2d240 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -1,4 +1,18 @@
-// text.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
@@ -23,7 +37,7 @@ static short table_text_colobot[] =
// x1, y1, x2, y2
219,34, 225,50, // 0
1,188, 9,203, // .
- 51,188,59,203, // carré
+ 51,188,59,203, // carr�
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -189,12 +203,12 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50, // 160
- 219,34, 225,50, // 161 A1 ! inversé
+ 219,34, 225,50, // 161 A1 ! invers�
219,34, 225,50,
- 219,34, 225,50, // 163 A3 £
+ 219,34, 225,50, // 163 A3 �
219,34, 225,50,
219,34, 225,50,
- 0, 0, 4, 16, // 166 A6 ¦ (cadratin)
+ 0, 0, 4, 16, // 166 A6 � (cadratin)
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -220,72 +234,72 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 219,34, 225,50, // 191 BF ? inversé
+ 219,34, 225,50, // 191 BF ? invers�
- 12, 51, 24, 67, // 192 C0 à maj
- 0, 51, 12, 67, // 193 C1 á maj
- 24, 51, 36, 67, // 194 C2 â maj
- 48, 51, 60, 67, // 195 C3 ã maj
- 36, 51, 48, 67, // 196 C4 ä maj
+ 12, 51, 24, 67, // 192 C0 � maj
+ 0, 51, 12, 67, // 193 C1 � maj
+ 24, 51, 36, 67, // 194 C2 � maj
+ 48, 51, 60, 67, // 195 C3 � maj
+ 36, 51, 48, 67, // 196 C4 � maj
219,34, 225,50,
219,34, 225,50,
- 60, 51, 69, 67, // 199 C7 ç maj
- 77, 51, 84, 67, // 200 C8 è maj
- 70, 51, 77, 67, // 201 C9 é maj
- 85, 51, 92, 67, // 202 CA ê maj
- 93, 51, 100,67, // 203 CB ë maj
+ 60, 51, 69, 67, // 199 C7 � maj
+ 77, 51, 84, 67, // 200 C8 � maj
+ 70, 51, 77, 67, // 201 C9 � maj
+ 85, 51, 92, 67, // 202 CA � maj
+ 93, 51, 100,67, // 203 CB � maj
219,34, 225,50,
- 100,51, 104,67, // 205 CD í maj
- 108,51, 113,67, // 206 CE î maj
- 113,51, 117,67, // 207 CF ï maj
+ 100,51, 104,67, // 205 CD � maj
+ 108,51, 113,67, // 206 CE � maj
+ 113,51, 117,67, // 207 CF � maj
219,34, 225,50, // 208
- 117,51, 126,67, // 209 D1 ñ maj
+ 117,51, 126,67, // 209 D1 � maj
219,34, 225,50,
- 126,51, 138,67, // 211 D3 ó maj
- 150,51, 162,67, // 212 D4 ô maj
+ 126,51, 138,67, // 211 D3 � maj
+ 150,51, 162,67, // 212 D4 � maj
219,34, 225,50,
- 162,51, 174,67, // 214 D6 ö maj
+ 162,51, 174,67, // 214 D6 � maj
219,34, 225,50,
219,34, 225,50,
- 194,51, 202,67, // 217 D9 ù maj
- 186,51, 194,67, // 218 DA ú maj
- 202,51, 210,67, // 219 DB û maj
- 210,51, 218,67, // 220 DC ü maj
+ 194,51, 202,67, // 217 D9 � maj
+ 186,51, 194,67, // 218 DA � maj
+ 202,51, 210,67, // 219 DB � maj
+ 210,51, 218,67, // 220 DC � maj
219,34, 225,50,
219,34, 225,50,
218,51, 227,67, // 223 DF ss allemand
- 7, 68, 14, 84, // 224 E0 à min
- 0, 68, 7, 84, // 225 E1 á min
- 14, 68, 21, 84, // 226 E2 â min
- 28, 68, 35, 84, // 227 E3 ã min
- 21, 68, 28, 84, // 228 E4 ä min
+ 7, 68, 14, 84, // 224 E0 � min
+ 0, 68, 7, 84, // 225 E1 � min
+ 14, 68, 21, 84, // 226 E2 � min
+ 28, 68, 35, 84, // 227 E3 � min
+ 21, 68, 28, 84, // 228 E4 � min
219,34, 225,50,
219,34, 225,50,
- 35, 68, 43, 84, // 231 E7 ç min
- 51, 68, 59, 84, // 232 E8 è min
- 43, 68, 51, 84, // 233 E9 é min
- 59, 68, 67, 84, // 234 EA ê min
- 67, 68, 75, 84, // 235 EB ë min
+ 35, 68, 43, 84, // 231 E7 � min
+ 51, 68, 59, 84, // 232 E8 � min
+ 43, 68, 51, 84, // 233 E9 � min
+ 59, 68, 67, 84, // 234 EA � min
+ 67, 68, 75, 84, // 235 EB � min
219,34, 225,50,
- 75, 68, 79, 84, // 237 ED í min
- 83, 68, 88, 84, // 238 EE î min
- 88, 68, 92, 84, // 239 EF ï min
+ 75, 68, 79, 84, // 237 ED � min
+ 83, 68, 88, 84, // 238 EE � min
+ 88, 68, 92, 84, // 239 EF � min
219,34, 225,50, // 240
- 92, 68, 99, 84, // 241 F1 ñ min
+ 92, 68, 99, 84, // 241 F1 � min
219,34, 225,50,
- 99, 68, 108,84, // 243 F3 ó min
- 117,68, 126,84, // 244 F4 ô min
+ 99, 68, 108,84, // 243 F3 � min
+ 117,68, 126,84, // 244 F4 � min
219,34, 225,50,
- 126,68, 135,84, // 246 F6 ö min
+ 126,68, 135,84, // 246 F6 � min
219,34, 225,50,
219,34, 225,50,
- 151,68, 158,84, // 249 F9 ù min
- 144,68, 151,84, // 250 FA ú min
- 158,68, 165,84, // 251 FB û min
- 165,68, 172,84, // 252 FC ü min
+ 151,68, 158,84, // 249 F9 � min
+ 144,68, 151,84, // 250 FA � min
+ 158,68, 165,84, // 251 FB � min
+ 165,68, 172,84, // 252 FC � min
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -404,10 +418,10 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 0, 51, 8, 67, // 140 S´
+ 0, 51, 8, 67, // 140 S�
219,34, 225,50,
219,34, 225,50,
- 9, 51, 17, 67, // 143 Z´
+ 9, 51, 17, 67, // 143 Z�
219,34, 225,50, // 144
219,34, 225,50,
@@ -421,10 +435,10 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 0, 68, 7, 84, // 156 s´
+ 0, 68, 7, 84, // 156 s�
219,34, 225,50,
219,34, 225,50,
- 8, 68, 14, 84, // 159 z´
+ 8, 68, 14, 84, // 159 z�
219,34, 225,50, // 160
219,34, 225,50,
@@ -432,7 +446,7 @@ static short table_text_colobot[] =
18, 51, 27, 67, // 163 L/
219,34, 225,50,
28, 51, 39, 67, // 165 A,
- 0, 0, 4, 16, // 166 A6 ¦ (cadratin)
+ 0, 0, 4, 16, // 166 A6 � (cadratin)
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -466,7 +480,7 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 49, 51, 58, 67, // 198 C´
+ 49, 51, 58, 67, // 198 C�
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -478,10 +492,10 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50, // 208
- 67, 51, 75, 67, // 209 N´
+ 67, 51, 75, 67, // 209 N�
219,34, 225,50,
-//? 76, 51, 85, 67, // 211 O´
- 86, 51, 97, 67, // 211 O´
+//? 76, 51, 85, 67, // 211 O�
+ 86, 51, 97, 67, // 211 O�
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -501,7 +515,7 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 39, 68, 46, 84, // 230 c´
+ 39, 68, 46, 84, // 230 c�
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -513,10 +527,10 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50, // 240
- 55, 68, 62, 84, // 241 n´
+ 55, 68, 62, 84, // 241 n�
219,34, 225,50,
-//? 63, 68, 70, 84, // 243 o´
- 71, 68, 79, 84, // 243 o´
+//? 63, 68, 70, 84, // 243 o�
+ 71, 68, 79, 84, // 243 o�
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -565,12 +579,12 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50, // 160
- 219,34, 225,50, // 161 A1 ! inversé
+ 219,34, 225,50, // 161 A1 ! invers�
219,34, 225,50,
- 219,34, 225,50, // 163 A3 £
+ 219,34, 225,50, // 163 A3 �
219,34, 225,50,
219,34, 225,50,
- 0, 0, 4, 16, // 166 A6 ¦ (cadratin)
+ 0, 0, 4, 16, // 166 A6 � (cadratin)
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -596,72 +610,72 @@ static short table_text_colobot[] =
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
- 219,34, 225,50, // 191 BF ? inversé
+ 219,34, 225,50, // 191 BF ? invers�
- 10, 51, 20, 67, // 192 C0 à maj
- 0, 51, 10, 67, // 193 C1 á maj
- 20, 51, 30, 67, // 194 C2 â maj
- 40, 51, 50, 67, // 195 C3 ã maj
- 30, 51, 40, 67, // 196 C4 ä maj
+ 10, 51, 20, 67, // 192 C0 � maj
+ 0, 51, 10, 67, // 193 C1 � maj
+ 20, 51, 30, 67, // 194 C2 � maj
+ 40, 51, 50, 67, // 195 C3 � maj
+ 30, 51, 40, 67, // 196 C4 � maj
219,34, 225,50,
219,34, 225,50,
- 50, 51, 59, 67, // 199 C7 ç maj
- 67, 51, 74, 67, // 200 C8 è maj
- 59, 51, 66, 67, // 201 C9 é maj
- 75, 51, 82, 67, // 202 CA ê maj
- 83, 51, 90, 67, // 203 CB ë maj
+ 50, 51, 59, 67, // 199 C7 � maj
+ 67, 51, 74, 67, // 200 C8 � maj
+ 59, 51, 66, 67, // 201 C9 � maj
+ 75, 51, 82, 67, // 202 CA � maj
+ 83, 51, 90, 67, // 203 CB � maj
219,34, 225,50,
- 91, 51, 95, 67, // 205 CD í maj
- 100,51, 103,67, // 206 CE î maj
- 104,51, 109,67, // 207 CF ï maj
+ 91, 51, 95, 67, // 205 CD � maj
+ 100,51, 103,67, // 206 CE � maj
+ 104,51, 109,67, // 207 CF � maj
219,34, 225,50, // 208
- 109,51, 117,67, // 209 D1 ñ maj
+ 109,51, 117,67, // 209 D1 � maj
219,34, 225,50,
- 118,51, 127,67, // 211 D3 ó maj
- 138,51, 147,67, // 212 D4 ô maj
+ 118,51, 127,67, // 211 D3 � maj
+ 138,51, 147,67, // 212 D4 � maj
219,34, 225,50,
- 148,51, 157,67, // 214 D6 ö maj
+ 148,51, 157,67, // 214 D6 � maj
219,34, 225,50,
219,34, 225,50,
- 177,51, 185,67, // 217 D9 ù maj
- 168,51, 176,67, // 218 DA ú maj
- 186,51, 194,67, // 219 DB û maj
- 195,51, 203,67, // 220 DC ü maj
+ 177,51, 185,67, // 217 D9 � maj
+ 168,51, 176,67, // 218 DA � maj
+ 186,51, 194,67, // 219 DB � maj
+ 195,51, 203,67, // 220 DC � maj
219,34, 225,50,
219,34, 225,50,
211,51, 220,67, // 223 DF ss allemand
- 8, 68, 15, 84, // 224 E0 à min
- 0, 68, 7, 84, // 225 E1 á min
- 16, 68, 23, 84, // 226 E2 â min
- 32, 68, 39, 84, // 227 E3 ã min
- 24, 68, 31, 84, // 228 E4 ä min
+ 8, 68, 15, 84, // 224 E0 � min
+ 0, 68, 7, 84, // 225 E1 � min
+ 16, 68, 23, 84, // 226 E2 � min
+ 32, 68, 39, 84, // 227 E3 � min
+ 24, 68, 31, 84, // 228 E4 � min
219,34, 225,50,
219,34, 225,50,
- 40, 68, 47, 84, // 231 E7 ç min
- 55, 68, 62, 84, // 232 E8 è min
- 47, 68, 54, 84, // 233 E9 é min
- 63, 68, 70, 84, // 234 EA ê min
- 71, 68, 78, 84, // 235 EB ë min
+ 40, 68, 47, 84, // 231 E7 � min
+ 55, 68, 62, 84, // 232 E8 � min
+ 47, 68, 54, 84, // 233 E9 � min
+ 63, 68, 70, 84, // 234 EA � min
+ 71, 68, 78, 84, // 235 EB � min
219,34, 225,50,
- 79, 68, 83, 84, // 237 ED í min
- 88, 68, 92, 84, // 238 EE î min
- 92, 68, 97, 84, // 239 EF ï min
+ 79, 68, 83, 84, // 237 ED � min
+ 88, 68, 92, 84, // 238 EE � min
+ 92, 68, 97, 84, // 239 EF � min
219,34, 225,50, // 240
- 97, 68, 104,84, // 241 F1 ñ min
+ 97, 68, 104,84, // 241 F1 � min
219,34, 225,50,
- 105,68, 112,84, // 243 F3 ó min
- 121,68, 128,84, // 244 F4 ô min
+ 105,68, 112,84, // 243 F3 � min
+ 121,68, 128,84, // 244 F4 � min
219,34, 225,50,
- 129,68, 136,84, // 246 F6 ö min
+ 129,68, 136,84, // 246 F6 � min
219,34, 225,50,
219,34, 225,50,
- 153,68, 160,84, // 249 F9 ù min
- 145,68, 152,84, // 250 FA ú min
- 161,68, 168,84, // 251 FB û min
- 169,68, 176,84, // 252 FC ü min
+ 153,68, 160,84, // 249 F9 � min
+ 145,68, 152,84, // 250 FA � min
+ 161,68, 168,84, // 251 FB � min
+ 169,68, 176,84, // 252 FC � min
219,34, 225,50,
219,34, 225,50,
219,34, 225,50,
@@ -675,7 +689,7 @@ static short table_text_courier[] =
// x1, y1, x2, y2
231,137,239,153, // 0
1,188, 9,204, // .
- 51,188,59,204, // carré
+ 51,188,59,204, // carr�
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -818,10 +832,10 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153,
231,137,239,153,
- 1,154, 9,170, // 140 S´
+ 1,154, 9,170, // 140 S�
231,137,239,153,
231,137,239,153,
- 11,154, 19,170, // 143 Z´
+ 11,154, 19,170, // 143 Z�
231,137,239,153, // 144
231,137,239,153,
@@ -835,10 +849,10 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153,
231,137,239,153,
- 1,171, 9,187, // 156 s´
+ 1,171, 9,187, // 156 s�
231,137,239,153,
231,137,239,153,
- 11,171, 19,187, // 159 z´
+ 11,171, 19,187, // 159 z�
231,137,239,153, // 160
231,137,239,153,
@@ -846,7 +860,7 @@ static short table_text_courier[] =
21,154, 29,170, // 163 L/
231,137,239,153,
31,154, 39,170, // 165 A,
- 1, 86, 9,102, // 166 A6 ¦ (cadratin)
+ 1, 86, 9,102, // 166 A6 � (cadratin)
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -880,7 +894,7 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153,
231,137,239,153,
- 51,154, 59,170, // 198 C´
+ 51,154, 59,170, // 198 C�
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -892,9 +906,9 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153, // 208
- 71,154, 79,170, // 209 N´
+ 71,154, 79,170, // 209 N�
231,137,239,153,
- 81,171, 89,187, // 211 O´
+ 81,171, 89,187, // 211 O�
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -914,7 +928,7 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153,
231,137,239,153,
- 51,171, 59,187, // 230 c´
+ 51,171, 59,187, // 230 c�
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -926,9 +940,9 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153, // 240
- 71,171, 79,187, // 241 n´
+ 71,171, 79,187, // 241 n�
231,137,239,153,
- 81,171, 89,187, // 243 ó min
+ 81,171, 89,187, // 243 � min
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -977,12 +991,12 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153, // 160
- 231,137,239,153, // 161 A1 ! inversé
+ 231,137,239,153, // 161 A1 ! invers�
231,137,239,153,
- 231,137,239,153, // 163 A3 £
+ 231,137,239,153, // 163 A3 �
231,137,239,153,
231,137,239,153,
- 1, 86, 9,102, // 166 A6 ¦ (cadratin)
+ 1, 86, 9,102, // 166 A6 � (cadratin)
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -1008,70 +1022,70 @@ static short table_text_courier[] =
231,137,239,153,
231,137,239,153,
231,137,239,153,
- 231,137,239,153, // 191 BF ? inversé
+ 231,137,239,153, // 191 BF ? invers�
- 11,154, 19,170, // à maj
- 1,154, 9,170, // á maj
- 21,154, 29,170, // â maj
- 41,154, 49,170, // ã maj
- 31,154, 39,170, // ä maj
+ 11,154, 19,170, // � maj
+ 1,154, 9,170, // � maj
+ 21,154, 29,170, // � maj
+ 41,154, 49,170, // � maj
+ 31,154, 39,170, // � maj
231,137,239,153,
231,137,239,153,
- 51,154, 59,170, // ç maj
- 71,154, 79,170, // è maj
- 61,154, 69,170, // é maj
- 81,154, 89,170, // ê maj
- 91,154, 99,170, // ë maj
+ 51,154, 59,170, // � maj
+ 71,154, 79,170, // � maj
+ 61,154, 69,170, // � maj
+ 81,154, 89,170, // � maj
+ 91,154, 99,170, // � maj
231,137,239,153,
- 101,154,109,170, // í maj
- 121,154,129,170, // î maj
- 131,154,139,170, // ï maj
+ 101,154,109,170, // � maj
+ 121,154,129,170, // � maj
+ 131,154,139,170, // � maj
231,137,239,153,
- 141,154,149,170, // ñ maj
+ 141,154,149,170, // � maj
231,137,239,153,
- 151,154,159,170, // ó maj
- 171,154,179,170, // ô maj
+ 151,154,159,170, // � maj
+ 171,154,179,170, // � maj
231,137,239,153,
- 181,154,189,170, // ö maj
+ 181,154,189,170, // � maj
231,137,239,153,
231,137,239,153,
- 211,154,219,170, // ù maj
- 201,154,209,170, // ú maj
- 221,154,229,170, // û maj
- 231,154,239,170, // ü maj
+ 211,154,219,170, // � maj
+ 201,154,209,170, // � maj
+ 221,154,229,170, // � maj
+ 231,154,239,170, // � maj
231,137,239,153,
231,137,239,153,
241,154,249,170, // 223 DF ss allemand
- 11,171, 19,187, // à min
- 1,171, 9,187, // á min
- 21,171, 29,187, // â min
- 41,171, 49,187, // ã min
- 31,171, 39,187, // ä min
+ 11,171, 19,187, // � min
+ 1,171, 9,187, // � min
+ 21,171, 29,187, // � min
+ 41,171, 49,187, // � min
+ 31,171, 39,187, // � min
231,137,239,153,
231,137,239,153,
- 51,171, 59,187, // ç min
- 71,171, 79,187, // è min
- 61,171, 69,187, // é min
- 81,171, 89,187, // ê min
- 91,171, 99,187, // ë min
+ 51,171, 59,187, // � min
+ 71,171, 79,187, // � min
+ 61,171, 69,187, // � min
+ 81,171, 89,187, // � min
+ 91,171, 99,187, // � min
231,137,239,153,
- 111,171,119,187, // ì min
- 121,171,129,187, // î min
- 131,171,139,187, // ï min
+ 111,171,119,187, // � min
+ 121,171,129,187, // � min
+ 131,171,139,187, // � min
231,137,239,153,
- 141,171,149,187, // ñ min
+ 141,171,149,187, // � min
231,137,239,153,
- 151,171,159,187, // ó min
- 171,171,179,187, // ô min
+ 151,171,159,187, // � min
+ 171,171,179,187, // � min
231,137,239,153,
- 181,171,189,187, // ö min
+ 181,171,189,187, // � min
231,137,239,153,
231,137,239,153,
- 211,171,219,187, // ù min
- 201,171,209,187, // ú min
- 221,171,229,187, // û min
- 231,171,239,187, // ü min
+ 211,171,219,187, // � min
+ 201,171,209,187, // � min
+ 221,171,229,187, // � min
+ 231,171,239,187, // � min
231,137,239,153,
231,137,239,153,
231,137,239,153,
@@ -1079,7 +1093,7 @@ static short table_text_courier[] =
};
-// Retourne le pointeur à la table selon la fonte.
+// Retourne le pointeur � la table selon la fonte.
short* RetTable(FontType font)
{
@@ -1115,7 +1129,7 @@ void CText::SetD3DDevice(LPDIRECT3DDEVICE7 device)
// Affiche un texte multi-fonte.
-// La position verticale est en bas de la boîte du caractère.
+// La position verticale est en bas de la bo�te du caract�re.
void CText::DrawText(char *string, char *format, int len, FPOINT pos,
float width, int justif, float size, float stretch,
@@ -1123,13 +1137,13 @@ void CText::DrawText(char *string, char *format, int len, FPOINT pos,
{
float sw;
- if ( justif == 0 ) // centré ?
+ if ( justif == 0 ) // centr� ?
{
sw = RetStringWidth(string, format, len, size, stretch);
if ( sw > width ) sw = width;
pos.x -= sw/2.0f;
}
- if ( justif < 0 ) // drapeau à gauche ?
+ if ( justif < 0 ) // drapeau � gauche ?
{
sw = RetStringWidth(string, format, len, size, stretch);
if ( sw > width ) sw = width;
@@ -1139,7 +1153,7 @@ void CText::DrawText(char *string, char *format, int len, FPOINT pos,
}
// Affiche un texte multi-fonte.
-// La position verticale est en bas de la boîte du caractère.
+// La position verticale est en bas de la bo�te du caract�re.
void CText::DrawText(char *string, char *format, FPOINT pos, float width,
int justif, float size, float stretch,
@@ -1149,7 +1163,7 @@ void CText::DrawText(char *string, char *format, FPOINT pos, float width,
}
// Affiche un texte.
-// La position verticale est en bas de la boîte du caractère.
+// La position verticale est en bas de la bo�te du caract�re.
void CText::DrawText(char *string, int len, FPOINT pos, float width,
int justif, float size, float stretch, FontType font,
@@ -1157,13 +1171,13 @@ void CText::DrawText(char *string, int len, FPOINT pos, float width,
{
float sw;
- if ( justif == 0 ) // centré ?
+ if ( justif == 0 ) // centr� ?
{
sw = RetStringWidth(string, len, size, stretch, font);
if ( sw > width ) sw = width;
pos.x -= sw/2.0f;
}
- if ( justif < 0 ) // drapeau à gauche ?
+ if ( justif < 0 ) // drapeau � gauche ?
{
sw = RetStringWidth(string, len, size, stretch, font);
if ( sw > width ) sw = width;
@@ -1173,7 +1187,7 @@ void CText::DrawText(char *string, int len, FPOINT pos, float width,
}
// Affiche un texte.
-// La position verticale est en bas de la boîte du caractère.
+// La position verticale est en bas de la bo�te du caract�re.
void CText::DrawText(char *string, FPOINT pos, float width,
int justif, float size, float stretch, FontType font,
@@ -1195,12 +1209,12 @@ void CText::DimText(char *string, char *format, int len, FPOINT pos,
sw = RetStringWidth(string, format, len, size, stretch);
end.x += sw;
- if ( justif == 0 ) // centré ?
+ if ( justif == 0 ) // centr� ?
{
start.x -= sw/2.0f;
end.x -= sw/2.0f;
}
- if ( justif < 0 ) // drapeau à gauche ?
+ if ( justif < 0 ) // drapeau � gauche ?
{
start.x -= sw;
end.x -= sw;
@@ -1231,12 +1245,12 @@ void CText::DimText(char *string, int len, FPOINT pos, int justif,
sw = RetStringWidth(string, len, size, stretch, font);
end.x += sw;
- if ( justif == 0 ) // centré ?
+ if ( justif == 0 ) // centr� ?
{
start.x -= sw/2.0f;
end.x -= sw/2.0f;
}
- if ( justif < 0 ) // drapeau à gauche ?
+ if ( justif < 0 ) // drapeau � gauche ?
{
start.x -= sw;
end.x -= sw;
@@ -1270,7 +1284,7 @@ float CText::RetDescent(float size, FontType font)
return (3.0f/256.0f)*(size/20.0f);
}
-// Retourne la hauteur totale du caractère.
+// Retourne la hauteur totale du caract�re.
float CText::RetHeight(float size, FontType font)
{
@@ -1278,7 +1292,7 @@ float CText::RetHeight(float size, FontType font)
}
-// Retourne la largeur d'une chaîne de caractères multi-fonte.
+// Retourne la largeur d'une cha�ne de caract�res multi-fonte.
float CText::RetStringWidth(char *string, char *format, int len,
float size, float stretch)
@@ -1322,7 +1336,7 @@ float CText::RetStringWidth(char *string, char *format, int len,
return width;
}
-// Retourne la largeur d'une chaîne de caractères.
+// Retourne la largeur d'une cha�ne de caract�res.
float CText::RetStringWidth(char *string, int len,
float size, float stretch, FontType font)
@@ -1357,7 +1371,7 @@ float CText::RetStringWidth(char *string, int len,
return width;
}
-// Retourne la largeur d'un caractère.
+// Retourne la largeur d'un caract�re.
// 'offset' est la position actuelle dans la ligne.
float CText::RetCharWidth(int character, float offset,
@@ -1467,7 +1481,7 @@ int CText::Justif(char *string, int len, float width,
return i;
}
-// Retourne la position convenant le mieux à une offset donnée (multi-fonte).
+// Retourne la position convenant le mieux � une offset donn�e (multi-fonte).
int CText::Detect(char *string, char *format, int len, float offset,
float size, float stretch)
@@ -1505,7 +1519,7 @@ int CText::Detect(char *string, char *format, int len, float offset,
return i;
}
-// Retourne la position convenant le mieux à une offset donnée.
+// Retourne la position convenant le mieux � une offset donn�e.
int CText::Detect(char *string, int len, float offset,
float size, float stretch, FontType font)
@@ -1562,7 +1576,7 @@ void CText::DrawString(char *string, char *format, int len, FPOINT pos,
c = (unsigned char)string[i];
cw = RetCharWidth(c, offset, size, stretch, font);
- if ( offset+cw > width ) // dépasse la largeur maximale ?
+ if ( offset+cw > width ) // d�passe la largeur maximale ?
{
cw = RetCharWidth(16, offset, size, stretch, font);
pos.x = start+width-cw;
@@ -1608,7 +1622,7 @@ void CText::DrawString(char *string, int len, FPOINT pos, float width,
c = (unsigned char)string[i];
cw = RetCharWidth(c, offset, size, stretch, font);
- if ( offset+cw > width ) // dépasse la largeur maximale ?
+ if ( offset+cw > width ) // d�passe la largeur maximale ?
{
cw = RetCharWidth(16, offset, size, stretch, font);
pos.x = start+width-cw;
@@ -1627,7 +1641,7 @@ void CText::DrawString(char *string, int len, FPOINT pos, float width,
}
}
-// Affiche le lien d'un caractère.
+// Affiche le lien d'un caract�re.
void CText::DrawColor(FPOINT pos, float size, float width, int color)
{
@@ -1668,14 +1682,14 @@ void CText::DrawColor(FPOINT pos, float size, float width, int color)
if ( color == COLOR_LINK )
{
p1.y = pos.y;
- p2.y = pos.y + h; // juste souligné
+ p2.y = pos.y + h; // juste soulign�
}
else
{
#if 1
p1.y = pos.y;
p2.y = pos.y + (16.0f/256.0f)*(size/20.0f);
-//? p2.y = pos.y + h*4.0f; // juste souligné épais
+//? p2.y = pos.y + h*4.0f; // juste soulign� �pais
#else
p1.y = pos.y;
p2.y = pos.y + (16.0f/256.0f)*(size/20.0f)/4.0f;
@@ -1709,7 +1723,7 @@ void CText::DrawColor(FPOINT pos, float size, float width, int color)
}
}
-// Affiche un caractère.
+// Affiche un caract�re.
void CText::DrawChar(int character, FPOINT pos, float size,
float stretch, FontType font)
diff --git a/src/text.h b/src/text.h
index 0ae1ac2..d9199df 100644
--- a/src/text.h
+++ b/src/text.h
@@ -1,4 +1,18 @@
-// text.h
+// * 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 .
#ifndef _TEXT_H_
#define _TEXT_H_
diff --git a/src/water.cpp b/src/water.cpp
index f3e4dc8..8efeb6a 100644
--- a/src/water.cpp
+++ b/src/water.cpp
@@ -1,4 +1,18 @@
-// water.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
@@ -134,7 +148,7 @@ BOOL CWater::EventProcess(const Event &event)
return TRUE;
}
-// Fait évoluer l'eau.
+// Fait �voluer l'eau.
BOOL CWater::EventFrame(const Event &event)
{
@@ -151,7 +165,7 @@ BOOL CWater::EventFrame(const Event &event)
return TRUE;
}
-// Fait évoluer les jets de vapeur sur la lave.
+// Fait �voluer les jets de vapeur sur la lave.
void CWater::LavaFrame(float rTime)
{
@@ -228,7 +242,7 @@ void CWater::VaporFlush()
}
}
-// Crée un nouveau jet de vapeur.
+// Cr�e un nouveau jet de vapeur.
BOOL CWater::VaporCreate(ParticuleType type, D3DVECTOR pos, float delay)
{
@@ -264,7 +278,7 @@ BOOL CWater::VaporCreate(ParticuleType type, D3DVECTOR pos, float delay)
return FALSE;
}
-// Fait évoluer un jet de vapeur,
+// Fait �voluer un jet de vapeur,
void CWater::VaporFrame(int i, float rTime)
{
@@ -337,7 +351,7 @@ void CWater::VaporFrame(int i, float rTime)
// Ajuste la position et la normale, pour imiter des reflets
-// sur une étendue d'eau au repos.
+// sur une �tendue d'eau au repos.
void CWater::AdjustLevel(D3DVECTOR &pos, D3DVECTOR &norm,
FPOINT &uv1, FPOINT &uv2)
@@ -382,8 +396,8 @@ void CWater::AdjustLevel(D3DVECTOR &pos, D3DVECTOR &norm,
#endif
}
-// Dessine la surface arrière de l'eau.
-// Cette surface empèche de voir le ciel (background) sous l'eau !
+// Dessine la surface arri�re de l'eau.
+// Cette surface emp�che de voir le ciel (background) sous l'eau !
void CWater::DrawBack()
{
@@ -586,7 +600,7 @@ void CWater::DrawSurf()
}
-// Indique s'il y a de l'eau à une position donnée.
+// Indique s'il y a de l'eau � une position donn�e.
BOOL CWater::RetWater(int x, int y)
{
@@ -614,7 +628,7 @@ BOOL CWater::RetWater(int x, int y)
return FALSE;
}
-// Met à jour les positions par-rapport au terrain.
+// Met � jour les positions par-rapport au terrain.
BOOL CWater::CreateLine(int x, int y, int len)
{
@@ -635,7 +649,7 @@ BOOL CWater::CreateLine(int x, int y, int len)
return ( m_lineUsed < MAXWATERLINE );
}
-// Crée toutes les étendues d'eau.
+// Cr�e toutes les �tendues d'eau.
BOOL CWater::Create(WaterType type1, WaterType type2, const char *filename,
D3DCOLORVALUE diffuse, D3DCOLORVALUE ambient,
@@ -734,7 +748,7 @@ float CWater::RetLevel()
return m_level;
}
-// Retourne le niveau actuel de l'eau pour un objet donné.
+// Retourne le niveau actuel de l'eau pour un objet donn�.
float CWater::RetLevel(CObject* object)
{
@@ -796,7 +810,7 @@ BOOL CWater::RetLava()
}
-// Ajuste l'oeil de la caméra, pour ne pas être entre deux eaux.
+// Ajuste l'oeil de la cam�ra, pour ne pas �tre entre deux eaux.
void CWater::AdjustEye(D3DVECTOR &eye)
{
diff --git a/src/water.h b/src/water.h
index f5751ae..ef61dac 100644
--- a/src/water.h
+++ b/src/water.h
@@ -1,4 +1,18 @@
-// water.h
+// * 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 .
#ifndef _WATER_H_
#define _WATER_H_
@@ -18,7 +32,7 @@ enum ParticuleType;
typedef struct
{
- short x, y; // début
+ short x, y; // d�but
short len; // longueur en x
float px1, px2, pz;
}
@@ -101,8 +115,8 @@ protected:
float m_lastLava;
int m_subdiv;
- int m_brick; // nb de briques*mosaïque
- float m_size; // taille d'un élément dans une brique
+ int m_brick; // nb de briques*mosa�que
+ float m_size; // taille d'un �l�ment dans une brique
int m_lineUsed;
WaterLine m_line[MAXWATERLINE];
diff --git a/src/window.cpp b/src/window.cpp
index 1740919..3e8cbf5 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1,4 +1,18 @@
-// window.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
@@ -80,7 +94,7 @@ CWindow::~CWindow()
}
-// Purge tous les contrôles.
+// Purge tous les contr�les.
void CWindow::Flush()
{
@@ -115,7 +129,7 @@ void CWindow::Flush()
}
-// Crée une nouvelle fenêtre.
+// Cr�e une nouvelle fen�tre.
BOOL CWindow::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -126,7 +140,7 @@ BOOL CWindow::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CButton* CWindow::CreateButton(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -148,7 +162,7 @@ CButton* CWindow::CreateButton(FPOINT pos, FPOINT dim, int icon, EventMsg eventM
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CColor* CWindow::CreateColor(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -170,7 +184,7 @@ CColor* CWindow::CreateColor(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CCheck* CWindow::CreateCheck(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -192,7 +206,7 @@ CCheck* CWindow::CreateCheck(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CKey* CWindow::CreateKey(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -214,7 +228,7 @@ CKey* CWindow::CreateKey(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CGroup* CWindow::CreateGroup(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -236,7 +250,7 @@ CGroup* CWindow::CreateGroup(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée un nouveau bouton.
+// Cr�e un nouveau bouton.
CImage* CWindow::CreateImage(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -258,7 +272,7 @@ CImage* CWindow::CreateImage(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée un nouveau label.
+// Cr�e un nouveau label.
CLabel* CWindow::CreateLabel(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
char *name)
@@ -289,7 +303,7 @@ CLabel* CWindow::CreateLabel(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
text[100-1] = 0;
if ( p-name < 100 )
{
- text[p-name] = 0; // supprime texte après "\\" (tooltip)
+ text[p-name] = 0; // supprime texte apr�s "\\" (tooltip)
}
pc->SetName(text);
}
@@ -299,7 +313,7 @@ CLabel* CWindow::CreateLabel(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée un nouveau pavé éditable.
+// Cr�e un nouveau pav� �ditable.
CEdit* CWindow::CreateEdit(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -321,7 +335,7 @@ CEdit* CWindow::CreateEdit(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
return 0;
}
-// Crée un nouveau pavé éditable.
+// Cr�e un nouveau pav� �ditable.
CEditValue* CWindow::CreateEditValue(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -343,7 +357,7 @@ CEditValue* CWindow::CreateEditValue(FPOINT pos, FPOINT dim, int icon, EventMsg
return 0;
}
-// Crée un nouvel ascenseur.
+// Cr�e un nouvel ascenseur.
CScroll* CWindow::CreateScroll(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -365,7 +379,7 @@ CScroll* CWindow::CreateScroll(FPOINT pos, FPOINT dim, int icon, EventMsg eventM
return 0;
}
-// Crée un nouveau curseur.
+// Cr�e un nouveau curseur.
CSlider* CWindow::CreateSlider(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -387,7 +401,7 @@ CSlider* CWindow::CreateSlider(FPOINT pos, FPOINT dim, int icon, EventMsg eventM
return 0;
}
-// Crée une nouvelle liste.
+// Cr�e une nouvelle liste.
CList* CWindow::CreateList(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
float expand)
@@ -410,7 +424,7 @@ CList* CWindow::CreateList(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
return 0;
}
-// Crée un nouveau raccourci.
+// Cr�e un nouveau raccourci.
CShortcut* CWindow::CreateShortcut(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -432,7 +446,7 @@ CShortcut* CWindow::CreateShortcut(FPOINT pos, FPOINT dim, int icon, EventMsg ev
return 0;
}
-// Crée une nouvelle carte.
+// Cr�e une nouvelle carte.
CMap* CWindow::CreateMap(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -454,7 +468,7 @@ CMap* CWindow::CreateMap(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
return 0;
}
-// Crée une nouvelle jauge.
+// Cr�e une nouvelle jauge.
CGauge* CWindow::CreateGauge(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -476,7 +490,7 @@ CGauge* CWindow::CreateGauge(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg
return 0;
}
-// Crée une nouvelle boussole.
+// Cr�e une nouvelle boussole.
CCompass* CWindow::CreateCompass(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -498,7 +512,7 @@ CCompass* CWindow::CreateCompass(FPOINT pos, FPOINT dim, int icon, EventMsg even
return 0;
}
-// Crée une nouvelle cible.
+// Cr�e une nouvelle cible.
CTarget* CWindow::CreateTarget(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
@@ -520,7 +534,7 @@ CTarget* CWindow::CreateTarget(FPOINT pos, FPOINT dim, int icon, EventMsg eventM
return 0;
}
-// Supprime un contrôle.
+// Supprime un contr�le.
BOOL CWindow::DeleteControl(EventMsg eventMsg)
{
@@ -541,7 +555,7 @@ BOOL CWindow::DeleteControl(EventMsg eventMsg)
return FALSE;
}
-// Donne un contrôle.
+// Donne un contr�le.
CControl* CWindow::SearchControl(EventMsg eventMsg)
{
@@ -561,7 +575,7 @@ CControl* CWindow::SearchControl(EventMsg eventMsg)
}
-// Donne le tooltip lié à la fenêtre.
+// Donne le tooltip li� � la fen�tre.
BOOL CWindow::GetTooltip(FPOINT pos, char* name)
{
@@ -594,7 +608,7 @@ BOOL CWindow::GetTooltip(FPOINT pos, char* name)
return TRUE;
}
- if ( Detect(pos) ) // dans la fenêtre ?
+ if ( Detect(pos) ) // dans la fen�tre ?
{
strcpy(name, m_tooltip);
return TRUE;
@@ -604,7 +618,7 @@ BOOL CWindow::GetTooltip(FPOINT pos, char* name)
}
-// Spécifie le nom pour la barre de titre.
+// Sp�cifie le nom pour la barre de titre.
void CWindow::SetName(char* name)
{
@@ -742,7 +756,7 @@ FPOINT CWindow::RetMaxDim()
}
-// Indique si la fenêtre est déplaçable.
+// Indique si la fen�tre est d�pla�able.
void CWindow::SetMovable(BOOL bMode)
{
@@ -755,7 +769,7 @@ BOOL CWindow::RetMovable()
}
-// Gestion de la présence des boutons minimise/maximise.
+// Gestion de la pr�sence des boutons minimise/maximise.
void CWindow::SetRedim(BOOL bMode)
{
@@ -768,7 +782,7 @@ BOOL CWindow::RetRedim()
}
-// Gestion de la présence du bouton de fermeture.
+// Gestion de la pr�sence du bouton de fermeture.
void CWindow::SetClosable(BOOL bMode)
{
@@ -897,9 +911,9 @@ EventMsg CWindow::RetEventMsgClose()
}
-// Détecte si la souris est dans un bord de la fenêtre, pour
+// D�tecte si la souris est dans un bord de la fen�tre, pour
// la redimensionner.
-// Bits retournée: 0=gauche, 1=bas, 2=droite, 3=haut, -1=tout.
+// Bits retourn�e: 0=gauche, 1=bas, 2=droite, 3=haut, -1=tout.
int CWindow::BorderDetect(FPOINT pos)
{
@@ -950,7 +964,7 @@ int CWindow::BorderDetect(FPOINT pos)
return flags;
}
-// Gestion d'un événement.
+// Gestion d'un �v�nement.
BOOL CWindow::EventProcess(const Event &event)
{
@@ -1049,7 +1063,7 @@ BOOL CWindow::EventProcess(const Event &event)
if ( event.event == EVENT_MOUSEMOVE && m_bCapture )
{
pos = event.pos;
- if ( m_pressFlags == -1 ) // déplace tout ?
+ if ( m_pressFlags == -1 ) // d�place tout ?
{
m_pos.x += pos.x-m_pressPos.x;
m_pos.y += pos.y-m_pressPos.y;
@@ -1108,7 +1122,7 @@ BOOL CWindow::EventProcess(const Event &event)
}
-// Dessine la fenêtre.
+// Dessine la fen�tre.
void CWindow::Draw()
{
@@ -1206,7 +1220,7 @@ void CWindow::DrawVertex(FPOINT pos, FPOINT dim, int icon)
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTw);
- uv1.x = 64.0f/256.0f; // bleu foncé transparent
+ uv1.x = 64.0f/256.0f; // bleu fonc� transparent
uv1.y = 64.0f/256.0f;
uv2.x = 128.0f/256.0f;
uv2.y = 128.0f/256.0f;
@@ -1250,7 +1264,7 @@ void CWindow::DrawVertex(FPOINT pos, FPOINT dim, int icon)
{
m_engine->SetTexture("button2.tga");
m_engine->SetState(D3DSTATETTb);
- uv1.x = 0.0f/256.0f; // bleu transparent avec barre jaune supérieure
+ uv1.x = 0.0f/256.0f; // bleu transparent avec barre jaune sup�rieure
uv1.y = 64.0f/256.0f;
uv2.x = 64.0f/256.0f;
uv2.y = 128.0f/256.0f;
@@ -1277,7 +1291,7 @@ void CWindow::DrawVertex(FPOINT pos, FPOINT dim, int icon)
uv1.y += dp;
uv2.x -= dp;
uv2.y -= dp;
- DrawIcon(pos, dim, uv1, uv2); // vêtement
+ DrawIcon(pos, dim, uv1, uv2); // v�tement
pos.x += 20.0f/640.0f;
pos.y -= 10.0f/480.0f;
@@ -1348,7 +1362,7 @@ void CWindow::DrawVertex(FPOINT pos, FPOINT dim, int icon)
uv1.y += dp;
uv2.x -= dp;
uv2.y -= dp;
- DrawIcon(pos, dim, uv1, uv2); // fond bleu foncé
+ DrawIcon(pos, dim, uv1, uv2); // fond bleu fonc�
m_engine->SetTexture("button2.tga");
uv1.x = 224.0f/256.0f;
diff --git a/src/window.h b/src/window.h
index dfccfbd..5d1531c 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,4 +1,18 @@
-// window.h
+// * 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 .
#ifndef _WINDOW_H_
#define _WINDOW_H_
diff --git a/src/winmain.cpp b/src/winmain.cpp
index c4b6f5a..92bfea9 100644
--- a/src/winmain.cpp
+++ b/src/winmain.cpp
@@ -1,5 +1,18 @@
-// winmain.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
#include <windows.h>