diff options
Diffstat (limited to 'src/object/motion')
-rw-r--r-- | src/object/motion/motionant.cpp | 2 | ||||
-rw-r--r-- | src/object/motion/motionant.h | 29 | ||||
-rw-r--r-- | src/object/motion/motionbee.cpp | 2 | ||||
-rw-r--r-- | src/object/motion/motionbee.h | 16 | ||||
-rw-r--r-- | src/object/motion/motionhuman.cpp | 4 | ||||
-rw-r--r-- | src/object/motion/motionhuman.h | 54 | ||||
-rw-r--r-- | src/object/motion/motionmother.cpp | 2 | ||||
-rw-r--r-- | src/object/motion/motionspider.cpp | 2 | ||||
-rw-r--r-- | src/object/motion/motionspider.h | 24 | ||||
-rw-r--r-- | src/object/motion/motiontoto.cpp | 2 | ||||
-rw-r--r-- | src/object/motion/motiontoto.h | 11 | ||||
-rw-r--r-- | src/object/motion/motionvehicle.cpp | 4 | ||||
-rw-r--r-- | src/object/motion/motionworm.cpp | 8 |
13 files changed, 91 insertions, 69 deletions
diff --git a/src/object/motion/motionant.cpp b/src/object/motion/motionant.cpp index 0f6543a..3caf79a 100644 --- a/src/object/motion/motionant.cpp +++ b/src/object/motion/motionant.cpp @@ -44,7 +44,7 @@ #define ADJUST_ANGLE false // true -> adjusts the angles of the members
-#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motionant.h b/src/object/motion/motionant.h index 084a9a9..dc969fe 100644 --- a/src/object/motion/motionant.h +++ b/src/object/motion/motionant.h @@ -32,19 +32,24 @@ class CBrain; class CPhysics;
class CObject;
+enum MotionAntAction
+{
+ MA_MARCH = 0,
+ MA_STOP = 1,
+ MA_SPEC = 2
+};
-#define MA_MARCH 0
-#define MA_STOP 1
-#define MA_SPEC 2
-
-#define MAS_PREPARE 0
-#define MAS_FIRE 1
-#define MAS_TERMINATE 2
-#define MAS_BURN 3
-#define MAS_RUIN 4
-#define MAS_BACK1 5
-#define MAS_BACK2 6
-#define MAS_BACK3 7
+enum MotionAntSpecialAction
+{
+ MAS_PREPARE = 0,
+ MAS_FIRE = 1,
+ MAS_TERMINATE = 2,
+ MAS_BURN = 3,
+ MAS_RUIN = 4,
+ MAS_BACK1 = 5,
+ MAS_BACK2 = 6,
+ MAS_BACK3 = 7
+};
class CMotionAnt : public CMotion
diff --git a/src/object/motion/motionbee.cpp b/src/object/motion/motionbee.cpp index 7f3da7a..9167bbc 100644 --- a/src/object/motion/motionbee.cpp +++ b/src/object/motion/motionbee.cpp @@ -44,7 +44,7 @@ #define ADJUST_ANGLE false // true -> adjusts the angles of the members
-#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motionbee.h b/src/object/motion/motionbee.h index a62f2ba..5c69bff 100644 --- a/src/object/motion/motionbee.h +++ b/src/object/motion/motionbee.h @@ -33,12 +33,18 @@ class CPhysics; class CObject;
-#define MB_MARCH 0
-#define MB_SPEC 1
+enum MotionBeeAction
+{
+ MB_MARCH = 0,
+ MB_SPEC = 1
+};
-#define MBS_HOLD 0
-#define MBS_BURN 1
-#define MBS_RUIN 2
+enum MotionBeeSpecialAction
+{
+ MBS_HOLD = 0,
+ MBS_BURN = 1,
+ MBS_RUIN = 2
+};
class CMotionBee : public CMotion
diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index 02e4dd3..6667a39 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -46,9 +46,9 @@ #define ADJUST_ANGLE false // true -> adjusts the angles of the members
-#define ADJUST_ACTION (3*3*3*3*MH_SPEC+3*3*3*MHS_SATCOM)
+const int ADJUST_ACTION = (3*3*3*3*MH_SPEC+3*3*3*MHS_SATCOM);
-#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motionhuman.h b/src/object/motion/motionhuman.h index e563a81..1fc8d57 100644 --- a/src/object/motion/motionhuman.h +++ b/src/object/motion/motionhuman.h @@ -34,30 +34,36 @@ class CPhysics; class CObject;
-#define MH_MARCH 0
-#define MH_MARCHTAKE 1
-#define MH_TURN 2
-#define MH_STOP 3
-#define MH_FLY 4
-#define MH_SWIM 5
-#define MH_SPEC 6
-
-#define MHS_FIRE 0
-#define MHS_GUN 1
-#define MHS_TAKE 2
-#define MHS_TAKEOTHER 3
-#define MHS_TAKEHIGH 4
-#define MHS_UPRIGHT 5
-#define MHS_WIN 6
-#define MHS_LOST 7
-#define MHS_DEADg 8
-#define MHS_DEADg1 9
-#define MHS_DEADg2 10
-#define MHS_DEADg3 11
-#define MHS_DEADg4 12
-#define MHS_DEADw 13
-#define MHS_FLAG 14
-#define MHS_SATCOM 15
+enum MotionHumanAction
+{
+ MH_MARCH = 0,
+ MH_MARCHTAKE = 1,
+ MH_TURN = 2,
+ MH_STOP = 3,
+ MH_FLY = 4,
+ MH_SWIM = 5,
+ MH_SPEC = 6
+};
+
+enum MotionHumanSpecialAction
+{
+ MHS_FIRE = 0,
+ MHS_GUN = 1,
+ MHS_TAKE = 2,
+ MHS_TAKEOTHER = 3,
+ MHS_TAKEHIGH = 4,
+ MHS_UPRIGHT = 5,
+ MHS_WIN = 6,
+ MHS_LOST = 7,
+ MHS_DEADg = 8,
+ MHS_DEADg1 = 9,
+ MHS_DEADg2 = 10,
+ MHS_DEADg3 = 11,
+ MHS_DEADg4 = 12,
+ MHS_DEADw = 13,
+ MHS_FLAG = 14,
+ MHS_SATCOM = 15
+};
class CMotionHuman : public CMotion
diff --git a/src/object/motion/motionmother.cpp b/src/object/motion/motionmother.cpp index 6db0a8b..cd5fb7c 100644 --- a/src/object/motion/motionmother.cpp +++ b/src/object/motion/motionmother.cpp @@ -44,7 +44,7 @@ #define ADJUST_ANGLE false // true -> adjusts the angles of the members
-#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motionspider.cpp b/src/object/motion/motionspider.cpp index 2671933..08eb546 100644 --- a/src/object/motion/motionspider.cpp +++ b/src/object/motion/motionspider.cpp @@ -44,7 +44,7 @@ #define ADJUST_ANGLE false // true -> adjusts the angles of the members
-#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motionspider.h b/src/object/motion/motionspider.h index bda769d..6f18e07 100644 --- a/src/object/motion/motionspider.h +++ b/src/object/motion/motionspider.h @@ -33,16 +33,22 @@ class CPhysics; class CObject;
-#define MS_MARCH 0
-#define MS_STOP 1
-#define MS_SPEC 2
+enum MotionSpiderAction
+{
+ MS_MARCH = 0,
+ MS_STOP = 1,
+ MS_SPEC = 2
+};
-#define MSS_BURN 0
-#define MSS_RUIN 1
-#define MSS_EXPLO 2
-#define MSS_BACK1 3
-#define MSS_BACK2 4
-#define MSS_BACK3 5
+enum MotionSpiderSpecialAction
+{
+ MSS_BURN = 0,
+ MSS_RUIN = 1,
+ MSS_EXPLO = 2,
+ MSS_BACK1 = 3,
+ MSS_BACK2 = 4,
+ MSS_BACK3 = 5
+};
class CMotionSpider : public CMotion
diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index 64ff021..317d2ab 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -44,7 +44,7 @@ -#define START_TIME 1000.0f // beginning of the relative time
+const float START_TIME = 1000.0f; // beginning of the relative time
diff --git a/src/object/motion/motiontoto.h b/src/object/motion/motiontoto.h index 1c7f871..935e4a5 100644 --- a/src/object/motion/motiontoto.h +++ b/src/object/motion/motiontoto.h @@ -34,10 +34,13 @@ class CBrain; class CPhysics;
-#define MT_ERROR 0
-#define MT_WARNING 1
-#define MT_INFO 2
-#define MT_MESSAGE 3
+enum MotionTotoAction
+{
+ MT_ERROR = 0,
+ MT_WARNING = 1,
+ MT_INFO = 2,
+ MT_MESSAGE = 3
+};
class CMotionToto : public CMotion
diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 56eab8d..4bd91d0 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -43,10 +43,6 @@ -#define ARM_NEUTRAL_ANGLE1 110.0f*PI/180.0f
-#define ARM_NEUTRAL_ANGLE2 -130.0f*PI/180.0f
-#define ARM_NEUTRAL_ANGLE3 -50.0f*PI/180.0f
-
// Object's constructor.
diff --git a/src/object/motion/motionworm.cpp b/src/object/motion/motionworm.cpp index dc33e6e..fc5dc35 100644 --- a/src/object/motion/motionworm.cpp +++ b/src/object/motion/motionworm.cpp @@ -43,10 +43,10 @@ -#define START_TIME 1000.0f // beginning of the relative time
-#define TIME_UPDOWN 2.0f // time for up / down
-#define DOWN_ALTITUDE 3.0f // underground distance
-#define WORM_PART 7 // number of parts of a worm
+const float START_TIME = 1000.0f; // beginning of the relative time
+const float TIME_UPDOWN = 2.0f; // time for up / down
+const float DOWN_ALTITUDE = 3.0f; // underground distance
+const int WORM_PART = 7; // number of parts of a worm
|