Changeset 522 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Jan 7, 2024, 10:24:51 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r517 r522 1573 1573 if Tribe[I] <> nil then 1574 1574 begin 1575 TestColorDistance := abs(Integer(UnusedTribeFiles.Objects[J])1575 TestColorDistance := Abs(Integer(UnusedTribeFiles.Objects[J]) 1576 1576 shr 16 and $FF - Tribe[I].Color shr 16 and $FF) + 1577 1577 Abs(Integer(UnusedTribeFiles.Objects[J]) shr 8 and … … 1658 1658 for I := 0 to nShipPart - 1 do 1659 1659 begin 1660 TestCost := abs(Ship1Change[I]) * Imp[imShipComp + I].Cost;1660 TestCost := Abs(Ship1Change[I]) * Imp[imShipComp + I].Cost; 1661 1661 if TestCost > MostCost then 1662 1662 begin … … 3534 3534 (TButtonC(Components[I]).ButtonIndex <> 1) then 3535 3535 TButtonC(Components[I]).ButtonIndex := 3536 Integer(MapOptionChecked) shr (Components[I].Tag shr 8) and 1 + 2 3536 Integer(MapOptionChecked) shr (Components[I].Tag shr 8) and 1 + 2; 3537 3537 end; 3538 3538 … … 4585 4585 xs := (x0 - xw) * (xxt * 2) + y0 and 1 * xxt - G.lx * (xxt * 2); 4586 4586 // |xs+xl/2-MapWidth/2| -> min 4587 while abs(2 * (xs + G.lx * (xxt * 2)) + xl - MapWidth) <4588 abs(2 * xs + xl - MapWidth) do4587 while Abs(2 * (xs + G.lx * (xxt * 2)) + xl - MapWidth) < 4588 Abs(2 * xs + xl - MapWidth) do 4589 4589 Inc(xs, G.lx * (xxt * 2)); 4590 4590 ys := (y0 - yw) * yyt - yyt; … … 4632 4632 xMap := (x0 - xw) * (xxt * 2) + y0 and 1 * xxt - G.lx * (xxt * 2); 4633 4633 // |xMap+xxt-MapWidth/2| -> min 4634 while abs(2 * (xMap + G.lx * (xxt * 2)) + 2 * xxt - MapWidth) <4635 abs(2 * xMap + 2 * xxt - MapWidth) do4634 while Abs(2 * (xMap + G.lx * (xxt * 2)) + 2 * xxt - MapWidth) < 4635 Abs(2 * xMap + 2 * xxt - MapWidth) do 4636 4636 Inc(xMap, G.lx * (xxt * 2)); 4637 4637 yMap := (y0 - yw) * yyt - yyt; … … 5954 5954 mod (2 * G.lx) - G.lx; 5955 5955 dy := MouseLoc div G.lx - Loc div G.lx; 5956 if abs(dx) + abs(dy) < 3 then5956 if Abs(dx) + Abs(dy) < 3 then 5957 5957 begin 5958 5958 DestinationMarkON := False; … … 6621 6621 // ((xFromLoc-xw1)*2+yFromLoc and 1+1)*xxt+dx*xxt/2-MapWidth/2 -> min 6622 6622 with MainMap do begin 6623 while abs(((xFromLoc - xw1 + G.lx) * 2 + yFromLoc and 1 + 1) * xxt * 2 + dx6624 * xxt - MapWidth) < abs(((xFromLoc - xw1) * 2 + yFromLoc and 1 + 1) * xxt6623 while Abs(((xFromLoc - xw1 + G.lx) * 2 + yFromLoc and 1 + 1) * xxt * 2 + dx 6624 * xxt - MapWidth) < Abs(((xFromLoc - xw1) * 2 + yFromLoc and 1 + 1) * xxt 6625 6625 * 2 + dx * xxt - MapWidth) do 6626 6626 Dec(xw1, G.lx); … … 6651 6651 NoMap.SetOutput(Buffer); 6652 6652 NoMap.SetPaintBounds(0, 0, xRange, yRange); 6653 for Step := 0 to abs(Step1 - Step0) do6653 for Step := 0 to Abs(Step1 - Step0) do 6654 6654 begin 6655 6655 BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange, … … 6658 6658 begin 6659 6659 xMoving := xFrom + 6660 Round((Step0 + Step * (Step1 - Step0) div abs(Step1 - Step0)) *6660 Round((Step0 + Step * (Step1 - Step0) div Abs(Step1 - Step0)) * 6661 6661 (xTo - xFrom) / nStep); 6662 6662 yMoving := yFrom + 6663 Round((Step0 + Step * (Step1 - Step0) div abs(Step1 - Step0)) *6663 Round((Step0 + Step * (Step1 - Step0) div Abs(Step1 - Step0)) * 6664 6664 (yTo - yFrom) / nStep); 6665 6665 end … … 6981 6981 x0:=(Loc+(y0 and 1+G.lx*1024) div 2) mod G.lx; 6982 6982 xs:=(x0-xw)*66+y0 and 1*33-G.lx*66; 6983 while abs(2*(xs+G.lx*66)-MapWidth)<abs(2*xs-MapWidth) do6983 while Abs(2*(xs+G.lx*66)-MapWidth)<Abs(2*xs-MapWidth) do 6984 6984 Inc(xs,G.lx*66); 6985 6985 ys:=(y0-yw)*16;
Note:
See TracChangeset
for help on using the changeset viewer.