summaryrefslogtreecommitdiffstats
path: root/src/motionvehicle.h
diff options
context:
space:
mode:
authoradiblol <adiblol@1tbps.org>2012-03-08 19:32:05 +0100
committeradiblol <adiblol@1tbps.org>2012-03-08 19:32:05 +0100
commita4c804b49ec872b71bd5a0167c3ad45704a3cc30 (patch)
tree8c931235247d662ca46a99695beb328fdfc8e8a8 /src/motionvehicle.h
downloadcolobot-a4c804b49ec872b71bd5a0167c3ad45704a3cc30.tar.gz
colobot-a4c804b49ec872b71bd5a0167c3ad45704a3cc30.tar.bz2
colobot-a4c804b49ec872b71bd5a0167c3ad45704a3cc30.zip
Initial commit, Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
Diffstat (limited to 'src/motionvehicle.h')
-rw-r--r--src/motionvehicle.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/motionvehicle.h b/src/motionvehicle.h
new file mode 100644
index 0000000..f7bbf0a
--- /dev/null
+++ b/src/motionvehicle.h
@@ -0,0 +1,63 @@
+// motionvehicle.h
+
+#ifndef _MOTIONVEHICLE_H_
+#define _MOTIONVEHICLE_H_
+
+
+class CInstanceManager;
+class CEngine;
+class CLight;
+class CParticule;
+class CTerrain;
+class CCamera;
+class CBrain;
+class CPhysics;
+class CObject;
+
+
+class CMotionVehicle : public CMotion
+{
+public:
+ CMotionVehicle(CInstanceManager* iMan, CObject* object);
+ ~CMotionVehicle();
+
+ void DeleteObject(BOOL bAll=FALSE);
+ BOOL Create(D3DVECTOR pos, float angle, ObjectType type, float power);
+ BOOL EventProcess(const Event &event);
+
+ BOOL RetTraceDown();
+ void SetTraceDown(BOOL bDown);
+ int RetTraceColor();
+ void SetTraceColor(int color);
+ float RetTraceWidth();
+ void SetTraceWidth(float width);
+
+protected:
+ void CreatePhysics(ObjectType type);
+ BOOL EventFrame(const Event &event);
+ BOOL EventFrameFly(const Event &event);
+ BOOL EventFrameInsect(const Event &event);
+ BOOL EventFrameCanoni(const Event &event);
+ void UpdateTrackMapping(float left, float right, ObjectType type);
+
+protected:
+ float m_wheelTurn[4];
+ float m_flyPaw[3];
+ float m_posTrackLeft;
+ float m_posTrackRight;
+ int m_partiReactor;
+ float m_armTimeAbs;
+ float m_armMember;
+ float m_canonTime;
+ float m_lastTimeCanon;
+ D3DVECTOR m_wheelLastPos;
+ D3DVECTOR m_wheelLastAngle;
+ D3DVECTOR m_posKey;
+ BOOL m_bFlyFix;
+ BOOL m_bTraceDown;
+ int m_traceColor;
+ float m_traceWidth;
+};
+
+
+#endif //_MOTIONVEHICLE_H_