Changeset 325 for trunk/LocalPlayer/IsoEngine.pas
- Timestamp:
- Mar 23, 2021, 10:49:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/IsoEngine.pas
r324 r325 15 15 TIsoMap = class 16 16 private 17 const 18 Dirx: array [0..7] of Integer = (1, 2, 1, 0, -1, -2, -1, 0); 19 Diry: array [0..7] of Integer = (-1, 0, 1, 2, 1, 0, -1, -2); 17 20 procedure CityGrid(xm, ym: integer; CityAllowClick: Boolean); 18 21 function IsShoreTile(Loc: integer): boolean; … … 753 756 (MyMap[dLoc(Loc, -2, 2)] and fObserved <> 0) and 754 757 (MyMap[dLoc(Loc, 2, 2)] and fObserved <> 0) then 755 result := result or fObserved 758 result := result or fObserved; 756 759 end 757 760 else if Loc < 0 then … … 762 765 if (MyMap[dLoc(Loc, -1, 1)] and fObserved <> 0) and 763 766 (MyMap[dLoc(Loc, 1, 1)] and fObserved <> 0) then 764 result := result or fObserved 767 result := result or fObserved; 765 768 end 766 769 else if Loc < G.lx * (G.ly + 1) then … … 771 774 if (MyMap[dLoc(Loc, -1, -1)] and fObserved <> 0) and 772 775 (MyMap[dLoc(Loc, 1, -1)] and fObserved <> 0) then 773 result := result or fObserved 776 result := result or fObserved; 774 777 end 775 778 else if Loc < G.lx * (G.ly + 2) then … … 782 785 (MyMap[dLoc(Loc, -2, -2)] and fObserved <> 0) and 783 786 (MyMap[dLoc(Loc, 2, -2)] and fObserved <> 0) then 784 result := result or fObserved 785 end 786 end; 787 788 const 789 Dirx: array [0 .. 7] of integer = (1, 2, 1, 0, -1, -2, -1, 0); 790 Diry: array [0 .. 7] of integer = (-1, 0, 1, 2, 1, 0, -1, -2); 787 result := result or fObserved; 788 end; 789 end; 791 790 792 791 function TIsoMap.Connection4(Loc, Mask, Value: integer): integer; … … 811 810 function TIsoMap.Connection8(Loc, Mask: integer): integer; 812 811 var 813 Dir, ConnLoc: integer; 812 Dir: Integer; 813 ConnLoc: Integer; 814 814 begin 815 815 result := 0; … … 825 825 function TIsoMap.OceanConnection(Loc: integer): integer; 826 826 var 827 Dir, ConnLoc: integer; 827 Dir: Integer; 828 ConnLoc: Integer; 828 829 begin 829 830 result := 0; … … 839 840 procedure TIsoMap.PaintShore(x, y, Loc: integer); 840 841 var 841 Conn, Tile: integer; 842 Conn: Integer; 843 Tile: Integer; 842 844 begin 843 845 if (y <= FTop - yyt * 2) or (y > FBottom) or (x <= FLeft - xxt * 2) or … … 1333 1335 1334 1336 function TIsoMap.IsShoreTile(Loc: integer): boolean; 1335 const 1336 Dirx: array [0 .. 7] of integer = (1, 2, 1, 0, -1, -2, -1, 0); 1337 Diry: array [0 .. 7] of integer = (-1, 0, 1, 2, 1, 0, -1, -2); 1338 var 1339 Dir, ConnLoc: integer; 1337 var 1338 Dir: Integer; 1339 ConnLoc: integer; 1340 1340 begin 1341 1341 result := false; … … 1345 1345 if (ConnLoc < 0) or (ConnLoc >= G.lx * G.ly) or 1346 1346 ((MyMap[ConnLoc] - 2) and fTerrain < 13) then 1347 result := true 1348 end 1347 result := true; 1348 end; 1349 1349 end; 1350 1350
Note:
See TracChangeset
for help on using the changeset viewer.