summaryrefslogtreecommitdiffstats
path: root/src/planet.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/planet.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/planet.h')
-rw-r--r--src/planet.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/planet.h b/src/planet.h
new file mode 100644
index 0000000..263926f
--- /dev/null
+++ b/src/planet.h
@@ -0,0 +1,60 @@
+// planet.h
+
+#ifndef _PLANET_H_
+#define _PLANET_H_
+
+
+class CInstanceManager;
+class CD3DEngine;
+
+
+
+#define MAXPLANET 10
+
+typedef struct
+{
+ char bUsed; // TRUE -> planète existe
+ FPOINT start; // position initiale en degrés
+ FPOINT angle; // position actuelle en degrés
+ float dim; // dimensions (0..1)
+ float speed; // vitesse
+ float dir; // direction dans le ciel
+ char name[20]; // nom de la texture
+ FPOINT uv1, uv2; // mapping de la texture
+ char bTGA; // texture .TGA
+}
+Planet;
+
+
+
+
+class CPlanet
+{
+public:
+ CPlanet(CInstanceManager* iMan, CD3DEngine* engine);
+ ~CPlanet();
+
+ void Flush();
+ BOOL EventProcess(const Event &event);
+ BOOL Create(int mode, FPOINT start, float dim, float speed, float dir, char *name, FPOINT uv1, FPOINT uv2);
+ BOOL PlanetExist();
+ void LoadTexture();
+ void Draw();
+ void SetMode(int mode);
+ int RetMode();
+
+protected:
+ BOOL EventFrame(const Event &event);
+
+protected:
+ CInstanceManager* m_iMan;
+ CD3DEngine* m_engine;
+
+ float m_time;
+ int m_mode;
+ Planet m_planet[2][MAXPLANET];
+ BOOL m_bPlanetExist;
+};
+
+
+#endif //_PLANET_H_