summaryrefslogtreecommitdiff
path: root/src/dyetool
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/dyetool
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/dyetool')
-rw-r--r--src/dyetool/actions/actions.cpp2
-rw-r--r--src/dyetool/client.cpp58
-rw-r--r--src/dyetool/client.h2
-rw-r--r--src/dyetool/dyemain.cpp5
4 files changed, 38 insertions, 29 deletions
diff --git a/src/dyetool/actions/actions.cpp b/src/dyetool/actions/actions.cpp
index 6898e27df..98ab8d95d 100644
--- a/src/dyetool/actions/actions.cpp
+++ b/src/dyetool/actions/actions.cpp
@@ -90,7 +90,7 @@ impHandlerVoid(dumpGL)
impHandlerVoid(dumpMods)
#if defined USE_OPENGL && defined DEBUG_SDLFONT
impHandlerVoid(testSdlFont)
-#endif
+#endif // defined USE_OPENGL && defined DEBUG_SDLFONT
impHandlerVoid(createItems)
impHandlerVoid(createItem)
impHandlerVoid(uploadConfig)
diff --git a/src/dyetool/client.cpp b/src/dyetool/client.cpp
index 74423d3fe..1d089e4ad 100644
--- a/src/dyetool/client.cpp
+++ b/src/dyetool/client.cpp
@@ -61,7 +61,8 @@
#include "utils/mrand.h"
#ifdef ANDROID
#include "utils/paths.h"
-#endif
+#endif // ANDROID
+
#include "utils/physfstools.h"
#include "utils/sdlcheckutils.h"
#include "utils/timer.h"
@@ -76,20 +77,20 @@
#include <SDL_syswm.h>
#include "utils/specialfolder.h"
#undef ERROR
-#endif
+#endif // WIN32
#ifdef ANDROID
#ifndef USE_SDL2
#include <SDL_screenkeyboard.h>
#include <fstream>
-#endif
-#endif
+#endif // USE_SDL2
+#endif // ANDROID
#ifdef USE_SDL2
#include <SDL2_framerate.h>
-#else
+#else // USE_SDL2
#include <SDL_framerate.h>
-#endif
+#endif // USE_SDL2
#include "debug.h"
@@ -120,7 +121,7 @@ Client::Client() :
mPerfomanceButton(nullptr),
#ifdef ANDROID
mCloseButton(nullptr),
-#endif
+#endif // ANDROID
mState(State::GAME),
mOldState(State::START),
mSkin(nullptr),
@@ -162,7 +163,8 @@ void Client::gameInit()
#ifdef USE_FUZZER
Fuzzer::init();
-#endif
+#endif // USE_FUZZER
+
if (settings.options.test.empty())
ConfigManager::backupConfig("config.xml");
ConfigManager::initConfiguration();
@@ -177,7 +179,7 @@ void Client::gameInit()
#ifndef ANDROID
if (settings.options.test.empty())
ConfigManager::storeSafeParameters();
-#endif
+#endif // ANDROID
ResourceManager::init();
if (!resourceManager->setWriteDir(settings.localDataDir))
@@ -219,20 +221,22 @@ void Client::gameInit()
#ifndef USE_SDL2
SDL_EnableUNICODE(1);
-#endif
+#endif // USE_SDL2
+
WindowManager::applyKeyRepeat();
// disable unused SDL events
#ifndef USE_SDL2
SDL_EventState(SDL_VIDEOEXPOSE, SDL_IGNORE);
-#endif
+#endif // USE_SDL2
+
SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
#ifdef WIN32
Dirs::extractDataDir();
Dirs::mountDataDir();
-#endif
+#endif // WIN32
WindowManager::setIcon();
ConfigManager::checkConfigVersion();
@@ -245,15 +249,17 @@ void Client::gameInit()
{
graphicsManager.detectVideoSettings();
}
-#endif
-#endif
+#endif // !defined(ANDROID) && !defined(__APPLE__) &&
+ // !defined(__native_client__)
+#endif // defined(USE_OPENGL)
+
updateEnv();
initGraphics();
#ifndef WIN32
Dirs::extractDataDir();
Dirs::mountDataDir();
-#endif
+#endif // WIN32
Dirs::updateDataPath();
@@ -269,7 +275,7 @@ void Client::gameInit()
TranslationManager::loadCurrentLang();
#ifdef ENABLE_CUSTOMNLS
TranslationManager::loadGettextLang();
-#endif
+#endif // ENABLE_CUSTOMNLS
WindowManager::initTitle();
@@ -323,8 +329,8 @@ void Client::gameInit()
#ifdef ANDROID
#ifndef USE_SDL2
WindowManager::updateScreenKeyboard(SDL_GetScreenKeyboardHeight(nullptr));
-#endif
-#endif
+#endif // USE_SDL2
+#endif // ANDROID
mSkin = theme->load("windowmenu.xml", "");
if (mSkin)
@@ -444,7 +450,8 @@ void Client::gameClear()
#ifdef DEBUG_CONFIG
config.enableKeyLogging();
-#endif
+#endif // DEBUG_CONFIG
+
config.removeOldKeys();
config.write();
serverConfig.write();
@@ -457,12 +464,12 @@ void Client::gameClear()
#ifdef USE_PROFILER
Perfomance::clear();
-#endif
+#endif // USE_PROFILER
#ifdef DEBUG_OPENGL_LEAKS
if (logger)
logger->log("textures left: %d", textures_count);
-#endif
+#endif // DEBUG_OPENGL_LEAKS
// delete2(chatLogger);
TranslationManager::close();
@@ -509,7 +516,8 @@ void Client::stateGame()
ADDBUTTON(mCloseButton, new Button(desktop,
// TRANSLATORS: close quick button
_("Close"), "close", this))
-#endif
+#endif // ANDROID
+
desktop->setSize(mainGraphics->getWidth(),
mainGraphics->getHeight());
}
@@ -730,8 +738,8 @@ void Client::moveButtons(const int width)
#ifdef ANDROID
x -= mCloseButton->getWidth() + mButtonSpacing;
mCloseButton->setPosition(x, mButtonPadding);
-#endif
-#endif
+#endif // ANDROID
+#endif // WIN32
}
}
@@ -746,7 +754,7 @@ void Client::logVars()
#ifdef ANDROID
logger->log("APPDIR: %s", getenv("APPDIR"));
logger->log("DATADIR2: %s", getSdStoragePath().c_str());
-#endif
+#endif // ANDROID
}
void Client::slowLogic()
diff --git a/src/dyetool/client.h b/src/dyetool/client.h
index 4c8c2c3bd..bdcdadc09 100644
--- a/src/dyetool/client.h
+++ b/src/dyetool/client.h
@@ -102,7 +102,7 @@ class Client final : public ActionListener
Button *mPerfomanceButton;
#ifdef ANDROID
Button *mCloseButton;
-#endif
+#endif // ANDROID
StateT mState;
StateT mOldState;
diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp
index 8a69b79c1..abe3da289 100644
--- a/src/dyetool/dyemain.cpp
+++ b/src/dyetool/dyemain.cpp
@@ -81,9 +81,10 @@ int main(int argc, char **argv)
#ifdef USE_SDL2
imageHelper = new SurfaceImageHelper;
-#else
+#else // USE_SDL2
+
imageHelper = new SDLImageHelper;
-#endif
+#endif // USE_SDL2
ResourceManager::init();
resourceManager->setWriteDir(".");