summaryrefslogtreecommitdiffstats
path: root/src/autoportico.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/autoportico.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/autoportico.h')
-rw-r--r--src/autoportico.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/autoportico.h b/src/autoportico.h
new file mode 100644
index 0000000..611a4b2
--- /dev/null
+++ b/src/autoportico.h
@@ -0,0 +1,61 @@
+// autoportico.h
+
+#ifndef _AUTOPORTICO_H_
+#define _AUTOPORTICO_H_
+
+
+class CInstanceManager;
+class CD3DEngine;
+class CParticule;
+class CTerrain;
+class CCamera;
+class CObject;
+
+
+
+enum AutoPorticoPhase
+{
+ APOP_WAIT = 1, // attend
+ APOP_START = 2, // départ de l'action
+ APOP_MOVE = 3, // avance
+ APOP_WAIT1 = 4, // attend
+ APOP_DOWN = 5, // descend
+ APOP_WAIT2 = 6, // attend
+ APOP_OPEN = 7, // ouvre
+};
+
+
+
+class CAutoPortico : public CAuto
+{
+public:
+ CAutoPortico(CInstanceManager* iMan, CObject* object);
+ ~CAutoPortico();
+
+ void DeleteObject(BOOL bAll=FALSE);
+
+ void Init();
+ void Start(int param);
+ BOOL EventProcess(const Event &event);
+ BOOL Abort();
+ Error RetError();
+
+protected:
+ void UpdateTrackMapping(float left, float right);
+
+protected:
+ AutoPorticoPhase m_phase;
+ float m_progress;
+ float m_speed;
+ float m_cameraProgress;
+ float m_cameraSpeed;
+ float m_lastParticule;
+ D3DVECTOR m_finalPos;
+ D3DVECTOR m_startPos;
+ float m_posTrack;
+ int m_param;
+ int m_soundChannel;
+};
+
+
+#endif //_AUTOPORTICO_H_