hedgewars/hwengine.pas
branchhedgeroid
changeset 5644 4ad07103cfae
parent 5577 272c82f82cee
parent 5616 a96231121eac
child 5725 e27100a0e2d0
equal deleted inserted replaced
5641:06558ee35f51 5644:4ad07103cfae
   232     val(gameArgs[0], ipcPort);
   232     val(gameArgs[0], ipcPort);
   233     val(gameArgs[1], cScreenWidth);
   233     val(gameArgs[1], cScreenWidth);
   234     val(gameArgs[2], cScreenHeight);
   234     val(gameArgs[2], cScreenHeight);
   235     val(gameArgs[3], cReducedQuality);
   235     val(gameArgs[3], cReducedQuality);
   236     cLocaleFName:= gameArgs[4];
   236     cLocaleFName:= gameArgs[4];
       
   237     if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5)
       
   238     else cLocale := Copy(cLocaleFName,1,2);
   237     UserNick:= gameArgs[5];
   239     UserNick:= gameArgs[5];
   238     isSoundEnabled:= gameArgs[6] = '1';
   240     isSoundEnabled:= gameArgs[6] = '1';
   239     isMusicEnabled:= gameArgs[7] = '1';
   241     isMusicEnabled:= gameArgs[7] = '1';
   240     cAltDamage:= gameArgs[8] = '1';
   242     cAltDamage:= gameArgs[8] = '1';
   241     val(gameArgs[9], rotationQt);
   243     val(gameArgs[9], rotationQt);
   277     InitKbdKeyTable();
   279     InitKbdKeyTable();
   278     AddProgress();
   280     AddProgress();
   279 
   281 
   280     LoadLocale(UserPathz[ptLocale] + '/en.txt');  // Do an initial load with english
   282     LoadLocale(UserPathz[ptLocale] + '/en.txt');  // Do an initial load with english
   281     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   283     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   282     if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5)
       
   283     else cLocale := Copy(cLocaleFName,1,2);
       
   284     if cLocaleFName <> 'en.txt' then
   284     if cLocaleFName <> 'en.txt' then
   285         begin
   285         begin
   286         // Try two letter locale first before trying specific locale overrides
   286         // Try two letter locale first before trying specific locale overrides
   287         if (Length(cLocale) > 2) and (Copy(cLocale,1,2) <> 'en') then
   287         if (Length(cLocale) > 2) and (Copy(cLocale,1,2) <> 'en') then
   288             begin
   288             begin
   493 ////////////////////////////////////////////////////////////////////////////////
   493 ////////////////////////////////////////////////////////////////////////////////
   494 /////////////////////////////// m a i n ////////////////////////////////////////
   494 /////////////////////////////// m a i n ////////////////////////////////////////
   495 ////////////////////////////////////////////////////////////////////////////////
   495 ////////////////////////////////////////////////////////////////////////////////
   496 begin
   496 begin
   497     GetParams();
   497     GetParams();
       
   498     if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5)
       
   499     else cLocale := Copy(cLocaleFName,1,2);
   498 
   500 
   499     if GameType = gmtLandPreview then GenLandPreview()
   501     if GameType = gmtLandPreview then GenLandPreview()
   500     else if GameType = gmtSyntax then DisplayUsage()
   502     else if GameType = gmtSyntax then DisplayUsage()
   501     else Game();
   503     else Game();
   502 
   504