Changeset 72


Ignore:
Timestamp:
Nov 30, 2020, 11:47:17 AM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build with Lazarus 2.0.6.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/1.1.0/UEngine.pas

    r68 r72  
    14661466  case Shape of
    14671467    ssSquare: begin
    1468       Points := [
    1469         Point(Position.X - Size div 2, Position.Y - Size div 2),
    1470         Point(Position.X + Size div 2, Position.Y - Size div 2),
    1471         Point(Position.X + Size div 2, Position.Y + Size div 2),
    1472         Point(Position.X - Size div 2, Position.Y + Size div 2)
    1473       ];
     1468      SetLength(Points, 4);
     1469      Points[0] := Point(Position.X - Size div 2, Position.Y - Size div 2);
     1470      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 2);
     1471      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 2);
     1472      Points[3] := Point(Position.X - Size div 2, Position.Y + Size div 2);
    14741473      Points := RotatePoints(Position, Points, Angle);
    14751474      Canvas.Polygon(Points);
     
    14791478      Position.X + Size div 2, Position.Y + Size div 2);
    14801479    ssTriangle: begin
    1481       Points := [
    1482         Point(Position.X, Position.Y - Size div 2),
    1483         Point(Position.X + Size div 2, Position.Y + Size div 2),
    1484         Point(Position.X - Size div 2, Position.Y + Size div 2)
    1485       ];
     1480      SetLength(Points, 3);
     1481      Points[0] := Point(Position.X, Position.Y - Size div 2);
     1482      Points[1] := Point(Position.X + Size div 2, Position.Y + Size div 2);
     1483      Points[2] := Point(Position.X - Size div 2, Position.Y + Size div 2);
    14861484      Points := RotatePoints(Position, Points, Angle);
    14871485      Canvas.Polygon(Points);
     
    15021500    end;
    15031501    ssPlus: begin
    1504       Points := [
    1505         Point(Position.X + Size div 6, Position.Y - Size div 6),
    1506         Point(Position.X + Size div 2, Position.Y - Size div 6),
    1507         Point(Position.X + Size div 2, Position.Y + Size div 6),
    1508         Point(Position.X + Size div 6, Position.Y + Size div 6),
    1509         Point(Position.X + Size div 6, Position.Y + Size div 2),
    1510         Point(Position.X - Size div 6, Position.Y + Size div 2),
    1511         Point(Position.X - Size div 6, Position.Y + Size div 6),
    1512         Point(Position.X - Size div 2, Position.Y + Size div 6),
    1513         Point(Position.X - Size div 2, Position.Y - Size div 6),
    1514         Point(Position.X - Size div 6, Position.Y - Size div 6),
    1515         Point(Position.X - Size div 6, Position.Y - Size div 2),
    1516         Point(Position.X + Size div 6, Position.Y - Size div 2)
    1517       ];
     1502      SetLength(Points, 12);
     1503      Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6);
     1504      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6);
     1505      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6);
     1506      Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6);
     1507      Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2);
     1508      Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2);
     1509      Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6);
     1510      Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6);
     1511      Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6);
     1512      Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6);
     1513      Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2);
     1514      Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2);
    15181515      Points := RotatePoints(Position, Points, Angle);
    15191516      Canvas.Polygon(Points);
     
    15401537    end;
    15411538    ssDiamond: begin
    1542       Points := [
    1543         Point(Position.X, Position.Y - Size div 2),
    1544         Point(Position.X + Size div 2, Position.Y),
    1545         Point(Position.X, Position.Y + Size div 2),
    1546         Point(Position.X - Size div 2, Position.Y)
    1547       ];
     1539      SetLength(Points, 4);
     1540      Points[0] := Point(Position.X, Position.Y - Size div 2);
     1541      Points[1] := Point(Position.X + Size div 2, Position.Y);
     1542      Points[2] := Point(Position.X, Position.Y + Size div 2);
     1543      Points[3] := Point(Position.X - Size div 2, Position.Y);
    15481544      Points := RotatePoints(Position, Points, Angle);
    15491545      Canvas.Polygon(Points);
    15501546    end;
    15511547    ssCross: begin
    1552       Points := [
    1553         Point(Position.X + Size div 6, Position.Y - Size div 6),
    1554         Point(Position.X + Size div 2, Position.Y - Size div 6),
    1555         Point(Position.X + Size div 2, Position.Y + Size div 6),
    1556         Point(Position.X + Size div 6, Position.Y + Size div 6),
    1557         Point(Position.X + Size div 6, Position.Y + Size div 2),
    1558         Point(Position.X - Size div 6, Position.Y + Size div 2),
    1559         Point(Position.X - Size div 6, Position.Y + Size div 6),
    1560         Point(Position.X - Size div 2, Position.Y + Size div 6),
    1561         Point(Position.X - Size div 2, Position.Y - Size div 6),
    1562         Point(Position.X - Size div 6, Position.Y - Size div 6),
    1563         Point(Position.X - Size div 6, Position.Y - Size div 2),
    1564         Point(Position.X + Size div 6, Position.Y - Size div 2)
    1565       ];
     1548      SetLength(Points, 12);
     1549      Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6);
     1550      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6);
     1551      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6);
     1552      Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6);
     1553      Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2);
     1554      Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2);
     1555      Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6);
     1556      Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6);
     1557      Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6);
     1558      Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6);
     1559      Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2);
     1560      Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2);
    15661561      Points := RotatePoints(Position, Points, Angle + Pi / 4);
    15671562      Canvas.Polygon(Points);
  • trunk/UEngine.pas

    r68 r72  
    14661466  case Shape of
    14671467    ssSquare: begin
    1468       Points := [
    1469         Point(Position.X - Size div 2, Position.Y - Size div 2),
    1470         Point(Position.X + Size div 2, Position.Y - Size div 2),
    1471         Point(Position.X + Size div 2, Position.Y + Size div 2),
    1472         Point(Position.X - Size div 2, Position.Y + Size div 2)
    1473       ];
     1468      SetLength(Points, 4);
     1469      Points[0] := Point(Position.X - Size div 2, Position.Y - Size div 2);
     1470      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 2);
     1471      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 2);
     1472      Points[3] := Point(Position.X - Size div 2, Position.Y + Size div 2);
    14741473      Points := RotatePoints(Position, Points, Angle);
    14751474      Canvas.Polygon(Points);
     
    14791478      Position.X + Size div 2, Position.Y + Size div 2);
    14801479    ssTriangle: begin
    1481       Points := [
    1482         Point(Position.X, Position.Y - Size div 2),
    1483         Point(Position.X + Size div 2, Position.Y + Size div 2),
    1484         Point(Position.X - Size div 2, Position.Y + Size div 2)
    1485       ];
     1480      SetLength(Points, 3);
     1481      Points[0] := Point(Position.X, Position.Y - Size div 2);
     1482      Points[1] := Point(Position.X + Size div 2, Position.Y + Size div 2);
     1483      Points[2] := Point(Position.X - Size div 2, Position.Y + Size div 2);
    14861484      Points := RotatePoints(Position, Points, Angle);
    14871485      Canvas.Polygon(Points);
     
    15021500    end;
    15031501    ssPlus: begin
    1504       Points := [
    1505         Point(Position.X + Size div 6, Position.Y - Size div 6),
    1506         Point(Position.X + Size div 2, Position.Y - Size div 6),
    1507         Point(Position.X + Size div 2, Position.Y + Size div 6),
    1508         Point(Position.X + Size div 6, Position.Y + Size div 6),
    1509         Point(Position.X + Size div 6, Position.Y + Size div 2),
    1510         Point(Position.X - Size div 6, Position.Y + Size div 2),
    1511         Point(Position.X - Size div 6, Position.Y + Size div 6),
    1512         Point(Position.X - Size div 2, Position.Y + Size div 6),
    1513         Point(Position.X - Size div 2, Position.Y - Size div 6),
    1514         Point(Position.X - Size div 6, Position.Y - Size div 6),
    1515         Point(Position.X - Size div 6, Position.Y - Size div 2),
    1516         Point(Position.X + Size div 6, Position.Y - Size div 2)
    1517       ];
     1502      SetLength(Points, 12);
     1503      Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6);
     1504      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6);
     1505      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6);
     1506      Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6);
     1507      Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2);
     1508      Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2);
     1509      Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6);
     1510      Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6);
     1511      Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6);
     1512      Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6);
     1513      Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2);
     1514      Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2);
    15181515      Points := RotatePoints(Position, Points, Angle);
    15191516      Canvas.Polygon(Points);
     
    15401537    end;
    15411538    ssDiamond: begin
    1542       Points := [
    1543         Point(Position.X, Position.Y - Size div 2),
    1544         Point(Position.X + Size div 2, Position.Y),
    1545         Point(Position.X, Position.Y + Size div 2),
    1546         Point(Position.X - Size div 2, Position.Y)
    1547       ];
     1539      SetLength(Points, 4);
     1540      Points[0] := Point(Position.X, Position.Y - Size div 2);
     1541      Points[1] := Point(Position.X + Size div 2, Position.Y);
     1542      Points[2] := Point(Position.X, Position.Y + Size div 2);
     1543      Points[3] := Point(Position.X - Size div 2, Position.Y);
    15481544      Points := RotatePoints(Position, Points, Angle);
    15491545      Canvas.Polygon(Points);
    15501546    end;
    15511547    ssCross: begin
    1552       Points := [
    1553         Point(Position.X + Size div 6, Position.Y - Size div 6),
    1554         Point(Position.X + Size div 2, Position.Y - Size div 6),
    1555         Point(Position.X + Size div 2, Position.Y + Size div 6),
    1556         Point(Position.X + Size div 6, Position.Y + Size div 6),
    1557         Point(Position.X + Size div 6, Position.Y + Size div 2),
    1558         Point(Position.X - Size div 6, Position.Y + Size div 2),
    1559         Point(Position.X - Size div 6, Position.Y + Size div 6),
    1560         Point(Position.X - Size div 2, Position.Y + Size div 6),
    1561         Point(Position.X - Size div 2, Position.Y - Size div 6),
    1562         Point(Position.X - Size div 6, Position.Y - Size div 6),
    1563         Point(Position.X - Size div 6, Position.Y - Size div 2),
    1564         Point(Position.X + Size div 6, Position.Y - Size div 2)
    1565       ];
     1548      SetLength(Points, 12);
     1549      Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6);
     1550      Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6);
     1551      Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6);
     1552      Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6);
     1553      Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2);
     1554      Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2);
     1555      Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6);
     1556      Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6);
     1557      Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6);
     1558      Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6);
     1559      Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2);
     1560      Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2);
    15661561      Points := RotatePoints(Position, Points, Angle + Pi / 4);
    15671562      Canvas.Polygon(Points);
Note: See TracChangeset for help on using the changeset viewer.