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

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 "st_backtrace.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...
 
bool IsRestart
 if enabled, a unit info dump will be created More...
 
std::vector< std::string > OriginalArgv
 if true, the game skips some things like title screens More...
 
bool IsDebugEnabled {false}
 
bool EnableWallsInSinglePlayer {false}
 Is debug enabled? Flag to pass into lua code. More...
 
static std::string stdoutFile
 
static std::string stderrFile
 
void beos_init (int argc, char **argv)
 
void PreMenuSetup ()
 used for debug purposes 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

◆ REDIRECT_OUTPUT

#define REDIRECT_OUTPUT

Function Documentation

◆ beos_init()

void beos_init ( int  argc,
char **  argv 
)

Need init function for beos.

Parameters
argcNumber of command line argurments

◆ CleanupOutput()

static void CleanupOutput ( )
static

◆ CreateDumpFile()

static LONG WINAPI CreateDumpFile ( EXCEPTION_POINTERS *  ExceptionInfo)
static

◆ Exit()

void Exit ( int  err)

Game Replay Fast Forward Counter.

Exit the game.

Parameters
errError code to pass to shell.

◆ ExitFatal()

void ExitFatal ( int  err)

Exit.

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

Parameters
errError code to pass to shell.

◆ MenuLoop()

static int MenuLoop ( )
static

Run the guichan main menus loop.

Returns
0 for success, else exit.

◆ ParseCommandLine()

void ParseCommandLine ( int  argc,
char **  argv,
Parameters parameters 
)

◆ PreMenuSetup()

void PreMenuSetup ( )

used for debug purposes

Pre menu setup.

Enables ability to build walls in the single player games Pre menu setup.

◆ PrintHeader()

static void PrintHeader ( )
static

Print headerline, copyright, ...

◆ PrintLicense()

void PrintLicense ( )

◆ RedirectOutput()

static void RedirectOutput ( )
static

◆ stratagusMain()

int stratagusMain ( int  argc,
char **  argv 
)

Game main loop.

The main program: initialise, parse options and arguments.

Parameters
argcNumber of arguments.
argvVector of arguments.

◆ Usage()

static void Usage ( )
static

Display the usage.

Variable Documentation

◆ CliMapName

std::string CliMapName

Flag got an event.

◆ EnableAssert

bool EnableAssert

if enabled, print the debug messages

◆ EnableDebugPrint

bool EnableDebugPrint

◆ EnableUnitDebug

bool EnableUnitDebug

if enabled, halt on assertion failures

◆ EnableWallsInSinglePlayer

bool EnableWallsInSinglePlayer {false}

Is debug enabled? Flag to pass into lua code.

◆ IsDebugEnabled

bool IsDebugEnabled {false}

◆ IsRestart

bool IsRestart

if enabled, a unit info dump will be created

◆ MenuRace

std::string MenuRace

Filename of the map given on the command line.

Location of stratagus data.

◆ NameLine

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

Path for data directory.

Text string: Name, Version, Copyright.

Name, Version, Copyright

◆ OriginalArgv

std::vector<std::string> OriginalArgv

if true, the game skips some things like title screens

◆ stderrFile

std::string stderrFile
static

◆ stdoutFile

std::string stdoutFile
static

◆ StratagusLibPath

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.