summaryrefslogtreecommitdiffstats
path: root/src/object/auto/autoroot.cpp
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-09-09 14:28:19 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-09-09 14:28:19 +0200
commit6892d37a4f497821d8059dc40bc6ead4085d66d8 (patch)
tree079cfa9559b0a0c05bdfbd0297d1afe8acd33ad5 /src/object/auto/autoroot.cpp
parentb3d5491af4f953e8d63800897c40d602de9e9305 (diff)
downloadcolobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.tar.gz
colobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.tar.bz2
colobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.zip
[src/object/auto] Folder rewritten
Diffstat (limited to 'src/object/auto/autoroot.cpp')
-rw-r--r--src/object/auto/autoroot.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp
index 9282a01..b43f40b 100644
--- a/src/object/auto/autoroot.cpp
+++ b/src/object/auto/autoroot.cpp
@@ -19,8 +19,8 @@
#include "object/auto/autoroot.h"
-#include "old/particule.h"
-#include "old/terrain.h"
+#include "graphics/engine/particle.h"
+#include "graphics/engine/terrain.h"
#include "math/geometry.h"
@@ -58,9 +58,9 @@ void CAutoRoot::Init()
Math::Point dim;
m_time = 0.0f;
- m_lastParticule = 0.0f;
+ m_lastParticle = 0.0f;
- mat = m_object->RetWorldMatrix(0);
+ mat = m_object->GetWorldMatrix(0);
pos = Math::Vector(-5.0f, 28.0f, -4.0f); // peak position
pos = Math::Transform(*mat, pos);
m_center = pos;
@@ -68,7 +68,7 @@ void CAutoRoot::Init()
speed = Math::Vector(0.0f, 0.0f, 0.0f);
dim.x = 100.0f;
dim.y = dim.x;
- m_particule->CreateParticule(m_center, speed, dim, PARTISPHERE5, 0.5f, 0.0f, 0.0f);
+ m_particle->CreateParticle(m_center, speed, dim, Gfx::PARTISPHERE5, 0.5f, 0.0f, 0.0f);
m_terrain->AddFlyingLimit(pos, 100.0f, 80.0f, pos.y-60.0f);
}
@@ -83,16 +83,16 @@ bool CAutoRoot::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return true;
- if ( event.event != EVENT_FRAME ) return true;
+ if ( m_engine->GetPause() ) return true;
+ if ( event.type != EVENT_FRAME ) return true;
m_object->SetZoomX(1, 1.0f+sinf(m_time*2.0f)*0.2f);
m_object->SetZoomY(1, 1.0f+sinf(m_time*2.3f)*0.2f);
m_object->SetZoomZ(1, 1.0f+sinf(m_time*2.7f)*0.2f);
- if ( m_lastParticule+m_engine->ParticuleAdapt(0.10f) <= m_time )
+ if ( m_lastParticle+m_engine->ParticleAdapt(0.10f) <= m_time )
{
- m_lastParticule = m_time;
+ m_lastParticle = m_time;
pos = m_center;
pos.x += (Math::Rand()-0.5f)*8.0f;
@@ -103,16 +103,16 @@ bool CAutoRoot::EventProcess(const Event &event)
speed.y = Math::Rand()*12.0f;
dim.x = Math::Rand()*6.0f+4.0f;
dim.y = dim.x;
- m_particule->CreateParticule(pos, speed, dim, PARTIROOT, 1.0f, 0.0f, 0.0f);
+ m_particle->CreateParticle(pos, speed, dim, Gfx::PARTIROOT, 1.0f, 0.0f, 0.0f);
}
return true;
}
-// Returns an error due the state of the automation.
+// Geturns an error due the state of the automation.
-Error CAutoRoot::RetError()
+Error CAutoRoot::GetError()
{
return ERR_OK;
}