hedgewars/uVariables.pas
branchwebgl
changeset 8444 75db7bb8dce8
parent 8330 aaefa587e277
parent 8373 209c9ba77a09
child 8833 c13ebed437cb
equal deleted inserted replaced
8340:46a9fde631f4 8444:75db7bb8dce8
    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     ipcPort            : Word;
    39     ipcPort            : Word;
    38     cFullScreen        : boolean;
    40     cFullScreen        : boolean;
   173 
   175 
   174     WaterColorArray : array[0..3] of HwColor4f;
   176     WaterColorArray : array[0..3] of HwColor4f;
   175     SDWaterColorArray : array[0..3] of HwColor4f;
   177     SDWaterColorArray : array[0..3] of HwColor4f;
   176     SDTint          : LongInt;
   178     SDTint          : LongInt;
   177 
   179 
   178     CursorPoint     : TPoint;
   180     TargetCursorPoint     : TPoint;
   179     TargetPoint     : TPoint;
   181     CursorPoint           : TPoint;
       
   182     TargetPoint           : TPoint;
   180 
   183 
   181     ScreenFade      : TScreenFade;
   184     ScreenFade      : TScreenFade;
   182     ScreenFadeValue : LongInt;
   185     ScreenFadeValue : LongInt;
   183     ScreenFadeSpeed : LongInt;
   186     ScreenFadeSpeed : LongInt;
   184 
   187 
  2342 
  2345 
  2343 procedure preInitModule;
  2346 procedure preInitModule;
  2344 begin
  2347 begin
  2345     // initialisation flags - they are going to be overwritten by program args
  2348     // initialisation flags - they are going to be overwritten by program args
  2346 
  2349 
  2347     cScreenWidth    := 1024;
  2350     cFullscreenWidth  := 0;
  2348     cScreenHeight   := 768;
  2351     cFullscreenHeight := 0;
       
  2352     cWindowedWidth    := 1024;
       
  2353     cWindowedHeight   := 768;
       
  2354     cScreenWidth      := cWindowedWidth;
       
  2355     cScreenHeight     := cWindowedHeight;
       
  2356 
  2349     cShowFPS        := false;
  2357     cShowFPS        := false;
  2350     cAltDamage      := true;
  2358     cAltDamage      := true;
  2351     cTimerInterval  := 8;
  2359     cTimerInterval  := 8;
  2352     cReducedQuality := rqNone;
  2360     cReducedQuality := rqNone;
  2353     cLocaleFName    := 'en.txt';
  2361     cLocaleFName    := 'en.txt';
  2524     vobSDFramesCount:= 4;
  2532     vobSDFramesCount:= 4;
  2525     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2533     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2526     vobSDVelocity:= 15;
  2534     vobSDVelocity:= 15;
  2527     vobSDFallSpeed:= 250;
  2535     vobSDFallSpeed:= 250;
  2528 
  2536 
  2529     cMinScreenWidth:= min(cScreenWidth, 640);
  2537     cMinScreenWidth  := min(cScreenWidth, 640);
  2530     cMinScreenHeight:= min(cScreenHeight, 480);
  2538     cMinScreenHeight := min(cScreenHeight, 480);
  2531     cOrigScreenWidth:= cScreenWidth;
       
  2532     cOrigScreenHeight:= cScreenHeight;
       
  2533 
  2539 
  2534     cNewScreenWidth    := cScreenWidth;
  2540     cNewScreenWidth    := cScreenWidth;
  2535     cNewScreenHeight   := cScreenHeight;
  2541     cNewScreenHeight   := cScreenHeight;
  2536     cScreenResizeDelay := 0;
  2542     cScreenResizeDelay := 0;
       
  2543 
       
  2544     // make sure fullscreen resolution is always initialised somehow
       
  2545     if cFullscreenWidth = 0 then
       
  2546         cFullscreenWidth:= min(cWindowedWidth, 640);
       
  2547     if cFullscreenHeight = 0 then
       
  2548         cFullscreenHeight:= min(cWindowedHeight, 480);
       
  2549 
  2537 
  2550 
  2538     LuaGoals:= '';
  2551     LuaGoals:= '';
  2539     cMapName:= '';
  2552     cMapName:= '';
  2540 
  2553 
  2541     LuaTemplateNumber:= 0;
  2554     LuaTemplateNumber:= 0;