hedgewars/uVariables.pas
changeset 4787 e353f2211cea
parent 4782 603916ddf4b6
child 4792 68f9b331014a
equal deleted inserted replaced
4747:095398eba689 4787:e353f2211cea
   129     InitStepsFlags  : Longword;
   129     InitStepsFlags  : Longword;
   130     RealTicks       : Longword;
   130     RealTicks       : Longword;
   131     AttackBar       : LongInt;
   131     AttackBar       : LongInt;
   132 
   132 
   133     WaterColorArray : array[0..3] of HwColor4f;
   133     WaterColorArray : array[0..3] of HwColor4f;
       
   134     SDWaterColorArray : array[0..3] of HwColor4f;
       
   135     SDMusic         : shortstring;
   134 
   136 
   135     CursorPoint     : TPoint;
   137     CursorPoint     : TPoint;
   136     TargetPoint     : TPoint;
   138     TargetPoint     : TPoint;
   137 
   139 
   138     ScreenFade      : TScreenFade;
   140     ScreenFade      : TScreenFade;
   173         'Graphics/AmmoMenu',             // ptAmmoMenu
   175         'Graphics/AmmoMenu',             // ptAmmoMenu
   174         'Graphics/Hedgehog',             // ptHedgehog
   176         'Graphics/Hedgehog',             // ptHedgehog
   175         'Sounds/voices',                 // ptVoices
   177         'Sounds/voices',                 // ptVoices
   176         'Graphics/Hats',                 // ptHats
   178         'Graphics/Hats',                 // ptHats
   177         'Graphics/Flags',                // ptFlags
   179         'Graphics/Flags',                // ptFlags
   178         'Missions/Maps'                  // ptMissionMaps
   180         'Missions/Maps',                 // ptMissionMaps
       
   181         'Graphics/SuddenDeath'           // ptSuddenDeath
   179     );
   182     );
   180 
   183 
   181     cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
   184     cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
   182     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
   185     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
   183 
   186 
   556             (FileName:  'Snowball'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
   559             (FileName:  'Snowball'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
   557             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSnowball
   560             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSnowball
   558             (FileName:  'amSnowball'; Path: ptCurrTheme; AltPath: ptHedgehog; Texture: nil; Surface: nil;
   561             (FileName:  'amSnowball'; Path: ptCurrTheme; AltPath: ptHedgehog; Texture: nil; Surface: nil;
   559             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSnowball
   562             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSnowball
   560             (FileName:  'Snow'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
   563             (FileName:  'Snow'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
   561             Width:  4; Height: 4; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprSnow
   564             Width:  4; Height: 4; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSnow
       
   565             (FileName:    'SDFlake'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
       
   566             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSDFlake
       
   567             (FileName:    'SDWater'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
       
   568             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprSDWater
       
   569             (FileName:   'SDClouds'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
       
   570             Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprSDCloud
       
   571             (FileName:   'SDSplash'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
       
   572             Width:  80; Height: 50; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSDSplash
       
   573             (FileName:  'SDDroplet'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
       
   574             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true)// sprSDDroplet
   562             );
   575             );
   563 
   576 
   564 
   577 
   565     Wavez: array [TWave] of record
   578     Wavez: array [TWave] of record
   566             Sprite: TSprite;
   579             Sprite: TSprite;
  2029     isMap: boolean;
  2042     isMap: boolean;
  2030     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.
  2043     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.
  2031     LandBackSurface: PSDL_Surface;
  2044     LandBackSurface: PSDL_Surface;
  2032     digest: shortstring;
  2045     digest: shortstring;
  2033     CurAmmoGear: PGear;
  2046     CurAmmoGear: PGear;
       
  2047     lastGearByUID: PGear;
  2034     GearsList: PGear;
  2048     GearsList: PGear;
  2035     AllInactive: boolean;
  2049     AllInactive: boolean;
  2036     PrvInactive: boolean;
  2050     PrvInactive: boolean;
  2037     KilledHHs: Longword;
  2051     KilledHHs: Longword;
  2038     SuddenDeathDmg: Boolean;
  2052     SuddenDeathDmg: Boolean;
  2086     ropeIconTex: PTexture;
  2100     ropeIconTex: PTexture;
  2087     rotationQt: GLfloat;
  2101     rotationQt: GLfloat;
  2088 
  2102 
  2089 
  2103 
  2090     VisualGearsList: PVisualGear;
  2104     VisualGearsList: PVisualGear;
       
  2105     lastVisualGearByUID: PVisualGear;
  2091     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2106     vobFrameTicks, vobFramesCount, vobCount: Longword;
  2092     vobVelocity, vobFallSpeed: LongInt;
  2107     vobVelocity, vobFallSpeed: LongInt;
  2093 
  2108 
  2094 
  2109 
  2095     hideAmmoMenu: boolean;
  2110     hideAmmoMenu: boolean;
  2142 implementation
  2157 implementation
  2143 
  2158 
  2144 
  2159 
  2145 procedure initModule;
  2160 procedure initModule;
  2146 begin
  2161 begin
       
  2162     lastVisualGearByUID:= nil;
       
  2163     lastGearByUID:= nil;
       
  2164     
  2147     Pathz:= cPathz;
  2165     Pathz:= cPathz;
  2148         {*  REFERENCE
  2166         {*  REFERENCE
  2149       4096 -> $FFFFF000
  2167       4096 -> $FFFFF000
  2150       2048 -> $FFFFF800
  2168       2048 -> $FFFFF800
  2151       1024 -> $FFFFFC00
  2169       1024 -> $FFFFFC00
  2152        512 -> $FFFFFE00  *}
  2170        512 -> $FFFFFE00  *}
  2153     if (cReducedQuality and rqLowRes) <> 0 then
  2171     if (cReducedQuality and rqLowRes) <> 0 then
  2154     begin
  2172         begin
  2155         LAND_WIDTH:= 2048;
  2173         LAND_WIDTH:= 2048;
  2156         LAND_HEIGHT:= 1024;
  2174         LAND_HEIGHT:= 1024;
  2157         LAND_WIDTH_MASK:= $FFFFF800;
  2175         LAND_WIDTH_MASK:= $FFFFF800;
  2158         LAND_HEIGHT_MASK:= $FFFFFC00;
  2176         LAND_HEIGHT_MASK:= $FFFFFC00;
  2159     end
  2177         end
  2160     else
  2178     else
  2161     begin
  2179         begin
  2162         LAND_WIDTH:= 4096;
  2180         LAND_WIDTH:= 4096;
  2163         LAND_HEIGHT:= 2048;
  2181         LAND_HEIGHT:= 2048;
  2164         LAND_WIDTH_MASK:= $FFFFF000;
  2182         LAND_WIDTH_MASK:= $FFFFF000;
  2165         LAND_HEIGHT_MASK:= $FFFFF800
  2183         LAND_HEIGHT_MASK:= $FFFFF800
  2166     end;
  2184         end;
       
  2185 
       
  2186     SDWaterColorArray[0].r := 182;
       
  2187     SDWaterColorArray[0].g := 144;
       
  2188     SDWaterColorArray[0].b := 201;
       
  2189     SDWaterColorArray[0].a := 255;
       
  2190     SDWaterColorArray[2].r := 150;
       
  2191     SDWaterColorArray[2].g := 112;
       
  2192     SDWaterColorArray[2].b := 169;
       
  2193     SDWaterColorArray[2].a := 255;
       
  2194     SDWaterColorArray[1]:= SDWaterColorArray[0];
       
  2195     SDWaterColorArray[3]:= SDWaterColorArray[2];
       
  2196 
       
  2197     SDMusic:= 'main_theme.ogg';
  2167 
  2198 
  2168     cDrownSpeed.QWordValue  := 257698038;       // 0.06
  2199     cDrownSpeed.QWordValue  := 257698038;       // 0.06
  2169     cDrownSpeedf            := 0.06;
  2200     cDrownSpeedf            := 0.06;
  2170     cMaxWindSpeed.QWordValue:= 1073742;     // 0.00025
  2201     cMaxWindSpeed.QWordValue:= 1073742;     // 0.00025
  2171     cWindSpeed.QWordValue   := 429496;      // 0.0001
  2202     cWindSpeed.QWordValue   := 0;      // 0.0
  2172     cWindSpeedf             := 0.0001;
  2203     cWindSpeedf             := 0.0;
  2173     cGravity                := cMaxWindSpeed * 2;
  2204     cGravity                := cMaxWindSpeed * 2;
  2174     cGravityf               := 0.00025 * 2;
  2205     cGravityf               := 0.00025 * 2;
  2175     cDamageModifier         := _1;
  2206     cDamageModifier         := _1;
  2176     TargetPoint             := cTargetPointRef;
  2207     TargetPoint             := cTargetPointRef;
  2177 
  2208