diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-04 03:21:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-04 03:21:57 +0300 |
commit | 485ba81a87c50c23d1f97318e42f4937af1fda1f (patch) | |
tree | b1b85f22e9bf2ea10e5fcddf3000506d207015fe | |
parent | 554210becbfc9de611699889a3fd0f53525a1b83 (diff) | |
download | manaverse-485ba81a87c50c23d1f97318e42f4937af1fda1f.tar.gz manaverse-485ba81a87c50c23d1f97318e42f4937af1fda1f.tar.bz2 manaverse-485ba81a87c50c23d1f97318e42f4937af1fda1f.tar.xz manaverse-485ba81a87c50c23d1f97318e42f4937af1fda1f.zip |
Remove some useless includes if using SDL2.
-rw-r--r-- | src/being/compoundsprite.cpp | 14 | ||||
-rw-r--r-- | src/dyetool/dyemain.cpp | 7 | ||||
-rw-r--r-- | src/eventsmanager.cpp | 5 | ||||
-rw-r--r-- | src/gui/palette.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/textfield.cpp | 7 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 6 | ||||
-rw-r--r-- | src/input/keyinput.h | 4 | ||||
-rw-r--r-- | src/render/rendererslistsdl2.h | 2 | ||||
-rw-r--r-- | src/render/surfacegraphics.cpp | 3 | ||||
-rw-r--r-- | src/resources/db/itemfielddb.h | 1 | ||||
-rw-r--r-- | src/resources/dye/dyepalette.cpp | 2 |
11 files changed, 40 insertions, 13 deletions
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp index cd0ee8d62..39013767c 100644 --- a/src/being/compoundsprite.cpp +++ b/src/being/compoundsprite.cpp @@ -22,7 +22,6 @@ #include "being/compoundsprite.h" #include "configuration.h" -#include "game.h" #ifdef USE_OPENGL #include "main.h" @@ -32,10 +31,6 @@ #include "being/compounditem.h" -#include "const/resources/map/map.h" - -#include "resources/map/map.h" - #include "render/surfacegraphics.h" #include "resources/image.h" @@ -44,7 +39,16 @@ #include "utils/delete2.h" #include "utils/dtor.h" #include "utils/sdlcheckutils.h" + +#ifndef USE_SDL2 +#include "game.h" + +#include "const/resources/map/map.h" + +#include "resources/map/map.h" + #include "utils/timer.h" +#endif #include <SDL_endian.h> diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp index 4625e95fc..9763f603b 100644 --- a/src/dyetool/dyemain.cpp +++ b/src/dyetool/dyemain.cpp @@ -26,11 +26,10 @@ #include "resources/image.h" #include "resources/imagewriter.h" -#include "resources/sdlimagehelper.h" #ifdef USE_SDL2 #include "resources/surfaceimagehelper.h" -#endif +#endif // USE_SDL2 #include "resources/loaders/imageloader.h" @@ -41,7 +40,11 @@ #include <iostream> +#ifndef USE_SDL2 +#include "resources/sdlimagehelper.h" + #include <SDL.h> +#endif // USE_SDL2 #include "debug.h" diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 919c8bdbf..c8820487f 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -25,7 +25,6 @@ #ifndef DYECMD #include "game.h" #endif -#include "logger.h" #ifdef USE_MUMBLE #include "mumblemanager.h" #endif @@ -40,7 +39,9 @@ #ifdef USE_SDL2 #include "render/graphics.h" -#endif +#else // USE_SDL2 +#include "logger.h" +#endif // USE_SDL2 #include "utils/process.h" diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index cedfb0f86..ef0d33d89 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -25,7 +25,9 @@ #include "utils/timer.h" +#ifndef USE_SDL2 #include <cmath> +#endif // USE_SDL2 #include "debug.h" diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 9f64b56cd..9d89dfe45 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -69,13 +69,13 @@ #ifdef USE_SDL2 #include "enums/input/keyvalue.h" -#endif +#endif // USE_SDL2 #include "gui/gui.h" #include "gui/skin.h" #ifdef ANDROID #include "gui/windowmanager.h" -#endif +#endif // ANDROID #include "gui/fonts/font.h" @@ -85,7 +85,10 @@ #include "utils/copynpaste.h" #include "utils/stringutils.h" + +#ifndef USE_SDL2 #include "utils/timer.h" +#endif // USE_SDL2 #include "render/graphics.h" diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 8f3dea0cd..b3fdf4a62 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -35,7 +35,7 @@ #include "gui/windows/maileditwindow.h" #ifdef EATHENA_SUPPORT #include "gui/windows/npcdialog.h" -#endif +#endif // EATHENA_SUPPORT #include "gui/windows/shopwindow.h" #include "gui/windows/tradewindow.h" @@ -51,13 +51,15 @@ #include "net/inventoryhandler.h" #ifdef EATHENA_SUPPORT #include "net/npchandler.h" -#endif +#endif // EATHENA_SUPPORT #include "resources/item/item.h" #include "utils/gettext.h" +#ifndef USE_SDL2 #include <cmath> +#endif // USE_SDL2 #include "debug.h" diff --git a/src/input/keyinput.h b/src/input/keyinput.h index fb8246cf5..d582303a0 100644 --- a/src/input/keyinput.h +++ b/src/input/keyinput.h @@ -70,6 +70,10 @@ #include "input/key.h" +#ifdef USE_SDL2 +#include <string> +#endif // USE_SDL2 + #include "localconsts.h" class KeyInput final diff --git a/src/render/rendererslistsdl2.h b/src/render/rendererslistsdl2.h index e98922f70..3944f4a56 100644 --- a/src/render/rendererslistsdl2.h +++ b/src/render/rendererslistsdl2.h @@ -25,6 +25,8 @@ #include "utils/gettext.h" +#include "render/renderers.h" + #ifdef USE_OPENGL #ifdef ANDROID // defined OPENGL ANDROID diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp index d3083dd5c..e6fc33298 100644 --- a/src/render/surfacegraphics.cpp +++ b/src/render/surfacegraphics.cpp @@ -23,7 +23,10 @@ #include "render/surfacegraphics.h" #include "resources/image.h" + +#ifndef USE_SDL2 #include "resources/surfaceimagehelper.h" +#endif // USE_SDL2 #include "debug.h" diff --git a/src/resources/db/itemfielddb.h b/src/resources/db/itemfielddb.h index 18fa516b5..dc95e9558 100644 --- a/src/resources/db/itemfielddb.h +++ b/src/resources/db/itemfielddb.h @@ -24,6 +24,7 @@ #include "enums/simpletypes/skiperror.h" #include <map> +#include <string> #include "localconsts.h" diff --git a/src/resources/dye/dyepalette.cpp b/src/resources/dye/dyepalette.cpp index 930f23723..9b2a2a8a8 100644 --- a/src/resources/dye/dyepalette.cpp +++ b/src/resources/dye/dyepalette.cpp @@ -30,7 +30,9 @@ #include "utils/stringutils.h" +#ifndef USE_SDL2 #include <cmath> +#endif // USE_SDL2 #include <SDL_endian.h> |