diff --git a/src/projectiledef.h b/src/projectiledef.h index 23940bf72..d7c40759d 100644 --- a/src/projectiledef.h +++ b/src/projectiledef.h @@ -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 */ - UDWORD born; - UDWORD targetRadius; // needed to backtrack the projectiles. - UDWORD died; + 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) - 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; #endif // __INCLUDED_PROJECTILEDEF_H__