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

#include <universe.h>

Inheritance diagram for GameUniverse:
Universe

Public Member Functions

StarSystemGenerateStarSystem (const char *file, const char *jumpback, Vector origin)
 A list of all factions. More...
 
void WriteSaveGame (bool auto_save)
 
void SetupCockpits (std::vector< std::string >players)
 
void activateLightMap (int stage=1)
 
Texture * getLightMap ()
 
 GameUniverse (int argc, char **argv, const char *galaxy)
 inits graphics with args More...
 
 GameUniverse ()
 
void Init (int argc, char **argv, const char *galaxy)
 
 ~GameUniverse ()
 
void StartGFX ()
 Loads Defaults in Graphics Drivers. More...
 
class StarSystemInit (string systemfile, const Vector &centroid=Vector(0, 0, 0), const string planetname=string())
 Should load the Universe data file. Now just inits system with test.xml. More...
 
void StartDraw ()
 Begins a scene. More...
 
void Loop (void main_loop())
 Runs the main loop. More...
 
void SelectCamera (int cam)
 Wrapper function for Star System. More...
 
Camera * AccessCamera (int num)
 Accessor to cockpit. More...
 
Camera * AccessCamera ()
 Wrapper function for star system. More...
 
Camera * AccessHudCamera ()
 Returns the current hud cam. More...
 
void SetViewport ()
 Wrapper function for star system. More...
 
- Public Member Functions inherited from Universe
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 ()
 
void SetActiveCockpit (int whichcockpit)
 
void SetActiveCockpit (Cockpit *which)
 
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)
 
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 ()
 
void Update ()
 
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)
 

Protected Member Functions

void StartGL ()
 init proc More...
 

Protected Attributes

Camera hud_camera
 The users cockpit. More...
 
- Protected Attributes inherited from Universe
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

void bootstrap_main_loop ()
 

Additional Inherited Members

- Public Attributes inherited from Universe
StarDate current_stardate
 
std::vector< StarSystem * > star_system
 

Detailed Description

Class GameUniverse Deals with universal constants. It is a global, accessed from anywhere as _Universe-> Universe may be queried for Relationships, the current star system rendering is taking place in etc. It acts as a wrapper to the active Star System. Additionally it handles beginning and ending the main loop. And starting and ending graphics. (incl the task of wiping temp lights) Deprecated: loaded dynamic gldrv module

Definition at line 39 of file universe.h.

Constructor & Destructor Documentation

GameUniverse::GameUniverse ( int  argc,
char **  argv,
const char *  galaxy 
)

inits graphics with args

Definition at line 100 of file universe.cpp.

GameUniverse::GameUniverse ( )

Definition at line 106 of file universe.cpp.

GameUniverse::~GameUniverse ( )

Definition at line 109 of file universe.cpp.

Member Function Documentation

Camera* GameUniverse::AccessCamera ( int  num)
inlinevirtual

Accessor to cockpit.

Wrapper function for Star System

Reimplemented from Universe.

Definition at line 84 of file universe.h.

Camera* GameUniverse::AccessCamera ( )
inlinevirtual

Wrapper function for star system.

Reimplemented from Universe.

Definition at line 89 of file universe.h.

Camera* GameUniverse::AccessHudCamera ( )
inlinevirtual

Returns the current hud cam.

Reimplemented from Universe.

Definition at line 94 of file universe.h.

void GameUniverse::activateLightMap ( int  stage = 1)
virtual

Reimplemented from Universe.

Definition at line 127 of file universe.cpp.

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

A list of all factions.

Reimplemented from Universe.

Definition at line 357 of file universe.cpp.

Texture * GameUniverse::getLightMap ( )
virtual

Reimplemented from Universe.

Definition at line 132 of file universe.cpp.

void GameUniverse::Init ( int  argc,
char **  argv,
const char *  galaxy 
)

Definition at line 75 of file universe.cpp.

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

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

Reimplemented from Universe.

Definition at line 62 of file universe.cpp.

void GameUniverse::Loop ( void   main_loop())
virtual

Runs the main loop.

Reimplemented from Universe.

Definition at line 171 of file universe.cpp.

void GameUniverse::SelectCamera ( int  cam)
inlinevirtual

Wrapper function for Star System.

Reimplemented from Universe.

Definition at line 75 of file universe.h.

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

Reimplemented from Universe.

Definition at line 117 of file universe.cpp.

void GameUniverse::SetViewport ( )
inlinevirtual

Wrapper function for star system.

Reimplemented from Universe.

Definition at line 99 of file universe.h.

void GameUniverse::StartDraw ( )
virtual

Begins a scene.

Reimplemented from Universe.

Definition at line 266 of file universe.cpp.

void GameUniverse::StartGFX ( )

Loads Defaults in Graphics Drivers.

Definition at line 137 of file universe.cpp.

void GameUniverse::StartGL ( )
protected

init proc

void GameUniverse::WriteSaveGame ( bool  auto_save)
virtual

Reimplemented from Universe.

Definition at line 334 of file universe.cpp.

Friends And Related Function Documentation

void bootstrap_main_loop ( )
friend

return to idle func which now should call main_loop mohahahah

Draw Texture

Member Data Documentation

Camera GameUniverse::hud_camera
protected

The users cockpit.

a generic camera facing the HUD

Definition at line 46 of file universe.h.


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