Skip to content

Commit

Permalink
Cleanup SDL headers (#3743)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunchleoc committed Apr 21, 2020
1 parent 9dfa221 commit a6d0c10
Show file tree
Hide file tree
Showing 78 changed files with 154 additions and 74 deletions.
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ if (WIN32)
SRCS
main.cc
${WIN32_ICON_O}
USES_SDL2
DEPENDS
base_exceptions
widelands_ball_of_mud
Expand All @@ -53,7 +52,6 @@ else()
wl_binary(widelands
SRCS
main.cc
USES_SDL2
DEPENDS
base_exceptions
widelands_ball_of_mud
Expand Down Expand Up @@ -93,7 +91,6 @@ wl_library(widelands_ball_of_mud
wlapplication_messages.h
USES_BOOST_REGEX
USES_SDL2
USES_SDL2_IMAGE
USES_SDL2_TTF
DEPENDS
base_exceptions
Expand Down Expand Up @@ -136,9 +133,6 @@ wl_library(widelands_options
SRCS
wlapplication_options.cc
wlapplication_options.h
USES_SDL2
USES_SDL2_IMAGE
USES_SDL2_TTF
DEPENDS
base_log
io_filesystem
Expand Down
2 changes: 1 addition & 1 deletion src/base/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <iostream>
#include <memory>

#include <SDL.h>
#include <SDL_log.h>
#ifdef _WIN32
#include <windows.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/base/scoped_timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "base/scoped_timer.h"

#include <SDL.h>
#include <SDL_timer.h>
#include <boost/format.hpp>

#include "base/log.h"
Expand Down
2 changes: 2 additions & 0 deletions src/editor/editorinteractive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <memory>

#include <SDL_keycode.h>
#include <SDL_mouse.h>
#include <SDL_timer.h>

#include "base/i18n.h"
#include "base/warning.h"
Expand Down
2 changes: 0 additions & 2 deletions src/editor/ui_menus/tool_place_critter_options_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "editor/ui_menus/tool_place_critter_options_menu.h"

#include <SDL_keycode.h>

#include "base/i18n.h"
#include "editor/editorinteractive.h"
#include "editor/tools/place_critter_tool.h"
Expand Down
2 changes: 0 additions & 2 deletions src/editor/ui_menus/tool_place_immovable_options_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "editor/ui_menus/tool_place_immovable_options_menu.h"

#include <SDL_keycode.h>

#include "base/i18n.h"
#include "editor/editorinteractive.h"
#include "editor/tools/place_immovable_tool.h"
Expand Down
2 changes: 0 additions & 2 deletions src/editor/ui_menus/tool_set_terrain_options_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include <memory>

#include <SDL_keycode.h>

#include "base/i18n.h"
#include "editor/editorinteractive.h"
#include "editor/tools/set_terrain_tool.h"
Expand Down
3 changes: 0 additions & 3 deletions src/graphic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ wl_library(graphic_image_io
image_io.h
image_io.cc
USES_PNG
USES_SDL2
USES_SDL2_IMAGE
DEPENDS
base_exceptions
Expand All @@ -79,7 +78,6 @@ wl_library(graphic_image_cache
SRCS
image_cache.cc
image_cache.h
USES_SDL2
DEPENDS
base_macros
graphic_image_io
Expand Down Expand Up @@ -289,7 +287,6 @@ wl_library(graphic_wordwrap
wordwrap.cc
wordwrap.h
USES_ICU
USES_SDL2_TTF
DEPENDS
base_geometry
base_log
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <string>

#include <SDL.h>
#include <SDL_pixels.h>

struct RGBColor {
RGBColor(uint8_t R, uint8_t G, uint8_t B);
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/gl/initialize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <csignal>

#include <SDL.h>
#include <SDL_messagebox.h>
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/graphic/gl/initialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef WL_GRAPHIC_GL_INITIALIZE_H
#define WL_GRAPHIC_GL_INITIALIZE_H

#include <SDL.h>
#include <SDL_video.h>

#include "graphic/gl/system_headers.h"

Expand Down
2 changes: 2 additions & 0 deletions src/graphic/graphic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <memory>

#include <SDL_messagebox.h>

#include "base/i18n.h"
#include "base/log.h"
#include "base/wexception.h"
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/graphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <memory>

#include <SDL.h>
#include <SDL_video.h>

#include "graphic/image_cache.h"
#include "graphic/style_manager.h"
Expand Down
2 changes: 0 additions & 2 deletions src/graphic/image_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <cassert>
#include <memory>

#include <SDL.h>

#include "graphic/image.h"
#include "graphic/image_io.h"
#include "graphic/texture.h"
Expand Down
1 change: 0 additions & 1 deletion src/graphic/image_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <memory>

#include <SDL.h>
#include <SDL_image.h>
#include <png.h>

Expand Down
2 changes: 2 additions & 0 deletions src/graphic/mouse_cursor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <string>

#include <SDL_events.h>

#include "graphic/graphic.h"
#include "graphic/image_io.h"
#include "graphic/rendertarget.h"
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/sdl_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "graphic/sdl_utils.h"

#include <SDL.h>
#include <SDL_surface.h>

SDL_Surface* empty_sdl_surface(int16_t w, int16_t h) {
SDL_Surface* const surface =
Expand Down
2 changes: 0 additions & 2 deletions src/graphic/surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "graphic/surface.h"

#include <SDL.h>

#include "base/rect.h"
#include "base/vector.h"
#include "graphic/gl/coordinate_conversion.h"
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/text/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ wl_library(graphic_text
textstream.h
texture_cache.h
transient_cache.h
USES_ICU
USES_SDL2
USES_SDL2_TTF
USES_ICU
DEPENDS
base_exceptions
base_geometry
Expand Down
1 change: 0 additions & 1 deletion src/graphic/text/rt_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <memory>

#include <SDL.h>
#include <boost/algorithm/string/replace.hpp>

#include "graphic/text/rt_errors_impl.h"
Expand Down
1 change: 0 additions & 1 deletion src/graphic/text/rt_render.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <memory>
#include <queue>

#include <SDL.h>
#include <boost/algorithm/string.hpp>

#include "base/i18n.h"
Expand Down
2 changes: 0 additions & 2 deletions src/graphic/text/sdl_ttf_font.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include <memory>

#include <SDL.h>
#include <SDL_ttf.h>
#include <boost/format.hpp>

#include "graphic/sdl_utils.h"
Expand Down
1 change: 1 addition & 0 deletions src/graphic/text/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/paths.h.cmake ${CMAKE_CURRENT_BINARY_
wl_binary(wl_render_richtext
SRCS
render_richtext.cc
USES_SDL2_TTF
DEPENDS
base_log
graphic
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/text/transient_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <map>
#include <memory>

#include <SDL.h>
#include <SDL_timer.h>

#include "base/macros.h"

Expand Down
2 changes: 1 addition & 1 deletion src/graphic/texture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <cassert>

#include <SDL.h>
#include <SDL_surface.h>

#include "base/log.h"
#include "base/macros.h"
Expand Down
1 change: 0 additions & 1 deletion src/graphic/wordwrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <memory>

#include <SDL_ttf.h>
#include <unicode/unistr.h>

#include "base/log.h"
Expand Down
1 change: 1 addition & 0 deletions src/logic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ wl_library(logic_game_controller
replay_game_controller.cc
single_player_game_controller.h
single_player_game_controller.cc
USES_SDL2
DEPENDS
ai
logic
Expand Down
2 changes: 1 addition & 1 deletion src/logic/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include <string>

#ifndef _WIN32
#include <SDL.h> // for a dirty hack.
#include <unistd.h> // for usleep
#else
#include <SDL_events.h> // for a dirty hack.
#include <windows.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/logic/map_objects/tribes/building_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#ifndef WL_LOGIC_MAP_OBJECTS_TRIBES_BUILDING_SETTINGS_H
#define WL_LOGIC_MAP_OBJECTS_TRIBES_BUILDING_SETTINGS_H

#include <string>

#include "logic/widelands.h"
#include "map_io/tribes_legacy_lookup_table.h"

Expand Down
2 changes: 2 additions & 0 deletions src/logic/replay_game_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "logic/replay_game_controller.h"

#include <SDL_timer.h>

#include "logic/game.h"
#include "logic/replay.h"
#include "ui_basic/messagebox.h"
Expand Down
1 change: 1 addition & 0 deletions src/logic/save_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "logic/save_handler.h"

#include <SDL_timer.h>
#include <boost/algorithm/string.hpp>

#include "base/log.h"
Expand Down
2 changes: 2 additions & 0 deletions src/logic/single_player_game_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "logic/single_player_game_controller.h"

#include <SDL_timer.h>

#include "ai/computer_player.h"
#include "logic/game.h"
#include "logic/player.h"
Expand Down
2 changes: 0 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
*/

#include <iostream>

#include <typeinfo>

#include <SDL_main.h>
#include <unistd.h>

#include "base/wexception.h"
Expand Down
1 change: 1 addition & 0 deletions src/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ wl_library(network
network_player_settings_backend.h
network_protocol.h
relay_protocol.h
USES_SDL2
DEPENDS
ai
base_exceptions
Expand Down
2 changes: 2 additions & 0 deletions src/network/gameclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <memory>

#include <SDL_timer.h>

#include "base/i18n.h"
#include "base/log.h"
#include "base/warning.h"
Expand Down
1 change: 1 addition & 0 deletions src/network/gamehost.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <algorithm>
#include <memory>

#include <SDL_timer.h>
#ifndef _WIN32
#include <unistd.h> // for usleep
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/network/network.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "network/network.h"

#include <SDL.h>
#include <SDL_timer.h>

#include "base/log.h"

Expand Down
2 changes: 2 additions & 0 deletions src/scripting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ wl_library(scripting_lua_interface
lua_path.h
run_script.cc
run_script.h
USES_SDL2
DEPENDS
base_i18n
base_macros
Expand Down Expand Up @@ -99,6 +100,7 @@ wl_library(scripting_logic
persistence.cc
persistence.h
eris.h
USES_SDL2
DEPENDS
base_exceptions
base_log
Expand Down
2 changes: 1 addition & 1 deletion src/scripting/lua_globals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <memory>

#include <SDL.h>
#include <SDL_timer.h>

#include "base/i18n.h"
#include "build_info.h"
Expand Down

0 comments on commit a6d0c10

Please sign in to comment.