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
main.cpp File Reference
#include "config.h"
#include "cs_python.h"
#include "audio/test.h"
#include "cmd/role_bitmask.h"
#include "gfxlib.h"
#include "in_kb.h"
#include "lin_time.h"
#include "main_loop.h"
#include "config_xml.h"
#include "cmd/script/mission.h"
#include "audiolib.h"
#include "vsfilesystem.h"
#include "vs_globals.h"
#include "gfx/animation.h"
#include "cmd/unit.h"
#include "gfx/cockpit.h"
#include "python/init.h"
#include "savegame.h"
#include "force_feedback.h"
#include "gfx/hud.h"
#include "gldrv/winsys.h"
#include "universe_util.h"
#include "networking/netclient.h"
#include "universe.h"
#include "save_util.h"
#include "gfx/masks.h"
#include "cmd/music.h"
#include "ship_commands.h"
#include "gamemenu.h"
#include "audio/SceneManager.h"
#include "audio/TemplateManager.h"
#include "audio/renderers/OpenAL/BorrowedOpenALRenderer.h"
#include <time.h>
#include <sys/signal.h>
#include "options.h"

Go to the source code of this file.

Functions

void enableNetwork (bool usenetwork)
 
void setup_game_data ()
 
VegaConfigcreateVegaConfig (const char *file)
 
std::string ParseCommandLine (int argc, char **CmdLine)
 
int readCommandLineOptions (int argc, char **argv)
 
void VSExit (int code)
 
void cleanup (void)
 
void bootstrap_main_loop ()
 
void bootstrap_first_loop ()
 
void nothinghappens (unsigned int, unsigned int, bool, int, int)
 
void initSceneManager ()
 
void initALRenderer ()
 
void initScenes ()
 
void closeRenderer ()
 
void InitUnitTables ()
 
void CleanupUnitTables ()
 
int main (int argc, char *argv[])
 
void SetStarSystemLoading (bool value)
 
bool GetStarSystemLoading ()
 
void SetSplashScreen (Animation *ss)
 
AnimationGetSplashScreen ()
 
void bootstrap_draw (const std::string &message, Animation *newSplashScreen)
 
bool SetPlayerLoc (QVector &sys, bool set)
 
bool SetPlayerSystem (std::string &sys, bool set)
 
vector< string > parse_space_string (std::string s)
 
void SetStartupView (Cockpit *cp)
 

Variables

std::string global_username
 
std::string global_password
 
vs_options game_options
 needed for assert() calls. More...
 
Universe_Universe
 
TextPlanebs_tp = NULL
 
char SERVER = 0
 
static bool ignore_network = true
 
LeakVector< Mission * > active_missions
 
char mission_name [1024]
 
bool isVista = false
 
static AnimationSplashScreen = NULL
 
static bool BootstrapMyStarSystemLoading = true
 
Unit ** fighters
 
const char helpmessage []
 

Function Documentation

void bootstrap_draw ( const std::string &  message,
Animation newSplashScreen 
)

Definition at line 378 of file main.cpp.

References BootstrapMyStarSystemLoading, DEPTHTEST, TextPlane::Draw(), Animation::DrawNow(), GetElapsedTime(), VegaConfig::getVariable(), GFXBeginScene(), GFXBlendMode(), GFXClear(), GFXColor4f(), GFXDisable(), GFXEnable(), GFXEndScene(), GFXFALSE, GFXHudMode(), GFXLoadIdentity(), GFXLoadMatrixModel(), GFXTRUE, Identity(), LIGHTING, Texture::MakeActive(), MIPMAP, Music::MuzakCycle(), ONE, PROJECTION, ScaleMatrix(), TextPlane::SetCharSize(), TextPlane::SetPos(), TEXTURE0, TEXTURE1, TEXTURE2D, TEXTURE_2D, AnimatedTexture::UpdateAllFrame(), UpdateTime(), Vector, VIEW, vs_config, and ZERO.

379 {
380  static Animation *ani = NULL;
381  static bool reentryWatchdog = false;
382  if (!BootstrapMyStarSystemLoading || reentryWatchdog)
383  return;
384  Music::MuzakCycle(); //Allow for loading music...
385  if (SplashScreen == NULL && newSplashScreen == NULL) {
386  //if there's no splashscreen, we don't draw on it
387  //this happens, when the splash screens texture is loaded
388  return;
389  }
390 
391  reentryWatchdog = true;
392  if (newSplashScreen != NULL)
393  ani = newSplashScreen;
394  UpdateTime();
395 
396  Matrix tmp;
397  Identity( tmp );
399  static Texture dummy( "white.bmp", 0, MIPMAP, TEXTURE2D, TEXTURE_2D, 1 );
401  dummy.MakeActive();
402  GFXDisable( LIGHTING );
404  GFXBlendMode( ONE, ZERO );
405  GFXEnable( TEXTURE0 );
406  GFXDisable( TEXTURE1 );
407  GFXColor4f( 1, 1, 1, 1 );
408  GFXClear( GFXTRUE );
411  GFXLoadMatrixModel( tmp );
412  GFXBeginScene();
413 
414  bs_tp->SetPos( -.99, -.97 ); //Leave a little bit of room for the bottoms of characters.
415  bs_tp->SetCharSize( .4, .8 );
416  ScaleMatrix( tmp, Vector( 6500, 6500, 0 ) );
417  GFXLoadMatrixModel( tmp );
418  GFXHudMode( GFXTRUE );
419  if (ani) {
420  if (GetElapsedTime() < 10) ani->UpdateAllFrame();
421  {
422  ani->DrawNow( tmp ); //VSFileSystem::vs_fprintf( stderr, "(new?) splash screen ('animation'?) %d. ", (long long)ani ); //temporary, by chuck
423  }
424  }
425 
426  static std::string defaultbootmessage = vs_config->getVariable( "graphics", "default_boot_message", "" );
427  static std::string initialbootmessage = vs_config->getVariable( "graphics", "initial_boot_message", "Loading..." );
428  bs_tp->Draw( defaultbootmessage.length() > 0 ? defaultbootmessage : message.length() > 0 ? message : initialbootmessage );
429 
430  GFXHudMode( GFXFALSE );
431  GFXEndScene();
432 
433  reentryWatchdog = false;
434 }
void bootstrap_first_loop ( )

Definition at line 476 of file main.cpp.

References bootstrap_draw(), bootstrap_main_loop(), VegaConfig::getVariable(), Music::GotoSong(), i, Universe::Loop(), muzak, XMLSupport::parse_bool(), parse_space_string(), UniverseUtil::startMenuInterface(), and vs_config.

Referenced by GameUniverse::Init(), and main().

477 {
478  static int i = 0;
479  static std::string ss = vs_config->getVariable( "graphics", "splash_screen", "vega_splash.ani" );
480  static std::string sas = vs_config->getVariable( "graphics", "splash_audio", "" );
481  static bool isgamemenu = XMLSupport::parse_bool( vs_config->getVariable( "graphics", "main_menu", "false" ) );
482  if (i == 0) {
483  vector< string >s = parse_space_string( ss );
484  vector< string >sa = parse_space_string( sas );
485  int snum = time( NULL )%s.size();
486  SplashScreen = new Animation( s[snum].c_str(), 0 );
487  if ( sa.size() && sa[0].length() ) muzak->GotoSong( sa[snum%sa.size()] );
488  bs_tp = new TextPlane();
489  }
490  bootstrap_draw( "Vegastrike Loading...", SplashScreen );
491  if (i++ > 4) {
492  if (_Universe) {
493  if (isgamemenu)
495  else
497  }
498  }
499 }
void bootstrap_main_loop ( )

return to idle func which now should call main_loop mohahahah

Draw Texture

Definition at line 507 of file main.cpp.

References Universe::AccessCockpit(), AddUnitToSystem(), VegaConfig::bindKeys(), cleanexit, CopySavedShips(), createObjects(), Cockpit::credits, cur_check, game_data_t::difficulty, DockToSavedBases(), forcefeedback, g_game, getNewTime(), Mission::GetOrigin(), Cockpit::GetUnitFileName(), VegaConfig::getVariable(), Mission::getVariable(), global_password, global_username, UniverseUtil::hideSplashScreen(), i, ignore_network, Universe::Init(), InitializeInput(), Mission::initMission(), InitTime(), int, UniverseUtil::IOmessage(), j, k, FactionUtil::LoadContrabandLists(), LoadMission(), SaveGame::LoadSavedMissions(), Universe::Loop(), main_loop(), mission, mission_name, Network, Universe::numPlayers(), XMLSupport::parse_bool(), XMLSupport::parse_float(), XMLSupport::parse_int(), SaveGame::ParseSaveGame(), LeakVector< MyType >::push_back(), QVector, run_only_player_starsystem, Cockpit::savegame, NetClient::SetConfigServerAddress(), setNewTime(), SaveGame::SetOutputFileName(), SetPlayerLoc(), SaveGame::SetPlayerLocation(), SetPlayerSystem(), SaveGame::SetStarSystem(), SetStarSystemLoading(), SetStartupView(), Universe::SetupCockpits(), UniverseUtil::showSplashScreen(), Cockpit::TimeOfLastCollision, tostring(), Cockpit::UnpackUnitInfo(), UpdateTime(), Vector, vs_config, VSExit(), winsys_exit(), and WriteSaveGame().

Referenced by bootstrap_first_loop(), and GameMenu::processSinglePlayerButton().

508 {
509  static bool LoadMission = true;
510  static bool loadLastSave = XMLSupport::parse_bool( vs_config->getVariable( "general", "load_last_savegame", "false" ) );
511  InitTime();
512  if (LoadMission) {
513  LoadMission = false;
514  active_missions.push_back( mission = new Mission( mission_name ) );
515 
516  mission->initMission();
517 
518  UniverseUtil::showSplashScreen( "" ); //Twice for double or triple-buffering
520 
521  QVector pos;
522  string planetname;
523 
524  mission->GetOrigin( pos, planetname );
525  bool setplayerloc = false;
526  string mysystem = mission->getVariable( "system", "sol.system" );
527 
528  int numplayers;
529  numplayers = XMLSupport::parse_int( mission->getVariable( "num_players", "1" ) );
530  vector< std::string >playername;
531  vector< std::string >playerpasswd;
532  string pname, ppasswd;
533  for (int p = 0; p < numplayers; p++) {
534  pname = vs_config->getVariable( "player"+( (p > 0) ? tostring( p+1 ) : string( "" ) ), "callsign", "" );
535  ppasswd = vs_config->getVariable( "player"+( (p > 0) ? tostring( p+1 ) : string( "" ) ), "password", "" );
536  if ( p == 0 && global_username.length() )
537  pname = global_username;
538  if ( p == 0 && global_password.length() )
539  ppasswd = global_password;
540  if (!ignore_network) {
541  //In network mode, test if all player sections are present
542  if (pname == "") {
543  cout<<"Missing or incomlpete section for player "<<p<<endl;
544  cleanexit = true;
545  winsys_exit( 1 );
546  }
547  }
548  playername.push_back( pname );
549  playerpasswd.push_back( ppasswd );
550  }
551  float credits = XMLSupport::parse_float( mission->getVariable( "credits", "0" ) );
552  g_game.difficulty = XMLSupport::parse_float( mission->getVariable( "difficulty", "1" ) );
553  string savegamefile = mission->getVariable( "savegame", "" );
554  vector< SavedUnits > savedun;
555  vector< string > playersaveunit;
556  vector< StarSystem* >ss;
557  vector< string > starsysname;
558  vector< QVector > playerNloc;
559 
560  /************************* NETWORK INIT ***************************/
561  vector< vector< std::string > >savefiles;
562  if (!ignore_network) {
563  cout<<"Number of local players = "<<numplayers<<endl;
564  //Initiate the network if in networking play mode for each local player
565  if (!ignore_network) {
566  setNewTime( 0. );
567  //Get the number of local players
568  Network = new NetClient[numplayers];
569 
570  //Here we say we want to only handle activity in 1 starsystem not more
572  } else {
573  Network = NULL;
574  cout<<"Non-networking mode"<<endl;
575  //Here we say we want to only handle activity in 1 starsystem not more
577  }
578  }
579  _Universe->SetupCockpits( playername );
580 
581  /************************* NETWORK INIT ***************************/
582  vector< std::string >::iterator it, jt;
583  unsigned int k = 0;
584  for (k = 0, it = playername.begin(), jt = playerpasswd.begin();
585  k < (unsigned int) _Universe->numPlayers();
586  k++, it++, jt++) {
587  Cockpit *cp = _Universe->AccessCockpit( k );
588  SetStartupView( cp );
589  bool setplayerXloc = false;
590  std::string psu;
591  if (k == 0) {
592  QVector myVec;
593  if ( SetPlayerLoc( myVec, false ) )
595  std::string st;
596  if ( SetPlayerSystem( st, false ) )
598  }
599  vector< SavedUnits >saved;
600  /************* NETWORK PART ***************/
601  vector< string > packedInfo;
602 
603  if (Network != NULL) {
604  string err;
605  string srvipadr;
606  unsigned short port;
607  //Are we using the directly account server to identify us ?
608  Network[k].SetConfigServerAddress( srvipadr, port ); //Sets from the config vars.
609  if ( !Network[k].connectLoad( pname, ppasswd, err ) ) {
610  cout<<"error while connecting: "<<err<<endl;
611  VSExit( 1 );
612  }
613  savefiles.push_back( *Network[k].loginSavedGame( 0 ) );
614 
616  mysystem,
617  mysystem,
618  pos,
619  setplayerXloc,
620  credits,
621  packedInfo,
622  k,
623  savefiles[k][0],
624  false );
626  } else {
627  if (loadLastSave) {
628  _Universe->AccessCockpit( k )->savegame->ParseSaveGame( savegamefile,
629  mysystem,
630  mysystem,
631  pos,
632  setplayerXloc,
633  credits,
634  packedInfo,
635  k );
636  } else {
637  _Universe->AccessCockpit( k )->savegame->SetOutputFileName( savegamefile );
638  }
639  }
640  _Universe->AccessCockpit( k )->UnpackUnitInfo(packedInfo);
641  CopySavedShips( playername[k], k, packedInfo, true );
642  playersaveunit.push_back( _Universe->AccessCockpit( k )->GetUnitFileName() );
643  _Universe->AccessCockpit( k )->credits = credits;
644  ss.push_back( _Universe->Init( mysystem, Vector( 0, 0, 0 ), planetname ) );
645  if (setplayerXloc)
646  playerNloc.push_back( pos );
647  else
648  playerNloc.push_back( QVector( FLT_MAX, FLT_MAX, FLT_MAX ) );
649  setplayerloc = setplayerXloc; //FIX ME will only set first player where he was
650  for (unsigned int j = 0; j < saved.size(); j++)
651  savedun.push_back( saved[j] );
652  }
653  SetStarSystemLoading( true );
654  InitializeInput();
655 
656  vs_config->bindKeys(); //gotta do this before we do ai
657 
658  createObjects( playersaveunit, ss, playerNloc, savefiles );
659  while ( !savedun.empty() ) {
660  AddUnitToSystem( &savedun.back() );
661  savedun.pop_back();
662  }
664 
665  UpdateTime();
667  {
668  string str = vs_config->getVariable(
669  "general",
670  "intro1",
671  "Welcome to Vega Strike! Use #8080FFTab#000000 to afterburn (#8080FF+,-#000000 cruise control), #8080FFarrows#000000 to steer." );
672  if ( !str.empty() ) {
673  UniverseUtil::IOmessage( 0, "game", "all", str );
674  str = vs_config->getVariable(
675  "general",
676  "intro2",
677  "The #8080FFt#000000 key targets objects; #8080FFspace#000000 fires at them & #8080FFa#000000 activates the SPEC drive. To" );
678  if ( !str.empty() ) {
679  UniverseUtil::IOmessage( 4, "game", "all", str );
680  str = vs_config->getVariable(
681  "general",
682  "intro3",
683  "go to another star system, buy a jump drive for about 10000 credits, fly to a" );
684  if ( !str.empty() ) {
685  UniverseUtil::IOmessage( 8, "game", "all", str );
686  str = vs_config->getVariable(
687  "general",
688  "intro4",
689  "wireframe jump-point and press #8080FFj#000000 to warp to a near star. Target a base or planet;" );
690  if ( !str.empty() ) {
691  UniverseUtil::IOmessage( 12, "game", "all", str );
692  str = vs_config->getVariable(
693  "general",
694  "intro5",
695  "When you get close a green box will appear. Inside the box, #8080FFd#000000 will land." );
696  if ( !str.empty() )
697  UniverseUtil::IOmessage( 16, "game", "all", str );
698  }
699  }
700  }
701  }
702  }
703  //Never dock on load in networking if it was said so in the save file NETFIXME--this may change
704  if ( Network == NULL
705  && mission->getVariable( "savegame",
706  "" ).length() != 0
707  && XMLSupport::parse_bool( vs_config->getVariable( "AI", "dockOnLoad", "true" ) ) ) {
708  for (size_t i = 0; i < _Universe->numPlayers(); i++) {
709  QVector vec;
710  DockToSavedBases( i, vec );
711  }
712  }
713  cout<<"Loading completed, now network init"<<endl;
714  //Send a network msg saying we are ready and also send position info
715  if (Network != NULL) {
716  size_t l;
717  //Downloading zone info before setting inGame (CMD_ADDCLIENT) causes a race condition.
718  //CMD_ADDEDYOU (response to CMD_ADDCLIENT) now sends zone info.
719  for (l = 0; l < _Universe->numPlayers(); l++)
720  Network[l].inGame();
721  }
722  if (loadLastSave) {
723  //Don't write if we didn't load...
724  for (unsigned int i = 0; i < _Universe->numPlayers(); ++i)
725  WriteSaveGame( _Universe->AccessCockpit( i ), false );
726  }
727  cur_check = getNewTime();
728  for (unsigned int i = 0; i < _Universe->numPlayers(); ++i)
732  if ( XMLSupport::parse_bool( vs_config->getVariable( "splash", "auto_hide", "true" ) ) )
734  }
736 }
void cleanup ( void  )

Definition at line 146 of file main.cpp.

References AUDDestroy(), cleanexit, Music::CleanupMuzak(), CONFIGFILE, i, Network, Universe::numPlayers(), STATIC_VARS_DESTROYED, winsys_shutdown(), and Universe::WriteSaveGame().

Referenced by main().

147 {
148  STATIC_VARS_DESTROYED = true;
149  printf( "Thank you for playing!\n" );
150  //In network mode, we may not do the save since it is useless
151  if (_Universe != NULL && Network == NULL)
152  _Universe->WriteSaveGame( true );
153 #ifdef _WIN32
154 #if defined (_MSC_VER) && defined (_DEBUG)
155  if (!cleanexit)
156  _RPT0( _CRT_ERROR, "WARNING: Vega Strike exit not clean\n" );
157  return;
158 #endif
159 #else
160  while (!cleanexit)
161  usleep(10000);
162 #endif
163  if (Network != NULL) {
164  cout<<"Number of players"<<_Universe->numPlayers()<<endl;
165  for (size_t i = 0; i < _Universe->numPlayers(); i++)
166  if ( Network[i].isInGame() )
167  Network[i].logout( false );
168  delete[] Network;
169  }
170 #if defined (CG_SUPPORT)
171  if (cloak_cg->vertexProgram) cgDestroyProgram( cloak_cg->vertexProgram );
172  if (cloak_cg->shaderContext) cgDestroyContext( cloak_cg->shaderContext );
173 #endif
175  winsys_shutdown();
176  AUDDestroy();
177  delete[] CONFIGFILE;
178 }
void CleanupUnitTables ( )

Definition at line 367 of file universe_generic.cpp.

References unitTables.

Referenced by main().

368 {
369  for (std::vector<CSVTable*>::iterator it = unitTables.begin(); it != unitTables.end(); ++it)
370  {
371  delete *it;
372  }
373  unitTables.clear();
374 }
void closeRenderer ( )

Definition at line 232 of file main.cpp.

References Singleton< SceneManager >::getSingleton().

Referenced by main(), and Audio::Test::main().

233 {
234  cerr << "Shutting down renderer..." << endl;
235  Audio::SceneManager::getSingleton()->setRenderer( SharedPtr<Audio::Renderer>() );
236 }
VegaConfig* createVegaConfig ( const char *  file)

Definition at line 127 of file main.cpp.

128 {
129  return new GameVegaConfig( file );
130 }
void enableNetwork ( bool  usenetwork)

Definition at line 95 of file main.cpp.

References ignore_network.

Referenced by GameMenu::processSinglePlayerButton(), and GameMenu::readJoinGameControls().

96 {
97  ignore_network = !usenetwork;
98 }
Animation* GetSplashScreen ( )

Definition at line 374 of file main.cpp.

References SplashScreen.

Referenced by UniverseUtil::showSplashScreen().

375 {
376  return SplashScreen;
377 }
bool GetStarSystemLoading ( )

Definition at line 366 of file main.cpp.

References BootstrapMyStarSystemLoading.

Referenced by UniverseUtil::isSplashScreenShowing().

367 {
369 }
void initALRenderer ( )

Definition at line 205 of file main.cpp.

References g_game, Singleton< SceneManager >::getSingleton(), Audio::SceneManager::setRenderer(), and game_data_t::sound_enabled.

Referenced by main(), and Audio::Test::main().

206 {
207  cerr << " Initializing renderer..." << endl;
209 
210  if (g_game.sound_enabled) {
211  SharedPtr<Audio::Renderer> renderer(new Audio::BorrowedOpenALRenderer);
212  renderer->setMeterDistance(1.0);
213  renderer->setDopplerFactor(0.0);
214 
215  sm->setRenderer( renderer );
216  }
217 }
void initSceneManager ( )

Definition at line 191 of file main.cpp.

References g_game, Singleton< SceneManager >::getSingleton(), Singleton< TemplateManager >::getSingleton(), game_data_t::max_sound_sources, and Audio::SceneManager::setMaxSources().

Referenced by main(), and Audio::Test::main().

192 {
193  cout << "Creating scene manager..." << endl;
195 
196  cout << "Creating template manager..." << endl;
198 
200  throw Audio::Exception("Singleton null after SceneManager instantiation");
201 
203 }
void initScenes ( )

Definition at line 219 of file main.cpp.

References Audio::SceneManager::createScene(), Singleton< SceneManager >::getSingleton(), and Audio::SceneManager::setSceneActive().

Referenced by main().

220 {
222 
223  sm->createScene("video");
224  sm->createScene("music");
225  sm->createScene("cockpit");
226  sm->createScene("base");
227  sm->createScene("space");
228 
229  sm->setSceneActive("video", true);
230 }
void InitUnitTables ( )

Definition at line 341 of file universe_generic.cpp.

Referenced by main(), and NetServer::start().

342 {
343  VSFile allUnits;
344  VSError err;
345  static string unitdata = vs_config->getVariable( "data", "UnitCSV", "modunits.csv" );
346  while (unitdata.length() != 0) {
347  string::size_type where = unitdata.find( " " ), where2 = where;
348  if (where == string::npos)
349  where = unitdata.length();
350  string tmp = unitdata.substr( 0, where );
351  err = allUnits.OpenReadOnly( tmp, UnitFile );
352  if (err <= Ok) {
353  unitTables.push_back( new CSVTable( allUnits, allUnits.GetRoot() ) );
354  allUnits.Close();
355  }
356  if (where2 == string::npos) break;
357  unitdata = unitdata.substr( where+1, unitdata.length() );
358  }
359  //Now include units.csv at the end.
360  err = allUnits.OpenReadOnly( "units.csv", UnitFile );
361  if (err <= Ok) {
362  unitTables.push_back( new CSVTable( allUnits, allUnits.GetRoot() ) );
363  allUnits.Close();
364  }
365 }
int main ( int  argc,
char *  argv[] 
)

Definition at line 241 of file main.cpp.

References _Universe, AUDInit(), AUDListenerGain(), benchmark, bootstrap_first_loop(), VSFileSystem::ChangeToProgramDirectory(), cleanup(), CleanupUnitTables(), closeRenderer(), CommandInterpretor, CONFIGFILE, g_game, ROLES::getAllRolePriorities(), VegaConfig::getVariable(), ignore_network, vs_options::init(), initALRenderer(), Music::InitMuzak(), VSFileSystem::InitPaths(), initSceneManager(), initScenes(), InitShipCommands(), InitTime(), InitUnitTables(), isVista, Universe::Loop(), mission_name, game_data_t::music_enabled, XMLSupport::parse_bool(), XMLSupport::parse_float(), ParseCommandLine(), pwd, readCommandLineOptions(), setup_game_data(), test, UninitShipCommands(), UpdateTime(), vs_config, VSFileSystem::vs_fprintf(), vs_options::vsdebug, game_data_t::vsdebug, winsys_exit(), and ZeroMemory().

242 {
244  CONFIGFILE = 0;
245  mission_name[0] = '\0';
246  {
247  char pwd[8192] = "";
248  if (NULL != getcwd( pwd, 8191 )) {
249  pwd[8191] = '\0';
250  printf( " In path %s\n", pwd );
251  } else {
252  printf( " In path <<path too long>>\n" );
253  }
254  }
255 #ifdef _WIN32
256  OSVERSIONINFO osvi;
257  ZeroMemory( &osvi, sizeof (OSVERSIONINFO) );
258  osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
259 
260  GetVersionEx( &osvi );
261  isVista = (osvi.dwMajorVersion == 6);
262  printf( "Windows version %d %d\n", osvi.dwMajorVersion, osvi.dwMinorVersion );
263 #endif
264  /* Print copyright notice */
265  printf( "Vega Strike " " \n"
266  "See http://www.gnu.org/copyleft/gpl.html for license details.\n\n" );
267  /* Seed the random number generator */
268  if (benchmark < 0.0)
269  srand( time( NULL ) );
270  else
271  //in benchmark mode, always use the same seed
272  srand( 171070 );
273  //this sets up the vegastrike config variable
274  setup_game_data();
275  //loads the configuration file .vegastrike/vegastrike.config from home dir if such exists
276  {
277  string subdir = ParseCommandLine( argc, argv );
278  cerr<<"GOT SUBDIR ARG = "<<subdir<<endl;
279  if (CONFIGFILE == 0) {
280  CONFIGFILE = new char[42];
281  sprintf( CONFIGFILE, "vegastrike.config" );
282  }
283  //Specify the config file and the possible mod subdir to play
285  }
286 
287  //This should be put into some common function...
288  //Keep in mind that initialization must also go into networking/netserver.cpp
289  game_options.init();
290  //If no debug argument is supplied, set to what the config file has.
291  if (g_game.vsdebug == '0')
293  //can use the vegastrike config variable to read in the default mission
294  if ( XMLSupport::parse_bool( vs_config->getVariable( "network", "force_client_connect", "false" ) ) )
295  ignore_network = false;
296  g_game.music_enabled = XMLSupport::parse_bool( vs_config->getVariable( "audio", "Music", "true" ) );
297  if (mission_name[0] == '\0') {
298  std::string defmis = vs_config->getVariable( "general", "default_mission", "test/test1.mission" );
299  strncpy( mission_name, defmis.c_str(), 1023 );
300  mission_name[1023] = '\0';
301  cerr<<"MISSION_NAME is empty using : "<<mission_name<<endl;
302  }
303 
304 
305  int exitcode;
306  if ((exitcode = readCommandLineOptions(argc,argv)) >= 0)
307  return exitcode;
308 
309  //might overwrite the default mission with the command line
310  InitUnitTables();
311 #ifdef HAVE_PYTHON
312  Python::init();
313 
314  Python::test();
315 #endif
316 
317  std::vector<std::vector <char > > temp = ROLES::getAllRolePriorities();
318 #if defined(HAVE_SDL)
319 #ifndef NO_SDL_JOYSTICK
320  if ( SDL_InitSubSystem( SDL_INIT_JOYSTICK ) ) {
321  VSFileSystem::vs_fprintf( stderr, "Couldn't initialize SDL: %s\n", SDL_GetError() );
322  winsys_exit( 1 );
323  }
324 #endif
325 #endif
326 #if 0
327  InitTime();
328  UpdateTime();
329 #endif
330 
331  AUDInit();
332  AUDListenerGain( XMLSupport::parse_float( vs_config->getVariable( "audio", "sound_gain", ".5" ) ) );
334 
336  initALRenderer();
337  initScenes();
338 
339  //Register commands
340  //COmmand Interpretor Seems to break VC8, so I'm leaving disabled for now - Patrick, Dec 24
341  if ( XMLSupport::parse_bool( vs_config->getVariable( "general", "command_interpretor", "false" ) ) ) {
344  }
345  _Universe = new GameUniverse( argc, argv, vs_config->getVariable( "general", "galaxy", "milky_way.xml" ).c_str() );
347 
348  //Unregister commands - and cleanup memory
350 
351  closeRenderer();
352 
353  cleanup();
354 
355  delete _Universe;
357  return 0;
358 }
void nothinghappens ( unsigned  int,
unsigned  int,
bool  ,
int  ,
int   
)

Definition at line 189 of file main.cpp.

189 {}
vector< string > parse_space_string ( std::string  s)

Definition at line 465 of file main.cpp.

References index.

Referenced by bootstrap_first_loop().

466 {
467  vector< string > ret;
468  string::size_type index = 0;
469  while ( ( index = s.find( " " ) ) != string::npos ) {
470  ret.push_back( s.substr( 0, index ) );
471  s = s.substr( index+1 );
472  }
473  ret.push_back( s );
474  return ret;
475 }
std::string ParseCommandLine ( int  argc,
char **  CmdLine 
)

Definition at line 753 of file main.cpp.

References benchmark, CONFIGFILE, VSFileSystem::datadir, VSFileSystem::DirectoryExists(), g_game, global_password, global_username, helpmessage, i, ignore_network, mission_name, QVector, SetPlayerLoc(), SetPlayerSystem(), game_data_t::vsdebug, game_data_t::x_resolution, and game_data_t::y_resolution.

Referenced by main().

754 {
755  std::string st;
756  std::string retstr;
757  std::string datatmp;
758  g_game.vsdebug = '0';
759  QVector PlayerLocation;
760  for (int i = 1; i < argc; i++) {
761  if (lpCmdLine[i][0] == '-') {
762  cerr<<"ARG #"<<i<<" = "<<lpCmdLine[i]<<endl;
763  switch (lpCmdLine[i][1])
764  {
765  case 'd':
766  case 'D':
767  //Specifying data directory
768  if (lpCmdLine[i][2] == 0) {
769  cout<<"Option -D requires an argument"<<endl;
770  exit( 1 );
771  }
772  datatmp = &lpCmdLine[i][2];
773  if ( VSFileSystem::DirectoryExists( datatmp ) ) {
774  VSFileSystem::datadir = datatmp;
775  } else {
776  cout<<"Specified data directory not found... exiting"<<endl;
777  exit( 1 );
778  }
779  cout<<"Using data dir specified on command line : "<<datatmp<<endl;
780  break;
781  case 'r':
782  case 'R':
783  break;
784  case 'N':
785  case 'n':
786  if ( !(lpCmdLine[i][2] == '1' && lpCmdLine[i][3] == '\0') ) {
787  CONFIGFILE = new char[40+strlen( lpCmdLine[i] )+1];
788  sprintf( CONFIGFILE, "vegastrike.config.%splayer", lpCmdLine[i]+2 );
789  }
790  break;
791  case 'M':
792  case 'm':
793  retstr = string( lpCmdLine[i]+2 );
794  break;
795  case 'f':
796  case 'F':
797  break;
798  case 'U':
799  case 'u':
800  global_username = lpCmdLine[i]+2;
801  break;
802  case 'P':
803  case 'p':
804  global_password = lpCmdLine[i]+2;
805  break;
806  case 'L':
807  case 'l':
808  if ( 3 == sscanf( lpCmdLine[i]+2, "%lf,%lf,%lf", &PlayerLocation.i, &PlayerLocation.j, &PlayerLocation.k ) )
809  SetPlayerLoc( PlayerLocation, true );
810  break;
811  case 'J':
812  case 'j': //low rez
813  st = string( (lpCmdLine[i])+2 );
814  SetPlayerSystem( st, true );
815  break;
816  case 'A': //average rez
817  case 'a':
818  g_game.y_resolution = 600;
819  g_game.x_resolution = 800;
820  break;
821  case 'H':
822  case 'h': //high rez
823  g_game.y_resolution = 768;
824  g_game.x_resolution = 1024;
825  break;
826  case 'V':
827  case 'v':
828  g_game.y_resolution = 1024;
829  g_game.x_resolution = 1280;
830  break;
831  case 'G':
832  case 'g':
833  break;
834  case '-':
835  //long options
836  if (strcmp( lpCmdLine[i], "--benchmark" ) == 0) {
837  benchmark = atof( lpCmdLine[i+1] );
838  i++;
839  } else if (strcmp( lpCmdLine[i], "--net" ) == 0) {
840  //don't ignore the network section of the config file
841  ignore_network = false;
842  } else if (strcmp( lpCmdLine[i], "--help" ) == 0) {
843  cout<<helpmessage;
844  exit( 0 );
845  } else if (strncmp( lpCmdLine[i], "--debug", 7 ) == 0) {
846  if (lpCmdLine[i][7] == 0) {
847  g_game.vsdebug = 1;
848  } else if (lpCmdLine[i][8] == 0) {
849  cout<<helpmessage;
850  exit( 0 );
851  }
852  g_game.vsdebug = lpCmdLine[i][8] - '0';
853  ++i;
854  }
855  break;
856  }
857  } else {
858  //no "-" before it - it's the mission name
859  strncpy( mission_name, lpCmdLine[i], 1023 );
860  mission_name[1023] = '\0';
861  }
862  }
863  return retstr;
864 }
int readCommandLineOptions ( int  argc,
char **  argv 
)

Returns an exit code >= 0 if the game is supposed to exit rightaway Returns an exit code < 0 if the game can continue loading.

Definition at line 866 of file main.cpp.

References i, and Audio::Test::main().

Referenced by main().

867 {
868  for (int i=1; i < argc; ++i) {
869  if (argv[i][0] == '-') {
870  if (strcmp("--test-audio", argv[i])==0) {
871  return Audio::Test::main(argc, argv);
872  }
873  }
874  }
875  return -1;
876 }
bool SetPlayerLoc ( QVector sys,
bool  set 
)

Definition at line 437 of file main.cpp.

References QVector.

Referenced by bootstrap_main_loop(), and ParseCommandLine().

438 {
439  static QVector mysys;
440  static bool isset = false;
441  if (set) {
442  isset = true;
443  mysys = sys;
444  return true;
445  } else {
446  if (isset)
447  sys = mysys;
448  return isset;
449  }
450 }
bool SetPlayerSystem ( std::string &  sys,
bool  set 
)

Definition at line 451 of file main.cpp.

Referenced by bootstrap_main_loop(), and ParseCommandLine().

452 {
453  static std::string mysys;
454  static bool isset = false;
455  if (set) {
456  isset = true;
457  mysys = sys;
458  return true;
459  } else {
460  if (isset)
461  sys = mysys;
462  return isset;
463  }
464 }
void SetSplashScreen ( Animation ss)

Definition at line 370 of file main.cpp.

371 {
372  SplashScreen = ss;
373 }
void SetStarSystemLoading ( bool  value)

Definition at line 362 of file main.cpp.

Referenced by bootstrap_main_loop(), UniverseUtil::hideSplashScreen(), and UniverseUtil::showSplashScreen().

363 {
365 }
void SetStartupView ( Cockpit cp)

Definition at line 500 of file main.cpp.

References CP_BACK, CP_CHASE, CP_FRONT, CP_TARGET, VegaConfig::getVariable(), Cockpit::SetView(), and vs_config.

Referenced by bootstrap_main_loop(), and GameCockpit::UpdAutoPilot().

501 {
502  static std::string startupview = vs_config->getVariable( "graphics", "startup_cockpit_view", "front" );
503  cp->SetView( startupview
504  == "view_target" ? CP_TARGET : ( startupview
505  == "back" ? CP_BACK : (startupview == "chase" ? CP_CHASE : CP_FRONT) ) );
506 }
void VSExit ( int  code)

Definition at line 140 of file main.cpp.

References Music::CleanupMuzak(), and winsys_exit().

141 {
143  winsys_exit( code );
144 }

Variable Documentation

Universe* _Universe

Definition at line 88 of file main.cpp.

Referenced by CockpitKeys::_PitchDown(), CockpitKeys::_PitchUp(), CockpitKeys::_YawLeft(), CockpitKeys::_YawRight(), BaseComputer::acceptMission(), AcctLogout(), BaseComputer::actionConfirmedLoadGame(), BaseComputer::actionConfirmedSaveGame(), BaseComputer::actionLoadGame(), BaseComputer::actionSaveGame(), Unit::AddCargo(), ZoneMgr::addClient(), NetClient::AddClientObject(), UnitUtil::addCredits(), NavPath::addNewPath(), AddUnitToSystem(), Unit::AddVelocity(), ZoneMgr::addZone(), UniverseUtil::AdjustRelation(), CommunicatingAI::AdjustRelationTo(), ContinuousTerrain::AdjustTerrain(), FlyByWire::Afterburn(), AllocVerticesForSystem(), AllUnitsCloseAndEngage(), Unit::ApplyDamage(), Unit::ApplyLocalDamage(), Unit::ApplyNetDamage(), GameUnit< UnitType >::ArmorDamageSound(), Arrested(), GameCockpit::AutoLanding(), Unit::AutoPilotToErrorMessage(), base_main_loop(), CockpitKeys::Behind(), Bolt::Bolt(), BoltDestroyGeneric(), buildCargoDescription(), buildShipDescription(), Unit::BuyCargo(), BaseComputer::buySelectedCargo(), buyShip(), BaseComputer::buyUpgrade(), CalculateNearestWarpUnit(), CalculateOrientation(), Mission::call_unit_launch(), CollideMap::CheckCollisions(), CollideChecker< T, canbebolt >::CheckCollisionsInner(), checkedVisited(), CollideMap::CheckUnitCollisions(), ChooseNavPoint(), ChooseNearNavPoint(), Orders::FireAt::ChooseTargets(), ChooseTargets(), NetClient::CleanUp(), clearSaveData(), clearSaveString(), BaseInterface::Room::Launch::Click(), Terrain::Collide(), Bolt::Collide(), Beam::Collide(), Unit::Collide(), Bolt::CollideAnon(), UnitUtil::commAnimation(), Order::Communicate(), UnitUtil::communicateTo(), compute_light_dot(), ComputeAutoGuarantee(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), BaseComputer::SellUpgradeOperation::concludeTransaction(), BaseComputer::configureUpgradeCommitControls(), CrashForceDock(), CreateCargoForOwnerStarship(), createObjects(), UnitFactory::createPlanet(), Unit::DealDamageToHullReturnArmor(), GameUnit< UnitType >::DealDamageToShield(), delayed_mission::delayed_mission(), CommunicatingAI::Destroy(), Bolt::Destroy(), Mission::DirectorInitgame(), Missile::Discharge(), ZoneInfo::display(), ZoneMgr::displayNPCs(), Unit::Dock(), FireKeyboard::DockKey(), DockToSavedBases(), DoDockingOps(), Pilot::DoHit(), StarIter::Done(), FireKeyboard::DoSpeechAndAni(), ParticlePoint::Draw(), ContinuousTerrain::Draw(), Bolt::Draw(), Background::Draw(), WarpTrail::Draw(), GameStarSystem::Draw(), Animation::Draw(), GamePlanet::Draw(), SphereMesh::Draw(), VDU::Draw(), Stars::Draw(), AtmosphereHalo::Draw(), GameUnit< UnitType >::Draw(), GameCockpit::Draw(), UnitDrawer::draw(), BaseInterface::Room::BaseShip::Draw(), NavigationSystem::Draw(), ParticleTrail::DrawAndUpdate(), DrawDockingBoxes(), NavigationSystem::DrawMission(), GameUnit< UnitType >::DrawNow(), Mesh::DrawNow(), NavigationSystem::DrawObjectives(), NavigationSystem::DrawShip(), NavigationSystem::DrawSystem(), GamePlanet::DrawTerrain(), Unit::EjectCargo(), eraseSaveData(), eraseSaveString(), NavPath::evaluate(), ExamineWhenTargetKey(), Orders::TurretAI::Execute(), Orders::AggressiveAI::Execute(), FlyByKeyboard::Execute(), FireKeyboard::Execute(), Orders::FormUp::Execute(), Orders::FormUpToOwner::Execute(), FlyByWire::Execute(), FlyTo::Execute(), ExecuteDirector(), Orders::AggressiveAI::ExecuteNoEnemies(), GameUnit< UnitType >::Explode(), Unit::FilterUpgradeList(), NetActionConfirm::finalizeJoinGame(), Radar::Sensor::FindTracksInRange(), findUnitInStarsystem(), Mount::Fire(), Unit::Fire(), BaseComputer::fixUpgrade(), Unit::ForceDock(), GameCockpit::ForceSwitchControl(), g(), GameStarSystem::GameStarSystem(), UniverseUtil::GetAdjacentSystem(), Pilot::getAnger(), getAtmospheric(), BaseComputer::getColorForGroup(), UnitUtil::getCredits(), UniverseUtil::getCurrentPlayer(), NavigationSystem::getCurrentSystem(), AbsolutePathNode::getDescription(), NavigationSystem::getDestinationSystem(), UnitUtil::getFactionRelation(), NavigationSystem::getFocusedSystem(), UniverseUtil::GetGalaxyFaction(), UniverseUtil::GetGalaxyProperty(), UniverseUtil::GetGalaxyPropertyDefault(), Planet::getHumanReadablePlanetType(), UniverseUtil::GetJumpPath(), getNearestTarget(), getNearestTargetUnit(), getNetworkUnit(), UniverseUtil::GetNumAdjacentSystems(), UniverseUtil::getNumPlayers(), UnitUtil::getPhysicsPriority(), UniverseUtil::getPlayer(), UniverseUtil::getPlayerX(), CommunicatingAI::GetRandomUnit(), UniverseUtil::GetRelation(), UnitUtil::getRelationFromFaction(), UnitUtil::getRelationToFaction(), getSaveData(), getSaveDataLength(), UniverseUtil::getSaveInfo(), getSaveString(), getSaveStringLength(), SaveNetUtil::GetSaveStrings(), NavigationSystem::getSelectedSystem(), UniverseUtil::getStarDate(), Unit::getStarSystem(), UniverseUtil::getStarTime(), getStringList(), GetSystemColor(), UniverseUtil::getTargetLabel(), GetThreat(), Unit::getTractorability(), UnitUtil::getUnitSystemFile(), Unit::GetVelocityDifficultyMult(), HelpOut(), GameUnit< UnitType >::HullDamageSound(), BaseInterface::InitCallbacks(), CockpitKeys::InitPanInside(), CurrentPathNode::initSearchQueue(), TargetPathNode::initSearchQueue(), CockpitKeys::Inside(), CockpitKeys::InsideBack(), CockpitKeys::InsideLeft(), CockpitKeys::InsideRight(), UniverseUtil::IOmessage(), CriteriaContains::isDestination(), CriteriaOwnedBy::isDestination(), CriteriaSector::isDestination(), CurrentPathNode::isDestination(), TargetPathNode::isDestination(), isPlayerFaction(), UnitUtil::isPlayerStarship(), BaseComputer::isTransactionOK(), FireKeyboard::JoinFg(), FlyByKeyboard::JumpKey(), Unit::jumpReactToCollision(), StarSystem::JumpTo(), kbGetInput(), Unit::Kill(), KillDuplicateUnits(), LeadMe(), NavigationSystem::CachedSystemIterator::SystemInfo::loadData(), UniverseUtil::loadGame(), LoadMission(), BaseComputer::loadMissionsMasterList(), SaveGame::LoadSavedMissions(), BaseComputer::loadShipDealerControls(), loadStringList(), NetClient::loginAccept(), CockpitKeys::LookDown(), CockpitKeys::LookLeft(), CockpitKeys::LookRight(), CockpitKeys::LookUp(), main(), main_loop(), StarSystemGent::MakePlanet(), MapKey(), BaseComputer::maxQuantityForPlayer(), MyFunction(), GameCockpit::NavScreen(), NearestSystem(), NebulaUpdate(), num_delayed_missions(), UniverseUtil::numActiveMissions(), NumStarsInGalaxy(), GameCockpit::OnDockEnd(), GameCockpit::OnJumpBegin(), GameCockpit::OnJumpEnd(), CockpitKeys::OutsideTarget(), CockpitKeys::Pan(), CockpitKeys::PanTarget(), Unit::PerformDockingOperations(), Mount::PhysicsAlignedFire(), UniverseUtil::popSystem(), NavigationSystem::SystemIterator::Position(), FireKeyboard::ProcessCommMessage(), Orders::AggressiveAI::ProcessCurrentFgDirective(), processDelayedMissions(), Animation::ProcessDrawQueue(), StarSystem::ProcessPendingJumps(), Mesh::ProcessUndrawnMeshes(), Mesh::ProcessZFarMeshes(), pushSaveData(), pushSaveString(), UniverseUtil::pushSystem(), GameNebula::PutInsideCam(), putSaveData(), putSaveString(), ClickList::queryShip(), GameUnit< UnitType >::querySphereClickList(), CockpitKeys::QuitNow(), Enhancement::reactToCollision(), GamePlanet::reactToCollision(), Unit::reactToCollision(), GameMenu::readJoinGameControls(), readplanetentity(), BaseComputer::recalcTitle(), UniverseUtil::receivedCustom(), NetClient::Reconnect(), RefreshGUI(), Unit::RegenShields(), SaveGame::ReloadPickledData(), Unit::RemoveCargo(), Unit::RemoveFromSystem(), NavPath::removeOldPath(), QuadTree::Render(), Briefing::Render(), ClickList::requestIterator(), ClickList::requestShip(), Unit::ResolveForces(), GameCockpit::Respawn(), NetClient::Respawn(), RespawnNow(), RestoreFirstPassState(), Unit::RestoreGodliness(), GameCockpit::RestoreViewPort(), Unit::ReTargetFg(), UniverseUtil::SafeEntrancePoint(), NetServer::saveAccount(), saveDataList(), UniverseUtil::saveGame(), NetClient::saveRequest(), saveStringList(), ScoreKill(), CockpitKeys::ScrollDown(), CockpitKeys::ScrollUp(), Unit::SellCargo(), BaseComputer::sellSelectedCargo(), BaseComputer::sellShip(), sellShip(), BaseComputer::sellUpgrade(), NetServer::sendCustom(), UniverseUtil::sendCustom(), NetServer::sendJump(), NetServer::sendKill(), NetServer::sendMessage(), NetServer::sendMission(), NetServer::sendSaveData(), NavPath::setDestinationNode(), UniverseUtil::SetGalaxyFaction(), Orders::FormUpToOwner::SetParent(), Cockpit::SetParent(), NavPath::setSourceNode(), UniverseUtil::setTargetLabel(), NavigationSystem::Setup(), SetupEnvmapPass(), SetupFogState(), SetupSpecMapSecondPass(), GameCockpit::SetupViewPort(), Orders::FireAt::ShouldFire(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), BaseComputer::showPlayerInfo(), StarIter::StarIter(), StarSystem::StarSystem(), starSystemOK(), NetServer::start(), GameUniverse::StartDraw(), NetClient::startGame(), StarVlist::StarVlist(), UniverseUtil::StopTargettingEachOther(), SuicideKey(), SwapInNewShipName(), GameCockpit::SwitchControl(), CockpitKeys::SwitchLVDU(), VDU::SwitchMode(), CockpitKeys::SwitchMVDU(), CockpitKeys::SwitchRVDU(), CockpitKeys::SwitchULVDU(), CockpitKeys::SwitchUMVDU(), SwitchUnits(), SwitchUnits2(), CockpitKeys::SwitchURVDU(), SwitchVDUTo(), NetClient::synchronizeTime(), UniverseUtil::systemInMemory(), SystemLocation(), TableLocationChanged(), Unit::Target(), UniverseUtil::TargetEachOther(), TargIncomingMissile(), Mission::terminateMission(), CockpitKeys::TextMessageCallback(), CockpitKeys::TextMessageKey(), GameUnit< UnitType >::Thrust(), GameUnit< UnitType >::TransferUnitToSystem(), Unit::TransferUnitToSystem(), GameCockpit::TurretControl(), Unit::UnDock(), FireKeyboard::UnDockKey(), UnDockNow(), Unit::UnFire(), Unit::UpAndDownGrade(), Bolt::Update(), QuadTree::Update(), Atmosphere::Update(), StarSystem::Update(), Cockpit::Update(), Cockpit::updateAttackers(), UpdateBackpointers< Unit::UNIT_ONLY >::updateBackpointer(), UpdateCameraSnds(), StarVlist::UpdateGraphics(), GameUnit< UnitType >::UpdateHudMatrix(), UpdateMasterPartList(), CoordinateSelect::UpdateMouse(), Unit::UpdatePhysics(), GameNebula::UpdatePhysics2(), GameUnit< UnitType >::UpdatePhysics2(), Unit::UpdatePhysics2(), Unit::UpdateSubunitPhysics(), BaseComputer::updateTransactionControlsForSelection(), VDU::VDU(), CockpitKeys::ViewTarget(), WARPENERGYMULTIPLIER(), SaveGame::WriteDynamicUniverse(), WriteSaveGame(), CockpitKeys::ZoomIn(), CockpitKeys::ZoomOut(), CockpitKeys::ZoomReset(), GameStarSystem::~GameStarSystem(), and StarSystem::~StarSystem().

bool BootstrapMyStarSystemLoading = true
static

Definition at line 361 of file main.cpp.

Referenced by bootstrap_draw(), GetStarSystemLoading(), and SetStarSystemLoading().

TextPlane* bs_tp = NULL

Definition at line 89 of file main.cpp.

Unit** fighters

Definition at line 74 of file main_loop.cpp.

Referenced by destroyObjects().

vs_options game_options

needed for assert() calls.

Draws cockpit parts Draws gauges, info strings, radar, ...

Definition at line 83 of file main.cpp.

std::string global_password
std::string global_username
const char helpmessage[]
Initial value:
=
"Command line options for vegastrike\n"
"\n"
" -D -d \t Specify data directory\n"
" -N -n \t Number of players\n"
" -M -m \t Specify a mod to play\n"
" -P -p \t Specify player location\n"
" -J -j \t Start in a specific system\n"
" -A -a \t Normal resolution (800x600)\n"
" -H -h \t High resolution (1024x768)\n"
" -V -v \t Super high resolution (1280x1024)\n"
" --net \t Networking Enabled (Experimental)\n"
" --debug[=#] \t Enable debugging output, 1 major warnings, 2 medium, 3 developer notes\n"
" --test-audio \t Run audio tests\n"
"\n"

Definition at line 738 of file main.cpp.

Referenced by ParseCommandLine().

bool ignore_network = true
static

Definition at line 93 of file main.cpp.

Referenced by bootstrap_main_loop(), enableNetwork(), main(), and ParseCommandLine().

bool isVista = false

Definition at line 240 of file main.cpp.

Referenced by main().

char mission_name[1024]
char SERVER = 0

Definition at line 90 of file main.cpp.

Animation* SplashScreen = NULL
static

Definition at line 360 of file main.cpp.

Referenced by GetSplashScreen().