hedgewars/uVariables.pas
changeset 4849 e7b1f0aaf36f
parent 4845 9a0f5377c529
parent 4844 20b81fafd236
child 4867 e604ee83e34f
equal deleted inserted replaced
4847:7f21c08fd7d2 4849:e7b1f0aaf36f
     8 var
     8 var
     9 /////// init flags ///////
     9 /////// init flags ///////
    10     cScreenWidth    : LongInt     = 1024;
    10     cScreenWidth    : LongInt     = 1024;
    11     cScreenHeight   : LongInt     = 768;
    11     cScreenHeight   : LongInt     = 768;
    12     cBits           : LongInt     = 32;
    12     cBits           : LongInt     = 32;
    13     //ipcPort is in uIO
    13     ipcPort         : Word        = 0;
    14     cFullScreen     : boolean     = false;
    14     cFullScreen     : boolean     = false;
    15     isSoundEnabled  : boolean     = true;
    15     isSoundEnabled  : boolean     = true;
    16     isMusicEnabled  : boolean     = false;
    16     isMusicEnabled  : boolean     = false;
    17     cLocaleFName    : shortstring = 'en.txt';
    17     cLocaleFName    : shortstring = 'en.txt';
    18     cInitVolume     : LongInt     = 100;
    18     cInitVolume     : LongInt     = 100;
    19     cTimerInterval  : LongInt     = 8;
    19     cTimerInterval  : LongInt     = 8;
    20     PathPrefix      : shortstring = './';
    20     PathPrefix      : shortstring = './';
    21     cShowFPS        : boolean     = false;
    21     cShowFPS        : boolean     = false;
    22     cAltDamage      : boolean     = true;
    22     cAltDamage      : boolean     = true;
    23     cReducedQuality : LongWord    = rqNone;
    23     cReducedQuality : LongWord    = rqNone;
    24     //userNick is in uChat
    24     UserNick        : shortstring = '';
    25     recordFileName  : shortstring = '';
    25     recordFileName  : shortstring = '';
    26     cReadyDelay     : Longword    = 5000;
    26     cReadyDelay     : Longword    = 5000;
    27     cLogfileBase    : shortstring = 'debug';
    27     cLogfileBase    : shortstring = 'debug';
       
    28     cStereoMode     : TStereoMode = smNone;
    28 //////////////////////////
    29 //////////////////////////
    29 
    30 
    30     alsoShutdownFrontend: boolean = false;
    31     alsoShutdownFrontend: boolean = false;
    31 
    32 
    32     isCursorVisible : boolean;
    33     isCursorVisible : boolean;
   142     SDLwindow       : PSDL_Window;
   143     SDLwindow       : PSDL_Window;
   143 {$ENDIF}
   144 {$ENDIF}
   144 
   145 
   145     WorldDx: LongInt;
   146     WorldDx: LongInt;
   146     WorldDy: LongInt;
   147     WorldDy: LongInt;
       
   148 
       
   149     hiTicks: Word;
   147 
   150 
   148 const
   151 const
   149     cHHFileName = 'Hedgehog';
   152     cHHFileName = 'Hedgehog';
   150     cCHFileName = 'Crosshair';
   153     cCHFileName = 'Crosshair';
   151     cThemeCFGFilename = 'theme.cfg';
   154     cThemeCFGFilename = 'theme.cfg';
  2077     HorizontOffset: LongInt;
  2080     HorizontOffset: LongInt;
  2078 {$IFDEF COUNTTICKS}
  2081 {$IFDEF COUNTTICKS}
  2079     cntTicks: LongWord;
  2082     cntTicks: LongWord;
  2080 {$ENDIF}
  2083 {$ENDIF}
  2081     cOffsetY: LongInt;
  2084     cOffsetY: LongInt;
       
  2085     AFRToggle: Boolean;
       
  2086     bAFRRight: Boolean;
       
  2087 
  2082 
  2088 
  2083     PixelFormat: PSDL_PixelFormat;
  2089     PixelFormat: PSDL_PixelFormat;
  2084     SDLPrimSurface: PSDL_Surface;
  2090     SDLPrimSurface: PSDL_Surface;
  2085     PauseTexture,
  2091     PauseTexture,
  2086     SyncTexture,
  2092     SyncTexture,
  2091     squaresize : LongInt;
  2097     squaresize : LongInt;
  2092     numsquares : LongInt;
  2098     numsquares : LongInt;
  2093     ProgrTex: PTexture;
  2099     ProgrTex: PTexture;
  2094     MissionIcons: PSDL_Surface;
  2100     MissionIcons: PSDL_Surface;
  2095     ropeIconTex: PTexture;
  2101     ropeIconTex: PTexture;
       
  2102     // orientation of the viewport
  2096     rotationQt: GLfloat;
  2103     rotationQt: GLfloat;
       
  2104     // stereoscopic framebuffer and textures
       
  2105     framel, framer, depthl, depthr: GLuint;
       
  2106     texl, texr: GLuint;
  2097 
  2107 
  2098 
  2108 
  2099     VisualGearsList: PVisualGear;
  2109     VisualGearsList: PVisualGear;
  2100     lastVisualGearByUID: PVisualGear;
  2110     lastVisualGearByUID: PVisualGear;
  2101     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2111     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2272 
  2282 
  2273 {$IFDEF SDL13}
  2283 {$IFDEF SDL13}
  2274     SDLwindow       := nil;
  2284     SDLwindow       := nil;
  2275 {$ENDIF}
  2285 {$ENDIF}
  2276 
  2286 
  2277     // those values still aren't perfect
  2287     // those values still are not perfect
  2278     cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);
  2288     cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);
  2279     cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH);
  2289     cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH);
  2280     cScreenSpace:= cRightScreenBorder - cLeftScreenBorder;
  2290     cScreenSpace:= cRightScreenBorder - cLeftScreenBorder;
  2281 
  2291 
  2282     if isPhone() then
  2292     if isPhone() then
  2295 begin
  2305 begin
  2296     // re-init flags so they will always contain safe values
  2306     // re-init flags so they will always contain safe values
  2297     cScreenWidth    := 1024;
  2307     cScreenWidth    := 1024;
  2298     cScreenHeight   := 768;
  2308     cScreenHeight   := 768;
  2299     cBits           := 32;
  2309     cBits           := 32;
  2300     //ipcPort is in uIO
  2310     ipcPort         := 0;
  2301     cFullScreen     := false;
  2311     cFullScreen     := false;
  2302     isSoundEnabled  := true;
  2312     isSoundEnabled  := true;
  2303     isMusicEnabled  := false;
  2313     isMusicEnabled  := false;
  2304     cLocaleFName    := 'en.txt';
  2314     cLocaleFName    := 'en.txt';
  2305     cInitVolume     := 100;
  2315     cInitVolume     := 100;
  2306     cTimerInterval  := 8;
  2316     cTimerInterval  := 8;
  2307     PathPrefix := './';
  2317     PathPrefix      := './';
  2308     cShowFPS        := false;
  2318     cShowFPS        := false;
  2309     cAltDamage      := true;
  2319     cAltDamage      := true;
  2310     cReducedQuality := rqNone;
  2320     cReducedQuality := rqNone;
  2311     //userNick is in uChat
  2321     UserNick        := '';
  2312     recordFileName  := '';
  2322     recordFileName  := '';
  2313     cReadyDelay     := 5000;
  2323     cReadyDelay     := 5000;
       
  2324     cStereoMode     := smNone;
  2314 end;
  2325 end;
  2315 
  2326 
  2316 end.
  2327 end.