27 interface |
27 interface |
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, uInputHandler |
32 uses {$IFDEF IPHONEOS}cmem, {$ENDIF} SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uInputHandler |
33 , uSound, uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uAILandMarks, uLandTexture, uCollisions |
33 , uSound, uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uAILandMarks, uLandTexture, uCollisions |
34 , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted |
34 , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted |
35 , uPhysFSLayer, uCursor, uRandom, ArgParsers, uVisualGearsHandlers, uTextures, uRender |
35 , uPhysFSLayer, uCursor, uRandom, ArgParsers, uVisualGearsHandlers, uTextures, uRender |
36 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF} |
36 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF} |
37 {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF} |
37 {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF} |
539 uScript.freeModule; |
539 uScript.freeModule; |
540 end; |
540 end; |
541 |
541 |
542 /////////////////////////////////////////////////////////////////////////////// |
542 /////////////////////////////////////////////////////////////////////////////// |
543 procedure GenLandPreview; |
543 procedure GenLandPreview; |
|
544 {$IFDEF MOBILE} |
|
545 var Preview: TPreview; |
|
546 {$ELSE} |
544 var Preview: TPreviewAlpha; |
547 var Preview: TPreviewAlpha; |
|
548 {$ENDIF MOBILE} |
545 begin |
549 begin |
546 initEverything(false); |
550 initEverything(false); |
547 |
551 |
548 InitIPC; |
552 InitIPC; |
549 IPCWaitPongEvent; |
553 IPCWaitPongEvent; |
550 TryDo(InitStepsFlags = cifRandomize, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); |
554 TryDo(InitStepsFlags = cifRandomize, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true); |
551 |
555 |
552 ScriptOnPreviewInit; |
556 ScriptOnPreviewInit; |
|
557 {$IFDEF MOBILE} |
|
558 GenPreview(Preview); |
|
559 {$ELSE} |
553 GenPreviewAlpha(Preview); |
560 GenPreviewAlpha(Preview); |
|
561 {$ENDIF MOBILE} |
554 WriteLnToConsole('Sending preview...'); |
562 WriteLnToConsole('Sending preview...'); |
555 SendIPCRaw(@Preview, sizeof(Preview)); |
563 SendIPCRaw(@Preview, sizeof(Preview)); |
556 SendIPCRaw(@MaxHedgehogs, sizeof(byte)); |
564 SendIPCRaw(@MaxHedgehogs, sizeof(byte)); |
557 WriteLnToConsole('Preview sent, disconnect'); |
565 WriteLnToConsole('Preview sent, disconnect'); |
558 freeEverything(false); |
566 freeEverything(false); |