2010-03-23 03:35:55 +01:00
|
|
|
// ==============================================================
|
|
|
|
// This file is part of Glest (www.glest.org)
|
|
|
|
//
|
2011-12-14 08:40:48 +01:00
|
|
|
// Copyright (C) 2001-2008 Martiño Figueroa
|
2010-03-23 03:35:55 +01:00
|
|
|
//
|
|
|
|
// You can redistribute this code and/or modify it under
|
|
|
|
// the terms of the GNU General Public License as published
|
|
|
|
// by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version
|
|
|
|
// ==============================================================
|
|
|
|
|
|
|
|
#ifndef _GLEST_GAME_GAME_H_
|
|
|
|
#define _GLEST_GAME_GAME_H_
|
|
|
|
|
2012-04-20 03:04:05 +02:00
|
|
|
#ifdef WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <winsock.h>
|
|
|
|
#endif
|
2010-03-23 03:35:55 +01:00
|
|
|
|
2012-04-20 03:04:05 +02:00
|
|
|
#include <vector>
|
2010-03-23 03:35:55 +01:00
|
|
|
#include "gui.h"
|
|
|
|
#include "game_camera.h"
|
|
|
|
#include "world.h"
|
|
|
|
#include "ai_interface.h"
|
|
|
|
#include "program.h"
|
|
|
|
#include "chat_manager.h"
|
|
|
|
#include "script_manager.h"
|
|
|
|
#include "game_settings.h"
|
2010-05-29 08:56:32 +02:00
|
|
|
#include "network_interface.h"
|
2012-04-20 03:04:05 +02:00
|
|
|
#include "data_types.h"
|
2012-10-13 09:33:33 +02:00
|
|
|
#include "selection.h"
|
2010-09-07 07:25:40 +02:00
|
|
|
#include "leak_dumper.h"
|
2010-03-23 03:35:55 +01:00
|
|
|
|
|
|
|
using std::vector;
|
2010-10-02 04:17:50 +02:00
|
|
|
using namespace Shared::Platform;
|
2010-05-07 08:46:55 +02:00
|
|
|
using namespace Shared::PlatformCommon;
|
2010-03-23 03:35:55 +01:00
|
|
|
|
2012-05-22 08:17:56 +02:00
|
|
|
namespace Shared { namespace Graphics {
|
|
|
|
class VideoPlayer;
|
|
|
|
}}
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
namespace Glest{ namespace Game{
|
|
|
|
|
|
|
|
class GraphicMessageBox;
|
2013-02-16 11:07:36 +01:00
|
|
|
class ServerInterface;
|
2010-03-23 03:35:55 +01:00
|
|
|
|
2010-09-12 07:05:08 +02:00
|
|
|
enum LoadGameItem {
|
|
|
|
lgt_FactionPreview = 0x01,
|
|
|
|
lgt_TileSet = 0x02,
|
|
|
|
lgt_TechTree = 0x04,
|
|
|
|
lgt_Map = 0x08,
|
|
|
|
lgt_Scenario = 0x10,
|
|
|
|
|
|
|
|
lgt_All = (lgt_FactionPreview | lgt_TileSet | lgt_TechTree | lgt_Map | lgt_Scenario)
|
|
|
|
};
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
// =====================================================
|
|
|
|
// class Game
|
|
|
|
//
|
|
|
|
// Main game class
|
|
|
|
// =====================================================
|
2012-09-20 06:10:34 +02:00
|
|
|
class Game: public ProgramState, public FileCRCPreCacheThreadCallbackInterface, public CustomInputCallbackInterface {
|
2010-03-23 03:35:55 +01:00
|
|
|
public:
|
2012-04-04 02:30:16 +02:00
|
|
|
static const float highlightTime;
|
2010-03-23 03:35:55 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
typedef vector<Ai*> Ais;
|
|
|
|
typedef vector<AiInterface*> AiInterfaces;
|
|
|
|
|
|
|
|
private:
|
|
|
|
//main data
|
|
|
|
World world;
|
|
|
|
AiInterfaces aiInterfaces;
|
|
|
|
Gui gui;
|
|
|
|
GameCamera gameCamera;
|
|
|
|
Commander commander;
|
|
|
|
Console console;
|
|
|
|
ChatManager chatManager;
|
|
|
|
ScriptManager scriptManager;
|
|
|
|
|
|
|
|
//misc
|
|
|
|
Checksum checksum;
|
|
|
|
string loadingText;
|
|
|
|
int mouse2d;
|
2011-10-07 05:48:07 +02:00
|
|
|
int mouseX;
|
|
|
|
int mouseY; //coords win32Api
|
|
|
|
Vec2i mouseCellPos;
|
|
|
|
|
2010-08-24 03:21:34 +02:00
|
|
|
int updateFps, lastUpdateFps, avgUpdateFps;
|
2010-10-02 04:17:50 +02:00
|
|
|
int totalRenderFps, renderFps, lastRenderFps, avgRenderFps,currentAvgRenderFpsTotal;
|
2012-09-22 22:13:57 +02:00
|
|
|
uint64 tickCount;
|
2010-03-23 03:35:55 +01:00
|
|
|
bool paused;
|
2013-02-27 07:46:42 +01:00
|
|
|
bool pauseRequestSent;
|
|
|
|
bool resumeRequestSent;
|
2013-02-19 05:53:24 +01:00
|
|
|
bool pauseStateChanged;
|
2013-03-06 15:29:49 +01:00
|
|
|
bool pausedForJoinGame;
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
bool gameOver;
|
|
|
|
bool renderNetworkStatus;
|
2010-04-14 22:49:14 +02:00
|
|
|
bool showFullConsole;
|
2012-07-14 01:19:53 +02:00
|
|
|
bool setMarker;
|
2012-07-15 11:50:44 +02:00
|
|
|
bool cameraDragAllowed;
|
2010-12-20 21:01:14 +01:00
|
|
|
bool mouseMoved;
|
2010-03-23 03:35:55 +01:00
|
|
|
float scrollSpeed;
|
2011-04-12 01:26:50 +02:00
|
|
|
bool camLeftButtonDown;
|
|
|
|
bool camRightButtonDown;
|
|
|
|
bool camUpButtonDown;
|
|
|
|
bool camDownButtonDown;
|
|
|
|
|
2013-01-31 13:36:51 +01:00
|
|
|
int speed;
|
2010-03-23 03:35:55 +01:00
|
|
|
GraphicMessageBox mainMessageBox;
|
2010-07-01 08:11:14 +02:00
|
|
|
GraphicMessageBox errorMessageBox;
|
2010-03-23 03:35:55 +01:00
|
|
|
|
|
|
|
//misc ptr
|
|
|
|
ParticleSystem *weatherParticleSystem;
|
|
|
|
GameSettings gameSettings;
|
2010-03-24 02:28:48 +01:00
|
|
|
Vec2i lastMousePos;
|
2010-04-15 03:19:00 +02:00
|
|
|
time_t lastRenderLog2d;
|
2010-05-29 08:56:32 +02:00
|
|
|
DisplayMessageFunction originalDisplayMsgCallback;
|
2010-06-24 03:23:18 +02:00
|
|
|
bool isFirstRender;
|
2010-03-23 03:35:55 +01:00
|
|
|
|
2010-08-04 20:49:11 +02:00
|
|
|
bool quitTriggeredIndicator;
|
2012-10-02 08:20:39 +02:00
|
|
|
bool quitPendingIndicator;
|
2010-08-04 20:49:11 +02:00
|
|
|
|
2010-08-25 20:26:17 +02:00
|
|
|
int original_updateFps;
|
|
|
|
int original_cameraFps;
|
|
|
|
|
2010-08-28 22:52:25 +02:00
|
|
|
bool captureAvgTestStatus;
|
|
|
|
int updateFpsAvgTest;
|
|
|
|
int renderFpsAvgTest;
|
|
|
|
|
2011-07-07 00:02:38 +02:00
|
|
|
int renderExtraTeamColor;
|
|
|
|
static const int renderTeamColorCircleBit=1;
|
|
|
|
static const int renderTeamColorPlaneBit=2;
|
|
|
|
|
2010-09-11 18:14:03 +02:00
|
|
|
bool photoModeEnabled;
|
2011-06-10 00:54:45 +02:00
|
|
|
bool visibleHUD;
|
2012-10-12 00:10:31 +02:00
|
|
|
bool timeDisplay;
|
2011-06-21 01:48:22 +02:00
|
|
|
bool withRainEffect;
|
2010-10-29 18:27:22 +02:00
|
|
|
Program *program;
|
2010-09-11 18:14:03 +02:00
|
|
|
|
2011-01-20 09:19:14 +01:00
|
|
|
bool gameStarted;
|
|
|
|
|
2011-04-05 08:32:23 +02:00
|
|
|
time_t lastMaxUnitCalcTime;
|
|
|
|
|
2011-09-21 08:51:28 +02:00
|
|
|
PopupMenu popupMenu;
|
|
|
|
PopupMenu popupMenuSwitchTeams;
|
2012-09-21 07:45:09 +02:00
|
|
|
PopupMenu popupMenuDisconnectPlayer;
|
2011-09-21 08:51:28 +02:00
|
|
|
|
|
|
|
std::map<int,int> switchTeamIndexMap;
|
|
|
|
GraphicMessageBox switchTeamConfirmMessageBox;
|
|
|
|
|
2012-09-21 07:45:09 +02:00
|
|
|
std::map<int,int> disconnectPlayerIndexMap;
|
|
|
|
int playerIndexDisconnect;
|
|
|
|
GraphicMessageBox disconnectPlayerConfirmMessageBox;
|
|
|
|
|
2011-09-21 08:51:28 +02:00
|
|
|
int exitGamePopupMenuIndex;
|
|
|
|
int joinTeamPopupMenuIndex;
|
2011-10-03 22:48:09 +02:00
|
|
|
int pauseGamePopupMenuIndex;
|
2012-04-14 01:13:02 +02:00
|
|
|
int saveGamePopupMenuIndex;
|
|
|
|
int loadGamePopupMenuIndex;
|
2012-09-24 19:13:27 +02:00
|
|
|
//int markCellPopupMenuIndex;
|
|
|
|
//int unmarkCellPopupMenuIndex;
|
2011-10-03 02:36:28 +02:00
|
|
|
int keyboardSetupPopupMenuIndex;
|
2012-09-21 07:45:09 +02:00
|
|
|
int disconnectPlayerPopupMenuIndex;
|
2012-05-24 08:16:54 +02:00
|
|
|
//GLuint statelist3dMenu;
|
2011-10-03 02:36:28 +02:00
|
|
|
ProgramState *currentUIState;
|
2011-09-21 08:51:28 +02:00
|
|
|
|
2012-06-12 22:37:00 +02:00
|
|
|
bool isMarkCellEnabled;
|
2012-09-20 06:10:34 +02:00
|
|
|
Vec2i cellMarkedPos;
|
|
|
|
MarkedCell cellMarkedData;
|
|
|
|
bool isMarkCellTextEnabled;
|
|
|
|
|
2012-06-12 22:37:00 +02:00
|
|
|
Texture2D *markCellTexture;
|
2012-06-13 18:19:44 +02:00
|
|
|
bool isUnMarkCellEnabled;
|
|
|
|
Texture2D *unmarkCellTexture;
|
2012-06-12 22:37:00 +02:00
|
|
|
std::map<Vec2i, MarkedCell> mapMarkedCellList;
|
2012-07-13 23:50:34 +02:00
|
|
|
Texture2D *highlightCellTexture;
|
|
|
|
std::vector<MarkedCell> highlightedCells;
|
2011-09-24 23:07:15 +02:00
|
|
|
bool masterserverMode;
|
|
|
|
|
2011-10-21 22:57:42 +02:00
|
|
|
StrSound *currentAmbientSound;
|
|
|
|
|
2011-11-25 10:12:53 +01:00
|
|
|
time_t lastNetworkPlayerConnectionCheck;
|
|
|
|
|
2012-01-06 07:55:27 +01:00
|
|
|
time_t lastMasterServerGameStatsDump;
|
|
|
|
|
2012-03-13 00:08:22 +01:00
|
|
|
XmlNode *loadGameNode;
|
2012-03-20 05:53:26 +01:00
|
|
|
int lastworldFrameCountForReplay;
|
2012-03-20 06:23:32 +01:00
|
|
|
std::vector<std::pair<int,NetworkCommand> > replayCommandList;
|
2012-03-13 00:08:22 +01:00
|
|
|
|
2012-05-22 08:17:56 +02:00
|
|
|
std::vector<string> streamingVideos;
|
|
|
|
Shared::Graphics::VideoPlayer *videoPlayer;
|
|
|
|
bool playingStaticVideo;
|
|
|
|
|
2012-09-24 19:13:27 +02:00
|
|
|
Unit *currentCameraFollowUnit;
|
|
|
|
|
2012-10-13 09:33:33 +02:00
|
|
|
std::map<int,HighlightSpecialUnitInfo> unitHighlightList;
|
|
|
|
|
2013-01-10 22:16:28 +01:00
|
|
|
MasterSlaveThreadController masterController;
|
|
|
|
|
2013-02-15 19:25:10 +01:00
|
|
|
bool inJoinGameLoading;
|
2013-03-01 07:52:33 +01:00
|
|
|
bool initialResumeSpeedLoops;
|
2013-02-15 19:25:10 +01:00
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
public:
|
2011-03-22 03:02:54 +01:00
|
|
|
Game();
|
2011-09-24 23:07:15 +02:00
|
|
|
Game(Program *program, const GameSettings *gameSettings, bool masterserverMode);
|
2010-03-23 03:35:55 +01:00
|
|
|
~Game();
|
|
|
|
|
2012-06-12 22:37:00 +02:00
|
|
|
bool isMarkCellMode() const { return isMarkCellEnabled; }
|
|
|
|
const Texture2D * getMarkCellTexture() const { return markCellTexture; }
|
2012-06-13 18:19:44 +02:00
|
|
|
bool isUnMarkCellMode() const { return isUnMarkCellEnabled; }
|
|
|
|
const Texture2D * getUnMarkCellTexture() const { return unmarkCellTexture; }
|
|
|
|
|
2012-06-12 22:37:00 +02:00
|
|
|
std::map<Vec2i, MarkedCell> getMapMarkedCellList() const { return mapMarkedCellList; }
|
|
|
|
|
2012-07-13 23:50:34 +02:00
|
|
|
const Texture2D * getHighlightCellTexture() const { return highlightCellTexture; }
|
|
|
|
const std::vector<MarkedCell> * getHighlightedCells() const { return &highlightedCells; }
|
|
|
|
void addOrReplaceInHighlightedCells(MarkedCell mc);
|
|
|
|
|
2011-12-02 17:07:59 +01:00
|
|
|
bool isMasterserverMode() const { return masterserverMode; }
|
2010-03-23 03:35:55 +01:00
|
|
|
//get
|
2011-10-06 20:04:59 +02:00
|
|
|
GameSettings *getGameSettings() {return &gameSettings;}
|
|
|
|
void setGameSettings(GameSettings *settings) { gameSettings = *settings;}
|
2010-12-19 09:04:25 +01:00
|
|
|
const GameSettings *getReadOnlyGameSettings() const {return &gameSettings;}
|
2010-03-23 03:35:55 +01:00
|
|
|
|
|
|
|
const GameCamera *getGameCamera() const {return &gameCamera;}
|
2011-12-02 17:07:59 +01:00
|
|
|
GameCamera *getGameCameraPtr() {return &gameCamera;}
|
2010-03-23 03:35:55 +01:00
|
|
|
const Commander *getCommander() const {return &commander;}
|
2012-04-12 17:38:53 +02:00
|
|
|
Gui *getGuiPtr() {return &gui;}
|
2010-03-23 03:35:55 +01:00
|
|
|
const Gui *getGui() const {return &gui;}
|
|
|
|
Commander *getCommander() {return &commander;}
|
|
|
|
Console *getConsole() {return &console;}
|
|
|
|
ScriptManager *getScriptManager() {return &scriptManager;}
|
|
|
|
World *getWorld() {return &world;}
|
|
|
|
const World *getWorld() const {return &world;}
|
|
|
|
|
2012-03-13 01:44:55 +01:00
|
|
|
Program *getProgram() {return program;}
|
|
|
|
|
2012-04-12 17:38:53 +02:00
|
|
|
void removeUnitFromSelection(const Unit *unit);
|
2012-10-17 22:15:50 +02:00
|
|
|
bool addUnitToSelection(Unit *unit);
|
|
|
|
void addUnitToGroupSelection(Unit *unit,int groupIndex);
|
|
|
|
void removeUnitFromGroupSelection(int unitId,int groupIndex);
|
|
|
|
void recallGroupSelection(int groupIndex);
|
2012-04-12 17:38:53 +02:00
|
|
|
|
2012-07-14 23:29:15 +02:00
|
|
|
Uint64 getTickCount() {return tickCount;}
|
2012-04-01 20:23:26 +02:00
|
|
|
bool getPaused();
|
2013-03-06 15:29:49 +01:00
|
|
|
void setPaused(bool value, bool forceAllowPauseStateChange,bool clearCaches,bool joinNetworkGame);
|
2012-05-22 08:17:56 +02:00
|
|
|
void tryPauseToggle(bool pause);
|
|
|
|
void setupRenderForVideo();
|
2012-04-14 01:13:02 +02:00
|
|
|
void saveGame();
|
2010-09-10 14:15:21 +02:00
|
|
|
const int getTotalRenderFps() const {return totalRenderFps;}
|
2011-07-07 00:02:38 +02:00
|
|
|
|
|
|
|
void toggleTeamColorMarker();
|
2010-03-23 03:35:55 +01:00
|
|
|
//init
|
2011-10-06 22:44:55 +02:00
|
|
|
void resetMembers();
|
2011-10-06 20:04:59 +02:00
|
|
|
virtual void load(int loadTypes);
|
2010-03-23 03:35:55 +01:00
|
|
|
virtual void load();
|
|
|
|
virtual void init();
|
2010-09-12 07:05:08 +02:00
|
|
|
virtual void init(bool initForPreviewOnly);
|
2010-03-23 03:35:55 +01:00
|
|
|
virtual void update();
|
|
|
|
virtual void updateCamera();
|
|
|
|
virtual void render();
|
|
|
|
virtual void tick();
|
|
|
|
|
|
|
|
//event managing
|
2011-06-26 03:55:08 +02:00
|
|
|
virtual void keyDown(SDL_KeyboardEvent key);
|
|
|
|
virtual void keyUp(SDL_KeyboardEvent key);
|
|
|
|
virtual void keyPress(SDL_KeyboardEvent c);
|
2010-03-23 03:35:55 +01:00
|
|
|
virtual void mouseDownLeft(int x, int y);
|
|
|
|
virtual void mouseDownRight(int x, int y);
|
2010-12-20 21:01:14 +01:00
|
|
|
virtual void mouseUpCenter(int x, int y);
|
2010-03-23 03:35:55 +01:00
|
|
|
virtual void mouseUpLeft(int x, int y);
|
|
|
|
virtual void mouseDoubleClickLeft(int x, int y);
|
|
|
|
virtual void eventMouseWheel(int x, int y, int zDelta);
|
|
|
|
virtual void mouseMove(int x, int y, const MouseState *mouseState);
|
|
|
|
|
2010-07-29 07:24:51 +02:00
|
|
|
virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); }
|
2010-05-07 08:46:55 +02:00
|
|
|
|
2010-08-04 20:49:11 +02:00
|
|
|
virtual bool quitTriggered();
|
2010-08-07 06:49:06 +02:00
|
|
|
virtual Stats quitAndToggleState();
|
|
|
|
Stats quitGame();
|
|
|
|
static void exitGameState(Program *program, Stats &endStats);
|
2010-08-04 20:49:11 +02:00
|
|
|
|
2010-08-28 22:52:25 +02:00
|
|
|
void startPerformanceTimer();
|
|
|
|
void endPerformanceTimer();
|
|
|
|
Vec2i getPerformanceTimerResults();
|
|
|
|
|
2013-02-12 00:43:30 +01:00
|
|
|
static Texture2D * findFactionLogoTexture(const GameSettings *settings, Logger *logger=NULL,string factionLogoFilter=GameConstants::LOADING_SCREEN_FILE_FILTER, bool useTechDefaultIfFilterNotFound=true);
|
|
|
|
static string findFactionLogoFile(const GameSettings *settings, Logger *logger=NULL, string factionLogoFilter=GameConstants::LOADING_SCREEN_FILE_FILTER);
|
|
|
|
static string extractScenarioLogoFile(const GameSettings *settings, string &result, bool &loadingImageUsed, Logger *logger=NULL, string factionLogoFilter=GameConstants::LOADING_SCREEN_FILE_FILTER);
|
|
|
|
static string extractFactionLogoFile(bool &loadingImageUsed, string factionName, string scenarioDir, string techName, Logger *logger=NULL, string factionLogoFilter=GameConstants::LOADING_SCREEN_FILE_FILTER);
|
|
|
|
static string extractTechLogoFile(string scenarioDir, string techName, bool &loadingImageUsed, Logger *logger=NULL,string factionLogoFilter=GameConstants::LOADING_SCREEN_FILE_FILTER);
|
2011-03-22 03:02:54 +01:00
|
|
|
|
2011-06-09 02:59:03 +02:00
|
|
|
void loadHudTexture(const GameSettings *settings);
|
2010-08-31 08:38:27 +02:00
|
|
|
|
2010-09-30 02:49:57 +02:00
|
|
|
bool getGameOver() { return gameOver; }
|
2011-01-20 09:19:14 +01:00
|
|
|
bool hasGameStarted() { return gameStarted;}
|
2011-03-22 03:02:54 +01:00
|
|
|
virtual vector<Texture2D *> processTech(string techName);
|
2011-03-28 23:04:47 +02:00
|
|
|
virtual void consoleAddLine(string line);
|
2010-09-30 02:49:57 +02:00
|
|
|
|
2011-10-21 21:52:55 +02:00
|
|
|
void endGame();
|
|
|
|
|
2012-05-22 08:17:56 +02:00
|
|
|
void playStaticVideo(const string &playVideo);
|
|
|
|
void playStreamingVideo(const string &playVideo);
|
|
|
|
void stopStreamingVideo(const string &playVideo);
|
|
|
|
void stopAllVideo();
|
|
|
|
|
2013-02-15 19:25:10 +01:00
|
|
|
string saveGame(string name, string path="saved/");
|
|
|
|
static void loadGame(string name,Program *programPtr,bool isMasterserverMode, const GameSettings *joinGameSettings=NULL);
|
2012-03-10 04:27:25 +01:00
|
|
|
|
2012-03-20 05:53:26 +01:00
|
|
|
void addNetworkCommandToReplayList(NetworkCommand* networkCommand,int worldFrameCount);
|
|
|
|
|
2012-07-19 01:52:44 +02:00
|
|
|
bool factionLostGame(int factionIndex);
|
|
|
|
|
2012-09-25 09:05:52 +02:00
|
|
|
void addCellMarker(Vec2i cellPos, MarkedCell cellData);
|
|
|
|
void removeCellMarker(Vec2i surfaceCellPos, const Faction *faction);
|
2012-10-13 07:06:53 +02:00
|
|
|
void showMarker(Vec2i cellPos, MarkedCell cellData);
|
2012-09-25 09:05:52 +02:00
|
|
|
|
2012-10-13 09:33:33 +02:00
|
|
|
void highlightUnit(int unitId,float radius, float thickness, Vec4f color);
|
|
|
|
void unhighlightUnit(int unitId);
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
private:
|
|
|
|
//render
|
|
|
|
void render3d();
|
|
|
|
void render2d();
|
|
|
|
|
|
|
|
//misc
|
|
|
|
void checkWinner();
|
|
|
|
void checkWinnerStandard();
|
|
|
|
void checkWinnerScripted();
|
2012-11-20 03:26:51 +01:00
|
|
|
void setEndGameTeamWinnersAndLosers();
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
bool hasBuilding(const Faction *faction);
|
2012-05-03 22:25:35 +02:00
|
|
|
bool factionLostGame(const Faction *faction);
|
2010-03-23 03:35:55 +01:00
|
|
|
void incSpeed();
|
|
|
|
void decSpeed();
|
|
|
|
int getUpdateLoops();
|
2010-07-01 08:11:14 +02:00
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
void showLoseMessageBox();
|
|
|
|
void showWinMessageBox();
|
|
|
|
void showMessageBox(const string &text, const string &header, bool toggle);
|
2010-07-01 08:11:14 +02:00
|
|
|
void showErrorMessageBox(const string &text, const string &header, bool toggle);
|
|
|
|
|
2010-05-07 08:46:55 +02:00
|
|
|
void renderWorker();
|
2010-05-29 08:56:32 +02:00
|
|
|
static int ErrorDisplayMessage(const char *msg, bool exitApp);
|
2010-10-19 01:09:43 +02:00
|
|
|
|
|
|
|
void ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRole role);
|
2011-04-12 01:26:50 +02:00
|
|
|
void calcCameraMoveX();
|
|
|
|
void calcCameraMoveZ();
|
2011-09-21 08:51:28 +02:00
|
|
|
|
|
|
|
int getFirstUnusedTeamNumber();
|
2011-12-02 18:27:13 +01:00
|
|
|
void updateWorldStats();
|
2012-01-06 07:55:27 +01:00
|
|
|
|
2012-03-03 05:33:39 +01:00
|
|
|
void setupPopupMenus(bool checkClientAdminOverrideOnly);
|
|
|
|
|
2012-01-06 07:55:27 +01:00
|
|
|
string getDebugStats(std::map<int,string> &factionDebugInfo);
|
2012-05-22 08:17:56 +02:00
|
|
|
|
|
|
|
void renderVideoPlayer();
|
2012-06-12 22:37:00 +02:00
|
|
|
|
|
|
|
void updateNetworkMarkedCells();
|
2012-06-13 18:19:44 +02:00
|
|
|
void updateNetworkUnMarkedCells();
|
2012-07-13 23:50:34 +02:00
|
|
|
void updateNetworkHighligtedCells();
|
|
|
|
|
2012-09-20 06:10:34 +02:00
|
|
|
virtual void processInputText(string text, bool cancelled);
|
2012-09-24 19:13:27 +02:00
|
|
|
|
|
|
|
void startMarkCell();
|
|
|
|
void startCameraFollowUnit();
|
2013-02-16 11:07:36 +01:00
|
|
|
|
|
|
|
bool switchSetupForSlots(ServerInterface *& serverInterface,
|
|
|
|
int startIndex, int endIndex, bool onlyNetworkUnassigned);
|
|
|
|
|
2010-03-23 03:35:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}}//end namespace
|
|
|
|
|
|
|
|
#endif
|