73 #include "utils/timer.h"
83 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
84 #include <SDL_syswm.h>
98 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
99 #include <SDL_screenkeyboard.h>
106 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
110 #include <SDL_framerate.h>
250 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0)
258 SDL_EnableUNICODE(1);
276 #if defined(USE_OPENGL)
277 #if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
310 #ifdef ENABLE_CUSTOMNLS
311 TranslationManager::loadGettextLang();
375 if (
mSkin !=
nullptr)
401 catch (
const char *
const err)
409 "Magick - Real.ogg"),
498 config.enableKeyLogging();
515 #ifdef DEBUG_OPENGL_LEAKS
530 #define ADDBUTTON(var, object) var = object; \
531 x -= var->getWidth() + mButtonSpacing; \
532 var->setPosition(x, mButtonPadding); \
592 while (lastTickTime !=
tick_time && k < 40)
665 PRAGMA45(GCC diagnostic ignored
"-Wswitch-enum")
715 BLOCK_END(
"Client::gameExec State::LOAD_DATA")
735 const std::string &eventId =
event.getId();
737 if (eventId ==
"close")
742 if (eventId ==
"Setup")
746 else if (eventId ==
"help")
751 else if (eventId ==
"about")
756 else if (eventId ==
"Video")
760 else if (eventId ==
"Themes")
764 else if (eventId ==
"Perfomance")
824 logger->
log(
"APPDIR: %s", getenv(
"APPDIR"));
825 logger->
log(
"DATADIR2: %s", getSdStoragePath().c_str());
841 if (name ==
"server.themanaworld.org"
842 || name ==
"themanaworld.org"
843 || name ==
"167.114.185.71")
void SDL_initFramerate(FPSmanager *manager)
Initialize the framerate manager.
Uint32 SDL_framerateDelay(FPSmanager *manager)
Delay execution to maintain a constant framerate and calculate fps.
void setState(const StateT state)
void action(const ActionEvent &event)
Button * mPerfomanceButton
void windowRemoved(const Window *const window)
void moveButtons(const int width)
static void initGraphics()
static void backupConfig(const std::string &name)
static void storeSafeParameters()
static void checkConfigVersion()
static void initConfiguration()
std::string getValue(const std::string &key, const std::string &deflt) const
bool getBoolValue(const std::string &key) const
const std::string & getConfigPath() const
void incValue(const std::string &key)
void init(const std::string &filename, const UseVirtFs useResManager, const SkipError skipError)
int getIntValue(const std::string &key) const
static void initRootDir()
static void initHomeDir()
static void initScreenshotDir()
static void extractDataDir()
static void mountDataDir()
static void updateDataPath()
static void initFunctions()
bool handleEvents() const
static void deleteRenderers()
void detectVideoSettings()
virtual void updateScreen()=0
void postInit(Graphics *const graphics)
void log(const char *const log_text,...)
void log1(const char *const log_text)
void safeError(const std::string &error_text) __attribute__((noreturn))
void setReportUnimplemented(const bool n)
void error(const std::string &error_text) __attribute__((noreturn))
void setDebugLog(const bool n)
void setLogFile(const std::string &logFilename)
int getOption(const std::string &name) const
void playMusic(const std::string &fileName, const SkipError skipError)
void setSfxVolume(const int volume)
void setMusicVolume(const int volume)
static std::string getThemePath()
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
static void loadCurrentLang()
static void loadDictionaryLang()
Configuration serverConfig
void setPathsDefaults(Configuration &cfg)
void setConfigDefaults2(Configuration &cfg)
void setBrandingDefaults(Configuration &cfg)
DialogsManager * dialogsManager
unsigned int tmwServerVersion
volatile bool runCounters
unsigned long mSearchHash
#define ADDBUTTON(var, object)
EventsManager eventsManager
const Image *restrict const top
GraphicsManager graphicsManager
PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) class TestMain
ImageHelper * imageHelper
void setLogLevel(const int level)
void allowScreenSaver(const bool allow)
void searchAndAddArchives(const std::string &path, const std::string &ext, const Append append)
bool setWriteDir(const std::string &newDir)
bool mountDir(std::string newDir, const Append append)
void setFramerate(const unsigned int fpsLimit)
void updateScreenKeyboard(const int height)
#define BLOCK_START(name)
const bool SkipError_false
const bool SkipError_true
SoundManager soundManager
std::string strprintf(const char *const format,...)
std::string pathJoin(std::string str1, const std::string &str2)
Structure holding the state and timing information of the framerate controller.
TouchManager touchManager
const bool UseVirtFs_false
const bool UseVirtFs_true
WindowContainer * windowContainer