diff --git a/include/game/client/Client.h b/include/client/Client.h similarity index 82% rename from include/game/client/Client.h rename to include/client/Client.h index 00a03b4..4f5bec9 100644 --- a/include/game/client/Client.h +++ b/include/client/Client.h @@ -1,17 +1,17 @@ #pragma once -#include "ClientConnexion.h" -#include "ClientGame.h" +#include "client/ClientConnexion.h" +#include "client/game/ClientGame.h" -#include "game/Team.h" -#include "game/Player.h" +#include "td/game/Team.h" +#include "td/game/Player.h" -#include "protocol/Protocol.h" -#include "protocol/packets/SendMobsPacket.h" +#include "td/protocol/Protocol.h" +#include "td/protocol/packets/SendMobsPacket.h" -#include "render/Renderer.h" +#include "client/render/Renderer.h" -#include "network/Network.h" +#include "td/network/Network.h" namespace td { namespace client { diff --git a/include/game/client/ClientConnexion.h b/include/client/ClientConnexion.h similarity index 90% rename from include/game/client/ClientConnexion.h rename to include/client/ClientConnexion.h index 3a05365..5816b10 100644 --- a/include/game/client/ClientConnexion.h +++ b/include/client/ClientConnexion.h @@ -1,8 +1,8 @@ #pragma once -#include "protocol/PacketHandler.h" -#include "network/TCPSocket.h" -#include "game/Connexion.h" +#include "td/protocol/PacketHandler.h" +#include "td/network/TCPSocket.h" +#include "td/network/Connexion.h" namespace td { namespace client { diff --git a/include/game/client/ClientGame.h b/include/client/game/ClientGame.h similarity index 92% rename from include/game/client/ClientGame.h rename to include/client/game/ClientGame.h index c5c40c9..b73e80c 100644 --- a/include/game/client/ClientGame.h +++ b/include/client/game/ClientGame.h @@ -1,13 +1,13 @@ #pragma once -#include "game/BaseGame.h" +#include "td/game/BaseGame.h" -#include "protocol/PacketHandler.h" +#include "td/protocol/PacketHandler.h" #include "WorldClient.h" -#include "render/WorldRenderer.h" -#include "render/Renderer.h" +#include "client/render/WorldRenderer.h" +#include "client/render/Renderer.h" namespace td { namespace client { diff --git a/include/game/client/WorldClient.h b/include/client/game/WorldClient.h similarity index 93% rename from include/game/client/WorldClient.h rename to include/client/game/WorldClient.h index 914e339..3f6814e 100644 --- a/include/game/client/WorldClient.h +++ b/include/client/game/WorldClient.h @@ -1,7 +1,7 @@ #pragma once -#include "game/World.h" -#include "protocol/PacketHandler.h" +#include "td/game/World.h" +#include "td/protocol/PacketHandler.h" namespace td { namespace client { diff --git a/include/render/GL.h b/include/client/render/GL.h similarity index 100% rename from include/render/GL.h rename to include/client/render/GL.h diff --git a/include/render/Renderer.h b/include/client/render/Renderer.h similarity index 92% rename from include/render/Renderer.h rename to include/client/render/Renderer.h index 4a220b1..984f81f 100644 --- a/include/render/Renderer.h +++ b/include/client/render/Renderer.h @@ -1,10 +1,10 @@ #pragma once -#include "Defines.h" +#include "td/Defines.h" #include #include "loader/GLLoader.h" -#include "render/shaders/WorldShader.h" -#include "render/shaders/EntityShader.h" +#include "client/render/shaders/WorldShader.h" +#include "client/render/shaders/EntityShader.h" namespace td { namespace render { diff --git a/include/render/VertexCache.h b/include/client/render/VertexCache.h similarity index 94% rename from include/render/VertexCache.h rename to include/client/render/VertexCache.h index ede411a..69708af 100644 --- a/include/render/VertexCache.h +++ b/include/client/render/VertexCache.h @@ -2,7 +2,7 @@ #include #include -#include "render/loader/GLLoader.h" +#include "client/render/loader/GLLoader.h" namespace td { diff --git a/include/render/WorldRenderer.h b/include/client/render/WorldRenderer.h similarity index 85% rename from include/render/WorldRenderer.h rename to include/client/render/WorldRenderer.h index bf53a80..a76b4e5 100644 --- a/include/render/WorldRenderer.h +++ b/include/client/render/WorldRenderer.h @@ -1,14 +1,14 @@ #pragma once -#include "game/World.h" +#include "td/game/World.h" -#include "render/Renderer.h" -#include "render/VertexCache.h" +#include "client/render/Renderer.h" +#include "client/render/VertexCache.h" -#include "render/gui/TowerPlacePopup.h" -#include "render/gui/TowerUpgradePopup.h" -#include "render/gui/MobTooltip.h" -#include "render/gui/CastleTooltip.h" +#include "client/render/gui/TowerPlacePopup.h" +#include "client/render/gui/TowerUpgradePopup.h" +#include "client/render/gui/MobTooltip.h" +#include "client/render/gui/CastleTooltip.h" namespace td { diff --git a/include/render/gui/CastleTooltip.h b/include/client/render/gui/CastleTooltip.h similarity index 100% rename from include/render/gui/CastleTooltip.h rename to include/client/render/gui/CastleTooltip.h diff --git a/include/render/gui/FrameMenu.h b/include/client/render/gui/FrameMenu.h similarity index 100% rename from include/render/gui/FrameMenu.h rename to include/client/render/gui/FrameMenu.h diff --git a/include/render/gui/GameMenu.h b/include/client/render/gui/GameMenu.h similarity index 100% rename from include/render/gui/GameMenu.h rename to include/client/render/gui/GameMenu.h diff --git a/include/render/gui/GuiManager.h b/include/client/render/gui/GuiManager.h similarity index 100% rename from include/render/gui/GuiManager.h rename to include/client/render/gui/GuiManager.h diff --git a/include/render/gui/GuiWidget.h b/include/client/render/gui/GuiWidget.h similarity index 100% rename from include/render/gui/GuiWidget.h rename to include/client/render/gui/GuiWidget.h diff --git a/include/render/gui/ImGuiTeamColor.h b/include/client/render/gui/ImGuiTeamColor.h similarity index 67% rename from include/render/gui/ImGuiTeamColor.h rename to include/client/render/gui/ImGuiTeamColor.h index 661f14e..607c564 100644 --- a/include/render/gui/ImGuiTeamColor.h +++ b/include/client/render/gui/ImGuiTeamColor.h @@ -1,7 +1,7 @@ #pragma once -#include "render/gui/imgui/imgui.h" -#include "game/Team.h" +#include "client/render/gui/imgui/imgui.h" +#include "td/game/Team.h" namespace td { namespace render { diff --git a/include/render/gui/LifeProgress.h b/include/client/render/gui/LifeProgress.h similarity index 100% rename from include/render/gui/LifeProgress.h rename to include/client/render/gui/LifeProgress.h diff --git a/include/render/gui/MainMenu.h b/include/client/render/gui/MainMenu.h similarity index 95% rename from include/render/gui/MainMenu.h rename to include/client/render/gui/MainMenu.h index 7aec821..e084319 100644 --- a/include/render/gui/MainMenu.h +++ b/include/client/render/gui/MainMenu.h @@ -4,7 +4,7 @@ #include "imgui/imgui_filebrowser.h" -#include "game/server/Server.h" +#include "server/Server.h" #include diff --git a/include/render/gui/MobTooltip.h b/include/client/render/gui/MobTooltip.h similarity index 100% rename from include/render/gui/MobTooltip.h rename to include/client/render/gui/MobTooltip.h diff --git a/include/render/gui/SummonMenu.h b/include/client/render/gui/SummonMenu.h similarity index 95% rename from include/render/gui/SummonMenu.h rename to include/client/render/gui/SummonMenu.h index f13fbe0..7f5c7b7 100644 --- a/include/render/gui/SummonMenu.h +++ b/include/client/render/gui/SummonMenu.h @@ -3,7 +3,7 @@ #include "GuiWidget.h" #include -#include "game/Mobs.h" +#include "td/game/Mobs.h" namespace td { namespace gui { diff --git a/include/render/gui/TowerGui.h b/include/client/render/gui/TowerGui.h similarity index 94% rename from include/render/gui/TowerGui.h rename to include/client/render/gui/TowerGui.h index 24d998e..a7cdfee 100644 --- a/include/render/gui/TowerGui.h +++ b/include/client/render/gui/TowerGui.h @@ -9,7 +9,7 @@ #include -#include "render/gui/GuiManager.h" +#include "client/render/gui/GuiManager.h" struct SDL_Window; typedef void* SDL_GLContext; diff --git a/include/render/gui/TowerPlacePopup.h b/include/client/render/gui/TowerPlacePopup.h similarity index 95% rename from include/render/gui/TowerPlacePopup.h rename to include/client/render/gui/TowerPlacePopup.h index 36f805a..d784d55 100644 --- a/include/render/gui/TowerPlacePopup.h +++ b/include/client/render/gui/TowerPlacePopup.h @@ -2,7 +2,7 @@ #include "GuiWidget.h" -#include "Defines.h" +#include "td/Defines.h" namespace td { namespace gui { diff --git a/include/render/gui/TowerUpgradePopup.h b/include/client/render/gui/TowerUpgradePopup.h similarity index 96% rename from include/render/gui/TowerUpgradePopup.h rename to include/client/render/gui/TowerUpgradePopup.h index 3031d3c..8e21943 100644 --- a/include/render/gui/TowerUpgradePopup.h +++ b/include/client/render/gui/TowerUpgradePopup.h @@ -2,7 +2,7 @@ #include "GuiWidget.h" -#include "Defines.h" +#include "td/Defines.h" namespace td { namespace gui { diff --git a/include/render/gui/UpdateMenu.h b/include/client/render/gui/UpdateMenu.h similarity index 100% rename from include/render/gui/UpdateMenu.h rename to include/client/render/gui/UpdateMenu.h diff --git a/include/render/gui/imgui/imconfig.h b/include/client/render/gui/imgui/imconfig.h similarity index 99% rename from include/render/gui/imgui/imconfig.h rename to include/client/render/gui/imgui/imconfig.h index a3a583a..9ce7288 100755 --- a/include/render/gui/imgui/imconfig.h +++ b/include/client/render/gui/imgui/imconfig.h @@ -107,7 +107,7 @@ namespace ImGui } */ -#include "render/GL.h" +#include "client/render/GL.h" #if defined(__ANDROID__) #define IMGUI_IMPL_OPENGL_LOADER_ES3 diff --git a/include/render/gui/imgui/imgui.h b/include/client/render/gui/imgui/imgui.h similarity index 100% rename from include/render/gui/imgui/imgui.h rename to include/client/render/gui/imgui/imgui.h diff --git a/include/render/gui/imgui/imgui_filebrowser.h b/include/client/render/gui/imgui/imgui_filebrowser.h similarity index 96% rename from include/render/gui/imgui/imgui_filebrowser.h rename to include/client/render/gui/imgui/imgui_filebrowser.h index cc348fb..f9f52f2 100644 --- a/include/render/gui/imgui/imgui_filebrowser.h +++ b/include/client/render/gui/imgui/imgui_filebrowser.h @@ -1,7 +1,7 @@ #ifndef IMGUIFILEBROWSER_H #define IMGUIFILEBROWSER_H -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #include #include diff --git a/include/render/loader/GLLoader.h b/include/client/render/loader/GLLoader.h similarity index 100% rename from include/render/loader/GLLoader.h rename to include/client/render/loader/GLLoader.h diff --git a/include/render/loader/TextureLoader.h b/include/client/render/loader/TextureLoader.h similarity index 100% rename from include/render/loader/TextureLoader.h rename to include/client/render/loader/TextureLoader.h diff --git a/include/render/loader/WorldLoader.h b/include/client/render/loader/WorldLoader.h similarity index 94% rename from include/render/loader/WorldLoader.h rename to include/client/render/loader/WorldLoader.h index 2e83f94..e2af670 100644 --- a/include/render/loader/WorldLoader.h +++ b/include/client/render/loader/WorldLoader.h @@ -1,6 +1,6 @@ #pragma once -#include "game/World.h" +#include "td/game/World.h" #include "GLLoader.h" namespace td { diff --git a/include/render/loader/stb_image.h b/include/client/render/loader/stb_image.h similarity index 100% rename from include/render/loader/stb_image.h rename to include/client/render/loader/stb_image.h diff --git a/include/render/shaders/EntityShader.h b/include/client/render/shaders/EntityShader.h similarity index 100% rename from include/render/shaders/EntityShader.h rename to include/client/render/shaders/EntityShader.h diff --git a/include/render/shaders/ShaderProgram.h b/include/client/render/shaders/ShaderProgram.h similarity index 95% rename from include/render/shaders/ShaderProgram.h rename to include/client/render/shaders/ShaderProgram.h index bfc93e9..8ddaf92 100755 --- a/include/render/shaders/ShaderProgram.h +++ b/include/client/render/shaders/ShaderProgram.h @@ -1,8 +1,8 @@ #pragma once #include -#include "Defines.h" -#include "render/GL.h" +#include "td/Defines.h" +#include "client/render/GL.h" namespace td { namespace shader { diff --git a/include/render/shaders/WorldShader.h b/include/client/render/shaders/WorldShader.h similarity index 100% rename from include/render/shaders/WorldShader.h rename to include/client/render/shaders/WorldShader.h diff --git a/include/updater/Updater.h b/include/client/updater/Updater.h similarity index 96% rename from include/updater/Updater.h rename to include/client/updater/Updater.h index 9e96d9c..50ebfa1 100644 --- a/include/updater/Updater.h +++ b/include/client/updater/Updater.h @@ -1,6 +1,6 @@ #pragma once -#include "misc/DataBuffer.h" +#include "td/misc/DataBuffer.h" #define TD_VERSION "alpha-0.3.0" diff --git a/include/window/Display.h b/include/client/window/Display.h similarity index 100% rename from include/window/Display.h rename to include/client/window/Display.h diff --git a/include/game/server/Lobby.h b/include/server/Lobby.h similarity index 95% rename from include/game/server/Lobby.h rename to include/server/Lobby.h index f59d3ff..286d9cb 100644 --- a/include/game/server/Lobby.h +++ b/include/server/Lobby.h @@ -2,7 +2,7 @@ #include -#include "misc/Time.h" +#include "td/misc/Time.h" namespace td { namespace server { diff --git a/include/game/server/Server.h b/include/server/Server.h similarity index 90% rename from include/game/server/Server.h rename to include/server/Server.h index 406a97e..f89a88d 100644 --- a/include/game/server/Server.h +++ b/include/server/Server.h @@ -3,13 +3,13 @@ #include #include -#include "network/TCPListener.h" -#include "protocol/Protocol.h" -#include "protocol/PacketDispatcher.h" -#include "protocol/PacketHandler.h" -#include "ServerGame.h" -#include "ServerConnexion.h" -#include "Lobby.h" +#include "td/network/TCPListener.h" +#include "td/protocol/Protocol.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/protocol/PacketHandler.h" +#include "server/game/ServerGame.h" +#include "server/ServerConnexion.h" +#include "server/Lobby.h" #define SERVER_TPS 20 #define SERVER_TICK 1000 / SERVER_TPS diff --git a/include/game/server/ServerConnexion.h b/include/server/ServerConnexion.h similarity index 89% rename from include/game/server/ServerConnexion.h rename to include/server/ServerConnexion.h index fb7e3cf..d8f8f4f 100644 --- a/include/game/server/ServerConnexion.h +++ b/include/server/ServerConnexion.h @@ -1,10 +1,10 @@ #pragma once -#include "network/TCPSocket.h" -#include "protocol/PacketHandler.h" -#include "protocol/PacketDispatcher.h" -#include "game/Player.h" -#include "game/Connexion.h" +#include "td/network/TCPSocket.h" +#include "td/protocol/PacketHandler.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/game/Player.h" +#include "td/network/Connexion.h" namespace td { namespace server { diff --git a/include/game/server/ServerGame.h b/include/server/game/ServerGame.h similarity index 93% rename from include/game/server/ServerGame.h rename to include/server/game/ServerGame.h index c8feacb..cf633ce 100644 --- a/include/game/server/ServerGame.h +++ b/include/server/game/ServerGame.h @@ -1,7 +1,7 @@ #pragma once -#include "game/BaseGame.h" -#include "misc/Time.h" +#include "td/game/BaseGame.h" +#include "td/misc/Time.h" #include "ServerWorld.h" namespace td { diff --git a/include/game/server/ServerWorld.h b/include/server/game/ServerWorld.h similarity index 96% rename from include/game/server/ServerWorld.h rename to include/server/game/ServerWorld.h index 342c3b1..e4df410 100644 --- a/include/game/server/ServerWorld.h +++ b/include/server/game/ServerWorld.h @@ -1,6 +1,6 @@ #pragma once -#include "game/World.h" +#include "td/game/World.h" namespace td { namespace server { diff --git a/include/Defines.h b/include/td/Defines.h similarity index 100% rename from include/Defines.h rename to include/td/Defines.h diff --git a/include/game/BaseGame.h b/include/td/game/BaseGame.h similarity index 95% rename from include/game/BaseGame.h rename to include/td/game/BaseGame.h index dc961d6..5d67745 100644 --- a/include/game/BaseGame.h +++ b/include/td/game/BaseGame.h @@ -1,8 +1,8 @@ #pragma once -#include "game/Team.h" -#include "game/World.h" -#include "game/Player.h" +#include "td/game/Team.h" +#include "td/game/World.h" +#include "td/game/Player.h" namespace td { namespace game { diff --git a/include/game/GameManager.h b/include/td/game/GameManager.h similarity index 100% rename from include/game/GameManager.h rename to include/td/game/GameManager.h diff --git a/include/game/Mobs.h b/include/td/game/Mobs.h similarity index 99% rename from include/game/Mobs.h rename to include/td/game/Mobs.h index 062a1ea..87c37b9 100644 --- a/include/game/Mobs.h +++ b/include/td/game/Mobs.h @@ -1,11 +1,11 @@ #pragma once -#include "Defines.h" +#include "td/Defines.h" #include "Towers.h" #include "Types.h" #include "Team.h" -#include "misc/ObjectNotifier.h" +#include "td/misc/ObjectNotifier.h" #include #include diff --git a/include/game/Player.h b/include/td/game/Player.h similarity index 95% rename from include/game/Player.h rename to include/td/game/Player.h index 8bffe96..cdd8f53 100644 --- a/include/game/Player.h +++ b/include/td/game/Player.h @@ -2,8 +2,8 @@ #include -#include "game/Team.h" -#include "game/PlayerUpgrades.h" +#include "td/game/Team.h" +#include "td/game/PlayerUpgrades.h" namespace td { namespace game { diff --git a/include/game/PlayerUpgrades.h b/include/td/game/PlayerUpgrades.h similarity index 100% rename from include/game/PlayerUpgrades.h rename to include/td/game/PlayerUpgrades.h diff --git a/include/game/Team.h b/include/td/game/Team.h similarity index 98% rename from include/game/Team.h rename to include/td/game/Team.h index 2e80374..fa373bb 100644 --- a/include/game/Team.h +++ b/include/td/game/Team.h @@ -2,7 +2,7 @@ #include "Types.h" -#include "misc/Shapes.h" +#include "td/misc/Shapes.h" #include #include diff --git a/include/game/Towers.h b/include/td/game/Towers.h similarity index 98% rename from include/game/Towers.h rename to include/td/game/Towers.h index 5b86b4c..c01ff3b 100644 --- a/include/game/Towers.h +++ b/include/td/game/Towers.h @@ -3,10 +3,10 @@ #include #include -#include "misc/Time.h" -#include "misc/Shapes.h" +#include "td/misc/Time.h" +#include "td/misc/Shapes.h" -#include "game/Types.h" +#include "td/game/Types.h" namespace td { namespace game { diff --git a/include/game/Types.h b/include/td/game/Types.h similarity index 92% rename from include/game/Types.h rename to include/td/game/Types.h index e7f053f..7379fca 100644 --- a/include/game/Types.h +++ b/include/td/game/Types.h @@ -3,7 +3,7 @@ #include // include Log for every files -#include "misc/Log.h" +#include "td/misc/Log.h" namespace td { namespace game { diff --git a/include/game/World.h b/include/td/game/World.h similarity index 100% rename from include/game/World.h rename to include/td/game/World.h diff --git a/include/misc/Backward.hpp b/include/td/misc/Backward.hpp similarity index 100% rename from include/misc/Backward.hpp rename to include/td/misc/Backward.hpp diff --git a/include/misc/Compression.h b/include/td/misc/Compression.h similarity index 100% rename from include/misc/Compression.h rename to include/td/misc/Compression.h diff --git a/include/misc/DataBuffer.h b/include/td/misc/DataBuffer.h similarity index 100% rename from include/misc/DataBuffer.h rename to include/td/misc/DataBuffer.h diff --git a/include/misc/Easing.h b/include/td/misc/Easing.h similarity index 100% rename from include/misc/Easing.h rename to include/td/misc/Easing.h diff --git a/include/misc/Format.h b/include/td/misc/Format.h similarity index 100% rename from include/misc/Format.h rename to include/td/misc/Format.h diff --git a/include/misc/Log.h b/include/td/misc/Log.h similarity index 100% rename from include/misc/Log.h rename to include/td/misc/Log.h diff --git a/include/misc/Maths.h b/include/td/misc/Maths.h similarity index 99% rename from include/misc/Maths.h rename to include/td/misc/Maths.h index 66f4c75..f28b0d0 100644 --- a/include/misc/Maths.h +++ b/include/td/misc/Maths.h @@ -1,6 +1,6 @@ #pragma once -#include "Defines.h" +#include "td/Defines.h" #include namespace td { diff --git a/include/misc/ObjectNotifier.h b/include/td/misc/ObjectNotifier.h similarity index 100% rename from include/misc/ObjectNotifier.h rename to include/td/misc/ObjectNotifier.h diff --git a/include/misc/Platform.h b/include/td/misc/Platform.h similarity index 100% rename from include/misc/Platform.h rename to include/td/misc/Platform.h diff --git a/include/misc/Random.h b/include/td/misc/Random.h similarity index 100% rename from include/misc/Random.h rename to include/td/misc/Random.h diff --git a/include/misc/Shapes.h b/include/td/misc/Shapes.h similarity index 100% rename from include/misc/Shapes.h rename to include/td/misc/Shapes.h diff --git a/include/misc/Time.h b/include/td/misc/Time.h similarity index 100% rename from include/misc/Time.h rename to include/td/misc/Time.h diff --git a/include/game/Connexion.h b/include/td/network/Connexion.h similarity index 83% rename from include/game/Connexion.h rename to include/td/network/Connexion.h index d5ff3d5..5b410a0 100644 --- a/include/game/Connexion.h +++ b/include/td/network/Connexion.h @@ -1,9 +1,9 @@ #pragma once -#include "network/TCPSocket.h" -#include "protocol/PacketHandler.h" -#include "protocol/PacketDispatcher.h" -#include "game/Player.h" +#include "td/network/TCPSocket.h" +#include "td/protocol/PacketHandler.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/game/Player.h" namespace td { namespace protocol { diff --git a/include/network/HttpLib.h b/include/td/network/HttpLib.h similarity index 100% rename from include/network/HttpLib.h rename to include/td/network/HttpLib.h diff --git a/include/network/IPAddress.h b/include/td/network/IPAddress.h similarity index 100% rename from include/network/IPAddress.h rename to include/td/network/IPAddress.h diff --git a/include/network/Network.h b/include/td/network/Network.h similarity index 74% rename from include/network/Network.h rename to include/td/network/Network.h index bb21849..97ed99b 100644 --- a/include/network/Network.h +++ b/include/td/network/Network.h @@ -12,10 +12,10 @@ #include #endif -#include "network/Socket.h" -#include "network/IPAddress.h" -#include "network/UDPSocket.h" -#include "network/TCPSocket.h" +#include "td/network/Socket.h" +#include "td/network/IPAddress.h" +#include "td/network/UDPSocket.h" +#include "td/network/TCPSocket.h" namespace td { namespace network { diff --git a/include/network/Socket.h b/include/td/network/Socket.h similarity index 98% rename from include/network/Socket.h rename to include/td/network/Socket.h index bf79424..3ef43f1 100644 --- a/include/network/Socket.h +++ b/include/td/network/Socket.h @@ -5,7 +5,7 @@ #include #include -#include "misc/DataBuffer.h" +#include "td/misc/DataBuffer.h" #ifdef _WIN32 #include diff --git a/include/network/TCPListener.h b/include/td/network/TCPListener.h similarity index 100% rename from include/network/TCPListener.h rename to include/td/network/TCPListener.h diff --git a/include/network/TCPSocket.h b/include/td/network/TCPSocket.h similarity index 91% rename from include/network/TCPSocket.h rename to include/td/network/TCPSocket.h index 79a9812..45349f1 100644 --- a/include/network/TCPSocket.h +++ b/include/td/network/TCPSocket.h @@ -1,8 +1,8 @@ #ifndef NETWORK_TCP_SOCKET_H_ #define NETWORK_TCP_SOCKET_H_ -#include "network/IPAddress.h" -#include "network/Socket.h" +#include "td/network/IPAddress.h" +#include "td/network/Socket.h" #include diff --git a/include/network/UDPSocket.h b/include/td/network/UDPSocket.h similarity index 89% rename from include/network/UDPSocket.h rename to include/td/network/UDPSocket.h index 2f1bc44..0c9aee9 100644 --- a/include/network/UDPSocket.h +++ b/include/td/network/UDPSocket.h @@ -1,8 +1,8 @@ #ifndef NETWORK_UDP_SOCKET_H_ #define NETWORK_UDP_SOCKET_H_ -#include "network/IPAddress.h" -#include "network/Socket.h" +#include "td/network/IPAddress.h" +#include "td/network/Socket.h" #include diff --git a/include/protocol/PacketDispatcher.h b/include/td/protocol/PacketDispatcher.h similarity index 95% rename from include/protocol/PacketDispatcher.h rename to include/td/protocol/PacketDispatcher.h index 29c299a..d5f01cf 100644 --- a/include/protocol/PacketDispatcher.h +++ b/include/td/protocol/PacketDispatcher.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" #include #include diff --git a/include/protocol/PacketFactory.h b/include/td/protocol/PacketFactory.h similarity index 84% rename from include/protocol/PacketFactory.h rename to include/td/protocol/PacketFactory.h index 0f8b3f5..3f2188c 100644 --- a/include/protocol/PacketFactory.h +++ b/include/td/protocol/PacketFactory.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/PacketHandler.h b/include/td/protocol/PacketHandler.h similarity index 96% rename from include/protocol/PacketHandler.h rename to include/td/protocol/PacketHandler.h index 030ae35..cd052c7 100644 --- a/include/protocol/PacketHandler.h +++ b/include/td/protocol/PacketHandler.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "protocol/PacketsForward.h" +#include "td/protocol/Protocol.h" +#include "td/protocol/PacketsForward.h" namespace td { namespace protocol { diff --git a/include/protocol/Packets.h b/include/td/protocol/Packets.h similarity index 100% rename from include/protocol/Packets.h rename to include/td/protocol/Packets.h diff --git a/include/protocol/PacketsForward.h b/include/td/protocol/PacketsForward.h similarity index 100% rename from include/protocol/PacketsForward.h rename to include/td/protocol/PacketsForward.h diff --git a/include/protocol/Protocol.h b/include/td/protocol/Protocol.h similarity index 97% rename from include/protocol/Protocol.h rename to include/td/protocol/Protocol.h index 33f74d1..de06870 100644 --- a/include/protocol/Protocol.h +++ b/include/td/protocol/Protocol.h @@ -1,6 +1,6 @@ #pragma once -#include "misc/DataBuffer.h" +#include "td/misc/DataBuffer.h" #include diff --git a/include/protocol/packets/ConnectionInfoPacket.h b/include/td/protocol/packets/ConnectionInfoPacket.h similarity index 94% rename from include/protocol/packets/ConnectionInfoPacket.h rename to include/td/protocol/packets/ConnectionInfoPacket.h index 8f8fd44..c854ffd 100644 --- a/include/protocol/packets/ConnectionInfoPacket.h +++ b/include/td/protocol/packets/ConnectionInfoPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/DisconnectPacket.h b/include/td/protocol/packets/DisconnectPacket.h similarity index 94% rename from include/protocol/packets/DisconnectPacket.h rename to include/td/protocol/packets/DisconnectPacket.h index 3365bd7..2d88597 100644 --- a/include/protocol/packets/DisconnectPacket.h +++ b/include/td/protocol/packets/DisconnectPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/KeepAlivePacket.h b/include/td/protocol/packets/KeepAlivePacket.h similarity index 94% rename from include/protocol/packets/KeepAlivePacket.h rename to include/td/protocol/packets/KeepAlivePacket.h index 9a611a6..617458a 100644 --- a/include/protocol/packets/KeepAlivePacket.h +++ b/include/td/protocol/packets/KeepAlivePacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlaceTowerPacket.h b/include/td/protocol/packets/PlaceTowerPacket.h similarity index 92% rename from include/protocol/packets/PlaceTowerPacket.h rename to include/td/protocol/packets/PlaceTowerPacket.h index a3e44fa..7030ee0 100644 --- a/include/protocol/packets/PlaceTowerPacket.h +++ b/include/td/protocol/packets/PlaceTowerPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerBuyItemPacket.h b/include/td/protocol/packets/PlayerBuyItemPacket.h similarity index 96% rename from include/protocol/packets/PlayerBuyItemPacket.h rename to include/td/protocol/packets/PlayerBuyItemPacket.h index 8ee2285..9df18a5 100644 --- a/include/protocol/packets/PlayerBuyItemPacket.h +++ b/include/td/protocol/packets/PlayerBuyItemPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerBuyMobUpgradePacket.h b/include/td/protocol/packets/PlayerBuyMobUpgradePacket.h similarity index 93% rename from include/protocol/packets/PlayerBuyMobUpgradePacket.h rename to include/td/protocol/packets/PlayerBuyMobUpgradePacket.h index 2ba3983..f1f1e6b 100644 --- a/include/protocol/packets/PlayerBuyMobUpgradePacket.h +++ b/include/td/protocol/packets/PlayerBuyMobUpgradePacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerJoinPacket.h b/include/td/protocol/packets/PlayerJoinPacket.h similarity index 95% rename from include/protocol/packets/PlayerJoinPacket.h rename to include/td/protocol/packets/PlayerJoinPacket.h index aab8bcc..e500dae 100644 --- a/include/protocol/packets/PlayerJoinPacket.h +++ b/include/td/protocol/packets/PlayerJoinPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerLeavePacket.h b/include/td/protocol/packets/PlayerLeavePacket.h similarity index 94% rename from include/protocol/packets/PlayerLeavePacket.h rename to include/td/protocol/packets/PlayerLeavePacket.h index e8fbbd0..3388fdc 100644 --- a/include/protocol/packets/PlayerLeavePacket.h +++ b/include/td/protocol/packets/PlayerLeavePacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerListPacket.h b/include/td/protocol/packets/PlayerListPacket.h similarity index 91% rename from include/protocol/packets/PlayerListPacket.h rename to include/td/protocol/packets/PlayerListPacket.h index 5cf7f07..58200f1 100644 --- a/include/protocol/packets/PlayerListPacket.h +++ b/include/td/protocol/packets/PlayerListPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/PlayerLoginPacket.h b/include/td/protocol/packets/PlayerLoginPacket.h similarity index 94% rename from include/protocol/packets/PlayerLoginPacket.h rename to include/td/protocol/packets/PlayerLoginPacket.h index fceeb81..56ac5a7 100644 --- a/include/protocol/packets/PlayerLoginPacket.h +++ b/include/td/protocol/packets/PlayerLoginPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/RemoveTowerPacket.h b/include/td/protocol/packets/RemoveTowerPacket.h similarity index 90% rename from include/protocol/packets/RemoveTowerPacket.h rename to include/td/protocol/packets/RemoveTowerPacket.h index 2727813..6ef41ef 100644 --- a/include/protocol/packets/RemoveTowerPacket.h +++ b/include/td/protocol/packets/RemoveTowerPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/SelectTeamPacket.h b/include/td/protocol/packets/SelectTeamPacket.h similarity index 90% rename from include/protocol/packets/SelectTeamPacket.h rename to include/td/protocol/packets/SelectTeamPacket.h index 0375140..bdd82d0 100644 --- a/include/protocol/packets/SelectTeamPacket.h +++ b/include/td/protocol/packets/SelectTeamPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/SendMobsPacket.h b/include/td/protocol/packets/SendMobsPacket.h similarity index 92% rename from include/protocol/packets/SendMobsPacket.h rename to include/td/protocol/packets/SendMobsPacket.h index 92c3300..c1c2e03 100644 --- a/include/protocol/packets/SendMobsPacket.h +++ b/include/td/protocol/packets/SendMobsPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/ServerTpsPacket.h b/include/td/protocol/packets/ServerTpsPacket.h similarity index 95% rename from include/protocol/packets/ServerTpsPacket.h rename to include/td/protocol/packets/ServerTpsPacket.h index 4326b91..85ab7b7 100644 --- a/include/protocol/packets/ServerTpsPacket.h +++ b/include/td/protocol/packets/ServerTpsPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/SpawnMobPacket.h b/include/td/protocol/packets/SpawnMobPacket.h similarity index 95% rename from include/protocol/packets/SpawnMobPacket.h rename to include/td/protocol/packets/SpawnMobPacket.h index 78abec3..85c1db0 100644 --- a/include/protocol/packets/SpawnMobPacket.h +++ b/include/td/protocol/packets/SpawnMobPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateCastleLifePacket.h b/include/td/protocol/packets/UpdateCastleLifePacket.h similarity index 92% rename from include/protocol/packets/UpdateCastleLifePacket.h rename to include/td/protocol/packets/UpdateCastleLifePacket.h index 63d5163..201b07f 100644 --- a/include/protocol/packets/UpdateCastleLifePacket.h +++ b/include/td/protocol/packets/UpdateCastleLifePacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateExpPacket.h b/include/td/protocol/packets/UpdateExpPacket.h similarity index 94% rename from include/protocol/packets/UpdateExpPacket.h rename to include/td/protocol/packets/UpdateExpPacket.h index bf1313b..e6e626a 100644 --- a/include/protocol/packets/UpdateExpPacket.h +++ b/include/td/protocol/packets/UpdateExpPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateGameStatePacket.h b/include/td/protocol/packets/UpdateGameStatePacket.h similarity index 90% rename from include/protocol/packets/UpdateGameStatePacket.h rename to include/td/protocol/packets/UpdateGameStatePacket.h index b25fc85..f2eb2df 100644 --- a/include/protocol/packets/UpdateGameStatePacket.h +++ b/include/td/protocol/packets/UpdateGameStatePacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateLobbyTimePacket.h b/include/td/protocol/packets/UpdateLobbyTimePacket.h similarity index 95% rename from include/protocol/packets/UpdateLobbyTimePacket.h rename to include/td/protocol/packets/UpdateLobbyTimePacket.h index e910c59..7479fc2 100644 --- a/include/protocol/packets/UpdateLobbyTimePacket.h +++ b/include/td/protocol/packets/UpdateLobbyTimePacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateMobStatesPacket.h b/include/td/protocol/packets/UpdateMobStatesPacket.h similarity index 95% rename from include/protocol/packets/UpdateMobStatesPacket.h rename to include/td/protocol/packets/UpdateMobStatesPacket.h index ba84e80..d9f262b 100644 --- a/include/protocol/packets/UpdateMobStatesPacket.h +++ b/include/td/protocol/packets/UpdateMobStatesPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdateMoneyPacket.h b/include/td/protocol/packets/UpdateMoneyPacket.h similarity index 94% rename from include/protocol/packets/UpdateMoneyPacket.h rename to include/td/protocol/packets/UpdateMoneyPacket.h index 1fce4d1..a58d9ce 100644 --- a/include/protocol/packets/UpdateMoneyPacket.h +++ b/include/td/protocol/packets/UpdateMoneyPacket.h @@ -1,6 +1,6 @@ #pragma once -#include "protocol/Protocol.h" +#include "td/protocol/Protocol.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpdatePlayerTeamPacket.h b/include/td/protocol/packets/UpdatePlayerTeamPacket.h similarity index 92% rename from include/protocol/packets/UpdatePlayerTeamPacket.h rename to include/td/protocol/packets/UpdatePlayerTeamPacket.h index 46731d7..4406cfd 100644 --- a/include/protocol/packets/UpdatePlayerTeamPacket.h +++ b/include/td/protocol/packets/UpdatePlayerTeamPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/UpgradeTowerPacket.h b/include/td/protocol/packets/UpgradeTowerPacket.h similarity index 92% rename from include/protocol/packets/UpgradeTowerPacket.h rename to include/td/protocol/packets/UpgradeTowerPacket.h index 124c8c8..29e1f0f 100644 --- a/include/protocol/packets/UpgradeTowerPacket.h +++ b/include/td/protocol/packets/UpgradeTowerPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/WorldAddTowerPacket.h b/include/td/protocol/packets/WorldAddTowerPacket.h similarity index 94% rename from include/protocol/packets/WorldAddTowerPacket.h rename to include/td/protocol/packets/WorldAddTowerPacket.h index 0851451..57cbb87 100644 --- a/include/protocol/packets/WorldAddTowerPacket.h +++ b/include/td/protocol/packets/WorldAddTowerPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/WorldBeginDataPacket.h b/include/td/protocol/packets/WorldBeginDataPacket.h similarity index 96% rename from include/protocol/packets/WorldBeginDataPacket.h rename to include/td/protocol/packets/WorldBeginDataPacket.h index 59fbdaa..80cf088 100644 --- a/include/protocol/packets/WorldBeginDataPacket.h +++ b/include/td/protocol/packets/WorldBeginDataPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/include/protocol/packets/WorldDataPacket.h b/include/td/protocol/packets/WorldDataPacket.h similarity index 93% rename from include/protocol/packets/WorldDataPacket.h rename to include/td/protocol/packets/WorldDataPacket.h index 8ade9e2..4c2ee62 100644 --- a/include/protocol/packets/WorldDataPacket.h +++ b/include/td/protocol/packets/WorldDataPacket.h @@ -1,7 +1,7 @@ #pragma once -#include "protocol/Protocol.h" -#include "game/BaseGame.h" +#include "td/protocol/Protocol.h" +#include "td/game/BaseGame.h" namespace td { namespace protocol { diff --git a/src/TowerDefense.cpp b/src/ClientMain.cpp similarity index 88% rename from src/TowerDefense.cpp rename to src/ClientMain.cpp index 4185ed1..d95a2b3 100644 --- a/src/TowerDefense.cpp +++ b/src/ClientMain.cpp @@ -11,9 +11,9 @@ #define BACKWARD_HAS_DW 1 #endif -#include "window/Display.h" -#include "updater/Updater.h" -#include "misc/Backward.hpp" +#include "client/window/Display.h" +#include "client/updater/Updater.h" +#include "td/misc/Backward.hpp" #ifdef __ANDROID__ extern "C" diff --git a/src/ServerMain.cpp b/src/ServerMain.cpp new file mode 100644 index 0000000..b9ae5b9 --- /dev/null +++ b/src/ServerMain.cpp @@ -0,0 +1,27 @@ +//============================================================================ +// Name : Tower.cpp +// Author : Persson +// Version : +// Copyright : Copyright +// Description : Hello World in C++, Ansi-style +//============================================================================ + +#if !defined(NDEBUG) && !defined(_WIN32) +#define BACKWARD_HAS_UNWIND 1 +#define BACKWARD_HAS_DW 1 +#endif + +#include "td/misc/Backward.hpp" + +#ifdef __ANDROID__ +extern "C" +#endif + +int main(int argc, const char* args[]) { +#if !defined(NDEBUG) + // setup signal handling + backward::SignalHandling sh; +#endif + + return 0; +} \ No newline at end of file diff --git a/src/game/client/Client.cpp b/src/client/Client.cpp similarity index 85% rename from src/game/client/Client.cpp rename to src/client/Client.cpp index 9f77e7f..c123445 100644 --- a/src/game/client/Client.cpp +++ b/src/client/Client.cpp @@ -1,11 +1,11 @@ -#include "game/client/Client.h" -#include "misc/Format.h" +#include "client/Client.h" +#include "td/misc/Format.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/PlaceTowerPacket.h" -#include "protocol/packets/RemoveTowerPacket.h" -#include "protocol/packets/SelectTeamPacket.h" -#include "protocol/packets/UpgradeTowerPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/PlaceTowerPacket.h" +#include "td/protocol/packets/RemoveTowerPacket.h" +#include "td/protocol/packets/SelectTeamPacket.h" +#include "td/protocol/packets/UpgradeTowerPacket.h" namespace td { namespace client { diff --git a/src/game/client/ClientConnexion.cpp b/src/client/ClientConnexion.cpp similarity index 81% rename from src/game/client/ClientConnexion.cpp rename to src/client/ClientConnexion.cpp index f538699..db98698 100644 --- a/src/game/client/ClientConnexion.cpp +++ b/src/client/ClientConnexion.cpp @@ -1,11 +1,11 @@ -#include "game/client/ClientConnexion.h" -#include "render/WorldRenderer.h" +#include "client/ClientConnexion.h" +#include "client/render/WorldRenderer.h" -#include "protocol/packets/ConnectionInfoPacket.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/KeepAlivePacket.h" -#include "protocol/packets/PlayerLoginPacket.h" -#include "protocol/packets/ServerTpsPacket.h" +#include "td/protocol/packets/ConnectionInfoPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/KeepAlivePacket.h" +#include "td/protocol/packets/PlayerLoginPacket.h" +#include "td/protocol/packets/ServerTpsPacket.h" namespace td { namespace client { diff --git a/src/game/client/ClientGame.cpp b/src/client/game/ClientGame.cpp similarity index 86% rename from src/game/client/ClientGame.cpp rename to src/client/game/ClientGame.cpp index 572d52c..d7fad0c 100644 --- a/src/game/client/ClientGame.cpp +++ b/src/client/game/ClientGame.cpp @@ -1,18 +1,18 @@ -#include "game/client/ClientGame.h" -#include "protocol/PacketDispatcher.h" -#include "game/client/Client.h" +#include "client/game/ClientGame.h" +#include "td/protocol/PacketDispatcher.h" +#include "client/Client.h" -#include "protocol/packets/ConnectionInfoPacket.h" -#include "protocol/packets/PlayerJoinPacket.h" -#include "protocol/packets/PlayerListPacket.h" -#include "protocol/packets/PlayerLeavePacket.h" -#include "protocol/packets/UpdatePlayerTeamPacket.h" -#include "protocol/packets/UpdateLobbyTimePacket.h" -#include "protocol/packets/UpdateGameStatePacket.h" -#include "protocol/packets/UpdateMoneyPacket.h" -#include "protocol/packets/UpdateExpPacket.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/WorldDataPacket.h" +#include "td/protocol/packets/ConnectionInfoPacket.h" +#include "td/protocol/packets/PlayerJoinPacket.h" +#include "td/protocol/packets/PlayerListPacket.h" +#include "td/protocol/packets/PlayerLeavePacket.h" +#include "td/protocol/packets/UpdatePlayerTeamPacket.h" +#include "td/protocol/packets/UpdateLobbyTimePacket.h" +#include "td/protocol/packets/UpdateGameStatePacket.h" +#include "td/protocol/packets/UpdateMoneyPacket.h" +#include "td/protocol/packets/UpdateExpPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" namespace td { namespace client { diff --git a/src/game/client/WorldClient.cpp b/src/client/game/WorldClient.cpp similarity index 84% rename from src/game/client/WorldClient.cpp rename to src/client/game/WorldClient.cpp index a0dbd33..58182e1 100644 --- a/src/game/client/WorldClient.cpp +++ b/src/client/game/WorldClient.cpp @@ -1,16 +1,16 @@ -#include "game/client/WorldClient.h" -#include "protocol/PacketDispatcher.h" -#include "game/client/ClientGame.h" -#include "render/WorldRenderer.h" +#include "client/game/WorldClient.h" +#include "td/protocol/PacketDispatcher.h" +#include "client/game/ClientGame.h" +#include "client/render/WorldRenderer.h" -#include "protocol/packets/WorldAddTowerPacket.h" -#include "protocol/packets/WorldBeginDataPacket.h" -#include "protocol/packets/WorldDataPacket.h" -#include "protocol/packets/SpawnMobPacket.h" -#include "protocol/packets/UpgradeTowerPacket.h" -#include "protocol/packets/RemoveTowerPacket.h" -#include "protocol/packets/UpdateCastleLifePacket.h" -#include "protocol/packets/UpdateMobStatesPacket.h" +#include "td/protocol/packets/WorldAddTowerPacket.h" +#include "td/protocol/packets/WorldBeginDataPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" +#include "td/protocol/packets/SpawnMobPacket.h" +#include "td/protocol/packets/UpgradeTowerPacket.h" +#include "td/protocol/packets/RemoveTowerPacket.h" +#include "td/protocol/packets/UpdateCastleLifePacket.h" +#include "td/protocol/packets/UpdateMobStatesPacket.h" namespace td { namespace client { diff --git a/src/render/Renderer.cpp b/src/client/render/Renderer.cpp similarity index 95% rename from src/render/Renderer.cpp rename to src/client/render/Renderer.cpp index 322baa8..26f5c42 100644 --- a/src/render/Renderer.cpp +++ b/src/client/render/Renderer.cpp @@ -5,15 +5,17 @@ * Author: simon */ -#include "render/Renderer.h" -#include "render/GL.h" #include -#include "misc/Time.h" -#include "misc/Easing.h" -#include "misc/Maths.h" -#include -#include +#include "client/render/Renderer.h" +#include "client/render/GL.h" + +#include "td/misc/Time.h" +#include "td/misc/Easing.h" +#include "td/misc/Maths.h" +#include "td/misc/Log.h" +#include "td/misc/Format.h" + namespace td { namespace render { diff --git a/src/render/VertexCache.cpp b/src/client/render/VertexCache.cpp similarity index 94% rename from src/render/VertexCache.cpp rename to src/client/render/VertexCache.cpp index b501ee3..ca74b61 100644 --- a/src/render/VertexCache.cpp +++ b/src/client/render/VertexCache.cpp @@ -1,5 +1,5 @@ -#include "render/VertexCache.h" -#include "render/loader/GLLoader.h" +#include "client/render/VertexCache.h" +#include "client/render/loader/GLLoader.h" namespace td { namespace render { diff --git a/src/render/WorldRenderer.cpp b/src/client/render/WorldRenderer.cpp similarity index 95% rename from src/render/WorldRenderer.cpp rename to src/client/render/WorldRenderer.cpp index f4ba27f..bdf262b 100644 --- a/src/render/WorldRenderer.cpp +++ b/src/client/render/WorldRenderer.cpp @@ -1,12 +1,12 @@ -#include "render/WorldRenderer.h" -#include "render/loader/WorldLoader.h" -#include "render/Renderer.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/WorldRenderer.h" +#include "client/render/loader/WorldLoader.h" +#include "client/render/Renderer.h" +#include "client/render/gui/imgui/imgui.h" #include "gui/imgui/imgui_internal.h" -#include "window/Display.h" -#include "game/client/ClientGame.h" -#include "game/client/Client.h" -#include "misc/Format.h" +#include "client/window/Display.h" +#include "client/game/ClientGame.h" +#include "client/Client.h" +#include "td/misc/Format.h" namespace td { namespace render { diff --git a/src/render/gui/CastleTooltip.cpp b/src/client/render/gui/CastleTooltip.cpp similarity index 74% rename from src/render/gui/CastleTooltip.cpp rename to src/client/render/gui/CastleTooltip.cpp index e8b3518..257ef18 100644 --- a/src/render/gui/CastleTooltip.cpp +++ b/src/client/render/gui/CastleTooltip.cpp @@ -1,11 +1,11 @@ -#include "render/gui/CastleTooltip.h" -#include "render/gui/imgui/imgui.h" -#include "render/gui/LifeProgress.h" -#include "render/gui/ImGuiTeamColor.h" +#include "client/render/gui/CastleTooltip.h" +#include "client/render/gui/imgui/imgui.h" +#include "client/render/gui/LifeProgress.h" +#include "client/render/gui/ImGuiTeamColor.h" -#include "render/WorldRenderer.h" +#include "client/render/WorldRenderer.h" -#include "game/client/Client.h" +#include "client/Client.h" namespace td { namespace gui { diff --git a/src/render/gui/FrameMenu.cpp b/src/client/render/gui/FrameMenu.cpp similarity index 84% rename from src/render/gui/FrameMenu.cpp rename to src/client/render/gui/FrameMenu.cpp index eb433bc..95d3708 100644 --- a/src/render/gui/FrameMenu.cpp +++ b/src/client/render/gui/FrameMenu.cpp @@ -1,7 +1,7 @@ -#include "render/gui/FrameMenu.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/FrameMenu.h" +#include "client/render/gui/imgui/imgui.h" -#include "game/client/Client.h" +#include "client/Client.h" #include diff --git a/src/render/gui/GameMenu.cpp b/src/client/render/gui/GameMenu.cpp similarity index 92% rename from src/render/gui/GameMenu.cpp rename to src/client/render/gui/GameMenu.cpp index 78ed984..923ee48 100644 --- a/src/render/gui/GameMenu.cpp +++ b/src/client/render/gui/GameMenu.cpp @@ -1,11 +1,11 @@ -#include "render/gui/GameMenu.h" -#include "render/gui/imgui/imgui.h" -#include "render/gui/ImGuiTeamColor.h" +#include "client/render/gui/GameMenu.h" +#include "client/render/gui/imgui/imgui.h" +#include "client/render/gui/ImGuiTeamColor.h" -#include "render/WorldRenderer.h" +#include "client/render/WorldRenderer.h" -#include "game/client/Client.h" -#include "game/server/Lobby.h" +#include "client/Client.h" +#include "server/Lobby.h" namespace td { namespace gui { diff --git a/src/render/gui/ImGuiTeamColor.cpp b/src/client/render/gui/ImGuiTeamColor.cpp similarity index 88% rename from src/render/gui/ImGuiTeamColor.cpp rename to src/client/render/gui/ImGuiTeamColor.cpp index 309c041..733075f 100644 --- a/src/render/gui/ImGuiTeamColor.cpp +++ b/src/client/render/gui/ImGuiTeamColor.cpp @@ -1,4 +1,4 @@ -#include "render/gui/ImGuiTeamColor.h" +#include "client/render/gui/ImGuiTeamColor.h" namespace td { namespace render { diff --git a/src/render/gui/LifeProgress.cpp b/src/client/render/gui/LifeProgress.cpp similarity index 75% rename from src/render/gui/LifeProgress.cpp rename to src/client/render/gui/LifeProgress.cpp index 1670acb..b846f31 100644 --- a/src/render/gui/LifeProgress.cpp +++ b/src/client/render/gui/LifeProgress.cpp @@ -1,6 +1,6 @@ -#include "render/gui/LifeProgress.h" +#include "client/render/gui/LifeProgress.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" namespace td { namespace gui { diff --git a/src/render/gui/MainMenu.cpp b/src/client/render/gui/MainMenu.cpp similarity index 96% rename from src/render/gui/MainMenu.cpp rename to src/client/render/gui/MainMenu.cpp index 33ea679..ed20e31 100644 --- a/src/render/gui/MainMenu.cpp +++ b/src/client/render/gui/MainMenu.cpp @@ -1,8 +1,8 @@ -#include "render/gui/MainMenu.h" +#include "client/render/gui/MainMenu.h" -#include "game/client/Client.h" +#include "client/Client.h" -#include "game/server/Server.h" +#include "server/Server.h" namespace td { namespace gui { diff --git a/src/render/gui/MobTooltip.cpp b/src/client/render/gui/MobTooltip.cpp similarity index 84% rename from src/render/gui/MobTooltip.cpp rename to src/client/render/gui/MobTooltip.cpp index 9adb67b..49e5534 100644 --- a/src/render/gui/MobTooltip.cpp +++ b/src/client/render/gui/MobTooltip.cpp @@ -1,13 +1,13 @@ -#include "render/gui/MobTooltip.h" -#include "render/gui/imgui/imgui.h" -#include "render/gui/LifeProgress.h" -#include "render/gui/ImGuiTeamColor.h" +#include "client/render/gui/MobTooltip.h" +#include "client/render/gui/imgui/imgui.h" +#include "client/render/gui/LifeProgress.h" +#include "client/render/gui/ImGuiTeamColor.h" -#include "render/WorldRenderer.h" +#include "client/render/WorldRenderer.h" -#include "game/Mobs.h" +#include "td/game/Mobs.h" -#include "game/client/Client.h" +#include "client/Client.h" namespace td { namespace gui { diff --git a/src/render/gui/SummonMenu.cpp b/src/client/render/gui/SummonMenu.cpp similarity index 95% rename from src/render/gui/SummonMenu.cpp rename to src/client/render/gui/SummonMenu.cpp index ac6195d..748e5be 100644 --- a/src/render/gui/SummonMenu.cpp +++ b/src/client/render/gui/SummonMenu.cpp @@ -1,6 +1,6 @@ -#include "render/gui/SummonMenu.h" -#include "game/client/Client.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/SummonMenu.h" +#include "client/Client.h" +#include "client/render/gui/imgui/imgui.h" namespace td { namespace gui { diff --git a/src/render/gui/TowerGui.cpp b/src/client/render/gui/TowerGui.cpp similarity index 86% rename from src/render/gui/TowerGui.cpp rename to src/client/render/gui/TowerGui.cpp index f8ea504..b4633a4 100644 --- a/src/render/gui/TowerGui.cpp +++ b/src/client/render/gui/TowerGui.cpp @@ -5,18 +5,18 @@ * Author: simon */ -#include "render/gui/TowerGui.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/TowerGui.h" +#include "client/render/gui/imgui/imgui.h" -#include "render/gui/MainMenu.h" -#include "render/gui/GameMenu.h" -#include "render/gui/FrameMenu.h" -#include "render/gui/UpdateMenu.h" +#include "client/render/gui/MainMenu.h" +#include "client/render/gui/GameMenu.h" +#include "client/render/gui/FrameMenu.h" +#include "client/render/gui/UpdateMenu.h" #include "imgui/imgui_impl_opengl3.h" #include "imgui/imgui_impl_sdl.h" -#include "game/client/Client.h" +#include "client/Client.h" namespace td { namespace render { diff --git a/src/render/gui/TowerPlacePopup.cpp b/src/client/render/gui/TowerPlacePopup.cpp similarity index 92% rename from src/render/gui/TowerPlacePopup.cpp rename to src/client/render/gui/TowerPlacePopup.cpp index 028e598..5369878 100644 --- a/src/render/gui/TowerPlacePopup.cpp +++ b/src/client/render/gui/TowerPlacePopup.cpp @@ -1,10 +1,10 @@ -#include "render/gui/TowerPlacePopup.h" +#include "client/render/gui/TowerPlacePopup.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" -#include "game/Towers.h" +#include "td/game/Towers.h" -#include "game/client/Client.h" +#include "client/Client.h" namespace td { namespace gui { diff --git a/src/render/gui/TowerUpgradePopup.cpp b/src/client/render/gui/TowerUpgradePopup.cpp similarity index 94% rename from src/render/gui/TowerUpgradePopup.cpp rename to src/client/render/gui/TowerUpgradePopup.cpp index 16a3392..8a1b1da 100644 --- a/src/render/gui/TowerUpgradePopup.cpp +++ b/src/client/render/gui/TowerUpgradePopup.cpp @@ -1,10 +1,10 @@ -#include "render/gui/TowerUpgradePopup.h" +#include "client/render/gui/TowerUpgradePopup.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" -#include "game/Towers.h" +#include "td/game/Towers.h" -#include "game/client/Client.h" +#include "client/Client.h" namespace td { namespace gui { diff --git a/src/render/gui/UpdateMenu.cpp b/src/client/render/gui/UpdateMenu.cpp similarity index 95% rename from src/render/gui/UpdateMenu.cpp rename to src/client/render/gui/UpdateMenu.cpp index c8f1ce4..b9824ba 100644 --- a/src/render/gui/UpdateMenu.cpp +++ b/src/client/render/gui/UpdateMenu.cpp @@ -1,8 +1,8 @@ -#include "render/gui/UpdateMenu.h" +#include "client/render/gui/UpdateMenu.h" -#include "updater/Updater.h" +#include "client/updater/Updater.h" -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #include diff --git a/src/render/gui/imgui/Dirent/dirent.h b/src/client/render/gui/imgui/Dirent/dirent.h similarity index 100% rename from src/render/gui/imgui/Dirent/dirent.h rename to src/client/render/gui/imgui/Dirent/dirent.h diff --git a/src/render/gui/imgui/imgui.cpp b/src/client/render/gui/imgui/imgui.cpp similarity index 99% rename from src/render/gui/imgui/imgui.cpp rename to src/client/render/gui/imgui/imgui.cpp index f45b654..8f4fbd2 100644 --- a/src/render/gui/imgui/imgui.cpp +++ b/src/client/render/gui/imgui/imgui.cpp @@ -776,7 +776,7 @@ CODE #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #ifndef IMGUI_DISABLE #ifndef IMGUI_DEFINE_MATH_OPERATORS diff --git a/src/render/gui/imgui/imgui_demo.cpp b/src/client/render/gui/imgui/imgui_demo.cpp similarity index 99% rename from src/render/gui/imgui/imgui_demo.cpp rename to src/client/render/gui/imgui/imgui_demo.cpp index 9c44514..a6c8ab0 100644 --- a/src/render/gui/imgui/imgui_demo.cpp +++ b/src/client/render/gui/imgui/imgui_demo.cpp @@ -75,7 +75,7 @@ Index of this file: #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #ifndef IMGUI_DISABLE // System includes diff --git a/src/render/gui/imgui/imgui_draw.cpp b/src/client/render/gui/imgui/imgui_draw.cpp similarity index 99% rename from src/render/gui/imgui/imgui_draw.cpp rename to src/client/render/gui/imgui/imgui_draw.cpp index fcd27ea..0dd6b22 100644 --- a/src/render/gui/imgui/imgui_draw.cpp +++ b/src/client/render/gui/imgui/imgui_draw.cpp @@ -26,7 +26,7 @@ Index of this file: #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #ifndef IMGUI_DISABLE #ifndef IMGUI_DEFINE_MATH_OPERATORS @@ -35,7 +35,7 @@ Index of this file: #include "imgui_internal.h" #ifdef IMGUI_ENABLE_FREETYPE -#include "misc/freetype/imgui_freetype.h" +#include "td/misc/freetype/imgui_freetype.h" #endif #include // vsnprintf, sscanf, printf diff --git a/src/render/gui/imgui/imgui_filebrowser.cpp b/src/client/render/gui/imgui/imgui_filebrowser.cpp similarity index 97% rename from src/render/gui/imgui/imgui_filebrowser.cpp rename to src/client/render/gui/imgui/imgui_filebrowser.cpp index 509a3be..ba26889 100644 --- a/src/render/gui/imgui/imgui_filebrowser.cpp +++ b/src/client/render/gui/imgui/imgui_filebrowser.cpp @@ -1,4 +1,4 @@ -#include "render/gui/imgui/imgui_filebrowser.h" +#include "client/render/gui/imgui/imgui_filebrowser.h" #ifndef IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS #endif diff --git a/src/render/gui/imgui/imgui_impl_opengl3.cpp b/src/client/render/gui/imgui/imgui_impl_opengl3.cpp similarity index 99% rename from src/render/gui/imgui/imgui_impl_opengl3.cpp rename to src/client/render/gui/imgui/imgui_impl_opengl3.cpp index f663e3a..d20d5f9 100755 --- a/src/render/gui/imgui/imgui_impl_opengl3.cpp +++ b/src/client/render/gui/imgui/imgui_impl_opengl3.cpp @@ -71,7 +71,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #include "imgui_impl_opengl3.h" #include #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier diff --git a/src/render/gui/imgui/imgui_impl_opengl3.h b/src/client/render/gui/imgui/imgui_impl_opengl3.h similarity index 98% rename from src/render/gui/imgui/imgui_impl_opengl3.h rename to src/client/render/gui/imgui/imgui_impl_opengl3.h index eb30421..8338201 100755 --- a/src/render/gui/imgui/imgui_impl_opengl3.h +++ b/src/client/render/gui/imgui/imgui_impl_opengl3.h @@ -22,7 +22,7 @@ // Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp. #pragma once -#include "render/gui/imgui/imgui.h" // IMGUI_IMPL_API +#include "client/render/gui/imgui/imgui.h" // IMGUI_IMPL_API // Backend API IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL); diff --git a/src/render/gui/imgui/imgui_impl_sdl.cpp b/src/client/render/gui/imgui/imgui_impl_sdl.cpp similarity index 99% rename from src/render/gui/imgui/imgui_impl_sdl.cpp rename to src/client/render/gui/imgui/imgui_impl_sdl.cpp index b4b44de..fb2b892 100644 --- a/src/render/gui/imgui/imgui_impl_sdl.cpp +++ b/src/client/render/gui/imgui/imgui_impl_sdl.cpp @@ -50,7 +50,7 @@ // 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1). // 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers. -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #include "imgui_impl_sdl.h" // SDL diff --git a/src/render/gui/imgui/imgui_impl_sdl.h b/src/client/render/gui/imgui/imgui_impl_sdl.h similarity index 96% rename from src/render/gui/imgui/imgui_impl_sdl.h rename to src/client/render/gui/imgui/imgui_impl_sdl.h index aacd7f3..79678f3 100644 --- a/src/render/gui/imgui/imgui_impl_sdl.h +++ b/src/client/render/gui/imgui/imgui_impl_sdl.h @@ -16,7 +16,7 @@ // Read online: https://github.com/ocornut/imgui/tree/master/docs #pragma once -#include "render/gui/imgui/imgui.h" // IMGUI_IMPL_API +#include "client/render/gui/imgui/imgui.h" // IMGUI_IMPL_API struct SDL_Window; typedef union SDL_Event SDL_Event; diff --git a/src/render/gui/imgui/imgui_internal.h b/src/client/render/gui/imgui/imgui_internal.h similarity index 99% rename from src/render/gui/imgui/imgui_internal.h rename to src/client/render/gui/imgui/imgui_internal.h index 8b75994..9f2e35b 100644 --- a/src/render/gui/imgui/imgui_internal.h +++ b/src/client/render/gui/imgui/imgui_internal.h @@ -44,7 +44,7 @@ Index of this file: //----------------------------------------------------------------------------- #ifndef IMGUI_VERSION -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #endif #include // FILE*, sscanf diff --git a/src/render/gui/imgui/imgui_tables.cpp b/src/client/render/gui/imgui/imgui_tables.cpp similarity index 99% rename from src/render/gui/imgui/imgui_tables.cpp rename to src/client/render/gui/imgui/imgui_tables.cpp index 240ada1..1c47e46 100644 --- a/src/render/gui/imgui/imgui_tables.cpp +++ b/src/client/render/gui/imgui/imgui_tables.cpp @@ -188,7 +188,7 @@ Index of this file: #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #ifndef IMGUI_DISABLE #ifndef IMGUI_DEFINE_MATH_OPERATORS diff --git a/src/render/gui/imgui/imgui_widgets.cpp b/src/client/render/gui/imgui/imgui_widgets.cpp similarity index 99% rename from src/render/gui/imgui/imgui_widgets.cpp rename to src/client/render/gui/imgui/imgui_widgets.cpp index 8c26ef2..d0be141 100644 --- a/src/render/gui/imgui/imgui_widgets.cpp +++ b/src/client/render/gui/imgui/imgui_widgets.cpp @@ -32,7 +32,7 @@ Index of this file: #define _CRT_SECURE_NO_WARNINGS #endif -#include "render/gui/imgui/imgui.h" +#include "client/render/gui/imgui/imgui.h" #ifndef IMGUI_DISABLE #ifndef IMGUI_DEFINE_MATH_OPERATORS diff --git a/src/render/gui/imgui/imstb_rectpack.h b/src/client/render/gui/imgui/imstb_rectpack.h similarity index 100% rename from src/render/gui/imgui/imstb_rectpack.h rename to src/client/render/gui/imgui/imstb_rectpack.h diff --git a/src/render/gui/imgui/imstb_textedit.h b/src/client/render/gui/imgui/imstb_textedit.h similarity index 100% rename from src/render/gui/imgui/imstb_textedit.h rename to src/client/render/gui/imgui/imstb_textedit.h diff --git a/src/render/gui/imgui/imstb_truetype.h b/src/client/render/gui/imgui/imstb_truetype.h similarity index 100% rename from src/render/gui/imgui/imstb_truetype.h rename to src/client/render/gui/imgui/imstb_truetype.h diff --git a/src/render/loader/GLLoader.cpp b/src/client/render/loader/GLLoader.cpp similarity index 96% rename from src/render/loader/GLLoader.cpp rename to src/client/render/loader/GLLoader.cpp index 360372e..6467cbb 100644 --- a/src/render/loader/GLLoader.cpp +++ b/src/client/render/loader/GLLoader.cpp @@ -6,8 +6,8 @@ */ -#include "render/loader/GLLoader.h" -#include "render/GL.h" +#include "client/render/loader/GLLoader.h" +#include "client/render/GL.h" namespace GL { diff --git a/src/render/loader/TextureLoader.cpp b/src/client/render/loader/TextureLoader.cpp similarity index 89% rename from src/render/loader/TextureLoader.cpp rename to src/client/render/loader/TextureLoader.cpp index 81dc821..08c7e7f 100644 --- a/src/render/loader/TextureLoader.cpp +++ b/src/client/render/loader/TextureLoader.cpp @@ -5,11 +5,11 @@ * Author: simon */ -#include "render/loader/TextureLoader.h" +#include "client/render/loader/TextureLoader.h" #define STB_IMAGE_IMPLEMENTATION -#include "render/loader/stb_image.h" +#include "client/render/loader/stb_image.h" #include -#include "render/GL.h" +#include "client/render/GL.h" namespace TextureLoader { diff --git a/src/render/loader/WorldLoader.cpp b/src/client/render/loader/WorldLoader.cpp similarity index 98% rename from src/render/loader/WorldLoader.cpp rename to src/client/render/loader/WorldLoader.cpp index 55cf311..16d4f43 100644 --- a/src/render/loader/WorldLoader.cpp +++ b/src/client/render/loader/WorldLoader.cpp @@ -1,9 +1,9 @@ -#include "render/loader/WorldLoader.h" +#include "client/render/loader/WorldLoader.h" #include #include -#include "game/BaseGame.h" +#include "td/game/BaseGame.h" namespace td { namespace render { diff --git a/src/render/shaders/EntityShader.cpp b/src/client/render/shaders/EntityShader.cpp similarity index 98% rename from src/render/shaders/EntityShader.cpp rename to src/client/render/shaders/EntityShader.cpp index fd7de6a..2b2e3e8 100644 --- a/src/render/shaders/EntityShader.cpp +++ b/src/client/render/shaders/EntityShader.cpp @@ -1,4 +1,4 @@ -#include "render/shaders/EntityShader.h" +#include "client/render/shaders/EntityShader.h" namespace td { namespace shader { diff --git a/src/render/shaders/ShaderProgram.cpp b/src/client/render/shaders/ShaderProgram.cpp similarity index 97% rename from src/render/shaders/ShaderProgram.cpp rename to src/client/render/shaders/ShaderProgram.cpp index bc94a15..d4a1e34 100755 --- a/src/render/shaders/ShaderProgram.cpp +++ b/src/client/render/shaders/ShaderProgram.cpp @@ -5,9 +5,9 @@ * Author: simon */ -#include "render/shaders/ShaderProgram.h" -#include "misc/Log.h" -#include "misc/Format.h" +#include "client/render/shaders/ShaderProgram.h" +#include "td/misc/Log.h" +#include "td/misc/Format.h" #include #include diff --git a/src/render/shaders/WorldShader.cpp b/src/client/render/shaders/WorldShader.cpp similarity index 97% rename from src/render/shaders/WorldShader.cpp rename to src/client/render/shaders/WorldShader.cpp index 630bc07..c6dec51 100644 --- a/src/render/shaders/WorldShader.cpp +++ b/src/client/render/shaders/WorldShader.cpp @@ -1,4 +1,4 @@ -#include "render/shaders/WorldShader.h" +#include "client/render/shaders/WorldShader.h" namespace td { namespace shader { diff --git a/src/updater/Updater.cpp b/src/client/updater/Updater.cpp similarity index 93% rename from src/updater/Updater.cpp rename to src/client/updater/Updater.cpp index 56fb45b..d7eb678 100644 --- a/src/updater/Updater.cpp +++ b/src/client/updater/Updater.cpp @@ -1,11 +1,11 @@ -#include "updater/Updater.h" +#include "client/updater/Updater.h" -#include "misc/Platform.h" -#include "misc/DataBuffer.h" -#include "misc/Log.h" -#include "misc/Format.h" +#include "td/misc/Platform.h" +#include "td/misc/DataBuffer.h" +#include "td/misc/Log.h" +#include "td/misc/Format.h" -#include "network/HttpLib.h" +#include "td/network/HttpLib.h" #ifdef _WIN32 #include diff --git a/src/window/Display.cpp b/src/client/window/Display.cpp similarity index 94% rename from src/window/Display.cpp rename to src/client/window/Display.cpp index a7bd2c2..294c500 100644 --- a/src/window/Display.cpp +++ b/src/client/window/Display.cpp @@ -5,16 +5,16 @@ * Author: simon */ -#include "window/Display.h" +#include "client/window/Display.h" #define GLFW_INCLUDE_NONE -#include "render/gui/TowerGui.h" +#include "client/render/gui/TowerGui.h" #include -#include "game/GameManager.h" -#include "render/Renderer.h" -#include "render/WorldRenderer.h" +#include "td/game/GameManager.h" +#include "client/render/Renderer.h" +#include "client/render/WorldRenderer.h" #include "../render/gui/imgui/imgui_impl_sdl.h" -#include "misc/Log.h" -#include "misc/Format.h" +#include "td/misc/Log.h" +#include "td/misc/Format.h" #include #include diff --git a/src/game/server/Lobby.cpp b/src/server/Lobby.cpp similarity index 92% rename from src/game/server/Lobby.cpp rename to src/server/Lobby.cpp index 3c6ced0..05d49ac 100644 --- a/src/game/server/Lobby.cpp +++ b/src/server/Lobby.cpp @@ -1,9 +1,9 @@ -#include "game/server/Lobby.h" -#include "game/server/Server.h" +#include "server/Lobby.h" +#include "server/Server.h" -#include "protocol/packets/UpdateLobbyTimePacket.h" +#include "td/protocol/packets/UpdateLobbyTimePacket.h" -#include "misc/Time.h" +#include "td/misc/Time.h" #ifdef NDEBUG #define MIN_PLAYER_WAITING 2 diff --git a/src/game/server/Server.cpp b/src/server/Server.cpp similarity index 93% rename from src/game/server/Server.cpp rename to src/server/Server.cpp index a32d83a..bd9e271 100644 --- a/src/game/server/Server.cpp +++ b/src/server/Server.cpp @@ -1,11 +1,11 @@ -#include "game/server/Server.h" -#include "protocol/PacketFactory.h" +#include "server/Server.h" +#include "td/protocol/PacketFactory.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/ServerTpsPacket.h" -#include "protocol/packets/PlayerLeavePacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/ServerTpsPacket.h" +#include "td/protocol/packets/PlayerLeavePacket.h" -#include "misc/Format.h" +#include "td/misc/Format.h" namespace td { namespace server { diff --git a/src/game/server/ServerConnexion.cpp b/src/server/ServerConnexion.cpp similarity index 86% rename from src/game/server/ServerConnexion.cpp rename to src/server/ServerConnexion.cpp index e6e0f2f..68c9e66 100644 --- a/src/game/server/ServerConnexion.cpp +++ b/src/server/ServerConnexion.cpp @@ -1,27 +1,27 @@ -#include "game/server/ServerConnexion.h" -#include "protocol/PacketDispatcher.h" -#include "protocol/PacketFactory.h" -#include "game/server/Server.h" +#include "server/ServerConnexion.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/protocol/PacketFactory.h" +#include "server/Server.h" -#include "protocol/packets/ConnectionInfoPacket.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/KeepAlivePacket.h" -#include "protocol/packets/PlaceTowerPacket.h" -#include "protocol/packets/PlayerLoginPacket.h" -#include "protocol/packets/PlayerJoinPacket.h" -#include "protocol/packets/PlayerListPacket.h" -#include "protocol/packets/RemoveTowerPacket.h" -#include "protocol/packets/SelectTeamPacket.h" -#include "protocol/packets/SendMobsPacket.h" -#include "protocol/packets/UpdatePlayerTeamPacket.h" -#include "protocol/packets/UpdateGameStatePacket.h" -#include "protocol/packets/UpgradeTowerPacket.h" -#include "protocol/packets/WorldBeginDataPacket.h" -#include "protocol/packets/WorldDataPacket.h" -#include "protocol/packets/WorldAddTowerPacket.h" +#include "td/protocol/packets/ConnectionInfoPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/KeepAlivePacket.h" +#include "td/protocol/packets/PlaceTowerPacket.h" +#include "td/protocol/packets/PlayerLoginPacket.h" +#include "td/protocol/packets/PlayerJoinPacket.h" +#include "td/protocol/packets/PlayerListPacket.h" +#include "td/protocol/packets/RemoveTowerPacket.h" +#include "td/protocol/packets/SelectTeamPacket.h" +#include "td/protocol/packets/SendMobsPacket.h" +#include "td/protocol/packets/UpdatePlayerTeamPacket.h" +#include "td/protocol/packets/UpdateGameStatePacket.h" +#include "td/protocol/packets/UpgradeTowerPacket.h" +#include "td/protocol/packets/WorldBeginDataPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" +#include "td/protocol/packets/WorldAddTowerPacket.h" -#include "misc/Time.h" -#include "misc/Random.h" +#include "td/misc/Time.h" +#include "td/misc/Random.h" #include diff --git a/src/game/server/ServerGame.cpp b/src/server/game/ServerGame.cpp similarity index 87% rename from src/game/server/ServerGame.cpp rename to src/server/game/ServerGame.cpp index 99b8a22..5d70b0c 100644 --- a/src/game/server/ServerGame.cpp +++ b/src/server/game/ServerGame.cpp @@ -1,14 +1,14 @@ -#include "game/server/ServerGame.h" -#include "game/server/Server.h" +#include "server/game/ServerGame.h" +#include "server/Server.h" -#include "protocol/packets/DisconnectPacket.h" -#include "protocol/packets/UpdatePlayerTeamPacket.h" -#include "protocol/packets/UpdateGameStatePacket.h" -#include "protocol/packets/UpdateMoneyPacket.h" -#include "protocol/packets/UpdateExpPacket.h" -#include "protocol/packets/UpdateMobStatesPacket.h" -#include "protocol/packets/WorldDataPacket.h" -#include "protocol/packets/WorldBeginDataPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/UpdatePlayerTeamPacket.h" +#include "td/protocol/packets/UpdateGameStatePacket.h" +#include "td/protocol/packets/UpdateMoneyPacket.h" +#include "td/protocol/packets/UpdateExpPacket.h" +#include "td/protocol/packets/UpdateMobStatesPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" +#include "td/protocol/packets/WorldBeginDataPacket.h" namespace td { namespace server { diff --git a/src/game/server/ServerWorld.cpp b/src/server/game/ServerWorld.cpp similarity index 93% rename from src/game/server/ServerWorld.cpp rename to src/server/game/ServerWorld.cpp index 4e052f1..9160b1c 100644 --- a/src/game/server/ServerWorld.cpp +++ b/src/server/game/ServerWorld.cpp @@ -1,9 +1,9 @@ -#include "game/server/ServerWorld.h" -#include "game/server/Server.h" -#include "misc/Random.h" +#include "server/game/ServerWorld.h" +#include "server/Server.h" +#include "td/misc/Random.h" -#include "protocol/packets/SpawnMobPacket.h" -#include "protocol/packets/UpdateCastleLifePacket.h" +#include "td/protocol/packets/SpawnMobPacket.h" +#include "td/protocol/packets/UpdateCastleLifePacket.h" #define MOB_SPAWN_PRECISION 100.0f diff --git a/src/game/BaseGame.cpp b/src/td/game/BaseGame.cpp similarity index 94% rename from src/game/BaseGame.cpp rename to src/td/game/BaseGame.cpp index 275bd66..4673fdd 100644 --- a/src/game/BaseGame.cpp +++ b/src/td/game/BaseGame.cpp @@ -1,4 +1,4 @@ -#include "game/BaseGame.h" +#include "td/game/BaseGame.h" namespace td { namespace game { diff --git a/src/game/Mobs.cpp b/src/td/game/Mobs.cpp similarity index 99% rename from src/game/Mobs.cpp rename to src/td/game/Mobs.cpp index dff0472..0cd3641 100644 --- a/src/game/Mobs.cpp +++ b/src/td/game/Mobs.cpp @@ -1,6 +1,6 @@ -#include "game/Mobs.h" -#include "game/Player.h" -#include "game/World.h" +#include "td/game/Mobs.h" +#include "td/game/Player.h" +#include "td/game/World.h" #include #include diff --git a/src/game/Team.cpp b/src/td/game/Team.cpp similarity index 94% rename from src/game/Team.cpp rename to src/td/game/Team.cpp index e236d76..1bd32eb 100644 --- a/src/game/Team.cpp +++ b/src/td/game/Team.cpp @@ -1,4 +1,4 @@ -#include "game/Player.h" +#include "td/game/Player.h" #include diff --git a/src/game/Towers.cpp b/src/td/game/Towers.cpp similarity index 99% rename from src/game/Towers.cpp rename to src/td/game/Towers.cpp index f8bced2..bc764d7 100644 --- a/src/game/Towers.cpp +++ b/src/td/game/Towers.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" #include diff --git a/src/game/World.cpp b/src/td/game/World.cpp similarity index 96% rename from src/game/World.cpp rename to src/td/game/World.cpp index fd131b0..2718efd 100644 --- a/src/game/World.cpp +++ b/src/td/game/World.cpp @@ -1,12 +1,12 @@ -#include "game/World.h" -#include "protocol/PacketDispatcher.h" -#include "protocol/Protocol.h" -#include "protocol/packets/WorldBeginDataPacket.h" -#include "protocol/packets/WorldDataPacket.h" -#include "game/BaseGame.h" -#include "misc/Random.h" -#include "misc/Compression.h" -#include "misc/Format.h" +#include "td/game/World.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/protocol/Protocol.h" +#include "td/protocol/packets/WorldBeginDataPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" +#include "td/game/BaseGame.h" +#include "td/misc/Random.h" +#include "td/misc/Compression.h" +#include "td/misc/Format.h" #include diff --git a/src/game/towers/ArcherTower.cpp b/src/td/game/towers/ArcherTower.cpp similarity index 91% rename from src/game/towers/ArcherTower.cpp rename to src/td/game/towers/ArcherTower.cpp index 9bad50f..622ca12 100644 --- a/src/game/towers/ArcherTower.cpp +++ b/src/td/game/towers/ArcherTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/ArtilleryTower.cpp b/src/td/game/towers/ArtilleryTower.cpp similarity index 71% rename from src/game/towers/ArtilleryTower.cpp rename to src/td/game/towers/ArtilleryTower.cpp index ee0e488..767f6cb 100644 --- a/src/game/towers/ArtilleryTower.cpp +++ b/src/td/game/towers/ArtilleryTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/IceTower.cpp b/src/td/game/towers/IceTower.cpp similarity index 90% rename from src/game/towers/IceTower.cpp rename to src/td/game/towers/IceTower.cpp index 3a79c60..17b4ec7 100644 --- a/src/game/towers/IceTower.cpp +++ b/src/td/game/towers/IceTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/LeachTower.cpp b/src/td/game/towers/LeachTower.cpp similarity index 70% rename from src/game/towers/LeachTower.cpp rename to src/td/game/towers/LeachTower.cpp index 35f07c8..338e3f5 100644 --- a/src/game/towers/LeachTower.cpp +++ b/src/td/game/towers/LeachTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/MageTower.cpp b/src/td/game/towers/MageTower.cpp similarity index 86% rename from src/game/towers/MageTower.cpp rename to src/td/game/towers/MageTower.cpp index 7501eb4..67111f3 100644 --- a/src/game/towers/MageTower.cpp +++ b/src/td/game/towers/MageTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/Necromancer.cpp b/src/td/game/towers/Necromancer.cpp similarity index 71% rename from src/game/towers/Necromancer.cpp rename to src/td/game/towers/Necromancer.cpp index 1fc1715..f8f17b0 100644 --- a/src/game/towers/Necromancer.cpp +++ b/src/td/game/towers/Necromancer.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/PoisonTower.cpp b/src/td/game/towers/PoisonTower.cpp similarity index 94% rename from src/game/towers/PoisonTower.cpp rename to src/td/game/towers/PoisonTower.cpp index 515152c..a40be73 100644 --- a/src/game/towers/PoisonTower.cpp +++ b/src/td/game/towers/PoisonTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/QuakeTower.cpp b/src/td/game/towers/QuakeTower.cpp similarity index 70% rename from src/game/towers/QuakeTower.cpp rename to src/td/game/towers/QuakeTower.cpp index 98aea48..4d32dd3 100644 --- a/src/game/towers/QuakeTower.cpp +++ b/src/td/game/towers/QuakeTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/SorcererTower.cpp b/src/td/game/towers/SorcererTower.cpp similarity index 71% rename from src/game/towers/SorcererTower.cpp rename to src/td/game/towers/SorcererTower.cpp index ac7cf10..4bdd1aa 100644 --- a/src/game/towers/SorcererTower.cpp +++ b/src/td/game/towers/SorcererTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/TurretTower.cpp b/src/td/game/towers/TurretTower.cpp similarity index 71% rename from src/game/towers/TurretTower.cpp rename to src/td/game/towers/TurretTower.cpp index 8cee3c6..30141c6 100644 --- a/src/game/towers/TurretTower.cpp +++ b/src/td/game/towers/TurretTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/game/towers/ZeusTower.cpp b/src/td/game/towers/ZeusTower.cpp similarity index 70% rename from src/game/towers/ZeusTower.cpp rename to src/td/game/towers/ZeusTower.cpp index 58332a6..0159f96 100644 --- a/src/game/towers/ZeusTower.cpp +++ b/src/td/game/towers/ZeusTower.cpp @@ -1,5 +1,5 @@ -#include "game/Towers.h" -#include "game/World.h" +#include "td/game/Towers.h" +#include "td/game/World.h" namespace td { namespace game { diff --git a/src/misc/Compression.cpp b/src/td/misc/Compression.cpp similarity index 98% rename from src/misc/Compression.cpp rename to src/td/misc/Compression.cpp index a69acb1..c854c14 100644 --- a/src/misc/Compression.cpp +++ b/src/td/misc/Compression.cpp @@ -1,4 +1,4 @@ -#include "misc/Compression.h" +#include "td/misc/Compression.h" #include #include diff --git a/src/misc/DataBuffer.cpp b/src/td/misc/DataBuffer.cpp similarity index 98% rename from src/misc/DataBuffer.cpp rename to src/td/misc/DataBuffer.cpp index d020f9e..170ffa3 100644 --- a/src/misc/DataBuffer.cpp +++ b/src/td/misc/DataBuffer.cpp @@ -1,4 +1,4 @@ -#include "misc/DataBuffer.h" +#include "td/misc/DataBuffer.h" #include #include diff --git a/src/misc/Easing.cpp b/src/td/misc/Easing.cpp similarity index 99% rename from src/misc/Easing.cpp rename to src/td/misc/Easing.cpp index cd189a3..5adba42 100644 --- a/src/misc/Easing.cpp +++ b/src/td/misc/Easing.cpp @@ -1,4 +1,4 @@ -#include "misc/Easing.h" +#include "td/misc/Easing.h" #include diff --git a/src/misc/Log.cpp b/src/td/misc/Log.cpp similarity index 95% rename from src/misc/Log.cpp rename to src/td/misc/Log.cpp index fb489ac..00e7123 100644 --- a/src/misc/Log.cpp +++ b/src/td/misc/Log.cpp @@ -1,4 +1,4 @@ -#include "misc/Log.h" +#include "td/misc/Log.h" #ifdef __ANDROID__ #include diff --git a/src/misc/Maths.cpp b/src/td/misc/Maths.cpp similarity index 99% rename from src/misc/Maths.cpp rename to src/td/misc/Maths.cpp index b3b3aa3..d16331b 100644 --- a/src/misc/Maths.cpp +++ b/src/td/misc/Maths.cpp @@ -1,4 +1,4 @@ -#include "misc/Maths.h" +#include "td/misc/Maths.h" #include diff --git a/src/misc/Shapes.cpp b/src/td/misc/Shapes.cpp similarity index 98% rename from src/misc/Shapes.cpp rename to src/td/misc/Shapes.cpp index b18bd1a..34fdc01 100644 --- a/src/misc/Shapes.cpp +++ b/src/td/misc/Shapes.cpp @@ -1,4 +1,4 @@ -#include "misc/Shapes.h" +#include "td/misc/Shapes.h" #include #include diff --git a/src/misc/Time.cpp b/src/td/misc/Time.cpp similarity index 98% rename from src/misc/Time.cpp rename to src/td/misc/Time.cpp index 0064eee..f7e3fa9 100644 --- a/src/misc/Time.cpp +++ b/src/td/misc/Time.cpp @@ -1,4 +1,4 @@ -#include "misc/Time.h" +#include "td/misc/Time.h" #include #include diff --git a/src/game/Connexion.cpp b/src/td/network/Connexion.cpp similarity index 89% rename from src/game/Connexion.cpp rename to src/td/network/Connexion.cpp index ccd6c62..0fe211b 100644 --- a/src/game/Connexion.cpp +++ b/src/td/network/Connexion.cpp @@ -1,10 +1,9 @@ -#include "game/Connexion.h" -#include "protocol/PacketDispatcher.h" -#include "protocol/PacketFactory.h" -#include "game/server/Server.h" -#include "misc/Compression.h" +#include "td/network/Connexion.h" +#include "td/protocol/PacketDispatcher.h" +#include "td/protocol/PacketFactory.h" +#include "td/misc/Compression.h" -#include "misc/Time.h" +#include "td/misc/Time.h" #include #include diff --git a/src/network/IPAddress.cpp b/src/td/network/IPAddress.cpp similarity index 98% rename from src/network/IPAddress.cpp rename to src/td/network/IPAddress.cpp index c5983f1..69829ca 100644 --- a/src/network/IPAddress.cpp +++ b/src/td/network/IPAddress.cpp @@ -1,4 +1,4 @@ -#include "network/IPAddress.h" +#include "td/network/IPAddress.h" #include #include diff --git a/src/network/Network.cpp b/src/td/network/Network.cpp similarity index 97% rename from src/network/Network.cpp rename to src/td/network/Network.cpp index aa85e42..13d2da3 100644 --- a/src/network/Network.cpp +++ b/src/td/network/Network.cpp @@ -1,4 +1,4 @@ -#include "network/Network.h" +#include "td/network/Network.h" namespace td { namespace network { diff --git a/src/network/Socket.cpp b/src/td/network/Socket.cpp similarity index 93% rename from src/network/Socket.cpp rename to src/td/network/Socket.cpp index 3a6ab27..3843f42 100644 --- a/src/network/Socket.cpp +++ b/src/td/network/Socket.cpp @@ -1,7 +1,7 @@ -#include "network/Socket.h" +#include "td/network/Socket.h" -#include "network/IPAddress.h" -#include "network/Network.h" +#include "td/network/IPAddress.h" +#include "td/network/Network.h" #ifdef _WIN32 #define ioctl ioctlsocket diff --git a/src/network/TCPListener.cpp b/src/td/network/TCPListener.cpp similarity index 97% rename from src/network/TCPListener.cpp rename to src/td/network/TCPListener.cpp index 5ef8123..dd02106 100644 --- a/src/network/TCPListener.cpp +++ b/src/td/network/TCPListener.cpp @@ -1,4 +1,4 @@ -#include "network/TCPListener.h" +#include "td/network/TCPListener.h" #include diff --git a/src/network/TCPSocket.cpp b/src/td/network/TCPSocket.cpp similarity index 98% rename from src/network/TCPSocket.cpp rename to src/td/network/TCPSocket.cpp index 2a60d8c..68cef67 100644 --- a/src/network/TCPSocket.cpp +++ b/src/td/network/TCPSocket.cpp @@ -1,5 +1,5 @@ -#include "network/TCPSocket.h" -#include "misc/Compression.h" +#include "td/network/TCPSocket.h" +#include "td/misc/Compression.h" #include diff --git a/src/network/UDPSocket.cpp b/src/td/network/UDPSocket.cpp similarity index 98% rename from src/network/UDPSocket.cpp rename to src/td/network/UDPSocket.cpp index 93f0950..30d274f 100644 --- a/src/network/UDPSocket.cpp +++ b/src/td/network/UDPSocket.cpp @@ -1,4 +1,4 @@ -#include "network/UDPSocket.h" +#include "td/network/UDPSocket.h" #include diff --git a/src/protocol/PacketDispatcher.cpp b/src/td/protocol/PacketDispatcher.cpp similarity index 96% rename from src/protocol/PacketDispatcher.cpp rename to src/td/protocol/PacketDispatcher.cpp index a6fefac..204e237 100644 --- a/src/protocol/PacketDispatcher.cpp +++ b/src/td/protocol/PacketDispatcher.cpp @@ -1,4 +1,4 @@ -#include "protocol/PacketDispatcher.h" +#include "td/protocol/PacketDispatcher.h" namespace td { namespace protocol { diff --git a/src/protocol/PacketFactory.cpp b/src/td/protocol/PacketFactory.cpp similarity index 97% rename from src/protocol/PacketFactory.cpp rename to src/td/protocol/PacketFactory.cpp index 7eab92a..c02de1d 100644 --- a/src/protocol/PacketFactory.cpp +++ b/src/td/protocol/PacketFactory.cpp @@ -1,5 +1,5 @@ -#include "protocol/PacketFactory.h" -#include "protocol/Packets.h" +#include "td/protocol/PacketFactory.h" +#include "td/protocol/Packets.h" #include #include diff --git a/src/protocol/Protocol.cpp b/src/td/protocol/Protocol.cpp similarity index 95% rename from src/protocol/Protocol.cpp rename to src/td/protocol/Protocol.cpp index 0d208ab..1e2651e 100644 --- a/src/protocol/Protocol.cpp +++ b/src/td/protocol/Protocol.cpp @@ -1,5 +1,5 @@ -#include "protocol/PacketHandler.h" -#include "protocol/Packets.h" +#include "td/protocol/PacketHandler.h" +#include "td/protocol/Packets.h" #define REGISTER_DISPATCH_CLASS(className) void className::Dispatch(PacketHandler* handler) const { \ handler->HandlePacket(this);\ diff --git a/src/protocol/packets/ConnectionInfoPacket.cpp b/src/td/protocol/packets/ConnectionInfoPacket.cpp similarity index 85% rename from src/protocol/packets/ConnectionInfoPacket.cpp rename to src/td/protocol/packets/ConnectionInfoPacket.cpp index 276b686..1f9ad93 100644 --- a/src/protocol/packets/ConnectionInfoPacket.cpp +++ b/src/td/protocol/packets/ConnectionInfoPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/ConnectionInfoPacket.h" +#include "td/protocol/packets/ConnectionInfoPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/DisconnectPacket.cpp b/src/td/protocol/packets/DisconnectPacket.cpp similarity index 85% rename from src/protocol/packets/DisconnectPacket.cpp rename to src/td/protocol/packets/DisconnectPacket.cpp index 63527fd..1a37460 100644 --- a/src/protocol/packets/DisconnectPacket.cpp +++ b/src/td/protocol/packets/DisconnectPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/DisconnectPacket.h" +#include "td/protocol/packets/DisconnectPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/KeepAlivePacket.cpp b/src/td/protocol/packets/KeepAlivePacket.cpp similarity index 86% rename from src/protocol/packets/KeepAlivePacket.cpp rename to src/td/protocol/packets/KeepAlivePacket.cpp index a9cfa56..798265f 100644 --- a/src/protocol/packets/KeepAlivePacket.cpp +++ b/src/td/protocol/packets/KeepAlivePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/KeepAlivePacket.h" +#include "td/protocol/packets/KeepAlivePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlaceTowerPacket.cpp b/src/td/protocol/packets/PlaceTowerPacket.cpp similarity index 87% rename from src/protocol/packets/PlaceTowerPacket.cpp rename to src/td/protocol/packets/PlaceTowerPacket.cpp index f604042..10d81b0 100644 --- a/src/protocol/packets/PlaceTowerPacket.cpp +++ b/src/td/protocol/packets/PlaceTowerPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlaceTowerPacket.h" +#include "td/protocol/packets/PlaceTowerPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerBuyItemPacket.cpp b/src/td/protocol/packets/PlayerBuyItemPacket.cpp similarity index 86% rename from src/protocol/packets/PlayerBuyItemPacket.cpp rename to src/td/protocol/packets/PlayerBuyItemPacket.cpp index e985822..41ea3cd 100644 --- a/src/protocol/packets/PlayerBuyItemPacket.cpp +++ b/src/td/protocol/packets/PlayerBuyItemPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerBuyItemPacket.h" +#include "td/protocol/packets/PlayerBuyItemPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerBuyMobUpgradePacket.cpp b/src/td/protocol/packets/PlayerBuyMobUpgradePacket.cpp similarity index 85% rename from src/protocol/packets/PlayerBuyMobUpgradePacket.cpp rename to src/td/protocol/packets/PlayerBuyMobUpgradePacket.cpp index eb2c69d..1c01cf4 100644 --- a/src/protocol/packets/PlayerBuyMobUpgradePacket.cpp +++ b/src/td/protocol/packets/PlayerBuyMobUpgradePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerBuyMobUpgradePacket.h" +#include "td/protocol/packets/PlayerBuyMobUpgradePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerJoinPacket.cpp b/src/td/protocol/packets/PlayerJoinPacket.cpp similarity index 87% rename from src/protocol/packets/PlayerJoinPacket.cpp rename to src/td/protocol/packets/PlayerJoinPacket.cpp index ca22659..f2ccd2c 100644 --- a/src/protocol/packets/PlayerJoinPacket.cpp +++ b/src/td/protocol/packets/PlayerJoinPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerJoinPacket.h" +#include "td/protocol/packets/PlayerJoinPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerLeavePacket.cpp b/src/td/protocol/packets/PlayerLeavePacket.cpp similarity index 85% rename from src/protocol/packets/PlayerLeavePacket.cpp rename to src/td/protocol/packets/PlayerLeavePacket.cpp index eb5d733..a1118d4 100644 --- a/src/protocol/packets/PlayerLeavePacket.cpp +++ b/src/td/protocol/packets/PlayerLeavePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerLeavePacket.h" +#include "td/protocol/packets/PlayerLeavePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerListPacket.cpp b/src/td/protocol/packets/PlayerListPacket.cpp similarity index 93% rename from src/protocol/packets/PlayerListPacket.cpp rename to src/td/protocol/packets/PlayerListPacket.cpp index 9f1ed84..12d64ca 100644 --- a/src/protocol/packets/PlayerListPacket.cpp +++ b/src/td/protocol/packets/PlayerListPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerListPacket.h" +#include "td/protocol/packets/PlayerListPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/PlayerLoginPacket.cpp b/src/td/protocol/packets/PlayerLoginPacket.cpp similarity index 86% rename from src/protocol/packets/PlayerLoginPacket.cpp rename to src/td/protocol/packets/PlayerLoginPacket.cpp index 40c7c17..e14ec44 100644 --- a/src/protocol/packets/PlayerLoginPacket.cpp +++ b/src/td/protocol/packets/PlayerLoginPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/PlayerLoginPacket.h" +#include "td/protocol/packets/PlayerLoginPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/RemoveTowerPacket.cpp b/src/td/protocol/packets/RemoveTowerPacket.cpp similarity index 85% rename from src/protocol/packets/RemoveTowerPacket.cpp rename to src/td/protocol/packets/RemoveTowerPacket.cpp index e7b0845..a41c803 100644 --- a/src/protocol/packets/RemoveTowerPacket.cpp +++ b/src/td/protocol/packets/RemoveTowerPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/RemoveTowerPacket.h" +#include "td/protocol/packets/RemoveTowerPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/SelectTeamPacket.cpp b/src/td/protocol/packets/SelectTeamPacket.cpp similarity index 86% rename from src/protocol/packets/SelectTeamPacket.cpp rename to src/td/protocol/packets/SelectTeamPacket.cpp index 73e72a6..a2970a2 100644 --- a/src/protocol/packets/SelectTeamPacket.cpp +++ b/src/td/protocol/packets/SelectTeamPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/SelectTeamPacket.h" +#include "td/protocol/packets/SelectTeamPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/SendMobsPacket.cpp b/src/td/protocol/packets/SendMobsPacket.cpp similarity index 92% rename from src/protocol/packets/SendMobsPacket.cpp rename to src/td/protocol/packets/SendMobsPacket.cpp index 7460bc5..3760fa0 100644 --- a/src/protocol/packets/SendMobsPacket.cpp +++ b/src/td/protocol/packets/SendMobsPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/SendMobsPacket.h" +#include "td/protocol/packets/SendMobsPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/ServerTpsPacket.cpp b/src/td/protocol/packets/ServerTpsPacket.cpp similarity index 87% rename from src/protocol/packets/ServerTpsPacket.cpp rename to src/td/protocol/packets/ServerTpsPacket.cpp index 34e6547..01c6778 100644 --- a/src/protocol/packets/ServerTpsPacket.cpp +++ b/src/td/protocol/packets/ServerTpsPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/ServerTpsPacket.h" +#include "td/protocol/packets/ServerTpsPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/SpawnMobPacket.cpp b/src/td/protocol/packets/SpawnMobPacket.cpp similarity index 90% rename from src/protocol/packets/SpawnMobPacket.cpp rename to src/td/protocol/packets/SpawnMobPacket.cpp index 32c08a7..7ce2ee0 100644 --- a/src/protocol/packets/SpawnMobPacket.cpp +++ b/src/td/protocol/packets/SpawnMobPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/SpawnMobPacket.h" +#include "td/protocol/packets/SpawnMobPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateCastleLifePacket.cpp b/src/td/protocol/packets/UpdateCastleLifePacket.cpp similarity index 86% rename from src/protocol/packets/UpdateCastleLifePacket.cpp rename to src/td/protocol/packets/UpdateCastleLifePacket.cpp index 0195078..e23b906 100644 --- a/src/protocol/packets/UpdateCastleLifePacket.cpp +++ b/src/td/protocol/packets/UpdateCastleLifePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateCastleLifePacket.h" +#include "td/protocol/packets/UpdateCastleLifePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateExpPacket.cpp b/src/td/protocol/packets/UpdateExpPacket.cpp similarity index 86% rename from src/protocol/packets/UpdateExpPacket.cpp rename to src/td/protocol/packets/UpdateExpPacket.cpp index 3a2b5dd..690f924 100644 --- a/src/protocol/packets/UpdateExpPacket.cpp +++ b/src/td/protocol/packets/UpdateExpPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateExpPacket.h" +#include "td/protocol/packets/UpdateExpPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateGameStatePacket.cpp b/src/td/protocol/packets/UpdateGameStatePacket.cpp similarity index 85% rename from src/protocol/packets/UpdateGameStatePacket.cpp rename to src/td/protocol/packets/UpdateGameStatePacket.cpp index 76e36f9..c73c528 100644 --- a/src/protocol/packets/UpdateGameStatePacket.cpp +++ b/src/td/protocol/packets/UpdateGameStatePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateGameStatePacket.h" +#include "td/protocol/packets/UpdateGameStatePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateLobbyTimePacket.cpp b/src/td/protocol/packets/UpdateLobbyTimePacket.cpp similarity index 85% rename from src/protocol/packets/UpdateLobbyTimePacket.cpp rename to src/td/protocol/packets/UpdateLobbyTimePacket.cpp index f0f8bde..53f1555 100644 --- a/src/protocol/packets/UpdateLobbyTimePacket.cpp +++ b/src/td/protocol/packets/UpdateLobbyTimePacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateLobbyTimePacket.h" +#include "td/protocol/packets/UpdateLobbyTimePacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateMobStatesPacket.cpp b/src/td/protocol/packets/UpdateMobStatesPacket.cpp similarity index 91% rename from src/protocol/packets/UpdateMobStatesPacket.cpp rename to src/td/protocol/packets/UpdateMobStatesPacket.cpp index 6d7ebfb..942843a 100644 --- a/src/protocol/packets/UpdateMobStatesPacket.cpp +++ b/src/td/protocol/packets/UpdateMobStatesPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateMobStatesPacket.h" +#include "td/protocol/packets/UpdateMobStatesPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdateMoneyPacket.cpp b/src/td/protocol/packets/UpdateMoneyPacket.cpp similarity index 86% rename from src/protocol/packets/UpdateMoneyPacket.cpp rename to src/td/protocol/packets/UpdateMoneyPacket.cpp index b648ae4..8d715b6 100644 --- a/src/protocol/packets/UpdateMoneyPacket.cpp +++ b/src/td/protocol/packets/UpdateMoneyPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdateMoneyPacket.h" +#include "td/protocol/packets/UpdateMoneyPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpdatePlayerTeamPacket.cpp b/src/td/protocol/packets/UpdatePlayerTeamPacket.cpp similarity index 86% rename from src/protocol/packets/UpdatePlayerTeamPacket.cpp rename to src/td/protocol/packets/UpdatePlayerTeamPacket.cpp index d02241f..a784fa9 100644 --- a/src/protocol/packets/UpdatePlayerTeamPacket.cpp +++ b/src/td/protocol/packets/UpdatePlayerTeamPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpdatePlayerTeamPacket.h" +#include "td/protocol/packets/UpdatePlayerTeamPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/UpgradeTowerPacket.cpp b/src/td/protocol/packets/UpgradeTowerPacket.cpp similarity index 86% rename from src/protocol/packets/UpgradeTowerPacket.cpp rename to src/td/protocol/packets/UpgradeTowerPacket.cpp index b274238..e7d29c2 100644 --- a/src/protocol/packets/UpgradeTowerPacket.cpp +++ b/src/td/protocol/packets/UpgradeTowerPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/UpgradeTowerPacket.h" +#include "td/protocol/packets/UpgradeTowerPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/WorldAddTowerPacket.cpp b/src/td/protocol/packets/WorldAddTowerPacket.cpp similarity index 88% rename from src/protocol/packets/WorldAddTowerPacket.cpp rename to src/td/protocol/packets/WorldAddTowerPacket.cpp index 9ddba29..9fc28a1 100644 --- a/src/protocol/packets/WorldAddTowerPacket.cpp +++ b/src/td/protocol/packets/WorldAddTowerPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/WorldAddTowerPacket.h" +#include "td/protocol/packets/WorldAddTowerPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/WorldBeginDataPacket.cpp b/src/td/protocol/packets/WorldBeginDataPacket.cpp similarity index 98% rename from src/protocol/packets/WorldBeginDataPacket.cpp rename to src/td/protocol/packets/WorldBeginDataPacket.cpp index 1eac9ba..4470ea9 100644 --- a/src/protocol/packets/WorldBeginDataPacket.cpp +++ b/src/td/protocol/packets/WorldBeginDataPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/WorldBeginDataPacket.h" +#include "td/protocol/packets/WorldBeginDataPacket.h" namespace td { namespace protocol { diff --git a/src/protocol/packets/WorldDataPacket.cpp b/src/td/protocol/packets/WorldDataPacket.cpp similarity index 98% rename from src/protocol/packets/WorldDataPacket.cpp rename to src/td/protocol/packets/WorldDataPacket.cpp index 5556477..e265339 100644 --- a/src/protocol/packets/WorldDataPacket.cpp +++ b/src/td/protocol/packets/WorldDataPacket.cpp @@ -1,4 +1,4 @@ -#include "protocol/packets/WorldDataPacket.h" +#include "td/protocol/packets/WorldDataPacket.h" namespace td { namespace protocol { diff --git a/xmake.lua b/xmake.lua index 8831cd4..f35aa28 100644 --- a/xmake.lua +++ b/xmake.lua @@ -1,24 +1,25 @@ add_rules("mode.debug", "mode.release") -add_defines("TD_IMPL_OPENGL_LOADER_GLEW"); +add_defines("TD_IMPL_OPENGL_LOADER_GLEW") add_requires("libsdl >= 2", "zlib", "glew") target("TowerDefense") - set_kind("binary") - add_includedirs("include") - add_files("src/**.cpp") - add_cxflags("-pthread") + set_kind("static") - add_links("pthread") + add_includedirs("include") + add_files("src/td/**.cpp") set_languages("c++17") - add_packages("zlib", "libsdl", "glew", "opengl") + add_packages("zlib") + + add_links("pthread") + add_cxflags("-pthread") if is_os("windows") then add_links("ws2_32") -- link network stuff end - + if is_mode("release") then -- mark symbols visibility as hidden set_symbols("hidden") @@ -41,6 +42,27 @@ target("TowerDefense") end + + +target("TowerDefenseServer") + add_deps("TowerDefense") + + set_kind("binary") + add_files("src/ServerMain.cpp", "src/server/**.cpp") + add_includedirs("include") + + + + +target("TowerDefenseClient") + add_deps("TowerDefense") + + set_kind("binary") + add_files("src/ClientMain.cpp", "src/client/**.cpp", "src/server/**.cpp") + add_includedirs("include") + + add_packages("libsdl", "glew", "opengl") + -- run windows program with wine on linux if is_host("linux") and is_os("windows") then on_run(function(target) @@ -48,4 +70,3 @@ target("TowerDefense") os.execv("wine", {target:targetfile()}) end) end -