* #include basedef.h in projectiledef.h as we use some of its contents there
* Don't use tabs for lining things out in columns (use spaces instead, tabs are for indentation only) * Make every comment describing a structure field a Doxygen comment git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3602 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
f22d4e100b
commit
f3bf740ecd
|
@ -24,6 +24,8 @@
|
||||||
#ifndef __INCLUDED_PROJECTILEDEF_H__
|
#ifndef __INCLUDED_PROJECTILEDEF_H__
|
||||||
#define __INCLUDED_PROJECTILEDEF_H__
|
#define __INCLUDED_PROJECTILEDEF_H__
|
||||||
|
|
||||||
|
#include "basedef.h"
|
||||||
|
|
||||||
typedef enum PROJ_STATE
|
typedef enum PROJ_STATE
|
||||||
{
|
{
|
||||||
PROJ_INFLIGHT,
|
PROJ_INFLIGHT,
|
||||||
|
@ -31,38 +33,34 @@ typedef enum PROJ_STATE
|
||||||
PROJ_POSTIMPACT
|
PROJ_POSTIMPACT
|
||||||
} PROJ_STATE;
|
} PROJ_STATE;
|
||||||
|
|
||||||
struct PROJECTILE;
|
|
||||||
|
|
||||||
typedef void (* PROJECTILE_FUNC) ( struct PROJECTILE *psObj );
|
|
||||||
|
|
||||||
typedef struct PROJECTILE
|
typedef struct PROJECTILE
|
||||||
{
|
{
|
||||||
/* Use only simple object elements */
|
/* Use only simple object elements */
|
||||||
SIMPLE_ELEMENTS( struct PROJECTILE );
|
SIMPLE_ELEMENTS( struct PROJECTILE );
|
||||||
|
|
||||||
UBYTE state; /* current projectile state */
|
UBYTE state; ///< current projectile state
|
||||||
UBYTE airTarget; /* whether the projectile was fired at an airborn target */
|
UBYTE airTarget; ///< whether the projectile was fierd at an airborn target
|
||||||
|
|
||||||
UBYTE player; /* needed because damage and radDamage vary
|
UBYTE player; ///< needed because damange and radDamage vary from base stat per player because of upgrades
|
||||||
from base stat per player because of upgrades*/
|
|
||||||
UBYTE bVisible; // whether the selected player should see the projectile
|
|
||||||
|
|
||||||
WEAPON_STATS *psWStats; /* firing weapon stats */
|
UBYTE bVisible; ///< whether the selected player should see the projectile
|
||||||
|
|
||||||
BASE_OBJECT *psSource; /* what fired the projectile */
|
WEAPON_STATS* psWStats; ///< firing weapon stats
|
||||||
BASE_OBJECT *psDest; /* projectile target */
|
|
||||||
BASE_OBJECT *psDamaged; /* Watermelon:the target it already damaged,dont damage the same target twice */
|
|
||||||
|
|
||||||
UDWORD startX,startY; /* Where projectile started */
|
BASE_OBJECT* psSource; ///< what fired the projectile
|
||||||
UDWORD tarX,tarY; /* The target coordinates */
|
BASE_OBJECT* psDest; ///< target of this projectile
|
||||||
SDWORD vXY, vZ; /* axis velocities */
|
BASE_OBJECT* psDamaged; ///< the target it already dealt damage to (don't damage the same target twice)
|
||||||
UDWORD srcHeight; /* Height of origin */
|
|
||||||
SDWORD altChange; /* Change in altitude */
|
|
||||||
UDWORD born;
|
|
||||||
UDWORD targetRadius; // needed to backtrack the projectiles.
|
|
||||||
UDWORD died;
|
|
||||||
|
|
||||||
PROJECTILE_FUNC pInFlightFunc;
|
UDWORD startX, startY; ///< Where projectile started
|
||||||
|
UDWORD tarX, tarY; ///< The target coordinates
|
||||||
|
SDWORD vXY, vZ; ///< axis velocities
|
||||||
|
UDWORD srcHeight; ///< Height of origin
|
||||||
|
SDWORD altChange; ///< Change in altitude
|
||||||
|
UDWORD born;
|
||||||
|
UDWORD targetRadius; ///< Needed to backtrack the projectiles
|
||||||
|
UDWORD died;
|
||||||
|
|
||||||
|
void (*pInFlightFunc)(struct PROJECTILE* psObj);
|
||||||
} PROJECTILE;
|
} PROJECTILE;
|
||||||
|
|
||||||
#endif // __INCLUDED_PROJECTILEDEF_H__
|
#endif // __INCLUDED_PROJECTILEDEF_H__
|
||||||
|
|
Loading…
Reference in New Issue