changeset 5174 | f5294509783e |
parent 5167 | 7b515d0945b1 |
child 5217 | 5612e01252ce |
5173:4056310a161a | 5174:f5294509783e |
---|---|
28 {$ELSE} |
28 {$ELSE} |
29 program hwengine; |
29 program hwengine; |
30 {$ENDIF} |
30 {$ENDIF} |
31 |
31 |
32 uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, |
32 uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, |
33 uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile, |
33 uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, |
34 sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted; |
34 sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted; |
35 |
35 |
36 {$IFDEF HWLIBRARY} |
36 {$IFDEF HWLIBRARY} |
37 procedure initEverything(complete:boolean); |
37 procedure initEverything(complete:boolean); |
38 procedure freeEverything(complete:boolean); |
38 procedure freeEverything(complete:boolean); |
254 SDL_putenv(str2pchar('SDL_VIDEO_CENTERED=' + s)); |
254 SDL_putenv(str2pchar('SDL_VIDEO_CENTERED=' + s)); |
255 {$ELSE} |
255 {$ELSE} |
256 ShowMainWindow(); |
256 ShowMainWindow(); |
257 {$ENDIF} |
257 {$ENDIF} |
258 |
258 |
259 AddProgress(); |
|
260 |
|
261 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
259 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
262 InitKbdKeyTable(); |
260 InitKbdKeyTable(); |
261 AddProgress(); |
|
263 |
262 |
264 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
263 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
265 if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5) |
264 if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5) |
266 else cLocale := Copy(cLocaleFName,1,2); |
265 else cLocale := Copy(cLocaleFName,1,2); |
267 if cLocaleFName <> 'en.txt' then |
266 if cLocaleFName <> 'en.txt' then |
279 begin |
278 begin |
280 InitIPC; |
279 InitIPC; |
281 SendIPCAndWaitReply('C'); // ask for game config |
280 SendIPCAndWaitReply('C'); // ask for game config |
282 end |
281 end |
283 else |
282 else |
284 begin |
|
285 LoadRecordFromFile(recordFileName); |
283 LoadRecordFromFile(recordFileName); |
286 uMobile.SaveBeganSynching(); |
|
287 end; |
|
288 |
284 |
289 ScriptOnGameInit; |
285 ScriptOnGameInit; |
290 |
286 |
291 s:= 'eproto ' + inttostr(cNetProtoVersion); |
287 s:= 'eproto ' + inttostr(cNetProtoVersion); |
292 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
288 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |