close Warning: Can't synchronize with repository "(default)" (No changeset 184 in the repository). Look in the Trac log for more information.

Changeset 166


Ignore:
Timestamp:
Nov 23, 2017, 12:14:15 AM (6 years ago)
Author:
chronos
Message:
  • Modified: Voronoi map option enabled for normal user. Map generation is still not perfect but playable.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.pas

    r155 r166  
    190190    Items.Add(SGridTypeSquare);
    191191    Items.Add(SGridTypeTriangle);
    192     if Core.DevelMode then
    193       Items.Add(SGridTypeVoronoi);
     192    Items.Add(SGridTypeVoronoi);
    194193    ItemIndex := LastIndex;
    195194  end;
  • trunk/Languages/xtactics.cs.po

    r162 r166  
    8787#: tcore.ashowcharts.caption
    8888#, fuzzy
    89 #| msgid "Charts"
     89#| msgid "Show charts"
    9090msgctxt "tcore.ashowcharts.caption"
    91 msgid "Show charts"
     91msgid "Charts"
    9292msgstr "Grafy vývoje"
     93
     94#: tcore.ashowunitmoves.caption
     95#, fuzzy
     96msgctxt "tcore.ashowunitmoves.caption"
     97msgid "Unit moves"
     98msgstr "Pohyby jednotek"
    9399
    94100#: tformabout.buttonclose.caption
  • trunk/Languages/xtactics.po

    r162 r166  
    7777#: tcore.ashowcharts.caption
    7878msgctxt "tcore.ashowcharts.caption"
    79 msgid "Show charts"
     79msgid "Charts"
     80msgstr ""
     81
     82#: tcore.ashowunitmoves.caption
     83msgctxt "tcore.ashowunitmoves.caption"
     84msgid "Unit moves"
    8085msgstr ""
    8186
  • trunk/Packages/Common/UGeometry.pas

    r165 r166  
    161161  LDetDivInv := 1 / D;
    162162
    163   Intersection.X := Trunc(((LDetLineA * LDiffLB.X) - (LDiffLA.X * LDetLineB)) * LDetDivInv);
    164   Intersection.Y := Trunc(((LDetLineA * LDiffLB.Y) - (LDiffLA.Y * LDetLineB)) * LDetDivInv);
     163  Intersection.X := Round(((LDetLineA * LDiffLB.X) - (LDiffLA.X * LDetLineB)) * LDetDivInv);
     164  Intersection.Y := Round(((LDetLineA * LDiffLB.Y) - (LDiffLA.Y * LDetLineB)) * LDetDivInv);
    165165  Result := True;
    166166end;
  • trunk/UCore.pas

    r158 r166  
    429429begin
    430430  Game.New;
     431  Game.DevelMode := DevelMode;
    431432  SelectClient;
    432433  if Game.Players.GetAliveCount = Game.Players.Count then Game.Running := True
  • trunk/UGame.pas

    r165 r166  
    475475    procedure InitDefaultPlayersSetting;
    476476  public
     477    DevelMode: Boolean;
    477478    Players: TPlayers;
    478479    PlayersSetting: TPlayers;
     
    10491050    end;
    10501051
    1051 {    // Draw links to neighbors
     1052    // Draw links to neighbors
     1053    if Player.Game.DevelMode then
    10521054    for Cell in Cells do begin
    10531055      for NeighCell in Cell.MapCell.Neighbors do begin
     
    10621064        View.CellToCanvasPos(Cell.MapCell.PosPx).Y, IntToStr(Cell.MapCell.Id));
    10631065    end;
    1064  }
     1066
    10651067    // Draw arrows
    10661068    Pen.Color := clCream;
     
    11091111  //Changing;
    11101112  //RequiredState([csHandleValid, csBrushValid, csPenValid]);
     1113  //Canvas.Brush.Style := bsClear;
    11111114  LCLIntf.Polygon(Canvas.Handle, @Points[0], Length(Points), Winding);
     1115//  SetLength(Points, Length(Points) + 1);
     1116//  Points[Length(Points) - 1] = Points[0];
     1117//  LCLIntf.Polyline(Canvas.Handle, @Points[0], Length(Points));
    11121118  //Changed;
    11131119end;
  • trunk/UMap.pas

    r165 r166  
    298298  LeftText: string;
    299299  RightText: string;
     300  NeighborCell: TCell;
    300301begin
    301302  Clear;
     
    374375      LeftCell := Cell.Neighbors[I];
    375376      RightCell := Cell.Neighbors[(I + 1) mod Cell.Neighbors.Count];
    376       LeftText := LeftCell.Neighbors.ToString;
    377       RightText := RightCell.Neighbors.ToString;
     377      //LeftText := LeftCell.Neighbors.ToString;
     378      //RightText := RightCell.Neighbors.ToString;
    378379      LeftIndex := LeftCell.Neighbors.IndexOf(Cell);
    379380      RightIndex := RightCell.Neighbors.IndexOf(Cell);
     
    424425      Polygon := TPolygon.Create(Rect(0, 0,
    425426        Size.X * DefaultCellSize.X, Size.Y * DefaultCellSize.Y));
    426       for I := 0 to Cell.Neighbors.Count - 1 do begin
    427         LinkLine := TLine.Create(Cell.PosPx,
    428           Cell.Neighbors[I].PosPx);
     427      for NeighborCell in Cell.Neighbors do begin
     428        LinkLine := TLine.Create(Cell.PosPx, NeighborCell.PosPx);
    429429        LinkLine.Distance := LinkLine.Distance - 4;
    430430        MP := LinkLine.GetMiddle;
Note: See TracChangeset for help on using the changeset viewer.