equal
deleted
inserted
replaced
18 |
18 |
19 {$INCLUDE "options.inc"} |
19 {$INCLUDE "options.inc"} |
20 |
20 |
21 unit uWorld; |
21 unit uWorld; |
22 interface |
22 interface |
23 uses SDLh, uGears, uConsts, uFloat; |
23 uses SDLh, uGears, uConsts, uFloat, uRandom; |
24 |
24 |
25 const WorldDx: LongInt = -512; |
25 const WorldDx: LongInt = -512; |
26 WorldDy: LongInt = -256; |
26 WorldDy: LongInt = -256; |
27 |
27 |
28 procedure init_uWorld; |
28 procedure init_uWorld; |
64 AMxShift, SlotsNum: LongInt; |
64 AMxShift, SlotsNum: LongInt; |
65 tmpSurface: PSDL_Surface; |
65 tmpSurface: PSDL_Surface; |
66 fpsTexture: PTexture; |
66 fpsTexture: PTexture; |
67 |
67 |
68 procedure InitWorld; |
68 procedure InitWorld; |
69 begin |
69 var i, t: LongInt; |
|
70 cp: PClan; |
|
71 begin |
|
72 if (GameFlags and gfRandomOrder) <> 0 then // shuffle them up a bit |
|
73 begin |
|
74 for i:= 0 to ClansCount * 4 do |
|
75 begin |
|
76 t:= GetRandom(ClansCount); |
|
77 if t <> 0 then |
|
78 begin |
|
79 cp:= ClansArray[0]; |
|
80 ClansArray[0]:= ClansArray[t]; |
|
81 ClansArray[t]:= cp; |
|
82 ClansArray[t]^.ClanIndex:= t; |
|
83 ClansArray[0]^.ClanIndex:= 0; |
|
84 end; |
|
85 end; |
|
86 CurrentTeam:= ClansArray[0]^.Teams[0]; |
|
87 end; |
|
88 |
70 cWaveWidth:= SpritesData[sprWater].Width; |
89 cWaveWidth:= SpritesData[sprWater].Width; |
71 //cWaveHeight:= SpritesData[sprWater].Height; |
90 //cWaveHeight:= SpritesData[sprWater].Height; |
72 cWaveHeight:= 32; |
91 cWaveHeight:= 32; |
73 |
92 |
74 cGearScrEdgesDist:= Min(cScreenWidth div 2 - 100, cScreenHeight div 2 - 50); |
93 cGearScrEdgesDist:= Min(cScreenWidth div 2 - 100, cScreenHeight div 2 - 50); |