equal
deleted
inserted
replaced
60 // CCHandlers.inc |
60 // CCHandlers.inc |
61 // HHHandlers.inc |
61 // HHHandlers.inc |
62 // SinTable.inc |
62 // SinTable.inc |
63 // proto.inc |
63 // proto.inc |
64 |
64 |
|
65 var recordFileName : shortstring = ''; |
65 |
66 |
66 procedure OnDestroy; forward; |
67 procedure OnDestroy; forward; |
67 |
68 |
68 //////////////////////////////// |
69 //////////////////////////////// |
69 procedure DoTimer(Lag: LongInt); |
70 procedure DoTimer(Lag: LongInt); |
212 end; |
213 end; |
213 3: begin |
214 3: begin |
214 val(ParamStr(2), ipcPort); |
215 val(ParamStr(2), ipcPort); |
215 GameType:= gmtLandPreview; |
216 GameType:= gmtLandPreview; |
216 if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true); |
217 if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true); |
217 end |
218 end; |
|
219 2: begin |
|
220 PathPrefix:= ParamStr(1); |
|
221 recordFileName:= ParamStr(2); |
|
222 for p:= Succ(Low(TPathType)) to High(TPathType) do |
|
223 if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p] |
|
224 end; |
218 else |
225 else |
219 OutError(errmsgShouldntRun, true) |
226 OutError(errmsgShouldntRun, true) |
220 end |
227 end |
221 end; |
228 end; |
222 |
229 |
242 WriteLnToConsole(msgOK); |
249 WriteLnToConsole(msgOK); |
243 |
250 |
244 ShowMainWindow; |
251 ShowMainWindow; |
245 |
252 |
246 InitKbdKeyTable; |
253 InitKbdKeyTable; |
247 InitIPC; |
254 |
|
255 if recordFileName = '' then InitIPC; |
248 WriteLnToConsole(msgGettingConfig); |
256 WriteLnToConsole(msgGettingConfig); |
249 |
257 |
250 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
258 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
251 |
259 |
252 SendIPCAndWaitReply('C'); // ask for game config |
260 if recordFileName = '' then |
|
261 SendIPCAndWaitReply('C') // ask for game config |
|
262 else |
|
263 LoadRecordFromFile(recordFileName); |
253 |
264 |
254 s:= 'eproto ' + inttostr(cNetProtoVersion); |
265 s:= 'eproto ' + inttostr(cNetProtoVersion); |
255 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
266 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
256 |
267 |
257 InitTeams; |
268 InitTeams; |