diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-09 17:59:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-09 17:59:14 +0300 |
commit | db1e60556c72b1b87ff2a384c556ccca724c46d6 (patch) | |
tree | 22a5f4e9c4f436ef8e746e0a2d688de80c1597a6 /src/client.h | |
parent | c2bb49be52a92deccec7428b6859242688fc8987 (diff) | |
parent | 1716861f0ee2f7a3714c5b44bb0f017c3d8d3b2c (diff) | |
download | plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.gz plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.bz2 plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.xz plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/client.h')
-rw-r--r-- | src/client.h | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/src/client.h b/src/client.h index 48801b274..dcf761847 100644 --- a/src/client.h +++ b/src/client.h @@ -30,7 +30,12 @@ #include <guichan/actionlistener.hpp> #include <SDL.h> + +#ifdef USE_SDL2 +#include <SDL2_framerate.h> +#else #include <SDL_framerate.h> +#endif #include <string> @@ -46,17 +51,6 @@ class Skin; class Window; class QuitDialog; -/** - * Set the milliseconds value of a tick time. - */ -static const int MILLISECONDS_IN_A_TICK = 10; - -static const uint16_t DEFAULT_PORT = 6901; - -extern volatile int fps; -extern volatile int lps; -extern volatile int tick_time; -extern volatile int cur_time; extern bool isSafeMode; extern int serverVersion; extern unsigned int tmwServerVersion; @@ -74,13 +68,6 @@ extern ErrorListener errorListener; extern LoginData loginData; /** - * Returns elapsed time. (Warning: supposes the delay is always < 100 seconds) - */ -int get_elapsed_time(const int startTime) A_WARN_UNUSED; - -int get_elapsed_time1(const int startTime) A_WARN_UNUSED; - -/** * All client states. */ enum State @@ -233,9 +220,6 @@ public: State getState() const A_WARN_UNUSED { return mState; } - const std::string &getPackageDirectory() const A_WARN_UNUSED - { return mPackageDir; } - const std::string &getConfigDirectory() const A_WARN_UNUSED { return mConfigDir; } @@ -342,6 +326,22 @@ public: const bool modal); private: + void createWindows(); + + void initLang(); + + void initSoundManager(); + + void initConfigListeners(); + + void initGraphics(); + + void initTitle(); + + void extractDataDir(); + + void mountDataDir(); + void initRootDir(); void initHomeDir(); @@ -378,7 +378,7 @@ private: static Client *mInstance; - static void bindTextDomain(const char *const name, const char *const path); + static void bindTextDomain(const char *const path); static void setEnv(const char *const name, const char *const value); @@ -390,7 +390,6 @@ private: Options mOptions; - std::string mPackageDir; std::string mConfigDir; std::string mServerConfigDir; std::string mLocalDataDir; @@ -424,9 +423,6 @@ private: SDL_Surface *mIcon; - SDL_TimerID mLogicCounterId; - SDL_TimerID mSecondsCounterId; - std::string mCaption; FPSmanager mFpsManager; Skin *mSkin; |