hedgewars/ArgParsers.inc
changeset 7021 0c75512a8920
parent 6982 8d41d22a291d
child 7151 ec15d9e1a7e3
--- a/hedgewars/ArgParsers.inc	Sat May 05 00:01:12 2012 +0400
+++ b/hedgewars/ArgParsers.inc	Sat May 05 15:17:16 2012 +0100
@@ -40,9 +40,10 @@
     val(ParamStr(4), cBits);
     val(ParamStr(5), ipcPort);
     cFullScreen:= ParamStr(6) = '1';
-    isSoundEnabled:= ParamStr(7) = '1';
-    isMusicEnabled:= ParamStr(8) = '1';
-    val(ParamStr(9), cInitVolume);
+    SetSound(ParamStr(7) = '1');
+    SetMusic(ParamStr(8) = '1');
+    val(ParamStr(9), tmp);
+    SetVolume(tmp);
     val(ParamStr(10), cTimerInterval);
     PathPrefix:= ParamStr(11);
     cShowFPS:= ParamStr(12) = '1';
@@ -101,9 +102,9 @@
 
 procedure setAudio(initialVolume: LongInt; musicEnabled: boolean; soundEnabled: boolean);
 begin
-    cInitVolume:= initialVolume;
-    isMusicEnabled:= musicEnabled;
-    isSoundEnabled:= soundEnabled
+    SetVolume(initialVolume);
+    SetMusic(musicEnabled);
+    SetSound(soundEnabled);
 end;
 
 procedure setAudioWithParameters(initialVolumeParam: string; musicEnabledParam: string; soundEnabledParam: string);
@@ -231,8 +232,8 @@
                             if ParamStr(paramIndex) = '--stats-only'  then
                                 begin
                                 cOnlyStats:= true;
-                                isSoundEnabled:= false;
-                                isMusicEnabled:= false;
+                                SetSound(false);
+                                SetMusic(false);
                                 cReducedQuality:= $FFFFFFFF xor rqLowRes; // HACK
                                 paramIndex:= paramIndex + 1
                                 end