$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <sstream>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "SDL.h"
#include "stratagus.h"
#include "unit_manager.h"
#include "video.h"
#include "font.h"
#include "cursor.h"
#include "ui.h"
#include "interface.h"
#include "menus.h"
#include "sound_server.h"
#include "sound.h"
#include "settings.h"
#include "script.h"
#include "network.h"
#include "netconnect.h"
#include "ai.h"
#include "commands.h"
#include "replay.h"
#include "results.h"
#include "editor.h"
#include "movie.h"
#include "pathfinder.h"
#include "widgets.h"
#include "iolib.h"
#include "util.h"
#include "guichan.h"
#include "title.h"
#include "map.h"
stratagus.cpp - The main file. | |
#define | REDIRECT_OUTPUT |
std::string | StratagusLibPath |
const char | NameLine [] = NAME " V" VERSION ", " COPYRIGHT |
Path for data directory. | |
std::string | CliMapName |
Flag got an event. | |
static std::vector < gcn::Container * > | Containers |
Filename of the map given on the command line. | |
std::string | MenuRace |
Missile to show damage caused. | |
int | SpeedResourcesHarvest [MaxCosts] |
int | SpeedResourcesReturn [MaxCosts] |
speed factor for harvesting resources | |
int | SpeedBuild = 1 |
speed factor for returning resources | |
int | SpeedTrain = 1 |
speed factor for building | |
int | SpeedUpgrade = 1 |
speed factor for training | |
int | SpeedResearch = 1 |
speed factor for upgrading | |
unsigned long | GameCycle |
speed factor for researching | |
unsigned long | ResultGameCycle |
Game simulation cycle counter. | |
unsigned long | FastForwardCycle |
Used in game result. | |
gcn::Gui * | Gui |
static std::string | stdoutFile |
static std::string | stderrFile |
void | beos_init (int argc, char **argv) |
void | ShowLoadProgress (const char *fmt,...) |
Cycle to fastforward to in a replay. | |
void | PreMenuSetup () |
Pre menu setup. | |
static int | MenuLoop () |
void | CleanMissiles () |
Clean missiles. | |
void | CleanTriggers () |
Setup triggers. | |
void | CleanGame () |
static void | ExpandPath (std::string &newpath, const std::string &path) |
void | StartMap (const std::string &filename, bool clean) |
void | StartSavedGame (const std::string &filename) |
void | StartReplay (const std::string &filename, bool reveal) |
int | SaveReplay (const std::string &filename) |
static void | PrintHeader () |
void | PrintLicense () |
void | Exit (int err) |
For saving lua state. | |
void | ExitFatal (int err) |
Exit. | |
static void | Usage () |
static void | CleanupOutput () |
static void | RedirectOutput () |
void | ParseCommandLine (int argc, char **argv, Parameters ¶meters) |
std::string | GetLocalPlayerNameFromEnv () |
int | main (int argc, char **argv) |
#define REDIRECT_OUTPUT |
void beos_init | ( | int | argc, | |
char ** | argv | |||
) |
Need init function for beos.
argc | Number of command line argurments |
void CleanGame | ( | ) |
Cleanup game.
Call each module to clean up. Contrary to CleanModules, maps can be restarted without reloading all lua files.
void CleanMissiles | ( | ) |
Clean missiles.
Clean up missiles.
void CleanTriggers | ( | ) |
Setup triggers.
Clean up the trigger module.
static void CleanupOutput | ( | ) | [static] |
void Exit | ( | int | err | ) |
For saving lua state.
Exit the game.
err | Error code to pass to shell. |
void ExitFatal | ( | int | err | ) |
Exit.
Do a fatal exit. Called on out of memory or crash.
err | Error code to pass to shell. |
static void ExpandPath | ( | std::string & | newpath, | |
const std::string & | path | |||
) | [static] |
std::string GetLocalPlayerNameFromEnv | ( | ) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
The main program: initialise, parse options and arguments.
argc | Number of arguments. | |
argv | Vector of arguments. |
static int MenuLoop | ( | ) | [static] |
Run the guichan main menus loop.
void ParseCommandLine | ( | int | argc, | |
char ** | argv, | |||
Parameters & | parameters | |||
) |
void PreMenuSetup | ( | ) |
Pre menu setup.
Pre menu setup.
static void PrintHeader | ( | ) | [static] |
Print headerline, copyright, ...
void PrintLicense | ( | ) |
static void RedirectOutput | ( | ) | [static] |
int SaveReplay | ( | const std::string & | filename | ) |
Save the replay
filename | Name of the file to save to |
void ShowLoadProgress | ( | const char * | fmt, | |
... | ||||
) |
Cycle to fastforward to in a replay.
Game main loop.
Show load progress.
fmt | printf format string. |
void StartMap | ( | const std::string & | filename, | |
bool | clean | |||
) |
void StartReplay | ( | const std::string & | filename, | |
bool | reveal | |||
) |
void StartSavedGame | ( | const std::string & | filename | ) |
static void Usage | ( | ) | [static] |
Display the usage.
std::string CliMapName |
Flag got an event.
std::vector<gcn::Container *> Containers [static] |
Filename of the map given on the command line.
unsigned long FastForwardCycle |
Used in game result.
unsigned long GameCycle |
speed factor for researching
true if gain XP by dealing damage, false if by killing.
const char NameLine[] = NAME " V" VERSION ", " COPYRIGHT |
Path for data directory.
Text string: Name, Version, Copyright.
Name, Version, Copyright
unsigned long ResultGameCycle |
Game simulation cycle counter.
int SpeedBuild = 1 |
speed factor for returning resources
int SpeedResearch = 1 |
speed factor for upgrading
Speed factor for upgrading.
int SpeedResourcesHarvest[MaxCosts] |
Speed factor for harvesting resources
int SpeedResourcesReturn[MaxCosts] |
speed factor for harvesting resources
Speed factor for returning resources
int SpeedTrain = 1 |
speed factor for building
Speed factor for building.
int SpeedUpgrade = 1 |
speed factor for training
Speed factor for training.
std::string stderrFile [static] |
std::string stdoutFile [static] |
std::string StratagusLibPath |