Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Shield Struct Reference

Shielding Struct holding values of current shields. More...

#include <unit_armorshield.h>

Public Member Functions

 Shield ()
 

Public Attributes

float recharge
 How much the shield recharges per second. More...
 
float efficiency
 
union {
   struct {
      float   front
 
      float   back
 
      float   padding [6]
 
      float   frontmax
 
      float   backmax
 
   }   shield2fb
 if shield is 2 big, 2 floats make this shield up, and 2 floats for max {front,back,frontmax,backmax} More...
 
   struct {
      float   front
 
      float   back
 
      float   right
 
      float   left
 
      float   padding [4]
 
      float   frontmax
 
      float   backmax
 
      float   rightmax
 
      float   leftmax
 
   }   shield4fbrl
 If the shield if 4 big, 4 floats make the shield up, and 4 keep track of max recharge value. More...
 
   struct {
      float   frontrighttop
 
      float   backrighttop
 
      float   frontlefttop
 
      float   backlefttop
 
      float   frontrightbottom
 
      float   backrightbottom
 
      float   frontleftbottom
 
      float   backleftbottom
 
      float   frontrighttopmax
 
      float   backrighttopmax
 
      float   frontlefttopmax
 
      float   backlefttopmax
 
      float   frontrightbottommax
 
      float   backrightbottommax
 
      float   frontleftbottommax
 
      float   backleftbottommax
 
   }   shield8
 If the shield is 8 sided, 16 floats make it up. More...
 
   struct {
      float   cur [MAX_SHIELD_NUMBER]
 
      float   max [MAX_SHIELD_NUMBER]
 
   }   shield
 
}; 
 
ShieldFacing range [MAX_SHIELD_NUMBER]
 
signed char number
 the number of shields in the current shielding struct More...
 
char leak
 What percentage leaks (divide by 100%) More...
 

Detailed Description

Shielding Struct holding values of current shields.

Definition at line 38 of file unit_armorshield.h.

Constructor & Destructor Documentation

Shield::Shield ( )
inline

Definition at line 84 of file unit_armorshield.h.

References range, and shield.

85  : recharge(0)
86  , efficiency(0)
87  , number(0)
88  , leak(0)
89  {
90  std::fill_n(shield.cur, sizeof(shield.cur)/sizeof(shield.cur[0]), 0.0f);
91  std::fill_n(shield.max, sizeof(shield.max)/sizeof(shield.max[0]), 0.0f);
92  std::fill_n(range, sizeof(range)/sizeof(range[0]), ShieldFacing());
93  }

Member Data Documentation

union { ... }
float Shield::back

Definition at line 49 of file unit_armorshield.h.

float Shield::backleftbottom

Definition at line 65 of file unit_armorshield.h.

float Shield::backleftbottommax

Definition at line 67 of file unit_armorshield.h.

float Shield::backlefttop

Definition at line 65 of file unit_armorshield.h.

float Shield::backlefttopmax

Definition at line 67 of file unit_armorshield.h.

float Shield::backmax

Definition at line 51 of file unit_armorshield.h.

float Shield::backrightbottom

Definition at line 65 of file unit_armorshield.h.

float Shield::backrightbottommax

Definition at line 67 of file unit_armorshield.h.

float Shield::backrighttop

Definition at line 65 of file unit_armorshield.h.

float Shield::backrighttopmax

Definition at line 67 of file unit_armorshield.h.

float Shield::cur[MAX_SHIELD_NUMBER]

Definition at line 73 of file unit_armorshield.h.

float Shield::front

Definition at line 49 of file unit_armorshield.h.

float Shield::frontleftbottom

Definition at line 65 of file unit_armorshield.h.

float Shield::frontleftbottommax

Definition at line 67 of file unit_armorshield.h.

float Shield::frontlefttop

Definition at line 65 of file unit_armorshield.h.

float Shield::frontlefttopmax

Definition at line 67 of file unit_armorshield.h.

float Shield::frontmax

Definition at line 51 of file unit_armorshield.h.

float Shield::frontrightbottom

Definition at line 65 of file unit_armorshield.h.

float Shield::frontrightbottommax

Definition at line 67 of file unit_armorshield.h.

float Shield::frontrighttop

Definition at line 65 of file unit_armorshield.h.

float Shield::frontrighttopmax

Definition at line 67 of file unit_armorshield.h.

char Shield::leak
float Shield::left

Definition at line 57 of file unit_armorshield.h.

float Shield::leftmax

Definition at line 59 of file unit_armorshield.h.

float Shield::max[MAX_SHIELD_NUMBER]

Definition at line 74 of file unit_armorshield.h.

float Shield::padding[4]

Definition at line 50 of file unit_armorshield.h.

Definition at line 78 of file unit_armorshield.h.

Referenced by Unit::LoadRow(), and Shield().

float Shield::right

Definition at line 57 of file unit_armorshield.h.

float Shield::rightmax

Definition at line 59 of file unit_armorshield.h.

struct { ... } Shield::shield
struct { ... } Shield::shield2fb
struct { ... } Shield::shield4fbrl

The documentation for this struct was generated from the following file: