changeset 1256 | 2754a6a8c8f1 |
parent 1125 | 87937426031b |
child 1439 | 340c47ad5600 |
1255:7ffc2c9e7224 | 1256:2754a6a8c8f1 |
---|---|
29 |
29 |
30 {$IFDEF COUNTTICKS} |
30 {$IFDEF COUNTTICKS} |
31 var cntTicks: LongWord; |
31 var cntTicks: LongWord; |
32 {$ENDIF} |
32 {$ENDIF} |
33 var FollowGear: PGear = nil; |
33 var FollowGear: PGear = nil; |
34 WindBarWidth: LongInt = 0; |
34 WindBarWidth: LongInt = 0; |
35 bShowAmmoMenu: boolean = false; |
35 bShowAmmoMenu: boolean = false; |
36 bSelected: boolean = false; |
36 bSelected: boolean = false; |
37 bShowFinger: boolean = false; |
37 bShowFinger: boolean = false; |
38 Frames: Longword = 0; |
38 Frames: Longword = 0; |
39 WaterColor, DeepWaterColor: TSDL_Color; |
|
39 |
40 |
40 implementation |
41 implementation |
41 uses uStore, uMisc, uTeams, uIO, uConsole, uKeys, uLocale, uSound, GL, |
42 uses uStore, uMisc, uTeams, uIO, uConsole, uKeys, uLocale, uSound, GL, |
42 uAmmos, uVisualGears, uChat; |
43 uAmmos, uVisualGears, uChat; |
43 const FPS: Longword = 0; |
44 const FPS: Longword = 0; |
49 Tex: PTexture; |
50 Tex: PTexture; |
50 EndTime: LongWord; |
51 EndTime: LongWord; |
51 end; |
52 end; |
52 |
53 |
53 var cWaterSprCount: LongInt; |
54 var cWaterSprCount: LongInt; |
54 Captions: array[TCapGroup] of TCaptionStr; |
55 Captions: array[TCapGroup] of TCaptionStr; |
55 AMxShift, SlotsNum: LongInt; |
56 AMxShift, SlotsNum: LongInt; |
56 tmpSurface: PSDL_Surface; |
57 tmpSurface: PSDL_Surface; |
57 fpsTexture: PTexture = nil; |
58 fpsTexture: PTexture = nil; |
58 |
59 |
59 procedure InitWorld; |
60 procedure InitWorld; |
60 begin |
61 begin |
61 cWaterSprCount:= 1 + cScreenWidth div (SpritesData[sprWater].Width); |
62 cWaterSprCount:= 1 + cScreenWidth div (SpritesData[sprWater].Width); |
62 cGearScrEdgesDist:= Min(cScreenWidth div 2 - 100, cScreenHeight div 2 - 50); |
63 cGearScrEdgesDist:= Min(cScreenWidth div 2 - 100, cScreenHeight div 2 - 50); |
206 begin |
207 begin |
207 if r.y < 0 then r.y:= 0; |
208 if r.y < 0 then r.y:= 0; |
208 |
209 |
209 glDisable(GL_TEXTURE_2D); |
210 glDisable(GL_TEXTURE_2D); |
210 glBegin(GL_QUADS); |
211 glBegin(GL_QUADS); |
211 glColor3ub($54, $5C, $9D); // water color |
212 glColor3ub(WaterColor.r, WaterColor.g, WaterColor. b); // water color |
212 glVertex2i(0, r.y); |
213 glVertex2i(0, r.y); |
213 glVertex2i(cScreenWidth, r.y); |
214 glVertex2i(cScreenWidth, r.y); |
214 glColor3ub($34, $3C, $7D); // deep water color |
215 glColor3ub(DeepWaterColor.r, DeepWaterColor.g, DeepWaterColor. b); // deep water color |
215 glVertex2i(cScreenWidth, cScreenHeight); |
216 glVertex2i(cScreenWidth, cScreenHeight); |
216 glVertex2i(0, cScreenHeight); |
217 glVertex2i(0, cScreenHeight); |
217 glEnd(); |
218 glEnd(); |
218 |
|
219 glColor4f(1, 1, 1, 1); // disable coloring |
219 glColor4f(1, 1, 1, 1); // disable coloring |
220 glEnable(GL_TEXTURE_2D) |
220 glEnable(GL_TEXTURE_2D) |
221 end; |
221 end; |
222 |
222 |
223 DrawGears; |
223 DrawGears; |