Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Generals/Code/GameEngine/Include/Common/CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
#ifndef _COMMAND_LINE_H_
#define _COMMAND_LINE_H_

void parseCommandLine(int argc, char *argv[]); ///< Parse command-line parameters
class CommandLine
{
public:

static void parseCommandLineForStartup();
static void parseCommandLineForEngineInit();
};

#endif // _COMMAND_LINE_H_
24 changes: 21 additions & 3 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////////////////////////
struct FieldParse;
enum _TerrainLOD CPP_11(: Int);
class CommandLine;
class GlobalData;
class INI;
class WeaponBonusSet;
Expand All @@ -53,6 +54,21 @@ enum AIDebugOptions CPP_11(: Int);

const Int MAX_GLOBAL_LIGHTS = 3;

//-------------------------------------------------------------------------------------------------
class CommandLineData
{
friend class CommandLine;
friend class GlobalData;

CommandLineData()
: m_hasParsedCommandLineForStartup(false)
, m_hasParsedCommandLineForEngineInit(false)
{}

Bool m_hasParsedCommandLineForStartup;
Bool m_hasParsedCommandLineForEngineInit;
};

//-------------------------------------------------------------------------------------------------
/** Global data container class
* Defines all global game data used by the system
Expand All @@ -67,9 +83,9 @@ class GlobalData : public SubsystemInterface
GlobalData();
virtual ~GlobalData();

void init();
void reset();
void update() { }
virtual void init();
virtual void reset();
virtual void update() { }

Bool setTimeOfDay( TimeOfDay tod ); ///< Use this function to set the Time of day;

Expand All @@ -87,6 +103,8 @@ class GlobalData : public SubsystemInterface
//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------

CommandLineData m_commandLineData;

AsciiString m_mapName; ///< hack for now, this whole this is going away
AsciiString m_moveHintName;
Bool m_useTrees;
Expand Down
Loading
Loading