summaryrefslogtreecommitdiffstats
path: root/src/object/auto/autoroot.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-19 20:11:47 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-19 20:11:47 +0200
commit9f784e81f81651bed087902f9f3afee113e56148 (patch)
treeae89f6dabe2443b39aba292673027d197fc120e6 /src/object/auto/autoroot.cpp
parentb8027ce9a7f050b95846a668a02f5801331e127f (diff)
downloadcolobot-9f784e81f81651bed087902f9f3afee113e56148.tar.gz
colobot-9f784e81f81651bed087902f9f3afee113e56148.tar.bz2
colobot-9f784e81f81651bed087902f9f3afee113e56148.zip
Switched to new implementation of the rest of math module
- changed structs from D3DVECTOR to Math::Vector and from D3DMATRIX to Math::Matrix - changed functions to new Math namespace functions - moved mainmovie module from graphics to object - added Get and Set to Math::Matrix
Diffstat (limited to 'src/object/auto/autoroot.cpp')
-rw-r--r--src/object/auto/autoroot.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp
index 8b16615..df7f0cb 100644
--- a/src/object/auto/autoroot.cpp
+++ b/src/object/auto/autoroot.cpp
@@ -20,6 +20,7 @@
#include <d3d.h>
#include "common/struct.h"
+#include "math/geometry.h"
#include "graphics/d3d/d3dengine.h"
#include "math/old/d3dmath.h"
#include "common/event.h"
@@ -63,19 +64,19 @@ void CAutoRoot::DeleteObject(bool bAll)
void CAutoRoot::Init()
{
- D3DMATRIX* mat;
- D3DVECTOR pos, speed;
+ Math::Matrix* mat;
+ Math::Vector pos, speed;
Math::Point dim;
m_time = 0.0f;
m_lastParticule = 0.0f;
mat = m_object->RetWorldMatrix(0);
- pos = D3DVECTOR(-5.0f, 28.0f, -4.0f); // peak position
- pos = Transform(*mat, pos);
+ pos = Math::Vector(-5.0f, 28.0f, -4.0f); // peak position
+ pos = Math::Transform(*mat, pos);
m_center = pos;
- speed = D3DVECTOR(0.0f, 0.0f, 0.0f);
+ 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);
@@ -88,7 +89,7 @@ void CAutoRoot::Init()
bool CAutoRoot::EventProcess(const Event &event)
{
- D3DVECTOR pos, speed;
+ Math::Vector pos, speed;
Math::Point dim;
CAuto::EventProcess(event);