summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
Diffstat (limited to 'src/object')
-rw-r--r--src/object/auto/auto.cpp6
-rw-r--r--src/object/auto/autoegg.cpp6
-rw-r--r--src/object/motion/motion.cpp6
-rw-r--r--src/object/motion/motiontoto.cpp2
-rw-r--r--src/object/object.cpp60
-rw-r--r--src/object/robotmain.cpp132
6 files changed, 106 insertions, 106 deletions
diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp
index a376ce7..d112721 100644
--- a/src/object/auto/auto.cpp
+++ b/src/object/auto/auto.cpp
@@ -91,21 +91,21 @@ void CAuto::Start(int param)
}
-// Give a type.
+// Gete a type.
bool CAuto::SetType(ObjectType type)
{
return false;
}
-// Gives a value.
+// Getes a value.
bool CAuto::SetValue(int rank, float value)
{
return false;
}
-// Gives the string.
+// Getes the string.
bool CAuto::SetString(char *string)
{
diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp
index b1e1c03..4b999a9 100644
--- a/src/object/auto/autoegg.cpp
+++ b/src/object/auto/autoegg.cpp
@@ -115,7 +115,7 @@ void CAutoEgg::Init()
}
-// Gives a value.
+// Getes a value.
bool CAutoEgg::SetType(ObjectType type)
{
@@ -123,7 +123,7 @@ bool CAutoEgg::SetType(ObjectType type)
return true;
}
-// Gives a value.
+// Getes a value.
bool CAutoEgg::SetValue(int rank, float value)
{
@@ -132,7 +132,7 @@ bool CAutoEgg::SetValue(int rank, float value)
return true;
}
-// Gives the string.
+// Getes the string.
bool CAutoEgg::SetString(char *string)
{
diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp
index e0dffc4..6278627 100644
--- a/src/object/motion/motion.cpp
+++ b/src/object/motion/motion.cpp
@@ -201,7 +201,7 @@ bool CMotion::Read(char *line)
}
-// Gives the linear vibration.
+// Getes the linear vibration.
void CMotion::SetLinVibration(Math::Vector dir)
{
@@ -213,7 +213,7 @@ Math::Vector CMotion::RetLinVibration()
return m_linVibration;
}
-// Gives the circular vibration.
+// Getes the circular vibration.
void CMotion::SetCirVibration(Math::Vector dir)
{
@@ -225,7 +225,7 @@ Math::Vector CMotion::RetCirVibration()
return m_cirVibration;
}
-// Gives the tilt.
+// Getes the tilt.
void CMotion::SetInclinaison(Math::Vector dir)
{
diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp
index 7654159..6d39b36 100644
--- a/src/object/motion/motiontoto.cpp
+++ b/src/object/motion/motiontoto.cpp
@@ -219,7 +219,7 @@ void CMotionToto::StopDisplayInfo()
m_bQuickPos = true;
}
-// Gives the position of the mouse.
+// Getes the position of the mouse.
void CMotionToto::SetMousePos(Math::Point pos)
{
diff --git a/src/object/object.cpp b/src/object/object.cpp
index 18e843b..e2e52e5 100644
--- a/src/object/object.cpp
+++ b/src/object/object.cpp
@@ -131,83 +131,83 @@ void uObject(CBotVar* botThis, void* user)
physics = object->RetPhysics();
// Updates the object's type.
- pVar = botThis->GivItemList(); // "category"
+ pVar = botThis->GetItemList(); // "category"
type = object->RetType();
pVar->SetValInt(type, object->RetName());
// Updates the position of the object.
- pVar = pVar->GivNext(); // "position"
+ pVar = pVar->GetNext(); // "position"
if ( object->RetTruck() == 0 )
{
pos = object->RetPosition(0);
pos.y -= object->RetWaterLevel(); // relative to sea level!
- pSub = pVar->GivItemList(); // "x"
+ pSub = pVar->GetItemList(); // "x"
pSub->SetValFloat(pos.x/g_unit);
- pSub = pSub->GivNext(); // "y"
+ pSub = pSub->GetNext(); // "y"
pSub->SetValFloat(pos.z/g_unit);
- pSub = pSub->GivNext(); // "z"
+ pSub = pSub->GetNext(); // "z"
pSub->SetValFloat(pos.y/g_unit);
}
else // object transported?
{
- pSub = pVar->GivItemList(); // "x"
+ pSub = pVar->GetItemList(); // "x"
pSub->SetInit(IS_NAN);
- pSub = pSub->GivNext(); // "y"
+ pSub = pSub->GetNext(); // "y"
pSub->SetInit(IS_NAN);
- pSub = pSub->GivNext(); // "z"
+ pSub = pSub->GetNext(); // "z"
pSub->SetInit(IS_NAN);
}
// Updates the angle.
pos = object->RetAngle(0);
pos += object->RetInclinaison();
- pVar = pVar->GivNext(); // "orientation"
+ pVar = pVar->GetNext(); // "orientation"
pVar->SetValFloat(360.0f-Math::Mod(pos.y*180.0f/Math::PI, 360.0f));
- pVar = pVar->GivNext(); // "pitch"
+ pVar = pVar->GetNext(); // "pitch"
pVar->SetValFloat(pos.z*180.0f/Math::PI);
- pVar = pVar->GivNext(); // "roll"
+ pVar = pVar->GetNext(); // "roll"
pVar->SetValFloat(pos.x*180.0f/Math::PI);
// Updates the energy level of the object.
- pVar = pVar->GivNext(); // "energyLevel"
+ pVar = pVar->GetNext(); // "energyLevel"
value = object->RetEnergy();
pVar->SetValFloat(value);
// Updates the shield level of the object.
- pVar = pVar->GivNext(); // "shieldLevel"
+ pVar = pVar->GetNext(); // "shieldLevel"
value = object->RetShield();
pVar->SetValFloat(value);
// Updates the temperature of the reactor.
- pVar = pVar->GivNext(); // "temperature"
+ pVar = pVar->GetNext(); // "temperature"
if ( physics == 0 ) value = 0.0f;
else value = 1.0f-physics->RetReactorRange();
pVar->SetValFloat(value);
// Updates the height above the ground.
- pVar = pVar->GivNext(); // "altitude"
+ pVar = pVar->GetNext(); // "altitude"
if ( physics == 0 ) value = 0.0f;
else value = physics->RetFloorHeight();
pVar->SetValFloat(value/g_unit);
// Updates the lifetime of the object.
- pVar = pVar->GivNext(); // "lifeTime"
+ pVar = pVar->GetNext(); // "lifeTime"
value = object->RetAbsTime();
pVar->SetValFloat(value);
// Updates the material of the object.
- pVar = pVar->GivNext(); // "material"
+ pVar = pVar->GetNext(); // "material"
iValue = object->RetMaterial();
pVar->SetValInt(iValue);
// Updates the type of battery.
- pVar = pVar->GivNext(); // "energyCell"
+ pVar = pVar->GetNext(); // "energyCell"
power = object->RetPower();
if ( power == 0 ) pVar->SetPointer(0);
else pVar->SetPointer(power->RetBotVar());
// Updates the transported object's type.
- pVar = pVar->GivNext(); // "load"
+ pVar = pVar->GetNext(); // "load"
fret = object->RetFret();
if ( fret == 0 ) pVar->SetPointer(0);
else pVar->SetPointer(fret->RetBotVar());
@@ -1468,7 +1468,7 @@ void CObject::FloorAdjust()
}
-// Gives the linear vibration.
+// Getes the linear vibration.
void CObject::SetLinVibration(Math::Vector dir)
{
@@ -1486,7 +1486,7 @@ Math::Vector CObject::RetLinVibration()
return m_linVibration;
}
-// Gives the circular vibration.
+// Getes the circular vibration.
void CObject::SetCirVibration(Math::Vector dir)
{
@@ -1504,7 +1504,7 @@ Math::Vector CObject::RetCirVibration()
return m_cirVibration;
}
-// Gives the inclination.
+// Getes the inclination.
void CObject::SetInclinaison(Math::Vector dir)
{
@@ -1523,7 +1523,7 @@ Math::Vector CObject::RetInclinaison()
}
-// Gives the position of center of the object.
+// Getes the position of center of the object.
void CObject::SetPosition(int part, const Math::Vector &pos)
{
@@ -1649,7 +1649,7 @@ Math::Vector CObject::RetPosition(int part)
return m_objectPart[part].position;
}
-// Gives the rotation around three axis.
+// Getes the rotation around three axis.
void CObject::SetAngle(int part, const Math::Vector &angle)
{
@@ -1667,7 +1667,7 @@ Math::Vector CObject::RetAngle(int part)
return m_objectPart[part].angle;
}
-// Gives the rotation about the axis Y.
+// Getes the rotation about the axis Y.
void CObject::SetAngleY(int part, float angle)
{
@@ -1680,7 +1680,7 @@ void CObject::SetAngleY(int part, float angle)
}
}
-// Gives the rotation about the axis X.
+// Getes the rotation about the axis X.
void CObject::SetAngleX(int part, float angle)
{
@@ -1688,7 +1688,7 @@ void CObject::SetAngleX(int part, float angle)
m_objectPart[part].bRotate = true; // it will recalculate the matrices
}
-// Gives the rotation about the axis Z.
+// Getes the rotation about the axis Z.
void CObject::SetAngleZ(int part, float angle)
{
@@ -1712,7 +1712,7 @@ float CObject::RetAngleZ(int part)
}
-// Gives the global zoom.
+// Getes the global zoom.
void CObject::SetZoom(int part, float zoom)
{
@@ -7431,7 +7431,7 @@ void CObject::UpdateSelectParticule()
}
-// Gives the pointer to the current script execution.
+// Getes the pointer to the current script execution.
void CObject::SetRunScript(CScript* script)
{
@@ -7498,7 +7498,7 @@ int CObject::RetDefRank()
}
-// Gives the object name for the tooltip.
+// Getes the object name for the tooltip.
bool CObject::GetTooltipName(char* name)
{
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 668be87..83eca52 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -145,25 +145,25 @@ bool rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
if ( pVar == NULL ) return true;
// must be a character string
- if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
+ if ( pVar->GetType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
- CBotString filename = pVar->GivValString();
+ CBotString filename = pVar->GetValString();
PrepareFilename(filename);
// there may be a second parameter
- pVar = pVar->GivNext();
+ pVar = pVar->GetNext();
if ( pVar != NULL )
{
// recover mode
- mode = pVar->GivValString();
+ mode = pVar->GetValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return false; }
// no third parameter
- if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return false; }
+ if ( pVar->GetNext() != NULL ) { Exception = CBotErrOverParam; return false; }
}
// saves the file name
- pVar = pThis->GivItem("filename");
+ pVar = pThis->GetItem("filename");
pVar->SetValString(filename);
if ( ! mode.IsEmpty() )
@@ -175,7 +175,7 @@ bool rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio
m_CompteurFileOpen ++;
// save the channel file
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
pVar->SetValInt((long)pFile);
}
@@ -189,18 +189,18 @@ CBotTypResult cfconstruct (CBotVar* pThis, CBotVar* &pVar)
if ( pVar == NULL ) return CBotTypResult( 0 );
// must be a character string
- if ( pVar->GivType() != CBotTypString )
+ if ( pVar->GetType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
// there may be a second parameter
- pVar = pVar->GivNext();
+ pVar = pVar->GetNext();
if ( pVar != NULL )
{
// which must be a string
- if ( pVar->GivType() != CBotTypString )
+ if ( pVar->GetType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
// no third parameter
- if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
+ if ( pVar->GetNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
// the result is void (constructor)
@@ -214,12 +214,12 @@ CBotTypResult cfconstruct (CBotVar* pThis, CBotVar* &pVar)
bool rfdestruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
{
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
// don't open? no problem :)
- if ( pVar->GivInit() != IS_DEF) return true;
+ if ( pVar->GetInit() != IS_DEF) return true;
- FILE* pFile= (FILE*)pVar->GivValInt();
+ FILE* pFile= (FILE*)pVar->GetValInt();
fclose(pFile);
m_CompteurFileOpen --;
@@ -239,38 +239,38 @@ bool rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
if ( pVar == NULL ) { Exception = CBotErrLowParam; return false; }
// which must be a character string
- if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
+ if ( pVar->GetType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
// There may be a second parameter
- if ( pVar->GivNext() != NULL )
+ if ( pVar->GetNext() != NULL )
{
// if the first parameter is the file name
- CBotString filename = pVar->GivValString();
+ CBotString filename = pVar->GetValString();
PrepareFilename(filename);
// saves the file name
- CBotVar* pVar2 = pThis->GivItem("filename");
+ CBotVar* pVar2 = pThis->GetItem("filename");
pVar2->SetValString(filename);
// next parameter is the mode
- pVar = pVar -> GivNext();
+ pVar = pVar -> GetNext();
}
- CBotString mode = pVar->GivValString();
+ CBotString mode = pVar->GetValString();
if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return false; }
// no third parameter
- if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return false; }
+ if ( pVar->GetNext() != NULL ) { Exception = CBotErrOverParam; return false; }
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
// which must not be initialized
- if ( pVar->GivInit() == IS_DEF) { Exception = CBotErrFileOpen; return false; }
+ if ( pVar->GetInit() == IS_DEF) { Exception = CBotErrFileOpen; return false; }
// file contains the name
- pVar = pThis->GivItem("filename");
- CBotString filename = pVar->GivValString();
+ pVar = pThis->GetItem("filename");
+ CBotString filename = pVar->GetValString();
PrepareFilename(filename); // if the name was h.filename attribute = "...";
@@ -285,7 +285,7 @@ bool rfopen (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
m_CompteurFileOpen ++;
// Registered the channel file
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
pVar->SetValInt((long)pFile);
pResult->SetValInt(true);
@@ -299,19 +299,19 @@ CBotTypResult cfopen (CBotVar* pThis, CBotVar* &pVar)
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
// which must be a string
- if ( pVar->GivType() != CBotTypString )
+ if ( pVar->GetType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
// there may be a second parameter
- pVar = pVar->GivNext();
+ pVar = pVar->GetNext();
if ( pVar != NULL )
{
// which must be a string
- if ( pVar->GivType() != CBotTypString )
+ if ( pVar->GetType() != CBotTypString )
return CBotTypResult( CBotErrBadString );
// no third parameter
- if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
+ if ( pVar->GetNext() != NULL ) return CBotTypResult( CBotErrOverParam );
}
// the result is bool
@@ -328,11 +328,11 @@ bool rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
if ( pVar != NULL ) return CBotErrOverParam;
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
- if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
+ if ( pVar->GetInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
- FILE* pFile= (FILE*)pVar->GivValInt();
+ FILE* pFile= (FILE*)pVar->GetValInt();
fclose(pFile);
m_CompteurFileOpen --;
@@ -360,16 +360,16 @@ bool rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
if ( pVar == NULL ) { Exception = CBotErrLowParam; return false; }
// which must be a character string
- if ( pVar->GivType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
+ if ( pVar->GetType() != CBotTypString ) { Exception = CBotErrBadString; return false; }
- CBotString param = pVar->GivValString();
+ CBotString param = pVar->GetValString();
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
- if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
+ if ( pVar->GetInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
- FILE* pFile= (FILE*)pVar->GivValInt();
+ FILE* pFile= (FILE*)pVar->GetValInt();
int res = fputs(param+CBotString("\n"), pFile);
@@ -386,10 +386,10 @@ CBotTypResult cfwrite (CBotVar* pThis, CBotVar* &pVar)
if ( pVar == NULL ) return CBotTypResult( CBotErrLowParam );
// which must be a character string
- if ( pVar->GivType() != CBotTypString ) return CBotTypResult( CBotErrBadString );
+ if ( pVar->GetType() != CBotTypString ) return CBotTypResult( CBotErrBadString );
// no other parameter
- if ( pVar->GivNext() != NULL ) return CBotTypResult( CBotErrOverParam );
+ if ( pVar->GetNext() != NULL ) return CBotTypResult( CBotErrOverParam );
// the function returns a void result
return CBotTypResult( 0 );
@@ -404,11 +404,11 @@ bool rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
if ( pVar != NULL ) { Exception = CBotErrOverParam; return false; }
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
- if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
+ if ( pVar->GetInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
- FILE* pFile= (FILE*)pVar->GivValInt();
+ FILE* pFile= (FILE*)pVar->GetValInt();
char chaine[2000];
int i;
@@ -445,11 +445,11 @@ bool rfeof (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
if ( pVar != NULL ) { Exception = CBotErrOverParam; return false; }
// retrieve the item "handle"
- pVar = pThis->GivItem("handle");
+ pVar = pThis->GetItem("handle");
- if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
+ if ( pVar->GetInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; }
- FILE* pFile= (FILE*)pVar->GivValInt();
+ FILE* pFile= (FILE*)pVar->GetValInt();
pResult->SetValInt( feof( pFile ) );
@@ -516,13 +516,13 @@ CBotTypResult cPoint(CBotVar* pThis, CBotVar* &var)
if ( var == NULL ) return CBotTypResult(0); // ok if no parameter
// First parameter (x):
- if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
- var = var->GivNext();
+ if ( var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
+ var = var->GetNext();
// Second parameter (y):
if ( var == NULL ) return CBotTypResult(CBotErrLowParam);
- if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
- var = var->GivNext();
+ if ( var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
+ var = var->GetNext();
// Third parameter (z):
if ( var == NULL ) // only 2 parameters?
@@ -530,8 +530,8 @@ CBotTypResult cPoint(CBotVar* pThis, CBotVar* &var)
return CBotTypResult(0); // this function returns void
}
- if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
- var = var->GivNext();
+ if ( var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
+ var = var->GetNext();
if ( var != NULL ) return CBotTypResult(CBotErrOverParam);
return CBotTypResult(0); // this function returns void
@@ -545,49 +545,49 @@ bool rPoint(CBotVar* pThis, CBotVar* var, CBotVar* pResult, int& Exception)
if ( var == NULL ) return true; // constructor with no parameters is ok
- if ( var->GivType() > CBotTypDouble )
+ if ( var->GetType() > CBotTypDouble )
{
Exception = CBotErrBadNum; return false;
}
- pX = pThis->GivItem("x");
+ pX = pThis->GetItem("x");
if ( pX == NULL )
{
Exception = CBotErrUndefItem; return false;
}
- pX->SetValFloat( var->GivValFloat() );
- var = var->GivNext();
+ pX->SetValFloat( var->GetValFloat() );
+ var = var->GetNext();
if ( var == NULL )
{
Exception = CBotErrLowParam; return false;
}
- if ( var->GivType() > CBotTypDouble )
+ if ( var->GetType() > CBotTypDouble )
{
Exception = CBotErrBadNum; return false;
}
- pY = pThis->GivItem("y");
+ pY = pThis->GetItem("y");
if ( pY == NULL )
{
Exception = CBotErrUndefItem; return false;
}
- pY->SetValFloat( var->GivValFloat() );
- var = var->GivNext();
+ pY->SetValFloat( var->GetValFloat() );
+ var = var->GetNext();
if ( var == NULL )
{
return true; // ok with only two parameters
}
- pZ = pThis->GivItem("z");
+ pZ = pThis->GetItem("z");
if ( pZ == NULL )
{
Exception = CBotErrUndefItem; return false;
}
- pZ->SetValFloat( var->GivValFloat() );
- var = var->GivNext();
+ pZ->SetValFloat( var->GetValFloat() );
+ var = var->GetNext();
if ( var != NULL )
{
@@ -6451,7 +6451,7 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
version = 1;
fWrite(&version, sizeof(long), 1, file); // version of COLOBOT
- version = CBotProgram::GivVersion();
+ version = CBotProgram::GetVersion();
fWrite(&version, sizeof(long), 1, file); // version of CBOT
objRank = 0;
@@ -6687,7 +6687,7 @@ CObject* CRobotMain::IOReadScene(char *filename, char *filecbot)
if ( version == 1 )
{
fRead(&version, sizeof(long), 1, file); // version of CBOT
- if ( version == CBotProgram::GivVersion() )
+ if ( version == CBotProgram::GetVersion() )
{
objRank = 0;
for ( i=0 ; i<1000000 ; i++ )
@@ -7200,7 +7200,7 @@ void CRobotMain::SetGamerName(char *name)
ReadFreeParam();
}
-// Gives the player's name.
+// Getes the player's name.
char* CRobotMain::RetGamerName()
{