From 20a85d76d94c9c5c7fbe198c3d0e1fbee97a485f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 9 Nov 2017 01:56:20 +0300 Subject: [PATCH] Move files to subdirectories (#6599) * Move files around --- build/android/jni/Android.mk | 60 +++++----- src/CMakeLists.txt | 39 +------ src/client.cpp | 2 +- src/client/clientlauncher.cpp | 6 +- src/client/inputhandler.cpp | 2 +- src/client/inputhandler.h | 2 +- src/client/joystick_controller.cpp | 2 +- src/database/CMakeLists.txt | 10 ++ src/{ => database}/database-dummy.cpp | 0 src/{ => database}/database-dummy.h | 0 src/{ => database}/database-files.cpp | 0 src/{ => database}/database-files.h | 0 src/{ => database}/database-leveldb.cpp | 0 src/{ => database}/database-leveldb.h | 0 src/{ => database}/database-postgresql.cpp | 0 src/{ => database}/database-postgresql.h | 0 src/{ => database}/database-redis.cpp | 0 src/{ => database}/database-redis.h | 0 src/{ => database}/database-sqlite3.cpp | 0 src/{ => database}/database-sqlite3.h | 0 src/{ => database}/database.cpp | 0 src/{ => database}/database.h | 0 src/emerge.cpp | 8 +- src/emerge.h | 2 +- src/game.cpp | 12 +- src/gui/CMakeLists.txt | 13 +++ src/{ => gui}/guiChatConsole.cpp | 0 src/{ => gui}/guiChatConsole.h | 0 src/{ => gui}/guiEditBoxWithScrollbar.cpp | 0 src/{ => gui}/guiEditBoxWithScrollbar.h | 0 src/{ => gui}/guiEngine.cpp | 0 src/{ => gui}/guiEngine.h | 0 src/{ => gui}/guiFormSpecMenu.cpp | 0 src/{ => gui}/guiFormSpecMenu.h | 0 src/{ => gui}/guiKeyChangeMenu.cpp | 0 src/{ => gui}/guiKeyChangeMenu.h | 0 src/{ => gui}/guiMainMenu.h | 0 src/{ => gui}/guiPasswordChange.cpp | 0 src/{ => gui}/guiPasswordChange.h | 0 src/{ => gui}/guiPathSelectMenu.cpp | 0 src/{ => gui}/guiPathSelectMenu.h | 0 src/{ => gui}/guiTable.cpp | 0 src/{ => gui}/guiTable.h | 0 src/{ => gui}/guiVolumeChange.cpp | 0 src/{ => gui}/guiVolumeChange.h | 0 src/{ => gui}/intlGUIEditBox.cpp | 0 src/{ => gui}/intlGUIEditBox.h | 0 src/{ => gui}/mainmenumanager.h | 0 src/{ => gui}/modalMenu.h | 0 src/{ => gui}/touchscreengui.cpp | 0 src/{ => gui}/touchscreengui.h | 0 src/hud.cpp | 2 +- src/main.cpp | 10 +- src/map.cpp | 16 +-- src/map_settings_manager.cpp | 2 +- src/mapblock.h | 2 +- src/mapgen/CMakeLists.txt | 19 ++++ src/{ => mapgen}/cavegen.cpp | 0 src/{ => mapgen}/cavegen.h | 0 src/{ => mapgen}/dungeongen.cpp | 0 src/{ => mapgen}/dungeongen.h | 0 src/{ => mapgen}/mapgen.cpp | 0 src/{ => mapgen}/mapgen.h | 0 src/{ => mapgen}/mapgen_carpathian.cpp | 0 src/{ => mapgen}/mapgen_carpathian.h | 0 src/{ => mapgen}/mapgen_flat.cpp | 0 src/{ => mapgen}/mapgen_flat.h | 0 src/{ => mapgen}/mapgen_fractal.cpp | 0 src/{ => mapgen}/mapgen_fractal.h | 0 src/{ => mapgen}/mapgen_singlenode.cpp | 0 src/{ => mapgen}/mapgen_singlenode.h | 0 src/{ => mapgen}/mapgen_v5.cpp | 0 src/{ => mapgen}/mapgen_v5.h | 0 src/{ => mapgen}/mapgen_v6.cpp | 0 src/{ => mapgen}/mapgen_v6.h | 0 src/{ => mapgen}/mapgen_v7.cpp | 0 src/{ => mapgen}/mapgen_v7.h | 0 src/{ => mapgen}/mapgen_valleys.cpp | 0 src/{ => mapgen}/mapgen_valleys.h | 0 src/{ => mapgen}/mg_biome.cpp | 0 src/{ => mapgen}/mg_biome.h | 0 src/{ => mapgen}/mg_decoration.cpp | 0 src/{ => mapgen}/mg_decoration.h | 0 src/{ => mapgen}/mg_ore.cpp | 0 src/{ => mapgen}/mg_ore.h | 0 src/{ => mapgen}/mg_schematic.cpp | 0 src/{ => mapgen}/mg_schematic.h | 0 src/{ => mapgen}/treegen.cpp | 0 src/{ => mapgen}/treegen.h | 0 src/network/connectionthreads.h | 2 +- src/script/common/c_content.cpp | 2 +- src/script/cpp_api/s_env.cpp | 2 +- src/script/cpp_api/s_mainmenu.h | 2 +- src/script/lua_api/l_client.cpp | 2 +- src/script/lua_api/l_env.cpp | 2 +- src/script/lua_api/l_mainmenu.cpp | 10 +- src/script/lua_api/l_mapgen.cpp | 12 +- src/script/lua_api/l_sound.cpp | 2 +- src/script/lua_api/l_vmanip.cpp | 2 +- src/server.cpp | 6 +- src/serverenvironment.cpp | 8 +- src/subgame.cpp | 2 +- src/unittest/test_map_settings_manager.cpp | 2 +- src/unittest/test_schematic.cpp | 2 +- src/util/container.h | 8 +- src/util/directiontables.h | 4 +- src/util/numeric.cpp | 6 +- src/util/numeric.h | 8 +- src/util/pointedthing.cpp | 2 +- src/util/pointedthing.h | 4 +- src/util/pointer.h | 4 +- src/util/serialize.cpp | 4 +- src/util/serialize.h | 6 +- src/util/string.cpp | 4 +- src/util/thread.h | 6 +- src/util/timetaker.cpp | 4 +- src/util/timetaker.h | 4 +- util/travis/clang-format-whitelist.txt | 126 ++++++++++----------- 118 files changed, 236 insertions(+), 221 deletions(-) create mode 100644 src/database/CMakeLists.txt rename src/{ => database}/database-dummy.cpp (100%) rename src/{ => database}/database-dummy.h (100%) rename src/{ => database}/database-files.cpp (100%) rename src/{ => database}/database-files.h (100%) rename src/{ => database}/database-leveldb.cpp (100%) rename src/{ => database}/database-leveldb.h (100%) rename src/{ => database}/database-postgresql.cpp (100%) rename src/{ => database}/database-postgresql.h (100%) rename src/{ => database}/database-redis.cpp (100%) rename src/{ => database}/database-redis.h (100%) rename src/{ => database}/database-sqlite3.cpp (100%) rename src/{ => database}/database-sqlite3.h (100%) rename src/{ => database}/database.cpp (100%) rename src/{ => database}/database.h (100%) create mode 100644 src/gui/CMakeLists.txt rename src/{ => gui}/guiChatConsole.cpp (100%) rename src/{ => gui}/guiChatConsole.h (100%) rename src/{ => gui}/guiEditBoxWithScrollbar.cpp (100%) rename src/{ => gui}/guiEditBoxWithScrollbar.h (100%) rename src/{ => gui}/guiEngine.cpp (100%) rename src/{ => gui}/guiEngine.h (100%) rename src/{ => gui}/guiFormSpecMenu.cpp (100%) rename src/{ => gui}/guiFormSpecMenu.h (100%) rename src/{ => gui}/guiKeyChangeMenu.cpp (100%) rename src/{ => gui}/guiKeyChangeMenu.h (100%) rename src/{ => gui}/guiMainMenu.h (100%) rename src/{ => gui}/guiPasswordChange.cpp (100%) rename src/{ => gui}/guiPasswordChange.h (100%) rename src/{ => gui}/guiPathSelectMenu.cpp (100%) rename src/{ => gui}/guiPathSelectMenu.h (100%) rename src/{ => gui}/guiTable.cpp (100%) rename src/{ => gui}/guiTable.h (100%) rename src/{ => gui}/guiVolumeChange.cpp (100%) rename src/{ => gui}/guiVolumeChange.h (100%) rename src/{ => gui}/intlGUIEditBox.cpp (100%) rename src/{ => gui}/intlGUIEditBox.h (100%) rename src/{ => gui}/mainmenumanager.h (100%) rename src/{ => gui}/modalMenu.h (100%) rename src/{ => gui}/touchscreengui.cpp (100%) rename src/{ => gui}/touchscreengui.h (100%) create mode 100644 src/mapgen/CMakeLists.txt rename src/{ => mapgen}/cavegen.cpp (100%) rename src/{ => mapgen}/cavegen.h (100%) rename src/{ => mapgen}/dungeongen.cpp (100%) rename src/{ => mapgen}/dungeongen.h (100%) rename src/{ => mapgen}/mapgen.cpp (100%) rename src/{ => mapgen}/mapgen.h (100%) rename src/{ => mapgen}/mapgen_carpathian.cpp (100%) rename src/{ => mapgen}/mapgen_carpathian.h (100%) rename src/{ => mapgen}/mapgen_flat.cpp (100%) rename src/{ => mapgen}/mapgen_flat.h (100%) rename src/{ => mapgen}/mapgen_fractal.cpp (100%) rename src/{ => mapgen}/mapgen_fractal.h (100%) rename src/{ => mapgen}/mapgen_singlenode.cpp (100%) rename src/{ => mapgen}/mapgen_singlenode.h (100%) rename src/{ => mapgen}/mapgen_v5.cpp (100%) rename src/{ => mapgen}/mapgen_v5.h (100%) rename src/{ => mapgen}/mapgen_v6.cpp (100%) rename src/{ => mapgen}/mapgen_v6.h (100%) rename src/{ => mapgen}/mapgen_v7.cpp (100%) rename src/{ => mapgen}/mapgen_v7.h (100%) rename src/{ => mapgen}/mapgen_valleys.cpp (100%) rename src/{ => mapgen}/mapgen_valleys.h (100%) rename src/{ => mapgen}/mg_biome.cpp (100%) rename src/{ => mapgen}/mg_biome.h (100%) rename src/{ => mapgen}/mg_decoration.cpp (100%) rename src/{ => mapgen}/mg_decoration.h (100%) rename src/{ => mapgen}/mg_ore.cpp (100%) rename src/{ => mapgen}/mg_ore.h (100%) rename src/{ => mapgen}/mg_schematic.cpp (100%) rename src/{ => mapgen}/mg_schematic.h (100%) rename src/{ => mapgen}/treegen.cpp (100%) rename src/{ => mapgen}/treegen.h (100%) diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 854ab75a7..375ab5ce4 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -114,7 +114,7 @@ LOCAL_C_INCLUDES := \ LOCAL_SRC_FILES := \ jni/src/ban.cpp \ jni/src/camera.cpp \ - jni/src/cavegen.cpp \ + jni/src/mapgen/cavegen.cpp \ jni/src/chat.cpp \ jni/src/client.cpp \ jni/src/clientenvironment.cpp \ @@ -132,13 +132,13 @@ LOCAL_SRC_FILES := \ jni/src/content_sao.cpp \ jni/src/convert_json.cpp \ jni/src/craftdef.cpp \ - jni/src/database-dummy.cpp \ - jni/src/database-files.cpp \ - jni/src/database-sqlite3.cpp \ - jni/src/database.cpp \ + jni/src/database/database-dummy.cpp \ + jni/src/database/database-files.cpp \ + jni/src/database/database-sqlite3.cpp \ + jni/src/database/database.cpp \ jni/src/debug.cpp \ jni/src/defaultsettings.cpp \ - jni/src/dungeongen.cpp \ + jni/src/mapgen/dungeongen.cpp \ jni/src/emerge.cpp \ jni/src/environment.cpp \ jni/src/face_position_cache.cpp \ @@ -148,20 +148,20 @@ LOCAL_SRC_FILES := \ jni/src/game.cpp \ jni/src/genericobject.cpp \ jni/src/gettext.cpp \ - jni/src/guiChatConsole.cpp \ - jni/src/guiEditBoxWithScrollbar.cpp \ - jni/src/guiEngine.cpp \ - jni/src/guiPathSelectMenu.cpp \ - jni/src/guiFormSpecMenu.cpp \ - jni/src/guiKeyChangeMenu.cpp \ - jni/src/guiPasswordChange.cpp \ - jni/src/guiTable.cpp \ + jni/src/gui/guiChatConsole.cpp \ + jni/src/gui/guiEditBoxWithScrollbar.cpp \ + jni/src/gui/guiEngine.cpp \ + jni/src/gui/guiPathSelectMenu.cpp \ + jni/src/gui/guiFormSpecMenu.cpp \ + jni/src/gui/guiKeyChangeMenu.cpp \ + jni/src/gui/guiPasswordChange.cpp \ + jni/src/gui/guiTable.cpp \ jni/src/guiscalingfilter.cpp \ - jni/src/guiVolumeChange.cpp \ + jni/src/gui/guiVolumeChange.cpp \ jni/src/httpfetch.cpp \ jni/src/hud.cpp \ jni/src/imagefilters.cpp \ - jni/src/intlGUIEditBox.cpp \ + jni/src/gui/intlGUIEditBox.cpp \ jni/src/inventory.cpp \ jni/src/inventorymanager.cpp \ jni/src/itemdef.cpp \ @@ -175,24 +175,24 @@ LOCAL_SRC_FILES := \ jni/src/map_settings_manager.cpp \ jni/src/mapblock.cpp \ jni/src/mapblock_mesh.cpp \ - jni/src/mapgen.cpp \ - jni/src/mapgen_carpathian.cpp \ - jni/src/mapgen_flat.cpp \ - jni/src/mapgen_fractal.cpp \ - jni/src/mapgen_singlenode.cpp \ - jni/src/mapgen_v5.cpp \ - jni/src/mapgen_v6.cpp \ - jni/src/mapgen_v7.cpp \ - jni/src/mapgen_valleys.cpp \ + jni/src/mapgen/mapgen.cpp \ + jni/src/mapgen/mapgen_carpathian.cpp \ + jni/src/mapgen/mapgen_flat.cpp \ + jni/src/mapgen/mapgen_fractal.cpp \ + jni/src/mapgen/mapgen_singlenode.cpp \ + jni/src/mapgen/mapgen_v5.cpp \ + jni/src/mapgen/mapgen_v6.cpp \ + jni/src/mapgen/mapgen_v7.cpp \ + jni/src/mapgen/mapgen_valleys.cpp \ jni/src/mapnode.cpp \ jni/src/mapsector.cpp \ jni/src/mesh.cpp \ jni/src/mesh_generator_thread.cpp \ jni/src/metadata.cpp \ - jni/src/mg_biome.cpp \ - jni/src/mg_decoration.cpp \ - jni/src/mg_ore.cpp \ - jni/src/mg_schematic.cpp \ + jni/src/mapgen/mg_biome.cpp \ + jni/src/mapgen/mg_decoration.cpp \ + jni/src/mapgen/mg_ore.cpp \ + jni/src/mapgen/mg_schematic.cpp \ jni/src/minimap.cpp \ jni/src/mods.cpp \ jni/src/nameidmapping.cpp \ @@ -228,7 +228,7 @@ LOCAL_SRC_FILES := \ jni/src/subgame.cpp \ jni/src/tileanimation.cpp \ jni/src/tool.cpp \ - jni/src/treegen.cpp \ + jni/src/mapgen/treegen.cpp \ jni/src/version.cpp \ jni/src/voxel.cpp \ jni/src/voxelalgorithms.cpp \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82f60be86..9964b828b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -371,6 +371,9 @@ add_custom_target(GenerateVersion add_subdirectory(threading) +add_subdirectory(database) +add_subdirectory(gui) +add_subdirectory(mapgen) add_subdirectory(network) add_subdirectory(script) add_subdirectory(unittest) @@ -378,8 +381,9 @@ add_subdirectory(util) add_subdirectory(irrlicht_changes) set(common_SRCS + ${database_SRCS} + ${mapgen_SRCS} ban.cpp - cavegen.cpp chat.cpp clientiface.cpp collision.cpp @@ -388,16 +392,8 @@ set(common_SRCS content_sao.cpp convert_json.cpp craftdef.cpp - database-dummy.cpp - database-files.cpp - database-leveldb.cpp - database-postgresql.cpp - database-redis.cpp - database-sqlite3.cpp - database.cpp debug.cpp defaultsettings.cpp - dungeongen.cpp emerge.cpp environment.cpp face_position_cache.cpp @@ -414,22 +410,9 @@ set(common_SRCS map.cpp map_settings_manager.cpp mapblock.cpp - mapgen.cpp - mapgen_carpathian.cpp - mapgen_flat.cpp - mapgen_fractal.cpp - mapgen_singlenode.cpp - mapgen_v5.cpp - mapgen_v6.cpp - mapgen_v7.cpp - mapgen_valleys.cpp mapnode.cpp mapsector.cpp metadata.cpp - mg_biome.cpp - mg_decoration.cpp - mg_ore.cpp - mg_schematic.cpp modchannels.cpp mods.cpp nameidmapping.cpp @@ -462,7 +445,6 @@ set(common_SRCS tileanimation.cpp tool.cpp translation.cpp - treegen.cpp version.cpp voxel.cpp voxelalgorithms.cpp @@ -503,6 +485,7 @@ endif(BUILD_CLIENT) set(client_SRCS ${client_SRCS} ${common_SRCS} + ${gui_SRCS} ${sound_SRCS} ${client_network_SRCS} ${client_irrlicht_changes_SRCS} @@ -520,19 +503,9 @@ set(client_SRCS filecache.cpp fontengine.cpp game.cpp - guiChatConsole.cpp - guiEditBoxWithScrollbar.cpp - guiEngine.cpp - guiPathSelectMenu.cpp - guiFormSpecMenu.cpp - guiKeyChangeMenu.cpp - guiPasswordChange.cpp guiscalingfilter.cpp - guiTable.cpp - guiVolumeChange.cpp hud.cpp imagefilters.cpp - intlGUIEditBox.cpp keycode.cpp localplayer.cpp main.cpp diff --git a/src/client.cpp b/src/client.cpp index 2538f52aa..bca9f41d0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "clientmap.h" #include "clientmedia.h" #include "version.h" -#include "database-sqlite3.h" +#include "database/database-sqlite3.h" #include "serialization.h" #include "guiscalingfilter.h" #include "script/scripting_client.h" diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index dbaba8040..741a90d9f 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -17,18 +17,18 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "mainmenumanager.h" +#include "gui/mainmenumanager.h" #include "clouds.h" #include "server.h" #include "filesys.h" -#include "guiMainMenu.h" +#include "gui/guiMainMenu.h" #include "game.h" #include "player.h" #include "chat.h" #include "gettext.h" #include "profiler.h" #include "serverlist.h" -#include "guiEngine.h" +#include "gui/guiEngine.h" #include "fontengine.h" #include "clientlauncher.h" #include "version.h" diff --git a/src/client/inputhandler.cpp b/src/client/inputhandler.cpp index b176f3ad7..48b94ae95 100644 --- a/src/client/inputhandler.cpp +++ b/src/client/inputhandler.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/numeric.h" #include "inputhandler.h" -#include "mainmenumanager.h" +#include "gui/mainmenumanager.h" bool MyEventReceiver::OnEvent(const SEvent &event) { diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h index 249336947..165c75990 100644 --- a/src/client/inputhandler.h +++ b/src/client/inputhandler.h @@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "renderingengine.h" #ifdef HAVE_TOUCHSCREENGUI -#include "touchscreengui.h" +#include "gui/touchscreengui.h" #endif class KeyList : private std::list diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index 95bd77bc4..c29e8b639 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "settings.h" #include "gettime.h" #include "porting.h" -#include "../util/string.h" +#include "util/string.h" bool JoystickButtonCmb::isTriggered(const irr::SEvent::SJoystickEvent &ev) const { diff --git a/src/database/CMakeLists.txt b/src/database/CMakeLists.txt new file mode 100644 index 000000000..e9d157c29 --- /dev/null +++ b/src/database/CMakeLists.txt @@ -0,0 +1,10 @@ +set(database_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/database.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-dummy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-files.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-leveldb.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-postgresql.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-redis.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/database-sqlite3.cpp + PARENT_SCOPE +) diff --git a/src/database-dummy.cpp b/src/database/database-dummy.cpp similarity index 100% rename from src/database-dummy.cpp rename to src/database/database-dummy.cpp diff --git a/src/database-dummy.h b/src/database/database-dummy.h similarity index 100% rename from src/database-dummy.h rename to src/database/database-dummy.h diff --git a/src/database-files.cpp b/src/database/database-files.cpp similarity index 100% rename from src/database-files.cpp rename to src/database/database-files.cpp diff --git a/src/database-files.h b/src/database/database-files.h similarity index 100% rename from src/database-files.h rename to src/database/database-files.h diff --git a/src/database-leveldb.cpp b/src/database/database-leveldb.cpp similarity index 100% rename from src/database-leveldb.cpp rename to src/database/database-leveldb.cpp diff --git a/src/database-leveldb.h b/src/database/database-leveldb.h similarity index 100% rename from src/database-leveldb.h rename to src/database/database-leveldb.h diff --git a/src/database-postgresql.cpp b/src/database/database-postgresql.cpp similarity index 100% rename from src/database-postgresql.cpp rename to src/database/database-postgresql.cpp diff --git a/src/database-postgresql.h b/src/database/database-postgresql.h similarity index 100% rename from src/database-postgresql.h rename to src/database/database-postgresql.h diff --git a/src/database-redis.cpp b/src/database/database-redis.cpp similarity index 100% rename from src/database-redis.cpp rename to src/database/database-redis.cpp diff --git a/src/database-redis.h b/src/database/database-redis.h similarity index 100% rename from src/database-redis.h rename to src/database/database-redis.h diff --git a/src/database-sqlite3.cpp b/src/database/database-sqlite3.cpp similarity index 100% rename from src/database-sqlite3.cpp rename to src/database/database-sqlite3.cpp diff --git a/src/database-sqlite3.h b/src/database/database-sqlite3.h similarity index 100% rename from src/database-sqlite3.h rename to src/database/database-sqlite3.h diff --git a/src/database.cpp b/src/database/database.cpp similarity index 100% rename from src/database.cpp rename to src/database/database.cpp diff --git a/src/database.h b/src/database/database.h similarity index 100% rename from src/database.h rename to src/database/database.h diff --git a/src/emerge.cpp b/src/emerge.cpp index e9d96c0ba..ffe387f63 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -34,10 +34,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "log.h" #include "map.h" #include "mapblock.h" -#include "mg_biome.h" -#include "mg_ore.h" -#include "mg_decoration.h" -#include "mg_schematic.h" +#include "mapgen/mg_biome.h" +#include "mapgen/mg_ore.h" +#include "mapgen/mg_decoration.h" +#include "mapgen/mg_schematic.h" #include "nodedef.h" #include "profiler.h" #include "scripting_server.h" diff --git a/src/emerge.h b/src/emerge.h index 135121b39..e1f5d5ab0 100644 --- a/src/emerge.h +++ b/src/emerge.h @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "network/networkprotocol.h" #include "irr_v3d.h" #include "util/container.h" -#include "mapgen.h" // for MapgenParams +#include "mapgen/mapgen.h" // for MapgenParams #include "map.h" #define BLOCK_EMERGE_ALLOW_GEN (1 << 0) diff --git a/src/game.cpp b/src/game.cpp index 200de2c59..462fd37a9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -39,12 +39,12 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "log.h" #include "filesys.h" #include "gettext.h" -#include "guiChatConsole.h" -#include "guiFormSpecMenu.h" -#include "guiKeyChangeMenu.h" -#include "guiPasswordChange.h" -#include "guiVolumeChange.h" -#include "mainmenumanager.h" +#include "gui/guiChatConsole.h" +#include "gui/guiFormSpecMenu.h" +#include "gui/guiKeyChangeMenu.h" +#include "gui/guiPasswordChange.h" +#include "gui/guiVolumeChange.h" +#include "gui/mainmenumanager.h" #include "mapblock.h" #include "minimap.h" #include "nodedef.h" // Needed for determining pointing to nodes diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt new file mode 100644 index 000000000..067ba09a8 --- /dev/null +++ b/src/gui/CMakeLists.txt @@ -0,0 +1,13 @@ +set(gui_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/guiChatConsole.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiEditBoxWithScrollbar.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiEngine.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiFormSpecMenu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiKeyChangeMenu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiPasswordChange.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiPathSelectMenu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiTable.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiVolumeChange.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/intlGUIEditBox.cpp + PARENT_SCOPE +) diff --git a/src/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp similarity index 100% rename from src/guiChatConsole.cpp rename to src/gui/guiChatConsole.cpp diff --git a/src/guiChatConsole.h b/src/gui/guiChatConsole.h similarity index 100% rename from src/guiChatConsole.h rename to src/gui/guiChatConsole.h diff --git a/src/guiEditBoxWithScrollbar.cpp b/src/gui/guiEditBoxWithScrollbar.cpp similarity index 100% rename from src/guiEditBoxWithScrollbar.cpp rename to src/gui/guiEditBoxWithScrollbar.cpp diff --git a/src/guiEditBoxWithScrollbar.h b/src/gui/guiEditBoxWithScrollbar.h similarity index 100% rename from src/guiEditBoxWithScrollbar.h rename to src/gui/guiEditBoxWithScrollbar.h diff --git a/src/guiEngine.cpp b/src/gui/guiEngine.cpp similarity index 100% rename from src/guiEngine.cpp rename to src/gui/guiEngine.cpp diff --git a/src/guiEngine.h b/src/gui/guiEngine.h similarity index 100% rename from src/guiEngine.h rename to src/gui/guiEngine.h diff --git a/src/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp similarity index 100% rename from src/guiFormSpecMenu.cpp rename to src/gui/guiFormSpecMenu.cpp diff --git a/src/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h similarity index 100% rename from src/guiFormSpecMenu.h rename to src/gui/guiFormSpecMenu.h diff --git a/src/guiKeyChangeMenu.cpp b/src/gui/guiKeyChangeMenu.cpp similarity index 100% rename from src/guiKeyChangeMenu.cpp rename to src/gui/guiKeyChangeMenu.cpp diff --git a/src/guiKeyChangeMenu.h b/src/gui/guiKeyChangeMenu.h similarity index 100% rename from src/guiKeyChangeMenu.h rename to src/gui/guiKeyChangeMenu.h diff --git a/src/guiMainMenu.h b/src/gui/guiMainMenu.h similarity index 100% rename from src/guiMainMenu.h rename to src/gui/guiMainMenu.h diff --git a/src/guiPasswordChange.cpp b/src/gui/guiPasswordChange.cpp similarity index 100% rename from src/guiPasswordChange.cpp rename to src/gui/guiPasswordChange.cpp diff --git a/src/guiPasswordChange.h b/src/gui/guiPasswordChange.h similarity index 100% rename from src/guiPasswordChange.h rename to src/gui/guiPasswordChange.h diff --git a/src/guiPathSelectMenu.cpp b/src/gui/guiPathSelectMenu.cpp similarity index 100% rename from src/guiPathSelectMenu.cpp rename to src/gui/guiPathSelectMenu.cpp diff --git a/src/guiPathSelectMenu.h b/src/gui/guiPathSelectMenu.h similarity index 100% rename from src/guiPathSelectMenu.h rename to src/gui/guiPathSelectMenu.h diff --git a/src/guiTable.cpp b/src/gui/guiTable.cpp similarity index 100% rename from src/guiTable.cpp rename to src/gui/guiTable.cpp diff --git a/src/guiTable.h b/src/gui/guiTable.h similarity index 100% rename from src/guiTable.h rename to src/gui/guiTable.h diff --git a/src/guiVolumeChange.cpp b/src/gui/guiVolumeChange.cpp similarity index 100% rename from src/guiVolumeChange.cpp rename to src/gui/guiVolumeChange.cpp diff --git a/src/guiVolumeChange.h b/src/gui/guiVolumeChange.h similarity index 100% rename from src/guiVolumeChange.h rename to src/gui/guiVolumeChange.h diff --git a/src/intlGUIEditBox.cpp b/src/gui/intlGUIEditBox.cpp similarity index 100% rename from src/intlGUIEditBox.cpp rename to src/gui/intlGUIEditBox.cpp diff --git a/src/intlGUIEditBox.h b/src/gui/intlGUIEditBox.h similarity index 100% rename from src/intlGUIEditBox.h rename to src/gui/intlGUIEditBox.h diff --git a/src/mainmenumanager.h b/src/gui/mainmenumanager.h similarity index 100% rename from src/mainmenumanager.h rename to src/gui/mainmenumanager.h diff --git a/src/modalMenu.h b/src/gui/modalMenu.h similarity index 100% rename from src/modalMenu.h rename to src/gui/modalMenu.h diff --git a/src/touchscreengui.cpp b/src/gui/touchscreengui.cpp similarity index 100% rename from src/touchscreengui.cpp rename to src/gui/touchscreengui.cpp diff --git a/src/touchscreengui.h b/src/gui/touchscreengui.h similarity index 100% rename from src/touchscreengui.h rename to src/gui/touchscreengui.h diff --git a/src/hud.cpp b/src/hud.cpp index 29beef16a..ecd2a521d 100644 --- a/src/hud.cpp +++ b/src/hud.cpp @@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client/renderingengine.h" #ifdef HAVE_TOUCHSCREENGUI -#include "touchscreengui.h" +#include "gui/touchscreengui.h" #endif Hud::Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, diff --git a/src/main.cpp b/src/main.cpp index 792cd104d..8fce83dcb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "quicktune.h" #include "httpfetch.h" #include "gameparams.h" -#include "database.h" +#include "database/database.h" #include "config.h" #include "player.h" #include "porting.h" @@ -41,14 +41,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "terminal_chat_console.h" #endif #ifndef SERVER -#include "guiMainMenu.h" +#include "gui/guiMainMenu.h" #include "client/clientlauncher.h" -#include "guiEngine.h" -#include "mainmenumanager.h" +#include "gui/guiEngine.h" +#include "gui/mainmenumanager.h" #endif #ifdef HAVE_TOUCHSCREENGUI - #include "touchscreengui.h" + #include "gui/touchscreengui.h" #endif #if !defined(SERVER) && \ diff --git a/src/map.cpp b/src/map.cpp index 9bcbc6c00..256c542a1 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -37,24 +37,24 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "environment.h" #include "reflowscan.h" #include "emerge.h" -#include "mapgen_v6.h" -#include "mg_biome.h" +#include "mapgen/mapgen_v6.h" +#include "mapgen/mg_biome.h" #include "config.h" #include "server.h" -#include "database.h" -#include "database-dummy.h" -#include "database-sqlite3.h" +#include "database/database.h" +#include "database/database-dummy.h" +#include "database/database-sqlite3.h" #include "script/scripting_server.h" #include #include #if USE_LEVELDB -#include "database-leveldb.h" +#include "database/database-leveldb.h" #endif #if USE_REDIS -#include "database-redis.h" +#include "database/database-redis.h" #endif #if USE_POSTGRESQL -#include "database-postgresql.h" +#include "database/database-postgresql.h" #endif diff --git a/src/map_settings_manager.cpp b/src/map_settings_manager.cpp index c1dcf5215..16e7d8230 100644 --- a/src/map_settings_manager.cpp +++ b/src/map_settings_manager.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "debug.h" #include "filesys.h" #include "log.h" -#include "mapgen.h" +#include "mapgen/mapgen.h" #include "settings.h" #include "map_settings_manager.h" diff --git a/src/mapblock.h b/src/mapblock.h index b93007d72..3871c656d 100644 --- a/src/mapblock.h +++ b/src/mapblock.h @@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "modifiedstate.h" #include "util/numeric.h" // getContainerPos #include "settings.h" -#include "mapgen.h" +#include "mapgen/mapgen.h" class Map; class NodeMetadataList; diff --git a/src/mapgen/CMakeLists.txt b/src/mapgen/CMakeLists.txt new file mode 100644 index 000000000..e74bd85db --- /dev/null +++ b/src/mapgen/CMakeLists.txt @@ -0,0 +1,19 @@ +set(mapgen_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/cavegen.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dungeongen.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_carpathian.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_flat.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_fractal.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_singlenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_v5.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_v6.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_v7.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_valleys.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mg_biome.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mg_decoration.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mg_ore.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mg_schematic.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/treegen.cpp + PARENT_SCOPE +) diff --git a/src/cavegen.cpp b/src/mapgen/cavegen.cpp similarity index 100% rename from src/cavegen.cpp rename to src/mapgen/cavegen.cpp diff --git a/src/cavegen.h b/src/mapgen/cavegen.h similarity index 100% rename from src/cavegen.h rename to src/mapgen/cavegen.h diff --git a/src/dungeongen.cpp b/src/mapgen/dungeongen.cpp similarity index 100% rename from src/dungeongen.cpp rename to src/mapgen/dungeongen.cpp diff --git a/src/dungeongen.h b/src/mapgen/dungeongen.h similarity index 100% rename from src/dungeongen.h rename to src/mapgen/dungeongen.h diff --git a/src/mapgen.cpp b/src/mapgen/mapgen.cpp similarity index 100% rename from src/mapgen.cpp rename to src/mapgen/mapgen.cpp diff --git a/src/mapgen.h b/src/mapgen/mapgen.h similarity index 100% rename from src/mapgen.h rename to src/mapgen/mapgen.h diff --git a/src/mapgen_carpathian.cpp b/src/mapgen/mapgen_carpathian.cpp similarity index 100% rename from src/mapgen_carpathian.cpp rename to src/mapgen/mapgen_carpathian.cpp diff --git a/src/mapgen_carpathian.h b/src/mapgen/mapgen_carpathian.h similarity index 100% rename from src/mapgen_carpathian.h rename to src/mapgen/mapgen_carpathian.h diff --git a/src/mapgen_flat.cpp b/src/mapgen/mapgen_flat.cpp similarity index 100% rename from src/mapgen_flat.cpp rename to src/mapgen/mapgen_flat.cpp diff --git a/src/mapgen_flat.h b/src/mapgen/mapgen_flat.h similarity index 100% rename from src/mapgen_flat.h rename to src/mapgen/mapgen_flat.h diff --git a/src/mapgen_fractal.cpp b/src/mapgen/mapgen_fractal.cpp similarity index 100% rename from src/mapgen_fractal.cpp rename to src/mapgen/mapgen_fractal.cpp diff --git a/src/mapgen_fractal.h b/src/mapgen/mapgen_fractal.h similarity index 100% rename from src/mapgen_fractal.h rename to src/mapgen/mapgen_fractal.h diff --git a/src/mapgen_singlenode.cpp b/src/mapgen/mapgen_singlenode.cpp similarity index 100% rename from src/mapgen_singlenode.cpp rename to src/mapgen/mapgen_singlenode.cpp diff --git a/src/mapgen_singlenode.h b/src/mapgen/mapgen_singlenode.h similarity index 100% rename from src/mapgen_singlenode.h rename to src/mapgen/mapgen_singlenode.h diff --git a/src/mapgen_v5.cpp b/src/mapgen/mapgen_v5.cpp similarity index 100% rename from src/mapgen_v5.cpp rename to src/mapgen/mapgen_v5.cpp diff --git a/src/mapgen_v5.h b/src/mapgen/mapgen_v5.h similarity index 100% rename from src/mapgen_v5.h rename to src/mapgen/mapgen_v5.h diff --git a/src/mapgen_v6.cpp b/src/mapgen/mapgen_v6.cpp similarity index 100% rename from src/mapgen_v6.cpp rename to src/mapgen/mapgen_v6.cpp diff --git a/src/mapgen_v6.h b/src/mapgen/mapgen_v6.h similarity index 100% rename from src/mapgen_v6.h rename to src/mapgen/mapgen_v6.h diff --git a/src/mapgen_v7.cpp b/src/mapgen/mapgen_v7.cpp similarity index 100% rename from src/mapgen_v7.cpp rename to src/mapgen/mapgen_v7.cpp diff --git a/src/mapgen_v7.h b/src/mapgen/mapgen_v7.h similarity index 100% rename from src/mapgen_v7.h rename to src/mapgen/mapgen_v7.h diff --git a/src/mapgen_valleys.cpp b/src/mapgen/mapgen_valleys.cpp similarity index 100% rename from src/mapgen_valleys.cpp rename to src/mapgen/mapgen_valleys.cpp diff --git a/src/mapgen_valleys.h b/src/mapgen/mapgen_valleys.h similarity index 100% rename from src/mapgen_valleys.h rename to src/mapgen/mapgen_valleys.h diff --git a/src/mg_biome.cpp b/src/mapgen/mg_biome.cpp similarity index 100% rename from src/mg_biome.cpp rename to src/mapgen/mg_biome.cpp diff --git a/src/mg_biome.h b/src/mapgen/mg_biome.h similarity index 100% rename from src/mg_biome.h rename to src/mapgen/mg_biome.h diff --git a/src/mg_decoration.cpp b/src/mapgen/mg_decoration.cpp similarity index 100% rename from src/mg_decoration.cpp rename to src/mapgen/mg_decoration.cpp diff --git a/src/mg_decoration.h b/src/mapgen/mg_decoration.h similarity index 100% rename from src/mg_decoration.h rename to src/mapgen/mg_decoration.h diff --git a/src/mg_ore.cpp b/src/mapgen/mg_ore.cpp similarity index 100% rename from src/mg_ore.cpp rename to src/mapgen/mg_ore.cpp diff --git a/src/mg_ore.h b/src/mapgen/mg_ore.h similarity index 100% rename from src/mg_ore.h rename to src/mapgen/mg_ore.h diff --git a/src/mg_schematic.cpp b/src/mapgen/mg_schematic.cpp similarity index 100% rename from src/mg_schematic.cpp rename to src/mapgen/mg_schematic.cpp diff --git a/src/mg_schematic.h b/src/mapgen/mg_schematic.h similarity index 100% rename from src/mg_schematic.h rename to src/mapgen/mg_schematic.h diff --git a/src/treegen.cpp b/src/mapgen/treegen.cpp similarity index 100% rename from src/treegen.cpp rename to src/mapgen/treegen.cpp diff --git a/src/treegen.h b/src/mapgen/treegen.h similarity index 100% rename from src/treegen.h rename to src/mapgen/treegen.h diff --git a/src/network/connectionthreads.h b/src/network/connectionthreads.h index 15c247f76..ddac4ae20 100644 --- a/src/network/connectionthreads.h +++ b/src/network/connectionthreads.h @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once #include -#include "../threading/thread.h" +#include "threading/thread.h" #include "connection.h" namespace con diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 73661a7b6..a9ff1be44 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "tool.h" #include "serverobject.h" #include "porting.h" -#include "mg_schematic.h" +#include "mapgen/mg_schematic.h" #include "noise.h" #include "util/pointedthing.h" #include "debug.h" // For FATAL_ERROR diff --git a/src/script/cpp_api/s_env.cpp b/src/script/cpp_api/s_env.cpp index 517892b03..170640ce0 100644 --- a/src/script/cpp_api/s_env.cpp +++ b/src/script/cpp_api/s_env.cpp @@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_converter.h" #include "log.h" #include "environment.h" -#include "mapgen.h" +#include "mapgen/mapgen.h" #include "lua_api/l_env.h" #include "server.h" diff --git a/src/script/cpp_api/s_mainmenu.h b/src/script/cpp_api/s_mainmenu.h index f89d5d889..aef36ce39 100644 --- a/src/script/cpp_api/s_mainmenu.h +++ b/src/script/cpp_api/s_mainmenu.h @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/s_base.h" #include "util/string.h" -#include "../guiMainMenu.h" +#include "gui/guiMainMenu.h" class ScriptApiMainMenu : virtual public ScriptApiBase { public: diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp index a3605be79..4e08c15d4 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "l_internal.h" #include "lua_api/l_item.h" #include "lua_api/l_nodemeta.h" -#include "mainmenumanager.h" +#include "gui/mainmenumanager.h" #include "map.h" #include "util/string.h" #include "nodedef.h" diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index ca8b6bf13..f45a8da80 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "daynightratio.h" #include "util/pointedthing.h" #include "content_sao.h" -#include "treegen.h" +#include "mapgen/treegen.h" #include "emerge.h" #include "pathfinder.h" #include "face_position_cache.h" diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 9cc4533a8..cdb27fb60 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -21,17 +21,17 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "lua_api/l_internal.h" #include "common/c_content.h" #include "cpp_api/s_async.h" -#include "guiEngine.h" -#include "guiMainMenu.h" -#include "guiKeyChangeMenu.h" -#include "guiPathSelectMenu.h" +#include "gui/guiEngine.h" +#include "gui/guiMainMenu.h" +#include "gui/guiKeyChangeMenu.h" +#include "gui/guiPathSelectMenu.h" #include "subgame.h" #include "version.h" #include "porting.h" #include "filesys.h" #include "convert_json.h" #include "serverlist.h" -#include "mapgen.h" +#include "mapgen/mapgen.h" #include "settings.h" #include diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index 9ec4d5002..01f9d1c41 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -27,12 +27,12 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "server.h" #include "environment.h" #include "emerge.h" -#include "mg_biome.h" -#include "mg_ore.h" -#include "mg_decoration.h" -#include "mg_schematic.h" -#include "mapgen_v5.h" -#include "mapgen_v7.h" +#include "mapgen/mg_biome.h" +#include "mapgen/mg_ore.h" +#include "mapgen/mg_decoration.h" +#include "mapgen/mg_schematic.h" +#include "mapgen/mapgen_v5.h" +#include "mapgen/mapgen_v7.h" #include "filesys.h" #include "settings.h" #include "log.h" diff --git a/src/script/lua_api/l_sound.cpp b/src/script/lua_api/l_sound.cpp index 07ce36daa..e7d517ce0 100644 --- a/src/script/lua_api/l_sound.cpp +++ b/src/script/lua_api/l_sound.cpp @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "l_sound.h" #include "l_internal.h" #include "common/c_content.h" -#include "guiEngine.h" +#include "gui/guiEngine.h" int ModApiSound::l_sound_play(lua_State *L) diff --git a/src/script/lua_api/l_vmanip.cpp b/src/script/lua_api/l_vmanip.cpp index a84ecfc0f..ca837b655 100644 --- a/src/script/lua_api/l_vmanip.cpp +++ b/src/script/lua_api/l_vmanip.cpp @@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "map.h" #include "mapblock.h" #include "server.h" -#include "mapgen.h" +#include "mapgen/mapgen.h" #include "voxelalgorithms.h" // garbage collector diff --git a/src/server.cpp b/src/server.cpp index b7627f6cd..98c3eca9a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -44,8 +44,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "itemdef.h" #include "craftdef.h" #include "emerge.h" -#include "mapgen.h" -#include "mg_biome.h" +#include "mapgen/mapgen.h" +#include "mapgen/mg_biome.h" #include "content_mapnode.h" #include "content_nodemeta.h" #include "content_sao.h" @@ -61,7 +61,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/base64.h" #include "util/sha1.h" #include "util/hex.h" -#include "database.h" +#include "database/database.h" #include "chatmessage.h" #include "chat_interface.h" #include "remoteplayer.h" diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp index aed1dc22f..f68f2a27d 100644 --- a/src/serverenvironment.cpp +++ b/src/serverenvironment.cpp @@ -37,11 +37,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "threading/mutex_auto_lock.h" #include "filesys.h" #include "gameparams.h" -#include "database-dummy.h" -#include "database-files.h" -#include "database-sqlite3.h" +#include "database/database-dummy.h" +#include "database/database-files.h" +#include "database/database-sqlite3.h" #if USE_POSTGRESQL -#include "database-postgresql.h" +#include "database/database-postgresql.h" #endif #include diff --git a/src/subgame.cpp b/src/subgame.cpp index eb2ea01c1..f5ff870fb 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "log.h" #include "util/strfnd.h" #include "defaultsettings.h" // for override_default_settings -#include "mapgen.h" // for MapgenParams +#include "mapgen/mapgen.h" // for MapgenParams #include "util/string.h" #ifndef SERVER diff --git a/src/unittest/test_map_settings_manager.cpp b/src/unittest/test_map_settings_manager.cpp index 4f5ac80f2..0a5c971b9 100644 --- a/src/unittest/test_map_settings_manager.cpp +++ b/src/unittest/test_map_settings_manager.cpp @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "noise.h" #include "settings.h" -#include "mapgen_v5.h" +#include "mapgen/mapgen_v5.h" #include "util/sha1.h" #include "map_settings_manager.h" diff --git a/src/unittest/test_schematic.cpp b/src/unittest/test_schematic.cpp index 3fea44829..2e2417a3b 100644 --- a/src/unittest/test_schematic.cpp +++ b/src/unittest/test_schematic.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "test.h" -#include "mg_schematic.h" +#include "mapgen/mg_schematic.h" #include "gamedef.h" #include "nodedef.h" diff --git a/src/util/container.h b/src/util/container.h index 81f085017..2ad2bbfc7 100644 --- a/src/util/container.h +++ b/src/util/container.h @@ -19,10 +19,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../exceptions.h" -#include "../threading/mutex_auto_lock.h" -#include "../threading/semaphore.h" +#include "irrlichttypes.h" +#include "exceptions.h" +#include "threading/mutex_auto_lock.h" +#include "threading/semaphore.h" #include #include #include diff --git a/src/util/directiontables.h b/src/util/directiontables.h index 97e18343a..ef00e3bfe 100644 --- a/src/util/directiontables.h +++ b/src/util/directiontables.h @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../irr_v3d.h" +#include "irrlichttypes.h" +#include "irr_v3d.h" extern const v3s16 g_6dirs[6]; diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp index a48a72a8a..ebc81185f 100644 --- a/src/util/numeric.cpp +++ b/src/util/numeric.cpp @@ -20,9 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "numeric.h" #include "log.h" -#include "../constants.h" // BS, MAP_BLOCKSIZE -#include "../noise.h" // PseudoRandom, PcgRandom -#include "../threading/mutex_auto_lock.h" +#include "constants.h" // BS, MAP_BLOCKSIZE +#include "noise.h" // PseudoRandom, PcgRandom +#include "threading/mutex_auto_lock.h" #include diff --git a/src/util/numeric.h b/src/util/numeric.h index f09c4e9f5..347e7a49e 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -20,10 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once #include "basic_macros.h" -#include "../irrlichttypes.h" -#include "../irr_v2d.h" -#include "../irr_v3d.h" -#include "../irr_aabb3d.h" +#include "irrlichttypes.h" +#include "irr_v2d.h" +#include "irr_v3d.h" +#include "irr_aabb3d.h" #define rangelim(d, min, max) ((d) < (min) ? (min) : ((d) > (max) ? (max) : (d))) #define myfloor(x) ((x) < 0.0 ? (int)(x) - 1 : (int)(x)) diff --git a/src/util/pointedthing.cpp b/src/util/pointedthing.cpp index e5c5dcf4c..c5961d56e 100644 --- a/src/util/pointedthing.cpp +++ b/src/util/pointedthing.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "pointedthing.h" #include "serialize.h" -#include "../exceptions.h" +#include "exceptions.h" #include PointedThing::PointedThing(const v3s16 &under, const v3s16 &above, diff --git a/src/util/pointedthing.h b/src/util/pointedthing.h index bd95ef1f3..4c4c04234 100644 --- a/src/util/pointedthing.h +++ b/src/util/pointedthing.h @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../irr_v3d.h" +#include "irrlichttypes.h" +#include "irr_v3d.h" #include #include diff --git a/src/util/pointer.h b/src/util/pointer.h index 59b6f5216..d29ec8739 100644 --- a/src/util/pointer.h +++ b/src/util/pointer.h @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../debug.h" // For assert() +#include "irrlichttypes.h" +#include "debug.h" // For assert() #include template diff --git a/src/util/serialize.cpp b/src/util/serialize.cpp index a272d82ee..53c7c2add 100644 --- a/src/util/serialize.cpp +++ b/src/util/serialize.cpp @@ -21,8 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "pointer.h" #include "porting.h" #include "util/string.h" -#include "../exceptions.h" -#include "../irrlichttypes.h" +#include "exceptions.h" +#include "irrlichttypes.h" #include #include diff --git a/src/util/serialize.h b/src/util/serialize.h index f2b0dab2f..89bc0b097 100644 --- a/src/util/serialize.h +++ b/src/util/serialize.h @@ -19,9 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes_bloated.h" -#include "../exceptions.h" // for SerializationError -#include "../debug.h" // for assert +#include "irrlichttypes_bloated.h" +#include "exceptions.h" // for SerializationError +#include "debug.h" // for assert #include "config.h" #if HAVE_ENDIAN_H diff --git a/src/util/string.cpp b/src/util/string.cpp index bb2d2f6a7..3eabcbe11 100644 --- a/src/util/string.cpp +++ b/src/util/string.cpp @@ -23,8 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "log.h" #include "hex.h" -#include "../porting.h" -#include "../translation.h" +#include "porting.h" +#include "translation.h" #include #include diff --git a/src/util/thread.h b/src/util/thread.h index 5338dad03..73e9beb80 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -19,9 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../threading/thread.h" -#include "../threading/mutex_auto_lock.h" +#include "irrlichttypes.h" +#include "threading/thread.h" +#include "threading/mutex_auto_lock.h" #include "porting.h" #include "log.h" #include "container.h" diff --git a/src/util/timetaker.cpp b/src/util/timetaker.cpp index 6079e5cca..717449c6d 100644 --- a/src/util/timetaker.cpp +++ b/src/util/timetaker.cpp @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "timetaker.h" -#include "../porting.h" -#include "../log.h" +#include "porting.h" +#include "log.h" #include TimeTaker::TimeTaker(const std::string &name, u64 *result, TimePrecision prec) diff --git a/src/util/timetaker.h b/src/util/timetaker.h index 2988e8133..bc3d4a88d 100644 --- a/src/util/timetaker.h +++ b/src/util/timetaker.h @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "../irrlichttypes.h" -#include "../gettime.h" +#include "irrlichttypes.h" +#include "gettime.h" /* TimeTaker diff --git a/util/travis/clang-format-whitelist.txt b/util/travis/clang-format-whitelist.txt index f86d7ecb3..3ff4142b6 100644 --- a/util/travis/clang-format-whitelist.txt +++ b/util/travis/clang-format-whitelist.txt @@ -2,8 +2,8 @@ src/activeobject.h src/ban.cpp src/camera.cpp src/camera.h -src/cavegen.cpp -src/cavegen.h +src/mapgen/cavegen.cpp +src/mapgen/cavegen.h src/chat.cpp src/chat.h src/chat_interface.h @@ -51,21 +51,21 @@ src/convert_json.cpp src/convert_json.h src/craftdef.cpp src/craftdef.h -src/database.cpp -src/database-dummy.cpp -src/database-files.cpp -src/database-leveldb.cpp -src/database-postgresql.cpp -src/database-postgresql.h -src/database-redis.cpp -src/database-sqlite3.cpp -src/database-sqlite3.h +src/database/database.cpp +src/database/database-dummy.cpp +src/database/database-files.cpp +src/database/database-leveldb.cpp +src/database/database-postgresql.cpp +src/database/database-postgresql.h +src/database/database-redis.cpp +src/database/database-sqlite3.cpp +src/database/database-sqlite3.h src/daynightratio.h src/debug.cpp src/debug.h src/defaultsettings.cpp -src/dungeongen.cpp -src/dungeongen.h +src/mapgen/dungeongen.cpp +src/mapgen/dungeongen.h src/emerge.cpp src/emerge.h src/environment.cpp @@ -86,32 +86,32 @@ src/genericobject.cpp src/genericobject.h src/gettext.cpp src/gettext.h -src/guiChatConsole.cpp -src/guiChatConsole.h -src/guiEditBoxWithScrollbar.cpp -src/guiEditBoxWithScrollbar.h -src/guiEngine.cpp -src/guiEngine.h -src/guiPathSelectMenu.cpp -src/guiPathSelectMenu.h -src/guiFormSpecMenu.cpp -src/guiFormSpecMenu.h -src/guiKeyChangeMenu.cpp -src/guiMainMenu.h -src/guiPasswordChange.cpp +src/gui/guiChatConsole.cpp +src/gui/guiChatConsole.h +src/gui/guiEditBoxWithScrollbar.cpp +src/gui/guiEditBoxWithScrollbar.h +src/gui/guiEngine.cpp +src/gui/guiEngine.h +src/gui/guiPathSelectMenu.cpp +src/gui/guiPathSelectMenu.h +src/gui/guiFormSpecMenu.cpp +src/gui/guiFormSpecMenu.h +src/gui/guiKeyChangeMenu.cpp +src/gui/guiMainMenu.h +src/gui/guiPasswordChange.cpp src/guiscalingfilter.cpp src/guiscalingfilter.h -src/guiTable.cpp -src/guiTable.h -src/guiVolumeChange.cpp -src/guiVolumeChange.h +src/gui/guiTable.cpp +src/gui/guiTable.h +src/gui/guiVolumeChange.cpp +src/gui/guiVolumeChange.h src/httpfetch.cpp src/hud.cpp src/hud.h src/imagefilters.cpp src/imagefilters.h -src/intlGUIEditBox.cpp -src/intlGUIEditBox.h +src/gui/intlGUIEditBox.cpp +src/gui/intlGUIEditBox.h src/inventory.cpp src/inventory.h src/inventorymanager.cpp @@ -131,31 +131,31 @@ src/localplayer.cpp src/log.cpp src/log.h src/main.cpp -src/mainmenumanager.h +src/gui/mainmenumanager.h src/mapblock.cpp src/mapblock.h src/mapblock_mesh.cpp src/mapblock_mesh.h src/map.cpp src/map.h -src/mapgen.cpp -src/mapgen.h -src/mapgen_carpathian.cpp -src/mapgen_carpathian.h -src/mapgen_flat.cpp -src/mapgen_flat.h -src/mapgen_fractal.cpp -src/mapgen_fractal.h -src/mapgen_singlenode.cpp -src/mapgen_singlenode.h -src/mapgen_v5.cpp -src/mapgen_v5.h -src/mapgen_v6.cpp -src/mapgen_v6.h -src/mapgen_v7.cpp -src/mapgen_v7.h -src/mapgen_valleys.cpp -src/mapgen_valleys.h +src/mapgen/mapgen.cpp +src/mapgen/mapgen.h +src/mapgen/mapgen_carpathian.cpp +src/mapgen/mapgen_carpathian.h +src/mapgen/mapgen_flat.cpp +src/mapgen/mapgen_flat.h +src/mapgen/mapgen_fractal.cpp +src/mapgen/mapgen_fractal.h +src/mapgen/mapgen_singlenode.cpp +src/mapgen/mapgen_singlenode.h +src/mapgen/mapgen_v5.cpp +src/mapgen/mapgen_v5.h +src/mapgen/mapgen_v6.cpp +src/mapgen/mapgen_v6.h +src/mapgen/mapgen_v7.cpp +src/mapgen/mapgen_v7.h +src/mapgen/mapgen_valleys.cpp +src/mapgen/mapgen_valleys.h src/mapnode.cpp src/mapnode.h src/mapsector.cpp @@ -166,17 +166,17 @@ src/mesh.cpp src/mesh.h src/mesh_generator_thread.cpp src/metadata.h -src/mg_biome.cpp -src/mg_biome.h -src/mg_decoration.cpp -src/mg_decoration.h -src/mg_ore.cpp -src/mg_ore.h -src/mg_schematic.cpp -src/mg_schematic.h +src/mapgen/mg_biome.cpp +src/mapgen/mg_biome.h +src/mapgen/mg_decoration.cpp +src/mapgen/mg_decoration.h +src/mapgen/mg_ore.cpp +src/mapgen/mg_ore.h +src/mapgen/mg_schematic.cpp +src/mapgen/mg_schematic.h src/minimap.cpp src/minimap.h -src/modalMenu.h +src/gui/modalMenu.h src/mods.cpp src/mods.h src/network/clientopcodes.cpp @@ -341,10 +341,10 @@ src/threads.h src/tileanimation.cpp src/tool.cpp src/tool.h -src/touchscreengui.cpp +src/gui/touchscreengui.cpp src/translation.cpp -src/treegen.cpp -src/treegen.h +src/mapgen/treegen.cpp +src/mapgen/treegen.h src/unittest/test.cpp src/unittest/test.h src/unittest/test_areastore.cpp -- 2.25.1