[Change] Made outfit.h sexier.
This commit is contained in:
parent
1ad17e0dae
commit
5557963d1f
205
src/outfit.h
205
src/outfit.h
@ -38,6 +38,136 @@ typedef enum DamageType_ {
|
|||||||
DAMAGE_TYPE_RADIATION
|
DAMAGE_TYPE_RADIATION
|
||||||
} DamageType;
|
} DamageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitBoldData
|
||||||
|
*
|
||||||
|
* @brief Represents the particular properties of a bolt weapon.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitBoltData_ {
|
||||||
|
unsigned int delay; /**< Delay between shots. */
|
||||||
|
double speed; /**< How fast it goes (not applicable to beam). */
|
||||||
|
double range; /**< How far it goes. */
|
||||||
|
double accuracy; /**< Desviation accuracy. */
|
||||||
|
double energy; /**< Energy usage. */
|
||||||
|
DamageType dtype; /**< Damage type. */
|
||||||
|
double damage; /**< damage. */
|
||||||
|
|
||||||
|
glTexture* gfx_space; /**< Graphic. */
|
||||||
|
int sound; /**< Sound to play. */
|
||||||
|
int spfx; /**< Special effect on hit. */
|
||||||
|
} OutfitBoltData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitBeamData
|
||||||
|
*
|
||||||
|
* @brief Represents the particular properties of a beam weapon.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitBeamData_ {
|
||||||
|
double range; /**< How far it goes. */
|
||||||
|
glColour colour; /**< Beam colour. */
|
||||||
|
double energy; /**< Energy it drains. */
|
||||||
|
double dtype; /**< Damage type. */
|
||||||
|
double damage; /**< Damage. */
|
||||||
|
} OutfitBeamData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitLauncherData
|
||||||
|
*
|
||||||
|
* @brief Represents a particular missile launcher.
|
||||||
|
*
|
||||||
|
* The properties of the weapon are highly dependant on the ammunition.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitLauncherData_ {
|
||||||
|
unsigned int delay; /**< Delay between shots. */
|
||||||
|
char* ammo; /**< The ammo to use. */
|
||||||
|
} OutfitLauncherData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitAmmoData
|
||||||
|
*
|
||||||
|
* @brief Represents ammunition for a launcher.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitAmmoData_ {
|
||||||
|
double duration; /**< How long the ammo lives. */
|
||||||
|
double lockon; /**< Time it takes to lock on the target. */
|
||||||
|
double resist; /**< Lowers chance of jamming by this amount. */
|
||||||
|
|
||||||
|
double speed; /**< Max speed. */
|
||||||
|
double turn; /**< Turn velocity. */
|
||||||
|
double thrust; /**< Acceleration. */
|
||||||
|
double energy; /**< Energy usage. */
|
||||||
|
DamageType dtype; /**< Damage type. */
|
||||||
|
double damage; /**< Damage. */
|
||||||
|
|
||||||
|
glTexture* gfx_space; /**< Graphic. */
|
||||||
|
int sound; /**< Sound to play. */
|
||||||
|
int spfx; /**< Special effect on hit. */
|
||||||
|
} OutfitAmmoData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitModificationData
|
||||||
|
*
|
||||||
|
* @brief Represents a ship modification.
|
||||||
|
*
|
||||||
|
* These modify the ship's basic properties when equipped on a pilot.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitModificationData_ {
|
||||||
|
/* Movement. */
|
||||||
|
double thrust; /**< Max thrust modifier. */
|
||||||
|
double turn; /**< Max turn modifier. */
|
||||||
|
double speed; /**< Max speed modifier. */
|
||||||
|
|
||||||
|
/* Health. */
|
||||||
|
double armour; /**< Max armour modifier. */
|
||||||
|
double armour_regen; /**< Armour regeneration modifier. */
|
||||||
|
double shield; /**< Max shield modifier. */
|
||||||
|
double shield_regen; /**< Shield regeneration modifier. */
|
||||||
|
double energy; /**< Max energy modifier. */
|
||||||
|
double energy_regen; /**< Energy regeneration modifier. */
|
||||||
|
double fuel; /**< Max fuel modifier. */
|
||||||
|
|
||||||
|
/* Misc. */
|
||||||
|
int cargo; /**< Cargo space modifier. */
|
||||||
|
} OutfitModificationData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitAfterburnerData
|
||||||
|
*
|
||||||
|
* @brief Represents an afterburner.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitAfterburnerData_ {
|
||||||
|
double rumble; /**< Percent of rumble. */
|
||||||
|
int sound; /**< Sound of afterburner. */
|
||||||
|
double thrust_perc; /**< Percent of thrust increase based on ship base. */
|
||||||
|
double thrust_abs; /**< Fixed absolute thrust increase. */
|
||||||
|
double speed_perc; /**< Percent of speed to increase based on ship base. */
|
||||||
|
double speed_abs; /**< Fixed absolulte speed increase. */
|
||||||
|
double energy; /**< Energy used while active. */
|
||||||
|
} OutfitAfterburnerData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitMapData
|
||||||
|
*
|
||||||
|
* @brief Represents a map, is not actually stored on a ship but put into the
|
||||||
|
* nav system.
|
||||||
|
*
|
||||||
|
* Basically just marks an amount of systems whe the player buys it as known.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitMapData_ {
|
||||||
|
double radius; /**< Number of jumps to add all systems within. */
|
||||||
|
} OutfitMapData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct OutfitJammerData
|
||||||
|
*
|
||||||
|
* @brief Represents a jammer.
|
||||||
|
*/
|
||||||
|
typedef struct OutfitJammerData_ {
|
||||||
|
double range; /**< Range it starts to do effect. */
|
||||||
|
double chance; /**< Chance of it nullifying the missile. */
|
||||||
|
double energy; /**< Energy it uses to run. */
|
||||||
|
} OutfitJammerData;
|
||||||
|
|
||||||
/* An outfit depends a lot on the type. */
|
/* An outfit depends a lot on the type. */
|
||||||
typedef struct Outfit_ {
|
typedef struct Outfit_ {
|
||||||
char* name;
|
char* name;
|
||||||
@ -58,73 +188,14 @@ typedef struct Outfit_ {
|
|||||||
/* Type dependant. */
|
/* Type dependant. */
|
||||||
OutfitType type;
|
OutfitType type;
|
||||||
union {
|
union {
|
||||||
struct { /* Bolt. */
|
OutfitBoltData blt; /**< BOLT. */
|
||||||
unsigned int delay; /* Delay between shots. */
|
OutfitBeamData bem; /**< BEAM. */
|
||||||
double speed; /* Speed of shot. (not applicable to beam. */
|
OutfitLauncherData lau; /**< MISSILE. */
|
||||||
double range;
|
OutfitAmmoData amm; /**< AMMO. */
|
||||||
double accuracy; /* Desviation accuracy. */
|
OutfitModificationData mod; /**< MODIFICATION. */
|
||||||
double energy; /* Energy usage. */
|
OutfitAfterburnerData afb; /**< AFTERBURNER. */
|
||||||
DamageType dtype; /* Damage type. */
|
OutfitJammerData jam; /**< JAMMER. */
|
||||||
double damage; /* Damage. */
|
OutfitMapData map; /**< MAP. */
|
||||||
|
|
||||||
glTexture* gfx_space;
|
|
||||||
int sound; /* Sound to play. */
|
|
||||||
int spfx; /* Special effect on hit. */
|
|
||||||
} blt;
|
|
||||||
struct { /* Beam. */
|
|
||||||
double range; /* Distance it travels. */
|
|
||||||
glColour* colour; /* Beam colour. */
|
|
||||||
double energy; /* Energy drained. */
|
|
||||||
double damage_armour, damage_shield; /* Damage. */
|
|
||||||
} bem;
|
|
||||||
struct { /* Launcher. */
|
|
||||||
unsigned int delay; /* Delay between shots. */
|
|
||||||
char* ammo;
|
|
||||||
} lau;
|
|
||||||
struct { /* Ammo. */
|
|
||||||
double duration; /* Duration. */
|
|
||||||
double lockon; /* Time it takes to lock on the target. */
|
|
||||||
double resist; /* Lowers chance of jamming by this ammount. */
|
|
||||||
|
|
||||||
double speed; /* Max speed. */
|
|
||||||
double turn; /* Turn vel. */
|
|
||||||
double thrust; /* Acceleration. */
|
|
||||||
double energy; /* Energy usage. */
|
|
||||||
DamageType dtype; /* Damage type. */
|
|
||||||
double damage; /* Damage. */
|
|
||||||
|
|
||||||
glTexture* gfx_space;
|
|
||||||
int sound; /* Sound to play. */
|
|
||||||
int spfx; /* Special effect on hit. */
|
|
||||||
} amm;
|
|
||||||
struct { /* Modification. */
|
|
||||||
/* Movement. */
|
|
||||||
double thrust, turn, speed;
|
|
||||||
|
|
||||||
/* Health. */
|
|
||||||
double armour, armour_regen;
|
|
||||||
double shield, shield_regen;
|
|
||||||
double energy, energy_regen;
|
|
||||||
double fuel;
|
|
||||||
|
|
||||||
/* Misc. */
|
|
||||||
int cargo; /* Cargo space to add. */
|
|
||||||
} mod;
|
|
||||||
struct { /* Afterburner. */
|
|
||||||
double rumble; /* Percent of rumble. */
|
|
||||||
int sound; /* Sound of the afterburner. */
|
|
||||||
double thrust_perc, thrust_abs; /* Percent and absolute thrust bonus. */
|
|
||||||
double speed_perc, speed_abs; /* Percent and absolute speed bonus. */
|
|
||||||
double energy; /* Energy used while active. */
|
|
||||||
} afb;
|
|
||||||
struct { /* Map. */
|
|
||||||
double radius; /* Amount of systems to add */
|
|
||||||
} map;
|
|
||||||
struct {
|
|
||||||
double range; /* Range it starts to do effect. */
|
|
||||||
double chance; /* Chance of it nullifying the missile. */
|
|
||||||
double energy; /* Energy it uses to run. */
|
|
||||||
} jam;
|
|
||||||
} u;
|
} u;
|
||||||
} Outfit;
|
} Outfit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user