Changeset 171 for trunk/UGame.pas
- Timestamp:
- Nov 23, 2017, 7:05:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r170 r171 30 30 TMapArea = class; 31 31 TClient = class; 32 33 TFloatPoint = record34 X, Y: Double;35 end;36 32 37 33 TTerrainType = (ttVoid, ttNormal, ttCity); … … 525 521 526 522 procedure InitStrings; 527 function FloatPoint(AX, AY: Double): TFloatPoint;528 523 529 524 resourcestring … … 554 549 PlayerModeText[pmHuman] := SHuman; 555 550 PlayerModeText[pmComputer] := SComputer; 556 end;557 558 function FloatPoint(AX, AY: Double): TFloatPoint;559 begin560 Result.X := AX;561 Result.Y := AY;562 551 end; 563 552 … … 1393 1382 var 1394 1383 Points: array of Classes.TPoint; 1395 FPoints: array of T FloatPoint;1384 FPoints: array of TPointF; 1396 1385 I: Integer; 1397 1386 ArrowSize: TPoint; … … 1403 1392 ArrowSize := TPoint.Create(Trunc(DefaultCellSize.X / 3 * View.Zoom), 1404 1393 Trunc(DefaultCellSize.Y / 3 * View.Zoom)); 1405 FPoints[0] := FloatPoint(+0.5 * ArrowSize.X, +0 * ArrowSize.Y);1406 FPoints[1] := FloatPoint(+0 * ArrowSize.X, +0.5 * ArrowSize.Y);1407 FPoints[2] := FloatPoint(+0 * ArrowSize.X, +0.25 * ArrowSize.Y);1408 FPoints[3] := FloatPoint(-0.5 * ArrowSize.X, +0.25 * ArrowSize.Y);1409 FPoints[4] := FloatPoint(-0.5 * ArrowSize.X, -0.25 * ArrowSize.Y);1410 FPoints[5] := FloatPoint(+0 * ArrowSize.X, -0.25 * ArrowSize.Y);1411 FPoints[6] := FloatPoint(+0 * ArrowSize.X, -0.5 * ArrowSize.Y);1412 FPoints[7] := FloatPoint(+0.5 * ArrowSize.X, 0 * ArrowSize.Y);1394 FPoints[0] := TPointF.Create(+0.5 * ArrowSize.X, +0 * ArrowSize.Y); 1395 FPoints[1] := TPointF.Create(+0 * ArrowSize.X, +0.5 * ArrowSize.Y); 1396 FPoints[2] := TPointF.Create(+0 * ArrowSize.X, +0.25 * ArrowSize.Y); 1397 FPoints[3] := TPointF.Create(-0.5 * ArrowSize.X, +0.25 * ArrowSize.Y); 1398 FPoints[4] := TPointF.Create(-0.5 * ArrowSize.X, -0.25 * ArrowSize.Y); 1399 FPoints[5] := TPointF.Create(+0 * ArrowSize.X, -0.25 * ArrowSize.Y); 1400 FPoints[6] := TPointF.Create(+0 * ArrowSize.X, -0.5 * ArrowSize.Y); 1401 FPoints[7] := TPointF.Create(+0.5 * ArrowSize.X, 0 * ArrowSize.Y); 1413 1402 // Rotate 1414 1403 for I := 0 to Length(Points) - 1 do 1415 FPoints[I] := FloatPoint(FPoints[I].X * Cos(Angle) - FPoints[I].Y * Sin(Angle),1404 FPoints[I] := TPointF.Create(FPoints[I].X * Cos(Angle) - FPoints[I].Y * Sin(Angle), 1416 1405 FPoints[I].X * Sin(Angle) + FPoints[I].Y * Cos(Angle)); 1417 1406 // Shift
Note:
See TracChangeset
for help on using the changeset viewer.