hedgewars/hwengine.pas
branchexperimental3D
changeset 3696 6009d8378422
parent 3694 3e9c0634065c
child 4004 b1c2c2f6fc5e
equal deleted inserted replaced
3694:3e9c0634065c 3696:6009d8378422
   228     val(gameArgs[6], cScreenHeight);
   228     val(gameArgs[6], cScreenHeight);
   229     val(gameArgs[7], cScreenWidth);
   229     val(gameArgs[7], cScreenWidth);
   230     recordFileName:= gameArgs[8];
   230     recordFileName:= gameArgs[8];
   231     
   231     
   232     val(gameArgs[9], cReducedQuality);
   232     val(gameArgs[9], cReducedQuality);
   233     isStereoEnabled:= false; // TODO: Enable anaglyph rendering on iPhone?
   233     cStereoMode:= smNone; // TODO: Enable anaglyph rendering on iPhone?
   234 {$ENDIF}
   234 {$ENDIF}
   235 
   235 
   236     initEverything(true);
   236     initEverything(true);
   237 
   237 
   238     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   238     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   435     WriteLn();
   435     WriteLn();
   436 end;
   436 end;
   437 
   437 
   438 ////////////////////
   438 ////////////////////
   439 procedure GetParams;
   439 procedure GetParams;
       
   440 var i : LongInt;
   440 begin
   441 begin
   441     case ParamCount of
   442     case ParamCount of
   442         19: begin
   443         19: begin
   443             val(ParamStr(2), cScreenWidth);
   444             val(ParamStr(2), cScreenWidth);
   444             val(ParamStr(3), cScreenHeight);
   445             val(ParamStr(3), cScreenHeight);
   456             cShowFPS:= ParamStr(14) = '1';
   457             cShowFPS:= ParamStr(14) = '1';
   457             cAltDamage:= ParamStr(15) = '1';
   458             cAltDamage:= ParamStr(15) = '1';
   458             UserNick:= DecodeBase64(ParamStr(16));
   459             UserNick:= DecodeBase64(ParamStr(16));
   459             isMusicEnabled:= ParamStr(17) = '1';
   460             isMusicEnabled:= ParamStr(17) = '1';
   460             val(ParamStr(18), cReducedQuality);
   461             val(ParamStr(18), cReducedQuality);
   461             isStereoEnabled:= ParamStr(19) = '1';
   462             val(ParamStr(19), i);
       
   463             cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), i)));
   462         end;
   464         end;
   463         3: begin
   465         3: begin
   464             val(ParamStr(2), ipcPort);
   466             val(ParamStr(2), ipcPort);
   465             GameType:= gmtLandPreview;
   467             GameType:= gmtLandPreview;
   466             if ParamStr(3) <> 'landpreview' then 
   468             if ParamStr(3) <> 'landpreview' then