hedgewars/uVariables.pas
changeset 7028 0f60591f3a16
parent 7027 f264ad9d8965
child 7049 35d762458d66
equal deleted inserted replaced
7027:f264ad9d8965 7028:0f60591f3a16
    98 
    98 
    99     cWaterLine       : Word;
    99     cWaterLine       : Word;
   100     cGearScrEdgesDist: LongInt;
   100     cGearScrEdgesDist: LongInt;
   101 
   101 
   102     // originally typed consts
   102     // originally typed consts
   103     CharArray: array[byte] of Char;
       
   104     LastTint: Longword;
       
   105     SocketString: shortstring;
       
   106     VGCounter: Longword;
       
   107     PrevX: LongInt;
       
   108     timedelta: Longword;
       
   109     StartTicks: Longword;
       
   110     Counter: Longword;
       
   111     StepTicks: LongWord;
       
   112     ExplosionBorderColor: LongWord;
   103     ExplosionBorderColor: LongWord;
   113     WaterOpacity: byte;
   104     WaterOpacity: byte;
   114     SDWaterOpacity: byte;
   105     SDWaterOpacity: byte;
   115     prevGState: TGameState;
       
   116     GrayScale: Boolean;
   106     GrayScale: Boolean;
   117 
   107 
   118     // originally from uConsts
   108     // originally from uConsts
   119     Pathz: array[TPathType] of shortstring;
   109     Pathz: array[TPathType] of shortstring;
   120     UserPathz: array[TPathType] of shortstring;
   110     UserPathz: array[TPathType] of shortstring;
   139     cInactDelay     : Longword;
   129     cInactDelay     : Longword;
   140 
   130 
   141     bBetweenTurns   : boolean;
   131     bBetweenTurns   : boolean;
   142     bWaterRising    : boolean;
   132     bWaterRising    : boolean;
   143 
   133 
   144     //ShowCrosshair   : boolean;  This variable is inconvenient to set.  Easier to decide when rendering
       
   145     CrosshairX      : LongInt;
   134     CrosshairX      : LongInt;
   146     CrosshairY      : LongInt;
   135     CrosshairY      : LongInt;
   147     CursorMovementX : LongInt;
   136     CursorMovementX : LongInt;
   148     CursorMovementY : LongInt;
   137     CursorMovementY : LongInt;
   149     cDrownSpeed     : hwFloat;
   138     cDrownSpeed     : hwFloat;
   214 
   203 
   215     arrowUp, arrowDown, arrowLeft, arrowRight : TOnScreenWidget;
   204     arrowUp, arrowDown, arrowLeft, arrowRight : TOnScreenWidget;
   216     firebutton, jumpWidget, AMWidget          : TOnScreenWidget;
   205     firebutton, jumpWidget, AMWidget          : TOnScreenWidget;
   217     pauseButton, utilityWidget                : TOnScreenWidget;
   206     pauseButton, utilityWidget                : TOnScreenWidget;
   218 {$ENDIF}
   207 {$ENDIF}
   219     AMAnimType      : LongInt;
       
   220 
   208 
   221 
   209 
   222 const
   210 const
   223     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   211     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   224     cPathz: array[TPathType] of shortstring = (
   212     cPathz: array[TPathType] of shortstring = (
  2390     Land: TCollisionArray;
  2378     Land: TCollisionArray;
  2391     LandPixels: TLandArray;
  2379     LandPixels: TLandArray;
  2392     LandDirty: TDirtyTag;
  2380     LandDirty: TDirtyTag;
  2393     hasBorder: boolean;
  2381     hasBorder: boolean;
  2394     hasGirders: boolean;
  2382     hasGirders: boolean;
  2395     isMap: boolean;
       
  2396     playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword;  // idea is that a template can specify height/width.  Or, a map, a height/width by the dimensions of the image.  If the map has pixels near top of image, it triggers border.
  2383     playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword;  // idea is that a template can specify height/width.  Or, a map, a height/width by the dimensions of the image.  If the map has pixels near top of image, it triggers border.
  2397     LandBackSurface: PSDL_Surface;
  2384     LandBackSurface: PSDL_Surface;
  2398     digest: shortstring;
       
  2399     CurAmmoGear: PGear;
  2385     CurAmmoGear: PGear;
  2400     lastGearByUID: PGear;
  2386     lastGearByUID: PGear;
  2401     GearsList: PGear;
  2387     GearsList: PGear;
  2402     AllInactive: boolean;
  2388     AllInactive: boolean;
  2403     PrvInactive: boolean;
  2389     PrvInactive: boolean;
  2404     KilledHHs: Longword;
  2390     KilledHHs: Longword;
  2405     SuddenDeath: Boolean;
  2391     SuddenDeath: Boolean;
  2406     SuddenDeathDmg: Boolean;
  2392     SuddenDeathDmg: Boolean;
  2407     SpeechType: Longword;
  2393     SpeechType: Longword;
  2408     SpeechText: shortstring;
  2394     SpeechText: shortstring;
  2409     skipFlag: boolean;
       
  2410     PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress
  2395     PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress
  2411     StepSoundTimer: LongInt;
  2396     StepSoundTimer: LongInt;
  2412     StepSoundChannel: LongInt;
  2397     StepSoundChannel: LongInt;
  2413 
  2398 
  2414     CurrentTeam: PTeam;
  2399     CurrentTeam: PTeam;
  2420     ClansCount: Longword;
  2405     ClansCount: Longword;
  2421     LocalClan: LongInt;  // last non-bot, non-extdriven clan
  2406     LocalClan: LongInt;  // last non-bot, non-extdriven clan
  2422     LocalTeam: LongInt;  // last non-bot, non-extdriven clan first team
  2407     LocalTeam: LongInt;  // last non-bot, non-extdriven clan first team
  2423     LocalAmmo: LongInt;  // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo
  2408     LocalAmmo: LongInt;  // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo
  2424     CurMinAngle, CurMaxAngle: Longword;
  2409     CurMinAngle, CurMaxAngle: Longword;
  2425     GameOver: boolean;
       
  2426     NextClan: boolean;
  2410     NextClan: boolean;
  2427 
  2411 
  2428     FollowGear: PGear;
  2412     FollowGear: PGear;
  2429     WindBarWidth: LongInt;
  2413     WindBarWidth: LongInt;
  2430     bShowAmmoMenu: boolean;
  2414     bShowAmmoMenu: boolean;
  2441     cOffsetY: LongInt;
  2425     cOffsetY: LongInt;
  2442     AFRToggle: Boolean;
  2426     AFRToggle: Boolean;
  2443     bAFRRight: Boolean;
  2427     bAFRRight: Boolean;
  2444 
  2428 
  2445 
  2429 
  2446     SDLPrimSurface: PSDL_Surface;
       
  2447     PauseTexture,
  2430     PauseTexture,
  2448     SyncTexture,
  2431     SyncTexture,
  2449     ConfirmTexture: PTexture;
  2432     ConfirmTexture: PTexture;
  2450     cScaleFactor: GLfloat;
  2433     cScaleFactor: GLfloat;
  2451     SupportNPOTT: Boolean;
  2434     SupportNPOTT: Boolean;
  2629     vobSDFramesCount:= 4;
  2612     vobSDFramesCount:= 4;
  2630     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2613     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
  2631     vobSDVelocity:= 15;
  2614     vobSDVelocity:= 15;
  2632     vobSDFallSpeed:= 250;
  2615     vobSDFallSpeed:= 250;
  2633 
  2616 
  2634     PrevX:= 0;
       
  2635     timedelta:= 0;
       
  2636     Counter:= 0;
       
  2637     StepTicks:= 0;
       
  2638     ExplosionBorderColor:= $FF808080;
  2617     ExplosionBorderColor:= $FF808080;
  2639     WaterOpacity:= $80;
  2618     WaterOpacity:= $80;
  2640     SDWaterOpacity:= $80;
  2619     SDWaterOpacity:= $80;
  2641     prevGState:= gsConfirm;
       
  2642     GrayScale:= false;
  2620     GrayScale:= false;
  2643 
  2621 
  2644     LuaGoals:= '';
  2622     LuaGoals:= '';
  2645 end;
  2623 end;
  2646 
  2624