hedgewars/hwengine.pas
changeset 3779 3351a017d4ad
parent 3774 af0e68ca273e
child 3799 5341dc5a8919
equal deleted inserted replaced
3778:2e61bb50cc57 3779:3351a017d4ad
    34 
    34 
    35 var isTerminated: boolean = false;
    35 var isTerminated: boolean = false;
    36     alsoShutdownFrontend: boolean = false;
    36     alsoShutdownFrontend: boolean = false;
    37 
    37 
    38 {$IFDEF HWLIBRARY}
    38 {$IFDEF HWLIBRARY}
    39 type arrayofpchar = array[0..9] of PChar;
    39 type arrayofpchar = array[0..10] of PChar;
    40 
    40 
    41 procedure initEverything(complete:boolean);
    41 procedure initEverything(complete:boolean);
    42 procedure freeEverything(complete:boolean);
    42 procedure freeEverything(complete:boolean);
    43 
    43 
    44 implementation
    44 implementation
   216 {$IFDEF DEBUGFILE}
   216 {$IFDEF DEBUGFILE}
   217     cShowFPS:= true;
   217     cShowFPS:= true;
   218 {$ELSE}
   218 {$ELSE}
   219     cShowFPS:= false;    // update me at release time
   219     cShowFPS:= false;    // update me at release time
   220 {$ENDIF}
   220 {$ENDIF}
   221     cInitVolume:= 100;
   221     val(gameArgs[0], ipcPort);
   222 
   222     val(gameArgs[1], cScreenHeight);
   223     UserNick:= gameArgs[0];
   223     val(gameArgs[2], cScreenWidth);
   224     val(gameArgs[1], ipcPort);
   224     val(gameArgs[3], cReducedQuality);
   225     isSoundEnabled:= gameArgs[2] = '1';
       
   226     isMusicEnabled:= gameArgs[3] = '1';
       
   227     cLocaleFName:= gameArgs[4];
   225     cLocaleFName:= gameArgs[4];
   228     cAltDamage:= gameArgs[5] = '1';
   226     UserNick:= gameArgs[5];
   229     val(gameArgs[6], cScreenHeight);
   227     isSoundEnabled:= gameArgs[6] = '1';
   230     val(gameArgs[7], cScreenWidth);
   228     isMusicEnabled:= gameArgs[7] = '1';
   231     recordFileName:= gameArgs[8];
   229     cAltDamage:= gameArgs[8] = '1';
   232 
   230     if CompareStr(gameArgs[9],'0') = 0 then
   233     val(gameArgs[9], cReducedQuality);
   231         cReadyDelay:= 0;
       
   232     recordFileName:= gameArgs[10];
   234 {$ENDIF}
   233 {$ENDIF}
   235 
   234 
   236     initEverything(true);
   235     initEverything(true);
   237     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   236     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   238 {$IFDEF DEBUGFILE}
   237 {$IFDEF DEBUGFILE}