_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stratagus.cpp File Reference
#include <ctype.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "SDL.h"
#include "stratagus.h"
#include "ai.h"
#include "editor.h"
#include "game.h"
#include "guichan.h"
#include "interface.h"
#include "iocompat.h"
#include "iolib.h"
#include "map.h"
#include "netconnect.h"
#include "network.h"
#include "parameters.h"
#include "player.h"
#include "replay.h"
#include "results.h"
#include "settings.h"
#include "sound_server.h"
#include "title.h"
#include "translate.h"
#include "ui.h"
#include "unit_manager.h"
#include "version.h"
#include "video.h"
#include "widgets.h"
#include "util.h"
#include "missile.h"
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <dbghelp.h>

stratagus.cpp - The main file.

#define REDIRECT_OUTPUT
 
std::string StratagusLibPath
 
const char NameLine [] = NAME " v" VERSION ", " COPYRIGHT
 Path for data directory. More...
 
std::string CliMapName
 Flag got an event. More...
 
std::string MenuRace
 Filename of the map given on the command line. More...
 
bool EnableDebugPrint
 
bool EnableAssert
 if enabled, print the debug messages More...
 
bool EnableUnitDebug
 if enabled, halt on assertion failures More...
 
static std::string stdoutFile
 
static std::string stderrFile
 
void beos_init (int argc, char **argv)
 
void PreMenuSetup ()
 if enabled, a unit info dump will be created More...
 
static int MenuLoop ()
 
static void PrintHeader ()
 
void PrintLicense ()
 
void Exit (int err)
 Game Replay Fast Forward Counter. More...
 
void ExitFatal (int err)
 Exit. More...
 
static void Usage ()
 
static void CleanupOutput ()
 
static void RedirectOutput ()
 
void ParseCommandLine (int argc, char **argv, Parameters &parameters)
 
static LONG WINAPI CreateDumpFile (EXCEPTION_POINTERS *ExceptionInfo)
 
int stratagusMain (int argc, char **argv)
 Game main loop. More...
 

Macro Definition Documentation

#define REDIRECT_OUTPUT

Function Documentation

void beos_init ( int  argc,
char **  argv 
)

Need init function for beos.

Parameters
argcNumber of command line argurments
static void CleanupOutput ( )
static
static LONG WINAPI CreateDumpFile ( EXCEPTION_POINTERS *  ExceptionInfo)
static
void Exit ( int  err)

Game Replay Fast Forward Counter.

Exit the game.

Parameters
errError code to pass to shell.
void ExitFatal ( int  err)

Exit.

Do a fatal exit. Called on out of memory or crash.

Parameters
errError code to pass to shell.
static int MenuLoop ( )
static

Run the guichan main menus loop.

Returns
0 for success, else exit.
void ParseCommandLine ( int  argc,
char **  argv,
Parameters parameters 
)
void PreMenuSetup ( )

if enabled, a unit info dump will be created

Pre menu setup.

static void PrintHeader ( )
static

Print headerline, copyright, ...

void PrintLicense ( )
static void RedirectOutput ( )
static
int stratagusMain ( int  argc,
char **  argv 
)

Game main loop.

The main program: initialise, parse options and arguments.

Parameters
argcNumber of arguments.
argvVector of arguments.
static void Usage ( )
static

Display the usage.

Variable Documentation

std::string CliMapName

Flag got an event.

bool EnableAssert

if enabled, print the debug messages

bool EnableDebugPrint
bool EnableUnitDebug

if enabled, halt on assertion failures

std::string MenuRace

Filename of the map given on the command line.

Location of stratagus data.

const char NameLine[] = NAME " v" VERSION ", " COPYRIGHT

Path for data directory.

Text string: Name, Version, Copyright.

Name, Version, Copyright

std::string stderrFile
static
std::string stdoutFile
static
std::string StratagusLibPath
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.