hedgewars/hwengine.pas
branchhedgeroid
changeset 6341 ccc0a58e123d
parent 6334 b05d3af9a58e
child 6415 af2047bb4f70
equal deleted inserted replaced
6338:633af6fec34f 6341:ccc0a58e123d
    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,
    33      uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions,
    34      sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted,uTouch {$IFDEF ANDROID}, GLUnit {$ENDIF};
    34      sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted
       
    35      {$IFDEF SDL13}, uTouch{$ENDIF}{$IFDEF ANDROID}, GLUnit{$ENDIF};
    35 
    36 
    36 {$IFDEF HWLIBRARY}
    37 {$IFDEF HWLIBRARY}
    37 procedure initEverything(complete:boolean);
    38 procedure initEverything(complete:boolean);
    38 procedure freeEverything(complete:boolean);
    39 procedure freeEverything(complete:boolean);
    39 procedure Game(gameArgs: PPChar); cdecl; export;
    40 procedure Game(gameArgs: PPChar); cdecl; export;
   256 begin
   257 begin
   257 {$IFDEF HWLIBRARY}
   258 {$IFDEF HWLIBRARY}
   258     cBits:= 32;
   259     cBits:= 32;
   259     cFullScreen:= false;
   260     cFullScreen:= false;
   260     cTimerInterval:= 8;
   261     cTimerInterval:= 8;
   261     PathPrefix:= 'Data';
       
   262     UserPathPrefix:= '../Documents';
       
   263     cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF};
   262     cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF};
   264     val(gameArgs[0], ipcPort);
   263     val(gameArgs[0], ipcPort);
   265     val(gameArgs[1], cScreenWidth);
   264     val(gameArgs[1], cScreenWidth);
   266     val(gameArgs[2], cScreenHeight);
   265     val(gameArgs[2], cScreenHeight);
   267     val(gameArgs[3], cReducedQuality);
   266     val(gameArgs[3], cReducedQuality);
   271     UserNick:= gameArgs[5];
   270     UserNick:= gameArgs[5];
   272     isSoundEnabled:= gameArgs[6] = '1';
   271     isSoundEnabled:= gameArgs[6] = '1';
   273     isMusicEnabled:= gameArgs[7] = '1';
   272     isMusicEnabled:= gameArgs[7] = '1';
   274     cAltDamage:= gameArgs[8] = '1';
   273     cAltDamage:= gameArgs[8] = '1';
   275     PathPrefix:= gameArgs[9];
   274     PathPrefix:= gameArgs[9];
   276     UserPathPrefix:= PathPrefix;
   275     UserPathPrefix:= '../Documents';
   277     recordFileName:= gameArgs[10];
   276     recordFileName:= gameArgs[10];
   278     cStereoMode:= smNone;
   277     cStereoMode:= smNone;
   279 {$ENDIF}
   278 {$ENDIF}
   280     cMinScreenWidth:= min(cScreenWidth, cMinScreenWidth);
   279     cMinScreenWidth:= min(cScreenWidth, cMinScreenWidth);
   281     cMinScreenHeight:= min(cScreenHeight, cMinScreenHeight);
   280     cMinScreenHeight:= min(cScreenHeight, cMinScreenHeight);
   386 
   385 
   387     uIO.initModule;
   386     uIO.initModule;
   388 
   387 
   389     if complete then
   388     if complete then
   390     begin
   389     begin
   391 {$IFDEF ANDROID}
   390 {$IFDEF ANDROID}GLUnit.init;{$ENDIF}
   392 	GLUnit.init;
   391 {$IFDEF SDL13}uTouch.initModule;{$ENDIF}
   393 {$ENDIF}
       
   394         uTouch.initModule;
       
   395 	uAI.initModule;
   392 	uAI.initModule;
   396         //uAIActions does not need initialization
   393         //uAIActions does not need initialization
   397         //uAIAmmoTests does not need initialization
   394         //uAIAmmoTests does not need initialization
   398         uAIMisc.initModule;
   395         uAIMisc.initModule;
   399         uAmmos.initModule;
   396         uAmmos.initModule;