* 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 or enum-item a Doxygen comment


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3608 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-01-30 22:03:59 +00:00
parent ef3d1f5c92
commit 1583591262
1 changed files with 122 additions and 132 deletions

View File

@ -28,8 +28,8 @@
/* Elements common to all stats structures */ /* Elements common to all stats structures */
#define STATS_BASE \ #define STATS_BASE \
UDWORD ref; /* Unique ID of the item */ \ UDWORD ref; /**< Unique ID of the item */ \
char *pName /* pointer to the text id name (i.e. short language-independant name) */ char* pName /**< pointer to the text id name (i.e. short language-independant name) */
/* Stats common to all stats structs */ /* Stats common to all stats structs */
typedef struct _base_stats typedef struct _base_stats
@ -77,17 +77,16 @@ typedef enum _tech_level
/* Stats common to all droid components */ /* Stats common to all droid components */
#define COMPONENT_STATS \ #define COMPONENT_STATS \
STATS_BASE; /* Basic stats */ \ STATS_BASE; /**< Basic stats */ \
TECH_LEVEL techLevel; /* technology level of the component */ \ TECH_LEVEL techLevel; /**< technology level of the component */ \
UDWORD buildPower; /* Power required to build the component */ \ UDWORD buildPower; /**< Power required to build the component */ \
UDWORD buildPoints; /* Time required to build the component */ \ UDWORD buildPoints; /**< Time required to build the component */ \
UDWORD weight; /* Component's weight */ \ UDWORD weight; /**< Component's weight */ \
UDWORD hitPoints; /* Component's hit points - SEEMS TO BE UNUSED */ \ UDWORD hitPoints; /**< Component's hit points - SEEMS TO BE UNUSED */ \
UDWORD systemPoints; /* Space the component takes in the droid - SEEMS TO BE UNUSED */ \ UDWORD systemPoints; /**< Space the component takes in the droid - SEEMS TO BE UNUSED */ \
UDWORD body; /* Component's body points */ \ UDWORD body; /**< Component's body points */ \
BOOL design; /* flag to indicate whether this component can*/ \ BOOL design; /**< flag to indicate whether this component can be used in the design screen */ \
/* be used in the design screen*/ \ iIMDShape* pIMD /**< The IMD to draw for this component */
iIMDShape *pIMD /* The IMD to draw for this component */
/* Stats common to all components */ /* Stats common to all components */
typedef struct _comp_base_stats typedef struct _comp_base_stats
@ -115,10 +114,10 @@ typedef enum _size
//only using KINETIC and HEAT for now //only using KINETIC and HEAT for now
typedef enum _weapon_class typedef enum _weapon_class
{ {
WC_KINETIC, //bullets etc WC_KINETIC, ///< bullets etc
//WC_EXPLOSIVE, //rockets etc - classed as WC_KINETIC now to save space in struct _droid AB 25/11/98 //WC_EXPLOSIVE, ///< rockets etc - classed as WC_KINETIC now to save space in DROID
WC_HEAT, //laser etc WC_HEAT, ///< laser etc
//WC_MISC, //others we haven't thought of! - classed as WC_HEAT now to save space in struct _droid AB 25/11/98 //WC_MISC, ///< others we haven't thought of! - classed as WC_HEAT now to save space in DROID
NUM_WEAPON_CLASS NUM_WEAPON_CLASS
} WEAPON_CLASS; } WEAPON_CLASS;
@ -196,7 +195,7 @@ typedef enum _hit_sides
HIT_SIDE_RIGHT, HIT_SIDE_RIGHT,
HIT_SIDE_TOP, HIT_SIDE_TOP,
HIT_SIDE_BOTTOM, HIT_SIDE_BOTTOM,
NUM_HIT_SIDES //should be last one NUM_HIT_SIDES // should be the last one
} HIT_SIDE; } HIT_SIDE;
//Special angles representing top or bottom hit //Special angles representing top or bottom hit
@ -210,14 +209,14 @@ typedef struct _body_stats
*/ */
COMPONENT_STATS; COMPONENT_STATS;
UBYTE size; // How big the body is - affects how hit UBYTE size; ///< How big the body is - affects how hit
UDWORD weaponSlots; // The number of weapon slots on the body UDWORD weaponSlots; ///< The number of weapon slots on the body
UDWORD armourValue[NUM_HIT_SIDES][NUM_WEAPON_CLASS]; // A measure of how much protection the armour provides UDWORD armourValue[NUM_HIT_SIDES][NUM_WEAPON_CLASS]; ///< A measure of how much protection the armour provides. Cross referenced with the weapon types.
// cross-ref with the weapon types
// A measure of how much energy the power plant outputs // A measure of how much energy the power plant outputs
UDWORD powerOutput; // this is the engine output of the body UDWORD powerOutput; ///< this is the engine output of the body
iIMDShape **ppIMDList; //list of IMDs to use for propulsion unit - up to numPropulsionStats iIMDShape** ppIMDList; ///< list of IMDs to use for propulsion unit - up to numPropulsionStats
iIMDShape *pFlameIMD; //pointer to which flame graphic to use - for VTOLs only at the moment iIMDShape* pFlameIMD; ///< pointer to which flame graphic to use - for VTOLs only at the moment
} BODY_STATS; } BODY_STATS;
typedef struct _brain_stats typedef struct _brain_stats
@ -225,8 +224,8 @@ typedef struct _brain_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD progCap; // Program capacity UDWORD progCap; ///< Program capacity
struct _weapon_stats *psWeaponStat; //weapon stats associated with this brain - for Command Droids struct _weapon_stats* psWeaponStat; ///< weapon stats associated with this brain - for Command Droids
} BRAIN_STATS; } BRAIN_STATS;
//defines the left and right sides for propulsion IMDs //defines the left and right sides for propulsion IMDs
@ -260,9 +259,8 @@ typedef struct _propulsion_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD maxSpeed; // Max speed for the droid UDWORD maxSpeed; ///< Max speed for the droid
UBYTE propulsionType; // Type of propulsion used - index UBYTE propulsionType; ///< Type of propulsion used - index into PropulsionTable
// into PropulsionTable
} PROPULSION_STATS; } PROPULSION_STATS;
typedef enum _sensor_type typedef enum _sensor_type
@ -271,7 +269,7 @@ typedef enum _sensor_type
INDIRECT_CB_SENSOR, INDIRECT_CB_SENSOR,
VTOL_CB_SENSOR, VTOL_CB_SENSOR,
VTOL_INTERCEPT_SENSOR, VTOL_INTERCEPT_SENSOR,
SUPER_SENSOR, //works as all of the above together! - new for updates - added 11/06/99 AB SUPER_SENSOR, ///< works as all of the above together! - new for updates
} SENSOR_TYPE; } SENSOR_TYPE;
@ -280,13 +278,12 @@ typedef struct _sensor_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD range; // Sensor range UDWORD range; ///< Sensor range
UDWORD power; // Sensor power (put against ecm power) UDWORD power; ///< Sensor power (put against ecm power)
UDWORD location; // specifies whether the Sensor is default or for the Turret UDWORD location; ///< specifies whether the Sensor is default or for the Turret
SENSOR_TYPE type; // used for combat SENSOR_TYPE type; ///< used for combat
UDWORD time; //time delay before associated weapon droids 'know' where the UDWORD time; ///< time delay before associated weapon droids 'know' where the attack is from
//attack is from iIMDShape* pMountGraphic; ///< The turret mount to use
iIMDShape *pMountGraphic; // The turret mount to use
} SENSOR_STATS; } SENSOR_STATS;
typedef struct _ecm_stats typedef struct _ecm_stats
@ -294,10 +291,10 @@ typedef struct _ecm_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD range; // ECM range UDWORD range; ///< ECM range
UDWORD power; // ECM power (put against sensor power) UDWORD power; ///< ECM power (put against sensor power)
UDWORD location; // specifies whether the ECM is default or for the Turret UDWORD location; ///< specifies whether the ECM is default or for the Turret
iIMDShape *pMountGraphic; // The turret mount to use iIMDShape* pMountGraphic; ///< The turret mount to use
} ECM_STATS; } ECM_STATS;
typedef struct _repair_stats typedef struct _repair_stats
@ -305,20 +302,18 @@ typedef struct _repair_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD repairPoints; // How much damage is restored to Body Points UDWORD repairPoints; ///< How much damage is restored to Body Points and armour each Repair Cycle
// and armour each Repair Cycle BOOL repairArmour; ///< whether armour can be repaired or not
BOOL repairArmour; // whether armour can be repaired or not UDWORD location; ///< specifies whether the Repair is default or for the Turret
UDWORD location; // specifies whether the Repair is default or for the Turret UDWORD time; ///< time delay for repair cycle
UDWORD time; // time delay for repair cycle iIMDShape* pMountGraphic; ///< The turret mount to use
iIMDShape *pMountGraphic; // The turret mount to use
} REPAIR_STATS; } REPAIR_STATS;
typedef enum _fireonmove typedef enum _fireonmove
{ {
FOM_NO, //no capability - droid must stop FOM_NO, ///< no capability - droid must stop
FOM_PARTIAL, //partial capability - droid has 50% chance to hit FOM_PARTIAL, ///< partial capability - droid has 50% chance to hit
FOM_YES, //full capability - droid fires normally on move FOM_YES, ///< full capability - droid fires normally on move
} FIREONMOVE; } FIREONMOVE;
typedef struct _weapon_stats typedef struct _weapon_stats
@ -326,55 +321,54 @@ typedef struct _weapon_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD shortRange; // Max distance to target for short range shot UDWORD shortRange; ///< Max distance to target for short range shot
UDWORD longRange; // Max distance to target for long range shot UDWORD longRange; ///< Max distance to target for long range shot
UDWORD minRange; // Min distance to target for shot UDWORD minRange; ///< Min distance to target for shot
UDWORD shortHit; // Chance to hit at short range UDWORD shortHit; ///< Chance to hit at short range
UDWORD longHit; // Chance to hit at long range UDWORD longHit; ///< Chance to hit at long range
UDWORD firePause; // Time between each weapon fire UDWORD firePause; ///< Time between each weapon fire
UDWORD numExplosions; // The number of explosions per shot UDWORD numExplosions; ///< The number of explosions per shot
UBYTE numRounds; // The number of rounds per salvo(magazine) UBYTE numRounds; ///< The number of rounds per salvo(magazine)
UDWORD reloadTime; // Time to reload the round of ammo (salvo fire) UDWORD reloadTime; ///< Time to reload the round of ammo (salvo fire)
UDWORD damage; // How much damage the weapon causes UDWORD damage; ///< How much damage the weapon causes
UDWORD radius; // Basic blast radius of weapon UDWORD radius; ///< Basic blast radius of weapon
UDWORD radiusHit; // Chance to hit in the blast radius UDWORD radiusHit; ///< Chance to hit in the blast radius
UDWORD radiusDamage; // Damage done in the blast radius UDWORD radiusDamage; ///< Damage done in the blast radius
UDWORD incenTime; // How long the round burns UDWORD incenTime; ///< How long the round burns
UDWORD incenDamage; // Damage done each burn cycle UDWORD incenDamage; ///< Damage done each burn cycle
UDWORD incenRadius; // Burn radius of the round UDWORD incenRadius; ///< Burn radius of the round
UDWORD flightSpeed; // speed ammo travels at UDWORD flightSpeed; ///< speed ammo travels at
UDWORD indirectHeight; // how high the ammo travels for indirect fire UDWORD indirectHeight; ///< how high the ammo travels for indirect fire
FIREONMOVE fireOnMove; // indicates whether the droid has to stop before firing FIREONMOVE fireOnMove; ///< indicates whether the droid has to stop before firing
WEAPON_CLASS weaponClass; // the class of weapon - see enum WEAPON_CLASS WEAPON_CLASS weaponClass; ///< the class of weapon
WEAPON_SUBCLASS weaponSubClass; // the subclass to which the weapon belongs - see WEAPON_SUBCLASS weaponSubClass; ///< the subclass to which the weapon belongs
// enum WEAPON_SUBCLASS
MOVEMENT_MODEL movementModel; // which projectile model to use for the bullet MOVEMENT_MODEL movementModel; ///< which projectile model to use for the bullet
WEAPON_EFFECT weaponEffect; // which type of warhead is associated with the weapon WEAPON_EFFECT weaponEffect; ///< which type of warhead is associated with the weapon
UDWORD recoilValue; // used to compare with weight to see if recoils or not UDWORD recoilValue; ///< used to compare with weight to see if recoils or not
UBYTE rotate; // amount the weapon(turret) can rotate 0 = none UBYTE rotate; ///< amount the weapon(turret) can rotate 0 = none
UBYTE maxElevation; // max amount the turret can be elevated up UBYTE maxElevation; ///< max amount the turret can be elevated up
SBYTE minElevation; // min amount the turret can be elevated down SBYTE minElevation; ///< min amount the turret can be elevated down
UBYTE facePlayer; // flag to make the (explosion) effect face the player when drawn UBYTE facePlayer; ///< flag to make the (explosion) effect face the player when drawn
UBYTE faceInFlight; // flag to make the inflight effect face the player when drawn UBYTE faceInFlight; ///< flag to make the inflight effect face the player when drawn
UBYTE effectSize; // size of the effect 100 = normal, 50 = half etc UBYTE effectSize; ///< size of the effect 100 = normal, 50 = half etc
BOOL lightWorld; // flag to indicate whether the effect lights up the world BOOL lightWorld; ///< flag to indicate whether the effect lights up the world
UBYTE surfaceToAir; // indicates how good in the air - SHOOT_ON_GROUND, SHOOT_IN_AIR or both UBYTE surfaceToAir; ///< indicates how good in the air - SHOOT_ON_GROUND, SHOOT_IN_AIR or both
UBYTE vtolAttackRuns; // number of attack runs a VTOL droid can do with this weapon UBYTE vtolAttackRuns; ///< number of attack runs a VTOL droid can do with this weapon
BOOL penetrate; // flag to indicate whether pentrate droid or not BOOL penetrate; ///< flag to indicate whether pentrate droid or not
/* Graphics control stats */ /* Graphics control stats */
UDWORD directLife; // How long a direct fire weapon is visible UDWORD directLife; ///< How long a direct fire weapon is visible. Measured in 1/100 sec.
// Measured in 1/100 sec. UDWORD radiusLife; ///< How long a blast radius is visible
UDWORD radiusLife; // How long a blast radius is visible
/* Graphics used for the weapon */ /* Graphics used for the weapon */
iIMDShape *pMountGraphic; // The turret mount to use iIMDShape* pMountGraphic; ///< The turret mount to use
iIMDShape *pMuzzleGraphic; // The muzzle flash iIMDShape* pMuzzleGraphic; ///< The muzzle flash
iIMDShape *pInFlightGraphic; // The ammo in flight iIMDShape* pInFlightGraphic; ///< The ammo in flight
iIMDShape *pTargetHitGraphic; // The ammo hitting a target iIMDShape* pTargetHitGraphic; ///< The ammo hitting a target
iIMDShape *pTargetMissGraphic;// The ammo missing a target iIMDShape* pTargetMissGraphic; ///< The ammo missing a target
iIMDShape *pWaterHitGraphic; // The ammo hitting water iIMDShape* pWaterHitGraphic; ///< The ammo hitting water
iIMDShape *pTrailGraphic; // The trail used for in flight iIMDShape* pTrailGraphic; ///< The trail used for in flight
/* Audio */ /* Audio */
SDWORD iAudioFireID; SDWORD iAudioFireID;
@ -386,8 +380,8 @@ typedef struct _construct_stats
/* Common stats */ /* Common stats */
COMPONENT_STATS; COMPONENT_STATS;
UDWORD constructPoints; /*The number of points contributed each cycle*/ UDWORD constructPoints; ///< The number of points contributed each cycle
iIMDShape *pMountGraphic; // The turret mount to use iIMDShape* pMountGraphic; ///< The turret mount to use
} CONSTRUCT_STATS; } CONSTRUCT_STATS;
/************************************************************************************ /************************************************************************************
@ -402,28 +396,24 @@ typedef enum _travel_medium
typedef struct _propulsion_types typedef struct _propulsion_types
{ {
UWORD powerRatioMult; // Multiplier for the calculated power ratio of UWORD powerRatioMult; ///< Multiplier for the calculated power ratio of the droid
// the droid UDWORD travel; ///< Which medium the propulsion travels in
UDWORD travel; // Which medium the propulsion travels in SWORD startID; ///< sound to play when this prop type starts
SWORD startID; //sound to play when this prop type starts SWORD idleID; ///< sound to play when this prop type is idle
SWORD idleID; //sound to play when this prop type is idle SWORD moveOffID; ///< sound to link moveID and idleID
SWORD moveOffID; //sound to link moveID and idleID SWORD moveID; ///< sound to play when this prop type is moving
SWORD moveID; //sound to play when this prop type is moving SWORD hissID; ///< sound to link moveID and idleID
SWORD hissID; //sound to link moveID and idleID SWORD shutDownID; ///< sound to play when this prop type shuts down
SWORD shutDownID; //sound to play when this prop type shuts down
} PROPULSION_TYPES; } PROPULSION_TYPES;
typedef struct _terrain_table typedef struct _terrain_table
{ {
UDWORD speedFactor; // factor to multiply the speed by depending on the UDWORD speedFactor; ///< factor to multiply the speed by depending on the method of propulsion and the terrain type - to be divided by 100 before use
// method of propulsion and the terrain type - to be
// divided by 100 before use
} TERRAIN_TABLE; } TERRAIN_TABLE;
typedef struct _special_ability typedef struct _special_ability
{ {
char *pName; // Text name of the component char* pName; ///< Text name of the component
} SPECIAL_ABILITY; } SPECIAL_ABILITY;
typedef UWORD WEAPON_MODIFIER; typedef UWORD WEAPON_MODIFIER;