vegastrike
0.5.1.r1
|
#include <universe_generic.h>
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::Galaxy * | getGalaxy () |
bool | StillExists (StarSystem *ss) |
void | setActiveStarSystem (StarSystem *ss) |
void | pushActiveStarSystem (StarSystem *ss) |
void | popActiveStarSystem () |
void | clearAllSystems () |
StarSystem * | getActiveStarSystem (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 StarSystem * | GenerateStarSystem (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 StarSystem * | Init (string systemfile, const Vector ¢roid=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... | |
StarSystem * | activeStarSystem () |
returns active star system More... | |
unsigned int | numPlayers () |
Wrapper function for Star System. More... | |
StarSystem * | getStarSystem (string name) |
Wrapper function for Star System. More... | |
StarSystem * | scriptStarSystem () |
bool | setScriptSystem (string name) |
int | StarSystemIndex (StarSystem *ss) |
Public Attributes | |
StarDate | current_stardate |
std::vector< StarSystem * > | star_system |
Protected Attributes | |
std::auto_ptr< GalaxyXML::Galaxy > | galaxy |
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... | |
StarSystem * | script_system |
bool | is_server |
bool | network_lock |
Friends | |
class | Faction |
Many C++ implementations count classes within as friends. (not all) More... | |
Definition at line 50 of file universe_generic.h.
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.
|
virtual |
Definition at line 190 of file universe_generic.cpp.
|
inlinevirtual |
Wrapper function for Star System.
Reimplemented in GameUniverse.
Definition at line 105 of file universe_generic.h.
|
inlinevirtual |
Reimplemented in GameUniverse.
Definition at line 109 of file universe_generic.h.
|
inline |
Definition at line 92 of file universe_generic.h.
|
inline |
Definition at line 96 of file universe_generic.h.
|
inlinevirtual |
Returns the current hud cam.
Reimplemented in GameUniverse.
Definition at line 114 of file universe_generic.h.
|
inlinevirtual |
Reimplemented in GameUniverse.
Definition at line 124 of file universe_generic.h.
|
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.
|
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.
|
virtual |
Reimplemented in GameUniverse.
Definition at line 313 of file universe_generic.cpp.
|
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.
|
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.
|
inlinevirtual |
Reimplemented in GameUniverse.
Definition at line 125 of file universe_generic.h.
|
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.
|
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.
|
inline |
Definition at line 85 of file universe_generic.h.
|
inline |
Definition at line 80 of file universe_generic.h.
|
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.
|
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.
|
inline |
Wrapper function for Star System.
Accessor to cockpit
Definition at line 214 of file universe_generic.h.
|
inline |
Definition at line 153 of file universe_generic.h.
|
inline |
Definition at line 149 of file universe_generic.h.
|
inline |
Definition at line 241 of file universe_generic.h.
|
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.
|
inline |
Definition at line 142 of file universe_generic.h.
|
inline |
Definition at line 248 of file universe_generic.h.
|
virtual |
Reimplemented in GameUniverse.
Definition at line 138 of file universe_generic.cpp.
|
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.
|
inlinevirtual |
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.
|
inlinevirtual |
Reimplemented in GameUniverse.
Definition at line 122 of file universe_generic.h.
|
friend |
Many C++ implementations count classes within as friends. (not all)
Definition at line 71 of file universe_generic.h.
|
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.
|
protected |
Definition at line 56 of file universe_generic.h.
|
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.
|
protected |
Definition at line 53 of file universe_generic.h.
|
protected |
Definition at line 66 of file universe_generic.h.
|
protected |
Definition at line 67 of file universe_generic.h.
|
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.