108 cWaterLine : Word; |
108 cWaterLine : Word; |
109 cGearScrEdgesDist: LongInt; |
109 cGearScrEdgesDist: LongInt; |
110 |
110 |
111 GameTicks : LongWord; |
111 GameTicks : LongWord; |
112 |
112 |
|
113 // originally typed consts |
|
114 CharArray: array[byte] of Char; |
|
115 LastTint: Longword; |
|
116 SocketString: shortstring; |
|
117 VGCounter: Longword; |
|
118 PrevX: LongInt; |
|
119 timedelta: Longword; |
|
120 StartTicks: Longword; |
|
121 Counter: Longword; |
|
122 StepTicks: LongWord; |
|
123 ExplosionBorderColor: LongWord; |
|
124 WaterOpacity: byte; |
|
125 SDWaterOpacity: byte; |
|
126 prevGState: TGameState; |
|
127 GrayScale: Boolean; |
|
128 |
113 // originally from uConsts |
129 // originally from uConsts |
114 Pathz: array[TPathType] of shortstring; |
130 Pathz: array[TPathType] of shortstring; |
115 UserPathz: array[TPathType] of shortstring; |
131 UserPathz: array[TPathType] of shortstring; |
116 CountTexz: array[0..Pred(AMMO_INFINITE)] of PTexture; |
132 CountTexz: array[0..Pred(AMMO_INFINITE)] of PTexture; |
117 LAND_WIDTH : Word; |
133 LAND_WIDTH : Word; |
192 |
208 |
193 hiTicks: Word; |
209 hiTicks: Word; |
194 |
210 |
195 LuaGoals : shortstring; |
211 LuaGoals : shortstring; |
196 |
212 |
|
213 VoiceList : array[0..7] of TVoice = ( |
|
214 ( snd: sndNone; voicepack: nil), |
|
215 ( snd: sndNone; voicepack: nil), |
|
216 ( snd: sndNone; voicepack: nil), |
|
217 ( snd: sndNone; voicepack: nil), |
|
218 ( snd: sndNone; voicepack: nil), |
|
219 ( snd: sndNone; voicepack: nil), |
|
220 ( snd: sndNone; voicepack: nil), |
|
221 ( snd: sndNone; voicepack: nil)); |
|
222 LastVoice : TVoice = ( snd: sndNone; voicepack: nil ); |
|
223 |
197 ///////////////////////////////////// |
224 ///////////////////////////////////// |
198 //Buttons |
225 //Buttons |
199 {$IFDEF USE_TOUCH_INTERFACE} |
226 {$IFDEF USE_TOUCH_INTERFACE} |
200 buttonScale: GLFloat; |
227 buttonScale: GLFloat; |
201 |
228 |
202 arrowUp, arrowDown, arrowLeft, arrowRight : TOnScreenWidget; |
229 arrowUp, arrowDown, arrowLeft, arrowRight : TOnScreenWidget; |
203 firebutton, jumpWidget, AMWidget : TOnScreenWidget; |
230 firebutton, jumpWidget, AMWidget : TOnScreenWidget; |
204 pauseButton, utilityWidget : TOnScreenWidget; |
231 pauseButton, utilityWidget : TOnScreenWidget; |
205 {$ENDIF} |
232 {$ENDIF} |
206 |
|
207 AMAnimType : LongInt; |
233 AMAnimType : LongInt; |
|
234 |
|
235 |
208 const |
236 const |
209 cHHFileName = 'Hedgehog'; |
237 // these consts are here because they would cause circular dependencies in uConsts/uTypes |
210 cCHFileName = 'Crosshair'; |
|
211 cThemeCFGFilename = 'theme.cfg'; |
|
212 |
|
213 FontBorder = 2; |
|
214 cPathz: array[TPathType] of shortstring = ( |
238 cPathz: array[TPathType] of shortstring = ( |
215 '', // ptNone |
239 '', // ptNone |
216 '', // ptData |
240 '', // ptData |
217 'Graphics', // ptGraphics |
241 'Graphics', // ptGraphics |
218 'Themes', // ptThemes |
242 'Themes', // ptThemes |
233 'Graphics/Flags', // ptFlags |
257 'Graphics/Flags', // ptFlags |
234 'Missions/Maps', // ptMissionMaps |
258 'Missions/Maps', // ptMissionMaps |
235 'Graphics/SuddenDeath', // ptSuddenDeath |
259 'Graphics/SuddenDeath', // ptSuddenDeath |
236 'Graphics/Buttons' // ptButton |
260 'Graphics/Buttons' // ptButton |
237 ); |
261 ); |
238 |
|
239 cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); |
|
240 cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); |
|
241 |
|
242 VoiceList : array[0..7] of TVoice = ( |
|
243 ( snd: sndNone; voicepack: nil), |
|
244 ( snd: sndNone; voicepack: nil), |
|
245 ( snd: sndNone; voicepack: nil), |
|
246 ( snd: sndNone; voicepack: nil), |
|
247 ( snd: sndNone; voicepack: nil), |
|
248 ( snd: sndNone; voicepack: nil), |
|
249 ( snd: sndNone; voicepack: nil), |
|
250 ( snd: sndNone; voicepack: nil)); |
|
251 LastVoice : TVoice = ( snd: sndNone; voicepack: nil ); |
|
252 |
262 |
253 Fontz: array[THWFont] of THHFont = ( |
263 Fontz: array[THWFont] of THHFont = ( |
254 (Handle: nil; |
264 (Handle: nil; |
255 Height: 12; |
265 Height: 12; |
256 style: TTF_STYLE_NORMAL; |
266 style: TTF_STYLE_NORMAL; |
277 style: TTF_STYLE_NORMAL; |
287 style: TTF_STYLE_NORMAL; |
278 Name: 'wqy-zenhei.ttc') |
288 Name: 'wqy-zenhei.ttc') |
279 {$ENDIF} |
289 {$ENDIF} |
280 ); |
290 ); |
281 |
291 |
|
292 var |
282 SpritesData: array[TSprite] of record |
293 SpritesData: array[TSprite] of record |
283 FileName: string[15]; |
294 FileName: string[15]; |
284 Path, AltPath: TPathType; |
295 Path, AltPath: TPathType; |
285 Texture: PTexture; |
296 Texture: PTexture; |
286 Surface: PSDL_Surface; |
297 Surface: PSDL_Surface; |
662 Width: 48; Height: 79; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprTardis |
673 Width: 48; Height: 79; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprTardis |
663 (FileName: 'slider'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
674 (FileName: 'slider'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
664 Width: 3; Height: 17; imageWidth: 3; imageHeight: 17; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprSlider |
675 Width: 3; Height: 17; imageWidth: 3; imageHeight: 17; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprSlider |
665 ); |
676 ); |
666 |
677 |
667 |
678 const |
668 Wavez: array [TWave] of record |
679 Wavez: array [TWave] of record |
669 Sprite: TSprite; |
680 Sprite: TSprite; |
670 FramesCount: Longword; |
681 FramesCount: Longword; |
671 Interval: Longword; |
682 Interval: Longword; |
672 cmd: string[31]; |
683 cmd: string[31]; |
799 (FileName: 'bump.ogg'; Path: ptSounds),// sndBump |
810 (FileName: 'bump.ogg'; Path: ptSounds),// sndBump |
800 (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector |
811 (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector |
801 (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane |
812 (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane |
802 (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis |
813 (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis |
803 ); |
814 ); |
804 |
815 var |
805 Ammoz: array [TAmmoType] of record |
816 Ammoz: array [TAmmoType] of record |
806 NameId: TAmmoStrId; |
817 NameId: TAmmoStrId; |
807 NameTex: PTexture; |
818 NameTex: PTexture; |
808 Probability, NumberInCase: Longword; |
819 Probability, NumberInCase: Longword; |
809 Ammo: TAmmo; |
820 Ammo: TAmmo; |
2295 PosSprite: sprWater; |
2306 PosSprite: sprWater; |
2296 ejectX: 0; //20; |
2307 ejectX: 0; //20; |
2297 ejectY: -3) |
2308 ejectY: -3) |
2298 ); |
2309 ); |
2299 |
2310 |
|
2311 const |
2300 GearKindAmmoTypeMap : array [TGearType] of TAmmoType = ( |
2312 GearKindAmmoTypeMap : array [TGearType] of TAmmoType = ( |
2301 (* gtFlame *) amNothing |
2313 (* gtFlame *) amNothing |
2302 (* gtHedgehog *) , amNothing |
2314 (* gtHedgehog *) , amNothing |
2303 (* gtMine *) , amNothing |
2315 (* gtMine *) , amNothing |
2304 (* gtCase *) , amNothing |
2316 (* gtCase *) , amNothing |
2441 vobFrameTicks, vobFramesCount, vobCount: Longword; |
2453 vobFrameTicks, vobFramesCount, vobCount: Longword; |
2442 vobVelocity, vobFallSpeed: LongInt; |
2454 vobVelocity, vobFallSpeed: LongInt; |
2443 vobSDFrameTicks, vobSDFramesCount, vobSDCount: Longword; |
2455 vobSDFrameTicks, vobSDFramesCount, vobSDCount: Longword; |
2444 vobSDVelocity, vobSDFallSpeed: LongInt; |
2456 vobSDVelocity, vobSDFallSpeed: LongInt; |
2445 |
2457 |
2446 |
|
2447 hideAmmoMenu: boolean; |
2458 hideAmmoMenu: boolean; |
2448 wheelUp: boolean; |
2459 wheelUp: boolean; |
2449 wheelDown: boolean; |
2460 wheelDown: boolean; |
2450 |
2461 |
2451 ControllerNumControllers: Integer; |
2462 ControllerNumControllers: Integer; |
2457 ControllerAxes: array[0..5] of array[0..19] of Integer; |
2468 ControllerAxes: array[0..5] of array[0..19] of Integer; |
2458 //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer; |
2469 //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer; |
2459 ControllerHats: array[0..5] of array[0..19] of Byte; |
2470 ControllerHats: array[0..5] of array[0..19] of Byte; |
2460 ControllerButtons: array[0..5] of array[0..19] of Byte; |
2471 ControllerButtons: array[0..5] of array[0..19] of Byte; |
2461 |
2472 |
2462 DefaultBinds, CurrentBinds: TBinds; |
2473 DefaultBinds : TBinds; |
2463 |
|
2464 coeff: LongInt; |
|
2465 |
|
2466 {$IFDEF HWLIBRARY} |
|
2467 leftClick: boolean; |
|
2468 middleClick: boolean; |
|
2469 rightClick: boolean; |
|
2470 |
|
2471 upKey: boolean; |
|
2472 downKey: boolean; |
|
2473 rightKey: boolean; |
|
2474 leftKey: boolean; |
|
2475 preciseKey: boolean; |
|
2476 |
|
2477 backspaceKey: boolean; |
|
2478 spaceKey: boolean; |
|
2479 enterKey: boolean; |
|
2480 tabKey: boolean; |
|
2481 |
|
2482 chatAction: boolean; |
|
2483 pauseAction: boolean; |
|
2484 {$ENDIF} |
|
2485 |
2474 |
2486 var trammo: array[TAmmoStrId] of ansistring; // name of the weapon |
2475 var trammo: array[TAmmoStrId] of ansistring; // name of the weapon |
2487 trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon |
2476 trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon |
2488 trammod: array[TAmmoStrId] of ansistring; // description of the weapon |
2477 trammod: array[TAmmoStrId] of ansistring; // description of the weapon |
2489 trmsg: array[TMsgStrId] of ansistring; // message of the event |
2478 trmsg: array[TMsgStrId] of ansistring; // message of the event |
2638 vobSDFramesCount:= 4; |
2627 vobSDFramesCount:= 4; |
2639 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2628 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2640 vobSDVelocity:= 15; |
2629 vobSDVelocity:= 15; |
2641 vobSDFallSpeed:= 250; |
2630 vobSDFallSpeed:= 250; |
2642 |
2631 |
|
2632 PrevX:= 0; |
|
2633 timedelta:= 0; |
|
2634 Counter:= 0; |
|
2635 StepTicks:= 0; |
|
2636 ExplosionBorderColor:= $FF808080; |
|
2637 WaterOpacity:= $80; |
|
2638 SDWaterOpacity:= $80; |
|
2639 prevGState:= gsConfirm; |
|
2640 GrayScale:= false; |
|
2641 |
2643 LuaGoals:= ''; |
2642 LuaGoals:= ''; |
2644 end; |
2643 end; |
2645 |
2644 |
2646 procedure freeModule; |
2645 procedure freeModule; |
2647 begin |
2646 begin |