Include fewer headers from C4Game.h so C4NetIO.h isn't included from there

Günther Brammer 2011-03-11 03:43:38 +01:00
parent ee355a7bc9
commit 2820716057
21 changed files with 46 additions and 13 deletions

View File

@ -55,6 +55,7 @@
#include <C4Log.h>
#include <C4Player.h>
#include <C4GameOverDlg.h>
#include <C4GameParameters.h>
#include <C4ObjectMenu.h>
#include <C4GameLobby.h>
#include <C4ChatDlg.h>
@ -64,6 +65,7 @@
#include <C4MessageInput.h>
#include <C4MassMover.h>
#include <C4RankSystem.h>
#include <C4RoundResults.h>
#include <C4GameMessage.h>
#include <C4Material.h>
#include <C4Network2Reference.h>
@ -88,11 +90,16 @@ public:
void OnSec1Timer();
};
static C4GameParameters GameParameters;
static C4RoundResults GameRoundResults;
C4Game::C4Game()
: Clients(Parameters.Clients),
Parameters(GameParameters),
Teams(Parameters.Teams),
PlayerInfos(Parameters.PlayerInfos),
RestorePlayerInfos(Parameters.RestorePlayerInfos),
RoundResults(GameRoundResults),
Input(Control.Input),
KeyboardInput(C4KeyboardInput_Init()),
pFileMonitor(NULL),

View File

@ -24,10 +24,7 @@
#ifndef INC_C4Game
#define INC_C4Game
#include <C4GameParameters.h>
#include <C4RoundResults.h>
#include <C4Scenario.h>
#include <C4Control.h>
#include <C4PathFinder.h>
#include <C4Extra.h>
#include "C4Scoreboard.h"
@ -61,11 +58,11 @@ public:
~C4Game();
C4ClientList &Clients; // Shortcut
C4GameParameters Parameters;
C4GameParameters &Parameters;
C4TeamList &Teams; // Shortcut
C4PlayerInfoList &PlayerInfos; // Shortcut
C4PlayerInfoList &RestorePlayerInfos; // Shortcut
C4RoundResults RoundResults;
C4RoundResults &RoundResults;
C4Scenario C4S;
C4ComponentHost Info;
C4ComponentHost Title;
@ -87,10 +84,10 @@ public:
C4PlayerControlAssignmentSets PlayerControlAssignmentSets;
C4Scoreboard Scoreboard;
C4VideoPlayer VideoPlayer;
class C4Network2Stats *pNetworkStatistics; // may be NULL if no statistics are recorded
class C4KeyboardInput &KeyboardInput;
class C4FileMonitor *pFileMonitor;
class C4GameSec1Timer *pSec1Timer;
C4Network2Stats *pNetworkStatistics; // may be NULL if no statistics are recorded
C4KeyboardInput &KeyboardInput;
C4FileMonitor *pFileMonitor;
C4GameSec1Timer *pSec1Timer;
char CurrentScenarioSection[C4MaxName+1];
char ScenarioFilename[_MAX_PATH+1];
@ -98,7 +95,7 @@ public:
char PlayerFilenames[20*_MAX_PATH+1];
char DefinitionFilenames[20*_MAX_PATH+1];
char DirectJoinAddress[_MAX_PATH+1];
class C4Network2Reference *pJoinReference;
C4Network2Reference *pJoinReference;
int32_t StartupPlayerCount;
int32_t FPS,cFPS;
int32_t HaltCount;
@ -154,7 +151,7 @@ public:
bool PreInit();
void SetScenarioFilename(const char*);
bool Execute();
class C4Player *JoinPlayer(const char *szFilename, int32_t iAtClient, const char *szAtClientName, C4PlayerInfo *pInfo);
C4Player *JoinPlayer(const char *szFilename, int32_t iAtClient, const char *szAtClientName, C4PlayerInfo *pInfo);
bool DoGameOver();
bool CanQuickSave();
bool QuickSave(const char *strFilename, const char *strTitle, bool fForceSave=false);

View File

@ -33,16 +33,19 @@ class C4AulScript;
class C4AulScriptEngine;
class C4AulScriptFunc;
struct C4AulParSet;
class C4ClientList;
class C4ClientPlayerInfos;
class C4Command;
class C4Config;
class C4Console;
class C4Control;
class C4Def;
class C4DefList;
class C4DefGraphics;
class C4Effect;
class C4Facet;
class C4FacetSurface;
class C4FileMonitor;
class C4Game;
class C4GameMessage;
class C4GameMessageList;
@ -50,13 +53,16 @@ class C4GameOptionsList;
class C4GamePadControl;
class C4GamePadOpener;
class C4GamePadOpener;
class C4GameParameters;
class C4GameResList;
class C4GameSec1Timer;
class C4Graph;
class C4GraphicsSystem;
class C4Group;
class C4Group;
class C4GroupSet;
class C4IDList;
class C4KeyboardInput;
class C4LChunk;
class C4League;
class C4LoaderScreen;
@ -75,6 +81,8 @@ class C4Network;
class C4NetworkClient;
class C4NetworkClientList;
class C4Network2IRCClient;
class C4Network2Stats;
class C4Network2Reference;
class C4Object;
class C4ObjectInfo;
class C4ObjectInfoCore;

View File

@ -39,6 +39,7 @@
#include <C4GraphicsSystem.h>
#include <C4Player.h>
#include <C4RankSystem.h>
#include <C4RoundResults.h>
#include <C4PXS.h>
#include <C4MassMover.h>
#include <C4GameMessage.h>

View File

@ -36,6 +36,7 @@
#include <C4ScriptHost.h>
#include <C4PlayerList.h>
#include <C4GameObjects.h>
#include <C4RoundResults.h>
#include <C4Record.h>
#include <C4Version.h>

View File

@ -24,6 +24,7 @@
#include <C4Include.h>
#include <C4MassMover.h>
#include <C4Components.h>
#include <C4Random.h>
#include <C4Material.h>
#include <C4Game.h>

View File

@ -25,6 +25,7 @@
#include <C4Include.h>
#include <C4PXS.h>
#include <C4Components.h>
#include <C4Config.h>
#include <C4Physics.h>
#include <C4Random.h>

View File

@ -28,6 +28,7 @@
#include <C4Include.h>
#include <C4Def.h>
#include <C4Components.h>
#include <C4Config.h>
#include <C4FileMonitor.h>
#include <C4Language.h>

View File

@ -26,6 +26,7 @@
#include <C4Include.h>
#include <C4DefList.h>
#include <C4Components.h>
#include <C4Config.h>
#include <C4Def.h>
#include <C4FileMonitor.h>

View File

@ -23,6 +23,9 @@
#ifndef INC_C4DefList
#define INC_C4DefList
#include <StdFont.h>
#include <StdFacet.h>
const int32_t C4D_None = 0,
C4D_All = ~C4D_None;

View File

@ -25,6 +25,7 @@
#include "C4Include.h"
#include "C4ObjectMenu.h"
#include "C4Control.h"
#include "C4Object.h"
#include "C4ObjectCom.h"
#include "C4Player.h"

View File

@ -39,6 +39,7 @@
#include <C4PlayerList.h>
#include <C4Random.h>
#include <C4RankSystem.h>
#include <C4Teams.h>
static bool FnChangeDef(C4AulObjectContext *cthr, C4ID to_id)
{

View File

@ -35,6 +35,7 @@
#include <C4Viewport.h>
#include <C4GameObjects.h>
#include <C4GameControl.h>
#include <C4RoundResults.h>
C4PlayerList::C4PlayerList()
{

View File

@ -46,6 +46,7 @@
#include <C4Player.h>
#include <C4PlayerList.h>
#include <C4PXS.h>
#include <C4RoundResults.h>
#include <C4Texture.h>
#include <C4Weather.h>
#include <C4Viewport.h>

View File

@ -27,6 +27,7 @@
#include <C4Include.h>
#include <C4KeyboardInput.h>
#include <C4Components.h>
#include <C4Game.h>
#ifdef USE_X11

View File

@ -23,6 +23,7 @@
#ifndef INC_C4MouseControl
#define INC_C4MouseControl
#include <C4Facet.h>
#include "C4ObjectList.h"
#include "C4Region.h"

View File

@ -39,6 +39,7 @@
#include <C4MouseControl.h>
#include <C4Network2.h>
#include <C4GameControl.h>
#include <C4RoundResults.h>
DWORD GenerateRandomPlayerColor(int32_t iTry); // in C4PlayerInfoConflicts.cpp

View File

@ -30,6 +30,7 @@
#include <C4Game.h>
#include <C4Network2.h>
#include <C4GameControl.h>
#include <C4RoundResults.h>
#include "C4Control.h"

View File

@ -21,10 +21,12 @@
* See clonk_trademark_license.txt for full license.
*/
#include "C4Include.h"
#include <C4Game.h>
#include "C4Version.h"
#include "C4Network2Reference.h"
#include <C4Game.h>
#include <C4RoundResults.h>
#include "C4Version.h"
#include <utility>
#include <fcntl.h>
#include <zlib.h>

View File

@ -24,6 +24,7 @@
// text drawing facility for CStdDDraw
#include "C4Include.h"
#include <StdFont.h>
#include <StdBuf.h>
#include <StdDDraw2.h>
#include <StdSurface2.h>

View File

@ -25,6 +25,7 @@
#include <C4Include.h>
#ifdef USE_CONSOLE
#include <StdWindow.h>
#include <StdDDraw2.h>
#include <C4Application.h>
#ifdef HAVE_LIBREADLINE