hedgewars/hwengine.pas
changeset 3675 857c9546a822
parent 3670 4c673e57f0d7
child 3678 00428183300f
child 3690 c247dee9e1c0
equal deleted inserted replaced
3673:45778b16b224 3675:857c9546a822
   196 end;
   196 end;
   197 
   197 
   198 ///////////////
   198 ///////////////
   199 {$IFDEF HWLIBRARY}
   199 {$IFDEF HWLIBRARY}
   200 procedure Game(gameArgs: arrayofpchar); cdecl; export;
   200 procedure Game(gameArgs: arrayofpchar); cdecl; export;
   201 var tmp_quality: LongInt;
       
   202 {$ELSE}
   201 {$ELSE}
   203 procedure Game;
   202 procedure Game;
   204 {$ENDIF}
   203 {$ENDIF}
   205 var p: TPathType;
   204 var p: TPathType;
   206     s: shortstring;
   205     s: shortstring;
   209 {$ENDIF}
   208 {$ENDIF}
   210 begin
   209 begin
   211 {$IFDEF HWLIBRARY}
   210 {$IFDEF HWLIBRARY}
   212     cBits:= 32;
   211     cBits:= 32;
   213     cFullScreen:= false;
   212     cFullScreen:= false;
   214     cVSyncInUse:= true;
       
   215     cTimerInterval:= 8;
   213     cTimerInterval:= 8;
   216     PathPrefix:= 'Data';
   214     PathPrefix:= 'Data';
   217 {$IFDEF DEBUGFILE}
   215 {$IFDEF DEBUGFILE}
   218     cShowFPS:= true;
   216     cShowFPS:= true;
   219 {$ELSE}
   217 {$ELSE}
   445             cBitsStr:= ParamStr(4);
   443             cBitsStr:= ParamStr(4);
   446             val(cBitsStr, cBits);
   444             val(cBitsStr, cBits);
   447             val(ParamStr(5), ipcPort);
   445             val(ParamStr(5), ipcPort);
   448             cFullScreen:= ParamStr(6) = '1';
   446             cFullScreen:= ParamStr(6) = '1';
   449             isSoundEnabled:= ParamStr(7) = '1';
   447             isSoundEnabled:= ParamStr(7) = '1';
   450             cVSyncInUse:= ParamStr(8) = '1';        //unused
   448             //cVSyncInUse:= ParamStr(8) = '1';      //merged with rqFlags
   451             //cWeaponTooltips:= ParamStr(9) = '1';  //merged with rqFlags
   449             //cWeaponTooltips:= ParamStr(9) = '1';  //merged with rqFlags
   452             cLocaleFName:= ParamStr(10);
   450             cLocaleFName:= ParamStr(10);
   453             val(ParamStr(11), cInitVolume);
   451             val(ParamStr(11), cInitVolume);
   454             val(ParamStr(12), cTimerInterval);
   452             val(ParamStr(12), cTimerInterval);
   455             PathPrefix:= ParamStr(13);
   453             PathPrefix:= ParamStr(13);
   460 
   458 
   461             if (ParamStr(18) = '1') then        //HACK - always disable rqLowRes as it's a game breaker
   459             if (ParamStr(18) = '1') then        //HACK - always disable rqLowRes as it's a game breaker
   462                 cReducedQuality:= $FFFFFFFF xor rqLowRes
   460                 cReducedQuality:= $FFFFFFFF xor rqLowRes
   463             else
   461             else
   464                 val(ParamStr(18), cReducedQuality);
   462                 val(ParamStr(18), cReducedQuality);
   465                 
   463             
       
   464             if (ParamStr(8) = '0') then         //HACK - ifcVSyncInUse not true, disable it
       
   465                 cReducedQuality:= cReducedQuality xor rqDesyncVBlank;
   466             if (ParamStr(9) = '0') then         //HACK - if cWeaponTooltips not true, disable it
   466             if (ParamStr(9) = '0') then         //HACK - if cWeaponTooltips not true, disable it
   467                 cReducedQuality:= cReducedQuality xor rqTooltipsOff;
   467                 cReducedQuality:= cReducedQuality xor rqTooltipsOff;
   468         end;
   468         end;
   469         3: begin
   469         3: begin
   470             val(ParamStr(2), ipcPort);
   470             val(ParamStr(2), ipcPort);