vegastrike  0.5.1.r1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Universe Class Reference

#include <universe_generic.h>

Inheritance diagram for Universe:
GameUniverse

Public Member Functions

void netLock (bool enable)
 A list of all factions. More...
 
bool netLocked ()
 
bool isServer ()
 
Cockpit * isPlayerStarship (const Unit *fighter)
 
Cockpit * isPlayerStarshipVoid (const void *pointercompare)
 
int whichPlayerStarship (const Unit *fighter)
 
Cockpit * AccessCockpit ()
 
Cockpit * AccessCockpit (int i)
 
unsigned int CurrentCockpit ()
 
virtual Camera * AccessCamera (int num)
 Wrapper function for Star System. More...
 
virtual Camera * AccessCamera ()
 
virtual Camera * AccessHudCamera ()
 Returns the current hud cam. More...
 
virtual void SetViewport ()
 Wrapper function for star system. More...
 
void SetActiveCockpit (int whichcockpit)
 
void SetActiveCockpit (Cockpit *which)
 
virtual void WriteSaveGame (bool auto_save)
 
virtual void SetupCockpits (std::vector< std::string >players)
 
virtual void activateLightMap (int stage=1)
 
virtual Texture * getLightMap ()
 
virtual void SelectCamera (int cam)
 
Cockpit * createCockpit (std::string player)
 
void getJumpPath (const std::string &from, const std::string &to, std::vector< std::string > &path) const
 
const std::vector< std::string > & getAdjacentStarSystems (const std::string &ss) const
 
std::string getGalaxyProperty (const std::string &sys, const std::string &prop)
 
std::string getGalaxyPropertyDefault (const std::string &sys, const std::string &prop, const std::string def="")
 
GalaxyXML::GalaxygetGalaxy ()
 
bool StillExists (StarSystem *ss)
 
void setActiveStarSystem (StarSystem *ss)
 
void pushActiveStarSystem (StarSystem *ss)
 
void popActiveStarSystem ()
 
void clearAllSystems ()
 
StarSystemgetActiveStarSystem (unsigned int size)
 
unsigned int getNumActiveStarSystem ()
 
void LoadStarSystem (StarSystem *ss)
 
void UnloadStarSystem (StarSystem *ss)
 
void Generate1 (const char *file, const char *jumpback)
 
void Generate2 (StarSystem *ss)
 
virtual StarSystemGenerateStarSystem (const char *file, const char *jumpback, Vector origin)
 
void LoadFactionXML (const char *factfile)
 Loads and parses factions. More...
 
 Universe ()
 inits graphics with args More...
 
 Universe (int argc, char **argv, const char *galaxy, bool server=false)
 
void Init (const char *gal)
 
virtual ~Universe ()
 
virtual class StarSystemInit (string systemfile, const Vector &centroid=Vector(0, 0, 0), const string planetname=string())
 Loads Defaults in Graphics Drivers. More...
 
virtual void StartDraw ()
 Begins a scene. More...
 
void Update ()
 
virtual void Loop (void f())
 Runs the main loop. More...
 
StarSystemactiveStarSystem ()
 returns active star system More...
 
unsigned int numPlayers ()
 Wrapper function for Star System. More...
 
StarSystemgetStarSystem (string name)
 Wrapper function for Star System. More...
 
StarSystemscriptStarSystem ()
 
bool setScriptSystem (string name)
 
int StarSystemIndex (StarSystem *ss)
 

Public Attributes

StarDate current_stardate
 
std::vector< StarSystem * > star_system
 

Protected Attributes

std::auto_ptr< GalaxyXML::Galaxygalaxy
 
unsigned int current_cockpit
 The users cockpit. More...
 
std::vector< Cockpit * > cockpit
 
std::vector< StarSystem * > active_star_system
 a generic camera facing the HUD More...
 
StarSystemscript_system
 
bool is_server
 
bool network_lock
 

Friends

class Faction
 Many C++ implementations count classes within as friends. (not all) More...
 

Detailed Description

Definition at line 50 of file universe_generic.h.

Constructor & Destructor Documentation

Universe::Universe ( )

inits graphics with args

Definition at line 183 of file universe_generic.cpp.

Universe::Universe ( int  argc,
char **  argv,
const char *  galaxy,
bool  server = false 
)

Definition at line 174 of file universe_generic.cpp.

Universe::~Universe ( )
virtual

Definition at line 190 of file universe_generic.cpp.

Member Function Documentation

virtual Camera* Universe::AccessCamera ( int  num)
inlinevirtual

Wrapper function for Star System.

Reimplemented in GameUniverse.

Definition at line 105 of file universe_generic.h.

virtual Camera* Universe::AccessCamera ( )
inlinevirtual

Reimplemented in GameUniverse.

Definition at line 109 of file universe_generic.h.

Cockpit* Universe::AccessCockpit ( )
inline

Definition at line 92 of file universe_generic.h.

Cockpit* Universe::AccessCockpit ( int  i)
inline

Definition at line 96 of file universe_generic.h.

virtual Camera* Universe::AccessHudCamera ( )
inlinevirtual

Returns the current hud cam.

Reimplemented in GameUniverse.

Definition at line 114 of file universe_generic.h.

virtual void Universe::activateLightMap ( int  stage = 1)
inlinevirtual

Reimplemented in GameUniverse.

Definition at line 124 of file universe_generic.h.

StarSystem* Universe::activeStarSystem ( )
inline

returns active star system

Definition at line 200 of file universe_generic.h.

void Universe::clearAllSystems ( )

Definition at line 26 of file universe_generic.cpp.

Cockpit * Universe::createCockpit ( std::string  player)

Definition at line 37 of file universe_generic.cpp.

unsigned int Universe::CurrentCockpit ( )
inline

Definition at line 100 of file universe_generic.h.

void Universe::Generate1 ( const char *  file,
const char *  jumpback 
)

Definition at line 261 of file universe_generic.cpp.

void Universe::Generate2 ( StarSystem ss)

Definition at line 278 of file universe_generic.cpp.

StarSystem * Universe::GenerateStarSystem ( const char *  file,
const char *  jumpback,
Vector  origin 
)
virtual

Reimplemented in GameUniverse.

Definition at line 313 of file universe_generic.cpp.

StarSystem* Universe::getActiveStarSystem ( unsigned int  size)
inline

Definition at line 161 of file universe_generic.h.

const vector< std::string > & Universe::getAdjacentStarSystems ( const std::string &  ss) const

Definition at line 258 of file galaxy.cpp.

GalaxyXML::Galaxy* Universe::getGalaxy ( )
inline

Definition at line 137 of file universe_generic.h.

std::string Universe::getGalaxyProperty ( const std::string &  sys,
const std::string &  prop 
)

Definition at line 243 of file galaxy.cpp.

std::string Universe::getGalaxyPropertyDefault ( const std::string &  sys,
const std::string &  prop,
const std::string  def = "" 
)

Definition at line 251 of file galaxy.cpp.

void Universe::getJumpPath ( const std::string &  from,
const std::string &  to,
std::vector< std::string > &  path 
) const

Definition at line 265 of file galaxy.cpp.

virtual Texture* Universe::getLightMap ( )
inlinevirtual

Reimplemented in GameUniverse.

Definition at line 125 of file universe_generic.h.

unsigned int Universe::getNumActiveStarSystem ( )
inline

Definition at line 165 of file universe_generic.h.

StarSystem * Universe::getStarSystem ( string  name)

Wrapper function for Star System.

Wrapper function for star system Returns the current hud cam Wrapper function for star system

Definition at line 231 of file universe_generic.cpp.

void Universe::Init ( const char *  gal)

Definition at line 161 of file universe_generic.cpp.

StarSystem * Universe::Init ( string  systemfile,
const Vector &  centroid = Vector( 0,                                                                                         0,                                                                                         0 ),
const string  planetname = string() 
)
virtual

Loads Defaults in Graphics Drivers.

Should load the Universe data file. Now just inits system with test.xml

Reimplemented in GameUniverse.

Definition at line 225 of file universe_generic.cpp.

Cockpit * Universe::isPlayerStarship ( const Unit *  fighter)

Definition at line 99 of file universe_generic.cpp.

Cockpit* Universe::isPlayerStarshipVoid ( const void *  pointercompare)
inline

Definition at line 85 of file universe_generic.h.

bool Universe::isServer ( )
inline

Definition at line 80 of file universe_generic.h.

void Universe::LoadFactionXML ( const char *  factfile)
inline

Loads and parses factions.

Definition at line 175 of file universe_generic.h.

void Universe::LoadStarSystem ( StarSystem ss)

Definition at line 196 of file universe_generic.cpp.

virtual void Universe::Loop ( void   f())
inlinevirtual

Runs the main loop.

Reimplemented in GameUniverse.

Definition at line 198 of file universe_generic.h.

void Universe::netLock ( bool  enable)

A list of all factions.

Definition at line 213 of file universe_generic.cpp.

bool Universe::netLocked ( )

Definition at line 208 of file universe_generic.cpp.

unsigned int Universe::numPlayers ( )
inline

Wrapper function for Star System.

Accessor to cockpit

Definition at line 214 of file universe_generic.h.

void Universe::popActiveStarSystem ( )
inline

Definition at line 153 of file universe_generic.h.

void Universe::pushActiveStarSystem ( StarSystem ss)
inline

Definition at line 149 of file universe_generic.h.

StarSystem* Universe::scriptStarSystem ( )
inline

Definition at line 241 of file universe_generic.h.

virtual void Universe::SelectCamera ( int  cam)
inlinevirtual

Reimplemented in GameUniverse.

Definition at line 129 of file universe_generic.h.

void Universe::SetActiveCockpit ( int  whichcockpit)

Definition at line 120 of file universe_generic.cpp.

void Universe::SetActiveCockpit ( Cockpit *  which)

Definition at line 129 of file universe_generic.cpp.

void Universe::setActiveStarSystem ( StarSystem ss)
inline

Definition at line 142 of file universe_generic.h.

bool Universe::setScriptSystem ( string  name)
inline

Definition at line 248 of file universe_generic.h.

void Universe::SetupCockpits ( std::vector< std::string >  players)
virtual

Reimplemented in GameUniverse.

Definition at line 138 of file universe_generic.cpp.

virtual void Universe::SetViewport ( )
inlinevirtual

Wrapper function for star system.

Reimplemented in GameUniverse.

Definition at line 119 of file universe_generic.h.

int Universe::StarSystemIndex ( StarSystem ss)

Definition at line 333 of file universe_generic.cpp.

virtual void Universe::StartDraw ( )
inlinevirtual

Begins a scene.

Reimplemented in GameUniverse.

Definition at line 194 of file universe_generic.h.

bool Universe::StillExists ( StarSystem ss)

Definition at line 203 of file universe_generic.cpp.

void Universe::UnloadStarSystem ( StarSystem ss)

Definition at line 220 of file universe_generic.cpp.

void Universe::Update ( )

Definition at line 324 of file universe_generic.cpp.

int Universe::whichPlayerStarship ( const Unit *  fighter)

Definition at line 110 of file universe_generic.cpp.

virtual void Universe::WriteSaveGame ( bool  auto_save)
inlinevirtual

Reimplemented in GameUniverse.

Definition at line 122 of file universe_generic.h.

Friends And Related Function Documentation

friend class Faction
friend

Many C++ implementations count classes within as friends. (not all)

Definition at line 71 of file universe_generic.h.

Member Data Documentation

std::vector< StarSystem* > Universe::active_star_system
protected

a generic camera facing the HUD

init proc currently only 1 star system is stored

Definition at line 62 of file universe_generic.h.

std::vector< Cockpit* > Universe::cockpit
protected

Definition at line 56 of file universe_generic.h.

unsigned int Universe::current_cockpit
protected

The users cockpit.

Definition at line 55 of file universe_generic.h.

StarDate Universe::current_stardate

Definition at line 79 of file universe_generic.h.

std::auto_ptr<GalaxyXML::Galaxy> Universe::galaxy
protected

Definition at line 53 of file universe_generic.h.

bool Universe::is_server
protected

Definition at line 66 of file universe_generic.h.

bool Universe::network_lock
protected

Definition at line 67 of file universe_generic.h.

StarSystem* Universe::script_system
protected

Definition at line 65 of file universe_generic.h.

std::vector< StarSystem* > Universe::star_system

Definition at line 262 of file universe_generic.h.


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