QTfrontend/game.cpp
changeset 8325 ecd51650d5d8
parent 8070 66bc20d089fc
child 8330 aaefa587e277
child 8345 9d9b498cfb03
child 8346 3443e0de2c9d
--- a/QTfrontend/game.cpp	Mon Dec 24 16:23:55 2012 +0100
+++ b/QTfrontend/game.cpp	Mon Dec 24 17:07:12 2012 +0100
@@ -314,23 +314,43 @@
 {
     QStringList arguments;
     QRect resolution = config->vid_Resolution();
-    arguments << cfgdir->absolutePath();
-    arguments << QString::number(resolution.width());
-    arguments << QString::number(resolution.height());
-    arguments << QString::number(config->bitDepth()); // bpp
+    QString nick = config->netNick().toUtf8().toBase64();
+
+    arguments << "--internal"; //Must be passed as first argument
+    arguments << "--port";
     arguments << QString("%1").arg(ipc_port);
-    arguments << (config->vid_Fullscreen() ? "1" : "0");
-    arguments << (config->isSoundEnabled() ? "1" : "0");
-    arguments << (config->isMusicEnabled() ? "1" : "0");
-    arguments << QString::number(config->volume()); // sound volume
-    arguments << QString::number(config->timerInterval());
+    arguments << "--prefix";
     arguments << datadir->absolutePath();
-    arguments << (config->isShowFPSEnabled() ? "1" : "0");
-    arguments << (config->isAltDamageEnabled() ? "1" : "0");
-    arguments << config->netNick().toUtf8().toBase64();
+    arguments << "--user-prefix";
+    arguments << cfgdir->absolutePath();
+    arguments << "--locale";
+    arguments << tr("en.txt");
+    arguments << "--frame-interval";
+    arguments << QString::number(config->timerInterval());
+    arguments << "--volume";
+    arguments << QString::number(config->volume());
+    arguments << "--width";
+    arguments << QString::number(resolution.width());
+    arguments << "--height";
+    arguments << QString::number(resolution.height());
+    arguments << "--raw-quality";
     arguments << QString::number(config->translateQuality());
+    arguments << "--stereo";
     arguments << QString::number(config->stereoMode());
-    arguments << tr("en.txt");
+    if (config->vid_Fullscreen())
+        arguments << "--fullscreen";
+    if (config->isShowFPSEnabled())
+        arguments << "--showfps";
+    if (config->isAltDamageEnabled())
+        arguments << "--altdmg";
+    if (!config->isSoundEnabled())
+        arguments << "--nosound";
+    if (!config->isMusicEnabled())
+        arguments << "--nomusic";
+    if (!nick.isEmpty()) {
+        arguments << "--nick";
+        arguments << nick;
+    }
 
     return arguments;
 }