DEADSOFTWARE

Add support for external assets
[cavedroid.git] / desktop / src / ru / deadsoftware / cavedroid / desktop / DesktopLauncher.java
index c30a617f94a6ca016e5029cccb2279d85837657e..025beb484ed0e573abf795d267d3705feac6ee7b 100644 (file)
@@ -14,12 +14,27 @@ class DesktopLauncher {
                config.useVsync(true);
 
                boolean touch = false;
+               String assetsPath = null;
+
                for (String anArg : arg) {
             if (anArg.equals("--touch")) {
                 touch = true;
-                break;
             }
+
+                       if (anArg.startsWith("--assets")) {
+                               String[] splitArg = anArg.split("=");
+                               if (splitArg.length >= 2) {
+                                       assetsPath = splitArg[1];
+                               }
+                       }
                }
-        new Lwjgl3Application(new CaveGame(System.getProperty("user.home") + "/.cavedroid", touch), config);
+
+        new Lwjgl3Application(
+                               new CaveGame(
+                                               System.getProperty("user.home") + "/.cavedroid",
+                                               touch,
+                                               assetsPath),
+                               config
+               );
        }
 }