* #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__
|
||||
#define __INCLUDED_PROJECTILEDEF_H__
|
||||
|
||||
#include "basedef.h"
|
||||
|
||||
typedef enum PROJ_STATE
|
||||
{
|
||||
PROJ_INFLIGHT,
|
||||
|
@ -31,38 +33,34 @@ typedef enum PROJ_STATE
|
|||
PROJ_POSTIMPACT
|
||||
} PROJ_STATE;
|
||||
|
||||
struct PROJECTILE;
|
||||
|
||||
typedef void (* PROJECTILE_FUNC) ( struct PROJECTILE *psObj );
|
||||
|
||||
typedef struct PROJECTILE
|
||||
{
|
||||
/* Use only simple object elements */
|
||||
SIMPLE_ELEMENTS( struct PROJECTILE );
|
||||
|
||||
UBYTE state; /* current projectile state */
|
||||
UBYTE airTarget; /* whether the projectile was fired at an airborn target */
|
||||
UBYTE state; ///< current projectile state
|
||||
UBYTE airTarget; ///< whether the projectile was fierd at an airborn target
|
||||
|
||||
UBYTE player; /* needed because damage and radDamage vary
|
||||
from base stat per player because of upgrades*/
|
||||
UBYTE bVisible; // whether the selected player should see the projectile
|
||||
UBYTE player; ///< needed because damange and radDamage vary from base stat per player because of upgrades
|
||||
|
||||
WEAPON_STATS *psWStats; /* firing weapon stats */
|
||||
UBYTE bVisible; ///< whether the selected player should see the projectile
|
||||
|
||||
BASE_OBJECT *psSource; /* what fired the projectile */
|
||||
BASE_OBJECT *psDest; /* projectile target */
|
||||
BASE_OBJECT *psDamaged; /* Watermelon:the target it already damaged,dont damage the same target twice */
|
||||
WEAPON_STATS* psWStats; ///< firing weapon stats
|
||||
|
||||
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 */
|
||||
BASE_OBJECT* psSource; ///< what fired the projectile
|
||||
BASE_OBJECT* psDest; ///< target of this projectile
|
||||
BASE_OBJECT* psDamaged; ///< the target it already dealt damage to (don't damage the same target twice)
|
||||
|
||||
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 targetRadius; ///< Needed to backtrack the projectiles
|
||||
UDWORD died;
|
||||
|
||||
PROJECTILE_FUNC pInFlightFunc;
|
||||
void (*pInFlightFunc)(struct PROJECTILE* psObj);
|
||||
} PROJECTILE;
|
||||
|
||||
#endif // __INCLUDED_PROJECTILEDEF_H__
|
||||
|
|
Loading…
Reference in New Issue