equal
deleted
inserted
replaced
22 {$INCLUDE options.inc} |
22 {$INCLUDE options.inc} |
23 const WorldDx: LongInt = -512; |
23 const WorldDx: LongInt = -512; |
24 WorldDy: LongInt = -256; |
24 WorldDy: LongInt = -256; |
25 |
25 |
26 procedure InitWorld; |
26 procedure InitWorld; |
27 procedure DrawWorld(Lag: LongInt; Surface: PSDL_Surface); |
27 procedure DrawWorld(Lag: LongInt); |
28 procedure AddCaption(s: string; Color: Longword; Group: TCapGroup); |
28 procedure AddCaption(s: string; Color: Longword; Group: TCapGroup); |
29 |
29 |
30 {$IFDEF COUNTTICKS} |
30 {$IFDEF COUNTTICKS} |
31 var cntTicks: LongWord; |
31 var cntTicks: LongWord; |
32 {$ENDIF} |
32 {$ENDIF} |
67 WorldDy:= - 512 + cScreenHeight div 2; |
67 WorldDy:= - 512 + cScreenHeight div 2; |
68 AMxLeft:= cScreenWidth - 210; |
68 AMxLeft:= cScreenWidth - 210; |
69 AMxCurr:= cScreenWidth |
69 AMxCurr:= cScreenWidth |
70 end; |
70 end; |
71 |
71 |
72 procedure ShowAmmoMenu(Surface: PSDL_Surface); |
72 procedure ShowAmmoMenu; |
73 const MENUSPEED = 15; |
73 const MENUSPEED = 15; |
74 var x, y, i, t: LongInt; |
74 var x, y, i, t: LongInt; |
75 Slot, Pos: LongInt; |
75 Slot, Pos: LongInt; |
76 begin |
76 begin |
77 if (TurnTimeLeft = 0) or KbdKeyPressed then bShowAmmoMenu:= false; |
77 if (TurnTimeLeft = 0) or KbdKeyPressed then bShowAmmoMenu:= false; |
149 if AMxLeft = AMxCurr then DrawSprite(sprArrow, CursorPoint.X, CursorPoint.Y, (RealTicks shr 6) mod 8) |
149 if AMxLeft = AMxCurr then DrawSprite(sprArrow, CursorPoint.X, CursorPoint.Y, (RealTicks shr 6) mod 8) |
150 end; |
150 end; |
151 |
151 |
152 procedure MoveCamera; forward; |
152 procedure MoveCamera; forward; |
153 |
153 |
154 procedure DrawWorld(Lag: LongInt; Surface: PSDL_Surface); |
154 procedure DrawWorld(Lag: LongInt); |
155 var i, t: LongInt; |
155 var i, t: LongInt; |
156 r: TSDL_Rect; |
156 r: TSDL_Rect; |
157 tdx, tdy: Double; |
157 tdx, tdy: Double; |
158 grp: TCapGroup; |
158 grp: TCapGroup; |
159 s: string[15]; |
159 s: string[15]; |
211 |
211 |
212 glColor4f(1, 1, 1, 1); // disable coloring |
212 glColor4f(1, 1, 1, 1); // disable coloring |
213 glEnable(GL_TEXTURE_2D) |
213 glEnable(GL_TEXTURE_2D) |
214 end; |
214 end; |
215 |
215 |
216 DrawGears(Surface); |
216 DrawGears; |
217 |
217 |
218 // Waves |
218 // Waves |
219 {$WARNINGS OFF} |
219 {$WARNINGS OFF} |
220 for i:= -1 to cWaterSprCount do DrawSprite(sprWater, i * 256 + ((WorldDx + (RealTicks shr 6) + 64) and $FF), cWaterLine + WorldDy - 32, 0); |
220 for i:= -1 to cWaterSprCount do DrawSprite(sprWater, i * 256 + ((WorldDx + (RealTicks shr 6) + 64) and $FF), cWaterLine + WorldDy - 32, 0); |
221 for i:= -1 to cWaterSprCount do DrawSprite(sprWater, i * 256 + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 16, 0); |
221 for i:= -1 to cWaterSprCount do DrawSprite(sprWater, i * 256 + ((WorldDx - (RealTicks shr 6) + 128) and $FF), cWaterLine + WorldDy - 16, 0); |
329 r.h:= 13; |
329 r.h:= 13; |
330 DrawSpriteFromRect(sprWindL, r, cScreenWidth - 106 + WindBarWidth, cScreenHeight - 28, 13, 0); |
330 DrawSpriteFromRect(sprWindL, r, cScreenWidth - 106 + WindBarWidth, cScreenHeight - 28, 13, 0); |
331 end; |
331 end; |
332 |
332 |
333 // AmmoMenu |
333 // AmmoMenu |
334 if (AMxCurr < cScreenWidth) or bShowAmmoMenu then ShowAmmoMenu(Surface); |
334 if (AMxCurr < cScreenWidth) or bShowAmmoMenu then ShowAmmoMenu; |
335 |
335 |
336 DrawChat; |
336 DrawChat; |
337 |
337 |
338 // Cursor |
338 // Cursor |
339 if isCursorVisible then |
339 if isCursorVisible then |