hedgewars/uVariables.pas
branchflibqtfrontend
changeset 8363 0b4ac686fc44
parent 8358 274afc318dca
child 8373 209c9ba77a09
equal deleted inserted replaced
8306:50fe80adbfcb 8363:0b4ac686fc44
    25 
    25 
    26 var
    26 var
    27 /////// init flags ///////
    27 /////// init flags ///////
    28     cMinScreenWidth    : LongInt;
    28     cMinScreenWidth    : LongInt;
    29     cMinScreenHeight   : LongInt;
    29     cMinScreenHeight   : LongInt;
       
    30     cFullscreenWidth   : LongInt;
       
    31     cFullscreenHeight  : LongInt;
       
    32     cWindowedWidth     : LongInt;
       
    33     cWindowedHeight    : LongInt;
    30     cScreenWidth       : LongInt;
    34     cScreenWidth       : LongInt;
    31     cScreenHeight      : LongInt;
    35     cScreenHeight      : LongInt;
    32     cOrigScreenWidth   : LongInt;
       
    33     cOrigScreenHeight  : LongInt;
       
    34     cNewScreenWidth    : LongInt;
    36     cNewScreenWidth    : LongInt;
    35     cNewScreenHeight   : LongInt;
    37     cNewScreenHeight   : LongInt;
    36     cScreenResizeDelay : LongWord;
    38     cScreenResizeDelay : LongWord;
    37     cBits              : LongInt;
       
    38     ipcPort            : Word;
    39     ipcPort            : Word;
    39     cFullScreen        : boolean;
    40     cFullScreen        : boolean;
    40     cLocaleFName       : shortstring;
    41     cLocaleFName       : shortstring;
    41     cLocale            : shortstring;
    42     cLocale            : shortstring;
    42     cTimerInterval     : LongInt;
    43     cTimerInterval     : LongInt;
  2323 
  2324 
  2324 procedure preInitModule;
  2325 procedure preInitModule;
  2325 begin
  2326 begin
  2326     // initialisation flags - they are going to be overwritten by program args
  2327     // initialisation flags - they are going to be overwritten by program args
  2327 
  2328 
  2328     cScreenWidth    := 1024;
  2329     cFullscreenWidth  := 0;
  2329     cScreenHeight   := 768;
  2330     cFullscreenHeight := 0;
  2330     cBits           := 32;
  2331     cWindowedWidth    := 1024;
       
  2332     cWindowedHeight   := 768;
       
  2333     cScreenWidth      := cWindowedWidth;
       
  2334     cScreenHeight     := cWindowedHeight;
       
  2335 
  2331     cShowFPS        := false;
  2336     cShowFPS        := false;
  2332     cAltDamage      := true;
  2337     cAltDamage      := true;
  2333     cTimerInterval  := 8;
  2338     cTimerInterval  := 8;
  2334     cReducedQuality := rqNone;
  2339     cReducedQuality := rqNone;
  2335     cLocaleFName    := 'en.txt';
  2340     cLocaleFName    := 'en.txt';
  2506     vobSDFramesCount:= 4;
  2511     vobSDFramesCount:= 4;
  2507     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2512     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2508     vobSDVelocity:= 15;
  2513     vobSDVelocity:= 15;
  2509     vobSDFallSpeed:= 250;
  2514     vobSDFallSpeed:= 250;
  2510 
  2515 
  2511     cMinScreenWidth:= min(cScreenWidth, 640);
  2516     cMinScreenWidth  := min(cScreenWidth, 640);
  2512     cMinScreenHeight:= min(cScreenHeight, 480);
  2517     cMinScreenHeight := min(cScreenHeight, 480);
  2513     cOrigScreenWidth:= cScreenWidth;
       
  2514     cOrigScreenHeight:= cScreenHeight;
       
  2515 
  2518 
  2516     cNewScreenWidth    := cScreenWidth;
  2519     cNewScreenWidth    := cScreenWidth;
  2517     cNewScreenHeight   := cScreenHeight;
  2520     cNewScreenHeight   := cScreenHeight;
  2518     cScreenResizeDelay := 0;
  2521     cScreenResizeDelay := 0;
       
  2522 
       
  2523     // make sure fullscreen resolution is always initialised somehow
       
  2524     if cFullscreenWidth = 0 then
       
  2525         cFullscreenWidth:= min(cWindowedWidth, 640);
       
  2526     if cFullscreenHeight = 0 then
       
  2527         cFullscreenHeight:= min(cWindowedHeight, 480);
       
  2528 
  2519 
  2529 
  2520     LuaGoals:= '';
  2530     LuaGoals:= '';
  2521     cMapName:= '';
  2531     cMapName:= '';
  2522 
  2532 
  2523     LuaTemplateNumber:= 0;
  2533     LuaTemplateNumber:= 0;