diff --git a/source/client/core/ClientApplication.cpp b/source/client/core/ClientApplication.cpp
index 083f1b054..e4700b1b3 100644
--- a/source/client/core/ClientApplication.cpp
+++ b/source/client/core/ClientApplication.cpp
@@ -47,15 +47,18 @@ ClientApplication::ClientApplication(int argc, char **argv) : gk::CoreApplicatio
}
void ClientApplication::init() {
- m_argumentParser.addArgument("host", {"-h", "--host", true});
- m_argumentParser.addArgument("port", {"-p", "--port", true});
- m_argumentParser.addArgument("singleplayer", {"-s", "--singleplayer", false});
- m_argumentParser.addArgument("multiplayer", {"-m", "--multiplayer", false});
- m_argumentParser.addArgument("working-dir", {"-w", "--working-dir", true});
- m_argumentParser.addArgument("texture-pack", {"-t", "--texture-pack", true});
+ m_argumentParser.addArgument("host", {"-h", "--host", "Select the host to connect to.", "host"});
+ m_argumentParser.addArgument("port", {"-p", "--port", "Select the port to use.", "port"});
+ m_argumentParser.addArgument("singleplayer", {"-s", "--singleplayer", "Start in singleplayer mode."});
+ m_argumentParser.addArgument("multiplayer", {"-m", "--multiplayer", "Start in multiplayer mode."});
+ m_argumentParser.addArgument("working-dir", {"-w", "--working-dir", "Change the working direction to
.", "dir"});
+ m_argumentParser.addArgument("texture-pack", {"-t", "--texture-pack", "Use texture pack .", "name"});
gk::CoreApplication::init();
+ if (m_argumentParser.getArgument("help").isFound)
+ return;
+
if (m_argumentParser.getArgument("working-dir").isFound)
fs::current_path(m_argumentParser.getArgument("working-dir").parameter);
diff --git a/source/client/graphics/TextureAtlas.cpp b/source/client/graphics/TextureAtlas.cpp
index a9364d144..ca78464f6 100644
--- a/source/client/graphics/TextureAtlas.cpp
+++ b/source/client/graphics/TextureAtlas.cpp
@@ -25,6 +25,7 @@
* =====================================================================================
*/
#include
+#include
#include "Registry.hpp"
#include "TextureAtlas.hpp"
@@ -105,8 +106,6 @@ void TextureAtlas::packTextures() {
m_texture.loadFromSurface(atlas.get());
}
-#include
-
void TextureAtlas::loadFromRegistry(const std::string &texturePack) {
if (!gk::Filesystem::fileExists("texturepacks/" + texturePack))
throw EXCEPTION("Texture pack '" + texturePack +"' doesn't exist");
diff --git a/source/server/core/ServerApplication.cpp b/source/server/core/ServerApplication.cpp
index b67372112..078329ec0 100644
--- a/source/server/core/ServerApplication.cpp
+++ b/source/server/core/ServerApplication.cpp
@@ -44,11 +44,14 @@ void ServerApplication::init() {
BlockGeometry::initOrientation();
- m_argumentParser.addArgument("port", {"-p", "--port", true});
- m_argumentParser.addArgument("working-dir", {"-w", "--working-dir", true});
+ m_argumentParser.addArgument("port", {"-p", "--port", "Select the port to use.", "port"});
+ m_argumentParser.addArgument("working-dir", {"-w", "--working-dir", "Change the working direction to .", "dir"});
m_argumentParser.parse();
+ if (m_argumentParser.getArgument("help").isFound)
+ return;
+
if (m_argumentParser.getArgument("working-dir").isFound)
fs::current_path(m_argumentParser.getArgument("working-dir").parameter);