From f3bf740ecdc9510fe0367a3223bc1ef9ceb3ea77 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Wed, 30 Jan 2008 20:43:15 +0000 Subject: [PATCH] * #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-861f7616d084 --- src/projectiledef.h | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) 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__