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; |
416 (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
416 (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
417 Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR |
417 Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR |
418 {$IFDEF USE_TOUCH_INTERFACE} |
418 {$IFDEF USE_TOUCH_INTERFACE} |
419 (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
419 (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
420 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton |
420 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton |
421 (FileName: 'arrowUp'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
421 (FileName: 'arrowup'; 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), // sprArrowUp |
422 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowUp |
423 (FileName: 'arrowDown'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
423 (FileName: 'arrowdown'; 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), // sprArrowDown |
424 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowDown |
425 (FileName: 'arrowLeft'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
425 (FileName: 'arrowleft'; 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), // sprArrowLeft |
426 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowLeft |
427 (FileName: 'arrowRight'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
427 (FileName: 'arrowright'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
428 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowRight |
428 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowRight |
429 (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
429 (FileName: 'forwardjump'; 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), // sprAMWidget |
430 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprAMWidget |
431 (FileName: 'backjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
431 (FileName: 'backjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
432 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprJumpWidget |
432 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprJumpWidget |
2672 vobSDFramesCount:= 4; |
2672 vobSDFramesCount:= 4; |
2673 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2673 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2674 vobSDVelocity:= 15; |
2674 vobSDVelocity:= 15; |
2675 vobSDFallSpeed:= 250; |
2675 vobSDFallSpeed:= 250; |
2676 |
2676 |
|
2677 {$IFDEF MOBILE} |
|
2678 cMinScreenWidth := min(cScreenWidth, 480); |
|
2679 cMinScreenHeight := min(cScreenHeight, 320); |
|
2680 {$ELSE} |
2677 cMinScreenWidth := min(cScreenWidth, 640); |
2681 cMinScreenWidth := min(cScreenWidth, 640); |
2678 cMinScreenHeight := min(cScreenHeight, 480); |
2682 cMinScreenHeight := min(cScreenHeight, 480); |
|
2683 {$ENDIF} |
2679 |
2684 |
2680 cNewScreenWidth := cScreenWidth; |
2685 cNewScreenWidth := cScreenWidth; |
2681 cNewScreenHeight := cScreenHeight; |
2686 cNewScreenHeight := cScreenHeight; |
2682 cScreenResizeDelay := 0; |
2687 cScreenResizeDelay := 0; |
2683 |
2688 |