Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <universe.h>
Public Member Functions | |
StarSystem * | GenerateStarSystem (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 StarSystem * | Init (string systemfile, const Vector ¢roid=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... | |
![]() | |
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::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) |
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 () |
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) |
Protected Member Functions | |
void | StartGL () |
init proc More... | |
Protected Attributes | |
Camera | hud_camera |
The users cockpit. More... | |
![]() | |
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 | |
void | bootstrap_main_loop () |
Additional Inherited Members | |
![]() | |
StarDate | current_stardate |
std::vector< StarSystem * > | star_system |
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.
GameUniverse::GameUniverse | ( | int | argc, |
char ** | argv, | ||
const char * | galaxy | ||
) |
inits graphics with args
Definition at line 100 of file universe.cpp.
References Init(), and Universe::is_server.
GameUniverse::GameUniverse | ( | ) |
Definition at line 106 of file universe.cpp.
GameUniverse::~GameUniverse | ( | ) |
Definition at line 109 of file universe.cpp.
References DeInitInput(), and GFXShutdown().
Accessor to cockpit.
Wrapper function for Star System
Reimplemented from Universe.
Definition at line 84 of file universe.h.
References Cockpit::AccessCamera(), and Universe::AccessCockpit().
|
inlinevirtual |
Wrapper function for star system.
Reimplemented from Universe.
Definition at line 89 of file universe.h.
References Cockpit::AccessCamera(), and Universe::AccessCockpit().
Referenced by StartDraw().
|
inlinevirtual |
Returns the current hud cam.
Reimplemented from Universe.
Definition at line 94 of file universe.h.
References hud_camera.
|
virtual |
Reimplemented from Universe.
Definition at line 127 of file universe.cpp.
References StarSystem::activateLightMap(), and Universe::getActiveStarSystem().
|
virtual |
A list of all factions.
Reimplemented from Universe.
Definition at line 357 of file universe.cpp.
References Universe::Generate1(), Universe::Generate2(), and GetLoadedStarSystem().
|
virtual |
Reimplemented from Universe.
Definition at line 132 of file universe.cpp.
References Universe::getActiveStarSystem(), and StarSystem::getLightMap().
void GameUniverse::Init | ( | int | argc, |
char ** | argv, | ||
const char * | galaxy | ||
) |
Definition at line 75 of file universe.cpp.
References bootstrap_first_loop(), Universe::current_cockpit, GFXInit(), hud_camera, Universe::Init(), InitInput(), pwd, and StartGFX().
Referenced by GameUniverse().
|
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.
References CacheJumpStar(), Universe::Init(), LoadWeapons(), and VSFileSystem::weapon_list.
|
virtual |
Runs the main loop.
Reimplemented from Universe.
Definition at line 171 of file universe.cpp.
References GFXLoop(), and main_loop().
|
inlinevirtual |
Wrapper function for Star System.
Reimplemented from Universe.
Definition at line 75 of file universe.h.
References Universe::AccessCockpit(), and Cockpit::SelectCamera().
|
virtual |
Reimplemented from Universe.
Definition at line 117 of file universe.cpp.
References Universe::cockpit, and i.
|
inlinevirtual |
Wrapper function for star system.
Reimplemented from Universe.
Definition at line 99 of file universe.h.
References Universe::AccessCockpit(), and Cockpit::SetViewport().
|
virtual |
Begins a scene.
Reimplemented from Universe.
Definition at line 266 of file universe.cpp.
References _Universe, AccessCamera(), Universe::AccessCockpit(), Universe::active_star_system, Universe::activeStarSystem(), Cockpit::activeStarSystem, b, CalculateCoords(), Universe::cockpit, vs_options::deleteoldsystems, StarSystem::Draw(), vs_options::garbagecollectfrequency, getmicrosleep(), GFXBeginScene(), GFXEndScene(), h, i, vs_options::InactiveSystemTime, UniverseUtil::isSplashScreenShowing(), micro_sleep, vs_options::numoldsystems, vs_options::NumRunningSystems, PendingJumpsEmpty(), Universe::popActiveStarSystem(), PRESS, ProcessInput(), StarSystem::ProcessPendingJumps(), Universe::pushActiveStarSystem(), rand01(), RefreshGUI(), RESETTIME, Screenshot(), Cockpit::SelectProperCamera(), Universe::SetActiveCockpit(), Camera::SetSubwindow(), SortStarSystems(), Universe::star_system, StarSystem::SwapIn(), Universe::Update(), Camera::UpdateGFX(), UpdateTime(), UpdateTimeCompressionSounds(), VSFileSystem::vs_fprintf(), x, and y.
void GameUniverse::StartGFX | ( | ) |
Loads Defaults in Graphics Drivers.
Definition at line 137 of file universe.cpp.
References GFXMaterial::aa, GFXMaterial::ab, GFXMaterial::ag, GFXMaterial::ar, GFXMaterial::da, GFXMaterial::db, GFXMaterial::dg, GFXMaterial::dr, GFXMaterial::ea, GFXMaterial::eb, GFXMaterial::eg, GFXMaterial::er, GFXBeginScene(), GFXCreateLightContext(), GFXEndScene(), GFXLightContextAmbient(), GFXSelectMaterial(), GFXSetLightContext(), GFXSetMaterial(), GFXMaterial::power, GFXMaterial::sa, GFXMaterial::sb, GFXMaterial::sg, and GFXMaterial::sr.
Referenced by Init().
|
protected |
init proc
|
virtual |
Reimplemented from Universe.
Definition at line 334 of file universe.cpp.
References Universe::AccessCockpit(), Universe::activeStarSystem(), Universe::cockpit, Cockpit::credits, StarSystem::getFileName(), Cockpit::GetParent(), Cockpit::GetUnitFileName(), i, Unit::Position(), Cockpit::savegame, SaveGame::WriteSaveGame(), and Unit::WriteUnit().
|
friend |
return to idle func which now should call main_loop mohahahah
Draw Texture
|
protected |
The users cockpit.
a generic camera facing the HUD
Definition at line 46 of file universe.h.
Referenced by AccessHudCamera(), and Init().