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/autoenergy.cpp4
-rw-r--r--src/object/auto/autolabo.cpp2
-rw-r--r--src/object/auto/autoresearch.cpp6
-rw-r--r--src/object/brain.cpp8
-rw-r--r--src/object/motion/motion.cpp2
-rw-r--r--src/object/motion/motionhuman.cpp4
-rw-r--r--src/object/motion/motiontoto.cpp10
-rw-r--r--src/object/object.cpp12
-rw-r--r--src/object/robotmain.cpp16
-rw-r--r--src/object/task/taskbuild.cpp2
-rw-r--r--src/object/task/taskfire.cpp2
-rw-r--r--src/object/task/taskgoto.cpp14
-rw-r--r--src/object/task/taskrecover.cpp2
-rw-r--r--src/object/task/taskshield.cpp2
-rw-r--r--src/object/task/taskterraform.cpp2
16 files changed, 47 insertions, 47 deletions
diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp
index f2764e2..a376ce7 100644
--- a/src/object/auto/auto.cpp
+++ b/src/object/auto/auto.cpp
@@ -278,7 +278,7 @@ void CAuto::CheckInterface(CWindow *pw, EventMsg event, bool bState)
void CAuto::EnableInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
@@ -290,7 +290,7 @@ void CAuto::EnableInterface(CWindow *pw, EventMsg event, bool bState)
void CAuto::VisibleInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
@@ -302,7 +302,7 @@ void CAuto::VisibleInterface(CWindow *pw, EventMsg event, bool bState)
void CAuto::DeadInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
diff --git a/src/object/auto/autoenergy.cpp b/src/object/auto/autoenergy.cpp
index 37c2f29..409e282 100644
--- a/src/object/auto/autoenergy.cpp
+++ b/src/object/auto/autoenergy.cpp
@@ -142,7 +142,7 @@ bool CAutoEnergy::EventProcess(const Event &event)
}
return true;
}
-
+
UpdateInterface(event.rTime);
EventProgress(event.rTime);
@@ -332,7 +332,7 @@ bool CAutoEnergy::EventProcess(const Event &event)
m_speed = 1.0f/5.0f;
}
}
-
+
if ( m_phase == AENP_SMOKE )
{
if ( m_progress < 1.0f )
diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp
index 4239f49..270ec09 100644
--- a/src/object/auto/autolabo.cpp
+++ b/src/object/auto/autolabo.cpp
@@ -511,7 +511,7 @@ void CAutoLabo::UpdateInterface()
void CAutoLabo::OkayButton(CWindow *pw, EventMsg event)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp
index bc6dbd0..410e6ac 100644
--- a/src/object/auto/autoresearch.cpp
+++ b/src/object/auto/autoresearch.cpp
@@ -388,7 +388,7 @@ void CAutoResearch::UpdateInterface()
DeadInterface(pw, EVENT_OBJECT_RPHAZER, g_researchEnable&RESEARCH_PHAZER);
DeadInterface(pw, EVENT_OBJECT_RSHIELD, g_researchEnable&RESEARCH_SHIELD);
DeadInterface(pw, EVENT_OBJECT_RATOMIC, g_researchEnable&RESEARCH_ATOMIC);
-
+
OkayButton(pw, EVENT_OBJECT_RTANK);
OkayButton(pw, EVENT_OBJECT_RFLY);
OkayButton(pw, EVENT_OBJECT_RTHUMP);
@@ -446,7 +446,7 @@ void CAutoResearch::UpdateInterface(float rTime)
void CAutoResearch::OkayButton(CWindow *pw, EventMsg event)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
@@ -601,7 +601,7 @@ bool CAutoResearch::Read(char *line)
m_lastUpdateTime = 0.0f;
m_lastParticule = 0.0f;
-
+
return true;
}
diff --git a/src/object/brain.cpp b/src/object/brain.cpp
index b720992..ef55e73 100644
--- a/src/object/brain.cpp
+++ b/src/object/brain.cpp
@@ -859,7 +859,7 @@ bool CBrain::IntroduceVirus()
}
// Active Virus indicates that the object is contaminated. Unlike ch'tites (??? - Programerus)
-// letters which automatically disappear after a while,
+// letters which automatically disappear after a while,
// ActiveVirus does not disappear after you edit the program
// (Even if the virus is not fixed).
@@ -2535,7 +2535,7 @@ void CBrain::CheckInterface(CWindow *pw, EventMsg event, bool bState)
void CBrain::EnableInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
@@ -2547,7 +2547,7 @@ void CBrain::EnableInterface(CWindow *pw, EventMsg event, bool bState)
void CBrain::DeadInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
@@ -2559,7 +2559,7 @@ void CBrain::DeadInterface(CWindow *pw, EventMsg event, bool bState)
void CBrain::DefaultEnter(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
-
+
control = pw->SearchControl(event);
if ( control == 0 ) return;
diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp
index 5ffa63c..e0dffc4 100644
--- a/src/object/motion/motion.cpp
+++ b/src/object/motion/motion.cpp
@@ -99,7 +99,7 @@ bool CMotion::EventProcess(const Event &event)
m_engine->RetPause() ) return true;
if ( event.event != EVENT_FRAME ) return true;
-
+
m_progress += event.rTime*m_actionTime;
if ( m_progress > 1.0f ) m_progress = 1.0f; // (*)
diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp
index 06db454..ba3003a 100644
--- a/src/object/motion/motionhuman.cpp
+++ b/src/object/motion/motionhuman.cpp
@@ -912,7 +912,7 @@ bool CMotionHuman::EventFrame(const Event &event)
{
armAction = MH_MARCHTAKE; // take walking
}
-
+
if ( m_physics->RetLand() ) // on the ground?
{
a = m_object->RetAngleY(0);
@@ -944,7 +944,7 @@ bool CMotionHuman::EventFrame(const Event &event)
ar = 0.0f;
af = 0.0f;
}
-
+
for ( i=0 ; i<4 ; i++ ) // 4 members
{
if ( m_bArmStop ) // focus?
diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp
index f64570e..7654159 100644
--- a/src/object/motion/motiontoto.cpp
+++ b/src/object/motion/motiontoto.cpp
@@ -605,7 +605,7 @@ bool CMotionToto::EventFrame(const Event &event)
pos.z += sinf(m_time*Math::PI*2.11f)*(Math::PI/50.0f)+
sinf(m_time*Math::PI*2.83f)*(Math::PI/70.0f)+
sinf(m_time*Math::PI*3.09f)*(Math::PI/90.0f);
-
+
m_object->SetAngle(4, pos); // left antenna
m_object->SetAngle(5, pos); // left antenna
m_object->SetAngle(6, pos); // left antenna
@@ -623,7 +623,7 @@ bool CMotionToto::EventFrame(const Event &event)
pos.z += sinf(m_time*Math::PI*2.05f)*(Math::PI/50.0f)+
sinf(m_time*Math::PI*2.38f)*(Math::PI/70.0f)+
sinf(m_time*Math::PI*2.79f)*(Math::PI/90.0f);
-
+
m_object->SetAngle(7, pos); // right antenna
m_object->SetAngle(8, pos); // right antenna
m_object->SetAngle(9, pos); // right antenna
@@ -716,7 +716,7 @@ bool CMotionToto::EventFrame(const Event &event)
m_object->SetAngleX(2, 0.0f);
m_object->SetAngleX(3, 0.0f);
}
-
+
mat = m_object->RetWorldMatrix(0); // must be done every time!
// Generates particles.
@@ -741,7 +741,7 @@ bool CMotionToto::EventFrame(const Event &event)
speed.y += 5.0f+Math::Rand()*5.0f;
speed.x += Math::Rand()*2.0f;
speed.z += (Math::Rand()-0.5f)*2.0f;
-
+
pos = Transform(*mat, pos);
speed = Transform(*mat, speed)-pos;
@@ -759,7 +759,7 @@ bool CMotionToto::EventFrame(const Event &event)
speed.y -= (1.5f+Math::Rand()*1.5f) + vibLin.y;
speed.x += (Math::Rand()-0.5f)*2.0f;
speed.z += (Math::Rand()-0.5f)*2.0f;
-
+
// mat = m_object->RetWorldMatrix(0);
pos = Transform(*mat, pos);
speed = Transform(*mat, speed)-pos;
diff --git a/src/object/object.cpp b/src/object/object.cpp
index 692a9c9..18e843b 100644
--- a/src/object/object.cpp
+++ b/src/object/object.cpp
@@ -775,7 +775,7 @@ bool CObject::ExploObject(ExploType type, float force, float decay)
m_main->DeselectAll();
}
DeleteDeselList(this);
-
+
if ( m_botVar != 0 )
{
if ( m_type == OBJECT_STONE ||
@@ -1140,7 +1140,7 @@ bool CObject::Write(char *line)
else sprintf(name, ";%.2f", value);
strcat(line, name);
}
-
+
if ( m_motion != 0 )
{
m_motion->Write(line);
@@ -1230,7 +1230,7 @@ bool CObject::Read(char *line)
if ( value == NAN ) break;
SetCmdLine(i, value);
}
-
+
if ( m_motion != 0 )
{
m_motion->Read(line);
@@ -2417,7 +2417,7 @@ bool CObject::CreateBuilding(Math::Vector pos, float angle, float height,
pModFile->CreateEngineObject(rank);
SetPosition(4, Math::Vector(35.0f, 0.0f, 0.0f));
SetAngleY(4, -55.0f*Math::PI/180.0f);
-
+
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(5, rank);
@@ -2444,7 +2444,7 @@ bool CObject::CreateBuilding(Math::Vector pos, float angle, float height,
pModFile->CreateEngineObject(rank);
SetPosition(7, Math::Vector(35.0f, 0.0f, 0.0f));
SetAngleY(7, 55.0f*Math::PI/180.0f);
-
+
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEDESCENDANT);
SetObjectRank(8, rank);
@@ -5554,7 +5554,7 @@ bool CObject::CreateApollo(Math::Vector pos, float angle, ObjectType type)
CreateShadowCircle(16.0f, 0.5f);
}
- if ( type == OBJECT_APOLLO2 ) // jeep
+ if ( type == OBJECT_APOLLO2 ) // jeep
{
rank = m_engine->CreateObject();
m_engine->SetObjectType(rank, TYPEFIX); //it is a stationary object
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index d519688..1929f6d 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -151,7 +151,7 @@ bool rPoint(CBotVar* pThis, CBotVar* var, CBotVar* pResult, int& Exception)
pX->SetValFloat( var->GivValFloat() );
var = var->GivNext();
- if ( var == NULL )
+ if ( var == NULL )
{
Exception = CBotErrLowParam; return false;
}
@@ -288,18 +288,18 @@ CRobotMain::CRobotMain(CInstanceManager* iMan)
if ( GetProfileFloat("Edit", "WindowPos.y", fValue) ) m_windowPos.y = fValue;
if ( GetProfileFloat("Edit", "WindowDim.x", fValue) ) m_windowDim.x = fValue;
if ( GetProfileFloat("Edit", "WindowDim.y", fValue) ) m_windowDim.y = fValue;
-
+
m_IOPublic = false;
m_IODim = Math::Point(320.0f/640.0f, (121.0f+18.0f*8)/480.0f);
m_IOPos.x = (1.0f-m_IODim.x)/2.0f; // in the middle
m_IOPos.y = (1.0f-m_IODim.y)/2.0f;
-
+
if ( GetProfileInt ("Edit", "IOPublic", iValue) ) m_IOPublic = iValue;
if ( GetProfileFloat("Edit", "IOPos.x", fValue) ) m_IOPos.x = fValue;
if ( GetProfileFloat("Edit", "IOPos.y", fValue) ) m_IOPos.y = fValue;
if ( GetProfileFloat("Edit", "IODim.x", fValue) ) m_IODim.x = fValue;
if ( GetProfileFloat("Edit", "IODim.y", fValue) ) m_IODim.y = fValue;
-
+
m_short->FlushShortcuts();
InitEye();
@@ -5978,10 +5978,10 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
sprintf(line, "Title text=\"%s\"\n", info);
fputs(line, file);
-
+
sprintf(line, "Version maj=%d min=%d\n", 0, 1);
fputs(line, file);
-
+
name = m_dialog->RetSceneName();
if ( strcmp(name, "user") == 0 )
{
@@ -6004,7 +6004,7 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info)
sprintf(line, "BlitzMode sleep=%.2f delay=%.2f magnetic=%.2f progress=%.2f\n", sleep, delay, magnetic/g_unit, progress);
fputs(line, file);
}
-
+
objRank = 0;
for ( i=0 ; i<1000000 ; i++ )
{
@@ -6136,7 +6136,7 @@ CObject* CRobotMain::IOReadObject(char *line, char* filename, int objRank)
#else
LoadFileScript(pObj, filename, objRank, i);
#endif
-
+
run = OpInt(line, "run", -1);
if ( run != -1 )
{
diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp
index 25936f9..ecbf898 100644
--- a/src/object/task/taskbuild.cpp
+++ b/src/object/task/taskbuild.cpp
@@ -371,7 +371,7 @@ Error CTaskBuild::Start(ObjectType type)
m_metal->SetLock(true); // not usable
m_camera->StartCentering(m_object, Math::PI*0.15f, 99.9f, 0.0f, 1.0f);
-
+
m_phase = TBP_TURN; // rotation necessary preliminary
m_angleY = oAngle; // angle was reached
diff --git a/src/object/task/taskfire.cpp b/src/object/task/taskfire.cpp
index 8d300e6..92c51da 100644
--- a/src/object/task/taskfire.cpp
+++ b/src/object/task/taskfire.cpp
@@ -316,7 +316,7 @@ Error CTaskFire::Start(float delay)
else if ( m_bRay ) fire = m_delay*ENERGY_FIREr;
else fire = m_delay*ENERGY_FIRE;
if ( energy < fire/power->RetCapacity()+0.05f ) return ERR_FIRE_ENERGY;
-
+
m_speed = 1.0f/m_delay;
m_progress = 0.0f;
m_time = 0.0f;
diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp
index a3b1515..5fd6cbe 100644
--- a/src/object/task/taskgoto.cpp
+++ b/src/object/task/taskgoto.cpp
@@ -1441,7 +1441,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir)
if ( pObj == m_object ) continue;
if ( pObj->RetTruck() != 0 ) continue;
-
+
oPos = pObj->RetPosition(0);
dist = Math::Distance(oPos, m_goalObject);
if ( dist <= 1.0f ) continue;
@@ -1601,7 +1601,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir)
{
addi = 2.0f; // between wasps, do not annoy too much
}
-
+
j = 0;
while ( pObj->GetCrashSphere(j++, oPos, oRadius) )
{
@@ -1791,10 +1791,10 @@ Error CTaskGoto::BeamExplore(const Math::Vector &prevPos, const Math::Vector &cu
Math::Vector newPos;
Error ret;
int iDiv, iClear, iLar;
-
+
iLar = 0;
if ( i >= MAXPOINTS ) return ERR_GOTO_ITER; // too many recursions
-
+
if ( m_bmIter[i] == -1 )
{
m_bmIter[i] = 0;
@@ -1828,7 +1828,7 @@ Error CTaskGoto::BeamExplore(const Math::Vector &prevPos, const Math::Vector &cu
}
}
}
-
+
if ( iLar >= m_bmIter[i] )
{
newPos = BeamPoint(curPos, goalPos, 0, step);
@@ -2051,7 +2051,7 @@ void CTaskGoto::BitmapObject()
if ( pObj == m_object ) continue;
if ( pObj == m_bmFretObject ) continue;
if ( pObj->RetTruck() != 0 ) continue;
-
+
h = m_terrain->RetFloorLevel(pObj->RetPosition(0), false);
if ( m_physics->RetType() == TYPE_FLYING && m_altitude > 0.0f )
{
@@ -2177,7 +2177,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy)
{
aLimit = 60.0f*Math::PI/180.0f;
}
-
+
for ( y=miny ; y<=maxy ; y++ )
{
for ( x=minx ; x<=maxx ; x++ )
diff --git a/src/object/task/taskrecover.cpp b/src/object/task/taskrecover.cpp
index 8f603f7..02cefb8 100644
--- a/src/object/task/taskrecover.cpp
+++ b/src/object/task/taskrecover.cpp
@@ -189,7 +189,7 @@ Error CTaskRecover::Start()
if ( power == 0 ) return ERR_RECOVER_ENERGY;
energy = power->RetEnergy();
if ( energy < ENERGY_RECOVER/power->RetCapacity()+0.05f ) return ERR_RECOVER_ENERGY;
-
+
mat = m_object->RetWorldMatrix(0);
pos = Math::Vector(RECOVER_DIST, 3.3f, 0.0f);
pos = Transform(*mat, pos); // position in front
diff --git a/src/object/task/taskshield.cpp b/src/object/task/taskshield.cpp
index d5265a2..aa62f7b 100644
--- a/src/object/task/taskshield.cpp
+++ b/src/object/task/taskshield.cpp
@@ -257,7 +257,7 @@ Error CTaskShield::Start(TaskShieldMode mode, float delay)
if ( power == 0 ) return ERR_SHIELD_ENERGY;
energy = power->RetEnergy();
if ( energy == 0.0f ) return ERR_SHIELD_ENERGY;
-
+
mat = m_object->RetWorldMatrix(0);
pos = Math::Vector(7.0f, 15.0f, 0.0f);
pos = Transform(*mat, pos); // sphere position
diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp
index 94e3b75..3a16008 100644
--- a/src/object/task/taskterraform.cpp
+++ b/src/object/task/taskterraform.cpp
@@ -216,7 +216,7 @@ Error CTaskTerraform::Start()
if ( power == 0 ) return ERR_TERRA_ENERGY;
energy = power->RetEnergy();
if ( energy < ENERGY_TERRA/power->RetCapacity()+0.05f ) return ERR_TERRA_ENERGY;
-
+
speed = m_physics->RetMotorSpeed();
if ( speed.x != 0.0f ||
speed.z != 0.0f ) return ERR_MANIP_MOTOR;