312 Name: 'wqy-zenhei.ttc') |
316 Name: 'wqy-zenhei.ttc') |
313 {$ENDIF} |
317 {$ENDIF} |
314 ); |
318 ); |
315 |
319 |
316 var |
320 var |
317 SpritesData: array[TSprite] of TSpriteData = ( |
321 SpritesData: array[TSprite] of TSpriteData; |
|
322 |
|
323 const |
|
324 SpritesDataInit: array[TSprite] of TSpriteData = ( |
318 (FileName: 'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
325 (FileName: 'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
319 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater |
326 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater |
320 (FileName: 'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
327 (FileName: 'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
321 Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud |
328 Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud |
322 (FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
329 (FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
414 (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
421 (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
415 Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR |
422 Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR |
416 {$IFDEF USE_TOUCH_INTERFACE} |
423 {$IFDEF USE_TOUCH_INTERFACE} |
417 (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
424 (FileName: 'firebutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
418 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton |
425 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprFireButton |
419 (FileName: 'arrowUp'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
426 (FileName: 'arrowup'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
420 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowUp |
427 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowUp |
421 (FileName: 'arrowDown'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
428 (FileName: 'arrowdown'; 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), // sprArrowDown |
429 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowDown |
423 (FileName: 'arrowLeft'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
430 (FileName: 'arrowleft'; 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), // sprArrowLeft |
431 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowLeft |
425 (FileName: 'arrowRight'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
432 (FileName: 'arrowright'; 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), // sprArrowRight |
433 Width: 100; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprArrowRight |
427 (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
434 (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
428 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprAMWidget |
435 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprAMWidget |
429 (FileName: 'backjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
436 (FileName: 'backjump'; 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), // sprJumpWidget |
437 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprJumpWidget |
431 (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
438 (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
432 Width: 120; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprPauseButton |
439 Width: 120; Height: 100; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprPauseButton |
433 (FileName: 'pause'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;//TODO correct image |
440 (FileName: 'timerbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
434 Width: 120; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTimerButton |
441 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTimerButton |
435 (FileName: 'forwardjump'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil;//TODO correct image |
442 (FileName: 'targetbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
436 Width: 120; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTargetButton |
443 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprTargetButton |
|
444 (FileName: 'switchbutton'; Path: ptButtons; AltPath: ptNone; Texture: nil; Surface: nil; |
|
445 Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true), // sprSwitchButton |
437 {$ENDIF} |
446 {$ENDIF} |
438 (FileName: 'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil; |
447 (FileName: 'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil; |
439 Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake |
448 Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake |
440 (FileName: 'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; |
449 (FileName: 'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; |
441 Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope |
450 Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope |
709 (FileName: 'custom1'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
718 (FileName: 'custom1'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
710 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom1 |
719 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom1 |
711 (FileName: 'custom2'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
720 (FileName: 'custom2'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil; |
712 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom2 |
721 Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom2 |
713 (FileName: 'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
722 (FileName: 'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; |
714 Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true)// sprAirMine |
723 Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true), // sprAirMine |
|
724 (FileName: 'amAirMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; |
|
725 Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprHandAirMine |
715 ); |
726 ); |
716 |
727 |
717 const |
728 const |
718 Wavez: array [TWave] of record |
729 Wavez: array [TWave] of record |
719 Sprite: TSprite; |
730 Sprite: TSprite; |
2486 cTagsMask:= htTeamName or htName or htHealth; |
2505 cTagsMask:= htTeamName or htName or htHealth; |
2487 end; |
2506 end; |
2488 |
2507 |
2489 procedure initModule; |
2508 procedure initModule; |
2490 var s: shortstring; |
2509 var s: shortstring; |
|
2510 i: integer; |
2491 begin |
2511 begin |
|
2512 // init LastVoice |
|
2513 LastVoice.snd:= sndNone; |
|
2514 LastVoice.voicepack:= nil; |
|
2515 |
|
2516 // init arrays |
|
2517 Move(cPathzInit, cPathz, sizeof(cPathz)); |
|
2518 Move(FontzInit, Fontz, sizeof(Fontz)); |
|
2519 Move(SpritesDataInit, SpritesData, sizeof(SpritesData)); |
|
2520 Move(AmmozInit, Ammoz, sizeof(Ammoz)); |
|
2521 |
|
2522 |
2492 cLocale:= cLocaleFName; |
2523 cLocale:= cLocaleFName; |
2493 SplitByChar(cLocale, s, '.'); |
2524 SplitByChar(cLocale, s, '.'); |
2494 |
2525 |
2495 cFlattenFlakes := false; |
2526 cFlattenFlakes := false; |
2496 cFlattenClouds := false; |
2527 cFlattenClouds := false; |
2667 vobSDFramesCount:= 4; |
2698 vobSDFramesCount:= 4; |
2668 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2699 vobSDCount:= 30 * cScreenSpace div LAND_WIDTH; |
2669 vobSDVelocity:= 15; |
2700 vobSDVelocity:= 15; |
2670 vobSDFallSpeed:= 250; |
2701 vobSDFallSpeed:= 250; |
2671 |
2702 |
|
2703 {$IFDEF MOBILE} |
|
2704 cMinScreenWidth := min(cScreenWidth, 480); |
|
2705 cMinScreenHeight := min(cScreenHeight, 320); |
|
2706 {$ELSE} |
2672 cMinScreenWidth := min(cScreenWidth, 640); |
2707 cMinScreenWidth := min(cScreenWidth, 640); |
2673 cMinScreenHeight := min(cScreenHeight, 480); |
2708 cMinScreenHeight := min(cScreenHeight, 480); |
|
2709 {$ENDIF} |
2674 |
2710 |
2675 cNewScreenWidth := cScreenWidth; |
2711 cNewScreenWidth := cScreenWidth; |
2676 cNewScreenHeight := cScreenHeight; |
2712 cNewScreenHeight := cScreenHeight; |
2677 cScreenResizeDelay := 0; |
2713 cScreenResizeDelay := 0; |
2678 |
2714 |
2694 |
2730 |
2695 cStereoDepth:= 0; |
2731 cStereoDepth:= 0; |
2696 cViewLimitsDebug:= false; |
2732 cViewLimitsDebug:= false; |
2697 AprilOne := false; |
2733 AprilOne := false; |
2698 |
2734 |
2699 ChatPasteBuffer:= ''; |
2735 // initialize pointers to nil |
|
2736 // (don't rely on implicit init of fpc, because that one only happens ONCE when used as lib) |
|
2737 CurAmmoGear:= nil; |
|
2738 lastGearByUID:= nil; |
|
2739 GearsList:= nil; |
|
2740 CurrentTeam:= nil; |
|
2741 PreviousTeam:= nil; |
|
2742 CurrentHedgehog:= nil; |
|
2743 FollowGear:= nil; |
|
2744 lastVisualGearByUID:= nil; |
|
2745 |
|
2746 ChefHatTexture:= nil; |
|
2747 CrosshairTexture:= nil; |
|
2748 GenericHealthTexture:= nil; |
|
2749 WeaponTooltipTex:= nil; |
|
2750 HHTexture:= nil; |
|
2751 LandBackSurface:= nil; |
|
2752 ConfirmTexture:= nil; |
|
2753 MissionIcons:= nil; |
|
2754 ropeIconTex:= nil; |
|
2755 |
|
2756 for i:= Low(ClansArray) to High(ClansArray) do |
|
2757 begin |
|
2758 ClansArray[i]:= nil; |
|
2759 end; |
|
2760 |
|
2761 for i:= Low(TeamsArray) to High(TeamsArray) do |
|
2762 begin |
|
2763 TeamsArray[i]:= nil; |
|
2764 end; |
|
2765 |
|
2766 for i:= Low(CountTexz) to High(CountTexz) do |
|
2767 begin |
|
2768 CountTexz[i]:= nil; |
|
2769 end; |
|
2770 |
2700 end; |
2771 end; |
2701 |
2772 |
2702 procedure freeModule; |
2773 procedure freeModule; |
2703 begin |
2774 begin |
2704 end; |
2775 end; |