From 5f1cd555cd9d1c64426e173b30b5b792d211c835 Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Wed, 28 Nov 2018 20:01:49 +0100 Subject: [PATCH] Move client-specific files to 'src/client' (#7902) Update Android.mk Remove 'src/client' from include_directories --- .gitignore | 2 + build/android/jni/Android.mk | 50 +++++++-------- src/CMakeLists.txt | 35 ++--------- src/client/CMakeLists.txt | 33 ++++++++-- src/{ => client}/camera.cpp | 0 src/{ => client}/camera.h | 0 src/{ => client}/client.cpp | 0 src/{ => client}/client.h | 0 src/{ => client}/clientenvironment.cpp | 0 src/{ => client}/clientenvironment.h | 0 src/{ => client}/clientmap.cpp | 0 src/{ => client}/clientmap.h | 0 src/{ => client}/clientmedia.cpp | 0 src/{ => client}/clientmedia.h | 0 src/{ => client}/clientobject.cpp | 0 src/{ => client}/clientobject.h | 0 src/{ => client}/clouds.cpp | 0 src/{ => client}/clouds.h | 0 src/{ => client}/content_cao.cpp | 0 src/{ => client}/content_cao.h | 0 src/{ => client}/content_cso.cpp | 0 src/{ => client}/content_cso.h | 0 src/{ => client}/content_mapblock.cpp | 0 src/{ => client}/content_mapblock.h | 0 src/{ => client}/filecache.cpp | 0 src/{ => client}/filecache.h | 0 src/{ => client}/fontengine.cpp | 0 src/{ => client}/fontengine.h | 0 src/{ => client}/game.cpp | 0 src/{ => client}/game.h | 0 src/{ => client}/guiscalingfilter.cpp | 0 src/{ => client}/guiscalingfilter.h | 0 src/{ => client}/imagefilters.cpp | 0 src/{ => client}/imagefilters.h | 0 src/{ => client}/keycode.cpp | 0 src/{ => client}/keycode.h | 0 src/{ => client}/localplayer.cpp | 0 src/{ => client}/localplayer.h | 0 src/{ => client}/mapblock_mesh.cpp | 0 src/{ => client}/mapblock_mesh.h | 0 src/{ => client}/mesh.cpp | 0 src/{ => client}/mesh.h | 0 src/{ => client}/mesh_generator_thread.cpp | 0 src/{ => client}/mesh_generator_thread.h | 0 src/client/meshgen/collector.cpp | 2 +- src/{ => client}/minimap.cpp | 0 src/{ => client}/minimap.h | 0 src/{ => client}/particles.cpp | 0 src/{ => client}/particles.h | 0 src/client/render/core.cpp | 10 +-- src/client/render/interlaced.cpp | 4 +- src/client/render/stereo.cpp | 2 +- src/{ => client}/shader.cpp | 0 src/{ => client}/shader.h | 0 src/{ => client}/sky.cpp | 0 src/{ => client}/sky.h | 0 src/{ => client}/wieldmesh.cpp | 0 src/{ => client}/wieldmesh.h | 0 src/collision.cpp | 2 +- src/gui/guiChatConsole.cpp | 6 +- src/gui/guiConfirmRegistration.cpp | 2 +- src/gui/guiEngine.cpp | 6 +- src/gui/guiFormSpecMenu.cpp | 12 ++-- src/gui/guiKeyChangeMenu.h | 2 +- src/gui/guiPasswordChange.cpp | 2 +- src/gui/guiTable.cpp | 2 +- src/itemdef.cpp | 8 +-- src/main.cpp | 2 +- src/mapblock.cpp | 2 +- src/network/clientopcodes.h | 2 +- src/network/clientpackethandler.cpp | 6 +- src/nodedef.cpp | 6 +- src/script/cpp_api/s_base.cpp | 2 +- src/script/cpp_api/s_client.cpp | 2 +- src/script/cpp_api/s_security.cpp | 2 +- src/script/lua_api/l_camera.cpp | 6 +- src/script/lua_api/l_client.cpp | 4 +- src/script/lua_api/l_env.cpp | 2 +- src/script/lua_api/l_localplayer.cpp | 2 +- src/script/lua_api/l_minimap.cpp | 4 +- src/script/lua_api/l_particles.cpp | 2 +- src/script/lua_api/l_particles_local.cpp | 4 +- src/script/scripting_client.cpp | 2 +- src/unittest/test_keycode.cpp | 2 +- util/travis/clang-format-whitelist.txt | 71 ++++++++++++++++++++++ 85 files changed, 187 insertions(+), 116 deletions(-) rename src/{ => client}/camera.cpp (100%) rename src/{ => client}/camera.h (100%) rename src/{ => client}/client.cpp (100%) rename src/{ => client}/client.h (100%) rename src/{ => client}/clientenvironment.cpp (100%) rename src/{ => client}/clientenvironment.h (100%) rename src/{ => client}/clientmap.cpp (100%) rename src/{ => client}/clientmap.h (100%) rename src/{ => client}/clientmedia.cpp (100%) rename src/{ => client}/clientmedia.h (100%) rename src/{ => client}/clientobject.cpp (100%) rename src/{ => client}/clientobject.h (100%) rename src/{ => client}/clouds.cpp (100%) rename src/{ => client}/clouds.h (100%) rename src/{ => client}/content_cao.cpp (100%) rename src/{ => client}/content_cao.h (100%) rename src/{ => client}/content_cso.cpp (100%) rename src/{ => client}/content_cso.h (100%) rename src/{ => client}/content_mapblock.cpp (100%) rename src/{ => client}/content_mapblock.h (100%) rename src/{ => client}/filecache.cpp (100%) rename src/{ => client}/filecache.h (100%) rename src/{ => client}/fontengine.cpp (100%) rename src/{ => client}/fontengine.h (100%) rename src/{ => client}/game.cpp (100%) rename src/{ => client}/game.h (100%) rename src/{ => client}/guiscalingfilter.cpp (100%) rename src/{ => client}/guiscalingfilter.h (100%) rename src/{ => client}/imagefilters.cpp (100%) rename src/{ => client}/imagefilters.h (100%) rename src/{ => client}/keycode.cpp (100%) rename src/{ => client}/keycode.h (100%) rename src/{ => client}/localplayer.cpp (100%) rename src/{ => client}/localplayer.h (100%) rename src/{ => client}/mapblock_mesh.cpp (100%) rename src/{ => client}/mapblock_mesh.h (100%) rename src/{ => client}/mesh.cpp (100%) rename src/{ => client}/mesh.h (100%) rename src/{ => client}/mesh_generator_thread.cpp (100%) rename src/{ => client}/mesh_generator_thread.h (100%) rename src/{ => client}/minimap.cpp (100%) rename src/{ => client}/minimap.h (100%) rename src/{ => client}/particles.cpp (100%) rename src/{ => client}/particles.h (100%) rename src/{ => client}/shader.cpp (100%) rename src/{ => client}/shader.h (100%) rename src/{ => client}/sky.cpp (100%) rename src/{ => client}/sky.h (100%) rename src/{ => client}/wieldmesh.cpp (100%) rename src/{ => client}/wieldmesh.h (100%) diff --git a/.gitignore b/.gitignore index dd06dfb30..d5cb9b6ea 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ debug.txt ## Other files generated by minetest screenshot_*.png +testbm.txt ## Doxygen files doc/Doxyfile @@ -95,6 +96,7 @@ cmake-build-release/ cmake_config.h cmake_config_githash.h CMakeDoxy* +compile_commands.json ## Android build files build/android/src/main/assets diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index e5cf7349c..364278f68 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -113,20 +113,20 @@ LOCAL_C_INCLUDES := \ LOCAL_SRC_FILES := \ jni/src/ban.cpp \ - jni/src/camera.cpp \ + jni/src/client/camera.cpp \ jni/src/mapgen/cavegen.cpp \ jni/src/chat.cpp \ - jni/src/client.cpp \ - jni/src/clientenvironment.cpp \ + jni/src/client/client.cpp \ + jni/src/client/clientenvironment.cpp \ jni/src/clientiface.cpp \ - jni/src/clientmap.cpp \ - jni/src/clientmedia.cpp \ - jni/src/clientobject.cpp \ - jni/src/clouds.cpp \ + jni/src/client/clientmap.cpp \ + jni/src/client/clientmedia.cpp \ + jni/src/client/clientobject.cpp \ + jni/src/client/clouds.cpp \ jni/src/collision.cpp \ - jni/src/content_cao.cpp \ - jni/src/content_cso.cpp \ - jni/src/content_mapblock.cpp \ + jni/src/client/content_cao.cpp \ + jni/src/client/content_cso.cpp \ + jni/src/client/content_mapblock.cpp \ jni/src/content_mapnode.cpp \ jni/src/content_nodemeta.cpp \ jni/src/content_sao.cpp \ @@ -147,10 +147,10 @@ LOCAL_SRC_FILES := \ jni/src/emerge.cpp \ jni/src/environment.cpp \ jni/src/face_position_cache.cpp \ - jni/src/filecache.cpp \ + jni/src/client/filecache.cpp \ jni/src/filesys.cpp \ - jni/src/fontengine.cpp \ - jni/src/game.cpp \ + jni/src/client/fontengine.cpp \ + jni/src/client/game.cpp \ jni/src/genericobject.cpp \ jni/src/gettext.cpp \ jni/src/gui/guiChatConsole.cpp \ @@ -162,7 +162,7 @@ LOCAL_SRC_FILES := \ jni/src/gui/guiKeyChangeMenu.cpp \ jni/src/gui/guiPasswordChange.cpp \ jni/src/gui/guiTable.cpp \ - jni/src/guiscalingfilter.cpp \ + jni/src/client/guiscalingfilter.cpp \ jni/src/gui/guiVolumeChange.cpp \ jni/src/gui/intlGUIEditBox.cpp \ jni/src/gui/modalMenu.cpp \ @@ -170,20 +170,20 @@ LOCAL_SRC_FILES := \ jni/src/gui/touchscreengui.cpp \ jni/src/httpfetch.cpp \ jni/src/hud.cpp \ - jni/src/imagefilters.cpp \ + jni/src/client/imagefilters.cpp \ jni/src/inventory.cpp \ jni/src/inventorymanager.cpp \ jni/src/itemdef.cpp \ jni/src/itemstackmetadata.cpp \ - jni/src/keycode.cpp \ + jni/src/client/keycode.cpp \ jni/src/light.cpp \ - jni/src/localplayer.cpp \ + jni/src/client/localplayer.cpp \ jni/src/log.cpp \ jni/src/main.cpp \ jni/src/map.cpp \ jni/src/map_settings_manager.cpp \ jni/src/mapblock.cpp \ - jni/src/mapblock_mesh.cpp \ + jni/src/client/mapblock_mesh.cpp \ jni/src/mapgen/mapgen.cpp \ jni/src/mapgen/mapgen_carpathian.cpp \ jni/src/mapgen/mapgen_flat.cpp \ @@ -195,14 +195,14 @@ LOCAL_SRC_FILES := \ 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/client/mesh.cpp \ + jni/src/client/mesh_generator_thread.cpp \ jni/src/metadata.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/client/minimap.cpp \ jni/src/modchannels.cpp \ jni/src/nameidmapping.cpp \ jni/src/nodedef.cpp \ @@ -211,7 +211,7 @@ LOCAL_SRC_FILES := \ jni/src/noise.cpp \ jni/src/objdef.cpp \ jni/src/object_properties.cpp \ - jni/src/particles.cpp \ + jni/src/client/particles.cpp \ jni/src/pathfinder.cpp \ jni/src/player.cpp \ jni/src/porting_android.cpp \ @@ -229,8 +229,8 @@ LOCAL_SRC_FILES := \ jni/src/serverenvironment.cpp \ jni/src/serverlist.cpp \ jni/src/serverobject.cpp \ - jni/src/shader.cpp \ - jni/src/sky.cpp \ + jni/src/client/shader.cpp \ + jni/src/client/sky.cpp \ jni/src/staticobject.cpp \ jni/src/tileanimation.cpp \ jni/src/translation.cpp \ @@ -275,7 +275,7 @@ LOCAL_SRC_FILES := \ jni/src/unittest/test_voxelalgorithms.cpp \ jni/src/unittest/test_voxelmanipulator.cpp \ jni/src/settings.cpp \ - jni/src/wieldmesh.cpp \ + jni/src/client/wieldmesh.cpp \ jni/src/client/meshgen/collector.cpp \ jni/src/client/clientlauncher.cpp \ jni/src/client/gameui.cpp \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c0832d0c2..8218d586c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -397,12 +397,14 @@ set(common_SRCS genericobject.cpp gettext.cpp httpfetch.cpp + hud.cpp inventory.cpp inventorymanager.cpp itemdef.cpp itemstackmetadata.cpp light.cpp log.cpp + main.cpp map.cpp map_settings_manager.cpp mapblock.cpp @@ -482,34 +484,6 @@ set(client_SRCS ${gui_SRCS} ${client_network_SRCS} ${client_irrlicht_changes_SRCS} - camera.cpp - client.cpp - clientenvironment.cpp - clientmap.cpp - clientmedia.cpp - clientobject.cpp - clouds.cpp - content_cao.cpp - content_cso.cpp - content_mapblock.cpp - convert_json.cpp - filecache.cpp - fontengine.cpp - game.cpp - guiscalingfilter.cpp - hud.cpp - imagefilters.cpp - keycode.cpp - localplayer.cpp - main.cpp - mapblock_mesh.cpp - mesh.cpp - mesh_generator_thread.cpp - minimap.cpp - particles.cpp - shader.cpp - sky.cpp - wieldmesh.cpp ${client_SCRIPT_SRCS} ${UNITTEST_CLIENT_SRCS} ) @@ -518,7 +492,6 @@ list(SORT client_SRCS) # Server sources set(server_SRCS ${common_SRCS} - main.cpp ) list(SORT server_SRCS) @@ -829,10 +802,10 @@ if(BUILD_CLIENT) endif() if(USE_FREETYPE) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" FILES_MATCHING PATTERN "*.ttf" PATTERN "*.txt") else() - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" FILES_MATCHING PATTERN "*.png" PATTERN "*.xml") endif() diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 1cabe1b11..e24b73e80 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -25,12 +25,37 @@ set(client_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/render/plain.cpp ${CMAKE_CURRENT_SOURCE_DIR}/render/sidebyside.cpp ${CMAKE_CURRENT_SOURCE_DIR}/render/stereo.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/renderingengine.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/camera.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/client.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clientenvironment.cpp ${CMAKE_CURRENT_SOURCE_DIR}/clientlauncher.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clientmap.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clientmedia.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clientobject.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clouds.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/content_cao.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/content_cso.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/content_mapblock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/filecache.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fontengine.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/game.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gameui.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/inputhandler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/joystick_controller.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/guiscalingfilter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hud.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imagefilters.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/inputhandler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/joystick_controller.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/keycode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/localplayer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mapblock_mesh.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mesh_generator_thread.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/minimap.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/particles.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/renderingengine.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/shader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sky.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wieldmesh.cpp PARENT_SCOPE ) diff --git a/src/camera.cpp b/src/client/camera.cpp similarity index 100% rename from src/camera.cpp rename to src/client/camera.cpp diff --git a/src/camera.h b/src/client/camera.h similarity index 100% rename from src/camera.h rename to src/client/camera.h diff --git a/src/client.cpp b/src/client/client.cpp similarity index 100% rename from src/client.cpp rename to src/client/client.cpp diff --git a/src/client.h b/src/client/client.h similarity index 100% rename from src/client.h rename to src/client/client.h diff --git a/src/clientenvironment.cpp b/src/client/clientenvironment.cpp similarity index 100% rename from src/clientenvironment.cpp rename to src/client/clientenvironment.cpp diff --git a/src/clientenvironment.h b/src/client/clientenvironment.h similarity index 100% rename from src/clientenvironment.h rename to src/client/clientenvironment.h diff --git a/src/clientmap.cpp b/src/client/clientmap.cpp similarity index 100% rename from src/clientmap.cpp rename to src/client/clientmap.cpp diff --git a/src/clientmap.h b/src/client/clientmap.h similarity index 100% rename from src/clientmap.h rename to src/client/clientmap.h diff --git a/src/clientmedia.cpp b/src/client/clientmedia.cpp similarity index 100% rename from src/clientmedia.cpp rename to src/client/clientmedia.cpp diff --git a/src/clientmedia.h b/src/client/clientmedia.h similarity index 100% rename from src/clientmedia.h rename to src/client/clientmedia.h diff --git a/src/clientobject.cpp b/src/client/clientobject.cpp similarity index 100% rename from src/clientobject.cpp rename to src/client/clientobject.cpp diff --git a/src/clientobject.h b/src/client/clientobject.h similarity index 100% rename from src/clientobject.h rename to src/client/clientobject.h diff --git a/src/clouds.cpp b/src/client/clouds.cpp similarity index 100% rename from src/clouds.cpp rename to src/client/clouds.cpp diff --git a/src/clouds.h b/src/client/clouds.h similarity index 100% rename from src/clouds.h rename to src/client/clouds.h diff --git a/src/content_cao.cpp b/src/client/content_cao.cpp similarity index 100% rename from src/content_cao.cpp rename to src/client/content_cao.cpp diff --git a/src/content_cao.h b/src/client/content_cao.h similarity index 100% rename from src/content_cao.h rename to src/client/content_cao.h diff --git a/src/content_cso.cpp b/src/client/content_cso.cpp similarity index 100% rename from src/content_cso.cpp rename to src/client/content_cso.cpp diff --git a/src/content_cso.h b/src/client/content_cso.h similarity index 100% rename from src/content_cso.h rename to src/client/content_cso.h diff --git a/src/content_mapblock.cpp b/src/client/content_mapblock.cpp similarity index 100% rename from src/content_mapblock.cpp rename to src/client/content_mapblock.cpp diff --git a/src/content_mapblock.h b/src/client/content_mapblock.h similarity index 100% rename from src/content_mapblock.h rename to src/client/content_mapblock.h diff --git a/src/filecache.cpp b/src/client/filecache.cpp similarity index 100% rename from src/filecache.cpp rename to src/client/filecache.cpp diff --git a/src/filecache.h b/src/client/filecache.h similarity index 100% rename from src/filecache.h rename to src/client/filecache.h diff --git a/src/fontengine.cpp b/src/client/fontengine.cpp similarity index 100% rename from src/fontengine.cpp rename to src/client/fontengine.cpp diff --git a/src/fontengine.h b/src/client/fontengine.h similarity index 100% rename from src/fontengine.h rename to src/client/fontengine.h diff --git a/src/game.cpp b/src/client/game.cpp similarity index 100% rename from src/game.cpp rename to src/client/game.cpp diff --git a/src/game.h b/src/client/game.h similarity index 100% rename from src/game.h rename to src/client/game.h diff --git a/src/guiscalingfilter.cpp b/src/client/guiscalingfilter.cpp similarity index 100% rename from src/guiscalingfilter.cpp rename to src/client/guiscalingfilter.cpp diff --git a/src/guiscalingfilter.h b/src/client/guiscalingfilter.h similarity index 100% rename from src/guiscalingfilter.h rename to src/client/guiscalingfilter.h diff --git a/src/imagefilters.cpp b/src/client/imagefilters.cpp similarity index 100% rename from src/imagefilters.cpp rename to src/client/imagefilters.cpp diff --git a/src/imagefilters.h b/src/client/imagefilters.h similarity index 100% rename from src/imagefilters.h rename to src/client/imagefilters.h diff --git a/src/keycode.cpp b/src/client/keycode.cpp similarity index 100% rename from src/keycode.cpp rename to src/client/keycode.cpp diff --git a/src/keycode.h b/src/client/keycode.h similarity index 100% rename from src/keycode.h rename to src/client/keycode.h diff --git a/src/localplayer.cpp b/src/client/localplayer.cpp similarity index 100% rename from src/localplayer.cpp rename to src/client/localplayer.cpp diff --git a/src/localplayer.h b/src/client/localplayer.h similarity index 100% rename from src/localplayer.h rename to src/client/localplayer.h diff --git a/src/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp similarity index 100% rename from src/mapblock_mesh.cpp rename to src/client/mapblock_mesh.cpp diff --git a/src/mapblock_mesh.h b/src/client/mapblock_mesh.h similarity index 100% rename from src/mapblock_mesh.h rename to src/client/mapblock_mesh.h diff --git a/src/mesh.cpp b/src/client/mesh.cpp similarity index 100% rename from src/mesh.cpp rename to src/client/mesh.cpp diff --git a/src/mesh.h b/src/client/mesh.h similarity index 100% rename from src/mesh.h rename to src/client/mesh.h diff --git a/src/mesh_generator_thread.cpp b/src/client/mesh_generator_thread.cpp similarity index 100% rename from src/mesh_generator_thread.cpp rename to src/client/mesh_generator_thread.cpp diff --git a/src/mesh_generator_thread.h b/src/client/mesh_generator_thread.h similarity index 100% rename from src/mesh_generator_thread.h rename to src/client/mesh_generator_thread.h diff --git a/src/client/meshgen/collector.cpp b/src/client/meshgen/collector.cpp index c317a0772..25457c868 100644 --- a/src/client/meshgen/collector.cpp +++ b/src/client/meshgen/collector.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "collector.h" #include #include "log.h" -#include "mesh.h" +#include "client/mesh.h" void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices) diff --git a/src/minimap.cpp b/src/client/minimap.cpp similarity index 100% rename from src/minimap.cpp rename to src/client/minimap.cpp diff --git a/src/minimap.h b/src/client/minimap.h similarity index 100% rename from src/minimap.h rename to src/client/minimap.h diff --git a/src/particles.cpp b/src/client/particles.cpp similarity index 100% rename from src/particles.cpp rename to src/client/particles.cpp diff --git a/src/particles.h b/src/client/particles.h similarity index 100% rename from src/particles.h rename to src/client/particles.h diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp index bd280bc73..8c70b36c6 100644 --- a/src/client/render/core.cpp +++ b/src/client/render/core.cpp @@ -19,11 +19,11 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "core.h" -#include "camera.h" -#include "client.h" -#include "clientmap.h" -#include "hud.h" -#include "minimap.h" +#include "client/camera.h" +#include "client/client.h" +#include "client/clientmap.h" +#include "client/hud.h" +#include "client/minimap.h" RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud) : device(_device), driver(device->getVideoDriver()), smgr(device->getSceneManager()), diff --git a/src/client/render/interlaced.cpp b/src/client/render/interlaced.cpp index 87d75de30..2aadadc17 100644 --- a/src/client/render/interlaced.cpp +++ b/src/client/render/interlaced.cpp @@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "interlaced.h" -#include "client.h" -#include "shader.h" +#include "client/client.h" +#include "client/shader.h" #include "client/tile.h" RenderingCoreInterlaced::RenderingCoreInterlaced( diff --git a/src/client/render/stereo.cpp b/src/client/render/stereo.cpp index 4a5761bb7..967b5a78f 100644 --- a/src/client/render/stereo.cpp +++ b/src/client/render/stereo.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "stereo.h" -#include "camera.h" +#include "client/camera.h" #include "constants.h" #include "settings.h" diff --git a/src/shader.cpp b/src/client/shader.cpp similarity index 100% rename from src/shader.cpp rename to src/client/shader.cpp diff --git a/src/shader.h b/src/client/shader.h similarity index 100% rename from src/shader.h rename to src/client/shader.h diff --git a/src/sky.cpp b/src/client/sky.cpp similarity index 100% rename from src/sky.cpp rename to src/client/sky.cpp diff --git a/src/sky.h b/src/client/sky.h similarity index 100% rename from src/sky.h rename to src/client/sky.h diff --git a/src/wieldmesh.cpp b/src/client/wieldmesh.cpp similarity index 100% rename from src/wieldmesh.cpp rename to src/client/wieldmesh.cpp diff --git a/src/wieldmesh.h b/src/client/wieldmesh.h similarity index 100% rename from src/wieldmesh.h rename to src/client/wieldmesh.h diff --git a/src/collision.cpp b/src/collision.cpp index 9626221a0..a07899e65 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "nodedef.h" #include "gamedef.h" #ifndef SERVER -#include "clientenvironment.h" +#include "client/clientenvironment.h" #endif #include "serverenvironment.h" #include "serverobject.h" diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp index b194834e2..1ccb4e6d1 100644 --- a/src/gui/guiChatConsole.cpp +++ b/src/gui/guiChatConsole.cpp @@ -19,14 +19,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiChatConsole.h" #include "chat.h" -#include "client.h" +#include "client/client.h" #include "debug.h" #include "gettime.h" -#include "keycode.h" +#include "client/keycode.h" #include "settings.h" #include "porting.h" #include "client/tile.h" -#include "fontengine.h" +#include "client/fontengine.h" #include "log.h" #include "gettext.h" #include diff --git a/src/gui/guiConfirmRegistration.cpp b/src/gui/guiConfirmRegistration.cpp index a13929a48..9a374b405 100644 --- a/src/gui/guiConfirmRegistration.cpp +++ b/src/gui/guiConfirmRegistration.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "guiConfirmRegistration.h" -#include "client.h" +#include "client/client.h" #include #include #include diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp index 67ab6437d..a3ef1b9a6 100644 --- a/src/gui/guiEngine.cpp +++ b/src/gui/guiEngine.cpp @@ -32,11 +32,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiMainMenu.h" #include "sound.h" #include "client/sound_openal.h" -#include "clouds.h" +#include "client/clouds.h" #include "httpfetch.h" #include "log.h" -#include "fontengine.h" -#include "guiscalingfilter.h" +#include "client/fontengine.h" +#include "client/guiscalingfilter.h" #include "irrlicht_changes/static_text.h" #ifdef __ANDROID__ diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index f23055821..c52a6ee27 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiTable.h" #include "constants.h" #include "gamedef.h" -#include "keycode.h" +#include "client/keycode.h" #include "util/strfnd.h" #include #include @@ -47,13 +47,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mainmenumanager.h" #include "porting.h" #include "settings.h" -#include "client.h" -#include "fontengine.h" +#include "client/client.h" +#include "client/fontengine.h" #include "util/hex.h" #include "util/numeric.h" #include "util/string.h" // for parseColorString() #include "irrlicht_changes/static_text.h" -#include "guiscalingfilter.h" +#include "client/guiscalingfilter.h" #include "guiEditBoxWithScrollbar.h" #include "intlGUIEditBox.h" @@ -673,10 +673,10 @@ void GUIFormSpecMenu::parseBackground(parserData* data, const std::string &eleme pos.Y = stoi(v_pos[1]); //acts as offset clip = true; } - + if (!data->explicit_size && !clip) warningstream << "invalid use of unclipped background without a size[] element" << std::endl; - + m_backgrounds.emplace_back(name, pos, geom, clip); return; diff --git a/src/gui/guiKeyChangeMenu.h b/src/gui/guiKeyChangeMenu.h index eded61e4c..0aaa05e18 100644 --- a/src/gui/guiKeyChangeMenu.h +++ b/src/gui/guiKeyChangeMenu.h @@ -24,7 +24,7 @@ #include "irrlichttypes_extrabloated.h" #include "modalMenu.h" #include "gettext.h" -#include "keycode.h" +#include "client/keycode.h" #include #include diff --git a/src/gui/guiPasswordChange.cpp b/src/gui/guiPasswordChange.cpp index e29ef27e6..469c38dbe 100644 --- a/src/gui/guiPasswordChange.cpp +++ b/src/gui/guiPasswordChange.cpp @@ -17,7 +17,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "guiPasswordChange.h" -#include "client.h" +#include "client/client.h" #include #include #include diff --git a/src/gui/guiTable.cpp b/src/gui/guiTable.cpp index b1a027e9b..a123bdd6d 100644 --- a/src/gui/guiTable.cpp +++ b/src/gui/guiTable.cpp @@ -36,7 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/string.h" // for parseColorString() #include "settings.h" // for settings #include "porting.h" // for dpi -#include "guiscalingfilter.h" +#include "client/guiscalingfilter.h" /* GUITable diff --git a/src/itemdef.cpp b/src/itemdef.cpp index f7d366c8a..11a52f85c 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -24,11 +24,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "tool.h" #include "inventory.h" #ifndef SERVER -#include "mapblock_mesh.h" -#include "mesh.h" -#include "wieldmesh.h" +#include "client/mapblock_mesh.h" +#include "client/mesh.h" +#include "client/wieldmesh.h" #include "client/tile.h" -#include "client.h" +#include "client/client.h" #endif #include "log.h" #include "settings.h" diff --git a/src/main.cpp b/src/main.cpp index 2033518e3..546eb2a00 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "server.h" #include "filesys.h" #include "version.h" -#include "game.h" +#include "client/game.h" #include "defaultsettings.h" #include "gettext.h" #include "log.h" diff --git a/src/mapblock.cpp b/src/mapblock.cpp index cf815d16b..dfb4c783e 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "content_nodemeta.h" // For legacy deserialization #include "serialization.h" #ifndef SERVER -#include "mapblock_mesh.h" +#include "client/mapblock_mesh.h" #endif #include "porting.h" #include "util/string.h" diff --git a/src/network/clientopcodes.h b/src/network/clientopcodes.h index 57846f095..d03dc457d 100644 --- a/src/network/clientopcodes.h +++ b/src/network/clientopcodes.h @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include "client.h" +#include "client/client.h" #include "networkprotocol.h" class NetworkPacket; diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 1899b496e..1be7d4eeb 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -17,15 +17,15 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "client.h" +#include "client/client.h" #include "util/base64.h" #include "chatmessage.h" -#include "clientmedia.h" +#include "client/clientmedia.h" #include "log.h" #include "map.h" #include "mapsector.h" -#include "minimap.h" +#include "client/minimap.h" #include "modchannels.h" #include "nodedef.h" #include "serialization.h" diff --git a/src/nodedef.cpp b/src/nodedef.cpp index c3f2ccd60..70974a572 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -21,9 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "itemdef.h" #ifndef SERVER -#include "mesh.h" -#include "shader.h" -#include "client.h" +#include "client/mesh.h" +#include "client/shader.h" +#include "client/client.h" #include "client/renderingengine.h" #include "client/tile.h" #include diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index d98359d20..bf89f748c 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/string.h" #include "server.h" #ifndef SERVER -#include "client.h" +#include "client/client.h" #endif diff --git a/src/script/cpp_api/s_client.cpp b/src/script/cpp_api/s_client.cpp index 597883c2f..f2cc9730b 100644 --- a/src/script/cpp_api/s_client.cpp +++ b/src/script/cpp_api/s_client.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "s_client.h" #include "s_internal.h" -#include "client.h" +#include "client/client.h" #include "common/c_converter.h" #include "common/c_content.h" #include "s_item.h" diff --git a/src/script/cpp_api/s_security.cpp b/src/script/cpp_api/s_security.cpp index e87f16ddd..e9067a54c 100644 --- a/src/script/cpp_api/s_security.cpp +++ b/src/script/cpp_api/s_security.cpp @@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "filesys.h" #include "porting.h" #include "server.h" -#include "client.h" +#include "client/client.h" #include "settings.h" #include diff --git a/src/script/lua_api/l_camera.cpp b/src/script/lua_api/l_camera.cpp index 326cc6d53..462006777 100644 --- a/src/script/lua_api/l_camera.cpp +++ b/src/script/lua_api/l_camera.cpp @@ -21,9 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "script/common/c_converter.h" #include "l_internal.h" -#include "content_cao.h" -#include "camera.h" -#include "client.h" +#include "client/content_cao.h" +#include "client/camera.h" +#include "client/client.h" LuaCamera::LuaCamera(Camera *m) : m_camera(m) { diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp index 72826775b..8a5867a32 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -20,10 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "l_client.h" #include "chatmessage.h" -#include "client.h" +#include "client/client.h" #include "client/clientevent.h" #include "client/sound.h" -#include "clientenvironment.h" +#include "client/clientenvironment.h" #include "common/c_content.h" #include "common/c_converter.h" #include "cpp_api/s_base.h" diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index 1e5149f7a..ba2be0cb5 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -40,7 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "face_position_cache.h" #include "remoteplayer.h" #ifndef SERVER -#include "client.h" +#include "client/client.h" #endif struct EnumString ModApiEnvMod::es_ClearObjectsMode[] = diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp index 492422d92..7444d0e88 100644 --- a/src/script/lua_api/l_localplayer.cpp +++ b/src/script/lua_api/l_localplayer.cpp @@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "l_localplayer.h" #include "l_internal.h" #include "script/common/c_converter.h" -#include "localplayer.h" +#include "client/localplayer.h" #include "hud.h" #include "common/c_content.h" diff --git a/src/script/lua_api/l_minimap.cpp b/src/script/lua_api/l_minimap.cpp index b59e79095..5fba76eb8 100644 --- a/src/script/lua_api/l_minimap.cpp +++ b/src/script/lua_api/l_minimap.cpp @@ -21,8 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "lua_api/l_minimap.h" #include "lua_api/l_internal.h" #include "common/c_converter.h" -#include "client.h" -#include "minimap.h" +#include "client/client.h" +#include "client/minimap.h" #include "settings.h" LuaMinimap::LuaMinimap(Minimap *m) : m_minimap(m) diff --git a/src/script/lua_api/l_particles.cpp b/src/script/lua_api/l_particles.cpp index 7783e5910..340903ebf 100644 --- a/src/script/lua_api/l_particles.cpp +++ b/src/script/lua_api/l_particles.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_converter.h" #include "common/c_content.h" #include "server.h" -#include "particles.h" +#include "client/particles.h" // add_particle({pos=, velocity=, acceleration=, expirationtime=, // size=, collisiondetection=, collision_removal=, object_collision=, diff --git a/src/script/lua_api/l_particles_local.cpp b/src/script/lua_api/l_particles_local.cpp index d5c412556..3c7a821ca 100644 --- a/src/script/lua_api/l_particles_local.cpp +++ b/src/script/lua_api/l_particles_local.cpp @@ -23,8 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_converter.h" #include "lua_api/l_internal.h" #include "lua_api/l_object.h" -#include "particles.h" -#include "client.h" +#include "client/particles.h" +#include "client/client.h" #include "client/clientevent.h" int ModApiParticlesLocal::l_add_particle(lua_State *L) diff --git a/src/script/scripting_client.cpp b/src/script/scripting_client.cpp index a6511ffd5..86e5f2874 100644 --- a/src/script/scripting_client.cpp +++ b/src/script/scripting_client.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "scripting_client.h" -#include "client.h" +#include "client/client.h" #include "cpp_api/s_internal.h" #include "lua_api/l_client.h" #include "lua_api/l_env.h" diff --git a/src/unittest/test_keycode.cpp b/src/unittest/test_keycode.cpp index dd3d75a5b..3813af949 100644 --- a/src/unittest/test_keycode.cpp +++ b/src/unittest/test_keycode.cpp @@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "exceptions.h" -#include "keycode.h" +#include "client/keycode.h" class TestKeycode : public TestBase { public: diff --git a/util/travis/clang-format-whitelist.txt b/util/travis/clang-format-whitelist.txt index 22e688a1f..c89520aad 100644 --- a/util/travis/clang-format-whitelist.txt +++ b/util/travis/clang-format-whitelist.txt @@ -33,6 +33,77 @@ src/client/render/sidebyside.cpp src/client/render/stereo.cpp src/client/tile.cpp src/client/tile.h +src/client/fontengine.h +src/client/clientenvironment.cpp +src/client/mapblock_mesh.cpp +src/client/sound_openal.h +src/client/clouds.cpp +src/client/fontengine.cpp +src/client/camera.h +src/client/hud.cpp +src/client/clientmap.cpp +src/client/sound_openal.cpp +src/client/minimap.h +src/client/content_cao.cpp +src/client/localplayer.h +src/client/mapblock_mesh.h +src/client/mesh.cpp +src/client/sound.cpp +src/client/guiscalingfilter.cpp +src/client/content_cso.cpp +src/client/gameui.cpp +src/client/wieldmesh.cpp +src/client/clientmedia.h +src/client/game.cpp +src/client/keys.h +src/client/client.h +src/client/shader.cpp +src/client/clientmap.h +src/client/inputhandler.h +src/client/content_mapblock.h +src/client/game.h +src/client/mesh.h +src/client/camera.cpp +src/client/sky.h +src/client/mesh_generator_thread.cpp +src/client/guiscalingfilter.h +src/client/clientobject.cpp +src/client/tile.cpp +src/client/hud.h +src/client/inputhandler.cpp +src/client/clientevent.h +src/client/gameui.h +src/client/content_cso.h +src/client/sky.cpp +src/client/localplayer.cpp +src/client/content_mapblock.cpp +src/client/clientobject.h +src/client/filecache.cpp +src/client/particles.h +src/client/clientenvironment.h +src/client/imagefilters.h +src/client/renderingengine.cpp +src/client/tile.h +src/client/clientmedia.cpp +src/client/event_manager.h +src/client/joystick_controller.h +src/client/clouds.h +src/client/clientlauncher.h +src/client/content_cao.h +src/client/minimap.cpp +src/client/sound.h +src/client/keycode.cpp +src/client/particles.cpp +src/client/joystick_controller.cpp +src/client/keycode.h +src/client/wieldmesh.h +src/client/filecache.h +src/client/shader.h +src/client/mesh_generator_thread.h +src/client/renderingengine.h +src/client/client.cpp +src/client/imagefilters.cpp +src/client/clientlauncher.cpp src/clouds.cpp src/clouds.h src/collision.cpp