hedgewars/uVariables.pas
branchqmlfrontend
changeset 11403 b894922d58cc
parent 11071 3851ce4f2061
parent 11363 9006e158a81f
child 11481 caa1e84c3ac2
equal deleted inserted replaced
11076:fcbdee9cdd74 11403:b894922d58cc
    19 {$INCLUDE "options.inc"}
    19 {$INCLUDE "options.inc"}
    20 
    20 
    21 unit uVariables;
    21 unit uVariables;
    22 interface
    22 interface
    23 
    23 
    24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils, uMatrix;
    24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils{$IFDEF GL2}, uMatrix{$ENDIF};
    25 
    25 
    26 var
    26 var
    27 /////// init flags ///////
    27 /////// init flags ///////
    28     cMinScreenWidth    : LongInt;
    28     cMinScreenWidth    : LongInt;
    29     cMinScreenHeight   : LongInt;
    29     cMinScreenHeight   : LongInt;
   233 
   233 
   234     LuaGoals        : shortstring;
   234     LuaGoals        : shortstring;
   235 
   235 
   236     LuaTemplateNumber : LongWord;
   236     LuaTemplateNumber : LongWord;
   237 
   237 
   238     LastVoice : TVoice = ( snd: sndNone; voicepack: nil );
   238     LastVoice : TVoice;
   239 
   239 
   240     mobileRecord: TMobileRecord;
   240     mobileRecord: TMobileRecord;
   241 
   241 
   242     MaxTextureSize: LongInt;
   242     MaxTextureSize: LongInt;
   243 
       
   244     ChatPasteBuffer: shortstring;
       
   245 
   243 
   246 /////////////////////////////////////
   244 /////////////////////////////////////
   247 //Buttons
   245 //Buttons
   248 {$IFDEF USE_TOUCH_INTERFACE}
   246 {$IFDEF USE_TOUCH_INTERFACE}
   249     buttonScale: GLFloat;
   247     buttonScale: GLFloat;
   254 {$ENDIF}
   252 {$ENDIF}
   255 
   253 
   256 
   254 
   257 var
   255 var
   258     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   256     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   259     cPathz: array[TPathType] of shortstring = (
   257     cPathz: array[TPathType] of shortstring;
       
   258 
       
   259 const
       
   260     cPathzInit: array[TPathType] of shortstring = (
   260         '',                              // ptNone
   261         '',                              // ptNone
   261         '/',                             // ptData
   262         '/',                             // ptData
   262         '/Graphics',                     // ptGraphics
   263         '/Graphics',                     // ptGraphics
   263         '/Themes',                       // ptThemes
   264         '/Themes',                       // ptThemes
   264         '/Themes/Bamboo',                // ptCurrTheme
   265         '/Themes/Bamboo',                // ptCurrTheme
   282         '/Shaders',                      // ptShaders
   283         '/Shaders',                      // ptShaders
   283         '/Config'                        // ptConfig
   284         '/Config'                        // ptConfig
   284     );
   285     );
   285 
   286 
   286 var
   287 var
   287     Fontz: array[THWFont] of THHFont = (
   288     Fontz: array[THWFont] of THHFont;
       
   289 
       
   290 const
       
   291     FontzInit: array[THWFont] of THHFont = (
   288             (Handle: nil;
   292             (Handle: nil;
   289             Height: 12;
   293             Height: 12;
   290             style: TTF_STYLE_NORMAL;
   294             style: TTF_STYLE_NORMAL;
   291             Name: 'DejaVuSans-Bold.ttf'),
   295             Name: 'DejaVuSans-Bold.ttf'),
   292             (Handle: nil;
   296             (Handle: nil;
   312             Name: 'wqy-zenhei.ttc')
   316             Name: 'wqy-zenhei.ttc')
   313             {$ENDIF}
   317             {$ENDIF}
   314             );
   318             );
   315 
   319 
   316 var
   320 var
   317     SpritesData: array[TSprite] of TSpriteData = (
   321     SpritesData: array[TSprite] of TSpriteData;
       
   322 
       
   323 const
       
   324     SpritesDataInit: array[TSprite] of TSpriteData = (
   318             (FileName:  'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   325             (FileName:  'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   319             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater
   326             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater
   320             (FileName:     'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   327             (FileName:     'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   321             Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud
   328             Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud
   322             (FileName:       'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   329             (FileName:       'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   414             (FileName:      'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   421             (FileName:      'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   415             Width:  80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR
   422             Width:  80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR
   416 {$IFDEF USE_TOUCH_INTERFACE}
   423 {$IFDEF USE_TOUCH_INTERFACE}
   417             (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   424             (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   418             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton
   425             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton
   419             (FileName: 'arrowUp'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   426             (FileName: 'arrowup'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   420             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowUp
   427             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowUp
   421             (FileName: 'arrowDown'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   428             (FileName: 'arrowdown'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   422             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowDown
   429             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowDown
   423             (FileName: 'arrowLeft'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   430             (FileName: 'arrowleft'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   424             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowLeft
   431             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowLeft
   425             (FileName: 'arrowRight'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   432             (FileName: 'arrowright'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   426             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowRight
   433             Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowRight
   427             (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   434             (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   428             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprAMWidget
   435             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprAMWidget
   429             (FileName: 'backjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   436             (FileName: 'backjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   430             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprJumpWidget
   437             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprJumpWidget
   431             (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   438             (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   432             Width: 120; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprPauseButton
   439             Width: 120; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprPauseButton
   433             (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;//TODO correct image
   440             (FileName: 'timerbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   434             Width: 120; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTimerButton
   441             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTimerButton
   435             (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;//TODO correct image
   442             (FileName: 'targetbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
   436             Width: 120; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTargetButton
   443             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTargetButton
       
   444             (FileName: 'switchbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;
       
   445             Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprSwitchButton
   437 {$ENDIF}
   446 {$ENDIF}
   438             (FileName:      'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
   447             (FileName:      'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
   439             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake
   448             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake
   440             (FileName:     'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   449             (FileName:     'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   441             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope
   450             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope
   709             (FileName:       'custom1'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   718             (FileName:       'custom1'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   710             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom1
   719             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom1
   711             (FileName:       'custom2'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   720             (FileName:       'custom2'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   712             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom2
   721             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom2
   713             (FileName:      'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   722             (FileName:      'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   714             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true)// sprAirMine
   723             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true), // sprAirMine
       
   724             (FileName:  'amAirMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
       
   725             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprHandAirMine
   715             );
   726             );
   716 
   727 
   717 const
   728 const
   718     Wavez: array [TWave] of record
   729     Wavez: array [TWave] of record
   719             Sprite: TSprite;
   730             Sprite: TSprite;
   730             (Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
   741             (Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
   731             (Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
   742             (Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
   732             (Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
   743             (Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
   733             );
   744             );
   734 
   745 
   735 var
   746 type
   736     Ammoz: array [TAmmoType] of record
   747     TAmmozRec = record
   737             NameId: TAmmoStrId;
   748             NameId: TAmmoStrId;
   738             NameTex: PTexture;
   749             NameTex: PTexture;
   739             Probability, NumberInCase: Longword;
   750             Probability, NumberInCase: Longword;
   740             Ammo: TAmmo;
   751             Ammo: TAmmo;
   741             Slot: 0..cMaxSlotIndex;
   752             Slot: 0..cMaxSlotIndex;
   744             isDamaging: boolean;
   755             isDamaging: boolean;
   745             SkipTurns: LongWord;
   756             SkipTurns: LongWord;
   746             PosCount: Longword;
   757             PosCount: Longword;
   747             PosSprite: TSprite;
   758             PosSprite: TSprite;
   748             ejectX, ejectY: Longint;
   759             ejectX, ejectY: Longint;
   749             end = (
   760             end;
       
   761 
       
   762 var
       
   763     Ammoz: array [TAmmoType] of TAmmozRec;
       
   764 
       
   765 const
       
   766     AmmozInit: array [TAmmoType] of TAmmozRec = (
   750             (NameId: sidNothing;
   767             (NameId: sidNothing;
   751             NameTex: nil;
   768             NameTex: nil;
   752             Probability: 0;
   769             Probability: 0;
   753             NumberInCase: 0;
   770             NumberInCase: 0;
   754             Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Effect;
   771             Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Effect;
  1342 // Mortar
  1359 // Mortar
  1343             (NameId: sidMortar;
  1360             (NameId: sidMortar;
  1344             NameTex: nil;
  1361             NameTex: nil;
  1345             Probability: 100;
  1362             Probability: 100;
  1346             NumberInCase: 4;
  1363             NumberInCase: 4;
  1347             Ammo: (Propz: 0;
  1364             Ammo: (Propz: ammoprop_NeedUpDown;
  1348                 Count: 4;
  1365                 Count: 4;
  1349                 NumPerTurn: 0;
  1366                 NumPerTurn: 0;
  1350                 Timer: 0;
  1367                 Timer: 0;
  1351                 Pos: 0;
  1368                 Pos: 0;
  1352                 AmmoType: amMortar;
  1369                 AmmoType: amMortar;
  2133             NameTex: nil;
  2150             NameTex: nil;
  2134             Probability: 0;
  2151             Probability: 0;
  2135             NumberInCase: 1;
  2152             NumberInCase: 1;
  2136             Ammo: (Propz: ammoprop_Power or
  2153             Ammo: (Propz: ammoprop_Power or
  2137                           ammoprop_AltUse or
  2154                           ammoprop_AltUse or
       
  2155                           ammoprop_NeedUpDown or
  2138                           ammoprop_NoRoundEnd;
  2156                           ammoprop_NoRoundEnd;
  2139                 Count: 2;
  2157                 Count: 2;
  2140                 NumPerTurn: 0;
  2158                 NumPerTurn: 0;
  2141                 Timer: 0;
  2159                 Timer: 0;
  2142                 Pos: 0;
  2160                 Pos: 0;
  2214             (NameId: sidLandGun;
  2232             (NameId: sidLandGun;
  2215             NameTex: nil;
  2233             NameTex: nil;
  2216             Probability: 20;
  2234             Probability: 20;
  2217             NumberInCase: 1;
  2235             NumberInCase: 1;
  2218             Ammo: (Propz: ammoprop_NoRoundEnd or
  2236             Ammo: (Propz: ammoprop_NoRoundEnd or
       
  2237                           ammoprop_NeedUpDown or
  2219                           ammoprop_Utility;
  2238                           ammoprop_Utility;
  2220                 Count: 1;
  2239                 Count: 1;
  2221                 NumPerTurn: 0;
  2240                 NumPerTurn: 0;
  2222                 Timer: 5001;
  2241                 Timer: 5001;
  2223                 Pos: 0;
  2242                 Pos: 0;
  2486     cTagsMask:= htTeamName or htName or htHealth;
  2505     cTagsMask:= htTeamName or htName or htHealth;
  2487 end;
  2506 end;
  2488 
  2507 
  2489 procedure initModule;
  2508 procedure initModule;
  2490 var s: shortstring;
  2509 var s: shortstring;
       
  2510     i: integer;
  2491 begin
  2511 begin
       
  2512     // init LastVoice
       
  2513     LastVoice.snd:= sndNone;
       
  2514     LastVoice.voicepack:= nil;
       
  2515 
       
  2516     // init arrays
       
  2517     Move(cPathzInit, cPathz, sizeof(cPathz));
       
  2518     Move(FontzInit, Fontz, sizeof(Fontz));
       
  2519     Move(SpritesDataInit, SpritesData, sizeof(SpritesData));
       
  2520     Move(AmmozInit, Ammoz, sizeof(Ammoz));
       
  2521 
       
  2522 
  2492     cLocale:= cLocaleFName;
  2523     cLocale:= cLocaleFName;
  2493     SplitByChar(cLocale, s, '.');
  2524     SplitByChar(cLocale, s, '.');
  2494 
  2525 
  2495     cFlattenFlakes      := false;
  2526     cFlattenFlakes      := false;
  2496     cFlattenClouds      := false;
  2527     cFlattenClouds      := false;
  2667     vobSDFramesCount:= 4;
  2698     vobSDFramesCount:= 4;
  2668     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2699     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2669     vobSDVelocity:= 15;
  2700     vobSDVelocity:= 15;
  2670     vobSDFallSpeed:= 250;
  2701     vobSDFallSpeed:= 250;
  2671 
  2702 
       
  2703 {$IFDEF MOBILE}
       
  2704     cMinScreenWidth  := min(cScreenWidth, 480);
       
  2705     cMinScreenHeight := min(cScreenHeight, 320);
       
  2706 {$ELSE}
  2672     cMinScreenWidth  := min(cScreenWidth, 640);
  2707     cMinScreenWidth  := min(cScreenWidth, 640);
  2673     cMinScreenHeight := min(cScreenHeight, 480);
  2708     cMinScreenHeight := min(cScreenHeight, 480);
       
  2709 {$ENDIF}
  2674 
  2710 
  2675     cNewScreenWidth    := cScreenWidth;
  2711     cNewScreenWidth    := cScreenWidth;
  2676     cNewScreenHeight   := cScreenHeight;
  2712     cNewScreenHeight   := cScreenHeight;
  2677     cScreenResizeDelay := 0;
  2713     cScreenResizeDelay := 0;
  2678 
  2714 
  2694 
  2730 
  2695     cStereoDepth:= 0;
  2731     cStereoDepth:= 0;
  2696     cViewLimitsDebug:= false;
  2732     cViewLimitsDebug:= false;
  2697     AprilOne := false;
  2733     AprilOne := false;
  2698 
  2734 
  2699     ChatPasteBuffer:= '';
  2735     // initialize pointers to nil
       
  2736     // (don't rely on implicit init of fpc, because that one only happens ONCE when used as lib)
       
  2737     CurAmmoGear:= nil;
       
  2738     lastGearByUID:= nil;
       
  2739     GearsList:= nil;
       
  2740     CurrentTeam:= nil;
       
  2741     PreviousTeam:= nil;
       
  2742     CurrentHedgehog:= nil;
       
  2743     FollowGear:= nil;
       
  2744     lastVisualGearByUID:= nil;
       
  2745 
       
  2746     ChefHatTexture:= nil;
       
  2747     CrosshairTexture:= nil;
       
  2748     GenericHealthTexture:= nil;
       
  2749     WeaponTooltipTex:= nil;
       
  2750     HHTexture:= nil;
       
  2751     LandBackSurface:= nil;
       
  2752     ConfirmTexture:= nil;
       
  2753     MissionIcons:= nil;
       
  2754     ropeIconTex:= nil;
       
  2755 
       
  2756     for i:= Low(ClansArray) to High(ClansArray) do
       
  2757         begin
       
  2758         ClansArray[i]:= nil;
       
  2759         end;
       
  2760 
       
  2761     for i:= Low(TeamsArray) to High(TeamsArray) do
       
  2762         begin
       
  2763         TeamsArray[i]:= nil;
       
  2764         end;
       
  2765 
       
  2766     for i:= Low(CountTexz) to High(CountTexz) do
       
  2767         begin
       
  2768         CountTexz[i]:= nil;
       
  2769         end;
       
  2770 
  2700 end;
  2771 end;
  2701 
  2772 
  2702 procedure freeModule;
  2773 procedure freeModule;
  2703 begin
  2774 begin
  2704 end;
  2775 end;