hedgewars/uFLRunQueue.pas
branchqmlfrontend
changeset 12861 488782d9aba9
parent 12860 e33bcb9d5e9c
child 12863 fe16fa088b69
--- a/hedgewars/uFLRunQueue.pas	Mon Dec 25 00:58:47 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-unit uFLRunQueue;
-interface
-uses uFLTypes;
-
-procedure queueExecution(var config: TGameConfig);
-
-implementation
-uses hwengine, uFLUICallback, uFLIPC;
-
-var runQueue: PGameConfig = nil;
-
-procedure nextRun;
-begin
-    if runQueue <> nil then
-    begin
-        if runQueue^.gameType = gtPreview then
-            sendUI(mtRenderingPreview, nil, 0);
-
-        ipcRemoveBarrierFromEngineQueue();
-        RunEngine(runQueue^.argumentsNumber, @runQueue^.argv);
-    end
-end;
-
-procedure cleanupConfig;
-var t: PGameConfig;
-begin
-    t:= runQueue;
-    runQueue:= t^.nextConfig;
-    dispose(t)
-end;
-
-procedure queueExecution(var config: TGameConfig);
-var pConfig, t, tt: PGameConfig;
-    i: Longword;
-begin
-    new(pConfig);
-    pConfig^:= config;
-
-    with pConfig^ do
-    begin
-        nextConfig:= nil;
-
-        for i:= 0 to Pred(MAXARGS) do
-        begin
-            if arguments[i][0] = #255 then
-                arguments[i][255]:= #0
-            else
-                arguments[i][byte(arguments[i][0]) + 1]:= #0;
-            argv[i]:= @arguments[i][1]
-        end;
-    end;
-
-    if runQueue = nil then
-    begin
-        runQueue:= pConfig;
-
-        ipcSetEngineBarrier();
-        //sendConfig(pConfig);
-        nextRun
-    end else
-    begin
-        t:= runQueue;
-        while t^.nextConfig <> nil do 
-        begin
-            if false and (pConfig^.gameType = gtPreview) and (t^.nextConfig^.gameType = gtPreview) and (t <> runQueue) then
-            begin
-                tt:= t^.nextConfig;
-                pConfig^.nextConfig:= tt^.nextConfig;
-                t^.nextConfig:= pConfig;
-                dispose(tt);
-                exit // boo
-            end;
-            t:= t^.nextConfig;
-        end;
-
-        ipcSetEngineBarrier();
-        //sendConfig(pConfig);
-        t^.nextConfig:= pConfig
-    end;
-end;
-
-end.