Ignore:
Timestamp:
Apr 6, 2021, 8:11:02 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Merged trunk branch version r348 into highdpi branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/CityProcessing.pas

    r210 r349  
    292292    begin { improvement project }
    293293      result := Imp[Project and cpIndex].Cost;
    294       if (Project and cpIndex < 28) and (GWonder[woColossus].EffectiveOwner = p)
     294      if (Project and cpIndex < nWonder) and (GWonder[woColossus].EffectiveOwner = p)
    295295      then
    296296        result := result * ColossusEffect div 100;
     
    370370          BaseHappiness := Size;
    371371      end;
    372       for i := 0 to 27 do
     372      for i := 0 to nWonder - 1 do
    373373        if Built[i] = 1 then
    374374        begin
     
    773773begin
    774774  with RW[p], City[cix] do
    775     for i := 28 to nImp - 1 do
     775    for i := nWonder to nImp - 1 do
    776776      if (Built[i] > 0) and (Project0 and (cpImp or cpIndex) <> (cpImp or i))
    777777      then // don't pay maintenance when just completed
     
    971971
    972972    // check if wonder already built
    973     if (Project and cpImp <> 0) and (Project and cpIndex < 28) and
    974       (GWonder[Project and cpIndex].CityID <> -1) then
     973    if (Project and cpImp <> 0) and (Project and cpIndex < nWonder) and
     974      (GWonder[Project and cpIndex].CityID <> WonderNotBuiltYet) then
    975975    begin
    976976      inc(Flags, chOldWonder);
     
    10501050        end;
    10511051
    1052         if NewImp < 28 then
     1052        if NewImp < nWonder then
    10531053        begin // wonder
    10541054          GWonder[NewImp].CityID := ID;
     
    10601060            woEiffel:
    10611061              begin // reactivate wonders
    1062                 for i := 0 to 27 do
     1062                for i := 0 to nWonder - 1 do
    10631063                  if Imp[i].Expiration >= 0 then
    10641064                    for cix2 := 0 to nCity - 1 do
     
    13031303                dxdy(Loc, Loc1, dx, dy);
    13041304                dec(SubCriterion[(dy + 3) shl 2 + (dx + 3) shr 1], 160);
    1305               end
    1306             end
    1307           end
    1308         end
     1305              end;
     1306            end;
     1307          end;
     1308        end;
    13091309      end;
    13101310
     
    14141414          Hierarchy[iH, iT].Trade := TileInfo.Trade;
    14151415          Hierarchy[iH, iT].SubValue := SubCriterion[V21];
    1416         end
     1416        end;
    14171417      end;
    14181418    if NeedRare <> 0 then
Note: See TracChangeset for help on using the changeset viewer.