summaryrefslogtreecommitdiffstats
path: root/src/object/auto/autohuston.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/auto/autohuston.cpp')
-rw-r--r--src/object/auto/autohuston.cpp59
1 files changed, 30 insertions, 29 deletions
diff --git a/src/object/auto/autohuston.cpp b/src/object/auto/autohuston.cpp
index a96bcb8..1dd92f0 100644
--- a/src/object/auto/autohuston.cpp
+++ b/src/object/auto/autohuston.cpp
@@ -1,5 +1,6 @@
// * This file is part of the COLOBOT source code
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
+// * Copyright (C) 2012 Polish Portal of Colobot (PPC)
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
@@ -38,11 +39,11 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
m_lens[i].parti = -1;
}
- pos = m_object->RetPosition(0);
- m_lens[0].type = PARTISELR;
- m_lens[1].type = PARTISELR;
- m_lens[2].type = PARTISELR;
- m_lens[3].type = PARTISELR;
+ pos = m_object->GetPosition(0);
+ m_lens[0].type = Gfx::PARTISELR;
+ m_lens[1].type = Gfx::PARTISELR;
+ m_lens[2].type = Gfx::PARTISELR;
+ m_lens[3].type = Gfx::PARTISELR;
m_lens[0].pos = pos+Math::Vector(0.0f+13.0f, 34.0f, 30.0f );
m_lens[1].pos = pos+Math::Vector(0.0f-13.0f, 34.0f, 30.0f );
m_lens[2].pos = pos+Math::Vector(0.0f , 34.0f, 30.0f+13.0f);
@@ -62,46 +63,46 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
// Part under the radar.
i = 4;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 9.9f, 40.1f);
m_lens[i].dim = 1.8f;
m_lens[i].total = 0.4f;
m_lens[i].off = 0.2f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 7.2f, 34.8f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.7f;
m_lens[i].off = 0.3f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 34.3f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.7f;
m_lens[i].off = 0.3f;
i ++;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.4f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.0f;
m_lens[i].off = 0.0f;
i ++;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.0f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 1.0f;
m_lens[i].off = 0.5f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 8.5f, 14.0f);
m_lens[i].dim = 1.2f;
m_lens[i].total = 0.8f;
m_lens[i].off = 0.2f;
i ++;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(4.0f, 6.0f, 8.6f);
m_lens[i].dim = 1.0f;
m_lens[i].total = 0.9f;
@@ -109,53 +110,53 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
i ++;
// Part with three windows.
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 9.9f, -19.9f);
m_lens[i].dim = 1.0f;
m_lens[i].total = 0.6f;
m_lens[i].off = 0.3f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 7.2f, 34.8f-60.0f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.7f;
m_lens[i].off = 0.3f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 34.3f-60.0f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.0f;
m_lens[i].off = 0.0f;
i ++;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.4f-60.0f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.6f;
m_lens[i].off = 0.4f;
i ++;
- m_lens[i].type = PARTISELR;
+ m_lens[i].type = Gfx::PARTISELR;
m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.0f-60.0f);
m_lens[i].dim = 0.4f;
m_lens[i].total = 0.8f;
m_lens[i].off = 0.2f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-6.5f, 13.5f, -37.0f);
m_lens[i].dim = 1.0f;
m_lens[i].total = 0.0f;
m_lens[i].off = 0.0f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 12.2f, -39.8f);
m_lens[i].dim = 1.8f;
m_lens[i].total = 1.5f;
m_lens[i].off = 0.5f;
i ++;
- m_lens[i].type = PARTISELY;
+ m_lens[i].type = Gfx::PARTISELY;
m_lens[i].pos = pos+Math::Vector(-7.0f, 8.5f, -47.0f);
m_lens[i].dim = 0.6f;
m_lens[i].total = 0.7f;
@@ -211,14 +212,14 @@ bool CAutoHuston::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return true;
+ if ( m_engine->GetPause() ) return true;
angle = -m_time*1.0f;
m_object->SetAngleY(1, angle); // rotates the radar
angle = sinf(m_time*4.0f)*0.3f;
m_object->SetAngleX(2, angle);
- if ( event.event != EVENT_FRAME ) return true;
+ if ( event.type != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
@@ -231,7 +232,7 @@ bool CAutoHuston::EventProcess(const Event &event)
{
if ( m_lens[i].parti != -1 )
{
- m_particule->DeleteParticule(m_lens[i].parti);
+ m_particle->DeleteParticle(m_lens[i].parti);
m_lens[i].parti = -1;
}
}
@@ -241,7 +242,7 @@ bool CAutoHuston::EventProcess(const Event &event)
{
dim.x = m_lens[i].dim;
dim.y = dim.x;
- m_lens[i].parti = m_particule->CreateParticule(m_lens[i].pos, speed, dim, m_lens[i].type, 1.0f, 0.0f, 0.0f);
+ m_lens[i].parti = m_particle->CreateParticle(m_lens[i].pos, speed, dim, m_lens[i].type, 1.0f, 0.0f, 0.0f);
}
}
}
@@ -261,7 +262,7 @@ bool CAutoHuston::Abort()
bool CAutoHuston::CreateInterface(bool bSelect)
{
- CWindow* pw;
+ Ui::CWindow* pw;
Math::Point pos, ddim;
float ox, oy, sx, sy;
@@ -269,8 +270,8 @@ bool CAutoHuston::CreateInterface(bool bSelect)
if ( !bSelect ) return true;
- pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return false;
+ pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0));
+ if ( pw == nullptr ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -287,9 +288,9 @@ bool CAutoHuston::CreateInterface(bool bSelect)
}
-// Returns an error due to state of the automation.
+// Geturns an error due to state of the automation.
-Error CAutoHuston::RetError()
+Error CAutoHuston::GetError()
{
return ERR_OK;
}