Turn move status into an enum

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8048 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2009-08-24 14:19:00 +00:00 committed by Git SVN Gateway
parent 42e16a3ab4
commit ab7d5aa9af
2 changed files with 22 additions and 20 deletions

View File

@ -26,20 +26,6 @@
#include "objectdef.h"
#define MOVEINACTIVE 0
#define MOVENAVIGATE 1
#define MOVETURN 2
#define MOVEPAUSE 3
#define MOVEPOINTTOPOINT 4
#define MOVETURNSTOP 5
#define MOVETURNTOTARGET 6
#define MOVEROUTE 7
#define MOVEHOVER 8
#define MOVEDRIVE 9
#define MOVEWAITROUTE 11
#define MOVESHUFFLE 12
#define MOVEROUTESHUFFLE 13
/* The base movement speed */
extern float baseSpeed;

View File

@ -27,16 +27,32 @@
//Watermelon:num of VTOL weapons should be same as DROID_MAXWEAPS
#define VTOL_MAXWEAPS 3
typedef enum _move_status
{
MOVEINACTIVE,
MOVENAVIGATE,
MOVETURN,
MOVEPAUSE,
MOVEPOINTTOPOINT,
MOVETURNSTOP,
MOVETURNTOTARGET,
MOVEROUTE,
MOVEHOVER,
MOVEDRIVE,
MOVEWAITROUTE,
MOVESHUFFLE,
MOVEROUTESHUFFLE,
} MOVE_STATUS;
typedef struct _move_control
{
UBYTE Status; // Inactive, Navigating or moving point to point status
UBYTE Position; // Position in asPath
UBYTE numPoints; // number of points in asPath
Vector2i *asPath; // Pointer to list of block X,Y map coordinates.
MOVE_STATUS Status; // Inactive, Navigating or moving point to point status
uint16_t Position; // Position in asPath
uint16_t numPoints; // number of points in asPath
Vector2i *asPath; // Pointer to list of block X,Y map coordinates.
SDWORD DestinationX, DestinationY; // World coordinates of movement destination
SDWORD srcX,srcY,targetX,targetY;
/* Stuff for John's movement update */
float fx,fy; // droid location as a fract
float speed; // Speed of motion
SWORD boundX,boundY; // Vector for the end of path boundary