Changeset 531 for trunk/Database.pas
- Timestamp:
- Mar 27, 2024, 12:31:14 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Database.pas
r522 r531 559 559 procedure V21_to_Loc(Loc0: Integer; var VicinityLoc: TVicinity21Loc); 560 560 var 561 dx, dy, bit, y0, xComp, yComp, xComp0, xCompSwitch: Integer;562 dst: ^Integer;561 dx, dy, Bit, y0, xComp, yComp, xComp0, xCompSwitch: Integer; 562 Dst: ^Integer; 563 563 begin 564 564 y0 := Loc0 div lx; … … 571 571 xCompSwitch := xCompSwitch xor xComp0; 572 572 yComp := lx * (y0 - 3); 573 dst := @VicinityLoc;574 bit := 1;573 Dst := @VicinityLoc; 574 Bit := 1; 575 575 for dy := 0 to 6 do 576 576 begin … … 579 579 for dx := 0 to 3 do 580 580 begin 581 if bit and $67F7F76 <> 0 then582 dst^ := xComp + yComp581 if Bit and $67F7F76 <> 0 then 582 Dst^ := xComp + yComp 583 583 else 584 dst^ := -1;584 Dst^ := -1; 585 585 Inc(xComp); 586 586 if xComp >= lx then 587 587 Dec(xComp, lx); 588 Inc( dst);589 bit := bit shl 1;588 Inc(Dst); 589 Bit := Bit shl 1; 590 590 end; 591 591 Inc(yComp, lx); … … 1317 1317 Radius: TVicinity21Loc; 1318 1318 Adjacent: TVicinity8Loc; 1319 ok: Boolean;1319 Ok: Boolean; 1320 1320 1321 1321 begin … … 1414 1414 end; 1415 1415 1416 ok := True;1416 Ok := True; 1417 1417 for C := 1 to nsc do 1418 1418 if nCityLoc[C] < sccount[C] * (8 - MinGood) div (7 - MinGood) then 1419 ok := False;1420 until ok;1419 Ok := False; 1420 until Ok; 1421 1421 1422 1422 FineDistSQR := MapSize * LandMass * 9 div (nAlive * 100); … … 1478 1478 end; 1479 1479 end; 1480 p1 := p1 + sccount[C] 1480 p1 := p1 + sccount[C]; 1481 1481 end; 1482 1482 … … 1603 1603 I, p1, Loc1, nAlive, nStartLoc0, nPrefStartLoc0, imax: Integer; 1604 1604 StartLoc0: array [0 .. lxmax * lymax - 1] of Integer; 1605 ishuman: Boolean;1605 IsHuman: Boolean; 1606 1606 begin 1607 1607 nAlive := 0; … … 1636 1636 1637 1637 StartLoc[0] := 0; 1638 for ishuman := True downto False do1638 for IsHuman := True downto False do 1639 1639 for p1 := 0 to nPl - 1 do 1640 if (1 shl p1 and GAlive <> 0) and ((1 shl p1 and Human <> 0) = ishuman)1640 if (1 shl p1 and GAlive <> 0) and ((1 shl p1 and Human <> 0) = IsHuman) 1641 1641 then 1642 1642 begin … … 1790 1790 1791 1791 TerritoryCount[nPl] := MapSize; 1792 // fillchar(NewContact, sizeof(NewContact), false);1792 // FillChar(NewContact, SizeOf(NewContact), False); 1793 1793 end; 1794 1794 … … 3487 3487 I: Integer; 3488 3488 miSender, miTarget: TModelInfo; 3489 ok: Boolean;3489 Ok: Boolean; 3490 3490 begin 3491 3491 // only if target doesn't already have a model like this 3492 ok := RW[pTarget].nModel < nmmax;3492 Ok := RW[pTarget].nModel < nmmax; 3493 3493 MakeModelInfo(pSender, mix, RW[pSender].Model[mix], miSender); 3494 3494 for I := 0 to RW[pTarget].nModel - 1 do … … 3496 3496 MakeModelInfo(pTarget, I, RW[pTarget].Model[I], miTarget); 3497 3497 if IsSameModel(miSender, miTarget) then 3498 ok := False;3499 end; 3500 if ok then3498 Ok := False; 3499 end; 3500 if Ok then 3501 3501 begin 3502 3502 RW[pTarget].Model[RW[pTarget].nModel] := RW[pSender].Model[mix];
Note:
See TracChangeset
for help on using the changeset viewer.