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
bolt_draw Class Reference

#include <bolt.h>

Public Member Functions

 bolt_draw ()
 
 ~bolt_draw ()
 

Public Attributes

class DecalQueueboltdecals
 
vector< std::string > animationname
 
vector< Animation * > animations
 
vector< vector< Bolt > > bolts
 
vector< vector< Bolt > > balls
 
vector< intcachedecals
 

Static Public Attributes

static GFXVertexListboltmesh = NULL
 

Detailed Description

Definition at line 46 of file bolt.h.

Constructor & Destructor Documentation

bolt_draw::bolt_draw ( )

Definition at line 36 of file bolt.cpp.

References boltdecals, boltmesh, VegaConfig::getVariable(), GFXQUAD, XMLSupport::parse_float(), V, and vs_config.

37 {
38  boltdecals = new DecalQueue;
39  if (!boltmesh) {
40  static float beam_offset = XMLSupport::parse_float( vs_config->getVariable( "graphics", "bolt_offset", "-.2" ) );
41  GFXVertex vtx[12];
42 #define V( ii, xx, yy, zz, ss, \
43  tt ) vtx[ii].x = xx; vtx[ii].y = yy; vtx[ii].z = zz+beam_offset+.875; vtx[ii].i = 0; vtx[ii].j = 0; vtx[ii].k = 1; \
44  vtx[ii].s = ss; vtx[ii].t = tt;
45  V( 0, 0, 0, -.875, 0, .5 );
46  V( 1, 0, -1, 0, .875, 1 );
47  V( 2, 0, 0, .125, 1, .5 );
48  V( 3, 0, 1, 0, .875, 0 );
49  V( 4, 0, 0, -.875, 0, .5 );
50  V( 5, -1, 0, 0, .875, 1 );
51  V( 6, 0, 0, .125, 1, .5 );
52  V( 7, 1, 0, 0, .875, 0 );
53  V( 8, 1, 0, 0, .1875, 0 );
54  V( 9, 0, 1, 0, .375, .1875 );
55  V( 10, -1, 0, 0, .1875, .375 );
56  V( 11, 0, -1, 0, 0, .1875 );
57  boltmesh = new GFXVertexList( GFXQUAD, 12, vtx, 12, false ); //not mutable;
58  }
59 }
bolt_draw::~bolt_draw ( )

Definition at line 20 of file bolt.cpp.

References animations, balls, boltdecals, bolts, cachedecals, DecalQueue::DelTexture(), i, j, and size.

21 {
22  unsigned int i;
23  for (i = 0; i < cachedecals.size(); i++)
25  cachedecals.clear();
26  for (i = 0; i < animations.size(); i++)
27  delete animations[i];
28  for (i = 0; i < balls.size(); i++)
29  for (int j = balls[i].size()-1; j >= 0; j--)
30  balls[i][j].Destroy( j );
31  for (i = 0; i < bolts.size(); i++)
32  for (int j = bolts[i].size()-1; j >= 0; j--)
33  bolts[i][j].Destroy( j );
34  delete boltdecals;
35 }

Member Data Documentation

vector<std::string> bolt_draw::animationname

Definition at line 50 of file bolt.h.

Referenced by Bolt::AddAnimation().

vector<Animation *> bolt_draw::animations

Definition at line 51 of file bolt.h.

Referenced by Bolt::AddAnimation(), Bolt::Draw(), and ~bolt_draw().

vector<vector <Bolt> > bolt_draw::balls

Definition at line 53 of file bolt.h.

Referenced by Bolt::AddAnimation(), Bolt::Bolt(), Bolt::BoltFromIndex(), Bolt::Draw(), and ~bolt_draw().

class DecalQueue* bolt_draw::boltdecals

Definition at line 48 of file bolt.h.

Referenced by Bolt::AddTexture(), bolt_draw(), Bolt::Destroy(), Bolt::Draw(), and ~bolt_draw().

GFXVertexList * bolt_draw::boltmesh = NULL
static

Definition at line 49 of file bolt.h.

Referenced by bolt_draw(), and Bolt::Draw().

vector<vector <Bolt> > bolt_draw::bolts
vector<int> bolt_draw::cachedecals

Definition at line 54 of file bolt.h.

Referenced by Bolt::AddTexture(), and ~bolt_draw().


The documentation for this class was generated from the following files: