branch | qmlfrontend |
changeset 11828 | a69124eb7ce7 |
parent 11544 | b69f5f22a3ba |
parent 11734 | f48408dcea36 |
child 11841 | 6adf27e85cae |
11827:8c71c5a1172f | 11828:a69124eb7ce7 |
---|---|
20 |
20 |
21 unit uVariables; |
21 unit uVariables; |
22 interface |
22 interface |
23 |
23 |
24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils{$IFDEF GL2}, uMatrix{$ENDIF}; |
24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils{$IFDEF GL2}, uMatrix{$ENDIF}; |
25 |
|
26 procedure initScreenSpaceVars(); |
|
25 |
27 |
26 var |
28 var |
27 /////// init flags /////// |
29 /////// init flags /////// |
28 cMinScreenWidth : LongInt; |
30 cMinScreenWidth : LongInt; |
29 cMinScreenHeight : LongInt; |
31 cMinScreenHeight : LongInt; |
2386 CurrentTeam: PTeam; |
2388 CurrentTeam: PTeam; |
2387 PreviousTeam: PTeam; |
2389 PreviousTeam: PTeam; |
2388 CurrentHedgehog: PHedgehog; |
2390 CurrentHedgehog: PHedgehog; |
2389 TeamsArray: array[0..Pred(cMaxTeams)] of PTeam; |
2391 TeamsArray: array[0..Pred(cMaxTeams)] of PTeam; |
2390 TeamsCount: Longword; |
2392 TeamsCount: Longword; |
2391 ClansArray: array[0..Pred(cMaxTeams)] of PClan; |
2393 ClansArray, SpawnClansArray: TClansArray; |
2392 ClansCount: Longword; |
2394 ClansCount: Longword; |
2393 LocalClan: LongInt; // last non-bot, non-extdriven clan |
2395 LocalClan: LongInt; // last non-bot, non-extdriven clan |
2394 LocalTeam: LongInt; // last non-bot, non-extdriven clan first team |
2396 LocalTeam: LongInt; // last non-bot, non-extdriven clan first team |
2395 LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo |
2397 LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo |
2396 CurMinAngle, CurMaxAngle: Longword; |
2398 CurMinAngle, CurMaxAngle: Longword; |
2505 cVideoQuality := 0; |
2507 cVideoQuality := 0; |
2506 cAudioCodec := ''; |
2508 cAudioCodec := ''; |
2507 {$ENDIF} |
2509 {$ENDIF} |
2508 |
2510 |
2509 cTagsMask:= htTeamName or htName or htHealth; |
2511 cTagsMask:= htTeamName or htName or htHealth; |
2512 end; |
|
2513 |
|
2514 procedure initScreenSpaceVars(); |
|
2515 begin |
|
2516 // those values still are not perfect |
|
2517 cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); |
|
2518 cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH); |
|
2519 cScreenSpace:= cRightScreenBorder - cLeftScreenBorder; |
|
2510 end; |
2520 end; |
2511 |
2521 |
2512 procedure initModule; |
2522 procedure initModule; |
2513 var s: shortstring; |
2523 var s: shortstring; |
2514 i: integer; |
2524 i: integer; |
2687 InCinematicMode := false; |
2697 InCinematicMode := false; |
2688 CinematicSteps := 0; |
2698 CinematicSteps := 0; |
2689 CinematicBarH := 0; |
2699 CinematicBarH := 0; |
2690 CinematicScript := false; |
2700 CinematicScript := false; |
2691 |
2701 |
2692 // those values still are not perfect |
2702 initScreenSpaceVars(); |
2693 cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); |
|
2694 cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH); |
|
2695 cScreenSpace:= cRightScreenBorder - cLeftScreenBorder; |
|
2696 |
2703 |
2697 dirtyLandTexCount:= 0; |
2704 dirtyLandTexCount:= 0; |
2698 |
2705 |
2699 vobFrameTicks:= 0; |
2706 vobFrameTicks:= 0; |
2700 vobFramesCount:= 4; |
2707 vobFramesCount:= 4; |
2764 for i:= Low(ClansArray) to High(ClansArray) do |
2771 for i:= Low(ClansArray) to High(ClansArray) do |
2765 begin |
2772 begin |
2766 ClansArray[i]:= nil; |
2773 ClansArray[i]:= nil; |
2767 end; |
2774 end; |
2768 |
2775 |
2776 SpawnClansArray:= ClansArray; |
|
2777 |
|
2769 for i:= Low(TeamsArray) to High(TeamsArray) do |
2778 for i:= Low(TeamsArray) to High(TeamsArray) do |
2770 begin |
2779 begin |
2771 TeamsArray[i]:= nil; |
2780 TeamsArray[i]:= nil; |
2772 end; |
2781 end; |
2773 |
2782 |