Shrink number of circle points to 60, reenable seduction circle (no longer crashes)
--- a/hedgewars/uGearsRender.pas Sun Aug 14 13:25:55 2011 -0400
+++ b/hedgewars/uGearsRender.pas Sun Aug 14 13:45:37 2011 -0400
@@ -602,11 +602,10 @@
amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle);
amSeduction: begin
DrawRotated(sprHandSeduction, hx, hy, sign, aangle);
- // Crashes for some reason in glDrawArrays
- //DrawCircle(ox, oy, 248, 4, $FF, $00, $00, $AA);
- Tint($FF, $0, $0, $AA);
- DrawTexture(ox - 240, oy - 240, SpritesData[sprVampiric].Texture, 10);
- Tint($FF, $FF, $FF, $FF);
+ DrawCircle(ox, oy, 248, 4, $FF, $00, $00, $AA);
+ //Tint($FF, $0, $0, $AA);
+ //DrawTexture(ox - 240, oy - 240, SpritesData[sprVampiric].Texture, 10);
+ //Tint($FF, $FF, $FF, $FF);
end;
amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
amRCPlane: begin
--- a/hedgewars/uRender.pas Sun Aug 14 13:25:55 2011 -0400
+++ b/hedgewars/uRender.pas Sun Aug 14 13:45:37 2011 -0400
@@ -380,18 +380,18 @@
procedure DrawCircle(X, Y, Radius, Width: LongInt);
var
i: LongInt;
- CircleVertex: array [0..359] of TVertex2f;
+ CircleVertex: array [0..59] of TVertex2f;
begin
- for i := 0 to 359 do begin
- CircleVertex[i].X := X + Radius*cos(i*pi/180);
- CircleVertex[i].Y := Y + Radius*sin(i*pi/180);
+ for i := 0 to 59 do begin
+ CircleVertex[i].X := X + Radius*cos(i*pi/30);
+ CircleVertex[i].Y := Y + Radius*sin(i*pi/30);
end;
glDisable(GL_TEXTURE_2D);
glEnable(GL_LINE_SMOOTH);
glPushMatrix;
glLineWidth(Width);
glVertexPointer(2, GL_FLOAT, 0, @CircleVertex[0]);
- glDrawArrays(GL_LINE_LOOP, 0, 360);
+ glDrawArrays(GL_LINE_LOOP, 0, 60);
glPopMatrix;
glEnable(GL_TEXTURE_2D);
glDisable(GL_LINE_SMOOTH);