hedgewars/hwengine.pas
changeset 2376 ece7b87f1334
parent 2326 0ddf641fddee
child 2379 d62b1f224982
equal deleted inserted replaced
2375:99f05a01a6a3 2376:ece7b87f1334
   273      if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true);
   273      if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true);
   274      end;
   274      end;
   275   2: begin
   275   2: begin
   276 		PathPrefix:= ParamStr(1);
   276 		PathPrefix:= ParamStr(1);
   277 		recordFileName:= ParamStr(2);
   277 		recordFileName:= ParamStr(2);
   278 	 
   278 
   279 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   279 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   280 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   280 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   281 	end;
   281 	end;
   282   6: begin
   282   6: begin
   283 		PathPrefix:= ParamStr(1);
   283 		PathPrefix:= ParamStr(1);
   284 		recordFileName:= ParamStr(2);
   284 		recordFileName:= ParamStr(2);
   285 	 
   285 
   286 		if ParamStr(3) = '--set-video'	then
   286 		if ParamStr(3) = '--set-video'	then
   287 		begin
   287 		begin
   288 			val(ParamStr(4), cScreenWidth);
   288 			val(ParamStr(4), cScreenWidth);
   289 			val(ParamStr(5), cScreenHeight);
   289 			val(ParamStr(5), cScreenHeight);
   290 			cInitWidth:= cScreenWidth;
   290 			cInitWidth:= cScreenWidth;
   309 					cShowFPS:= ParamStr(6) = '1';
   309 					cShowFPS:= ParamStr(6) = '1';
   310 				end
   310 				end
   311 				else DisplayUsage;
   311 				else DisplayUsage;
   312 			end
   312 			end
   313 		end;
   313 		end;
   314 		
   314 
   315 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   315 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   316 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   316 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   317 	end;
   317 	end;
   318  11: begin
   318  11: begin
   319 		PathPrefix:= ParamStr(1);
   319 		PathPrefix:= ParamStr(1);
   320 		recordFileName:= ParamStr(2);
   320 		recordFileName:= ParamStr(2);
   321 	
   321 
   322 		if ParamStr(3) = '--set-multimedia' then
   322 		if ParamStr(3) = '--set-multimedia' then
   323 		begin
   323 		begin
   324 			val(ParamStr(4), cScreenWidth);
   324 			val(ParamStr(4), cScreenWidth);
   325 			val(ParamStr(5), cScreenHeight);
   325 			val(ParamStr(5), cScreenHeight);
   326 			cInitWidth:= cScreenWidth;
   326 			cInitWidth:= cScreenWidth;
   332 			isSoundEnabled:= ParamStr(9) = '1';
   332 			isSoundEnabled:= ParamStr(9) = '1';
   333 			cLocaleFName:= ParamStr(10);
   333 			cLocaleFName:= ParamStr(10);
   334 			cFullScreen:= ParamStr(11) = '1';
   334 			cFullScreen:= ParamStr(11) = '1';
   335 		end
   335 		end
   336 		else DisplayUsage;
   336 		else DisplayUsage;
   337 		
   337 
   338 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   338 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   339 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   339 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   340 	end;
   340 	end;
   341  15: begin
   341  15: begin
   342 		PathPrefix:= ParamStr(1);
   342 		PathPrefix:= ParamStr(1);
   358 			cShowFPS:= ParamStr(13) = '1';
   358 			cShowFPS:= ParamStr(13) = '1';
   359 			val(ParamStr(14), cTimerInterval);
   359 			val(ParamStr(14), cTimerInterval);
   360 			cReducedQuality:= ParamStr(15) = '1';
   360 			cReducedQuality:= ParamStr(15) = '1';
   361 		end
   361 		end
   362 		else DisplayUsage;
   362 		else DisplayUsage;
   363 		
   363 
   364 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   364 		for p:= Succ(Low(TPathType)) to High(TPathType) do
   365 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   365 			if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]
   366 	end;
   366 	end;
   367 	else DisplayUsage;
   367 	else DisplayUsage;
   368 	end;
   368 	end;