changeset 1906 | 644f93d8f148 |
parent 1895 | 7ba647a88b2f |
child 1909 | 30fa1608b54f |
1905:b1ec8db513f2 | 1906:644f93d8f148 |
---|---|
72 GearsList: PGear = nil; |
72 GearsList: PGear = nil; |
73 KilledHHs: Longword = 0; |
73 KilledHHs: Longword = 0; |
74 |
74 |
75 implementation |
75 implementation |
76 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, |
76 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, |
77 uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers, GL, |
77 uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers, |
78 {$IFDEF IPHONE} |
|
79 gles11, |
|
80 {$ELSE} |
|
81 GL, |
|
82 {$ENDIF} |
|
78 uStats, uVisualGears; |
83 uStats, uVisualGears; |
79 |
84 |
80 const MAXROPEPOINTS = 384; |
85 const MAXROPEPOINTS = 384; |
81 var RopePoints: record |
86 var RopePoints: record |
82 Count: Longword; |
87 Count: Longword; |
651 var t: LongInt; |
656 var t: LongInt; |
652 amt: TAmmoType; |
657 amt: TAmmoType; |
653 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite` |
658 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite` |
654 lx, ly, dx, dy, ax, ay, aAngle, dAngle: real; // laser, change |
659 lx, ly, dx, dy, ax, ay, aAngle, dAngle: real; // laser, change |
655 defaultPos, HatVisible: boolean; |
660 defaultPos, HatVisible: boolean; |
661 VertexBuffer: array [0..1] of TVertex2f; |
|
656 begin |
662 begin |
657 if (Gear^.State and gstHHDeath) <> 0 then |
663 if (Gear^.State and gstHHDeath) <> 0 then |
658 begin |
664 begin |
659 DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos); |
665 DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos); |
660 exit |
666 exit |
1078 |
1084 |
1079 //if (abs(lx-tx)>8) or (abs(ly-ty)>8) then |
1085 //if (abs(lx-tx)>8) or (abs(ly-ty)>8) then |
1080 begin |
1086 begin |
1081 glDisable(GL_TEXTURE_2D); |
1087 glDisable(GL_TEXTURE_2D); |
1082 glEnable(GL_LINE_SMOOTH); |
1088 glEnable(GL_LINE_SMOOTH); |
1083 glBegin(GL_LINES); |
1089 |
1084 glColor4ub($FF, $00, $00, $C0); |
1090 glColor4ub($FF, $00, $00, $C0); |
1085 glVertex2i(hx + WorldDx, hy + WorldDy); |
1091 VertexBuffer[0].X:= hx + WorldDx; |
1086 glVertex2i(tx + WorldDx, ty + WorldDy); |
1092 VertexBuffer[0].Y:= hy + WorldDy; |
1087 glEnd(); |
1093 VertexBuffer[1].X:= tx + WorldDx; |
1094 VertexBuffer[1].Y:= ty + WorldDy; |
|
1095 |
|
1096 glEnableClientState(GL_VERTEX_ARRAY); |
|
1097 glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]); |
|
1098 glDrawArrays(GL_LINES, 0, Length(VertexBuffer)); |
|
1088 glColor4f(1, 1, 1, 1); |
1099 glColor4f(1, 1, 1, 1); |
1089 glEnable(GL_TEXTURE_2D); |
1100 glEnable(GL_TEXTURE_2D); |
1090 glDisable(GL_LINE_SMOOTH); |
1101 glDisable(GL_LINE_SMOOTH); |
1091 end; |
1102 end; |
1092 end; |
1103 end; |