equal
deleted
inserted
replaced
69 AssignHHCoords; |
69 AssignHHCoords; |
70 AddMiscGears; |
70 AddMiscGears; |
71 StoreLoad(false); |
71 StoreLoad(false); |
72 InitWorld; |
72 InitWorld; |
73 ResetKbd; |
73 ResetKbd; |
74 SoundLoad; |
|
75 if GameType = gmtSave then |
74 if GameType = gmtSave then |
76 begin |
75 SetSound(false); |
77 isSEBackup:= isSoundEnabled; |
|
78 isSoundEnabled:= false |
|
79 end; |
|
80 FinishProgress; |
76 FinishProgress; |
81 PlayMusic; |
77 PlayMusic; |
82 SetScale(zoom); |
78 SetScale(zoom); |
83 ScriptCall('onGameStart'); |
79 ScriptCall('onGameStart'); |
84 GameState:= gsGame; |
80 GameState:= gsGame; |
308 cLocale := Copy(cLocaleFName,1,5) |
304 cLocale := Copy(cLocaleFName,1,5) |
309 else |
305 else |
310 cLocale := Copy(cLocaleFName,1,2); |
306 cLocale := Copy(cLocaleFName,1,2); |
311 |
307 |
312 UserNick:= gameArgs[5]; |
308 UserNick:= gameArgs[5]; |
313 isSoundEnabled:= gameArgs[6] = '1'; |
309 SetSound(gameArgs[6] = '1'); |
314 isMusicEnabled:= gameArgs[7] = '1'; |
310 SetMusic(gameArgs[7] = '1'); |
315 cAltDamage:= gameArgs[8] = '1'; |
311 cAltDamage:= gameArgs[8] = '1'; |
316 PathPrefix:= gameArgs[9]; |
312 PathPrefix:= gameArgs[9]; |
317 UserPathPrefix:= '../Documents'; |
313 UserPathPrefix:= '../Documents'; |
318 recordFileName:= gameArgs[10]; |
314 recordFileName:= gameArgs[10]; |
319 cStereoMode:= smNone; |
315 cStereoMode:= smNone; |
392 s:= 'eproto ' + inttostr(cNetProtoVersion); |
388 s:= 'eproto ' + inttostr(cNetProtoVersion); |
393 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
389 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
394 |
390 |
395 InitTeams(); |
391 InitTeams(); |
396 AssignStores(); |
392 AssignStores(); |
397 |
393 InitSound(); |
398 if isSoundEnabled then |
|
399 InitSound(); |
|
400 |
394 |
401 isDeveloperMode:= false; |
395 isDeveloperMode:= false; |
402 |
|
403 TryDo(InitStepsFlags = cifAllInited, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); |
396 TryDo(InitStepsFlags = cifAllInited, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); |
404 |
|
405 ParseCommand('rotmask', true); |
397 ParseCommand('rotmask', true); |
406 |
398 |
407 MainLoop(); |
399 MainLoop(); |
|
400 |
408 // clean up SDL and GL context |
401 // clean up SDL and GL context |
409 OnDestroy(); |
402 OnDestroy(); |
410 // clean up all the other memory allocated |
403 // clean up all the other memory allocated |
411 freeEverything(true); |
404 freeEverything(true); |
412 if alsoShutdownFrontend then |
405 if alsoShutdownFrontend then |