hedgewars/hwengine.dpr
changeset 351 29bc9c36ad5f
parent 316 57d50189ad86
child 355 40c68869899e
equal deleted inserted replaced
350:c3ccec3834e8 351:29bc9c36ad5f
    41   uLandTemplates in 'uLandTemplates.pas',
    41   uLandTemplates in 'uLandTemplates.pas',
    42   uLandObjects in 'uLandObjects.pas',
    42   uLandObjects in 'uLandObjects.pas',
    43   uLandGraphics in 'uLandGraphics.pas',
    43   uLandGraphics in 'uLandGraphics.pas',
    44   uLocale in 'uLocale.pas',
    44   uLocale in 'uLocale.pas',
    45   uAmmos in 'uAmmos.pas',
    45   uAmmos in 'uAmmos.pas',
    46   uSHA in 'uSHA.pas';
    46   uSHA in 'uSHA.pas',
       
    47   uFloat in 'uFloat.pas';
    47 
    48 
    48 {$INCLUDE options.inc}
    49 {$INCLUDE options.inc}
    49 
    50 
    50 // also: GSHandlers.inc
    51 // also: GSHandlers.inc
    51 //       CCHandlers.inc
    52 //       CCHandlers.inc
   100 if flagMakeCapture then
   101 if flagMakeCapture then
   101    begin
   102    begin
   102    flagMakeCapture:= false;
   103    flagMakeCapture:= false;
   103    s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.bmp';
   104    s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.bmp';
   104    WriteLnToConsole('Saving ' + s);
   105    WriteLnToConsole('Saving ' + s);
   105    SDL_SaveBMP_RW(SDLPrimSurface, SDL_RWFromFile(PChar(s), 'wb'), 1)
   106 //   SDL_SaveBMP_RW(SDLPrimSurface, SDL_RWFromFile(PChar(s), 'wb'), 1)
   106    end;
   107    end;
   107 end;
   108 end;
   108 
   109 
   109 ////////////////////
   110 ////////////////////
   110 procedure OnDestroy;
   111 procedure OnDestroy;
   152 
   153 
   153 ////////////////////
   154 ////////////////////
   154 procedure GetParams;
   155 procedure GetParams;
   155 var c: integer;
   156 var c: integer;
   156 {$IFDEF DEBUGFILE}
   157 {$IFDEF DEBUGFILE}
   157     i: integer;    
   158     i: integer;
   158 {$ENDIF}
   159 {$ENDIF}
   159     p: TPathType;
   160     p: TPathType;
   160 begin
   161 begin
   161 {$IFDEF DEBUGFILE}
   162 {$IFDEF DEBUGFILE}
   162 AddFileLog('Prefix: "' + PathPrefix +'"');
   163 AddFileLog('Prefix: "' + PathPrefix +'"');
   192    end
   193    end
   193 end;
   194 end;
   194 
   195 
   195 procedure ShowMainWindow;
   196 procedure ShowMainWindow;
   196 begin
   197 begin
   197 if cFullScreen then ParseCommand('fullscr 1')
   198 if cFullScreen then ParseCommand('fullscr 1', true)
   198                else ParseCommand('fullscr 0');
   199                else ParseCommand('fullscr 0', true);
   199 SDL_ShowCursor(0)
   200 SDL_ShowCursor(0)
   200 end;
   201 end;
   201 
   202 
   202 ///////////////
   203 ///////////////
   203 procedure Game;
   204 procedure Game;
   223 
   224 
   224 s:= 'eproto ' + inttostr(cNetProtoVersion);
   225 s:= 'eproto ' + inttostr(cNetProtoVersion);
   225 SendIPCRaw(@s[0], Length(s) + 1); // send proto version
   226 SendIPCRaw(@s[0], Length(s) + 1); // send proto version
   226 
   227 
   227 InitTeams;
   228 InitTeams;
   228 ParseCommand('ammstore 91911111111111108');
   229 ParseCommand('ammstore 91911111111111108', true);
   229 AssignStores;
   230 AssignStores;
   230 
   231 
   231 if isSoundEnabled then InitSound;
   232 if isSoundEnabled then InitSound;
   232 InitWorld;
   233 InitWorld;
   233 
   234