equal
deleted
inserted
replaced
12 |
12 |
13 procedure nextRun; |
13 procedure nextRun; |
14 begin |
14 begin |
15 if runQueue <> nil then |
15 if runQueue <> nil then |
16 begin |
16 begin |
|
17 writeln('RUNNING ', runQueue^.gameType); |
17 if runQueue^.gameType = gtPreview then |
18 if runQueue^.gameType = gtPreview then |
18 sendUI(mtRenderingPreview, nil, 0); |
19 sendUI(mtRenderingPreview, nil, 0); |
19 |
20 |
20 ipcRemoveBarrierFromEngineQueue(); |
21 ipcRemoveBarrierFromEngineQueue(); |
21 RunEngine(runQueue^.argumentsNumber, @runQueue^.argv); |
22 RunEngine(runQueue^.argumentsNumber, @runQueue^.argv); |
22 |
|
23 sendConfig(runQueue) |
|
24 end |
23 end |
25 end; |
24 end; |
26 |
25 |
27 procedure cleanupConfig; |
26 procedure cleanupConfig; |
28 var t: PGameConfig; |
27 var t: PGameConfig; |
34 |
33 |
35 procedure queueExecution(var config: TGameConfig); |
34 procedure queueExecution(var config: TGameConfig); |
36 var pConfig, t, tt: PGameConfig; |
35 var pConfig, t, tt: PGameConfig; |
37 i: Longword; |
36 i: Longword; |
38 begin |
37 begin |
39 ipcSetEngineBarrier(); |
38 writeln('QUEUE EXECUTION ', config.gameType); |
40 |
|
41 new(pConfig); |
39 new(pConfig); |
42 pConfig^:= config; |
40 pConfig^:= config; |
43 |
41 |
44 with pConfig^ do |
42 with pConfig^ do |
45 begin |
43 begin |
57 |
55 |
58 if runQueue = nil then |
56 if runQueue = nil then |
59 begin |
57 begin |
60 runQueue:= pConfig; |
58 runQueue:= pConfig; |
61 |
59 |
|
60 ipcSetEngineBarrier(); |
|
61 sendConfig(pConfig); |
62 nextRun |
62 nextRun |
63 end else |
63 end else |
64 begin |
64 begin |
65 t:= runQueue; |
65 t:= runQueue; |
66 while t^.nextConfig <> nil do |
66 while t^.nextConfig <> nil do |
67 begin |
67 begin |
68 if (pConfig^.gameType = gtPreview) and (t^.nextConfig^.gameType = gtPreview) then |
68 if false and (pConfig^.gameType = gtPreview) and (t^.nextConfig^.gameType = gtPreview) and (t <> runQueue) then |
69 begin |
69 begin |
70 tt:= t^.nextConfig; |
70 tt:= t^.nextConfig; |
71 pConfig^.nextConfig:= tt^.nextConfig; |
71 pConfig^.nextConfig:= tt^.nextConfig; |
72 t^.nextConfig:= pConfig; |
72 t^.nextConfig:= pConfig; |
73 dispose(tt); |
73 dispose(tt); |
74 exit // boo |
74 exit // boo |
75 end; |
75 end; |
76 t:= t^.nextConfig; |
76 t:= t^.nextConfig; |
77 end; |
77 end; |
|
78 |
|
79 ipcSetEngineBarrier(); |
|
80 sendConfig(pConfig); |
78 t^.nextConfig:= pConfig |
81 t^.nextConfig:= pConfig |
79 end; |
82 end; |
80 end; |
83 end; |
81 |
84 |
82 procedure passFlibEvent(p: pointer); cdecl; |
85 procedure passFlibEvent(p: pointer); cdecl; |