hedgewars/uVariables.pas
changeset 7628 bc7b1d228a2c
parent 7411 efc75c2d3be9
parent 7615 b39beffcf05e
child 7629 d624030abf24
equal deleted inserted replaced
7533:7ee319134713 7628:bc7b1d228a2c
    50     UserNick        : shortstring = '';
    50     UserNick        : shortstring = '';
    51     recordFileName  : shortstring = '';
    51     recordFileName  : shortstring = '';
    52     cReadyDelay     : Longword    = 5000;
    52     cReadyDelay     : Longword    = 5000;
    53     cStereoMode     : TStereoMode = smNone;
    53     cStereoMode     : TStereoMode = smNone;
    54     cOnlyStats      : boolean = False;
    54     cOnlyStats      : boolean = False;
       
    55 {$IFDEF USE_VIDEO_RECORDING}
       
    56     RecPrefix      : shortstring;
       
    57     cAVFormat       : shortstring;
       
    58     cVideoCodec     : shortstring;
       
    59     cVideoFramerateNum : LongInt;
       
    60     cVideoFramerateDen : LongInt;
       
    61     cVideoQuality      : LongInt;
       
    62     cAudioCodec     : shortstring;
       
    63 {$ENDIF}
    55 //////////////////////////
    64 //////////////////////////
    56     cMapName        : shortstring = '';
    65     cMapName        : shortstring = '';
    57 
    66 
    58     isCursorVisible : boolean;
    67     isCursorVisible : boolean;
    59     isInLag         : boolean;
    68     isInLag         : boolean;
    60     isPaused        : boolean;
    69     isPaused        : boolean;
    61     isInMultiShoot  : boolean;
    70     isInMultiShoot  : boolean;
    62     isSpeed         : boolean;
    71     isSpeed         : boolean;
       
    72     SpeedStart      : LongWord;
    63 
    73 
    64     fastUntilLag    : boolean;
    74     fastUntilLag    : boolean;
       
    75     fastScrolling   : boolean;
    65     autoCameraOn    : boolean;
    76     autoCameraOn    : boolean;
    66 
    77 
    67     CheckSum        : LongWord;
    78     CheckSum        : LongWord;
    68     CampaignVariable: shortstring;
    79     CampaignVariable: shortstring;
    69     GameTicks       : LongWord;
    80     GameTicks       : LongWord;
   182     hiTicks: Word;
   193     hiTicks: Word;
   183 
   194 
   184     LuaGoals        : shortstring;
   195     LuaGoals        : shortstring;
   185     hiddenHedgehogs : array [0..cMaxHHs] of PHedgehog;
   196     hiddenHedgehogs : array [0..cMaxHHs] of PHedgehog;
   186     hiddenHedgehogsNumber : longint;
   197     hiddenHedgehogsNumber : longint;
       
   198 
       
   199     LuaTemplateNumber : LongWord;
   187 
   200 
   188     VoiceList : array[0..7] of TVoice =  (
   201     VoiceList : array[0..7] of TVoice =  (
   189                     ( snd: sndNone; voicepack: nil),
   202                     ( snd: sndNone; voicepack: nil),
   190                     ( snd: sndNone; voicepack: nil),
   203                     ( snd: sndNone; voicepack: nil),
   191                     ( snd: sndNone; voicepack: nil),
   204                     ( snd: sndNone; voicepack: nil),
   644             (FileName:  'SDDroplet'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
   657             (FileName:  'SDDroplet'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
   645             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSDDroplet
   658             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSDDroplet
   646             (FileName:  'TARDIS'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   659             (FileName:  'TARDIS'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   647             Width:  48; Height: 79; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprTardis
   660             Width:  48; Height: 79; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprTardis
   648             (FileName:  'slider'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   661             (FileName:  'slider'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   649             Width: 3; Height: 17; imageWidth: 3; imageHeight: 17; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprSlider
   662             Width: 3; Height: 17; imageWidth: 3; imageHeight: 17; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false), // sprSlider
       
   663             (FileName:  'botlevels'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
       
   664             Width: 22; Height: 15; imageWidth: 22; imageHeight: 15; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprBotlevels
   650             );
   665             );
   651 
   666 
   652 const
   667 const
   653     Wavez: array [TWave] of record
   668     Wavez: array [TWave] of record
   654             Sprite: TSprite;
   669             Sprite: TSprite;
  1446             NameTex: nil;
  1461             NameTex: nil;
  1447             Probability: 100;
  1462             Probability: 100;
  1448             NumberInCase: 1;
  1463             NumberInCase: 1;
  1449             Ammo: (Propz: ammoprop_ForwMsgs or 
  1464             Ammo: (Propz: ammoprop_ForwMsgs or 
  1450                           ammoprop_NoCrosshair or 
  1465                           ammoprop_NoCrosshair or 
  1451                           ammoprop_DontHold;
  1466                           ammoprop_DontHold or
       
  1467                           ammoprop_Track;
  1452                 Count: 1;
  1468                 Count: 1;
  1453                 NumPerTurn: 0;
  1469                 NumPerTurn: 0;
  1454                 Timer: 0;
  1470                 Timer: 0;
  1455                 Pos: 0;
  1471                 Pos: 0;
  1456                 AmmoType: amCake;
  1472                 AmmoType: amCake;
  2444 
  2460 
  2445     // stereoscopic framebuffer and textures
  2461     // stereoscopic framebuffer and textures
  2446     framel, framer, depthl, depthr: GLuint;
  2462     framel, framer, depthl, depthr: GLuint;
  2447     texl, texr: GLuint;
  2463     texl, texr: GLuint;
  2448 
  2464 
       
  2465     // video recorder framebuffer and texture
       
  2466     defaultFrame, depthv: GLuint;
       
  2467     texv: GLuint;
       
  2468 
  2449     VisualGearLayers: array[0..6] of PVisualGear;
  2469     VisualGearLayers: array[0..6] of PVisualGear;
  2450     lastVisualGearByUID: PVisualGear;
  2470     lastVisualGearByUID: PVisualGear;
  2451     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2471     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2452     vobVelocity, vobFallSpeed: LongInt;
  2472     vobVelocity, vobFallSpeed: LongInt;
  2453     vobSDFrameTicks, vobSDFramesCount, vobSDCount: Longword;
  2473     vobSDFrameTicks, vobSDFramesCount, vobSDCount: Longword;
  2569     cCaseFactor     := 5;  {0..9}
  2589     cCaseFactor     := 5;  {0..9}
  2570     cLandMines      := 4;
  2590     cLandMines      := 4;
  2571     cExplosives     := 2;
  2591     cExplosives     := 2;
  2572 
  2592 
  2573     GameState       := Low(TGameState);
  2593     GameState       := Low(TGameState);
  2574     GameType        := gmtLocal;
  2594 //    GameType        := gmtLocal;
  2575     zoom            := cDefaultZoomLevel;
  2595     zoom            := cDefaultZoomLevel;
  2576     ZoomValue       := cDefaultZoomLevel;
  2596     ZoomValue       := cDefaultZoomLevel;
  2577     WeaponTooltipTex:= nil;
  2597     WeaponTooltipTex:= nil;
  2578     cLaserSighting  := false;
  2598     cLaserSighting  := false;
  2579     cVampiric       := false;
  2599     cVampiric       := false;
  2584     isCursorVisible := false;
  2604     isCursorVisible := false;
  2585     isInLag         := false;
  2605     isInLag         := false;
  2586     isPaused        := false;
  2606     isPaused        := false;
  2587     isInMultiShoot  := false;
  2607     isInMultiShoot  := false;
  2588     isSpeed         := false;
  2608     isSpeed         := false;
       
  2609     SpeedStart      := 0;
  2589     fastUntilLag    := false;
  2610     fastUntilLag    := false;
       
  2611     fastScrolling   := false;
  2590     autoCameraOn    := true;
  2612     autoCameraOn    := true;
  2591     cScriptName     := '';
  2613     cScriptName     := '';
  2592     cSeed           := '';
  2614     cSeed           := '';
  2593     cVolumeDelta    := 0;
  2615     cVolumeDelta    := 0;
  2594     cHasFocus       := true;
  2616     cHasFocus       := true;
  2619     ExplosionBorderColor:= $FF808080;
  2641     ExplosionBorderColor:= $FF808080;
  2620     WaterOpacity:= $80;
  2642     WaterOpacity:= $80;
  2621     SDWaterOpacity:= $80;
  2643     SDWaterOpacity:= $80;
  2622 
  2644 
  2623     LuaGoals:= '';
  2645     LuaGoals:= '';
       
  2646 
       
  2647     LuaTemplateNumber:= 0;
  2624 end;
  2648 end;
  2625 
  2649 
  2626 procedure freeModule;
  2650 procedure freeModule;
  2627 begin
  2651 begin
  2628     // re-init flags so they will always contain safe values
  2652     // re-init flags so they will always contain safe values