hedgewars/uMisc.pas
changeset 3697 d5b30d6373fc
parent 3695 c11abf387a7d
child 3709 c7849b74748d
equal deleted inserted replaced
3695:c11abf387a7d 3697:d5b30d6373fc
    68     TrainingTimeInM : Longword;
    68     TrainingTimeInM : Longword;
    69     TrainingTimeMax : Longword;
    69     TrainingTimeMax : Longword;
    70 
    70 
    71     TimeTrialStartTime: Longword;
    71     TimeTrialStartTime: Longword;
    72     TimeTrialStopTime : Longword;
    72     TimeTrialStopTime : Longword;
    73     
    73 
    74     // init flags
    74     // init flags
    75     cScreenWidth    : LongInt = 1024;
    75     cScreenWidth    : LongInt = 1024;
    76     cScreenHeight   : LongInt = 768;
    76     cScreenHeight   : LongInt = 768;
    77     cBits           : LongInt = 32;
    77     cBits           : LongInt = 32;
    78     cBitsStr        : string[2] = '32';
    78     cBitsStr        : string[2] = '32';
    87     cShowFPS        : boolean = false;
    87     cShowFPS        : boolean = false;
    88     cAltDamage      : boolean = true;
    88     cAltDamage      : boolean = true;
    89     cReducedQuality : LongInt = rqNone;
    89     cReducedQuality : LongInt = rqNone;
    90     //userNick is in uChat
    90     //userNick is in uChat
    91     recordFileName  : shortstring = '';
    91     recordFileName  : shortstring = '';
    92     
    92 
    93     cCaseFactor     : Longword;
    93     cCaseFactor     : Longword;
    94     cLandAdditions  : Longword;
    94     cLandAdditions  : Longword;
    95     cExplosives     : Longword;
    95     cExplosives     : Longword;
    96 
    96 
    97     cSeed           : shortstring;
    97     cSeed           : shortstring;
   516 
   516 
   517 procedure FreeTexture(tex: PTexture);
   517 procedure FreeTexture(tex: PTexture);
   518 begin
   518 begin
   519     if tex <> nil then
   519     if tex <> nil then
   520     begin
   520     begin
   521         if tex^.NextTexture <> nil then 
   521         if tex^.NextTexture <> nil then
   522             tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
   522             tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
   523         if tex^.PrevTexture <> nil then 
   523         if tex^.PrevTexture <> nil then
   524             tex^.PrevTexture^.NextTexture:= tex^.NextTexture
   524             tex^.PrevTexture^.NextTexture:= tex^.NextTexture
   525         else 
   525         else
   526             TextureList:= tex^.NextTexture;
   526             TextureList:= tex^.NextTexture;
   527         glDeleteTextures(1, @tex^.id);
   527         glDeleteTextures(1, @tex^.id);
   528         Dispose(tex);
   528         Dispose(tex);
   529     end
   529     end
   530 end;
   530 end;
   680     cGravity                := cMaxWindSpeed * 2;
   680     cGravity                := cMaxWindSpeed * 2;
   681     cGravityf               := 0.00025 * 2;
   681     cGravityf               := 0.00025 * 2;
   682     cDamageModifier         := _1;
   682     cDamageModifier         := _1;
   683     TargetPoint             := cTargetPointRef;
   683     TargetPoint             := cTargetPointRef;
   684     TextureList             := nil;
   684     TextureList             := nil;
   685     
   685 
   686     // int, longint longword and byte
   686     // int, longint longword and byte
   687     CursorMovementX     := 0;
   687     CursorMovementX     := 0;
   688     CursorMovementY     := 0;
   688     CursorMovementY     := 0;
   689     GameTicks           := 0;
   689     GameTicks           := 0;
   690     TrainingTimeInc     := 10000;
   690     TrainingTimeInc     := 10000;
   717     RealTicks       := 0;
   717     RealTicks       := 0;
   718     AttackBar       := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP
   718     AttackBar       := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP
   719     cCaseFactor     := 5;  {0..9}
   719     cCaseFactor     := 5;  {0..9}
   720     cLandAdditions  := 4;
   720     cLandAdditions  := 4;
   721     cExplosives     := 2;
   721     cExplosives     := 2;
   722         
   722 
   723     GameState       := Low(TGameState);
   723     GameState       := Low(TGameState);
   724     GameType        := gmtLocal;
   724     GameType        := gmtLocal;
   725     zoom            := cDefaultZoomLevel;
   725     zoom            := cDefaultZoomLevel;
   726     ZoomValue       := cDefaultZoomLevel;
   726     ZoomValue       := cDefaultZoomLevel;
   727     WeaponTooltipTex:= nil;
   727     WeaponTooltipTex:= nil;
   744     cVolumeDelta    := 0;
   744     cVolumeDelta    := 0;
   745     cHasFocus       := true;
   745     cHasFocus       := true;
   746     cInactDelay     := 1250;
   746     cInactDelay     := 1250;
   747 
   747 
   748     ScreenFade      := sfNone;
   748     ScreenFade      := sfNone;
   749     
   749 
   750 {$IFDEF SDL13}
   750 {$IFDEF SDL13}
   751     SDLwindow       := nil;
   751     SDLwindow       := nil;
   752 {$ENDIF}    
   752 {$ENDIF}
   753 {$IFDEF DEBUGFILE}
   753 {$IFDEF DEBUGFILE}
   754 {$I-}
   754 {$I-}
   755 {$IFDEF IPHONEOS}
   755 {$IFDEF IPHONEOS}
   756     Assign(f,'../Documents/debug.txt');
   756     Assign(f,'../Documents/debug.txt');
   757     Rewrite(f);
   757     Rewrite(f);