265 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
265 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
266 InitKbdKeyTable(); |
266 InitKbdKeyTable(); |
267 |
267 |
268 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
268 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
269 if cLocaleFName <> 'en.txt' then |
269 if cLocaleFName <> 'en.txt' then |
270 begin |
270 begin |
271 // Try two letter locale first before trying specific locale overrides |
271 // Try two letter locale first before trying specific locale overrides |
272 if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then |
272 if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then |
273 LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt'); |
273 LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt'); |
274 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
274 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
275 end; |
275 end; |
276 |
276 |
277 WriteLnToConsole(msgGettingConfig); |
277 WriteLnToConsole(msgGettingConfig); |
|
278 |
278 if recordFileName = '' then |
279 if recordFileName = '' then |
279 begin |
280 begin |
280 InitIPC; |
281 InitIPC; |
281 SendIPCAndWaitReply('C'); // ask for game config |
282 SendIPCAndWaitReply('C'); // ask for game config |
282 end |
283 end |
283 else |
284 else |
284 begin |
285 begin |
285 LoadRecordFromFile(recordFileName); |
286 LoadRecordFromFile(recordFileName); |
286 perfExt_SaveBeganSynching(); |
287 perfExt_SaveBeganSynching(); |
287 end; |
288 end; |
288 |
289 |
289 ScriptOnGameInit; |
290 ScriptOnGameInit; |
290 |
291 |
291 s:= 'eproto ' + inttostr(cNetProtoVersion); |
292 s:= 'eproto ' + inttostr(cNetProtoVersion); |
292 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
293 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |